From ggreif at gmail.com Mon Oct 13 04:38:09 2008 From: ggreif at gmail.com (Gabor Greif) Date: Mon, 13 Oct 2008 09:38:09 -0000 Subject: [llvm-commits] [llvm] r57432 - /llvm/trunk/tools/llvmc2/driver/ Message-ID: <200810130938.m9D9c9D6002244@zion.cs.uiuc.edu> Author: ggreif Date: Mon Oct 13 04:38:08 2008 New Revision: 57432 URL: http://llvm.org/viewvc/llvm-project?rev=57432&view=rev Log: ignore the standard output dirs Modified: llvm/trunk/tools/llvmc2/driver/ (props changed) Propchange: llvm/trunk/tools/llvmc2/driver/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Mon Oct 13 04:38:08 2008 @@ -0,0 +1,3 @@ +Debug +Release +Release-Asserts From ggreif at gmail.com Mon Oct 13 05:21:17 2008 From: ggreif at gmail.com (Gabor Greif) Date: Mon, 13 Oct 2008 10:21:17 -0000 Subject: [llvm-commits] [llvm] r57433 - /llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Message-ID: <200810131021.m9DALHIn003702@zion.cs.uiuc.edu> Author: ggreif Date: Mon Oct 13 05:21:17 2008 New Revision: 57433 URL: http://llvm.org/viewvc/llvm-project?rev=57433&view=rev Log: do not use deprecated interfaces Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp?rev=57433&r1=57432&r2=57433&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolutionExpander.cpp Mon Oct 13 05:21:17 2008 @@ -242,17 +242,17 @@ Value *SCEVExpander::visitTruncateExpr(SCEVTruncateExpr *S) { Value *V = expand(S->getOperand()); - return CastInst::createTruncOrBitCast(V, S->getType(), "tmp.", InsertPt); + return CastInst::CreateTruncOrBitCast(V, S->getType(), "tmp.", InsertPt); } Value *SCEVExpander::visitZeroExtendExpr(SCEVZeroExtendExpr *S) { Value *V = expand(S->getOperand()); - return CastInst::createZExtOrBitCast(V, S->getType(), "tmp.", InsertPt); + return CastInst::CreateZExtOrBitCast(V, S->getType(), "tmp.", InsertPt); } Value *SCEVExpander::visitSignExtendExpr(SCEVSignExtendExpr *S) { Value *V = expand(S->getOperand()); - return CastInst::createSExtOrBitCast(V, S->getType(), "tmp.", InsertPt); + return CastInst::CreateSExtOrBitCast(V, S->getType(), "tmp.", InsertPt); } Value *SCEVExpander::visitSMaxExpr(SCEVSMaxExpr *S) { From ggreif at gmail.com Mon Oct 13 05:25:29 2008 From: ggreif at gmail.com (Gabor Greif) Date: Mon, 13 Oct 2008 10:25:29 -0000 Subject: [llvm-commits] [llvm] r57434 - in /llvm/trunk/include/llvm: Use.h Value.h Message-ID: <200810131025.m9DAPT64003898@zion.cs.uiuc.edu> Author: ggreif Date: Mon Oct 13 05:25:27 2008 New Revision: 57434 URL: http://llvm.org/viewvc/llvm-project?rev=57434&view=rev Log: remove a deprecated internal interface Modified: llvm/trunk/include/llvm/Use.h llvm/trunk/include/llvm/Value.h Modified: llvm/trunk/include/llvm/Use.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Use.h?rev=57434&r1=57433&r2=57434&view=diff ============================================================================== --- llvm/trunk/include/llvm/Use.h (original) +++ llvm/trunk/include/llvm/Use.h Mon Oct 13 05:25:27 2008 @@ -66,10 +66,6 @@ // Use is here to make keeping the "use" list of a Value up-to-date really easy. // class Use { -private: - /// init - specify Value and User - /// @deprecated in 2.4, will be removed soon - inline void init(Value *V, User *U); public: /// swap - provide a fast substitute to std::swap /// that also works with less standard-compliant compilers Modified: llvm/trunk/include/llvm/Value.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Value.h?rev=57434&r1=57433&r2=57434&view=diff ============================================================================== --- llvm/trunk/include/llvm/Value.h (original) +++ llvm/trunk/include/llvm/Value.h Mon Oct 13 05:25:27 2008 @@ -253,11 +253,6 @@ return OS; } -void Use::init(Value *V, User *) { - Val = V; - if (V) V->addUse(*this); -} - void Use::set(Value *V) { if (Val) removeFromList(); Val = V; From ggreif at gmail.com Mon Oct 13 05:28:12 2008 From: ggreif at gmail.com (Gabor Greif) Date: Mon, 13 Oct 2008 10:28:12 -0000 Subject: [llvm-commits] [llvm] r57435 - /llvm/trunk/include/llvm/Constant.h Message-ID: <200810131028.m9DASCUh003999@zion.cs.uiuc.edu> Author: ggreif Date: Mon Oct 13 05:28:12 2008 New Revision: 57435 URL: http://llvm.org/viewvc/llvm-project?rev=57435&view=rev Log: fix typo's Modified: llvm/trunk/include/llvm/Constant.h Modified: llvm/trunk/include/llvm/Constant.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constant.h?rev=57435&r1=57434&r2=57435&view=diff ============================================================================== --- llvm/trunk/include/llvm/Constant.h (original) +++ llvm/trunk/include/llvm/Constant.h Mon Oct 13 05:28:12 2008 @@ -33,7 +33,7 @@ /// Note that Constants are immutable (once created they never change) /// and are fully shared by structural equivalence. This means that two /// structurally equivalent constants will always have the same address. -/// Constant's are created on demand as needed and never deleted: thus clients +/// Constants are created on demand as needed and never deleted: thus clients /// don't have to worry about the lifetime of the objects. /// @brief LLVM Constant Representation class Constant : public User { @@ -66,7 +66,7 @@ /// relocations which cannot be resolved at compile time. bool ContainsRelocations() const; - // Specialize get/setOperand for Constant's as their operands are always + // Specialize get/setOperand for Constants as their operands are always // constants as well. Constant *getOperand(unsigned i) { return static_cast(User::getOperand(i)); From matthijs at stdin.nl Mon Oct 13 07:37:16 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Mon, 13 Oct 2008 12:37:16 -0000 Subject: [llvm-commits] [llvm] r57437 - /llvm/trunk/lib/CodeGen/MachineFunction.cpp Message-ID: <200810131237.m9DCbGSH008520@zion.cs.uiuc.edu> Author: matthijs Date: Mon Oct 13 07:37:16 2008 New Revision: 57437 URL: http://llvm.org/viewvc/llvm-project?rev=57437&view=rev Log: Make MachineFunction not crash when TargetMachine::getRegisterInfo() returns NULL, but just hide some debug output then. Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=57437&r1=57436&r2=57437&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Mon Oct 13 07:37:16 2008 @@ -110,8 +110,11 @@ MachineFunction::MachineFunction(const Function *F, const TargetMachine &TM) : Annotation(MF_AID), Fn(F), Target(TM) { - RegInfo = new (Allocator.Allocate()) - MachineRegisterInfo(*TM.getRegisterInfo()); + if (TM.getRegisterInfo()) + RegInfo = new (Allocator.Allocate()) + MachineRegisterInfo(*TM.getRegisterInfo()); + else + RegInfo = 0; MFInfo = 0; FrameInfo = new (Allocator.Allocate()) MachineFrameInfo(*TM.getFrameInfo()); @@ -132,7 +135,8 @@ BasicBlocks.clear(); InstructionRecycler.clear(Allocator); BasicBlockRecycler.clear(Allocator); - RegInfo->~MachineRegisterInfo(); Allocator.Deallocate(RegInfo); + if (RegInfo) + RegInfo->~MachineRegisterInfo(); Allocator.Deallocate(RegInfo); if (MFInfo) { MFInfo->~MachineFunctionInfo(); Allocator.Deallocate(MFInfo); } @@ -255,7 +259,7 @@ const TargetRegisterInfo *TRI = getTarget().getRegisterInfo(); - if (!RegInfo->livein_empty()) { + if (RegInfo && !RegInfo->livein_empty()) { OS << "Live Ins:"; for (MachineRegisterInfo::livein_iterator I = RegInfo->livein_begin(), E = RegInfo->livein_end(); I != E; ++I) { @@ -269,7 +273,7 @@ } OS << "\n"; } - if (!RegInfo->liveout_empty()) { + if (RegInfo && !RegInfo->liveout_empty()) { OS << "Live Outs:"; for (MachineRegisterInfo::liveout_iterator I = RegInfo->liveout_begin(), E = RegInfo->liveout_end(); I != E; ++I) From matthijs at stdin.nl Mon Oct 13 07:41:48 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Mon, 13 Oct 2008 12:41:48 -0000 Subject: [llvm-commits] [llvm] r57438 - /llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Message-ID: <200810131241.m9DCfmwg008674@zion.cs.uiuc.edu> Author: matthijs Date: Mon Oct 13 07:41:46 2008 New Revision: 57438 URL: http://llvm.org/viewvc/llvm-project?rev=57438&view=rev Log: * Make TargetLowering not crash when TargetMachine::getTargetAsmInfo() returns null. This assumes that any target that does not have AsmInfo, does not support "LocAndDot". Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=57438&r1=57437&r2=57438&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Mon Oct 13 07:41:46 2008 @@ -473,7 +473,8 @@ InitCmpLibcallCCs(CmpLibcallCCs); // Tell Legalize whether the assembler supports DEBUG_LOC. - if (!TM.getTargetAsmInfo()->hasDotLocAndDotFile()) + const TargetAsmInfo *TASM = TM.getTargetAsmInfo(); + if (!TASM || !TASM->hasDotLocAndDotFile()) setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand); } From matthijs at stdin.nl Mon Oct 13 08:44:16 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Mon, 13 Oct 2008 13:44:16 -0000 Subject: [llvm-commits] [llvm] r57440 - /llvm/trunk/docs/LangRef.html Message-ID: <200810131344.m9DDiGSE010703@zion.cs.uiuc.edu> Author: matthijs Date: Mon Oct 13 08:44:15 2008 New Revision: 57440 URL: http://llvm.org/viewvc/llvm-project?rev=57440&view=rev Log: Improve the description on the getelementptr instruction. It should now better define what the instruction does. This also makes it clear that getelementptr can index into a vector type. Modified: llvm/trunk/docs/LangRef.html Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=57440&r1=57439&r2=57440&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Mon Oct 13 08:44:15 2008 @@ -3316,25 +3316,34 @@
Syntax:
-  <result> = getelementptr <ty>* <ptrval>{, <ty> <idx>}*
+  <result> = getelementptr <pty>* <ptrval>{, <ty> <idx>}*
 
Overview:

The 'getelementptr' instruction is used to get the address of a -subelement of an aggregate data structure.

+subelement of an aggregate data structure. It performs address calculation only +and does not access memory.

Arguments:
-

This instruction takes a list of integer operands that indicate what -elements of the aggregate object to index to. The actual types of the arguments -provided depend on the type of the first pointer argument. The -'getelementptr' instruction is used to index down through the type -levels of a structure or to a specific index in an array. When indexing into a -structure, only i32 integer constants are allowed. When indexing -into an array or pointer, only integers of 32 or 64 bits are allowed; 32-bit -values will be sign extended to 64-bits if required.

+

The first argument is always a pointer, and forms the basis of the +calculation. The remaining arguments are indices, that indicate which of the +elements of the aggregate object are indexed. The interpretation of each index +is dependent on the type being indexed into. The first index always indexes the +pointer value given as the first argument, the second index indexes a value of +the type pointed to (not necessarily the value directly pointed to, since the +first index can be non-zero), etc. The first type indexed into must be a pointer +value, subsequent types can be arrays, vectors and structs. Note that subsequent +types being indexed into can never be pointers, since that would require loading +the pointer before continuing calculation.

+ +

The type of each index argument depends on the type it is indexing into. +When indexing into a (packed) structure, only i32 integer +constants are allowed. When indexing into an array, pointer or vector, +only integers of 32 or 64 bits are allowed (also non-constants). 32-bit values +will be sign extended to 64-bits if required.

For example, let's consider a C code fragment and how it gets compiled to LLVM:

@@ -3375,13 +3384,6 @@
Semantics:
-

The index types specified for the 'getelementptr' instruction depend -on the pointer type that is being indexed into. Pointer -and array types can use a 32-bit or 64-bit -integer type but the value will always be sign extended -to 64-bits. Structure and packed -structure types require i32 constants.

-

In the example above, the first index is indexing into the '%ST*' type, which is a pointer, yielding a '%ST' = '{ i32, double, %RT }' type, a structure. The second index indexes into the third element of @@ -3421,7 +3423,11 @@

     ; yields [12 x i8]*:aptr
-    %aptr = getelementptr {i32, [12 x i8]}* %sptr, i64 0, i32 1
+    %aptr = getelementptr {i32, [12 x i8]}* %saptr, i64 0, i32 1
+    ; yields i8*:vptr
+    %vptr = getelementptr {i32, <2 x i8>}* %svptr, i64 0, i32 1, i32 1
+    ; yields i8*:eptr
+    %eptr = getelementptr [12 x i8]* %aptr, i64 0, i32 1
 
From matthijs at stdin.nl Mon Oct 13 10:17:02 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Mon, 13 Oct 2008 15:17:02 -0000 Subject: [llvm-commits] [llvm] r57442 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200810131517.m9DFH380013820@zion.cs.uiuc.edu> Author: matthijs Date: Mon Oct 13 10:17:01 2008 New Revision: 57442 URL: http://llvm.org/viewvc/llvm-project?rev=57442&view=rev Log: Make InstructionCombining::getBitCastOperand() recognize GEP instructions and constant expression with all zero indices as being the same as a bitcast. Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=57442&r1=57441&r2=57442&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon Oct 13 10:17:01 2008 @@ -436,14 +436,34 @@ return Ty; } -/// getBitCastOperand - If the specified operand is a CastInst or a constant -/// expression bitcast, return the operand value, otherwise return null. +/// getBitCastOperand - If the specified operand is a CastInst, a constant +/// expression bitcast, or a GetElementPtrInst with all zero indices, return the +/// operand value, otherwise return null. static Value *getBitCastOperand(Value *V) { if (BitCastInst *I = dyn_cast(V)) + // BitCastInst? return I->getOperand(0); - else if (ConstantExpr *CE = dyn_cast(V)) + else if (GetElementPtrInst *GEP = dyn_cast(V)) { + // GetElementPtrInst? + if (GEP->hasAllZeroIndices()) + return GEP->getOperand(0); + } else if (ConstantExpr *CE = dyn_cast(V)) { if (CE->getOpcode() == Instruction::BitCast) + // BitCast ConstantExp? return CE->getOperand(0); + else if (CE->getOpcode() == Instruction::GetElementPtr) { + // GetElementPtr ConstantExp? + for (User::op_iterator I = CE->op_begin() + 1, E = CE->op_end(); + I != E; ++I) { + ConstantInt *CI = dyn_cast(I); + if (!CI || !CI->isZero()) + // Any non-zero indices? Not cast-like. + return 0; + } + // All-zero indices? This is just like casting. + return CE->getOperand(0); + } + } return 0; } From baldrick at free.fr Mon Oct 13 10:39:51 2008 From: baldrick at free.fr (Duncan Sands) Date: Mon, 13 Oct 2008 17:39:51 +0200 Subject: [llvm-commits] [llvm] r57442 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp In-Reply-To: <200810131517.m9DFH380013820@zion.cs.uiuc.edu> References: <200810131517.m9DFH380013820@zion.cs.uiuc.edu> Message-ID: <200810131739.51434.baldrick@free.fr> Hi, > Make InstructionCombining::getBitCastOperand() recognize GEP instructions and > constant expression with all zero indices as being the same as a bitcast. can stripPointerCasts be used here somehow? Ciao, Duncan. From matthijs at stdin.nl Mon Oct 13 10:47:35 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Mon, 13 Oct 2008 17:47:35 +0200 Subject: [llvm-commits] [llvm] r57442 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp In-Reply-To: <200810131739.51434.baldrick@free.fr> References: <200810131517.m9DFH380013820@zion.cs.uiuc.edu> <200810131739.51434.baldrick@free.fr> Message-ID: <20081013154735.GL28837@katherina.student.utwente.nl> Hi Duncan, > > Make InstructionCombining::getBitCastOperand() recognize GEP instructions and > > constant expression with all zero indices as being the same as a bitcast. > > can stripPointerCasts be used here somehow? it does actually seem that that method does exactly what getBitCastOperand() does, with the exception that getBitCastOperand() works for non-pointers as well. However, both uses of getBitCastOperand only work with pointers AFAICS, so perhaps getBitCastOperand should just be removed alltogether, then? Gr. Matthijs -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20081013/f94b0003/attachment.bin From baldrick at free.fr Mon Oct 13 11:00:44 2008 From: baldrick at free.fr (Duncan Sands) Date: Mon, 13 Oct 2008 18:00:44 +0200 Subject: [llvm-commits] [llvm] r57442 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp In-Reply-To: <20081013154735.GL28837@katherina.student.utwente.nl> References: <200810131517.m9DFH380013820@zion.cs.uiuc.edu> <200810131739.51434.baldrick@free.fr> <20081013154735.GL28837@katherina.student.utwente.nl> Message-ID: <200810131800.44959.baldrick@free.fr> Hi Matthijs, > > can stripPointerCasts be used here somehow? > it does actually seem that that method does exactly what getBitCastOperand() > does, with the exception that getBitCastOperand() works for non-pointers as > well. However, both uses of getBitCastOperand only work with pointers AFAICS, > so perhaps getBitCastOperand should just be removed alltogether, then? do you mean that getBitCastOperand never actually returns null? In that case, I agree that it's best to delete it. Ciao, Duncan. From sabre at nondot.org Mon Oct 13 11:55:18 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 13 Oct 2008 16:55:18 -0000 Subject: [llvm-commits] [llvm] r57444 - /llvm/trunk/docs/LangRef.html Message-ID: <200810131655.m9DGtJUY017342@zion.cs.uiuc.edu> Author: lattner Date: Mon Oct 13 11:55:18 2008 New Revision: 57444 URL: http://llvm.org/viewvc/llvm-project?rev=57444&view=rev Log: fix some crazily long lines. Modified: llvm/trunk/docs/LangRef.html Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=57444&r1=57443&r2=57444&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Mon Oct 13 11:55:18 2008 @@ -787,9 +787,13 @@
Syntax:
-
-define [linkage] [visibility] [cconv] [ret attrs] <ResultType> @<FunctionName> ([argument list]) [fn Attrs] [section "name"] [align N] [gc] { ... }
-
+ +define [linkage] [visibility] + [cconv] [ret attrs] + <ResultType> @<FunctionName> ([argument list]) + [fn Attrs] [section "name"] [align N] + [gc] { ... } +
@@ -4153,8 +4157,11 @@
Example:
-  <result> = vfcmp oeq <2 x float> < float 4, float 0 >, < float 5, float 0 >       ; yields: result=<2 x i32> < i32 0, i32 -1 >
-  <result> = vfcmp ult <2 x double> < double 1, double 2 >, < double 2, double 2>   ; yields: result=<2 x i64> < i64 -1, i64 0 >
+  ; yields: result=<2 x i32> < i32 0, i32 -1 >
+  <result> = vfcmp oeq <2 x float> < float 4, float 0 >, < float 5, float 0 >
+  
+  ; yields: result=<2 x i64> < i64 -1, i64 0 >
+  <result> = vfcmp ult <2 x double> < double 1, double 2 >, < double 2, double 2>
 
From sabre at nondot.org Mon Oct 13 12:12:52 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 13 Oct 2008 17:12:52 -0000 Subject: [llvm-commits] [llvm] r57446 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810131712.m9DHCqXK017916@zion.cs.uiuc.edu> Author: lattner Date: Mon Oct 13 12:12:51 2008 New Revision: 57446 URL: http://llvm.org/viewvc/llvm-project?rev=57446&view=rev Log: final note. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57446&r1=57445&r2=57446&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 13 12:12:51 2008 @@ -308,6 +308,8 @@
  • fast isel
  • Selection dag speedups
  • asmwriter + raw_ostream -> fastah
  • +
  • Partitioned Boolean Quadratic Programming (PBQP) based register +allocator.
  • ...
  • From baldrick at free.fr Mon Oct 13 12:27:24 2008 From: baldrick at free.fr (Duncan Sands) Date: Mon, 13 Oct 2008 17:27:24 -0000 Subject: [llvm-commits] [llvm] r57447 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810131727.m9DHRO4C018446@zion.cs.uiuc.edu> Author: baldrick Date: Mon Oct 13 12:27:23 2008 New Revision: 57447 URL: http://llvm.org/viewvc/llvm-project?rev=57447&view=rev Log: Update the Ada part. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57447&r1=57446&r2=57447&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 13 12:27:23 2008 @@ -620,11 +620,10 @@ which does support trampolines.
  • The Ada front-end fails to bootstrap. Workaround: configure with --disable-bootstrap.
  • -
  • The c380004 and c393010 ACATS tests -fail (c380004 also fails with gcc-4.2 mainline). When built at -O3, the -cxg2021 ACATS test also fails.
  • -
  • Some gcc specific Ada tests continue to crash the compiler. The testsuite -reports most tests as having failed even though they pass.
  • +
  • The c380004, c393010 +and cxg2021 ACATS tests fail +(c380004 also fails with gcc-4.2 mainline).
  • +
  • Some gcc specific Ada tests continue to crash the compiler.
  • The -E binder option (exception backtraces) does not work and will result in programs crashing if an exception is raised. Workaround: do not use -E.
  • From sabre at nondot.org Mon Oct 13 12:30:15 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 13 Oct 2008 17:30:15 -0000 Subject: [llvm-commits] [test-suite] r57448 - /test-suite/trunk/MultiSource/Applications/lua/generate_inputs.sh Message-ID: <200810131730.m9DHUG4U018553@zion.cs.uiuc.edu> Author: lattner Date: Mon Oct 13 12:30:15 2008 New Revision: 57448 URL: http://llvm.org/viewvc/llvm-project?rev=57448&view=rev Log: manually expand out the result of 'seq', allowing this to pass on darwin, which doesn't have seq. Modified: test-suite/trunk/MultiSource/Applications/lua/generate_inputs.sh Modified: test-suite/trunk/MultiSource/Applications/lua/generate_inputs.sh URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/lua/generate_inputs.sh?rev=57448&r1=57447&r2=57448&view=diff ============================================================================== --- test-suite/trunk/MultiSource/Applications/lua/generate_inputs.sh (original) +++ test-suite/trunk/MultiSource/Applications/lua/generate_inputs.sh Mon Oct 13 12:30:15 2008 @@ -8,10 +8,10 @@ input1=$1 input10="" input50="" - for c in `seq 1 10`; do + for c in 1 2 3 4 5 6 7 8 9 10; do input10="$input10 $input1" done - for c in `seq 1 5`; do + for c in 1 2 3 4 5; do input50="$input50 $input10" done declare -i count=$2 From evan.cheng at apple.com Mon Oct 13 12:30:56 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 13 Oct 2008 17:30:56 -0000 Subject: [llvm-commits] [llvm] r57449 - /llvm/trunk/include/llvm/Target/TargetInstrInfo.h Message-ID: <200810131730.m9DHUuTw018599@zion.cs.uiuc.edu> Author: evancheng Date: Mon Oct 13 12:30:56 2008 New Revision: 57449 URL: http://llvm.org/viewvc/llvm-project?rev=57449&view=rev Log: Clarify meaning of copyRegToReg's return value. Modified: llvm/trunk/include/llvm/Target/TargetInstrInfo.h Modified: llvm/trunk/include/llvm/Target/TargetInstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetInstrInfo.h?rev=57449&r1=57448&r2=57449&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetInstrInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetInstrInfo.h Mon Oct 13 12:30:56 2008 @@ -220,7 +220,9 @@ return 0; } - /// copyRegToReg - Add a copy between a pair of registers + /// copyRegToReg - Emit instructions to copy between a pair of registers. It + /// returns false if the target does not how to copy between the specified + /// registers. virtual bool copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned DestReg, unsigned SrcReg, From baldrick at free.fr Mon Oct 13 12:32:15 2008 From: baldrick at free.fr (Duncan Sands) Date: Mon, 13 Oct 2008 17:32:15 -0000 Subject: [llvm-commits] [llvm] r57450 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810131732.m9DHWFUp018661@zion.cs.uiuc.edu> Author: baldrick Date: Mon Oct 13 12:32:15 2008 New Revision: 57450 URL: http://llvm.org/viewvc/llvm-project?rev=57450&view=rev Log: Fix typo. Add note on trampoline support. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57450&r1=57449&r2=57450&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 13 12:32:15 2008 @@ -328,7 +328,7 @@
    • Exception handling is supported by default on Linux/x86-64.
    • -
    • Position Independent Code (PIC) is now support on Linux/x86-64.
    • +
    • Position Independent Code (PIC) is now supported on Linux/x86-64.
    • ...
    @@ -346,6 +346,7 @@
    • MIPS floating point support?
    • +
    • PowerPC now supports trampolines.
    • ....
    From alenhar2 at cs.uiuc.edu Mon Oct 13 12:47:38 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Mon, 13 Oct 2008 17:47:38 -0000 Subject: [llvm-commits] [poolalloc] r57451 - in /poolalloc/trunk: include/dsa/DataStructure.h lib/DSA/BottomUpClosure.cpp lib/DSA/CompleteBottomUp.cpp lib/DSA/DataStructure.cpp lib/DSA/Local.cpp lib/DSA/Printer.cpp lib/DSA/StdLibPass.cpp lib/DSA/TopDownClosure.cpp lib/PoolAllocate/PoolAllocate.cpp lib/PoolAllocate/TransformFunctionBody.cpp Message-ID: <200810131747.m9DHldYZ019319@zion.cs.uiuc.edu> Author: alenhar2 Date: Mon Oct 13 12:47:38 2008 New Revision: 57451 URL: http://llvm.org/viewvc/llvm-project?rev=57451&view=rev Log: Fix a number of bugs, much more of multisource passes now Modified: poolalloc/trunk/include/dsa/DataStructure.h poolalloc/trunk/lib/DSA/BottomUpClosure.cpp poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp poolalloc/trunk/lib/DSA/DataStructure.cpp poolalloc/trunk/lib/DSA/Local.cpp poolalloc/trunk/lib/DSA/Printer.cpp poolalloc/trunk/lib/DSA/StdLibPass.cpp poolalloc/trunk/lib/DSA/TopDownClosure.cpp poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp Modified: poolalloc/trunk/include/dsa/DataStructure.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DataStructure.h?rev=57451&r1=57450&r2=57451&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/DataStructure.h (original) +++ poolalloc/trunk/include/dsa/DataStructure.h Mon Oct 13 12:47:38 2008 @@ -37,10 +37,10 @@ FunctionPass *createDataStructureGraphCheckerPass(); class DataStructures : public ModulePass { - typedef std::map > ActualCalleesTy; + typedef hash_map > ActualCalleesTy; typedef hash_map DSInfoTy; public: - typedef std::set::const_iterator callee_iterator; + typedef hash_set::const_iterator callee_iterator; private: /// TargetData, comes in handy @@ -52,6 +52,10 @@ /// Do we clone Graphs or steal them? bool Clone; + + /// do we reset the aux list to the func list? + bool resetAuxCalls; + void buildGlobalECs(std::set& ECGlobals); void eliminateUsesOfECGlobals(DSGraph& G, const std::set &ECGlobals); @@ -62,6 +66,9 @@ // Callgraph, as computed so far ActualCalleesTy ActualCallees; + // Name for printing + const char* printname; + protected: /// The Globals Graph contains all information on the globals @@ -72,7 +79,7 @@ EquivalenceClasses GlobalECs; - void init(DataStructures* D, bool clone, bool printAuxCalls, bool copyGlobalAuxCalls); + void init(DataStructures* D, bool clone, bool printAuxCalls, bool copyGlobalAuxCalls, bool resetAux); void init(TargetData* T); void formGlobalECs(); @@ -82,13 +89,18 @@ ActualCallees[I].insert(F); } - DataStructures(intptr_t id) - :ModulePass(id), TD(0), GraphSource(0), GlobalsGraph(0) { + DataStructures(intptr_t id, const char* name) + :ModulePass(id), TD(0), GraphSource(0), printname(name), GlobalsGraph(0) { //a dummy node for empty call sites ActualCallees[0]; } public: + /// print - Print out the analysis results... + /// + void print(std::ostream &O, const Module *M) const; + void dumpCallGraph() const; + callee_iterator callee_begin(const Instruction *I) const { ActualCalleesTy::const_iterator ii = ActualCallees.find(I); if (ii == ActualCallees.end()) @@ -103,6 +115,10 @@ return ii->second.end(); } + void callee_site(const Instruction* I) { + ActualCallees[I]; + } + unsigned callee_size() const { unsigned sum = 0; for (ActualCalleesTy::const_iterator ii = ActualCallees.begin(), @@ -159,15 +175,11 @@ class LocalDataStructures : public DataStructures { public: static char ID; - LocalDataStructures() : DataStructures((intptr_t)&ID) {} + LocalDataStructures() : DataStructures((intptr_t)&ID, "local.") {} ~LocalDataStructures() { releaseMemory(); } virtual bool runOnModule(Module &M); - /// print - Print out the analysis results... - /// - void print(std::ostream &O, const Module *M) const; - /// getAnalysisUsage - This obviously provides a data structure graph. /// virtual void getAnalysisUsage(AnalysisUsage &AU) const { @@ -181,15 +193,11 @@ void eraseCallsTo(Function* F); public: static char ID; - StdLibDataStructures() : DataStructures((intptr_t)&ID) {} + StdLibDataStructures() : DataStructures((intptr_t)&ID, "stdlib.") {} ~StdLibDataStructures() { releaseMemory(); } virtual bool runOnModule(Module &M); - /// print - Print out the analysis results... - /// - void print(std::ostream &O, const Module *M) const; - /// getAnalysisUsage - This obviously provides a data structure graph. /// virtual void getAnalysisUsage(AnalysisUsage &AU) const { @@ -209,15 +217,17 @@ std::pair > > IndCallGraphMap; const char* debugname; + bool useCallGraph; public: static char ID; //Child constructor - BUDataStructures(intptr_t CID, const char* name) - : DataStructures(CID), debugname(name) {} + BUDataStructures(intptr_t CID, const char* name, const char* printname) + : DataStructures(CID, printname), debugname(name), useCallGraph(true) {} //main constructor BUDataStructures() - : DataStructures((intptr_t)&ID), debugname("dsa-bu") {} + : DataStructures((intptr_t)&ID, "bu."), debugname("dsa-bu"), + useCallGraph(false) {} ~BUDataStructures() { releaseMemory(); } virtual bool runOnModule(Module &M); @@ -227,10 +237,6 @@ void deleteValue(Value *V); void copyValue(Value *From, Value *To); - /// print - Print out the analysis results... - /// - void print(std::ostream &O, const Module *M) const; - virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); } @@ -289,15 +295,11 @@ public: static char ID; - TDDataStructures() : DataStructures((intptr_t)&ID) {} + TDDataStructures() : DataStructures((intptr_t)&ID, "td.") {} ~TDDataStructures() { releaseMemory(); } virtual bool runOnModule(Module &M); - /// print - Print out the analysis results... - /// - void print(std::ostream &O, const Module *M) const; - /// getAnalysisUsage - This obviously provides a data structure graph. /// virtual void getAnalysisUsage(AnalysisUsage &AU) const { @@ -324,7 +326,7 @@ public: static char ID; CompleteBUDataStructures() - : BUDataStructures((intptr_t)&ID, "dsa-cbu") {} + : BUDataStructures((intptr_t)&ID, "dsa-cbu", "cbu.") {} ~CompleteBUDataStructures() { releaseMemory(); } virtual bool runOnModule(Module &M); @@ -333,9 +335,6 @@ AU.addRequired(); } - /// print - Print out the analysis results... - /// - void print(std::ostream &O, const Module *M) const; }; } // End llvm namespace Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=57451&r1=57450&r2=57451&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original) +++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Mon Oct 13 12:47:38 2008 @@ -37,7 +37,7 @@ // program. // bool BUDataStructures::runOnModule(Module &M) { - init(&getAnalysis(), false, true, false); + init(&getAnalysis(), false, true, false, false ); return runOnModuleInternal(M); } @@ -165,11 +165,11 @@ CS.getCalleeNode()->addFullFunctionList(Callees); // If any of the callees are unresolvable, remove the whole batch! - for (unsigned i = OldSize; i != Callees.size(); ) + for (unsigned i = OldSize, e = Callees.size(); i != e; ++i) if (Callees[i]->isDeclaration()) { - Callees.erase(Callees.begin()+i); - } else - ++i; + Callees.erase(Callees.begin()+OldSize, Callees.end()); + return; + } } } @@ -183,12 +183,12 @@ unsigned OldSize = Callees.size(); CS.getCalleeNode()->addFullFunctionList(Callees); - // If any of the callees are unresolvable, remove the whole batch! - for (unsigned i = OldSize, e = Callees.size(); i != e; ++i) + // If any of the callees are unresolvable, remove them + for (unsigned i = OldSize; i != Callees.size(); ) if (Callees[i]->isDeclaration()) { - Callees.erase(Callees.begin()+OldSize, Callees.end()); - return; - } + Callees.erase(Callees.begin()+i); + } else + ++i; } } @@ -352,6 +352,7 @@ for(DSGraph::afc_iterator ii = G.afc_begin(), ee = G.afc_end(); ii != ee; ++ii) { + //cerr << "Pushing " << ii->getCallSite().getInstruction()->getOperand(0) << "\n"; //If we can, merge with an existing call site for this instruction if (GG.hasNodeForValue(ii->getCallSite().getInstruction()->getOperand(0))) { DSGraph::afc_iterator GGii; @@ -407,35 +408,36 @@ std::vector CalledFuncs; while (!TempFCs.empty()) { DSCallSite &CS = *TempFCs.begin(); + Instruction *TheCall = CS.getCallSite().getInstruction(); CalledFuncs.clear(); - // Fast path for noop calls. Note that we don't care about merging globals - // in the callee with nodes in the caller here. - if (CS.getRetVal().isNull() && CS.getNumPtrArgs() == 0) { - TempFCs.erase(TempFCs.begin()); - continue; - } - GetAllCallees(CS, CalledFuncs); bool isComplete = true; if (CalledFuncs.empty()) { // Remember that we could not resolve this yet! - AuxCallsList.splice(AuxCallsList.end(), TempFCs, TempFCs.begin()); isComplete = false; GetAnyCallees(CS, CalledFuncs); + if (useCallGraph) + for (callee_iterator ii = callee_begin(CS.getCallSite().getInstruction()), + ee = callee_end(CS.getCallSite().getInstruction()); ii != ee; ++ii) + CalledFuncs.push_back(*ii); + std::sort(CalledFuncs.begin(), CalledFuncs.end()); + std::vector::iterator uid = std::unique(CalledFuncs.begin(), CalledFuncs.end()); + CalledFuncs.resize(uid - CalledFuncs.begin()); } - - if (CalledFuncs.empty()) - continue; + + //cerr << "at " << TheCall << " with " << CalledFuncs.size() << "\n"; DSGraph *GI; - Instruction *TheCall = CS.getCallSite().getInstruction(); + for (std::vector::iterator ii = CalledFuncs.begin(), ee = CalledFuncs.end(); + ii != ee; ++ii) + callee_add(TheCall, *ii); + if (CalledFuncs.size() == 1 && (isComplete || hasDSGraph(*CalledFuncs[0]))) { const Function *Callee = CalledFuncs[0]; - callee_add(TheCall, Callee); // Get the data structure graph for the called function. GI = &getDSGraph(*Callee); // Graph to inline @@ -448,7 +450,7 @@ DSGraph::StripAllocaBit|DSGraph::DontCloneCallNodes| (isComplete?0:DSGraph::DontCloneAuxCallNodes)); ++NumInlines; - } else { + } else if (CalledFuncs.size() > 1) { DEBUG(std::cerr << "In Fns: " << Graph.getFunctionNames() << "\n"); DEBUG(std::cerr << " calls " << CalledFuncs.size() << " fns from site: " << CS.getCallSite().getInstruction() @@ -457,12 +459,8 @@ unsigned NumPrinted = 0; for (std::vector::iterator I = CalledFuncs.begin(), - E = CalledFuncs.end(); I != E; ++I) { + E = CalledFuncs.end(); I != E; ++I) if (NumPrinted++ < 8) DOUT << " " << (*I)->getName(); - - // Add the call edges to the call graph. - callee_add(TheCall, *I); - } DOUT << "\n"; if (!isComplete) { @@ -534,8 +532,9 @@ (isComplete?0:DSGraph::DontCloneAuxCallNodes)); ++NumInlines; } - if (isComplete) - TempFCs.erase(TempFCs.begin()); + if (!isComplete) + AuxCallsList.push_front(CS); + TempFCs.erase(TempFCs.begin()); } // Recompute the Incomplete markers @@ -561,24 +560,23 @@ } void BUDataStructures::inlineUnresolved(DSGraph &Graph) { - std::list TempFCs; - std::list &AuxCallsList = Graph.getAuxFunctionCalls(); - TempFCs.insert(TempFCs.begin(), AuxCallsList.begin(), AuxCallsList.end()); - - std::vector CalledFuncs; - while (!TempFCs.empty()) { - DSCallSite CS = *TempFCs.begin(); - TempFCs.erase(TempFCs.begin()); - CalledFuncs.clear(); + for (DSGraph::afc_iterator aii = Graph.afc_begin(), aee = Graph.afc_end(); + aii != aee; ++aii) { + std::vector CalledFuncs; + DSCallSite CS = *aii; GetAnyCallees(CS, CalledFuncs); if (CalledFuncs.empty()) continue; DSGraph *GI; Instruction *TheCall = CS.getCallSite().getInstruction(); + + for (std::vector::iterator ii = CalledFuncs.begin(), ee = CalledFuncs.end(); + ii != ee; ++ii) + callee_add(TheCall, *ii); + if (CalledFuncs.size() == 1 && hasDSGraph(*CalledFuncs[0])) { const Function *Callee = CalledFuncs[0]; - callee_add(TheCall, Callee); // Get the data structure graph for the called function. GI = &getDSGraph(*Callee); // Graph to inline @@ -600,12 +598,8 @@ unsigned NumPrinted = 0; for (std::vector::iterator I = CalledFuncs.begin(), - E = CalledFuncs.end(); I != E; ++I) { + E = CalledFuncs.end(); I != E; ++I) if (NumPrinted++ < 8) DOUT << " " << (*I)->getName(); - - // Add the call edges to the call graph. - callee_add(TheCall, *I); - } DOUT << "\n"; for (unsigned x = 0; x < CalledFuncs.size(); ) Modified: poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp?rev=57451&r1=57450&r2=57451&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp (original) +++ poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp Mon Oct 13 12:47:38 2008 @@ -32,7 +32,7 @@ // program. // bool CompleteBUDataStructures::runOnModule(Module &M) { - init(&getAnalysis(), false, true, false); + init(&getAnalysis(), false, true, false, true); buildIndirectFunctionSets(M); @@ -49,11 +49,14 @@ //mege nodes in the global graph for these functions for (std::vector::iterator ii = keys.begin(), ee = keys.end(); ii != ee; ++ii) { - callee_iterator base = callee_begin(*ii); - for (callee_iterator csi = callee_begin(*ii), cse = callee_end(*ii); - csi != cse; ++csi) { - GlobalECs.unionSets(*base, *csi); - GlobalsGraph->getNodeForValue(*base).mergeWith(GlobalsGraph->getNodeForValue(*csi)); + if (*ii) { + callee_iterator base = callee_begin(*ii); + + for (callee_iterator csi = callee_begin(*ii), cse = callee_end(*ii); + csi != cse; ++csi) { + GlobalECs.unionSets(*base, *csi); + GlobalsGraph->getNodeForValue(*base).mergeWith(GlobalsGraph->getNodeForValue(*csi)); + } } } } Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=57451&r1=57450&r2=57451&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/DataStructure.cpp (original) +++ poolalloc/trunk/lib/DSA/DataStructure.cpp Mon Oct 13 12:47:38 2008 @@ -146,7 +146,7 @@ if (T) mergeTypeInfo(T, 0); if (G) G->addNode(this); ++NumNodeAllocated; - DOUT << "LLVA: Creating (1) DSNode " << this << "\n"; + // DOUT << "LLVA: Creating (1) DSNode " << this << "\n"; } // DSNode copy constructor... do not copy over the referrers list! @@ -159,7 +159,7 @@ Links.resize(N.Links.size()); // Create the appropriate number of null links G->addNode(this); ++NumNodeAllocated; - DOUT << "LLVA: Creating (2) DSNode " << this << "\n"; + // DOUT << "LLVA: Creating (2) DSNode " << this << "\n"; } DSNode::~DSNode() { @@ -272,7 +272,7 @@ DestNode->Size = 1; DestNode->Globals.swap(Globals); - DOUT << "LLVA: foldNode: " << this << " becomes " << DestNode << "\n"; + // DOUT << "LLVA: foldNode: " << this << " becomes " << DestNode << "\n"; #ifdef LLVA_KERNEL //Again we have created a new DSNode, we need to fill in the // pool desc map appropriately @@ -480,7 +480,7 @@ /// bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset, bool FoldIfIncompatible) { - DOUT << "merging " << *NewTy << " at " << Offset << " with " << *Ty << "\n"; + //DOUT << "merging " << *NewTy << " at " << Offset << " with " << *Ty << "\n"; const TargetData &TD = getTargetData(); // Check to make sure the Size member is up-to-date. Size can be one of the // following: @@ -978,7 +978,7 @@ /// point to this node). /// void DSNode::mergeWith(const DSNodeHandle &NH, unsigned Offset) { - DOUT << "mergeWith: " << this << " becomes " << NH.getNode() << "\n"; + //DOUT << "mergeWith: " << this << " becomes " << NH.getNode() << "\n"; DSNode *N = NH.getNode(); if (N == this && NH.getOffset() == Offset) return; // Noop @@ -1229,7 +1229,7 @@ } } - DOUT << "LLVA: mergeWith: " << SN << " becomes " << DN << "\n"; + // DOUT << "LLVA: mergeWith: " << SN << " becomes " << DN << "\n"; #ifdef LLVA_KERNEL //Here some merge is going on just like in DSNode::merge @@ -1671,6 +1671,8 @@ bool PathExistsToClonedNode(const DSCallSite &CS) { if (PathExistsToClonedNode(CS.getRetVal().getNode())) return true; + if (CS.isDirectCall() || PathExistsToClonedNode(CS.getCalleeNode())) + return true; for (unsigned i = 0, e = CS.getNumPtrArgs(); i != e; ++i) if (PathExistsToClonedNode(CS.getPtrArg(i).getNode())) return true; @@ -2134,6 +2136,7 @@ // If this call site is now the same as the previous one, we can delete it // as a duplicate. if (*OldIt == *CI) { + cerr << "Deleteing " << CI->getCallSite().getInstruction() << "\n"; Calls.erase(CI); CI = OldIt; ++NumDeleted; @@ -2732,7 +2735,8 @@ } else { G = new DSGraph(GlobalECs, GraphSource->getTargetData()); G->spliceFrom(BaseGraph); - G->getAuxFunctionCalls() = G->getFunctionCalls(); + if (resetAuxCalls) + G->getAuxFunctionCalls() = G->getFunctionCalls(); } G->setPrintAuxCalls(); G->setGlobalsGraph(GlobalsGraph); @@ -2841,10 +2845,11 @@ } void DataStructures::init(DataStructures* D, bool clone, bool printAuxCalls, - bool copyGlobalAuxCalls) { + bool copyGlobalAuxCalls, bool resetAux) { assert (!GraphSource && "Already init"); GraphSource = D; Clone = clone; + resetAuxCalls = resetAux; TD = D->TD; ActualCallees = D->ActualCallees; GlobalECs = D->getGlobalECs(); Modified: poolalloc/trunk/lib/DSA/Local.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Local.cpp?rev=57451&r1=57450&r2=57451&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/Local.cpp (original) +++ poolalloc/trunk/lib/DSA/Local.cpp Mon Oct 13 12:47:38 2008 @@ -37,18 +37,6 @@ static RegisterPass X("dsa-local", "Local Data Structure Analysis"); -static cl::list -AllocList("dsa-alloc-list", - cl::value_desc("list"), - cl::desc("List of functions that allocate memory from the heap"), - cl::CommaSeparated, cl::Hidden); - -static cl::list -FreeList("dsa-free-list", - cl::value_desc("list"), - cl::desc("List of functions that free memory from the heap"), - cl::CommaSeparated, cl::Hidden); - namespace { //===--------------------------------------------------------------------===// // GraphBuilder Class @@ -60,6 +48,7 @@ class GraphBuilder : InstVisitor { DSGraph &G; Function* FB; + DataStructures* DS; //////////////////////////////////////////////////////////////////////////// // Helper functions used to implement the visitation functions... @@ -129,8 +118,8 @@ void visitCallSite(CallSite CS); public: - GraphBuilder(Function &f, DSGraph &g) - : G(g), FB(&f) { + GraphBuilder(Function &f, DSGraph &g, DataStructures& DSi) + : G(g), FB(&f), DS(&DSi) { // Create scalar nodes for all pointer arguments... for (Function::arg_iterator I = f.arg_begin(), E = f.arg_end(); I != E; ++I) { @@ -172,6 +161,7 @@ {} void mergeInGlobalInitializer(GlobalVariable *GV); + void mergeFunction(Function& F) { getValueDest(F); } }; } @@ -194,10 +184,14 @@ // Check first for constant expressions that must be traversed to // extract the actual value. DSNode* N; - if (GlobalValue* GV = dyn_cast(V)) { + if (GlobalVariable* GV = dyn_cast(V)) { // Create a new global node for this global variable. N = createNode(GV->getType()->getElementType()); N->addGlobal(GV); + } else if (Function* GV = dyn_cast(V)) { + // Create a new global node for this global variable. + N = createNode(); + N->addGlobal(GV); } else if (Constant *C = dyn_cast(V)) { if (ConstantExpr *CE = dyn_cast(C)) { if (CE->isCast()) { @@ -637,29 +631,9 @@ // Special case handling of certain libc allocation functions here. if (Function *F = dyn_cast(Callee)) - if (F->isDeclaration()) { + if (F->isDeclaration()) if (F->isIntrinsic() && visitIntrinsic(CS, F)) return; - else { - // Determine if the called function is one of the specified heap - // allocation functions - if (AllocList.end() != std::find(AllocList.begin(), AllocList.end(), F->getName())) { - setDestTo(*CS.getInstruction(), - createNode()->setHeapMarker()->setModifiedMarker()); - return; - } - - // Determine if the called function is one of the specified heap - // free functions - if (FreeList.end() != std::find(FreeList.begin(), FreeList.end(), - F->getName())) { - // Mark that the node is written to... - if (DSNode *N = getValueDest(*(CS.getArgument(0))).getNode()) - N->setModifiedMarker()->setHeapMarker(); - return; - } - } - } // Set up the return value... DSNodeHandle RetVal; @@ -685,9 +659,10 @@ Args.push_back(getValueDest(**I)); // Add a new function call entry... - if (CalleeNode) + if (CalleeNode) { G.getFunctionCalls().push_back(DSCallSite(CS, RetVal, CalleeNode, Args)); - else + DS->callee_site(CS.getInstruction()); + }else G.getFunctionCalls().push_back(DSCallSite(CS, RetVal, cast(Callee), Args)); } @@ -776,6 +751,10 @@ I != E; ++I) if (!I->isDeclaration()) GGB.mergeInGlobalInitializer(I); + // Add Functions to the globals graph. + for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) + if (!I->isDeclaration()) + GGB.mergeFunction(*I); } // Next step, iterate through the nodes in the globals graph, unioning @@ -786,7 +765,8 @@ for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) if (!I->isDeclaration()) { DSGraph* G = new DSGraph(GlobalECs, getTargetData(), GlobalsGraph); - GraphBuilder GGB(*I, *G); + GraphBuilder GGB(*I, *G, *this); + G->getAuxFunctionCalls() = G->getFunctionCalls(); setDSGraph(*I, G); } Modified: poolalloc/trunk/lib/DSA/Printer.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Printer.cpp?rev=57451&r1=57450&r2=57451&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/Printer.cpp (original) +++ poolalloc/trunk/lib/DSA/Printer.cpp Mon Oct 13 12:47:38 2008 @@ -35,6 +35,7 @@ namespace { cl::opt OnlyPrintMain("only-print-main-ds", cl::ReallyHidden); cl::opt DontPrintAnything("dont-print-ds", cl::ReallyHidden); + cl::opt LimitPrint("dsa-limit-print", cl::Hidden); STATISTIC (MaxGraphSize , "Maximum graph size"); STATISTIC (NumFoldedNodes , "Number of folded nodes (in final graph)"); } @@ -158,21 +159,23 @@ } - // Add scalar nodes to the graph... - const DSGraph::ScalarMapTy &VM = G->getScalarMap(); - for (DSGraph::ScalarMapTy::const_iterator I = VM.begin(); I != VM.end();++I) - if (!isa(I->first)) { - std::stringstream OS; - WriteAsOperand(OS, I->first, false, CurMod); - GW.emitSimpleNode(I->first, "", OS.str()); - - // Add edge from return node to real destination - DSNode *DestNode = I->second.getNode(); - int EdgeDest = I->second.getOffset() >> DS::PointerShift; - if (EdgeDest == 0) EdgeDest = -1; - GW.emitEdge(I->first, -1, DestNode, - EdgeDest, "arrowtail=tee,color=gray63"); - } + if (!LimitPrint) { + // Add scalar nodes to the graph... + const DSGraph::ScalarMapTy &VM = G->getScalarMap(); + for (DSGraph::ScalarMapTy::const_iterator I = VM.begin(); I != VM.end();++I) + if (!isa(I->first)) { + std::stringstream OS; + WriteAsOperand(OS, I->first, false, CurMod); + GW.emitSimpleNode(I->first, "", OS.str()); + + // Add edge from return node to real destination + DSNode *DestNode = I->second.getNode(); + int EdgeDest = I->second.getOffset() >> DS::PointerShift; + if (EdgeDest == 0) EdgeDest = -1; + GW.emitEdge(I->first, -1, DestNode, + EdgeDest, "arrowtail=tee,color=gray63"); + } + } // Output the returned value pointer... @@ -333,28 +336,23 @@ } -// print - Print out the analysis results... -void LocalDataStructures::print(std::ostream &O, const Module *M) const { - if (DontPrintAnything) return; - printCollection(*this, O, M, "ds."); -} - -void StdLibDataStructures::print(std::ostream &O, const Module *M) const { - if (DontPrintAnything) return; - printCollection(*this, O, M, "ds."); -} - -void BUDataStructures::print(std::ostream &O, const Module *M) const { - if (DontPrintAnything) return; - printCollection(*this, O, M, "bu."); -} - -void TDDataStructures::print(std::ostream &O, const Module *M) const { - if (DontPrintAnything) return; - printCollection(*this, O, M, "td."); +void DataStructures::dumpCallGraph() const { + for( ActualCalleesTy::const_iterator ii = ActualCallees.begin(), ee = ActualCallees.end(); + ii != ee; ++ii) { + if (ii->first) cerr << ii->first->getParent()->getParent()->getName() << " "; + cerr << ii->first << ": ["; + for (callee_iterator cbi = ii->second.begin(), cbe = ii->second.end(); + cbi != cbe; ++cbi) { + cerr << (*cbi)->getName() << " "; + } + cerr << "]\n"; + if (ii->first) ii->first->dump(); + } } -void CompleteBUDataStructures::print(std::ostream &O, const Module *M) const { +// print - Print out the analysis results... +void DataStructures::print(std::ostream &O, const Module *M) const { if (DontPrintAnything) return; - printCollection(*this, O, M, "cbu."); + printCollection(*this, O, M, printname); + dumpCallGraph(); } Modified: poolalloc/trunk/lib/DSA/StdLibPass.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/StdLibPass.cpp?rev=57451&r1=57450&r2=57451&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/StdLibPass.cpp (original) +++ poolalloc/trunk/lib/DSA/StdLibPass.cpp Mon Oct 13 12:47:38 2008 @@ -65,6 +65,7 @@ {"fprintf", {NRET_YARGS, NRET_YNARGS, NRET_NARGS, false, false, false}}, {"sprintf", {NRET_YARGS, NRET_YNARGS, NRET_NARGS, false, false, false}}, {"snprintf", {NRET_YARGS, NRET_YNARGS, NRET_NARGS, false, false, false}}, + {"puts", {NRET_NARGS, NRET_NARGS, NRET_NARGS, false, false, false}}, {"calloc", {NRET_NARGS, YRET_NARGS, YRET_NARGS, false, false, false}}, {"malloc", {NRET_NARGS, YRET_NARGS, YRET_NARGS, false, false, false}}, @@ -164,7 +165,7 @@ } bool StdLibDataStructures::runOnModule(Module &M) { - init(&getAnalysis(), false, true, false); + init(&getAnalysis(), false, true, false, false); //Clone Module for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) Modified: poolalloc/trunk/lib/DSA/TopDownClosure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/TopDownClosure.cpp?rev=57451&r1=57450&r2=57451&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/TopDownClosure.cpp (original) +++ poolalloc/trunk/lib/DSA/TopDownClosure.cpp Mon Oct 13 12:47:38 2008 @@ -61,7 +61,7 @@ // program. // bool TDDataStructures::runOnModule(Module &M) { - init(&getAnalysis(), true, true, true); + init(&getAnalysis(), true, true, true, false); // Figure out which functions must not mark their arguments complete because // they are accessible outside this compilation unit. Currently, these Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=57451&r1=57450&r2=57451&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Mon Oct 13 12:47:38 2008 @@ -16,7 +16,6 @@ #include "dsa/DataStructure.h" #include "dsa/DSGraph.h" -#include "dsa/CallTargets.h" #include "poolalloc/PoolAllocate.h" #include "Heuristic.h" #include "llvm/Constants.h" Modified: poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp?rev=57451&r1=57450&r2=57451&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp Mon Oct 13 12:47:38 2008 @@ -36,7 +36,6 @@ PoolAllocate &PAInfo; DSGraph &G; // The Bottom-up DS Graph FuncInfo &FI; - CallTargetFinder* CTF; // PoolUses - For each pool (identified by the pool descriptor) keep track // of which blocks require the memory in the pool to not be freed. This @@ -50,9 +49,8 @@ FuncTransform(PoolAllocate &P, DSGraph &g, FuncInfo &fi, std::multimap &poolUses, - std::multimap &poolFrees, - CallTargetFinder* ctf) - : PAInfo(P), G(g), FI(fi), CTF(ctf), + std::multimap &poolFrees) + : PAInfo(P), G(g), FI(fi), PoolUses(poolUses), PoolFrees(poolFrees) { } @@ -126,7 +124,7 @@ std::multimap &poolUses, std::multimap &poolFrees, Function &F) { - FuncTransform(*this, g, fi, poolUses, poolFrees, CTF).visit(F); + FuncTransform(*this, g, fi, poolUses, poolFrees).visit(F); } @@ -616,57 +614,16 @@ Instruction *OrigInst = cast(getOldValueIfAvailable(CS.getInstruction())); - for (DataStructures::callee_iterator I = Graphs.callee_begin(OrigInst), - E = Graphs.callee_end(OrigInst); I != E; ++I) { - CF = *I; - break; - } - - // If we didn't find the callee in the constructed call graph, try - // checking in the DSNode itself. - // This isn't ideal as it means that this call site didn't have inlining - // happen. - if (!CF) { - DSGraph* dg = &Graphs.getDSGraph(*OrigInst->getParent()->getParent()); - DSNode* d = dg->getNodeForValue(OrigInst->getOperand(0)).getNode(); - const std::vector &g = d->getGlobalsList(); - for(std::vector::const_iterator ii = g.begin(), ee = g.end(); - !CF && ii != ee; ++ii) { - EquivalenceClasses< const GlobalValue *> & EC = Graphs.getGlobalECs(); - for (EquivalenceClasses::member_iterator MI = EC.findLeader(*ii); - MI != EC.member_end(); ++MI) // Loop over members in this set. - if ((CF = dyn_cast(*MI))) { - std::cerr << "\n***\nPA: *** WARNING (FuncTransform::visitCallSite): " - << "Using DSNode for callees for call-site in function " - << CS.getCaller()->getName() << "\n***\n"; - break; - } - } - } - - if (!CF && CTF) { - std::cerr << "\nPA: Last Resort TD Indirect Resolve in " << CS.getCaller()->getName() << "\n"; - CF = *CTF->begin(isa(OrigInst)?CallSite(cast(OrigInst)) - :CallSite(cast(OrigInst))); - if (CF) std::cerr << "TD resolved to " << CF->getName() << "\n"; - } - - if (!CF) { - // FIXME: Unknown callees for a call-site. Warn and ignore. - std::cerr << "\n***\nPA: *** WARNING (FuncTransform::visitCallSite): " - << "Unknown callees for call-site in function " - << CS.getCaller()->getName() << "\n***\n"; - abort(); - return; - } + DataStructures::callee_iterator I = Graphs.callee_begin(OrigInst); + assert (I != Graphs.callee_end(OrigInst) && "No call graph info"); + CF = *I; // Get the common graph for the set of functions this call may invoke. CalleeGraph = &Graphs.getDSGraph(*CF); #ifndef NDEBUG // Verify that all potential callees at call site have the same DS graph. - DataStructures::callee_iterator I = - Graphs.callee_begin(OrigInst), E = Graphs.callee_end(OrigInst); + DataStructures::callee_iterator E = Graphs.callee_end(OrigInst); for (; I != E; ++I) if (!(*I)->isDeclaration()) assert(CalleeGraph == &Graphs.getDSGraph(**I) && From sabre at nondot.org Mon Oct 13 12:57:36 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 13 Oct 2008 17:57:36 -0000 Subject: [llvm-commits] [llvm] r57452 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810131757.m9DHvaxO019766@zion.cs.uiuc.edu> Author: lattner Date: Mon Oct 13 12:57:36 2008 New Revision: 57452 URL: http://llvm.org/viewvc/llvm-project?rev=57452&view=rev Log: move major changes down. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57452&r1=57451&r2=57452&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 13 12:57:36 2008 @@ -32,17 +32,17 @@
    -

    This document contains the release notes for the LLVM compiler -infrastructure, release 2.4. Here we describe the status of LLVM, including -major improvements from the previous release and any known problems. All LLVM -releases may be downloaded from the LLVM -releases web site.

    +

    This document contains the release notes for the LLVM Compiler +Infrastructure, release 2.4. Here we describe the status of LLVM, including +major improvements from the previous release and significant known problems. +All LLVM releases may be downloaded from the LLVM releases web site.

    For more information about LLVM, including information about the latest release, please check out the main LLVM web site. If you have questions or comments, the LLVM developer's mailing -list is a good place to send them.

    +href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM Developer's Mailing +List is a good place to send them.

    Note that if you are reading this file from a Subversion checkout or the main LLVM web page, this document applies to the next release, not the @@ -57,10 +57,11 @@

    -
    +

    If you're already an LLVM user, this section lists some "gotchas" that you +may run into upgrading from the previous release. It also includes some status +updates on subprojects of LLVM.

    -

    This is the fifteenth public release of the LLVM Compiler Infrastructure. -It includes a large number of features and refinements from LLVM 2.3.

    +
    @@ -79,39 +80,6 @@ - -
    - -

    The LLVM IR generated by llvm-gcc now doesn't name instructions. Use the - instnamer pass if you want them.

    - -
  • LoadVN and GCSE are completely gone.
  • - - -

    LLVM API Changes:

    - -
      -
    • ....
    • - -
    • ... Attributes changes ...
    • - -
    • The DbgStopPointInst methods getDirectory and -getFileName now return Value* instead of strings. These can be -converted to strings using llvm::GetConstantStringInfo defined via -"llvm/Analysis/ValueTracking.h".
    • - -
    • API change: BinaryOperator::create -> Create (CmpInst, CastInst too)
    • -
    • Various header files like "llvm/ADT/iterator" were given a .h suffix. - Change your code to #include "llvm/ADT/iterator.h" instead.
    • - -
    - -
    - - - @@ -174,9 +142,9 @@
    -

    LLVM 2.4 includes a huge number of bug fixes, performance tweaks and minor -improvements. Some of the major improvements and new features are listed in -this section. +

    This release includes a huge number of bug fixes, performance tweaks and +minor improvements. Some of the major improvements and new features are listed +in this section.

    @@ -373,6 +341,40 @@
    + + + +
    + +

    The LLVM IR generated by llvm-gcc now doesn't name instructions. Use the + instnamer pass if you want them.

    + +
  • LoadVN and GCSE are completely gone.
  • + + +

    LLVM API Changes:

    + +
      + +
    • ... Attributes changes ...
    • + +
    • The DbgStopPointInst methods getDirectory and +getFileName now return Value* instead of strings. These can be +converted to strings using llvm::GetConstantStringInfo defined via +"llvm/Analysis/ValueTracking.h".
    • + +
    • API change: BinaryOperator::create -> Create (CmpInst, CastInst too)
    • +
    • Various header files like "llvm/ADT/iterator" were given a .h suffix. + Change your code to #include "llvm/ADT/iterator.h" instead.
    • + +
    + +
    + + +
    Portability and Supported Platforms From sabre at nondot.org Mon Oct 13 13:01:01 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 13 Oct 2008 18:01:01 -0000 Subject: [llvm-commits] [llvm] r57453 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810131801.m9DI12Vl019921@zion.cs.uiuc.edu> Author: lattner Date: Mon Oct 13 13:01:01 2008 New Revision: 57453 URL: http://llvm.org/viewvc/llvm-project?rev=57453&view=rev Log: more rearranging. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57453&r1=57452&r2=57453&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 13 13:01:01 2008 @@ -12,8 +12,8 @@
    1. Introduction
    2. -
    3. Major Changes and Sub-project Status
    4. -
    5. What's New?
    6. +
    7. Sub-project Status Update
    8. +
    9. What's New in LLVM?
    10. Installation Instructions
    11. Portability and Supported Platforms
    12. Known Problems @@ -51,20 +51,6 @@
    - - - - -

    If you're already an LLVM user, this section lists some "gotchas" that you -may run into upgrading from the previous release. It also includes some status -updates on subprojects of LLVM.

    - -
    - -
    - - -
    -Other LLVM Sub-Projects + + +

    -The core LLVM 2.4 distribution currently consists of code from the core LLVM -repository (which roughly contains the LLVM optimizer, code generators and +The LLVM 2.4 distribution currently consists of code from the core LLVM +repository (which roughly contains the LLVM optimizers, code generators and supporting tools) and the llvm-gcc repository. In addition to this code, the LLVM Project includes other sub-projects that are in development. The two which are the most actively developed are the Clang Project and vmkit Project.

    -
    - - -
    -

    -The "vmkit" project is an implementation of -a JVM and a CLI Virtual Machines (Microsoft .NET is an -implementation of the CLI) using the Just-In-Time compiler of LLVM.

    - -

    ...

    - -
    -
    + @@ -133,10 +107,25 @@
    + +
    +vmkit +
    + +
    +

    +The "vmkit" project is an implementation of +a JVM and a CLI Virtual Machines (Microsoft .NET is an +implementation of the CLI) using the Just-In-Time compiler of LLVM.

    + +

    ...

    + +
    + @@ -348,6 +337,9 @@
    +

    If you're already an LLVM user, this section lists some "gotchas" that you +may run into upgrading from the previous release.

    +

    The LLVM IR generated by llvm-gcc now doesn't name instructions. Use the instnamer pass if you want them.

    From evan.cheng at apple.com Mon Oct 13 13:03:01 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 13 Oct 2008 18:03:01 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57454 - in /llvm-gcc-4.2/trunk/gcc: config/i386/llvm-i386-target.h config/i386/llvm-i386.cpp llvm-abi.h llvm-convert.cpp llvm-types.cpp Message-ID: <200810131803.m9DI32Ml020019@zion.cs.uiuc.edu> Author: evancheng Date: Mon Oct 13 13:03:01 2008 New Revision: 57454 URL: http://llvm.org/viewvc/llvm-project?rev=57454&view=rev Log: On x86, pass _Complex * as a first class aggregate instead of ByVal. The exceptions are _Complex char, _Complex short, and _Complex int which codegen are not yet generating ABI compatible code. Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp llvm-gcc-4.2/trunk/gcc/llvm-abi.h llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h?rev=57454&r1=57453&r2=57454&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h (original) +++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386-target.h Mon Oct 13 13:03:01 2008 @@ -181,6 +181,16 @@ #define LLVM_SHOULD_NOT_RETURN_COMPLEX_IN_MEMORY(X) \ llvm_x86_should_not_return_complex_in_memory((X)) +extern bool +llvm_x86_should_pass_aggregate_as_fca(tree type, const Type *); + +/* LLVM_SHOULD_PASS_AGGREGATE_AS_FCA - Return true if an aggregate of the + specified type should be passed as a first-class aggregate. */ +#ifndef LLVM_SHOULD_PASS_AGGREGATE_AS_FCA +#define LLVM_SHOULD_PASS_AGGREGATE_AS_FCA(X, TY) \ + llvm_x86_should_pass_aggregate_as_fca(X, TY) +#endif + extern bool llvm_x86_should_pass_aggregate_in_memory(tree, const Type *); #define LLVM_SHOULD_PASS_AGGREGATE_USING_BYVAL_ATTR(X, TY) \ Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp?rev=57454&r1=57453&r2=57454&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Mon Oct 13 13:03:01 2008 @@ -619,9 +619,28 @@ return true; } +/* It returns true if an aggregate of the specified type should be passed as a + first class aggregate. */ +bool llvm_x86_should_pass_aggregate_as_fca(tree type, const Type *Ty) { + if (TREE_CODE(type) != COMPLEX_TYPE) + return false; + const StructType *STy = dyn_cast(Ty); + if (!STy || STy->isPacked()) return false; + + // FIXME: Currently codegen isn't lowering _Complex char / short and _Complex + // int in x86-64 in a way that makes it ABI compatible. + const Type *EltTy = STy->getElementType(0); + return !((TARGET_64BIT && EltTy == Type::Int32Ty) || + EltTy == Type::Int16Ty || + EltTy == Type::Int8Ty); +} + /* Target hook for llvm-abi.h. It returns true if an aggregate of the specified type should be passed in memory. */ bool llvm_x86_should_pass_aggregate_in_memory(tree TreeType, const Type *Ty) { + if (llvm_x86_should_pass_aggregate_as_fca(TreeType, Ty)) + return false; + enum machine_mode Mode = ix86_getNaturalModeForType(TreeType); HOST_WIDE_INT Bytes = (Mode == BLKmode) ? int_size_in_bytes(TreeType) : (int) GET_MODE_SIZE(Mode); @@ -723,6 +742,9 @@ bool llvm_x86_64_should_pass_aggregate_in_mixed_regs(tree TreeType, const Type *Ty, std::vector &Elts){ + if (llvm_x86_should_pass_aggregate_as_fca(TreeType, Ty)) + return false; + enum x86_64_reg_class Class[MAX_CLASSES]; enum machine_mode Mode = ix86_getNaturalModeForType(TreeType); bool totallyEmpty = true; @@ -1362,9 +1384,9 @@ /// llvm_store_scalar_argument - Store scalar argument ARGVAL of type /// LLVMTY at location LOC. void llvm_x86_store_scalar_argument(Value *Loc, Value *ArgVal, - const llvm::Type *LLVMTy, - unsigned RealSize, - LLVMBuilder &Builder) { + const llvm::Type *LLVMTy, + unsigned RealSize, + LLVMBuilder &Builder) { if (RealSize) { // Do byte wise store because actaul argument type does not match LLVMTy. Loc = Builder.CreateBitCast(Loc, @@ -1413,8 +1435,7 @@ /// register. This means we'll be loading bytes off the end of the object /// in some cases. That's what gcc does, so it must be OK, right? Right? bool llvm_x86_should_pass_aggregate_in_integer_regs(tree type, unsigned *size, - bool *DontCheckAlignment) -{ + bool *DontCheckAlignment) { *size = 0; if (TARGET_64BIT) { enum x86_64_reg_class Class[MAX_CLASSES]; Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-abi.h?rev=57454&r1=57453&r2=57454&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-abi.h (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-abi.h Mon Oct 13 13:03:01 2008 @@ -94,6 +94,10 @@ /// argument is passed by value. void HandleByValArgument(const llvm::Type *LLVMTy, tree type) {} + /// HandleFCAArgument - This callback is invoked if the aggregate function + /// argument is passed by value as a first class aggregate. + void HandleFCAArgument(const llvm::Type *LLVMTy, tree type) {} + /// EnterField - Called when we're about the enter the field of a struct /// or union. FieldNo is the number of the element we are entering in the /// LLVM Struct, StructTy is the LLVM type of the struct we are entering. @@ -251,6 +255,14 @@ false #endif +// LLVM_SHOULD_PASS_AGGREGATE_USING_BYVAL_ATTR - Return true if this aggregate +// value should be passed by value as a first class aggregate. The default is +// false. +#ifndef LLVM_SHOULD_PASS_AGGREGATE_AS_FCA +#define LLVM_SHOULD_PASS_AGGREGATE_AS_FCA(X, TY) \ + false +#endif + // LLVM_SHOULD_PASS_AGGREGATE_IN_MIXED_REGS - Return true if this aggregate // value should be passed in a mixture of integer, floating point, and vector // registers. The routine should also return by reference a vector of the @@ -441,6 +453,8 @@ } else if (Ty->isSingleValueType()) { C.HandleScalarArgument(Ty, type); ScalarElts.push_back(Ty); + } else if (LLVM_SHOULD_PASS_AGGREGATE_AS_FCA(type, Ty)) { + C.HandleFCAArgument(Ty, type); } else if (LLVM_SHOULD_PASS_AGGREGATE_IN_MIXED_REGS(type, Ty, Elts)) { if (!LLVM_AGGREGATE_PARTIALLY_PASSED_IN_REGS(Elts, ScalarElts)) PassInMixedRegisters(type, Ty, Elts, ScalarElts); Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=57454&r1=57453&r2=57454&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon Oct 13 13:03:01 2008 @@ -513,6 +513,15 @@ abort(); } + void HandleFCAArgument(const llvm::Type *LLVMTy, tree type) { + // Store the FCA argument into alloca. + assert(!LocStack.empty()); + Value *Loc = LocStack.back(); + Builder.CreateStore(AI, Loc); + AI->setName(NameStack.back()); + ++AI; + } + void HandleAggregateResultAsScalar(const Type *ScalarTy, unsigned Offset=0){ this->Offset = Offset; } @@ -2270,7 +2279,7 @@ // value out of the specified register. return EmitReadOfRegisterVariable(exp, DestLoc); } - + LValue LV = EmitLV(exp); bool isVolatile = TREE_THIS_VOLATILE(exp); const Type *Ty = ConvertType(TREE_TYPE(exp)); @@ -2649,6 +2658,14 @@ CallOperands.push_back(Loc); } + /// HandleFCAArgument - This callback is invoked if the aggregate function + /// argument is passed as a first class aggregate. + void HandleFCAArgument(const llvm::Type *LLVMTy, tree type) { + Value *Loc = getAddress(); + assert(PointerType::getUnqual(LLVMTy) == Loc->getType()); + CallOperands.push_back(Builder.CreateLoad(Loc)); + } + /// EnterField - Called when we're about the enter the field of a struct /// or union. FieldNo is the number of the element we are entering in the /// LLVM Struct, StructTy is the LLVM type of the struct we are entering. @@ -2735,12 +2752,17 @@ // Loop over the arguments, expanding them and adding them to the op list. std::vector ScalarArgs; for (tree arg = TREE_OPERAND(exp, 1); arg; arg = TREE_CHAIN(arg)) { - const Type *ArgTy = ConvertType(TREE_TYPE(TREE_VALUE(arg))); + tree type = TREE_TYPE(TREE_VALUE(arg)); + const Type *ArgTy = ConvertType(type); // Push the argument. if (ArgTy->isSingleValueType()) { // A scalar - push the value. Client.pushValue(Emit(TREE_VALUE(arg), 0)); + } else if (LLVM_SHOULD_PASS_AGGREGATE_AS_FCA(type, ArgTy)) { + // A first class aggregate - push the value. + LValue ArgVal = EmitLV(TREE_VALUE(arg)); + Client.pushValue(Builder.CreateLoad(ArgVal.Ptr)); } else { // An aggregate - push the address. LValue ArgVal = EmitLV(TREE_VALUE(arg)); @@ -2749,8 +2771,7 @@ } Attributes Attrs = Attribute::None; - ABIConverter.HandleArgument(TREE_TYPE(TREE_VALUE(arg)), ScalarArgs, - &Attrs); + ABIConverter.HandleArgument(type, ScalarArgs, &Attrs); if (Attrs != Attribute::None) PAL = PAL.addAttr(CallOperands.size(), Attrs); @@ -5848,7 +5869,7 @@ mark_referenced(ID); } } - + const Type *Ty = ConvertType(TREE_TYPE(exp)); // If we have "extern void foo", make the global have type {} instead of // type void. Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=57454&r1=57453&r2=57454&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Mon Oct 13 13:03:01 2008 @@ -1021,6 +1021,12 @@ void HandleByValArgument(const llvm::Type *LLVMTy, tree type) { HandleScalarArgument(PointerType::getUnqual(LLVMTy), type); } + + /// HandleFCAArgument - This callback is invoked if the aggregate function + /// argument is a first class aggregate passed by value. + void HandleFCAArgument(const llvm::Type *LLVMTy, tree type) { + ArgTypes.push_back(LLVMTy); + } }; } From sabre at nondot.org Mon Oct 13 13:11:55 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 13 Oct 2008 18:11:55 -0000 Subject: [llvm-commits] [llvm] r57455 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810131811.m9DIBtvY020480@zion.cs.uiuc.edu> Author: lattner Date: Mon Oct 13 13:11:54 2008 New Revision: 57455 URL: http://llvm.org/viewvc/llvm-project?rev=57455&view=rev Log: give the static analyzer its own section. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57455&r1=57454&r2=57455&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 13 13:11:54 2008 @@ -73,7 +73,7 @@

    The LLVM 2.4 distribution currently consists of code from the core LLVM -repository (which roughly contains the LLVM optimizers, code generators and +repository (which roughly includes the LLVM optimizers, code generators and supporting tools) and the llvm-gcc repository. In addition to this code, the LLVM Project includes other sub-projects that are in development. The two which are the most actively developed are the Clang Project and @@ -85,7 +85,7 @@

    @@ -101,20 +101,29 @@

    Codegen progress/state

    -

    +

    + + + + +
    + +

    The static analysis tool -

    +.

    -The "vmkit" project is an implementation of +The vmkit project is an implementation of a JVM and a CLI Virtual Machines (Microsoft .NET is an implementation of the CLI) using the Just-In-Time compiler of LLVM.

    From evan.cheng at apple.com Mon Oct 13 13:13:07 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 13 Oct 2008 18:13:07 -0000 Subject: [llvm-commits] [llvm] r57456 - /llvm/trunk/test/CodeGen/X86/complex-fca.ll Message-ID: <200810131813.m9DID7nY020625@zion.cs.uiuc.edu> Author: evancheng Date: Mon Oct 13 13:13:07 2008 New Revision: 57456 URL: http://llvm.org/viewvc/llvm-project?rev=57456&view=rev Log: Add a test case for _Complex passed as a FCA. Added: llvm/trunk/test/CodeGen/X86/complex-fca.ll Added: llvm/trunk/test/CodeGen/X86/complex-fca.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/complex-fca.ll?rev=57456&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/complex-fca.ll (added) +++ llvm/trunk/test/CodeGen/X86/complex-fca.ll Mon Oct 13 13:13:07 2008 @@ -0,0 +1,14 @@ +; RUN: llvm-as < %s | llc -march=x86 | grep mov | count 2 + +define void @ccosl({ x86_fp80, x86_fp80 }* noalias sret %agg.result, { x86_fp80, x86_fp80 } %z) nounwind { +entry: + %z8 = extractvalue { x86_fp80, x86_fp80 } %z, 0 + %z9 = extractvalue { x86_fp80, x86_fp80 } %z, 1 + %0 = sub x86_fp80 0xK80000000000000000000, %z9 + %insert = insertvalue { x86_fp80, x86_fp80 } undef, x86_fp80 %0, 0 + %insert7 = insertvalue { x86_fp80, x86_fp80 } %insert, x86_fp80 %z8, 1 + call void @ccoshl({ x86_fp80, x86_fp80 }* noalias sret %agg.result, { x86_fp80, x86_fp80 } %insert7) nounwind + ret void +} + +declare void @ccoshl({ x86_fp80, x86_fp80 }* noalias sret, { x86_fp80, x86_fp80 }) nounwind From baldrick at free.fr Mon Oct 13 13:33:38 2008 From: baldrick at free.fr (Duncan Sands) Date: Mon, 13 Oct 2008 18:33:38 -0000 Subject: [llvm-commits] [llvm] r57457 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810131833.m9DIXdpn021612@zion.cs.uiuc.edu> Author: baldrick Date: Mon Oct 13 13:33:28 2008 New Revision: 57457 URL: http://llvm.org/viewvc/llvm-project?rev=57457&view=rev Log: Add some llvm-gcc changes that may be worth detailing. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57457&r1=57456&r2=57457&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 13 13:33:28 2008 @@ -77,7 +77,7 @@ supporting tools) and the llvm-gcc repository. In addition to this code, the LLVM Project includes other sub-projects that are in development. The two which are the most actively developed are the Clang Project and -vmkit Project. +the vmkit Project.

    @@ -189,7 +189,10 @@

      -
    • ...
    • +
    • block-pointers
    • +
    • alpha?
    • +
    • -flimited-precision
    • +
    • -flto
    @@ -212,6 +215,7 @@ representing it as a form of weak linkage.
  • DebugInfoBuilder
  • .ll printing format change: %3 = add i32 4, 2
  • +
  • opt-size, noinline, alwaysinline function attributes
  • ...
  • @@ -349,10 +353,10 @@

    If you're already an LLVM user, this section lists some "gotchas" that you may run into upgrading from the previous release.

    -

    The LLVM IR generated by llvm-gcc now doesn't name instructions. Use the - instnamer pass if you want them.

    +

    The LLVM IR generated by llvm-gcc no longer names all instructions. + Use the instnamer pass if you want everything named.

    -
  • LoadVN and GCSE are completely gone.
  • +
  • The LoadVN and GCSE passes have been removed.
  • LLVM API Changes:

    From evan.cheng at apple.com Mon Oct 13 13:35:52 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 13 Oct 2008 18:35:52 -0000 Subject: [llvm-commits] [llvm] r57458 - in /llvm/trunk: lib/CodeGen/SimpleRegisterCoalescing.cpp test/CodeGen/X86/2008-10-13-CoalescerBug.ll Message-ID: <200810131835.m9DIZqct021698@zion.cs.uiuc.edu> Author: evancheng Date: Mon Oct 13 13:35:52 2008 New Revision: 57458 URL: http://llvm.org/viewvc/llvm-project?rev=57458&view=rev Log: Also update sub-register intervals after a trivial computation is rematt'ed for a copy instruction. PR2775. Added: llvm/trunk/test/CodeGen/X86/2008-10-13-CoalescerBug.ll Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=57458&r1=57457&r2=57458&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original) +++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Mon Oct 13 13:35:52 2008 @@ -460,6 +460,16 @@ unsigned DefIdx = li_->getDefIndex(CopyIdx); const LiveRange *DLR= li_->getInterval(DstReg).getLiveRangeContaining(DefIdx); DLR->valno->copy = NULL; + // Don't forget to update sub-register intervals. + if (TargetRegisterInfo::isPhysicalRegister(DstReg)) { + for (const unsigned* SR = tri_->getSubRegisters(DstReg); *SR; ++SR) { + if (!li_->hasInterval(*SR)) + continue; + DLR = li_->getInterval(*SR).getLiveRangeContaining(DefIdx); + if (DLR && DLR->valno->copy == CopyMI) + DLR->valno->copy = NULL; + } + } MachineBasicBlock::iterator MII = CopyMI; MachineBasicBlock *MBB = CopyMI->getParent(); Added: llvm/trunk/test/CodeGen/X86/2008-10-13-CoalescerBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-10-13-CoalescerBug.ll?rev=57458&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2008-10-13-CoalescerBug.ll (added) +++ llvm/trunk/test/CodeGen/X86/2008-10-13-CoalescerBug.ll Mon Oct 13 13:35:52 2008 @@ -0,0 +1,42 @@ +; RUN: llvm-as < %s | llc -march=x86 +; PR2775 + +define i32 @func_77(i8 zeroext %p_79) nounwind { +entry: + %0 = tail call i32 (...)* @func_43(i32 1) nounwind ; [#uses=1] + %1 = icmp eq i32 %0, 0 ; [#uses=1] + br i1 %1, label %bb3, label %bb + +bb: ; preds = %entry + br label %bb3 + +bb3: ; preds = %bb, %entry + %p_79_addr.0 = phi i8 [ 0, %bb ], [ %p_79, %entry ] ; [#uses=1] + %2 = zext i8 %p_79_addr.0 to i32 ; [#uses=2] + %3 = zext i1 false to i32 ; [#uses=2] + %4 = tail call i32 (...)* @rshift_u_s(i32 1) nounwind ; [#uses=0] + %5 = lshr i32 %2, %2 ; [#uses=3] + %6 = icmp eq i32 0, 0 ; [#uses=1] + br i1 %6, label %bb6, label %bb9 + +bb6: ; preds = %bb3 + %7 = ashr i32 %5, %3 ; [#uses=1] + %8 = icmp eq i32 %7, 0 ; [#uses=1] + %9 = select i1 %8, i32 %3, i32 0 ; [#uses=1] + %. = shl i32 %5, %9 ; [#uses=1] + br label %bb9 + +bb9: ; preds = %bb6, %bb3 + %.0 = phi i32 [ %., %bb6 ], [ %5, %bb3 ] ; [#uses=0] + br i1 false, label %return, label %bb10 + +bb10: ; preds = %bb9 + ret i32 undef + +return: ; preds = %bb9 + ret i32 undef +} + +declare i32 @func_43(...) + +declare i32 @rshift_u_s(...) From baldrick at free.fr Mon Oct 13 13:42:43 2008 From: baldrick at free.fr (Duncan Sands) Date: Mon, 13 Oct 2008 18:42:43 -0000 Subject: [llvm-commits] [llvm] r57459 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810131842.m9DIghov022021@zion.cs.uiuc.edu> Author: baldrick Date: Mon Oct 13 13:42:43 2008 New Revision: 57459 URL: http://llvm.org/viewvc/llvm-project?rev=57459&view=rev Log: MarkModRef -> AddReadAttrs. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57459&r1=57458&r2=57459&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 13 13:42:43 2008 @@ -249,7 +249,9 @@ pulled out of instcombine and put into a new ValueTracking.h file, where they can be reused by other passes. -
  • MarkModRef etc
  • +
  • The new AddReadAttrs pass works out which functions are read-only or +read-none (these correspond to 'pure' and 'const' in C) and marks them +with the appropriate attribute.
  • From evan.cheng at apple.com Mon Oct 13 13:46:18 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 13 Oct 2008 18:46:18 -0000 Subject: [llvm-commits] [llvm] r57460 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp test/CodeGen/Mips/2008-10-13-LegalizerBug.ll Message-ID: <200810131846.m9DIkI1n022170@zion.cs.uiuc.edu> Author: evancheng Date: Mon Oct 13 13:46:18 2008 New Revision: 57460 URL: http://llvm.org/viewvc/llvm-project?rev=57460&view=rev Log: FIX PR2794. Make sure SIGN_EXTEND_INREG nodes introduced by LegalizeSetCCOperands are leglized. Patch by Richard Pennington. Added: llvm/trunk/test/CodeGen/Mips/2008-10-13-LegalizerBug.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=57460&r1=57459&r2=57460&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Oct 13 13:46:18 2008 @@ -4671,6 +4671,8 @@ DAG.getValueType(VT)); Tmp2 = DAG.getNode(ISD::SIGN_EXTEND_INREG, NVT, Tmp2, DAG.getValueType(VT)); + Tmp1 = LegalizeOp(Tmp1); // Relegalize new nodes. + Tmp2 = LegalizeOp(Tmp2); // Relegalize new nodes. break; } } @@ -5403,7 +5405,8 @@ DestTy.getVectorNumElements() / 2); SDValue LoResult = LegalizeINT_TO_FP(SDValue(), isSigned, SplitDestTy, Lo); SDValue HiResult = LegalizeINT_TO_FP(SDValue(), isSigned, SplitDestTy, Hi); - return LegalizeOp(DAG.getNode(ISD::CONCAT_VECTORS, DestTy, LoResult, HiResult)); + return LegalizeOp(DAG.getNode(ISD::CONCAT_VECTORS, DestTy, LoResult, + HiResult)); } // Special case for i32 source to take advantage of UINTTOFP_I32_F32, etc. Added: llvm/trunk/test/CodeGen/Mips/2008-10-13-LegalizerBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Mips/2008-10-13-LegalizerBug.ll?rev=57460&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/Mips/2008-10-13-LegalizerBug.ll (added) +++ llvm/trunk/test/CodeGen/Mips/2008-10-13-LegalizerBug.ll Mon Oct 13 13:46:18 2008 @@ -0,0 +1,29 @@ +; RUN: llvm-as < %s | llc -march=mips +; PR2794 + +define i32 @main(i8*) nounwind { +entry: + br label %continue.outer + +continue.outer: ; preds = %case4, %entry + %p.0.ph.rec = phi i32 [ 0, %entry ], [ %indvar.next, %case4 ] ; [#uses=2] + %p.0.ph = getelementptr i8* %0, i32 %p.0.ph.rec ; [#uses=1] + %1 = load i8* %p.0.ph ; [#uses=1] + switch i8 %1, label %infloop [ + i8 0, label %return.split + i8 76, label %case4 + i8 108, label %case4 + i8 104, label %case4 + i8 42, label %case4 + ] + +case4: ; preds = %continue.outer, %continue.outer, %continue.outer, %continue.outer + %indvar.next = add i32 %p.0.ph.rec, 1 ; [#uses=1] + br label %continue.outer + +return.split: ; preds = %continue.outer + ret i32 0 + +infloop: ; preds = %infloop, %continue.outer + br label %infloop +} From baldrick at free.fr Mon Oct 13 14:12:20 2008 From: baldrick at free.fr (Duncan Sands) Date: Mon, 13 Oct 2008 21:12:20 +0200 Subject: [llvm-commits] [llvm-gcc-4.2] r57454 - in /llvm-gcc-4.2/trunk/gcc: config/i386/llvm-i386-target.h config/i386/llvm-i386.cpp llvm-abi.h llvm-convert.cpp llvm-types.cpp In-Reply-To: <200810131803.m9DI32Ml020019@zion.cs.uiuc.edu> References: <200810131803.m9DI32Ml020019@zion.cs.uiuc.edu> Message-ID: <200810132112.20848.baldrick@free.fr> Hi Evan, > +// LLVM_SHOULD_PASS_AGGREGATE_USING_BYVAL_ATTR - Return true if this aggregate > +// value should be passed by value as a first class aggregate. The default is > +// false. > +#ifndef LLVM_SHOULD_PASS_AGGREGATE_AS_FCA The name in the comment is wrong: should be LLVM_SHOULD_PASS_AGGREGATE_AS_FCA not LLVM_SHOULD_PASS_AGGREGATE_USING_BYVAL_ATTR. Ciao, Duncan. From evan.cheng at apple.com Mon Oct 13 14:48:45 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 13 Oct 2008 19:48:45 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57461 - /llvm-gcc-4.2/trunk/gcc/llvm-abi.h Message-ID: <200810131948.m9DJmjU1024722@zion.cs.uiuc.edu> Author: evancheng Date: Mon Oct 13 14:48:44 2008 New Revision: 57461 URL: http://llvm.org/viewvc/llvm-project?rev=57461&view=rev Log: Fix comment. Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-abi.h?rev=57461&r1=57460&r2=57461&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-abi.h (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-abi.h Mon Oct 13 14:48:44 2008 @@ -255,9 +255,8 @@ false #endif -// LLVM_SHOULD_PASS_AGGREGATE_USING_BYVAL_ATTR - Return true if this aggregate -// value should be passed by value as a first class aggregate. The default is -// false. +// LLVM_SHOULD_PASS_AGGREGATE_AS_FCA - Return true if this aggregate value +// should be passed by value as a first class aggregate. The default is false. #ifndef LLVM_SHOULD_PASS_AGGREGATE_AS_FCA #define LLVM_SHOULD_PASS_AGGREGATE_AS_FCA(X, TY) \ false From evan.cheng at apple.com Mon Oct 13 14:49:24 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 13 Oct 2008 12:49:24 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r57454 - in /llvm-gcc-4.2/trunk/gcc: config/i386/llvm-i386-target.h config/i386/llvm-i386.cpp llvm-abi.h llvm-convert.cpp llvm-types.cpp In-Reply-To: <200810132112.20848.baldrick@free.fr> References: <200810131803.m9DI32Ml020019@zion.cs.uiuc.edu> <200810132112.20848.baldrick@free.fr> Message-ID: <8C7DAB36-8481-422F-BE47-74A2D2791CFC@apple.com> Thanks. Fixed. Evan On Oct 13, 2008, at 12:12 PM, Duncan Sands wrote: > Hi Evan, > >> +// LLVM_SHOULD_PASS_AGGREGATE_USING_BYVAL_ATTR - Return true if >> this aggregate >> +// value should be passed by value as a first class aggregate. The >> default is >> +// false. >> +#ifndef LLVM_SHOULD_PASS_AGGREGATE_AS_FCA > > The name in the comment is wrong: should be > LLVM_SHOULD_PASS_AGGREGATE_AS_FCA not > LLVM_SHOULD_PASS_AGGREGATE_USING_BYVAL_ATTR. > > Ciao, > > Duncan. From baldrick at free.fr Mon Oct 13 14:56:36 2008 From: baldrick at free.fr (Duncan Sands) Date: Mon, 13 Oct 2008 19:56:36 -0000 Subject: [llvm-commits] [llvm] r57462 - in /llvm/trunk/test/FrontendC: 2008-08-07-AlignPadding1.c 2008-08-07-AlignPadding2.c Message-ID: <200810131956.m9DJuaAs025195@zion.cs.uiuc.edu> Author: baldrick Date: Mon Oct 13 14:56:36 2008 New Revision: 57462 URL: http://llvm.org/viewvc/llvm-project?rev=57462&view=rev Log: Don't barf on 32 bit platforms if llvm-gcc is not built with 64 bit support. Since this test passes without -m64 on x86-32-linux, just remove the -m64. Modified: llvm/trunk/test/FrontendC/2008-08-07-AlignPadding1.c llvm/trunk/test/FrontendC/2008-08-07-AlignPadding2.c Modified: llvm/trunk/test/FrontendC/2008-08-07-AlignPadding1.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/2008-08-07-AlignPadding1.c?rev=57462&r1=57461&r2=57462&view=diff ============================================================================== --- llvm/trunk/test/FrontendC/2008-08-07-AlignPadding1.c (original) +++ llvm/trunk/test/FrontendC/2008-08-07-AlignPadding1.c Mon Oct 13 14:56:36 2008 @@ -1,4 +1,4 @@ -/* RUN: %llvmgcc %s -m64 -S -o - -emit-llvm -O0 | grep {zeroinitializer.*zeroinitializer.*zeroinitializer.*zeroinitializer.*zeroinitializer.*zeroinitializer} +/* RUN: %llvmgcc %s -S -o - -emit-llvm -O0 | grep {zeroinitializer.*zeroinitializer.*zeroinitializer.*zeroinitializer.*zeroinitializer.*zeroinitializer} The FE must generate padding here both at the end of each PyG_Head and between array elements. Reduced from Python. */ Modified: llvm/trunk/test/FrontendC/2008-08-07-AlignPadding2.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/2008-08-07-AlignPadding2.c?rev=57462&r1=57461&r2=57462&view=diff ============================================================================== --- llvm/trunk/test/FrontendC/2008-08-07-AlignPadding2.c (original) +++ llvm/trunk/test/FrontendC/2008-08-07-AlignPadding2.c Mon Oct 13 14:56:36 2008 @@ -1,4 +1,4 @@ -/* RUN: %llvmgcc %s -m64 -S -o - -emit-llvm -O0 | grep zeroinitializer | count 1 +/* RUN: %llvmgcc %s -S -o - -emit-llvm -O0 | grep zeroinitializer | count 1 The FE must not generate padding here between array elements. PR 2533. */ From clattner at apple.com Mon Oct 13 15:13:30 2008 From: clattner at apple.com (Chris Lattner) Date: Mon, 13 Oct 2008 13:13:30 -0700 Subject: [llvm-commits] [llvm] r57458 - in /llvm/trunk: lib/CodeGen/SimpleRegisterCoalescing.cpp test/CodeGen/X86/2008-10-13-CoalescerBug.ll In-Reply-To: <200810131835.m9DIZqct021698@zion.cs.uiuc.edu> References: <200810131835.m9DIZqct021698@zion.cs.uiuc.edu> Message-ID: <926D5147-016E-4940-9AF1-5E5FDB72FECB@apple.com> On Oct 13, 2008, at 11:35 AM, Evan Cheng wrote: > Author: evancheng > Date: Mon Oct 13 13:35:52 2008 > New Revision: 57458 > > URL: http://llvm.org/viewvc/llvm-project?rev=57458&view=rev > Log: > Also update sub-register intervals after a trivial computation is > rematt'ed for a copy instruction. PR2775. Thanks Evan, After this survives a nightly tester run, if you feel comfortable with the change, please ask Tanya to pull it into 2.4, thanks! -Chris From sabre at nondot.org Mon Oct 13 15:47:22 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 13 Oct 2008 20:47:22 -0000 Subject: [llvm-commits] [llvm] r57463 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810132047.m9DKlNY1028122@zion.cs.uiuc.edu> Author: lattner Date: Mon Oct 13 15:47:20 2008 New Revision: 57463 URL: http://llvm.org/viewvc/llvm-project?rev=57463&view=rev Log: describe major new features and llvm-gcc features. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57463&r1=57462&r2=57463&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 13 15:47:20 2008 @@ -156,21 +156,25 @@

    LLVM 2.4 includes several major new capabilities:

      -
    • -

      MRVs got generalized to FCAs. getresult is gone, ret with multiple values - is gone.

      -
    • - -
    • -O0 compile times overall much faster

    • - -
    • Attrs changes?

    • - - -
    • Initial PIC16 port

    • - -
    • Support the rest of the atomic __sync builtins

    • - -
    • ...

    • +
    • The most visible end-user change in LLVM 2.4 is that it includes many +optimizations and changes ot make -O0 compile times much faster. You should see +improvements on the order of 30% or more faster than LLVM 2.3. There are many +pieces to this change, described in more detail below. The speedups and new +components can also be used for JIT compilers that want fast compilation as +well.

    • + +
    • The biggest change to the LLVM IR is that Multiple Return Values (which +were introduced in LLVM 2.3) have been generalized to full support for "First +Class Aggregate" values in LLVM 2.4. This means that LLVM IR supports using +structs and arrays as values in a function. This capability is mostly useful +for front-end authors, who prefer to treat things like complex numbers, simple +tuples, dope vectors, etc as Value*'s instead of as a tuple of Value*'s or as +memory values.

    • + +
    • LLVM 2.4 also includes an initial port for the PIC16 microprocessor. This +is the LLVM targer that only has support for 8 bit registers, and a number of +other crazy constraints. While the port is still in early development stages, +it shows some interesting things you can do with LLVM.

    @@ -184,16 +188,32 @@
    -

    LLVM 2.4 fully supports the llvm-gcc 4.2 front-end, and includes support -for the C, C++, Objective-C, Ada, and Fortran front-ends.

    - -

    -

      -
    • block-pointers
    • -
    • alpha?
    • -
    • -flimited-precision
    • -
    • -flto
    • - +

      LLVM fully supports the llvm-gcc 4.2 front-end, which marries the GCC +front-ends and driver with the LLVM optimizer and code generator. It currently +includes support for the C, C++, Objective-C, Ada, and Fortran front-ends.

      + +
        +
      • LLVM 2.4 supports the full set of atomic __sync builtins. LLVM 2.3 only +supported those used by OpenMP, but 2.4 supports them all. Not all targets +support all builtins, but X86 and PowerPC do.
      • + +
      • llvm-gcc now supports an -flimited-precision option, which tells the +compiler that it is ok to use low-precision approximations of certain libm +functions (like tan, log, etc). This allows you to get high performance if you +only need (say) 14-bits of precision.
      • + +
      • llvm-gcc now supports a C language extension known as "Blocks +. This feature is similar to nested functions and closures, but does not +require stack trampolines (with most ABIs) and supports returning closures +from functions that define them. Note that actually using Blocks +requires a small runtime that is not included with llvm-gcc.
      • + +
      • llvm-gcc now supports a new -flto option. On systems that support +transparent Link Time Optimization (currently Darwin systems with Xcode 3.1 and +later) this allows the use of LTO with other optimization levels like -Os. +Previously, LTO could only be used with -O4, which implied optimizations in +-O3 that can increase code size.
    @@ -216,6 +236,7 @@
  • DebugInfoBuilder
  • .ll printing format change: %3 = add i32 4, 2
  • opt-size, noinline, alwaysinline function attributes
  • +
  • Attrs: function, return, param.

  • ...
  • From criswell at uiuc.edu Mon Oct 13 15:49:00 2008 From: criswell at uiuc.edu (John Criswell) Date: Mon, 13 Oct 2008 20:49:00 -0000 Subject: [llvm-commits] [poolalloc] r57464 - /poolalloc/trunk/include/dsa/DataStructure.h Message-ID: <200810132049.m9DKn04V028276@zion.cs.uiuc.edu> Author: criswell Date: Mon Oct 13 15:49:00 2008 New Revision: 57464 URL: http://llvm.org/viewvc/llvm-project?rev=57464&view=rev Log: Remove deleteValue() and copyValue() from the BU pass as I think the DataStructures base class now provides these methods for all DSA passes. Modified: poolalloc/trunk/include/dsa/DataStructure.h Modified: poolalloc/trunk/include/dsa/DataStructure.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DataStructure.h?rev=57464&r1=57463&r2=57464&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/DataStructure.h (original) +++ poolalloc/trunk/include/dsa/DataStructure.h Mon Oct 13 15:49:00 2008 @@ -232,11 +232,6 @@ virtual bool runOnModule(Module &M); - /// deleteValue/copyValue - Interfaces to update the DSGraphs in the program. - /// These correspond to the interfaces defined in the AliasAnalysis class. - void deleteValue(Value *V); - void copyValue(Value *From, Value *To); - virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); } From gohman at apple.com Mon Oct 13 15:52:05 2008 From: gohman at apple.com (Dan Gohman) Date: Mon, 13 Oct 2008 20:52:05 -0000 Subject: [llvm-commits] [llvm] r57465 - in /llvm/trunk: lib/Target/X86/X86ISelDAGToDAG.cpp test/CodeGen/X86/pr2849.ll Message-ID: <200810132052.m9DKq531028430@zion.cs.uiuc.edu> Author: djg Date: Mon Oct 13 15:52:04 2008 New Revision: 57465 URL: http://llvm.org/viewvc/llvm-project?rev=57465&view=rev Log: When doing the very-late shift-and address-mode optimization, create a new DAG node to represent the new shift to keep the DAG consistent, even though it'll almost always be folded into the address. If a user of the resulting address has multiple uses, the nodes may get revisited by a later MatchAddress call, in which case DAG inconsistencies do matter. This fixes PR2849. Added: llvm/trunk/test/CodeGen/X86/pr2849.ll Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=57465&r1=57464&r2=57465&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Mon Oct 13 15:52:04 2008 @@ -989,8 +989,11 @@ SDValue(C2, 0), SDValue(C1, 0)); SDValue NewAND = CurDAG->getNode(ISD::AND, N.getValueType(), Shift.getOperand(0), NewANDMask); + SDValue NewSHIFT = CurDAG->getNode(ISD::SHL, N.getValueType(), + NewAND, SDValue(C1, 0)); NewANDMask.getNode()->setNodeId(Shift.getNode()->getNodeId()); NewAND.getNode()->setNodeId(N.getNode()->getNodeId()); + CurDAG->ReplaceAllUsesWith(N, NewSHIFT); AM.Scale = 1 << ShiftCst; AM.IndexReg = NewAND; Added: llvm/trunk/test/CodeGen/X86/pr2849.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr2849.ll?rev=57465&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/pr2849.ll (added) +++ llvm/trunk/test/CodeGen/X86/pr2849.ll Mon Oct 13 15:52:04 2008 @@ -0,0 +1,38 @@ +; RUN: llvm-as < %s | llc +; PR2849 + +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128" +target triple = "x86_64-unknown-linux-gnu" + %struct.BaseBoundPtrs = type { i8*, i8* } + %struct.HashEntry = type { %struct.BaseBoundPtrs } + %struct.NODE = type { i8, i8, %struct.anon } + %struct.anon = type { %struct.xlist } + %struct.xlist = type { %struct.NODE*, %struct.NODE* } + %struct.xvect = type { %struct.NODE** } + at hash_table_begin = external global %struct.HashEntry* + +define void @obshow() { +entry: + %tmp = load %struct.HashEntry** @hash_table_begin, align 8 + br i1 false, label %xlygetvalue.exit, label %xlygetvalue.exit + +xlygetvalue.exit: + %storemerge.in.i = phi %struct.NODE** [ null, %entry ], [ null, %entry ] + %storemerge.i = load %struct.NODE** %storemerge.in.i + %tmp1 = ptrtoint %struct.NODE** %storemerge.in.i to i64 + %tmp2 = lshr i64 %tmp1, 3 + %tmp3 = and i64 %tmp2, 2147483647 + %tmp4 = getelementptr %struct.HashEntry* %tmp, i64 %tmp3, i32 0, i32 1 + %tmp7 = load i8** %tmp4, align 8 + %tmp8 = getelementptr %struct.NODE* %storemerge.i, i64 0, i32 2 + %tmp9 = bitcast %struct.anon* %tmp8 to %struct.NODE*** + %tmp11 = load %struct.NODE*** %tmp9, align 8 + %tmp12 = ptrtoint %struct.NODE** %tmp11 to i64 + %tmp13 = lshr i64 %tmp12, 3 + %tmp14 = and i64 %tmp13, 2147483647 + %tmp15 = getelementptr %struct.HashEntry* %tmp, i64 %tmp14, i32 0, i32 1 + call fastcc void @xlprint(i8** %tmp4, i8* %tmp7, i8** %tmp15) + ret void +} + +declare fastcc void @xlprint(i8**, i8*, i8**) From sabre at nondot.org Mon Oct 13 15:59:33 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 13 Oct 2008 20:59:33 -0000 Subject: [llvm-commits] [llvm] r57466 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810132059.m9DKxXmx028711@zion.cs.uiuc.edu> Author: lattner Date: Mon Oct 13 15:59:32 2008 New Revision: 57466 URL: http://llvm.org/viewvc/llvm-project?rev=57466&view=rev Log: more updates. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57466&r1=57465&r2=57466&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 13 15:59:32 2008 @@ -193,12 +193,13 @@ includes support for the C, C++, Objective-C, Ada, and Fortran front-ends.

      -
    • LLVM 2.4 supports the full set of atomic __sync builtins. LLVM 2.3 only -supported those used by OpenMP, but 2.4 supports them all. Not all targets -support all builtins, but X86 and PowerPC do.
    • +
    • LLVM 2.4 supports the full set of atomic __sync_* builtins. LLVM +2.3 only supported those used by OpenMP, but 2.4 supports them all. While +llvm-gcc supports all of these builtins, note that not all targets do. X86 and +PowerPC are known to support them all in both 32-bit and 64-bit mode.
    • -
    • llvm-gcc now supports an -flimited-precision option, which tells the -compiler that it is ok to use low-precision approximations of certain libm +
    • llvm-gcc now supports an -flimited-precision option, which tells +the compiler that it is ok to use low-precision approximations of certain libm functions (like tan, log, etc). This allows you to get high performance if you only need (say) 14-bits of precision.
    • @@ -229,15 +230,39 @@

        -
      • vector shifts in the IR: no codegen support yet
      • -
      • use diet patch landed: saved 15% IR memory footprint
      • +
      • A major change to the "Use" class landed, which shrank it by 25%. Since +this is a pervasive part of the LLVM, it ended up reducing the memory use of +LLVM IR in general by 15% for most programs.
      • + +
      • Values with no names are now pretty printed by llvm-dis more +nicely. They now print as "%3 = add i32 %A, 4" instead of +"add i32 %A, 4 ; <i32>:3", which makes it much easier to read. +
      • + +
      • LLVM 2.4 includes some changes for better vector support. First, the shift +operations (shl, ashr, lshr) now all support vectors +and do an element-by-element shift (shifts of the whole vector can be +accomplished by bitcasting the vector to <1 x i128> for example). Second, +there is support in development for vector comparisons. LLVM 2.4 actually +supports two ways to do vector comparisons: the vicmp/vfcmp instructions and the +icmp/fcmp instructions. The vicmp/vfcmp instructions are temporary and will be +removed (do not use them). The icmp/fcmp instructions compare two vectors and +return a vector of i1's for each result. Note that there is very little codegen +support available for any of these IR features though.
      • + +
      • A new DebugInfoBuilder class is available, which makes it much +easier for front-ends to create debug info descriptors, similar to the way that +IRBuilder makes it easier to create LLVM IR.
      • + +
      • LLVM now supports "function attributes", which allows us to seperate return +value attributes from function attributes. LLVM now supports attributes on a +function itself, a return value, and its parameters. New supported function +attributes include noinline/alwaysinline and the "opt-size" flag which says the +function should be optimized for code size.
      • +
      • LLVM IR now directly represents "common" linkage, instead of representing it as a form of weak linkage.
      • -
      • DebugInfoBuilder
      • -
      • .ll printing format change: %3 = add i32 4, 2
      • -
      • opt-size, noinline, alwaysinline function attributes
      • -
      • Attrs: function, return, param.

      • -
      • ...
      • +
    From dalej at apple.com Mon Oct 13 16:01:51 2008 From: dalej at apple.com (Dale Johannesen) Date: Mon, 13 Oct 2008 14:01:51 -0700 Subject: [llvm-commits] [llvm] r57466 - /llvm/trunk/docs/ReleaseNotes.html In-Reply-To: <200810132059.m9DKxXmx028711@zion.cs.uiuc.edu> References: <200810132059.m9DKxXmx028711@zion.cs.uiuc.edu> Message-ID: <1742F596-CCC4-4182-B63E-41D0827DCF54@apple.com> On Oct 13, 2008, at 1:59 PMPDT, Chris Lattner wrote: >
  • LLVM 2.4 supports the full set of atomic __sync_* > builtins. LLVM > +2.3 only supported those used by OpenMP, but 2.4 supports them > all. While > +llvm-gcc supports all of these builtins, note that not all targets > do. X86 and > +PowerPC are known to support them all in both 32-bit and 64-bit > mode.
  • PowerPC 32-bit mode does not support 64-bit atomics. There is no hardware support for this. From clattner at apple.com Mon Oct 13 16:07:35 2008 From: clattner at apple.com (Chris Lattner) Date: Mon, 13 Oct 2008 14:07:35 -0700 Subject: [llvm-commits] [llvm] r57466 - /llvm/trunk/docs/ReleaseNotes.html In-Reply-To: <1742F596-CCC4-4182-B63E-41D0827DCF54@apple.com> References: <200810132059.m9DKxXmx028711@zion.cs.uiuc.edu> <1742F596-CCC4-4182-B63E-41D0827DCF54@apple.com> Message-ID: <6607E983-A8C1-4A88-BE46-1F59BB33FC7A@apple.com> On Oct 13, 2008, at 2:01 PM, Dale Johannesen wrote: > > On Oct 13, 2008, at 1:59 PMPDT, Chris Lattner wrote: > >>
  • LLVM 2.4 supports the full set of atomic __sync_* >> builtins. LLVM >> +2.3 only supported those used by OpenMP, but 2.4 supports them >> all. While >> +llvm-gcc supports all of these builtins, note that not all targets >> do. X86 and >> +PowerPC are known to support them all in both 32-bit and 64-bit >> mode.
  • > > PowerPC 32-bit mode does not support 64-bit atomics. There is no > hardware support for this. Oooh, thanks! -Chris From evan.cheng at apple.com Mon Oct 13 16:21:34 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 13 Oct 2008 14:21:34 -0700 Subject: [llvm-commits] [llvm] r57465 - in /llvm/trunk: lib/Target/X86/X86ISelDAGToDAG.cpp test/CodeGen/X86/pr2849.ll In-Reply-To: <200810132052.m9DKq531028430@zion.cs.uiuc.edu> References: <200810132052.m9DKq531028430@zion.cs.uiuc.edu> Message-ID: Thanks. I am kinda confused by the fix though. I thought the problem was the AND node (i.e. N) has already been added to the isel queue so NewAND node will not be selected? The newly created shift node doesn't have a node id. Is that ok? Is it guaranteed that its lone use has already been processed? Please add some comments because this is tricky stuff. Thanks, Evan On Oct 13, 2008, at 1:52 PM, Dan Gohman wrote: > Author: djg > Date: Mon Oct 13 15:52:04 2008 > New Revision: 57465 > > URL: http://llvm.org/viewvc/llvm-project?rev=57465&view=rev > Log: > When doing the very-late shift-and address-mode optimization, > create a new DAG node to represent the new shift to keep the > DAG consistent, even though it'll almost always be folded into > the address. > > If a user of the resulting address has multiple uses, the > nodes may get revisited by a later MatchAddress call, in which > case DAG inconsistencies do matter. > > This fixes PR2849. > > Added: > llvm/trunk/test/CodeGen/X86/pr2849.ll > Modified: > llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp > > Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=57465&r1=57464&r2=57465&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) > +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Mon Oct 13 > 15:52:04 2008 > @@ -989,8 +989,11 @@ > SDValue(C2, 0), > SDValue(C1, 0)); > SDValue NewAND = CurDAG->getNode(ISD::AND, N.getValueType(), > Shift.getOperand(0), > NewANDMask); > + SDValue NewSHIFT = CurDAG->getNode(ISD::SHL, N.getValueType(), > + NewAND, SDValue(C1, 0)); > NewANDMask.getNode()->setNodeId(Shift.getNode()->getNodeId()); > NewAND.getNode()->setNodeId(N.getNode()->getNodeId()); > + CurDAG->ReplaceAllUsesWith(N, NewSHIFT); > > AM.Scale = 1 << ShiftCst; > AM.IndexReg = NewAND; > > Added: llvm/trunk/test/CodeGen/X86/pr2849.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr2849.ll?rev=57465&view=auto > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/test/CodeGen/X86/pr2849.ll (added) > +++ llvm/trunk/test/CodeGen/X86/pr2849.ll Mon Oct 13 15:52:04 2008 > @@ -0,0 +1,38 @@ > +; RUN: llvm-as < %s | llc > +; PR2849 > + > +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32- > i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64- > s0:64:64-f80:128:128" > +target triple = "x86_64-unknown-linux-gnu" > + %struct.BaseBoundPtrs = type { i8*, i8* } > + %struct.HashEntry = type { %struct.BaseBoundPtrs } > + %struct.NODE = type { i8, i8, %struct.anon } > + %struct.anon = type { %struct.xlist } > + %struct.xlist = type { %struct.NODE*, %struct.NODE* } > + %struct.xvect = type { %struct.NODE** } > + at hash_table_begin = external global %struct.HashEntry* > + > +define void @obshow() { > +entry: > + %tmp = load %struct.HashEntry** @hash_table_begin, align 8 > + br i1 false, label %xlygetvalue.exit, label %xlygetvalue.exit > + > +xlygetvalue.exit: > + %storemerge.in.i = phi %struct.NODE** [ null, %entry ], [ null, > %entry ] > + %storemerge.i = load %struct.NODE** %storemerge.in.i > + %tmp1 = ptrtoint %struct.NODE** %storemerge.in.i to i64 > + %tmp2 = lshr i64 %tmp1, 3 > + %tmp3 = and i64 %tmp2, 2147483647 > + %tmp4 = getelementptr %struct.HashEntry* %tmp, i64 %tmp3, i32 0, > i32 1 > + %tmp7 = load i8** %tmp4, align 8 > + %tmp8 = getelementptr %struct.NODE* %storemerge.i, i64 0, i32 2 > + %tmp9 = bitcast %struct.anon* %tmp8 to %struct.NODE*** > + %tmp11 = load %struct.NODE*** %tmp9, align 8 > + %tmp12 = ptrtoint %struct.NODE** %tmp11 to i64 > + %tmp13 = lshr i64 %tmp12, 3 > + %tmp14 = and i64 %tmp13, 2147483647 > + %tmp15 = getelementptr %struct.HashEntry* %tmp, i64 %tmp14, i32 0, > i32 1 > + call fastcc void @xlprint(i8** %tmp4, i8* %tmp7, i8** %tmp15) > + ret void > +} > + > +declare fastcc void @xlprint(i8**, i8*, i8**) > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From ofv at wanadoo.es Mon Oct 13 16:26:42 2008 From: ofv at wanadoo.es (=?iso-8859-1?Q?=D3scar_Fuentes?=) Date: Mon, 13 Oct 2008 23:26:42 +0200 Subject: [llvm-commits] [llvm] r57463 - /llvm/trunk/docs/ReleaseNotes.html References: <200810132047.m9DKlNY1028122@zion.cs.uiuc.edu> Message-ID: Chris Lattner writes: small typo: > +optimizations and changes ot make -O0 compile times much faster. You should see _____________________________^^ -- Oscar From sabre at nondot.org Mon Oct 13 16:50:37 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 13 Oct 2008 21:50:37 -0000 Subject: [llvm-commits] [llvm] r57468 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810132150.m9DLobii031098@zion.cs.uiuc.edu> Author: lattner Date: Mon Oct 13 16:50:36 2008 New Revision: 57468 URL: http://llvm.org/viewvc/llvm-project?rev=57468&view=rev Log: optimizer and codegen Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57468&r1=57467&r2=57468&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 13 16:50:36 2008 @@ -157,7 +157,7 @@
    • The most visible end-user change in LLVM 2.4 is that it includes many -optimizations and changes ot make -O0 compile times much faster. You should see +optimizations and changes to make -O0 compile times much faster. You should see improvements on the order of 30% or more faster than LLVM 2.3. There are many pieces to this change, described in more detail below. The speedups and new components can also be used for JIT compilers that want fast compilation as @@ -195,8 +195,9 @@

      • LLVM 2.4 supports the full set of atomic __sync_* builtins. LLVM 2.3 only supported those used by OpenMP, but 2.4 supports them all. While -llvm-gcc supports all of these builtins, note that not all targets do. X86 and -PowerPC are known to support them all in both 32-bit and 64-bit mode.
      • +llvm-gcc supports all of these builtins, note that not all targets do. X86 +support them all in both 32-bit and 64-bit mode and PowerPC supports them all +except for the 64-bit operations when in 32-bit mode.
      • llvm-gcc now supports an -flimited-precision option, which tells the compiler that it is ok to use low-precision approximations of certain libm @@ -274,30 +275,40 @@
        -

        In addition to a huge array of bug fixes and minor performance tweaks, the -LLVM 2.4 optimizers support a few major enhancements:

        +

        In addition to a huge array of bug fixes and minor performance tweaks, this +release includes a few major enhancements and additions to the optimizers:

          -
        • GVN now does local PRE?
        • +
        • The Global Value Numbering (GVN) pass now does local Partial Redundancy +Elimination (PRE) to eliminate some partially redundant expressions in cases +where doing so won't grow code size.
        • -
        • Matthijs' Dead argument elimination rewrite
        • +
        • LLVM 2.4 includes a new loop deletion pass (which removes output-free +provably-finite loops) and a rewritten Aggressive Dead Code Elimination (ADCE) +pass that no longer uses control dependence information. These changes speed up +the optimizer and also prevents it from deleting output-free infinite +loops.
        • -
        • Old-ADCE used control dependence and deleted output-free infinite loops. -Added a new Loop deletion pass (for deleting output free provably-finite loops) -and rewrote ADCE to be simpler faster, and not need control dependence.
        • - -
        • SparsePropagation framework for lattice-based dataflow solvers.
        • +
        • The new AddReadAttrs pass works out which functions are read-only or +read-none (these correspond to 'pure' and 'const' in C) and marks them +with the appropriate attribute.
        • -
        • Tail duplication was removed from the standard optimizer sequence.
        • +
        • LLVM 2.4 now includes a new SparsePropagation framework, which makes it +trivial to build lattice-based dataflow solvers that operate over LLVM IR. Using +this interface means that you just define objects to represent your lattice +values and the transfer functions that operate on them. It handles the +mechanics of worklist processing, liveness tracking, handling PHI nodes, +etc.
        • Various helper functions (ComputeMaskedBits, ComputeNumSignBits, etc) were -pulled out of instcombine and put into a new ValueTracking.h file, where they -can be reused by other passes.
        • +pulled out of the Instruction Combining pass and put into a new +ValueTracking.h header, where they can be reused by other passes. + +
        • The tail duplication pass has been removed from the standard optimizer +sequence used by llvm-gcc. This pass still exists, but the benefits it once +provided are now achieved by other passes.
        • -
        • The new AddReadAttrs pass works out which functions are read-only or -read-none (these correspond to 'pure' and 'const' in C) and marks them -with the appropriate attribute.
        @@ -314,21 +325,41 @@ faster:

          -
        • asm writers split out to their own library to avoid JITs having to link - them in.
        • -
        • Big asm writer refactoring + TargetAsmInfo
        • -
        • 2-addr pass and coalescer can now remat trivial insts to avoid a copy.
        • -
        • spiller to commute instructions in order to fold a reload
        • -
        • Stack slot coloring?
        • -
        • Live intervals renumbering? Is this useful to external people?
        • -
        • 'is as cheap as a move' instruction flag
        • -
        • Improvements to selection dag viewing
        • -
        • fast isel
        • -
        • Selection dag speedups
        • -
        • asmwriter + raw_ostream -> fastah
        • -
        • Partitioned Boolean Quadratic Programming (PBQP) based register -allocator.
        • -
        • ...
        • +
        • The target-independent code generator supports (and the X86 backend + currently implements) a new interface for "fast" instruction selection. This + interface is optimized to produce code as quickly as possible, sacrificing + code quality to do it. This is used by default at -O0 or when using + "llc -fast" on X86. It is straight-forward to add support for + other targets if faster -O0 compilation is desired.
        • + +
        • In addition to the new 'fast' instruction selection path, many existing + pieces of the code generator have been optimized in significant ways. + SelectionDAG's are now pool allocated and use better algorithms in many + places, the ".s" file printers now use raw_ostream to emit text much faster, + etc. The end result of these improvements is that the compiler also takes + substantially less time to generate code that is just as good (and often + better) than before.
        • + +
        • Each target has been split to separate the .s file printing logic from the + rest of the target. This enables JIT compilers that don't link in the + (somewhat large) code and data tables used for printing a .s file.
        • + +
        • The code generator now includes a "stack slot coloring" pass, which packs + together individual spilled values into common stack slots. This reduces + the size of stack frames with many spills, which tends to increase L1 cache + effectiveness.
        • + +
        • Various pieces of the register allocator (e.g. the coalescer and two-address + operation elimination pass) now know how to rematerialize trivial operations + to avoid copies and include several other optimizations.
        • + +
        • The graphs produced by + the llc -view-*-dags options are now significantly prettier and + easier to read.
        • + +
        • LLVM 2.4 includes a new register allocator based on Partitioned Boolean + Quadratic Programming (PBQP). This register allocator is still in + development, but is very simple and clean.
        From criswell at uiuc.edu Mon Oct 13 17:01:03 2008 From: criswell at uiuc.edu (John Criswell) Date: Mon, 13 Oct 2008 22:01:03 -0000 Subject: [llvm-commits] [poolalloc] r57469 - /poolalloc/trunk/include/dsa/DataStructure.h Message-ID: <200810132201.m9DM13uA031472@zion.cs.uiuc.edu> Author: criswell Date: Mon Oct 13 17:01:01 2008 New Revision: 57469 URL: http://llvm.org/viewvc/llvm-project?rev=57469&view=rev Log: All DSA passes preserve all other analysis pass results. Modified: poolalloc/trunk/include/dsa/DataStructure.h Modified: poolalloc/trunk/include/dsa/DataStructure.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DataStructure.h?rev=57469&r1=57468&r2=57469&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/DataStructure.h (original) +++ poolalloc/trunk/include/dsa/DataStructure.h Mon Oct 13 17:01:01 2008 @@ -184,6 +184,7 @@ /// virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); + AU.setPreservesAll(); } }; @@ -202,6 +203,7 @@ /// virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); + AU.setPreservesAll(); } }; @@ -234,6 +236,7 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); + AU.setPreservesAll(); } protected: @@ -299,6 +302,7 @@ /// virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); + AU.setPreservesAll(); } private: From sabre at nondot.org Mon Oct 13 17:06:31 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 13 Oct 2008 22:06:31 -0000 Subject: [llvm-commits] [llvm] r57470 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810132206.m9DM6WdP031734@zion.cs.uiuc.edu> Author: lattner Date: Mon Oct 13 17:06:31 2008 New Revision: 57470 URL: http://llvm.org/viewvc/llvm-project?rev=57470&view=rev Log: more changes. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57470&r1=57469&r2=57470&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 13 17:06:31 2008 @@ -368,7 +368,7 @@
        @@ -378,25 +378,8 @@
        • Exception handling is supported by default on Linux/x86-64.
        • Position Independent Code (PIC) is now supported on Linux/x86-64.
        • -
        • ...
        • - -
        - -
        - - - - -
        -

        New target-specific features include: -

        - -
          -
        • MIPS floating point support?
        • -
        • PowerPC now supports trampolines.
        • -
        • ....
        • +
        • MIPS floating point support? [BRUNO]
        • +
        • The PowerPC backend now supports trampolines.
        @@ -413,11 +396,17 @@
        • llvmc2 (the generic compiler driver) gained plugin - support. It is now easier to experiment with llvmc2 and - build your own tools based on it.
        • -
        • raw_ostream + formatting
        • -
        • Recycler + pool allocation stuff?
        • -
        • ...
        • + support. It is now easier to experiment with llvmc2 and + build your own tools based on it. + +
        • LLVM 2.4 includes a number of new generic algorithms and data structures, + include a scoped hash table, 'immutable' data structures, and a + raw_ostream class. The raw_ostream class and + format allow for efficient file output, and various pieces of LLVM + have switched over to use it. The eventual goal is to eliminate + std::ostream in favor of it.
        • + +
        • Recycler + pool allocation stuff? [DAN]
    @@ -429,27 +418,40 @@
    -

    If you're already an LLVM user, this section lists some "gotchas" that you -may run into upgrading from the previous release.

    +

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

    -

    The LLVM IR generated by llvm-gcc no longer names all instructions. - Use the instnamer pass if you want everything named.

    +
      -
    • The LoadVN and GCSE passes have been removed.
    • +
    • The LLVM IR generated by llvm-gcc no longer names all instructions. This + makes it run faster, but may be more confusing to some people. If you + prefer to have names, the 'opt -instnamer' pass will add names to + all instructions.
    • +
    • The LoadVN and GCSE passes have been removed from the tree. They are + obsolete and have been replaced with the GVN and MemoryDependence passes. +
    • +
    -

    LLVM API Changes:

    + +

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

      -
    • ... Attributes changes ...
    • +
    • Attributes changes [DEVANG]
    • The DbgStopPointInst methods getDirectory and getFileName now return Value* instead of strings. These can be converted to strings using llvm::GetConstantStringInfo defined via "llvm/Analysis/ValueTracking.h".
    • -
    • API change: BinaryOperator::create -> Create (CmpInst, CastInst too)
    • +
    • The APIs to create various instructions have changed from lower case + "create" methods to upper case "Create" methods (e.g. + BinaryOperator::create). LLVM 2.4 includes both cases, but the + lower case ones are removed in mainline, please migrate.
    • +
    • Various header files like "llvm/ADT/iterator" were given a .h suffix. Change your code to #include "llvm/ADT/iterator.h" instead.
    • From bruno.cardoso at gmail.com Mon Oct 13 19:32:19 2008 From: bruno.cardoso at gmail.com (Bruno Cardoso Lopes) Date: Mon, 13 Oct 2008 22:32:19 -0200 Subject: [llvm-commits] [llvm] r57460 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp test/CodeGen/Mips/2008-10-13-LegalizerBug.ll In-Reply-To: <200810131846.m9DIkI1n022170@zion.cs.uiuc.edu> References: <200810131846.m9DIkI1n022170@zion.cs.uiuc.edu> Message-ID: <275e64e40810131732v22d4d477n1a7949685482de28@mail.gmail.com> > FIX PR2794. Make sure SIGN_EXTEND_INREG nodes introduced by LegalizeSetCCOperands are leglized. Patch by Richard Pennington. Nice! Thanks for fixing this! :) -- Bruno Cardoso Lopes http://www.brunocardoso.cc "When faced with untenable alternatives, you should consider your imperative." From dpatel at apple.com Mon Oct 13 19:33:11 2008 From: dpatel at apple.com (Devang Patel) Date: Tue, 14 Oct 2008 00:33:11 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57471 - /llvm-gcc-4.2/trunk/gcc/toplev.c Message-ID: <200810140033.m9E0XClX004786@zion.cs.uiuc.edu> Author: dpatel Date: Mon Oct 13 19:33:10 2008 New Revision: 57471 URL: http://llvm.org/viewvc/llvm-project?rev=57471&view=rev Log: Disable -dM warning when -E is not used on the command line. Modified: llvm-gcc-4.2/trunk/gcc/toplev.c Modified: llvm-gcc-4.2/trunk/gcc/toplev.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/toplev.c?rev=57471&r1=57470&r2=57471&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/toplev.c (original) +++ llvm-gcc-4.2/trunk/gcc/toplev.c Mon Oct 13 19:33:10 2008 @@ -1224,6 +1224,12 @@ setup_core_dumping(); break; + /* LLVM LOCAL begin */ + case 'M': + /* Ignore -dM. This is overloaded for rtl pass that + does not exist in llvm-gcc. */ + break; + /* LLVM LOCAL end */ case 'a': default: if (!enable_rtl_dump_file (c)) From sabre at nondot.org Mon Oct 13 19:52:55 2008 From: sabre at nondot.org (Chris Lattner) Date: Tue, 14 Oct 2008 00:52:55 -0000 Subject: [llvm-commits] [llvm] r57472 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810140052.m9E0quIZ005369@zion.cs.uiuc.edu> Author: lattner Date: Mon Oct 13 19:52:49 2008 New Revision: 57472 URL: http://llvm.org/viewvc/llvm-project?rev=57472&view=rev Log: more minor updates Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57472&r1=57471&r2=57472&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Mon Oct 13 19:52:49 2008 @@ -98,8 +98,7 @@ yet production quality, it is progressing very nicely. In addition, C++ front-end work has started to make significant progress.

      -

      Codegen progress/state -

      +

      Codegen progress/state [DANIEL]

    @@ -112,6 +111,8 @@

    The static analysis tool + +[TED] .

    @@ -127,7 +128,7 @@ a JVM and a CLI Virtual Machines (Microsoft .NET is an implementation of the CLI) using the Just-In-Time compiler of LLVM.

    -

    ...

    +

    [NICOLAS]

    @@ -244,12 +245,11 @@ operations (shl, ashr, lshr) now all support vectors and do an element-by-element shift (shifts of the whole vector can be accomplished by bitcasting the vector to <1 x i128> for example). Second, -there is support in development for vector comparisons. LLVM 2.4 actually -supports two ways to do vector comparisons: the vicmp/vfcmp instructions and the -icmp/fcmp instructions. The vicmp/vfcmp instructions are temporary and will be -removed (do not use them). The icmp/fcmp instructions compare two vectors and -return a vector of i1's for each result. Note that there is very little codegen -support available for any of these IR features though. +there is initial support in development for vector comparisons with the +fcmp/icmp +instructions. These instructions compare two vectors and return a vector of +i1's for each result. Note that there is very little codegen support available +for any of these IR features though.
  • A new DebugInfoBuilder class is available, which makes it much easier for front-ends to create debug info descriptors, similar to the way that From daniel at zuster.org Mon Oct 13 22:56:58 2008 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 14 Oct 2008 03:56:58 -0000 Subject: [llvm-commits] [llvm] r57473 - in /llvm/trunk/tools/llvmc2: core/ src/ Message-ID: <200810140356.m9E3uxgZ011717@zion.cs.uiuc.edu> Author: ddunbar Date: Mon Oct 13 22:56:55 2008 New Revision: 57473 URL: http://llvm.org/viewvc/llvm-project?rev=57473&view=rev Log: Remove stale src, core directories. Removed: llvm/trunk/tools/llvmc2/core/ llvm/trunk/tools/llvmc2/src/ From daniel at zuster.org Tue Oct 14 00:10:06 2008 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 14 Oct 2008 05:10:06 -0000 Subject: [llvm-commits] [test-suite] r57474 - in /test-suite/trunk: MultiSource/Applications/lua/ SingleSource/Benchmarks/BenchmarkGame/ Message-ID: <200810140510.m9E5A6f9014159@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Oct 14 00:10:04 2008 New Revision: 57474 URL: http://llvm.org/viewvc/llvm-project?rev=57474&view=rev Log: Set svn:ignore on some Output directories. Modified: test-suite/trunk/MultiSource/Applications/lua/ (props changed) test-suite/trunk/SingleSource/Benchmarks/BenchmarkGame/ (props changed) Propchange: test-suite/trunk/MultiSource/Applications/lua/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Tue Oct 14 00:10:04 2008 @@ -0,0 +1 @@ +Output Propchange: test-suite/trunk/SingleSource/Benchmarks/BenchmarkGame/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Tue Oct 14 00:10:04 2008 @@ -0,0 +1 @@ +Output From kremenek at apple.com Tue Oct 14 00:14:22 2008 From: kremenek at apple.com (Ted Kremenek) Date: Tue, 14 Oct 2008 05:14:22 -0000 Subject: [llvm-commits] [llvm] r57475 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810140514.m9E5EMeI014302@zion.cs.uiuc.edu> Author: kremenek Date: Tue Oct 14 00:14:21 2008 New Revision: 57475 URL: http://llvm.org/viewvc/llvm-project?rev=57475&view=rev Log: Add static analyzer notes. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57475&r1=57474&r2=57475&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Oct 14 00:14:21 2008 @@ -109,11 +109,29 @@
    -

    The -static analysis tool - -[TED] -.

    +

    The Clang project also includes an early stage static source code analysis +tool for automatically +finding bugs in C and Objective-C programs. The tool performs a growing set +of checks to find bugs that occur on a specific path within a program. Examples +of bugs the tool finds include logic errors such as null dereferences, +violations of various API rules, dead code, and potential memory leaks in +Objective-C programs. Since its public announcement at Apple's WWDC 2008 +conference, the public feedback on the tool has been extremely positive, and +conservative estimates put the number of real bugs it has found in +industrial-quality software on the order of thousands.

    + +

    The tool also provides a simple web GUI to inspect potential bugs found by +the tool. While still early in development, the GUI illustrates some of the key +features of Clang: accurate source location information, which is used by the +GUI to highlight specific code expressions that relate to a bug (including those +that span multiple lines) and built-in knowledge of macros, which is used to +perform inline expansion of macros within the GUI itself.

    + +

    The set of checks perform by the static analyzer is gradually expanding, and +future plans for the tool include full source-level inter-procedural analysis +and deeper checks such as buffer overrun detection. There are many opportunities +to extend and enhance the static analyzer, and anyone interested in working on +this project is encouraged to get involved!

    From gohman at apple.com Tue Oct 14 10:14:56 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 14 Oct 2008 15:14:56 -0000 Subject: [llvm-commits] [llvm] r57490 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810141514.m9EFEuSk012950@zion.cs.uiuc.edu> Author: djg Date: Tue Oct 14 10:14:55 2008 New Revision: 57490 URL: http://llvm.org/viewvc/llvm-project?rev=57490&view=rev Log: Add a brief mention of the new free-list management code. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57490&r1=57489&r2=57490&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Oct 14 10:14:55 2008 @@ -432,13 +432,13 @@ build your own tools based on it.
  • LLVM 2.4 includes a number of new generic algorithms and data structures, - include a scoped hash table, 'immutable' data structures, and a - raw_ostream class. The raw_ostream class and + include a scoped hash table, 'immutable' data structures, a simple + free-list manager, and a raw_ostream class. + The raw_ostream class and format allow for efficient file output, and various pieces of LLVM have switched over to use it. The eventual goal is to eliminate std::ostream in favor of it.
  • -
  • Recycler + pool allocation stuff? [DAN]
  • From criswell at uiuc.edu Tue Oct 14 10:34:28 2008 From: criswell at uiuc.edu (John Criswell) Date: Tue, 14 Oct 2008 15:34:28 -0000 Subject: [llvm-commits] [poolalloc] r57493 - /poolalloc/trunk/include/dsa/DataStructure.h Message-ID: <200810141534.m9EFYS2m013627@zion.cs.uiuc.edu> Author: criswell Date: Tue Oct 14 10:34:28 2008 New Revision: 57493 URL: http://llvm.org/viewvc/llvm-project?rev=57493&view=rev Log: Mark CBU as preserving all previous analysis passes, too. It shouldn't be changing anything. Modified: poolalloc/trunk/include/dsa/DataStructure.h Modified: poolalloc/trunk/include/dsa/DataStructure.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DataStructure.h?rev=57493&r1=57492&r2=57493&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/DataStructure.h (original) +++ poolalloc/trunk/include/dsa/DataStructure.h Tue Oct 14 10:34:28 2008 @@ -332,6 +332,7 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); + AU.setPreservesAll(); } }; From alenhar2 at cs.uiuc.edu Tue Oct 14 11:11:33 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 14 Oct 2008 16:11:33 -0000 Subject: [llvm-commits] [poolalloc] r57494 - in /poolalloc/trunk/include/poolalloc_runtime: ./ PoolAllocator.h Support/ Support/SplayTree.h test.ex Message-ID: <200810141611.m9EGBYBG014999@zion.cs.uiuc.edu> Author: alenhar2 Date: Tue Oct 14 11:11:31 2008 New Revision: 57494 URL: http://llvm.org/viewvc/llvm-project?rev=57494&view=rev Log: some common infastructure for safecode runtimes Added: poolalloc/trunk/include/poolalloc_runtime/ poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h poolalloc/trunk/include/poolalloc_runtime/Support/ poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h poolalloc/trunk/include/poolalloc_runtime/test.ex Added: poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h?rev=57494&view=auto ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h (added) +++ poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h Tue Oct 14 11:11:31 2008 @@ -0,0 +1,75 @@ +#include "poolalloc_runtime/Support/SplayTree.h" +#include + +template class SlabManager > +class PoolAllocator : SlabManager { + using SlabManager::slab_alloc; + using SlabManager::slab_free; + using SlabManager::slab_valid; + using SlabManager::slab_getbounds; + public: + PoolAllocator(unsigned objsize, unsigned Alignment) + : SlabManager(objsize, Alignment) + {} + + + //In-place new operator + static void* operator new( std::size_t s, void* p ) throw() { + return p; + } + + //Allocate an object of size objsize + void* alloc() { + return slab_alloc(1); + } + + //Allocate an array with num objects of size objsize + void* alloc_array(unsigned num) { + return slab_alloc(num); + } + + //Free allocated object + void dealloc(void* obj) { + slab_free(obj); + } + + //Tests if obj is in an allocated object + bool isAllocated(void* obj) { + return slab_valid(obj); + } + + // Returns the start and end of an object, return value is true if found + bool getBounds(void* obj, void*& start, void*& end) { + return slab_getbounds(obj, start, end); + } + +}; + +class mmapPageManager { + enum { pageSize = 4096 }; +}; + +template +class MallocSlabManager { + SplayRangeSet objs; + unsigned objsize; + protected: + MallocSlabManager(unsigned Osize, unsigned Alignment) : objsize(Osize) {} + + void* slab_alloc(unsigned num) { + void* x = malloc(num*objsize); + objs.insert(x, (char*)x + num*objsize - 1); + return x; + } + void slab_free(void* obj) { + objs.remove(obj); + free(obj); + } + bool slab_valid(void* obj) { + return objs.find(obj); + } + void* slab_getbounds(void* obj, void*& start, void*& end) { + return objs.find(obj, start, end); + } + +}; Added: poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h?rev=57494&view=auto ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h (added) +++ poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h Tue Oct 14 11:11:31 2008 @@ -0,0 +1,155 @@ + +class SplayRangeSet { + struct tree_node { + tree_node* left; + tree_node* right; + void* start; + void* end; + }; + + tree_node* Tree; + + tree_node* rotate_right(tree_node* p) { + tree_node* x = p->left; + p->left = x->right; + x->right = p; + return x; + } + + tree_node* rotate_left(tree_node* p) { + tree_node* x = p->right; + p->right = x->left; + x->left = p; + return x; + } + + bool key_lt(void* _key, tree_node* _t) { return _key < _t->start; }; + + bool key_gt(void* _key, tree_node* _t) { return _key > _t->end; }; + + /* This function by D. Sleator */ + tree_node* splay (tree_node * t, void* key) { + tree_node N, *l, *r, *y; + if (t == 0) return t; + N.left = N.right = 0; + l = r = &N; + + while(1) { + if (key_lt(key, t)) { + if (t->left == 0) break; + if (key_lt(key, t->left)) { + y = t->left; /* rotate right */ + t->left = y->right; + y->right = t; + t = y; + if (t->left == 0) break; + } + r->left = t; /* link right */ + r = t; + t = t->left; + } else if (key_gt(key, t)) { + if (t->right == 0) break; + if (key_gt(key, t->right)) { + y = t->right; /* rotate left */ + t->right = y->left; + y->left = t; + t = y; + if (t->right == 0) break; + } + l->right = t; /* link left */ + l = t; + t = t->right; + } else { + break; + } + } + l->right = t->left; /* assemble */ + r->left = t->right; + t->left = N.right; + t->right = N.left; + return t; + } + + unsigned count_internal(tree_node* t) { + if (t) + return 1 + count_internal(t->left) + count_internal(t->right); + return 0; + } + + public: + + SplayRangeSet() : Tree(0) {} + ~SplayRangeSet() { clear(); } + + bool insert(void* start, void* end) { + Tree = splay(Tree, start); + //If the key is already in, fail the insert + if (Tree && !key_lt(start, Tree) && !key_gt(start, Tree)) + return false; + + tree_node* n = new tree_node(); + n->start = start; + n->end = end; + n->right = n->left = 0; + if (Tree) { + if (key_lt(start, Tree)) { + n->left = Tree->left; + n->right = Tree; + Tree->left = 0; + } else { + n->right = Tree->right; + n->left = Tree; + Tree->right = 0; + } + } + Tree = n; + } + + bool remove(void* key) { + if (!Tree) return false; + Tree = splay(Tree, key); + if (!key_lt(key, Tree) && !key_gt(key, Tree)) { + tree_node* x = 0; + if (!Tree->left) + x = Tree->right; + else { + x = splay(Tree->left, key); + x->right = Tree->right; + } + tree_node* y = Tree; + Tree = x; + delete y; + return true; + } + return false; /* not there */ + } + + unsigned count() { + return count_internal(Tree); + } + + void clear() { + while (Tree) + remove (Tree->start); + } + + bool find(void* key, void*& start, void*& end) { + if (!Tree) return false; + Tree = splay(Tree, key); + if (!key_lt(key, Tree) && !key_gt(key, Tree)) { + start = Tree->start; + end = Tree->end; + return true; + } + return false; + } + bool find(void* key) { + if (!Tree) return false; + Tree = splay(Tree, key); + if (!key_lt(key, Tree) && !key_gt(key, Tree)) { + return true; + } + return false; + } + +}; Added: poolalloc/trunk/include/poolalloc_runtime/test.ex URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/test.ex?rev=57494&view=auto ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/test.ex (added) +++ poolalloc/trunk/include/poolalloc_runtime/test.ex Tue Oct 14 11:11:31 2008 @@ -0,0 +1,13 @@ +#include "PoolAllocator.h" +#include + +PoolAllocator a(10, 16); + +int main() { + void* x = a.alloc(); + std::cerr << a.isAllocated(x) << " " << a.isAllocated((char*)x + 5) << " " << a.isAllocated((char*)x + 10) << "\n"; + a.dealloc(x); + return 0; +} + + From gohman at apple.com Tue Oct 14 11:13:59 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 14 Oct 2008 16:13:59 -0000 Subject: [llvm-commits] [llvm] r57495 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810141613.m9EGDxtB015106@zion.cs.uiuc.edu> Author: djg Date: Tue Oct 14 11:13:59 2008 New Revision: 57495 URL: http://llvm.org/viewvc/llvm-project?rev=57495&view=rev Log: Fix a typo. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57495&r1=57494&r2=57495&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Oct 14 11:13:59 2008 @@ -274,7 +274,7 @@ easier for front-ends to create debug info descriptors, similar to the way that IRBuilder makes it easier to create LLVM IR. -
  • The IRBuilder class is now parametrized by a class responsible +
  • The IRBuilder class is now parameterized by a class responsible for constant folding. The default ConstantFolder class does target independent constant folding. The NoFolder class does no constant folding at all, which is useful when learning how LLVM works. The TargetFolder class folds the most, From gohman at apple.com Tue Oct 14 11:23:02 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 14 Oct 2008 16:23:02 -0000 Subject: [llvm-commits] [llvm] r57496 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810141623.m9EGN2sr015511@zion.cs.uiuc.edu> Author: djg Date: Tue Oct 14 11:23:02 2008 New Revision: 57496 URL: http://llvm.org/viewvc/llvm-project?rev=57496&view=rev Log: Fix a few close tags. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57496&r1=57495&r2=57496&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Oct 14 11:23:02 2008 @@ -16,12 +16,12 @@
  • What's New in LLVM?
  • Installation Instructions
  • Portability and Supported Platforms
  • -
  • Known Problems +
  • Known Problems
  • Additional Information
  • -

    Written by the LLVM Team

    +

    Written by the LLVM Team

    From gohman at apple.com Tue Oct 14 11:32:04 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 14 Oct 2008 16:32:04 -0000 Subject: [llvm-commits] [llvm] r57497 - /llvm/trunk/docs/LangRef.html Message-ID: <200810141632.m9EGW4R6015957@zion.cs.uiuc.edu> Author: djg Date: Tue Oct 14 11:32:04 2008 New Revision: 57497 URL: http://llvm.org/viewvc/llvm-project?rev=57497&view=rev Log: Add a missing close-tag. Modified: llvm/trunk/docs/LangRef.html Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=57497&r1=57496&r2=57497&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Tue Oct 14 11:32:04 2008 @@ -1156,6 +1156,7 @@ packed structure, vector, opaque. + From baldrick at free.fr Tue Oct 14 11:34:10 2008 From: baldrick at free.fr (Duncan Sands) Date: Tue, 14 Oct 2008 18:34:10 +0200 Subject: [llvm-commits] [llvm] r57495 - /llvm/trunk/docs/ReleaseNotes.html In-Reply-To: <200810141613.m9EGDxtB015106@zion.cs.uiuc.edu> References: <200810141613.m9EGDxtB015106@zion.cs.uiuc.edu> Message-ID: <200810141834.11548.baldrick@free.fr> Hi Dan, > -
  • The IRBuilder class is now parametrized by a class responsible > +
  • The IRBuilder class is now parameterized by a class responsible are you sure parameterized is correct? Ciao, Duncan. From clattner at apple.com Tue Oct 14 11:45:39 2008 From: clattner at apple.com (Chris Lattner) Date: Tue, 14 Oct 2008 09:45:39 -0700 Subject: [llvm-commits] lost llvm commits Message-ID: <03585128-44AB-4170-9161-16C407567EC2@apple.com> The mailing list dropped some emails last night, here are the diffs across the gap: llvm: -------------- next part -------------- A non-text attachment was scrubbed... Name: lost-llvm.patches Type: application/octet-stream Size: 12535 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20081014/ee50c31c/attachment.obj -------------- next part -------------- llvm-gcc: -------------- next part -------------- A non-text attachment was scrubbed... Name: lost-llvm-gcc.patches Type: application/octet-stream Size: 897 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20081014/ee50c31c/attachment-0001.obj -------------- next part -------------- The right people at UIUC are investigating the mailing list outage, -Chris From alenhar2 at cs.uiuc.edu Tue Oct 14 11:45:57 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 14 Oct 2008 16:45:57 -0000 Subject: [llvm-commits] [poolalloc] r57498 - in /poolalloc/trunk/include/poolalloc_runtime: PoolAllocator.h Support/SplayTree.h test.ex Message-ID: <200810141645.m9EGjvsb016501@zion.cs.uiuc.edu> Author: alenhar2 Date: Tue Oct 14 11:45:57 2008 New Revision: 57498 URL: http://llvm.org/viewvc/llvm-project?rev=57498&view=rev Log: map and set version of splay Modified: poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h poolalloc/trunk/include/poolalloc_runtime/test.ex Modified: poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h?rev=57498&r1=57497&r2=57498&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h (original) +++ poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h Tue Oct 14 11:45:57 2008 @@ -51,7 +51,7 @@ template class MallocSlabManager { - SplayRangeSet objs; + RangeSplaySet objs; unsigned objsize; protected: MallocSlabManager(unsigned Osize, unsigned Alignment) : objsize(Osize) {} @@ -68,7 +68,7 @@ bool slab_valid(void* obj) { return objs.find(obj); } - void* slab_getbounds(void* obj, void*& start, void*& end) { + bool slab_getbounds(void* obj, void*& start, void*& end) { return objs.find(obj, start, end); } Modified: poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h?rev=57498&r1=57497&r2=57498&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h (original) +++ poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h Tue Oct 14 11:45:57 2008 @@ -1,12 +1,22 @@ +template +struct range_tree_node { + range_tree_node* left; + range_tree_node* right; + void* start; + void* end; + dataTy data; +}; -class SplayRangeSet { - struct tree_node { - tree_node* left; - tree_node* right; - void* start; - void* end; - }; +template<> +struct range_tree_node { + range_tree_node* left; + range_tree_node* right; + void* start; + void* end; +}; +template +class RangeSplayTree { tree_node* Tree; tree_node* rotate_right(tree_node* p) { @@ -76,16 +86,16 @@ return 0; } - public: + protected: - SplayRangeSet() : Tree(0) {} - ~SplayRangeSet() { clear(); } + RangeSplayTree() : Tree(0) {} + ~RangeSplayTree() { __clear(); } - bool insert(void* start, void* end) { + tree_node* __insert(void* start, void* end) { Tree = splay(Tree, start); //If the key is already in, fail the insert if (Tree && !key_lt(start, Tree) && !key_gt(start, Tree)) - return false; + return 0; tree_node* n = new tree_node(); n->start = start; @@ -103,9 +113,10 @@ } } Tree = n; + return Tree; } - bool remove(void* key) { + bool __remove(void* key) { if (!Tree) return false; Tree = splay(Tree, key); if (!key_lt(key, Tree) && !key_gt(key, Tree)) { @@ -124,32 +135,93 @@ return false; /* not there */ } - unsigned count() { + unsigned __count() { return count_internal(Tree); } - void clear() { + void __clear() { while (Tree) - remove (Tree->start); + __remove (Tree->start); } - bool find(void* key, void*& start, void*& end) { + tree_node* __find(void* key) { if (!Tree) return false; Tree = splay(Tree, key); if (!key_lt(key, Tree) && !key_gt(key, Tree)) { - start = Tree->start; - end = Tree->end; - return true; + return Tree; } - return false; + return 0; } - bool find(void* key) { - if (!Tree) return false; - Tree = splay(Tree, key); - if (!key_lt(key, Tree) && !key_gt(key, Tree)) { +}; + +class RangeSplaySet : RangeSplayTree > { + public: + RangeSplaySet() : RangeSplayTree >() {} + + bool insert(void* start, void* end) { + return 0 != __insert(start,end); + } + + bool remove(void* key) { + return __remove(key); + } + + bool count() { return __count(); } + + void clear() { __clear(); } + + bool find(void* key, void*& start, void*& end) { + range_tree_node* t = __find(key); + if (!t) return false; + start = t->start; + end = t->end; + return true; + } + bool find(void* key) { + range_tree_node* t = __find(key); + if (!t) return false; + return true; + } +}; + +template +class RangeSplayMap : RangeSplayTree > { + public: + RangeSplayMap() : RangeSplayTree >() {} + + using RangeSplayTree >::__insert; + using RangeSplayTree >::__remove; + using RangeSplayTree >::__count; + using RangeSplayTree >::__clear; + using RangeSplayTree >::__find; + + + bool insert(void* start, void* end, T& d) { + range_tree_node* t = __insert(start,end); + if (t == 0) return false; + t->data = d; return true; } - return false; - } + bool remove(void* key) { + return __remove(key); + } + + bool count() { return __count(); } + + void clear() { __clear(); } + + bool find(void* key, void*& start, void*& end, T& d) { + range_tree_node* t = __find(key); + if (!t) return false; + start = t->start; + end = t->end; + d = t->data; + return true; + } + bool find(void* key) { + range_tree_node* t = __find(key); + if (!t) return false; + return true; + } }; Modified: poolalloc/trunk/include/poolalloc_runtime/test.ex URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/test.ex?rev=57498&r1=57497&r2=57498&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/test.ex (original) +++ poolalloc/trunk/include/poolalloc_runtime/test.ex Tue Oct 14 11:45:57 2008 @@ -3,6 +3,8 @@ PoolAllocator a(10, 16); +RangeSplayMap x; + int main() { void* x = a.alloc(); std::cerr << a.isAllocated(x) << " " << a.isAllocated((char*)x + 5) << " " << a.isAllocated((char*)x + 10) << "\n"; From gohman at apple.com Tue Oct 14 11:51:45 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 14 Oct 2008 16:51:45 -0000 Subject: [llvm-commits] [llvm] r57500 - /llvm/trunk/docs/LangRef.html Message-ID: <200810141651.m9EGpjSC016706@zion.cs.uiuc.edu> Author: djg Date: Tue Oct 14 11:51:45 2008 New Revision: 57500 URL: http://llvm.org/viewvc/llvm-project?rev=57500&view=rev Log: Fix missing end tags and invalid HTML entity syntax. Modified: llvm/trunk/docs/LangRef.html Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=57500&r1=57499&r2=57500&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Tue Oct 14 11:51:45 2008 @@ -24,7 +24,7 @@
  • Calling Conventions
  • Global Variables
  • Functions
  • -
  • Aliases +
  • Aliases
  • Parameter Attributes
  • Function Attributes
  • Garbage Collector Names
  • @@ -58,16 +58,16 @@
  • Constants
      -
    1. Simple Constants -
    2. Aggregate Constants -
    3. Global Variable and Function Addresses -
    4. Undefined Values -
    5. Constant Expressions +
    6. Simple Constants
    7. +
    8. Aggregate Constants
    9. +
    10. Global Variable and Function Addresses
    11. +
    12. Undefined Values
    13. +
    14. Constant Expressions
  • Other Values
      -
    1. Inline Assembler Expressions +
    2. Inline Assembler Expressions
  • Instruction Reference @@ -143,6 +143,7 @@
  • 'inttoptr .. to' Instruction
  • 'bitcast .. to' Instruction
  • +
  • Other Operations
    1. 'icmp' Instruction
    2. @@ -327,7 +328,7 @@

      LLVM identifiers come in two basic types: global and local. Global identifiers (functions, global variables) begin with the @ character. Local identifiers (register names, types) begin with the % character. Additionally, - there are three different formats for identifiers, for different purposes: + there are three different formats for identifiers, for different purposes:

      1. Named values are represented as a string of characters with their prefix. @@ -571,7 +572,7 @@ to have any linkage type other than "externally visible", dllimport, or extern_weak.

        Aliases can have only external, internal and weak -linkages. +linkages.

        @@ -1077,7 +1078,7 @@
      2. a0:0:1 - aggregates are 8-bit aligned
      3. When LLVM is determining the alignment for a given type, it uses the -following rules: +following rules:

        1. If the type sought is an exact match for one of the specifications, that specification is used.
        2. @@ -1089,8 +1090,8 @@ i65 and i256 will use the alignment of i64 (largest specified).
        3. If no match is found, and the type sought is a vector type, then the largest vector type that is smaller than the sought vector type will be used - as a fall back. This happens because <128 x double> can be implemented in - terms of 64 <2 x double>, for example.
        4. + as a fall back. This happens because <128 x double> can be implemented + in terms of 64 <2 x double>, for example.
        @@ -1800,7 +1801,7 @@
        extractelement ( VAL, IDX )
        Perform the extractelement - operation on constants. + operation on constants.
        insertelement ( VAL, ELT, IDX )
        @@ -1955,7 +1956,7 @@ href="#i_invoke">invoke" instruction, execution continues at the beginning of the "normal" destination block. If the instruction returns a value, that value shall set the call or invoke instruction's -return value. +return value.

        Example:
        @@ -2072,7 +2073,7 @@ "ret" instruction, control flow will return to the "normal" label. If the callee (or any indirect callees) returns with the "unwind" instruction, control is interrupted and -continued at the dynamically nearest "exception" label. +continued at the dynamically nearest "exception" label.

        Arguments:
        @@ -3066,6 +3067,7 @@ 'getelementptr' instruction. The value to insert must have the same type as the value identified by the indices. +

        Semantics:
        @@ -3430,7 +3432,7 @@ ; yields [12 x i8]*:aptr %aptr = getelementptr {i32, [12 x i8]}* %saptr, i64 0, i32 1 ; yields i8*:vptr - %vptr = getelementptr {i32, <2 x i8>}* %svptr, i64 0, i32 1, i32 1 + %vptr = getelementptr {i32, <2 x i8>}* %svptr, i64 0, i32 1, i32 1 ; yields i8*:eptr %eptr = getelementptr [12 x i8]* %aptr, i64 0, i32 1 @@ -3734,7 +3736,7 @@
        Example:
           %X = uitofp i32 257 to float         ; yields float:257.0
        -  %Y = uitofp i8  -1 to double         ; yields double:255.0
        +  %Y = uitofp i8 -1 to double          ; yields double:255.0
         
        @@ -3768,7 +3770,7 @@
        Example:
           %X = sitofp i32 257 to float         ; yields float:257.0
        -  %Y = sitofp i8  -1 to double         ; yields double:-1.0
        +  %Y = sitofp i8 -1 to double          ; yields double:-1.0
         
        @@ -3790,7 +3792,7 @@
        Arguments:

        The 'ptrtoint' instruction takes a value to cast, which must be a pointer value, and a type to cast it to -ty2, which must be an integer type. +ty2, which must be an integer type.

        Semantics:

        The 'ptrtoint' instruction converts value to integer type @@ -3826,7 +3828,7 @@

        Arguments:

        The 'inttoptr' instruction takes an integer value to cast, and a type to cast it to, which must be a -pointer type. +pointer type.

        Semantics:

        The 'inttoptr' instruction converts value to type @@ -3884,7 +3886,7 @@

           %X = bitcast i8 255 to i8              ; yields i8 :-1
           %Y = bitcast i32* %x to sint*          ; yields sint*:%x
        -  %Z = bitcast <2xint> %V to i64;        ; yields i64: %V   
        +  %Z = bitcast <2 x int> %V to i64;      ; yields i64: %V   
         
        @@ -3900,7 +3902,7 @@
        Syntax:
        -
          <result> = icmp <cond> <ty> <op1>, <op2>   ; yields {i1} or {<N x i1>}:result
        +
          <result> = icmp <cond> <ty> <op1>, <op2>   ; yields {i1} or {<N x i1>}:result
         
        Overview:

        The 'icmp' instruction returns a boolean value or @@ -3910,6 +3912,7 @@

        The 'icmp' instruction takes three operands. The first operand is the condition code indicating the kind of comparison to perform. It is not a value, just a keyword. The possible condition code are: +

        1. eq: equal
        2. ne: not equal
        3. @@ -3930,12 +3933,13 @@

          The 'icmp' compares op1 and op2 according to the condition code given as cond. The comparison performed always yields either an i1 or vector of i1 result, as follows: +

          1. eq: yields true if the operands are equal, false otherwise. No sign interpretation is necessary or performed.
          2. ne: yields true if the operands are unequal, - false otherwise. No sign interpretation is necessary or performed. + false otherwise. No sign interpretation is necessary or performed.
          3. ugt: interprets the operands as unsigned values and yields true if op1 is greater than op2.
          4. uge: interprets the operands as unsigned values and yields @@ -3976,12 +3980,12 @@
        Syntax:
        -
          <result> = fcmp <cond> <ty> <op1>, <op2>     ; yields {i1} or {<N x i1>}:result
        +
          <result> = fcmp <cond> <ty> <op1>, <op2>     ; yields {i1} or {<N x i1>}:result
         
        Overview:

        The 'fcmp' instruction returns a boolean value or vector of boolean values based on comparison -of its operands. +of its operands.

        If the operands are floating point scalars, then the result type is a boolean (i1). @@ -3992,7 +3996,7 @@

        Arguments:

        The 'fcmp' instruction takes three operands. The first operand is the condition code indicating the kind of comparison to perform. It is not -a value, just a keyword. The possible condition code are: +a value, just a keyword. The possible condition code are:

        1. false: no comparison, always returns false
        2. oeq: ordered and equal
        3. @@ -4023,7 +4027,7 @@ If the operands are vectors, then the vectors are compared element by element. Each comparison performed -always yields an i1 result, as follows: +always yields an i1 result, as follows:

          1. false: always yields false, regardless of operands.
          2. oeq: yields true if both operands are not a QNAN and @@ -4077,7 +4081,7 @@
            Arguments:

            The 'vicmp' instruction takes three operands. The first operand is the condition code indicating the kind of comparison to perform. It is not -a value, just a keyword. The possible condition code are: +a value, just a keyword. The possible condition code are:

            1. eq: equal
            2. ne: not equal
            3. @@ -4100,7 +4104,7 @@ element is 1 if the element-wise comparison evaluates to true, and is 0 otherwise. All other bits of the result are undefined. The condition codes are evaluated identically to the 'icmp' -instruction. +instruction.

              Example:
              @@ -4123,7 +4127,7 @@
               
              Arguments:

              The 'vfcmp' instruction takes three operands. The first operand is the condition code indicating the kind of comparison to perform. It is not -a value, just a keyword. The possible condition code are: +a value, just a keyword. The possible condition code are:

              1. false: no comparison, always returns false
              2. oeq: ordered and equal
              3. @@ -4154,7 +4158,7 @@ significant bit in each element is 1 if the element-wise comparison evaluates to true, and is 0 otherwise. All other bits of the result are undefined. The condition codes are evaluated identically to the -'fcmp' instruction. +'fcmp' instruction.

                Example:
                @@ -4219,7 +4223,7 @@
                 
                   <result> = select selty <cond>, <ty> <val1>, <ty> <val2>             ; yields ty
                 
                -  selty is either i1 or {<N x i1>}
                +  selty is either i1 or {<N x i1>}
                 
                Overview:
                @@ -4287,12 +4291,12 @@ any allocas or varargs in the caller. If the "tail" marker is present, the function call is eligible for tail call optimization. Note that calls may be marked "tail" even if they do not occur before a ret instruction. + href="#i_ret">ret instruction.

              4. The optional "cconv" marker indicates which calling convention the call should use. If none is specified, the call defaults - to using C calling conventions. + to using C calling conventions.

              5. @@ -4339,7 +4343,7 @@ the specified values. Upon a 'ret' instruction in the called function, control flow continues with the instruction after the function call, and the return value of the -function is bound to the result argument. +function is bound to the result argument.

                Example:
                @@ -4519,17 +4523,17 @@
                Syntax:
                  declare void %llvm.va_start(i8* <arglist>)
                Overview:
                -

                The 'llvm.va_start' intrinsic initializes +

                The 'llvm.va_start' intrinsic initializes *<arglist> for subsequent use by va_arg.

                Arguments:
                -

                The argument is a pointer to a va_list element to initialize.

                +

                The argument is a pointer to a va_list element to initialize.

                Semantics:
                -

                The 'llvm.va_start' intrinsic works just like the va_start +

                The 'llvm.va_start' intrinsic works just like the va_start macro available in C. In a target-dependent way, it initializes the va_list element to which the argument points, so that the next call to va_arg will produce the first variable argument passed to the function. @@ -5209,7 +5213,7 @@

                Syntax:

                This is an overloaded intrinsic. You can use llvm.sqrt on any floating point or vector of floating point type. Not all targets support all -types however. +types however.

                   declare float     @llvm.sqrt.f32(float %Val)
                   declare double    @llvm.sqrt.f64(double %Val)
                @@ -5253,7 +5257,7 @@
                 
                Syntax:

                This is an overloaded intrinsic. You can use llvm.powi on any floating point or vector of floating point type. Not all targets support all -types however. +types however.

                   declare float     @llvm.powi.f32(float  %Val, i32 %power)
                   declare double    @llvm.powi.f64(double %Val, i32 %power)
                @@ -5295,7 +5299,7 @@
                 
                Syntax:

                This is an overloaded intrinsic. You can use llvm.sin on any floating point or vector of floating point type. Not all targets support all -types however. +types however.

                   declare float     @llvm.sin.f32(float  %Val)
                   declare double    @llvm.sin.f64(double %Val)
                @@ -5334,7 +5338,7 @@
                 
                Syntax:

                This is an overloaded intrinsic. You can use llvm.cos on any floating point or vector of floating point type. Not all targets support all -types however. +types however.

                   declare float     @llvm.cos.f32(float  %Val)
                   declare double    @llvm.cos.f64(double %Val)
                @@ -5373,7 +5377,7 @@
                 
                Syntax:

                This is an overloaded intrinsic. You can use llvm.pow on any floating point or vector of floating point type. Not all targets support all -types however. +types however.

                   declare float     @llvm.pow.f32(float  %Val, float %Power)
                   declare double    @llvm.pow.f64(double %Val, double %Power)
                @@ -5428,7 +5432,7 @@
                 
                 
                Syntax:

                This is an overloaded intrinsic function. You can use bswap on any integer -type that is an even number of bytes (i.e. BitWidth % 16 == 0). +type that is an even number of bytes (i.e. BitWidth % 16 == 0).

                   declare i16 @llvm.bswap.i16(i16 <id>)
                   declare i32 @llvm.bswap.i32(i32 <id>)
                @@ -5467,7 +5471,7 @@
                 
                 
                Syntax:

                This is an overloaded intrinsic. You can use llvm.ctpop on any integer bit -width. Not all targets support all bit widths however. +width. Not all targets support all bit widths however.

                   declare i8 @llvm.ctpop.i8 (i8  <src>)
                   declare i16 @llvm.ctpop.i16(i16 <src>)
                @@ -5506,7 +5510,7 @@
                 
                 
                Syntax:

                This is an overloaded intrinsic. You can use llvm.ctlz on any -integer bit width. Not all targets support all bit widths however. +integer bit width. Not all targets support all bit widths however.

                   declare i8 @llvm.ctlz.i8 (i8  <src>)
                   declare i16 @llvm.ctlz.i16(i16 <src>)
                @@ -5549,7 +5553,7 @@
                 
                 
                Syntax:

                This is an overloaded intrinsic. You can use llvm.cttz on any -integer bit width. Not all targets support all bit widths however. +integer bit width. Not all targets support all bit widths however.

                   declare i8 @llvm.cttz.i8 (i8  <src>)
                   declare i16 @llvm.cttz.i16(i16 <src>)
                @@ -5590,7 +5594,7 @@
                 
                 
                Syntax:

                This is an overloaded intrinsic. You can use llvm.part.select -on any integer bit width. +on any integer bit width.

                   declare i17 @llvm.part.select.i17 (i17 %val, i32 %loBit, i32 %hiBit)
                   declare i29 @llvm.part.select.i29 (i29 %val, i32 %loBit, i32 %hiBit)
                @@ -5620,7 +5624,7 @@
                   
              6. The %loBits value is subtracted from the %hiBits value to determine the number of bits to retain.
              7. A mask of the retained bits is created by shifting a -1 value.
              8. -
              9. The mask is ANDed with %val to produce the result. +
              10. The mask is ANDed with %val to produce the result.

              In reverse mode, a similar computation is made except that the bits are returned in the reverse order. So, for example, if X has the value @@ -5637,7 +5641,7 @@

              Syntax:

              This is an overloaded intrinsic. You can use llvm.part.set -on any integer bit width. +on any integer bit width.

                 declare i17 @llvm.part.set.i17.i9 (i17 %val, i9 %repl, i32 %lo, i32 %hi)
                 declare i29 @llvm.part.set.i29.i9 (i29 %val, i9 %repl, i32 %lo, i32 %hi)
              @@ -5666,10 +5670,10 @@
               

              In forward mode, the bits between %lo and %hi (inclusive) are replaced with corresponding bits from %repl. That is the 0th bit in %repl replaces the %loth bit in %val and etc. up -to the %hith bit. +to the %hith bit.

              In reverse mode, a similar computation is made except that the bits are reversed. That is, the 0th bit in %repl replaces the -%hi bit in %val and etc. down to the %loth bit. +%hi bit in %val and etc. down to the %loth bit.

              Examples:
                 llvm.part.set(0xFFFF, 0, 4, 7) -> 0xFF0F
              @@ -5836,7 +5840,7 @@
                   
            4. ls: load-store barrier
            5. sl: store-load barrier
            6. ss: store-store barrier
            7. -
            8. device: barrier applies to device and uncached memory also. +
            9. device: barrier applies to device and uncached memory also.
            10. Semantics:

              @@ -6360,6 +6364,7 @@ with arbitrary strings. This can be useful for special purpose optimizations that want to look for these annotations. These have no other defined use, they are ignored by code generation and optimization. +

        From gohman at apple.com Tue Oct 14 12:00:39 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 14 Oct 2008 17:00:39 -0000 Subject: [llvm-commits] [llvm] r57503 - in /llvm/trunk/docs: CodeGenerator.html TableGenFundamentals.html UsingLibraries.html WritingAnLLVMPass.html Message-ID: <200810141700.m9EH0dEd017043@zion.cs.uiuc.edu> Author: djg Date: Tue Oct 14 12:00:38 2008 New Revision: 57503 URL: http://llvm.org/viewvc/llvm-project?rev=57503&view=rev Log: HTML syntax fixes. Modified: llvm/trunk/docs/CodeGenerator.html llvm/trunk/docs/TableGenFundamentals.html llvm/trunk/docs/UsingLibraries.html llvm/trunk/docs/WritingAnLLVMPass.html Modified: llvm/trunk/docs/CodeGenerator.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CodeGenerator.html?rev=57503&r1=57502&r2=57503&view=diff ============================================================================== --- llvm/trunk/docs/CodeGenerator.html (original) +++ llvm/trunk/docs/CodeGenerator.html Tue Oct 14 12:00:38 2008 @@ -1255,7 +1255,7 @@ are in physical registers, so the physical register is assumed to be killed by the end of the basic block. Live intervals for virtual registers are computed for some ordering of the machine instructions [1, N]. A live interval -is an interval [i, j), where 1 <= i <= j < N, for which a +is an interval [i, j), where 1 <= i <= j < N, for which a variable is live.

        More to come...

        Modified: llvm/trunk/docs/TableGenFundamentals.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/TableGenFundamentals.html?rev=57503&r1=57502&r2=57503&view=diff ============================================================================== --- llvm/trunk/docs/TableGenFundamentals.html (original) +++ llvm/trunk/docs/TableGenFundamentals.html Tue Oct 14 12:00:38 2008 @@ -707,12 +707,12 @@ let Defs = [EAX, ECX, EDX, FP0, FP1, FP2, FP3, FP4, FP5, FP6, ST0, MM0, MM1, MM2, MM3, MM4, MM5, MM6, MM7, XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, EFLAGS] in { - def CALLpcrel32 : Ii32<0xE8, RawFrm, (outs), (ins i32imm:$dst,variable_ops), - "call\t${dst:call}", []>; - def CALL32r : I<0xFF, MRM2r, (outs), (ins GR32:$dst, variable_ops), - "call\t{*}$dst", [(X86call GR32:$dst)]>; - def CALL32m : I<0xFF, MRM2m, (outs), (ins i32mem:$dst, variable_ops), - "call\t{*}$dst", []>; + def CALLpcrel32 : Ii32<0xE8, RawFrm, (outs), (ins i32imm:$dst,variable_ops), + "call\t${dst:call}", []>; + def CALL32r : I<0xFF, MRM2r, (outs), (ins GR32:$dst, variable_ops), + "call\t{*}$dst", [(X86call GR32:$dst)]>; + def CALL32m : I<0xFF, MRM2m, (outs), (ins i32mem:$dst, variable_ops), + "call\t{*}$dst", []>; } Modified: llvm/trunk/docs/UsingLibraries.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/UsingLibraries.html?rev=57503&r1=57502&r2=57503&view=diff ============================================================================== --- llvm/trunk/docs/UsingLibraries.html (original) +++ llvm/trunk/docs/UsingLibraries.html Tue Oct 14 12:00:38 2008 @@ -199,33 +199,33 @@ textual form. The information is the same as shown on the graphs but arranged alphabetically.

        -
        libLLVMAnalysis.a
          +
          libLLVMAnalysis.a
          • libLLVMCore.a
          • libLLVMSupport.a
          • libLLVMSystem.a
          • libLLVMTarget.a
          -
          libLLVMArchive.a
            +
            libLLVMArchive.a
            • libLLVMBCReader.a
            • libLLVMCore.a
            • libLLVMSupport.a
            • libLLVMSystem.a
            -
            libLLVMAsmParser.a
              +
              libLLVMAsmParser.a
              • libLLVMCore.a
              • libLLVMSystem.a
              -
              libLLVMBCReader.a
                +
                libLLVMBCReader.a
                • libLLVMCore.a
                • libLLVMSupport.a
                • libLLVMSystem.a
                -
                libLLVMBCWriter.a
                  +
                  libLLVMBCWriter.a
                  • libLLVMCore.a
                  • libLLVMSupport.a
                  • libLLVMSystem.a
                  -
                  libLLVMCodeGen.a
                    +
                    libLLVMCodeGen.a
                    • libLLVMAnalysis.a
                    • libLLVMCore.a
                    • libLLVMScalarOpts.a
                    • @@ -234,30 +234,30 @@
                    • libLLVMTarget.a
                    • libLLVMTransformUtils.a
                    -
                    libLLVMCore.a
                      +
                      libLLVMCore.a
                      • libLLVMSupport.a
                      • libLLVMSystem.a
                      -
                      libLLVMDebugger.a
                        +
                        libLLVMDebugger.a
                        • libLLVMBCReader.a
                        • libLLVMCore.a
                        • libLLVMSupport.a
                        • libLLVMSystem.a
                        -
                        libLLVMInstrumentation.a
                          +
                          libLLVMInstrumentation.a
                          • libLLVMCore.a
                          • libLLVMScalarOpts.a
                          • libLLVMSupport.a
                          • libLLVMTransformUtils.a
                          -
                          libLLVMLinker.a
                            +
                            libLLVMLinker.a
                            • libLLVMArchive.a
                            • libLLVMBCReader.a
                            • libLLVMCore.a
                            • libLLVMSupport.a
                            • libLLVMSystem.a
                            -
                            libLLVMScalarOpts.a
                              +
                              libLLVMScalarOpts.a
                              • libLLVMAnalysis.a
                              • libLLVMCore.a
                              • libLLVMSupport.a
                              • @@ -265,7 +265,7 @@
                              • libLLVMTarget.a
                              • libLLVMTransformUtils.a
                              -
                              libLLVMSelectionDAG.a
                                +
                                libLLVMSelectionDAG.a
                                • libLLVMAnalysis.a
                                • libLLVMCodeGen.a
                                • libLLVMCore.a
                                • @@ -274,18 +274,18 @@
                                • libLLVMTarget.a
                                • libLLVMTransformUtils.a
                                -
                                libLLVMSupport.a
                                  +
                                  libLLVMSupport.a
                                  • libLLVMSystem.a
                                  • libLLVMbzip2.a
                                  -
                                  libLLVMSystem.a
                                    +
                                    libLLVMSystem.a
                                    -
                                    libLLVMTarget.a
                                      +
                                      libLLVMTarget.a
                                      • libLLVMCore.a
                                      • libLLVMSupport.a
                                      • libLLVMSystem.a
                                      -
                                      libLLVMTransformUtils.a
                                        +
                                        libLLVMTransformUtils.a
                                        • libLLVMAnalysis.a
                                        • libLLVMCore.a
                                        • libLLVMSupport.a
                                        • @@ -293,15 +293,15 @@
                                        • libLLVMTarget.a
                                        • libLLVMipa.a
                                        -
                                        libLLVMbzip2.a
                                          +
                                          libLLVMbzip2.a
                                          -
                                          libLLVMipa.a
                                            +
                                            libLLVMipa.a
                                            • libLLVMAnalysis.a
                                            • libLLVMCore.a
                                            • libLLVMSupport.a
                                            • libLLVMSystem.a
                                            -
                                            libLLVMipo.a
                                              +
                                              libLLVMipo.a
                                              • libLLVMAnalysis.a
                                              • libLLVMCore.a
                                              • libLLVMSupport.a
                                              • @@ -310,7 +310,7 @@
                                              • libLLVMTransformUtils.a
                                              • libLLVMipa.a
                                              -
                                              libLLVMlto.a
                                                +
                                                libLLVMlto.a
                                                • libLLVMAnalysis.a
                                                • libLLVMBCReader.a
                                                • libLLVMBCWriter.a
                                                • @@ -323,7 +323,7 @@
                                                • libLLVMipa.a
                                                • libLLVMipo.a
                                                -
                                                LLVMARM.o
                                                  +
                                                  LLVMARM.o
                                                  • libLLVMCodeGen.a
                                                  • libLLVMCore.a
                                                  • libLLVMSelectionDAG.a
                                                  • @@ -331,7 +331,7 @@
                                                  • libLLVMSystem.a
                                                  • libLLVMTarget.a
                                                  -
                                                  LLVMAlpha.o
                                                    +
                                                    LLVMAlpha.o
                                                    • libLLVMCodeGen.a
                                                    • libLLVMCore.a
                                                    • libLLVMSelectionDAG.a
                                                    • @@ -339,7 +339,7 @@
                                                    • libLLVMSystem.a
                                                    • libLLVMTarget.a
                                                    -
                                                    LLVMCBackend.o
                                                      +
                                                      LLVMCBackend.o
                                                      • libLLVMAnalysis.a
                                                      • libLLVMCodeGen.a
                                                      • libLLVMCore.a
                                                      • @@ -350,13 +350,13 @@
                                                      • libLLVMTransformUtils.a
                                                      • libLLVMipa.a
                                                      -
                                                      LLVMExecutionEngine.o
                                                        +
                                                        LLVMExecutionEngine.o
                                                        • libLLVMCore.a
                                                        • libLLVMSupport.a
                                                        • libLLVMSystem.a
                                                        • libLLVMTarget.a
                                                        -
                                                        LLVMIA64.o
                                                          +
                                                          LLVMIA64.o
                                                          • libLLVMCodeGen.a
                                                          • libLLVMCore.a
                                                          • libLLVMSelectionDAG.a
                                                          • @@ -364,7 +364,7 @@
                                                          • libLLVMSystem.a
                                                          • libLLVMTarget.a
                                                          -
                                                          LLVMInterpreter.o
                                                            +
                                                            LLVMInterpreter.o
                                                            • LLVMExecutionEngine.o
                                                            • libLLVMCodeGen.a
                                                            • libLLVMCore.a
                                                            • @@ -372,14 +372,14 @@
                                                            • libLLVMSystem.a
                                                            • libLLVMTarget.a
                                                            -
                                                            LLVMJIT.o
                                                              +
                                                              LLVMJIT.o
                                                              • LLVMExecutionEngine.o
                                                              • libLLVMCore.a
                                                              • libLLVMSupport.a
                                                              • libLLVMSystem.a
                                                              • libLLVMTarget.a
                                                              -
                                                              LLVMPowerPC.o
                                                                +
                                                                LLVMPowerPC.o
                                                                • libLLVMCodeGen.a
                                                                • libLLVMCore.a
                                                                • libLLVMSelectionDAG.a
                                                                • @@ -387,7 +387,7 @@
                                                                • libLLVMSystem.a
                                                                • libLLVMTarget.a
                                                                -
                                                                LLVMSparc.o
                                                                  +
                                                                  LLVMSparc.o
                                                                  • libLLVMCodeGen.a
                                                                  • libLLVMCore.a
                                                                  • libLLVMSelectionDAG.a
                                                                  • @@ -395,7 +395,7 @@
                                                                  • libLLVMSystem.a
                                                                  • libLLVMTarget.a
                                                                  -
                                                                  LLVMX86.o
                                                                    +
                                                                    LLVMX86.o
                                                                    • libLLVMCodeGen.a
                                                                    • libLLVMCore.a
                                                                    • libLLVMSelectionDAG.a
                                                                    • Modified: llvm/trunk/docs/WritingAnLLVMPass.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/WritingAnLLVMPass.html?rev=57503&r1=57502&r2=57503&view=diff ============================================================================== --- llvm/trunk/docs/WritingAnLLVMPass.html (original) +++ llvm/trunk/docs/WritingAnLLVMPass.html Tue Oct 14 12:00:38 2008 @@ -1662,7 +1662,7 @@
                                                                         cl::opt<RegisterMyPasses::FunctionPassCtor, false,
                                                                      -          RegisterPassParser<RegisterMyPasses> >
                                                                      +          RegisterPassParser<RegisterMyPasses> >
                                                                         MyPassOpt("mypass",
                                                                                   cl::init(&createDefaultMyPass),
                                                                                   cl::desc("my pass option help")); 
                                                                      
                                                                      
                                                                      
                                                                      
                                                                      From andrewl at lenharth.org  Tue Oct 14 12:05:45 2008
                                                                      From: andrewl at lenharth.org (Andrew Lenharth)
                                                                      Date: Tue, 14 Oct 2008 12:05:45 -0500
                                                                      Subject: [llvm-commits] [poolalloc] r57469 -
                                                                      	/poolalloc/trunk/include/dsa/DataStructure.h
                                                                      In-Reply-To: <200810132201.m9DM13uA031472@zion.cs.uiuc.edu>
                                                                      References: <200810132201.m9DM13uA031472@zion.cs.uiuc.edu>
                                                                      Message-ID: <85dfcd7f0810141005s5f5d18e5sde808613ea497672@mail.gmail.com>
                                                                      
                                                                      only local and TD preserves all.  the others invalidate the previous result.
                                                                      
                                                                      On Mon, Oct 13, 2008 at 5:01 PM, John Criswell  wrote:
                                                                      > Author: criswell
                                                                      > Date: Mon Oct 13 17:01:01 2008
                                                                      > New Revision: 57469
                                                                      >
                                                                      > URL: http://llvm.org/viewvc/llvm-project?rev=57469&view=rev
                                                                      > Log:
                                                                      > All DSA passes preserve all other analysis pass results.
                                                                      >
                                                                      > Modified:
                                                                      >    poolalloc/trunk/include/dsa/DataStructure.h
                                                                      >
                                                                      > Modified: poolalloc/trunk/include/dsa/DataStructure.h
                                                                      > URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DataStructure.h?rev=57469&r1=57468&r2=57469&view=diff
                                                                      >
                                                                      > ==============================================================================
                                                                      > --- poolalloc/trunk/include/dsa/DataStructure.h (original)
                                                                      > +++ poolalloc/trunk/include/dsa/DataStructure.h Mon Oct 13 17:01:01 2008
                                                                      > @@ -184,6 +184,7 @@
                                                                      >   ///
                                                                      >   virtual void getAnalysisUsage(AnalysisUsage &AU) const {
                                                                      >     AU.addRequired();
                                                                      > +    AU.setPreservesAll();
                                                                      >   }
                                                                      >  };
                                                                      >
                                                                      > @@ -202,6 +203,7 @@
                                                                      >   ///
                                                                      >   virtual void getAnalysisUsage(AnalysisUsage &AU) const {
                                                                      >     AU.addRequired();
                                                                      > +    AU.setPreservesAll();
                                                                      >   }
                                                                      >  };
                                                                      >
                                                                      > @@ -234,6 +236,7 @@
                                                                      >
                                                                      >   virtual void getAnalysisUsage(AnalysisUsage &AU) const {
                                                                      >     AU.addRequired();
                                                                      > +    AU.setPreservesAll();
                                                                      >   }
                                                                      >
                                                                      >  protected:
                                                                      > @@ -299,6 +302,7 @@
                                                                      >   ///
                                                                      >   virtual void getAnalysisUsage(AnalysisUsage &AU) const {
                                                                      >     AU.addRequired();
                                                                      > +    AU.setPreservesAll();
                                                                      >   }
                                                                      >
                                                                      >  private:
                                                                      >
                                                                      >
                                                                      > _______________________________________________
                                                                      > llvm-commits mailing list
                                                                      > llvm-commits at cs.uiuc.edu
                                                                      > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
                                                                      >
                                                                      
                                                                      
                                                                      From gohman at apple.com  Tue Oct 14 12:06:45 2008
                                                                      From: gohman at apple.com (Dan Gohman)
                                                                      Date: Tue, 14 Oct 2008 17:06:45 -0000
                                                                      Subject: [llvm-commits] [llvm] r57505 - /llvm/trunk/docs/ReleaseNotes.html
                                                                      Message-ID: <200810141706.m9EH6jFC017341@zion.cs.uiuc.edu>
                                                                      
                                                                      Author: djg
                                                                      Date: Tue Oct 14 12:06:44 2008
                                                                      New Revision: 57505
                                                                      
                                                                      URL: http://llvm.org/viewvc/llvm-project?rev=57505&view=rev
                                                                      Log:
                                                                      Mention a few methods in ConstantSDNode that were renamed.
                                                                      
                                                                      Modified:
                                                                          llvm/trunk/docs/ReleaseNotes.html
                                                                      
                                                                      Modified: llvm/trunk/docs/ReleaseNotes.html
                                                                      URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57505&r1=57504&r2=57505&view=diff
                                                                      
                                                                      ==============================================================================
                                                                      --- llvm/trunk/docs/ReleaseNotes.html (original)
                                                                      +++ llvm/trunk/docs/ReleaseNotes.html Tue Oct 14 12:06:44 2008
                                                                      @@ -492,7 +492,10 @@
                                                                           SDOperand was renamed to SDValue (and the "Val"
                                                                           member was changed to be the getNode() accessor), and the
                                                                           MVT::ValueType enum has been replaced with an "MVT"
                                                                      -    struct.
                                                                      +    struct. The getSignExtended and getValue methods in the
                                                                      +    ConstantSDNode class were renamed to getSExtValue and
                                                                      +    getZExtValue respectively, to be more consistent with
                                                                      +    the ConstantInt class.
                                                                       
                                                                    From criswell at uiuc.edu Tue Oct 14 12:11:52 2008 From: criswell at uiuc.edu (John Criswell) Date: Tue, 14 Oct 2008 17:11:52 -0000 Subject: [llvm-commits] [poolalloc] r57506 - /poolalloc/trunk/include/dsa/DataStructure.h Message-ID: <200810141711.m9EHBq3V017499@zion.cs.uiuc.edu> Author: criswell Date: Tue Oct 14 12:11:52 2008 New Revision: 57506 URL: http://llvm.org/viewvc/llvm-project?rev=57506&view=rev Log: Only the local and Top-Down passes preserve all other analysis passes. Modified: poolalloc/trunk/include/dsa/DataStructure.h Modified: poolalloc/trunk/include/dsa/DataStructure.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DataStructure.h?rev=57506&r1=57505&r2=57506&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/DataStructure.h (original) +++ poolalloc/trunk/include/dsa/DataStructure.h Tue Oct 14 12:11:52 2008 @@ -203,7 +203,6 @@ /// virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); - AU.setPreservesAll(); } }; @@ -236,7 +235,6 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); - AU.setPreservesAll(); } protected: @@ -332,7 +330,6 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); - AU.setPreservesAll(); } }; From evan.cheng at apple.com Tue Oct 14 12:15:11 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 14 Oct 2008 17:15:11 -0000 Subject: [llvm-commits] [llvm] r57507 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/and-fcmp.ll Message-ID: <200810141715.m9EHFBMP017605@zion.cs.uiuc.edu> Author: evancheng Date: Tue Oct 14 12:15:11 2008 New Revision: 57507 URL: http://llvm.org/viewvc/llvm-project?rev=57507&view=rev Log: Optimize anding of two fcmp into a single fcmp if the operands are the same. e.g. uno && ueq -> ueq ord && olt -> olt ord && ueq -> oeq Added: llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=57507&r1=57506&r2=57507&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Tue Oct 14 12:15:11 2008 @@ -3116,10 +3116,35 @@ } } +/// getFCmpCode - Similar to getICmpCode but for FCmpInst. This encodes a fcmp +/// predicate into a three bit mask. It also returns whether it is an ordered +/// predicate by reference. +static unsigned getFCmpCode(FCmpInst::Predicate CC, bool &isOrdered) { + isOrdered = false; + switch (CC) { + case FCmpInst::FCMP_ORD: isOrdered = true; return 0; // 000 + case FCmpInst::FCMP_UNO: return 0; // 000 + case FCmpInst::FCMP_OEQ: isOrdered = true; return 1; // 001 + case FCmpInst::FCMP_UEQ: return 1; // 001 + case FCmpInst::FCMP_OGT: isOrdered = true; return 2; // 010 + case FCmpInst::FCMP_UGT: return 2; // 010 + case FCmpInst::FCMP_OGE: isOrdered = true; return 3; // 011 + case FCmpInst::FCMP_UGE: return 3; // 011 + case FCmpInst::FCMP_OLT: isOrdered = true; return 4; // 100 + case FCmpInst::FCMP_ULT: return 4; // 100 + case FCmpInst::FCMP_OLE: isOrdered = true; return 6; // 110 + case FCmpInst::FCMP_ULE: return 6; // 110 + default: + // Not expecting FCMP_FALSE and FCMP_TRUE; + assert(0 && "Unexpected FCmp predicate!"); + return 0; + } +} + /// getICmpValue - This is the complement of getICmpCode, which turns an /// opcode and two operands into either a constant true or false, or a brand /// new ICmp instruction. The sign is passed in to determine which kind -/// of predicate to use in new icmp instructions. +/// of predicate to use in the new icmp instruction. static Value *getICmpValue(bool sign, unsigned code, Value *LHS, Value *RHS) { switch (code) { default: assert(0 && "Illegal ICmp code!"); @@ -3150,6 +3175,47 @@ } } +/// getFCmpValue - This is the complement of getFCmpCode, which turns an +/// opcode and two operands into either a FCmp instruction. isordered is passed +/// in to determine which kind of predicate to use in the new fcmp instruction. +static Value *getFCmpValue(bool isordered, unsigned code, + Value *LHS, Value *RHS) { + switch (code) { + default: assert(0 && "Illegal ICmp code!"); + case 0: + if (isordered) + return new FCmpInst(FCmpInst::FCMP_ORD, LHS, RHS); + else + return new FCmpInst(FCmpInst::FCMP_UNO, LHS, RHS); + case 1: + if (isordered) + return new FCmpInst(FCmpInst::FCMP_OEQ, LHS, RHS); + else + return new FCmpInst(FCmpInst::FCMP_UEQ, LHS, RHS); + case 2: + if (isordered) + return new FCmpInst(FCmpInst::FCMP_OGT, LHS, RHS); + else + return new FCmpInst(FCmpInst::FCMP_UGT, LHS, RHS); + case 3: + if (isordered) + return new FCmpInst(FCmpInst::FCMP_OGE, LHS, RHS); + else + return new FCmpInst(FCmpInst::FCMP_UGE, LHS, RHS); + case 4: + if (isordered) + return new FCmpInst(FCmpInst::FCMP_OLT, LHS, RHS); + else + return new FCmpInst(FCmpInst::FCMP_ULT, LHS, RHS); + case 5: + if (isordered) + return new FCmpInst(FCmpInst::FCMP_OLE, LHS, RHS); + else + return new FCmpInst(FCmpInst::FCMP_ULE, LHS, RHS); + } +} + + static bool PredicatesFoldable(ICmpInst::Predicate p1, ICmpInst::Predicate p2) { return (ICmpInst::isSignedPredicate(p1) == ICmpInst::isSignedPredicate(p2)) || (ICmpInst::isSignedPredicate(p1) && @@ -3887,11 +3953,12 @@ } } - // (fcmp ord x, c) & (fcmp ord y, c) -> (fcmp ord x, y) + // If and'ing two fcmp, try combine them into one. if (FCmpInst *LHS = dyn_cast(I.getOperand(0))) { if (FCmpInst *RHS = dyn_cast(I.getOperand(1))) { if (LHS->getPredicate() == FCmpInst::FCMP_ORD && - RHS->getPredicate() == FCmpInst::FCMP_ORD) + RHS->getPredicate() == FCmpInst::FCMP_ORD) { + // (fcmp ord x, c) & (fcmp ord y, c) -> (fcmp ord x, y) if (ConstantFP *LHSC = dyn_cast(LHS->getOperand(1))) if (ConstantFP *RHSC = dyn_cast(RHS->getOperand(1))) { // If either of the constants are nans, then the whole thing returns @@ -3901,6 +3968,47 @@ return new FCmpInst(FCmpInst::FCMP_ORD, LHS->getOperand(0), RHS->getOperand(0)); } + } else { + Value *Op0LHS, *Op0RHS, *Op1LHS, *Op1RHS; + FCmpInst::Predicate Op0CC, Op1CC; + if (match(Op0, m_FCmp(Op0CC, m_Value(Op0LHS), m_Value(Op0RHS))) && + match(Op1, m_FCmp(Op1CC, m_Value(Op1LHS), m_Value(Op1RHS)))) { + if (Op0LHS == Op1LHS && Op0RHS == Op1RHS) { + // Simplify (fcmp cc0 x, y) & (fcmp cc1 x, y). + if (Op0CC == Op1CC) + return new FCmpInst((FCmpInst::Predicate)Op0CC, Op0LHS, Op0RHS); + else if (Op0CC == FCmpInst::FCMP_FALSE || + Op1CC == FCmpInst::FCMP_FALSE) + return ReplaceInstUsesWith(I, ConstantInt::getFalse()); + else if (Op0CC == FCmpInst::FCMP_TRUE) + return ReplaceInstUsesWith(I, Op1); + else if (Op1CC == FCmpInst::FCMP_TRUE) + return ReplaceInstUsesWith(I, Op0); + bool Op0Ordered; + bool Op1Ordered; + unsigned Op0Pred = getFCmpCode(Op0CC, Op0Ordered); + unsigned Op1Pred = getFCmpCode(Op1CC, Op1Ordered); + if (Op1Pred == 0) { + std::swap(Op0, Op1); + std::swap(Op0Pred, Op1Pred); + std::swap(Op0Ordered, Op1Ordered); + } + if (Op0Pred == 0) { + // uno && ueq -> uno && (uno || eq) -> ueq + // ord && olt -> ord && (ord && lt) -> olt + if (Op0Ordered == Op1Ordered) + return ReplaceInstUsesWith(I, Op1); + // uno && oeq -> uno && (ord && eq) -> false + // uno && ord -> false + if (!Op0Ordered) + return ReplaceInstUsesWith(I, ConstantInt::getFalse()); + // ord && ueq -> ord && (uno || eq) -> oeq + return cast(getFCmpValue(true, Op1Pred, + Op0LHS, Op0RHS)); + } + } + } + } } } Added: llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll?rev=57507&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll Tue Oct 14 12:15:11 2008 @@ -0,0 +1,26 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep fcmp | count 2 +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep ret | grep 0 + +define zeroext i8 @t1(float %x, float %y) nounwind { + %a = fcmp ueq float %x, %y + %b = fcmp ord float %x, %y + %c = and i1 %a, %b + %retval = zext i1 %c to i8 + ret i8 %retval +} + +define zeroext i8 @t2(float %x, float %y) nounwind { + %a = fcmp olt float %x, %y + %b = fcmp ord float %x, %y + %c = and i1 %a, %b + %retval = zext i1 %c to i8 + ret i8 %retval +} + +define zeroext i8 @t3(float %x, float %y) nounwind { + %a = fcmp oge float %x, %y + %b = fcmp uno float %x, %y + %c = and i1 %a, %b + %retval = zext i1 %c to i8 + ret i8 %retval +} From evan.cheng at apple.com Tue Oct 14 12:15:40 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 14 Oct 2008 17:15:40 -0000 Subject: [llvm-commits] [llvm] r57508 - /llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200810141715.m9EHFe8s017625@zion.cs.uiuc.edu> Author: evancheng Date: Tue Oct 14 12:15:39 2008 New Revision: 57508 URL: http://llvm.org/viewvc/llvm-project?rev=57508&view=rev Log: Fix indentation. Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=57508&r1=57507&r2=57508&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Tue Oct 14 12:15:39 2008 @@ -986,9 +986,9 @@ // Get the new AND mask, this folds to a constant. SDValue NewANDMask = CurDAG->getNode(ISD::SRL, N.getValueType(), - SDValue(C2, 0), SDValue(C1, 0)); + SDValue(C2, 0), SDValue(C1, 0)); SDValue NewAND = CurDAG->getNode(ISD::AND, N.getValueType(), - Shift.getOperand(0), NewANDMask); + Shift.getOperand(0), NewANDMask); SDValue NewSHIFT = CurDAG->getNode(ISD::SHL, N.getValueType(), NewAND, SDValue(C1, 0)); NewANDMask.getNode()->setNodeId(Shift.getNode()->getNodeId()); From criswell at uiuc.edu Tue Oct 14 12:21:25 2008 From: criswell at uiuc.edu (John Criswell) Date: Tue, 14 Oct 2008 17:21:25 -0000 Subject: [llvm-commits] [poolalloc] r57510 - /poolalloc/trunk/lib/DSA/StdLibPass.cpp Message-ID: <200810141721.m9EHLPZ7017972@zion.cs.uiuc.edu> Author: criswell Date: Tue Oct 14 12:21:25 2008 New Revision: 57510 URL: http://llvm.org/viewvc/llvm-project?rev=57510&view=rev Log: Add a NULL entry to the end of the special function table to terminate the table. Added spaces between comment markers and comment text to make reading them easier. Modified: poolalloc/trunk/lib/DSA/StdLibPass.cpp Modified: poolalloc/trunk/lib/DSA/StdLibPass.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/StdLibPass.cpp?rev=57510&r1=57509&r2=57510&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/StdLibPass.cpp (original) +++ poolalloc/trunk/lib/DSA/StdLibPass.cpp Tue Oct 14 12:21:25 2008 @@ -60,7 +60,7 @@ {"fstat", {NRET_YNARGS, NRET_NYARGS, NRET_NARGS, false, false, false}}, {"lstat", {NRET_YNARGS, NRET_NYARGS, NRET_NARGS, false, false, false}}, - //printf not strictly true, %n could cause a write + // printf not strictly true, %n could cause a write {"printf", {NRET_YARGS, NRET_NARGS, NRET_NARGS, false, false, false}}, {"fprintf", {NRET_YARGS, NRET_YNARGS, NRET_NARGS, false, false, false}}, {"sprintf", {NRET_YARGS, NRET_YNARGS, NRET_NARGS, false, false, false}}, @@ -140,16 +140,17 @@ {"fopen", {false, true, true, true, false, false, false, false, false}}, {"getcwd", { true, true, true, true, true, true, false, true, true}}, #endif - //C++ functions, as mangled on linux gcc 4.2 - //operator new(unsigned long) + // C++ functions, as mangled on linux gcc 4.2 + // operator new(unsigned long) {"_Znwm", {NRET_NARGS, YRET_NARGS, YRET_NARGS, false, false, false}}, - //operator new[](unsigned long) + // operator new[](unsigned long) {"_Znam", {NRET_NARGS, YRET_NARGS, YRET_NARGS, false, false, false}}, - //operator delete(void*) + // operator delete(void*) {"_ZdlPv", {NRET_NARGS, NRET_NARGS, NRET_YNARGS, false, false, false}}, - //operator delete[](void*) + // operator delete[](void*) {"_ZdaPv", {NRET_NARGS, NRET_NARGS, NRET_YNARGS, false, false, false}}, - + // Terminate the list of special functions recognized by this pass + {0, {false, false, false, false, false, false}}, }; void StdLibDataStructures::eraseCallsTo(Function* F) { From evan.cheng at apple.com Tue Oct 14 13:13:38 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 14 Oct 2008 18:13:38 -0000 Subject: [llvm-commits] [llvm] r57513 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/and-fcmp.ll Message-ID: <200810141813.m9EIDdlf020102@zion.cs.uiuc.edu> Author: evancheng Date: Tue Oct 14 13:13:38 2008 New Revision: 57513 URL: http://llvm.org/viewvc/llvm-project?rev=57513&view=rev Log: - Somehow I forgot about one / une. - Renumber fcmp predicates to match their icmp counterparts. - Try swapping operands to expose more optimization opportunities. Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=57513&r1=57512&r2=57513&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Tue Oct 14 13:13:38 2008 @@ -3124,14 +3124,16 @@ switch (CC) { case FCmpInst::FCMP_ORD: isOrdered = true; return 0; // 000 case FCmpInst::FCMP_UNO: return 0; // 000 - case FCmpInst::FCMP_OEQ: isOrdered = true; return 1; // 001 - case FCmpInst::FCMP_UEQ: return 1; // 001 - case FCmpInst::FCMP_OGT: isOrdered = true; return 2; // 010 - case FCmpInst::FCMP_UGT: return 2; // 010 + case FCmpInst::FCMP_OGT: isOrdered = true; return 1; // 001 + case FCmpInst::FCMP_UGT: return 1; // 001 + case FCmpInst::FCMP_OEQ: isOrdered = true; return 2; // 010 + case FCmpInst::FCMP_UEQ: return 2; // 010 case FCmpInst::FCMP_OGE: isOrdered = true; return 3; // 011 case FCmpInst::FCMP_UGE: return 3; // 011 case FCmpInst::FCMP_OLT: isOrdered = true; return 4; // 100 case FCmpInst::FCMP_ULT: return 4; // 100 + case FCmpInst::FCMP_ONE: isOrdered = true; return 5; // 101 + case FCmpInst::FCMP_UNE: return 5; // 101 case FCmpInst::FCMP_OLE: isOrdered = true; return 6; // 110 case FCmpInst::FCMP_ULE: return 6; // 110 default: @@ -3181,7 +3183,7 @@ static Value *getFCmpValue(bool isordered, unsigned code, Value *LHS, Value *RHS) { switch (code) { - default: assert(0 && "Illegal ICmp code!"); + default: assert(0 && "Illegal FCmp code!"); case 0: if (isordered) return new FCmpInst(FCmpInst::FCMP_ORD, LHS, RHS); @@ -3189,14 +3191,14 @@ return new FCmpInst(FCmpInst::FCMP_UNO, LHS, RHS); case 1: if (isordered) - return new FCmpInst(FCmpInst::FCMP_OEQ, LHS, RHS); + return new FCmpInst(FCmpInst::FCMP_OGT, LHS, RHS); else - return new FCmpInst(FCmpInst::FCMP_UEQ, LHS, RHS); + return new FCmpInst(FCmpInst::FCMP_UGT, LHS, RHS); case 2: if (isordered) - return new FCmpInst(FCmpInst::FCMP_OGT, LHS, RHS); + return new FCmpInst(FCmpInst::FCMP_OEQ, LHS, RHS); else - return new FCmpInst(FCmpInst::FCMP_UGT, LHS, RHS); + return new FCmpInst(FCmpInst::FCMP_UEQ, LHS, RHS); case 3: if (isordered) return new FCmpInst(FCmpInst::FCMP_OGE, LHS, RHS); @@ -3209,6 +3211,11 @@ return new FCmpInst(FCmpInst::FCMP_ULT, LHS, RHS); case 5: if (isordered) + return new FCmpInst(FCmpInst::FCMP_ONE, LHS, RHS); + else + return new FCmpInst(FCmpInst::FCMP_UNE, LHS, RHS); + case 6: + if (isordered) return new FCmpInst(FCmpInst::FCMP_OLE, LHS, RHS); else return new FCmpInst(FCmpInst::FCMP_ULE, LHS, RHS); @@ -3973,6 +3980,11 @@ FCmpInst::Predicate Op0CC, Op1CC; if (match(Op0, m_FCmp(Op0CC, m_Value(Op0LHS), m_Value(Op0RHS))) && match(Op1, m_FCmp(Op1CC, m_Value(Op1LHS), m_Value(Op1RHS)))) { + if (Op0LHS == Op1RHS && Op0RHS == Op1LHS) { + // Swap RHS operands to match LHS. + Op1CC = FCmpInst::getSwappedPredicate(Op1CC); + std::swap(Op1LHS, Op1RHS); + } if (Op0LHS == Op1LHS && Op0RHS == Op1RHS) { // Simplify (fcmp cc0 x, y) & (fcmp cc1 x, y). if (Op0CC == Op1CC) Modified: llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll?rev=57513&r1=57512&r2=57513&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/and-fcmp.ll Tue Oct 14 13:13:38 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep fcmp | count 2 +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep fcmp | count 3 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep ret | grep 0 define zeroext i8 @t1(float %x, float %y) nounwind { @@ -24,3 +24,11 @@ %retval = zext i1 %c to i8 ret i8 %retval } + +define zeroext i8 @t4(float %x, float %y) nounwind { + %a = fcmp one float %y, %x + %b = fcmp ord float %x, %y + %c = and i1 %a, %b + %retval = zext i1 %c to i8 + ret i8 %retval +} From gohman at apple.com Tue Oct 14 13:40:51 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 14 Oct 2008 11:40:51 -0700 Subject: [llvm-commits] [llvm] r57495 - /llvm/trunk/docs/ReleaseNotes.html In-Reply-To: <200810141834.11548.baldrick@free.fr> References: <200810141613.m9EGDxtB015106@zion.cs.uiuc.edu> <200810141834.11548.baldrick@free.fr> Message-ID: On Oct 14, 2008, at 9:34 AM, Duncan Sands wrote: > Hi Dan, > >> -
                                                                  • The IRBuilder class is now parametrized by a class >> responsible >> +
                                                                  • The IRBuilder class is now parameterized by a class >> responsible > > are you sure parameterized is correct? Yes, though checking a few other dictionaries it appears that some do have "parametrized" as a secondary spelling for "parameterized". Dan From evan.cheng at apple.com Tue Oct 14 13:44:09 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 14 Oct 2008 18:44:09 -0000 Subject: [llvm-commits] [llvm] r57515 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/or-fcmp.ll Message-ID: <200810141844.m9EIiAmU021415@zion.cs.uiuc.edu> Author: evancheng Date: Tue Oct 14 13:44:08 2008 New Revision: 57515 URL: http://llvm.org/viewvc/llvm-project?rev=57515&view=rev Log: Combine (fcmp cc0 x, y) | (fcmp cc1 x, y) into a single fcmp when possible. Added: llvm/trunk/test/Transforms/InstCombine/or-fcmp.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=57515&r1=57514&r2=57515&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Tue Oct 14 13:44:08 2008 @@ -3136,6 +3136,7 @@ case FCmpInst::FCMP_UNE: return 5; // 101 case FCmpInst::FCMP_OLE: isOrdered = true; return 6; // 110 case FCmpInst::FCMP_ULE: return 6; // 110 + // True -> 7 default: // Not expecting FCMP_FALSE and FCMP_TRUE; assert(0 && "Unexpected FCmp predicate!"); @@ -3219,6 +3220,7 @@ return new FCmpInst(FCmpInst::FCMP_OLE, LHS, RHS); else return new FCmpInst(FCmpInst::FCMP_ULE, LHS, RHS); + case 7: return ConstantInt::getTrue(); } } @@ -4555,7 +4557,7 @@ if (FCmpInst *RHS = dyn_cast(I.getOperand(1))) { if (LHS->getPredicate() == FCmpInst::FCMP_UNO && RHS->getPredicate() == FCmpInst::FCMP_UNO && - LHS->getOperand(0)->getType() == RHS->getOperand(0)->getType()) + LHS->getOperand(0)->getType() == RHS->getOperand(0)->getType()) { if (ConstantFP *LHSC = dyn_cast(LHS->getOperand(1))) if (ConstantFP *RHSC = dyn_cast(RHS->getOperand(1))) { // If either of the constants are nans, then the whole thing returns @@ -4568,6 +4570,44 @@ return new FCmpInst(FCmpInst::FCMP_UNO, LHS->getOperand(0), RHS->getOperand(0)); } + } else { + Value *Op0LHS, *Op0RHS, *Op1LHS, *Op1RHS; + FCmpInst::Predicate Op0CC, Op1CC; + if (match(Op0, m_FCmp(Op0CC, m_Value(Op0LHS), m_Value(Op0RHS))) && + match(Op1, m_FCmp(Op1CC, m_Value(Op1LHS), m_Value(Op1RHS)))) { + if (Op0LHS == Op1RHS && Op0RHS == Op1LHS) { + // Swap RHS operands to match LHS. + Op1CC = FCmpInst::getSwappedPredicate(Op1CC); + std::swap(Op1LHS, Op1RHS); + } + if (Op0LHS == Op1LHS && Op0RHS == Op1RHS) { + // Simplify (fcmp cc0 x, y) | (fcmp cc1 x, y). + if (Op0CC == Op1CC) + return new FCmpInst((FCmpInst::Predicate)Op0CC, Op0LHS, Op0RHS); + else if (Op0CC == FCmpInst::FCMP_TRUE || + Op1CC == FCmpInst::FCMP_TRUE) + return ReplaceInstUsesWith(I, ConstantInt::getTrue()); + else if (Op0CC == FCmpInst::FCMP_FALSE) + return ReplaceInstUsesWith(I, Op1); + else if (Op1CC == FCmpInst::FCMP_FALSE) + return ReplaceInstUsesWith(I, Op0); + bool Op0Ordered; + bool Op1Ordered; + unsigned Op0Pred = getFCmpCode(Op0CC, Op0Ordered); + unsigned Op1Pred = getFCmpCode(Op1CC, Op1Ordered); + if (Op0Ordered == Op1Ordered) { + // If both are ordered or unordered, return a new fcmp with + // or'ed predicates. + Value *RV = getFCmpValue(Op0Ordered, Op0Pred|Op1Pred, + Op0LHS, Op0RHS); + if (Instruction *I = dyn_cast(RV)) + return I; + // Otherwise, it's a constant boolean value... + return ReplaceInstUsesWith(I, RV); + } + } + } + } } } Added: llvm/trunk/test/Transforms/InstCombine/or-fcmp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/or-fcmp.ll?rev=57515&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/or-fcmp.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/or-fcmp.ll Tue Oct 14 13:44:08 2008 @@ -0,0 +1,34 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep fcmp | count 3 +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep ret | grep 1 + +define zeroext i8 @t1(float %x, float %y) nounwind { + %a = fcmp ueq float %x, %y ; [#uses=1] + %b = fcmp uno float %x, %y ; [#uses=1] + %c = or i1 %a, %b + %retval = zext i1 %c to i8 + ret i8 %retval +} + +define zeroext i8 @t2(float %x, float %y) nounwind { + %a = fcmp olt float %x, %y ; [#uses=1] + %b = fcmp oeq float %x, %y ; [#uses=1] + %c = or i1 %a, %b + %retval = zext i1 %c to i8 + ret i8 %retval +} + +define zeroext i8 @t3(float %x, float %y) nounwind { + %a = fcmp ult float %x, %y ; [#uses=1] + %b = fcmp uge float %x, %y ; [#uses=1] + %c = or i1 %a, %b + %retval = zext i1 %c to i8 + ret i8 %retval +} + +define zeroext i8 @t4(float %x, float %y) nounwind { + %a = fcmp ult float %x, %y ; [#uses=1] + %b = fcmp ugt float %x, %y ; [#uses=1] + %c = or i1 %a, %b + %retval = zext i1 %c to i8 + ret i8 %retval +} From baldrick at free.fr Tue Oct 14 13:52:05 2008 From: baldrick at free.fr (Duncan Sands) Date: Tue, 14 Oct 2008 20:52:05 +0200 Subject: [llvm-commits] [llvm] r57495 - /llvm/trunk/docs/ReleaseNotes.html In-Reply-To: References: <200810141613.m9EGDxtB015106@zion.cs.uiuc.edu> <200810141834.11548.baldrick@free.fr> Message-ID: <200810142052.05235.baldrick@free.fr> > >> -
                                                                  • The IRBuilder class is now parametrized by a class > >> responsible > >> +
                                                                  • The IRBuilder class is now parameterized by a class > >> responsible > > > > are you sure parameterized is correct? > > Yes, though checking a few other dictionaries it appears that > some do have "parametrized" as a secondary spelling for > "parameterized". I guess "parameterized" is one of those weird American spellings - what will these crazy colonials come up with next! :) Ciao, Duncan. From alenhar2 at cs.uiuc.edu Tue Oct 14 14:19:53 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 14 Oct 2008 19:19:53 -0000 Subject: [llvm-commits] [poolalloc] r57516 - in /poolalloc/trunk: include/poolalloc_runtime/PoolAllocator.h lib/PoolAllocate/PoolAllocate.cpp lib/PoolAllocate/PoolOptimize.cpp Message-ID: <200810141919.m9EJJrOM022554@zion.cs.uiuc.edu> Author: alenhar2 Date: Tue Oct 14 14:19:49 2008 New Revision: 57516 URL: http://llvm.org/viewvc/llvm-project?rev=57516&view=rev Log: silence some gcc warnings Modified: poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp Modified: poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h?rev=57516&r1=57515&r2=57516&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h (original) +++ poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h Tue Oct 14 14:19:49 2008 @@ -13,22 +13,22 @@ {} - //In-place new operator - static void* operator new( std::size_t s, void* p ) throw() { - return p; - } + //In-place new operator + static void* operator new( std::size_t s, void* p ) throw() { + return p; + } - //Allocate an object of size objsize - void* alloc() { - return slab_alloc(1); - } + //Allocate an object of size objsize + void* alloc() { + return slab_alloc(1); + } - //Allocate an array with num objects of size objsize - void* alloc_array(unsigned num) { - return slab_alloc(num); - } + //Allocate an array with num objects of size objsize + void* alloc_array(unsigned num) { + return slab_alloc(num); + } - //Free allocated object + //Free allocated object void dealloc(void* obj) { slab_free(obj); } Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=57516&r1=57515&r2=57516&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Tue Oct 14 14:19:49 2008 @@ -70,7 +70,7 @@ STATISTIC (NumTSPools , "Number of typesafe pools"); STATISTIC (NumPoolFree , "Number of poolfree's elided"); STATISTIC (NumNonprofit, "Number of DSNodes not profitable"); - STATISTIC (NumColocated, "Number of DSNodes colocated"); + // STATISTIC (NumColocated, "Number of DSNodes colocated"); const Type *VoidPtrTy; Modified: poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp?rev=57516&r1=57515&r2=57516&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PoolOptimize.cpp Tue Oct 14 14:19:49 2008 @@ -43,11 +43,12 @@ // Get the Function out of the constant Function * F; ConstantExpr * CE; - if (!(F=dyn_cast(C))) + if (!(F=dyn_cast(C))) { if ((CE = dyn_cast(C)) && (CE->isCast())) F = dyn_cast(CE->getOperand(0)); else assert (0 && "Constant is not a Function of ConstantExpr!"); + } Calls.clear(); for (Value::use_iterator UI = F->use_begin(), E = F->use_end(); UI != E; ++UI) Calls.push_back(cast(*UI)); From nicolas.geoffray at lip6.fr Tue Oct 14 14:23:04 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 14 Oct 2008 19:23:04 -0000 Subject: [llvm-commits] [llvm] r57517 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810141923.m9EJN4BF022680@zion.cs.uiuc.edu> Author: geoffray Date: Tue Oct 14 14:23:04 2008 New Revision: 57517 URL: http://llvm.org/viewvc/llvm-project?rev=57517&view=rev Log: Add VMKit notes. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57517&r1=57516&r2=57517&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Oct 14 14:23:04 2008 @@ -77,7 +77,7 @@ supporting tools) and the llvm-gcc repository. In addition to this code, the LLVM Project includes other sub-projects that are in development. The two which are the most actively developed are the Clang Project and -the vmkit Project. +the VMKit Project.

                                                                    @@ -137,17 +137,35 @@

                                                                    -The vmkit project is an implementation of +The VMKit project is an implementation of a JVM and a CLI Virtual Machines (Microsoft .NET is an implementation of the CLI) using the Just-In-Time compiler of LLVM.

                                                                    -

                                                                    [NICOLAS]

                                                                    +

                                                                    Following LLVM 2.4, VMKit has its first release 0.24 that you can find on +the release page. The release includes +bug fixes, cleanup and new features. The major changes include:

                                                                    +
                                                                      + +
                                                                    • Support for generics in the .Net virtual machine. This was implemented +by Tilmann Scheller during his Google Summer of Code project.

                                                                    • +
                                                                    • Initial support for the Mono class libraries.

                                                                    • +
                                                                    • Support for MacOSX/x86, following LLVM's support for exceptions in +JIT on MacOSX/x86. +

                                                                    • A new vmkit driver: a program to run java or .net applications. The +driver supports llvm command line arguments including the new "-fast" option. +

                                                                    • +
                                                                    • A new memory allocation scheme in the JVM that makes unloading a +class loader very fast.

                                                                    • +
                                                                    • VMKit now follows the LLVM Makefile machinery.

                                                                    • + + +
                                                                    From dpatel at apple.com Tue Oct 14 15:03:46 2008 From: dpatel at apple.com (Devang Patel) Date: Tue, 14 Oct 2008 20:03:46 -0000 Subject: [llvm-commits] [llvm] r57518 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810142003.m9EK3kC4023883@zion.cs.uiuc.edu> Author: dpatel Date: Tue Oct 14 15:03:43 2008 New Revision: 57518 URL: http://llvm.org/viewvc/llvm-project?rev=57518&view=rev Log: Document attributes changes. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57518&r1=57517&r2=57518&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Oct 14 15:03:43 2008 @@ -490,7 +490,23 @@
                                                                      -
                                                                    • Attributes changes [DEVANG]
                                                                    • +
                                                                    • Now, function attributes and return value attributes are managed +sepearately. Interface exported by ParameterAttributes.h header is now +experted by Attributes.h header. The new attributes interface changes are: +
                                                                        +
                                                                      • getParamAttrs method is now replaced by +getParamAttributes, getRetAttributes and +getFnAttributes methods.
                                                                      • +
                                                                      • Return value attributes are stored at index 0. Function attributes are +stored at index ~0U. Parameter attributes are stored at index that matches +parameter number.
                                                                      • +
                                                                      • ParamAttr namespace is now renamed as Attribute.
                                                                      • +
                                                                      • The name of the class that manages reference count of opaque +attributes is changed from PAListPtr to AttrListPtr.
                                                                      • +
                                                                      • ParamAttrsWithIndex is now renamed as AttributeWithIndex. +
                                                                      • +
                                                                      +
                                                                    • The DbgStopPointInst methods getDirectory and getFileName now return Value* instead of strings. These can be From dalej at apple.com Tue Oct 14 15:18:54 2008 From: dalej at apple.com (Dale Johannesen) Date: Tue, 14 Oct 2008 20:18:54 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57519 - /llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/builtins-47.c Message-ID: <200810142018.m9EKIvxk024427@zion.cs.uiuc.edu> Author: johannes Date: Tue Oct 14 15:18:43 2008 New Revision: 57519 URL: http://llvm.org/viewvc/llvm-project?rev=57519&view=rev Log: One more test irrelevant to llvm. Modified: llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/builtins-47.c Modified: llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/builtins-47.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/builtins-47.c?rev=57519&r1=57518&r2=57519&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/builtins-47.c (original) +++ llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/builtins-47.c Tue Oct 14 15:18:43 2008 @@ -1,5 +1,7 @@ /* { dg-do run } */ /* { dg-options "-ffast-math -fdump-tree-gimple" } */ +/* LLVM LOCAL no dumps available */ +/* { dg-require-fdump "" } */ extern double sqrt (double); extern double pow (double, double); From gohman at apple.com Tue Oct 14 15:25:08 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 14 Oct 2008 20:25:08 -0000 Subject: [llvm-commits] [llvm] r57521 - in /llvm/trunk: lib/CodeGen/ lib/CodeGen/SelectionDAG/ lib/Support/ lib/Target/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/CBackend/ lib/Target/CellSPU/ lib/Target/CppBackend/ lib/Target/IA64/ lib/Target/MSIL/ lib/Target/Mips/ lib/Target/PIC16/ lib/Target/PowerPC/ lib/Target/Sparc/ lib/Target/X86/ tools/llc/ Message-ID: <200810142025.m9EKP9Uk024703@zion.cs.uiuc.edu> Author: djg Date: Tue Oct 14 15:25:08 2008 New Revision: 57521 URL: http://llvm.org/viewvc/llvm-project?rev=57521&view=rev Log: Fix command-line option printing to print two spaces where needed, instead of requiring all "short description" strings to begin with two spaces. This makes these strings less mysterious, and it fixes some cases where short description strings mistakenly did not begin with two spaces. Modified: llvm/trunk/lib/CodeGen/RegAllocBigBlock.cpp llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp llvm/trunk/lib/CodeGen/RegAllocLocal.cpp llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp llvm/trunk/lib/CodeGen/RegAllocSimple.cpp llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/trunk/lib/CodeGen/VirtRegMap.cpp llvm/trunk/lib/Support/CommandLine.cpp llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp llvm/trunk/lib/Target/CBackend/CBackend.cpp llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp llvm/trunk/lib/Target/IA64/IA64TargetMachine.cpp llvm/trunk/lib/Target/MSIL/MSILWriter.cpp llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp llvm/trunk/lib/Target/PIC16/PIC16TargetMachine.cpp llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp llvm/trunk/lib/Target/TargetMachine.cpp llvm/trunk/lib/Target/X86/X86Subtarget.cpp llvm/trunk/lib/Target/X86/X86TargetMachine.cpp llvm/trunk/tools/llc/llc.cpp Modified: llvm/trunk/lib/CodeGen/RegAllocBigBlock.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocBigBlock.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocBigBlock.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocBigBlock.cpp Tue Oct 14 15:25:08 2008 @@ -53,7 +53,7 @@ STATISTIC(NumFolded, "Number of loads/stores folded into instructions"); static RegisterRegAlloc - bigBlockRegAlloc("bigblock", " Big-block register allocator", + bigBlockRegAlloc("bigblock", "Big-block register allocator", createBigBlockRegisterAllocator); namespace { Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Tue Oct 14 15:25:08 2008 @@ -50,7 +50,7 @@ cl::init(false), cl::Hidden); static RegisterRegAlloc -linearscanRegAlloc("linearscan", " linear scan register allocator", +linearscanRegAlloc("linearscan", "linear scan register allocator", createLinearScanRegisterAllocator); namespace { Modified: llvm/trunk/lib/CodeGen/RegAllocLocal.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLocal.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocLocal.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocLocal.cpp Tue Oct 14 15:25:08 2008 @@ -37,7 +37,7 @@ STATISTIC(NumLoads , "Number of loads added"); static RegisterRegAlloc - localRegAlloc("local", " local register allocator", + localRegAlloc("local", "local register allocator", createLocalRegisterAllocator); namespace { Modified: llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp Tue Oct 14 15:25:08 2008 @@ -60,7 +60,7 @@ using namespace llvm; static RegisterRegAlloc -registerPBQPRepAlloc("pbqp", " PBQP register allocator", +registerPBQPRepAlloc("pbqp", "PBQP register allocator", createPBQPRegisterAllocator); Modified: llvm/trunk/lib/CodeGen/RegAllocSimple.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocSimple.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/RegAllocSimple.cpp (original) +++ llvm/trunk/lib/CodeGen/RegAllocSimple.cpp Tue Oct 14 15:25:08 2008 @@ -35,7 +35,7 @@ namespace { static RegisterRegAlloc - simpleRegAlloc("simple", " simple register allocator", + simpleRegAlloc("simple", "simple register allocator", createSimpleRegisterAllocator); class VISIBILITY_HIDDEN RegAllocSimple : public MachineFunctionPass { Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp Tue Oct 14 15:25:08 2008 @@ -31,7 +31,7 @@ STATISTIC(NumCCCopies, "Number of cross class copies"); static RegisterScheduler - fastDAGScheduler("fast", " Fast suboptimal list scheduling", + fastDAGScheduler("fast", "Fast suboptimal list scheduling", createFastDAGScheduler); namespace { Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp Tue Oct 14 15:25:08 2008 @@ -37,7 +37,7 @@ STATISTIC(NumStalls, "Number of pipeline stalls"); static RegisterScheduler - tdListDAGScheduler("list-td", " Top-down list scheduler", + tdListDAGScheduler("list-td", "Top-down list scheduler", createTDListDAGScheduler); namespace { Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Tue Oct 14 15:25:08 2008 @@ -41,11 +41,11 @@ static RegisterScheduler burrListDAGScheduler("list-burr", - " Bottom-up register reduction list scheduling", + "Bottom-up register reduction list scheduling", createBURRListDAGScheduler); static RegisterScheduler tdrListrDAGScheduler("list-tdrr", - " Top-down register reduction list scheduling", + "Top-down register reduction list scheduling", createTDRRListDAGScheduler); namespace { Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Oct 14 15:25:08 2008 @@ -119,7 +119,7 @@ " allocation):")); static RegisterScheduler -defaultListDAGScheduler("default", " Best scheduler for the target", +defaultListDAGScheduler("default", "Best scheduler for the target", createDefaultScheduler); namespace llvm { Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/VirtRegMap.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/VirtRegMap.cpp (original) +++ llvm/trunk/lib/CodeGen/VirtRegMap.cpp Tue Oct 14 15:25:08 2008 @@ -56,8 +56,8 @@ SpillerOpt("spiller", cl::desc("Spiller to use: (default: local)"), cl::Prefix, - cl::values(clEnumVal(simple, " simple spiller"), - clEnumVal(local, " local spiller"), + cl::values(clEnumVal(simple, "simple spiller"), + clEnumVal(local, "local spiller"), clEnumValEnd), cl::init(local)); Modified: llvm/trunk/lib/Support/CommandLine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CommandLine.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/Support/CommandLine.cpp (original) +++ llvm/trunk/lib/Support/CommandLine.cpp Tue Oct 14 15:25:08 2008 @@ -953,7 +953,7 @@ for (unsigned i = 0, e = getNumOptions(); i != e; ++i) { size_t NumSpaces = GlobalWidth-strlen(getOption(i))-8; cout << " =" << getOption(i) << std::string(NumSpaces, ' ') - << " - " << getDescription(i) << "\n"; + << " - " << getDescription(i) << "\n"; } } else { if (O.HelpStr[0]) Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp Tue Oct 14 15:25:08 2008 @@ -29,8 +29,8 @@ cl::desc("Disable if-conversion pass")); // Register the target. -static RegisterTarget X("arm", " ARM"); -static RegisterTarget Y("thumb", " Thumb"); +static RegisterTarget X("arm", "ARM"); +static RegisterTarget Y("thumb", "Thumb"); // No assembler printer by default ARMTargetMachine::AsmPrinterCtorFn ARMTargetMachine::AsmPrinterCtor = 0; Modified: llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp Tue Oct 14 15:25:08 2008 @@ -22,7 +22,7 @@ using namespace llvm; // Register the targets -static RegisterTarget X("alpha", " Alpha (incomplete)"); +static RegisterTarget X("alpha", "Alpha (incomplete)"); const TargetAsmInfo *AlphaTargetMachine::createTargetAsmInfo() const { return new AlphaTargetAsmInfo(*this); Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original) +++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Tue Oct 14 15:25:08 2008 @@ -49,7 +49,7 @@ using namespace llvm; // Register the target. -static RegisterTarget X("c", " C backend"); +static RegisterTarget X("c", "C backend"); namespace { /// CBackendNameAllUsedStructsAndMergeFunctions - This pass inserts names for Modified: llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp Tue Oct 14 15:25:08 2008 @@ -24,7 +24,7 @@ namespace { // Register the targets RegisterTarget - CELLSPU("cellspu", " STI CBEA Cell SPU"); + CELLSPU("cellspu", "STI CBEA Cell SPU"); } const std::pair * Modified: llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original) +++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Tue Oct 14 15:25:08 2008 @@ -72,7 +72,7 @@ cl::init("!bad!")); // Register the target. -static RegisterTarget X("cpp", " C++ backend"); +static RegisterTarget X("cpp", "C++ backend"); namespace { typedef std::vector TypeList; Modified: llvm/trunk/lib/Target/IA64/IA64TargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/IA64/IA64TargetMachine.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/Target/IA64/IA64TargetMachine.cpp (original) +++ llvm/trunk/lib/Target/IA64/IA64TargetMachine.cpp Tue Oct 14 15:25:08 2008 @@ -26,7 +26,7 @@ extern "C" int IA64TargetMachineModule; int IA64TargetMachineModule = 0; -static RegisterTarget X("ia64", " IA-64 (Itanium)"); +static RegisterTarget X("ia64", "IA-64 (Itanium)"); const TargetAsmInfo *IA64TargetMachine::createTargetAsmInfo() const { return new IA64TargetAsmInfo(*this); Modified: llvm/trunk/lib/Target/MSIL/MSILWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSIL/MSILWriter.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/Target/MSIL/MSILWriter.cpp (original) +++ llvm/trunk/lib/Target/MSIL/MSILWriter.cpp Tue Oct 14 15:25:08 2008 @@ -45,7 +45,7 @@ } -static RegisterTarget X("msil", " MSIL backend"); +static RegisterTarget X("msil", "MSIL backend"); bool MSILModule::runOnModule(Module &M) { ModulePtr = &M; Modified: llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp Tue Oct 14 15:25:08 2008 @@ -20,8 +20,8 @@ using namespace llvm; // Register the target. -static RegisterTarget X("mips", " Mips"); -static RegisterTarget Y("mipsel", " Mipsel"); +static RegisterTarget X("mips", "Mips"); +static RegisterTarget Y("mipsel", "Mipsel"); const TargetAsmInfo *MipsTargetMachine:: createTargetAsmInfo() const Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetMachine.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16TargetMachine.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16TargetMachine.cpp Tue Oct 14 15:25:08 2008 @@ -23,7 +23,7 @@ namespace { // Register the targets - RegisterTarget X("pic16", " PIC16 14-bit"); + RegisterTarget X("pic16", "PIC16 14-bit"); } PIC16TargetMachine:: Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Tue Oct 14 15:25:08 2008 @@ -23,9 +23,9 @@ // Register the targets static RegisterTarget -X("ppc32", " PowerPC 32"); +X("ppc32", "PowerPC 32"); static RegisterTarget -Y("ppc64", " PowerPC 64"); +Y("ppc64", "PowerPC 64"); // No assembler printer by default PPCTargetMachine::AsmPrinterCtorFn PPCTargetMachine::AsmPrinterCtor = 0; Modified: llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp (original) +++ llvm/trunk/lib/Target/Sparc/SparcTargetMachine.cpp Tue Oct 14 15:25:08 2008 @@ -19,7 +19,7 @@ using namespace llvm; // Register the target. -static RegisterTarget X("sparc", " SPARC"); +static RegisterTarget X("sparc", "SPARC"); const TargetAsmInfo *SparcTargetMachine::createTargetAsmInfo() const { // FIXME: Handle Solaris subtarget someday :) Modified: llvm/trunk/lib/Target/TargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachine.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/Target/TargetMachine.cpp (original) +++ llvm/trunk/lib/Target/TargetMachine.cpp Tue Oct 14 15:25:08 2008 @@ -102,13 +102,13 @@ cl::init(Reloc::Default), cl::values( clEnumValN(Reloc::Default, "default", - " Target default relocation model"), + "Target default relocation model"), clEnumValN(Reloc::Static, "static", - " Non-relocatable code"), + "Non-relocatable code"), clEnumValN(Reloc::PIC_, "pic", - " Fully relocatable, position independent code"), + "Fully relocatable, position independent code"), clEnumValN(Reloc::DynamicNoPIC, "dynamic-no-pic", - " Relocatable external references, non-relocatable code"), + "Relocatable external references, non-relocatable code"), clEnumValEnd)); static cl::opt DefCodeModel( @@ -118,15 +118,15 @@ cl::init(CodeModel::Default), cl::values( clEnumValN(CodeModel::Default, "default", - " Target default code model"), + "Target default code model"), clEnumValN(CodeModel::Small, "small", - " Small code model"), + "Small code model"), clEnumValN(CodeModel::Kernel, "kernel", - " Kernel code model"), + "Kernel code model"), clEnumValN(CodeModel::Medium, "medium", - " Medium code model"), + "Medium code model"), clEnumValN(CodeModel::Large, "large", - " Large code model"), + "Large code model"), clEnumValEnd)); static cl::opt Modified: llvm/trunk/lib/Target/X86/X86Subtarget.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Subtarget.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86Subtarget.cpp (original) +++ llvm/trunk/lib/Target/X86/X86Subtarget.cpp Tue Oct 14 15:25:08 2008 @@ -23,8 +23,8 @@ AsmWriterFlavor("x86-asm-syntax", cl::init(X86Subtarget::Unset), cl::desc("Choose style of code to emit from X86 backend:"), cl::values( - clEnumValN(X86Subtarget::ATT, "att", " Emit AT&T-style assembly"), - clEnumValN(X86Subtarget::Intel, "intel", " Emit Intel-style assembly"), + clEnumValN(X86Subtarget::ATT, "att", "Emit AT&T-style assembly"), + clEnumValN(X86Subtarget::Intel, "intel", "Emit Intel-style assembly"), clEnumValEnd)); Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original) +++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Tue Oct 14 15:25:08 2008 @@ -32,9 +32,9 @@ // Register the target. static RegisterTarget -X("x86", " 32-bit X86: Pentium-Pro and above"); +X("x86", "32-bit X86: Pentium-Pro and above"); static RegisterTarget -Y("x86-64", " 64-bit X86: EM64T and AMD64"); +Y("x86-64", "64-bit X86: EM64T and AMD64"); // No assembler printer by default X86TargetMachine::AsmPrinterCtorFn X86TargetMachine::AsmPrinterCtor = 0; Modified: llvm/trunk/tools/llc/llc.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=57521&r1=57520&r2=57521&view=diff ============================================================================== --- llvm/trunk/tools/llc/llc.cpp (original) +++ llvm/trunk/tools/llc/llc.cpp Tue Oct 14 15:25:08 2008 @@ -80,11 +80,11 @@ cl::desc("Choose a file type (not all types are supported by all targets):"), cl::values( clEnumValN(TargetMachine::AssemblyFile, "asm", - " Emit an assembly ('.s') file"), + "Emit an assembly ('.s') file"), clEnumValN(TargetMachine::ObjectFile, "obj", - " Emit a native object ('.o') file [experimental]"), + "Emit a native object ('.o') file [experimental]"), clEnumValN(TargetMachine::DynamicLibrary, "dynlib", - " Emit a native dynamic library ('.so') file" + "Emit a native dynamic library ('.so') file" " [experimental]"), clEnumValEnd)); From dpatel at apple.com Tue Oct 14 15:30:55 2008 From: dpatel at apple.com (Devang Patel) Date: Tue, 14 Oct 2008 20:30:55 -0000 Subject: [llvm-commits] [llvm] r57522 - /llvm/trunk/include/llvm/Attributes.h Message-ID: <200810142030.m9EKUtBQ024898@zion.cs.uiuc.edu> Author: dpatel Date: Tue Oct 14 15:30:54 2008 New Revision: 57522 URL: http://llvm.org/viewvc/llvm-project?rev=57522&view=rev Log: Remove dead code. Modified: llvm/trunk/include/llvm/Attributes.h Modified: llvm/trunk/include/llvm/Attributes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=57522&r1=57521&r2=57522&view=diff ============================================================================== --- llvm/trunk/include/llvm/Attributes.h (original) +++ llvm/trunk/include/llvm/Attributes.h Tue Oct 14 15:30:54 2008 @@ -84,9 +84,6 @@ std::string getAsString(Attributes Attrs); } // end namespace Attribute -namespace Attribute { -} // end namespace Attribute - /// This is just a pair of values to associate a set of attributes /// with an index. struct AttributeWithIndex { From dalej at apple.com Tue Oct 14 15:34:39 2008 From: dalej at apple.com (Dale Johannesen) Date: Tue, 14 Oct 2008 20:34:39 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57523 - /llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/pr26570.c Message-ID: <200810142034.m9EKYd63025046@zion.cs.uiuc.edu> Author: johannes Date: Tue Oct 14 15:34:39 2008 New Revision: 57523 URL: http://llvm.org/viewvc/llvm-project?rev=57523&view=rev Log: Need profiling for this one. Modified: llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/pr26570.c Modified: llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/pr26570.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/pr26570.c?rev=57523&r1=57522&r2=57523&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/pr26570.c (original) +++ llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/pr26570.c Tue Oct 14 15:34:39 2008 @@ -1,5 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fprofile-generate -fprofile-use" } */ +/* LLVM LOCAL profiling support needed */ +/* { dg-require-profiling "" } */ unsigned test (unsigned a, unsigned b) { From grosbach at apple.com Tue Oct 14 15:36:24 2008 From: grosbach at apple.com (Jim Grosbach) Date: Tue, 14 Oct 2008 20:36:24 -0000 Subject: [llvm-commits] [llvm] r57524 - in /llvm/trunk/lib/Target/ARM: ARMInstrFormats.td ARMInstrInfo.td Message-ID: <200810142036.m9EKaO7V025116@zion.cs.uiuc.edu> Author: grosbach Date: Tue Oct 14 15:36:24 2008 New Revision: 57524 URL: http://llvm.org/viewvc/llvm-project?rev=57524&view=rev Log: Update ARM Insn encoding to get endian-ness to match the documentation (31-0 left to right) Modified: llvm/trunk/lib/Target/ARM/ARMInstrFormats.td llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Modified: llvm/trunk/lib/Target/ARM/ARMInstrFormats.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrFormats.td?rev=57524&r1=57523&r2=57524&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrFormats.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrFormats.td Tue Oct 14 15:36:24 2008 @@ -141,15 +141,13 @@ string asm, list pattern> : I { - let Inst{24} = 1; // L bit - let Inst{25-27} = {1,0,1}; + let Inst{27-24} = opcod; } class ABLI opcod, dag oops, dag iops, Format f, string asm, list pattern> : XI { - let Inst{24} = 1; // L bit - let Inst{25-27} = {1,0,1}; + let Inst{27-24} = opcod; } // FIXME: BX class AXIx2 opcod, dag oops, dag iops, Format f, string asm, @@ -160,15 +158,13 @@ list pattern> : XI { - let Inst{24} = 0; // L bit - let Inst{25-27} = {1,0,1}; + let Inst{27-24} = opcod; } class ABccI opcod, dag oops, dag iops, Format f, string opc, string asm, list pattern> : I { - let Inst{24} = 0; // L bit - let Inst{25-27} = {1,0,1}; + let Inst{27-24} = opcod; } // BR_JT instructions @@ -177,16 +173,16 @@ : XI { let Inst{20} = 0; // S Bit - let Inst{21-24} = {1,0,1,1}; - let Inst{26-27} = {0,0}; + let Inst{24-21} = opcod; + let Inst{27-26} = {0,0}; } // == add pc class JTI1 opcod, dag oops, dag iops, string asm, list pattern> : XI { let Inst{20} = 0; // S bit - let Inst{21-24} = {0,0,1,0}; - let Inst{26-27} = {0,0}; + let Inst{24-21} = opcod; + let Inst{27-26} = {0,0}; } // == ldr pc class JTI2 opcod, dag oops, dag iops, string asm, list pattern> @@ -196,7 +192,7 @@ let Inst{21} = 0; // W bit let Inst{22} = 0; // B bit let Inst{24} = 1; // P bit - let Inst{26-27} = {0,0}; + let Inst{27-26} = {0,1}; } @@ -205,22 +201,22 @@ string asm, list pattern> : I { - let Inst{21-24} = opcod; - let Inst{26-27} = {0,0}; + let Inst{24-21} = opcod; + let Inst{27-26} = {0,0}; } class AsI1 opcod, dag oops, dag iops, Format f, string opc, string asm, list pattern> : sI { - let Inst{21-24} = opcod; - let Inst{26-27} = {0,0}; + let Inst{24-21} = opcod; + let Inst{27-26} = {0,0}; } class AXI1 opcod, dag oops, dag iops, Format f, string asm, list pattern> : XI { - let Inst{21-24} = opcod; - let Inst{26-27} = {0,0}; + let Inst{24-21} = opcod; + let Inst{27-26} = {0,0}; } class AI1x2 opcod, dag oops, dag iops, Format f, string opc, string asm, list pattern> @@ -233,7 +229,7 @@ string asm, list pattern> : I { - let Inst{26-27} = {1,0}; + let Inst{27-26} = {0,1}; } class AXI2 opcod, dag oops, dag iops, Format f, string asm, list pattern> @@ -644,7 +640,7 @@ "", pattern> { let Inst{20} = 1; // L bit let Inst{22} = 0; // S bit - let Inst{25-27} = {0,0,1}; + let Inst{27-25} = 0b100; } class AXI4ldpc opcod, dag oops, dag iops, Format f, string asm, list pattern> @@ -652,7 +648,7 @@ "", pattern> { let Inst{20} = 1; // L bit let Inst{22} = 1; // S bit - let Inst{25-27} = {0,0,1}; + let Inst{27-25} = 0b100; } class AXI4st opcod, dag oops, dag iops, Format f, string asm, list pattern> @@ -660,7 +656,7 @@ "", pattern> { let Inst{20} = 0; // L bit let Inst{22} = 0; // S bit - let Inst{25-27} = {0,0,1}; + let Inst{27-25} = 0b100; } Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.td?rev=57524&r1=57523&r2=57524&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.td Tue Oct 14 15:36:24 2008 @@ -521,9 +521,9 @@ let isReturn = 1, isTerminator = 1 in def BX_RET : AI<0x0, (outs), (ins), BranchMisc, "bx", " lr", [(ARMretflag)]> { - let Inst{4-7} = {1,0,0,0}; - let Inst{8-19} = {1,1,1,1,1,1,1,1,1,1,1,1}; - let Inst{20-27} = {0,1,0,0,1,0,0,0}; + let Inst{7-4} = 0b0001; + let Inst{19-8} = 0b111111111111; + let Inst{27-20} = 0b00010010; } // FIXME: remove when we have a way to marking a MI with these properties. @@ -550,9 +550,9 @@ def BLX : AXI<0x0, (outs), (ins GPR:$func, variable_ops), BranchMisc, "blx $func", [(ARMcall GPR:$func)]>, Requires<[IsARM, HasV5T]> { - let Inst{4-7} = {1,1,0,0}; - let Inst{8-19} = {1,1,1,1,1,1,1,1,1,1,1,1}; - let Inst{20-27} = {0,1,0,0,1,0,0,0}; + let Inst{7-4} = 0b0011; + let Inst{19-8} = 0b111111111111; + let Inst{27-20} = 0b00010010; } let Uses = [LR] in { @@ -567,18 +567,18 @@ // B is "predicable" since it can be xformed into a Bcc. let isBarrier = 1 in { let isPredicable = 1 in - def B : ABI<{0,1,0,1}, (outs), (ins brtarget:$target), Branch, "b $target", + def B : ABI<0xA, (outs), (ins brtarget:$target), Branch, "b $target", [(br bb:$target)]>; let isNotDuplicable = 1, isIndirectBranch = 1 in { - def BR_JTr : JTI<0x0, (outs), (ins GPR:$target, jtblock_operand:$jt, i32imm:$id), + def BR_JTr : JTI<0b1101, (outs), (ins GPR:$target, jtblock_operand:$jt, i32imm:$id), "mov pc, $target \n$jt", [(ARMbrjt GPR:$target, tjumptable:$jt, imm:$id)]>; def BR_JTm : JTI2<0x0, (outs), (ins addrmode2:$target, jtblock_operand:$jt, i32imm:$id), "ldr pc, $target \n$jt", [(ARMbrjt (i32 (load addrmode2:$target)), tjumptable:$jt, imm:$id)]>; - def BR_JTadd : JTI1<0x0, (outs), (ins GPR:$target, GPR:$idx, jtblock_operand:$jt, + def BR_JTadd : JTI1<0b0100, (outs), (ins GPR:$target, GPR:$idx, jtblock_operand:$jt, i32imm:$id), "add pc, $target, $idx \n$jt", [(ARMbrjt (add GPR:$target, GPR:$idx), tjumptable:$jt, @@ -752,16 +752,16 @@ // Move Instructions. // -def MOVr : AsI1<{1,0,1,1}, (outs GPR:$dst), (ins GPR:$src), DPRdReg, +def MOVr : AsI1<0b1101, (outs GPR:$dst), (ins GPR:$src), DPRdReg, "mov", " $dst, $src", []>; -def MOVs : AsI1<{1,0,1,1}, (outs GPR:$dst), (ins so_reg:$src), DPRdSoReg, +def MOVs : AsI1<0b1101, (outs GPR:$dst), (ins so_reg:$src), DPRdSoReg, "mov", " $dst, $src", [(set GPR:$dst, so_reg:$src)]>; let isReMaterializable = 1 in -def MOVi : AsI1<{1,0,1,1}, (outs GPR:$dst), (ins so_imm:$src), DPRdIm, +def MOVi : AsI1<0b1101, (outs GPR:$dst), (ins so_imm:$src), DPRdIm, "mov", " $dst, $src", [(set GPR:$dst, so_imm:$src)]>; -def MOVrx : AsI1<{1,0,1,1}, (outs GPR:$dst), (ins GPR:$src), DPRdMisc, +def MOVrx : AsI1<0b1101, (outs GPR:$dst), (ins GPR:$src), DPRdMisc, "mov", " $dst, $src, rrx", [(set GPR:$dst, (ARMrrx GPR:$src))]>; @@ -769,10 +769,10 @@ // due to flag operands. let Defs = [CPSR] in { -def MOVsrl_flag : AI1<{1,0,1,1}, (outs GPR:$dst), (ins GPR:$src), DPRdMisc, +def MOVsrl_flag : AI1<0b1101, (outs GPR:$dst), (ins GPR:$src), DPRdMisc, "mov", "s $dst, $src, lsr #1", [(set GPR:$dst, (ARMsrl_flag GPR:$src))]>; -def MOVsra_flag : AI1<{1,0,1,1}, (outs GPR:$dst), (ins GPR:$src), DPRdMisc, +def MOVsra_flag : AI1<0b1101, (outs GPR:$dst), (ins GPR:$src), DPRdMisc, "mov", "s $dst, $src, asr #1", [(set GPR:$dst, (ARMsra_flag GPR:$src))]>; } @@ -820,48 +820,48 @@ // Arithmetic Instructions. // -defm ADD : AsI1_bin_irs<{0,0,1,0}, "add", +defm ADD : AsI1_bin_irs<0b0100, "add", BinOpFrag<(add node:$LHS, node:$RHS)>>; -defm SUB : AsI1_bin_irs<{0,1,0,0}, "sub", +defm SUB : AsI1_bin_irs<0b0010, "sub", BinOpFrag<(sub node:$LHS, node:$RHS)>>; // ADD and SUB with 's' bit set. -defm ADDS : ASI1_bin_s_irs<{0,0,1,0}, "add", +defm ADDS : ASI1_bin_s_irs<0b0100, "add", BinOpFrag<(addc node:$LHS, node:$RHS)>>; -defm SUBS : ASI1_bin_s_irs<{0,1,0,0}, "sub", +defm SUBS : ASI1_bin_s_irs<0b0010, "sub", BinOpFrag<(subc node:$LHS, node:$RHS)>>; // FIXME: Do not allow ADC / SBC to be predicated for now. -defm ADC : AsXI1_bin_c_irs<{1,0,1,0}, "adc", +defm ADC : AsXI1_bin_c_irs<0b0101, "adc", BinOpFrag<(adde node:$LHS, node:$RHS)>>; -defm SBC : AsXI1_bin_c_irs<{0,1,1,0}, "sbc", +defm SBC : AsXI1_bin_c_irs<0b0110, "sbc", BinOpFrag<(sube node:$LHS, node:$RHS)>>; // These don't define reg/reg forms, because they are handled above. -def RSBri : AsI1<{1,1,0,0}, (outs GPR:$dst), (ins GPR:$a, so_imm:$b), DPRIm, +def RSBri : AsI1<0b0011, (outs GPR:$dst), (ins GPR:$a, so_imm:$b), DPRIm, "rsb", " $dst, $a, $b", [(set GPR:$dst, (sub so_imm:$b, GPR:$a))]>; -def RSBrs : AsI1<{1,1,0,0}, (outs GPR:$dst), (ins GPR:$a, so_reg:$b), DPRSoReg, +def RSBrs : AsI1<0b0011, (outs GPR:$dst), (ins GPR:$a, so_reg:$b), DPRSoReg, "rsb", " $dst, $a, $b", [(set GPR:$dst, (sub so_reg:$b, GPR:$a))]>; // RSB with 's' bit set. let Defs = [CPSR] in { -def RSBSri : AI1<{1,1,0,0}, (outs GPR:$dst), (ins GPR:$a, so_imm:$b), DPRIm, +def RSBSri : AI1<0b0011, (outs GPR:$dst), (ins GPR:$a, so_imm:$b), DPRIm, "rsb", "s $dst, $a, $b", [(set GPR:$dst, (subc so_imm:$b, GPR:$a))]>; -def RSBSrs : AI1<{1,1,0,0}, (outs GPR:$dst), (ins GPR:$a, so_reg:$b), DPRSoReg, +def RSBSrs : AI1<0b0011, (outs GPR:$dst), (ins GPR:$a, so_reg:$b), DPRSoReg, "rsb", "s $dst, $a, $b", [(set GPR:$dst, (subc so_reg:$b, GPR:$a))]>; } // FIXME: Do not allow RSC to be predicated for now. But they can set CPSR. let Uses = [CPSR] in { -def RSCri : AXI1<{1,1,1,0}, (outs GPR:$dst), (ins GPR:$a, so_imm:$b, cc_out:$s), +def RSCri : AXI1<0b0111, (outs GPR:$dst), (ins GPR:$a, so_imm:$b, cc_out:$s), DPRIm, "rsc${s} $dst, $a, $b", [(set GPR:$dst, (sube so_imm:$b, GPR:$a))]>; -def RSCrs : AXI1<{1,1,1,0}, (outs GPR:$dst), (ins GPR:$a, so_reg:$b, cc_out:$s), +def RSCrs : AXI1<0b0111, (outs GPR:$dst), (ins GPR:$a, so_reg:$b, cc_out:$s), DPRSoReg, "rsc${s} $dst, $a, $b", [(set GPR:$dst, (sube so_reg:$b, GPR:$a))]>; } @@ -886,21 +886,21 @@ // Bitwise Instructions. // -defm AND : AsI1_bin_irs<{0,0,0,0}, "and", +defm AND : AsI1_bin_irs<0b0000, "and", BinOpFrag<(and node:$LHS, node:$RHS)>>; -defm ORR : AsI1_bin_irs<{0,0,1,1}, "orr", +defm ORR : AsI1_bin_irs<0b1100, "orr", BinOpFrag<(or node:$LHS, node:$RHS)>>; -defm EOR : AsI1_bin_irs<{1,0,0,0}, "eor", +defm EOR : AsI1_bin_irs<0b0001, "eor", BinOpFrag<(xor node:$LHS, node:$RHS)>>; -defm BIC : AsI1_bin_irs<{0,1,1,1}, "bic", +defm BIC : AsI1_bin_irs<0b1110, "bic", BinOpFrag<(and node:$LHS, (not node:$RHS))>>; -def MVNr : AsI1<{1,1,1,1}, (outs GPR:$dst), (ins GPR:$src), DPRdReg, +def MVNr : AsI1<0b1111, (outs GPR:$dst), (ins GPR:$src), DPRdReg, "mvn", " $dst, $src", [(set GPR:$dst, (not GPR:$src))]>; -def MVNs : AsI1<{1,1,1,1}, (outs GPR:$dst), (ins so_reg:$src), DPRdSoReg, +def MVNs : AsI1<0b1111, (outs GPR:$dst), (ins so_reg:$src), DPRdSoReg, "mvn", " $dst, $src", [(set GPR:$dst, (not so_reg:$src))]>; let isReMaterializable = 1 in -def MVNi : AsI1<{1,1,1,1}, (outs GPR:$dst), (ins so_imm:$imm), DPRdIm, +def MVNi : AsI1<0b1111, (outs GPR:$dst), (ins so_imm:$imm), DPRdIm, "mvn", " $dst, $imm", [(set GPR:$dst, so_imm_not:$imm)]>; def : ARMPat<(and GPR:$src, so_imm_not:$imm), @@ -1099,9 +1099,9 @@ // Comparison Instructions... // -defm CMP : AI1_cmp_irs<{0,1,0,1}, "cmp", +defm CMP : AI1_cmp_irs<0b1010, "cmp", BinOpFrag<(ARMcmp node:$LHS, node:$RHS)>>; -defm CMN : AI1_cmp_irs<{1,1,0,1}, "cmn", +defm CMN : AI1_cmp_irs<0b1011, "cmn", BinOpFrag<(ARMcmp node:$LHS,(ineg node:$RHS))>>; // Note that TST/TEQ don't set all the same flags that CMP does! @@ -1110,9 +1110,9 @@ defm TEQ : AI1_cmp_irs<0x9, "teq", BinOpFrag<(ARMcmpNZ (xor node:$LHS, node:$RHS), 0)>>; -defm CMPnz : AI1_cmp_irs<{0,1,0,1}, "cmp", +defm CMPnz : AI1_cmp_irs<0b1010, "cmp", BinOpFrag<(ARMcmpNZ node:$LHS, node:$RHS)>>; -defm CMNnz : AI1_cmp_irs<{1,1,0,1}, "cmn", +defm CMNnz : AI1_cmp_irs<0b1011, "cmn", BinOpFrag<(ARMcmpNZ node:$LHS,(ineg node:$RHS))>>; def : ARMPat<(ARMcmp GPR:$src, so_imm_neg:$imm), From dalej at apple.com Tue Oct 14 16:21:53 2008 From: dalej at apple.com (Dale Johannesen) Date: Tue, 14 Oct 2008 21:21:53 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57525 - /llvm-gcc-4.2/trunk/gcc/testsuite/gcc.target/i386/20020616-1.c Message-ID: <200810142121.m9ELLrr0026710@zion.cs.uiuc.edu> Author: johannes Date: Tue Oct 14 16:21:50 2008 New Revision: 57525 URL: http://llvm.org/viewvc/llvm-project?rev=57525&view=rev Log: Fix dg-skip-if command so it works. Modified: llvm-gcc-4.2/trunk/gcc/testsuite/gcc.target/i386/20020616-1.c Modified: llvm-gcc-4.2/trunk/gcc/testsuite/gcc.target/i386/20020616-1.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.target/i386/20020616-1.c?rev=57525&r1=57524&r2=57525&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/testsuite/gcc.target/i386/20020616-1.c (original) +++ llvm-gcc-4.2/trunk/gcc/testsuite/gcc.target/i386/20020616-1.c Tue Oct 14 16:21:50 2008 @@ -1,7 +1,8 @@ /* PR opt/6722 */ /* { dg-do run { target i?86-*-* x86_64-*-* } } */ /* APPLE LOCAL 5951276 */ -/* { dg-skip-if "" { i?86-apple-darwin* } } */ +/* LLVM LOCAL I need {"*"} and {""} explicitly for some reason */ +/* { dg-skip-if "" { i?86-apple-darwin* } {"*"} {""} } */ /* { dg-options "-O2" } */ register int k asm("%ebx"); From evan.cheng at apple.com Tue Oct 14 16:26:46 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 14 Oct 2008 21:26:46 -0000 Subject: [llvm-commits] [llvm] r57526 - in /llvm/trunk: include/llvm/CodeGen/ include/llvm/Target/ lib/CodeGen/SelectionDAG/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/CellSPU/ lib/Target/IA64/ lib/Target/Mips/ lib/Target/PIC16/ lib/Target/PowerPC/ lib/Target/Sparc/ lib/Target/X86/ Message-ID: <200810142126.m9ELQlZq026890@zion.cs.uiuc.edu> Author: evancheng Date: Tue Oct 14 16:26:46 2008 New Revision: 57526 URL: http://llvm.org/viewvc/llvm-project?rev=57526&view=rev Log: Rename LoadX to LoadExt. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp llvm/trunk/lib/Target/IA64/IA64ISelLowering.cpp llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=57526&r1=57525&r2=57526&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Tue Oct 14 16:26:46 2008 @@ -734,7 +734,7 @@ EXTLOAD, SEXTLOAD, ZEXTLOAD, - LAST_LOADX_TYPE + LAST_LOADEXT_TYPE }; //===--------------------------------------------------------------------===// Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=57526&r1=57525&r2=57526&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Tue Oct 14 16:26:46 2008 @@ -305,23 +305,23 @@ getOperationAction(Op, VT) == Custom); } - /// getLoadXAction - Return how this load with extension should be treated: + /// getLoadExtAction - Return how this load with extension should be treated: /// either it is legal, needs to be promoted to a larger size, needs to be /// expanded to some other code sequence, or the target has a custom expander /// for it. - LegalizeAction getLoadXAction(unsigned LType, MVT VT) const { - assert(LType < array_lengthof(LoadXActions) && - (unsigned)VT.getSimpleVT() < sizeof(LoadXActions[0])*4 && + LegalizeAction getLoadExtAction(unsigned LType, MVT VT) const { + assert(LType < array_lengthof(LoadExtActions) && + (unsigned)VT.getSimpleVT() < sizeof(LoadExtActions[0])*4 && "Table isn't big enough!"); - return (LegalizeAction)((LoadXActions[LType] >> (2*VT.getSimpleVT())) & 3); + return (LegalizeAction)((LoadExtActions[LType] >> (2*VT.getSimpleVT())) & 3); } - /// isLoadXLegal - Return true if the specified load with extension is legal + /// isLoadExtLegal - Return true if the specified load with extension is legal /// on this target. - bool isLoadXLegal(unsigned LType, MVT VT) const { + bool isLoadExtLegal(unsigned LType, MVT VT) const { return VT.isSimple() && - (getLoadXAction(LType, VT) == Legal || - getLoadXAction(LType, VT) == Custom); + (getLoadExtAction(LType, VT) == Legal || + getLoadExtAction(LType, VT) == Custom); } /// getTruncStoreAction - Return how this store with truncation should be @@ -839,15 +839,15 @@ OpActions[Op] |= (uint64_t)Action << VT.getSimpleVT()*2; } - /// setLoadXAction - Indicate that the specified load with extension does not - /// work with the with specified type and indicate what to do about it. - void setLoadXAction(unsigned ExtType, MVT VT, + /// setLoadExtAction - Indicate that the specified load with extension does + /// not work with the with specified type and indicate what to do about it. + void setLoadExtAction(unsigned ExtType, MVT VT, LegalizeAction Action) { - assert((unsigned)VT.getSimpleVT() < sizeof(LoadXActions[0])*4 && - ExtType < array_lengthof(LoadXActions) && + assert((unsigned)VT.getSimpleVT() < sizeof(LoadExtActions[0])*4 && + ExtType < array_lengthof(LoadExtActions) && "Table isn't big enough!"); - LoadXActions[ExtType] &= ~(uint64_t(3UL) << VT.getSimpleVT()*2); - LoadXActions[ExtType] |= (uint64_t)Action << VT.getSimpleVT()*2; + LoadExtActions[ExtType] &= ~(uint64_t(3UL) << VT.getSimpleVT()*2); + LoadExtActions[ExtType] |= (uint64_t)Action << VT.getSimpleVT()*2; } /// setTruncStoreAction - Indicate that the specified truncating store does @@ -1411,10 +1411,10 @@ /// non-legal value types are not described here. uint64_t OpActions[OpActionsCapacity]; - /// LoadXActions - For each load of load extension type and each value type, + /// LoadExtActions - For each load of load extension type and each value type, /// keep a LegalizeAction that indicates how instruction selection should deal /// with the load. - uint64_t LoadXActions[ISD::LAST_LOADX_TYPE]; + uint64_t LoadExtActions[ISD::LAST_LOADEXT_TYPE]; /// TruncStoreActions - For each truncating store, keep a LegalizeAction that /// indicates how instruction selection should deal with the store. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=57526&r1=57525&r2=57526&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Oct 14 16:26:46 2008 @@ -1724,7 +1724,7 @@ if (DAG.MaskedValueIsZero(N1, APInt::getHighBitsSet(BitWidth, BitWidth - EVT.getSizeInBits())) && ((!AfterLegalize && !LN0->isVolatile()) || - TLI.isLoadXLegal(ISD::ZEXTLOAD, EVT))) { + TLI.isLoadExtLegal(ISD::ZEXTLOAD, EVT))) { SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, LN0->getChain(), LN0->getBasePtr(), LN0->getSrcValue(), LN0->getSrcValueOffset(), EVT, @@ -1746,7 +1746,7 @@ if (DAG.MaskedValueIsZero(N1, APInt::getHighBitsSet(BitWidth, BitWidth - EVT.getSizeInBits())) && ((!AfterLegalize && !LN0->isVolatile()) || - TLI.isLoadXLegal(ISD::ZEXTLOAD, EVT))) { + TLI.isLoadExtLegal(ISD::ZEXTLOAD, EVT))) { SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, LN0->getChain(), LN0->getBasePtr(), LN0->getSrcValue(), LN0->getSrcValueOffset(), EVT, @@ -1775,7 +1775,7 @@ // Do not generate loads of non-round integer types since these can // be expensive (and would be wrong if the type is not byte sized). if (EVT != MVT::Other && LoadedVT.bitsGT(EVT) && EVT.isRound() && - (!AfterLegalize || TLI.isLoadXLegal(ISD::ZEXTLOAD, EVT))) { + (!AfterLegalize || TLI.isLoadExtLegal(ISD::ZEXTLOAD, EVT))) { MVT PtrType = N0.getOperand(1).getValueType(); // For big endian targets, we need to add an offset to the pointer to // load the correct bytes. For little endian systems, we merely need to @@ -2858,7 +2858,7 @@ // fold (sext (load x)) -> (sext (truncate (sextload x))) if (ISD::isNON_EXTLoad(N0.getNode()) && ((!AfterLegalize && !cast(N0)->isVolatile()) || - TLI.isLoadXLegal(ISD::SEXTLOAD, N0.getValueType()))) { + TLI.isLoadExtLegal(ISD::SEXTLOAD, N0.getValueType()))) { bool DoXform = true; SmallVector SetCCs; if (!N0.hasOneUse()) @@ -2900,7 +2900,7 @@ LoadSDNode *LN0 = cast(N0); MVT EVT = LN0->getMemoryVT(); if ((!AfterLegalize && !LN0->isVolatile()) || - TLI.isLoadXLegal(ISD::SEXTLOAD, EVT)) { + TLI.isLoadExtLegal(ISD::SEXTLOAD, EVT)) { SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, VT, LN0->getChain(), LN0->getBasePtr(), LN0->getSrcValue(), LN0->getSrcValueOffset(), EVT, @@ -2984,7 +2984,7 @@ // fold (zext (load x)) -> (zext (truncate (zextload x))) if (ISD::isNON_EXTLoad(N0.getNode()) && ((!AfterLegalize && !cast(N0)->isVolatile()) || - TLI.isLoadXLegal(ISD::ZEXTLOAD, N0.getValueType()))) { + TLI.isLoadExtLegal(ISD::ZEXTLOAD, N0.getValueType()))) { bool DoXform = true; SmallVector SetCCs; if (!N0.hasOneUse()) @@ -3026,7 +3026,7 @@ LoadSDNode *LN0 = cast(N0); MVT EVT = LN0->getMemoryVT(); if ((!AfterLegalize && !LN0->isVolatile()) || - TLI.isLoadXLegal(ISD::ZEXTLOAD, EVT)) { + TLI.isLoadExtLegal(ISD::ZEXTLOAD, EVT)) { SDValue ExtLoad = DAG.getExtLoad(ISD::ZEXTLOAD, VT, LN0->getChain(), LN0->getBasePtr(), LN0->getSrcValue(), LN0->getSrcValueOffset(), EVT, @@ -3106,7 +3106,7 @@ // fold (aext (load x)) -> (aext (truncate (extload x))) if (ISD::isNON_EXTLoad(N0.getNode()) && N0.hasOneUse() && ((!AfterLegalize && !cast(N0)->isVolatile()) || - TLI.isLoadXLegal(ISD::EXTLOAD, N0.getValueType()))) { + TLI.isLoadExtLegal(ISD::EXTLOAD, N0.getValueType()))) { LoadSDNode *LN0 = cast(N0); SDValue ExtLoad = DAG.getExtLoad(ISD::EXTLOAD, VT, LN0->getChain(), LN0->getBasePtr(), LN0->getSrcValue(), @@ -3212,7 +3212,7 @@ if (Opc == ISD::SIGN_EXTEND_INREG) { ExtType = ISD::SEXTLOAD; EVT = cast(N->getOperand(1))->getVT(); - if (AfterLegalize && !TLI.isLoadXLegal(ISD::SEXTLOAD, EVT)) + if (AfterLegalize && !TLI.isLoadExtLegal(ISD::SEXTLOAD, EVT)) return SDValue(); } @@ -3345,7 +3345,7 @@ ISD::isUNINDEXEDLoad(N0.getNode()) && EVT == cast(N0)->getMemoryVT() && ((!AfterLegalize && !cast(N0)->isVolatile()) || - TLI.isLoadXLegal(ISD::SEXTLOAD, EVT))) { + TLI.isLoadExtLegal(ISD::SEXTLOAD, EVT))) { LoadSDNode *LN0 = cast(N0); SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, VT, LN0->getChain(), LN0->getBasePtr(), LN0->getSrcValue(), @@ -3361,7 +3361,7 @@ N0.hasOneUse() && EVT == cast(N0)->getMemoryVT() && ((!AfterLegalize && !cast(N0)->isVolatile()) || - TLI.isLoadXLegal(ISD::SEXTLOAD, EVT))) { + TLI.isLoadExtLegal(ISD::SEXTLOAD, EVT))) { LoadSDNode *LN0 = cast(N0); SDValue ExtLoad = DAG.getExtLoad(ISD::SEXTLOAD, VT, LN0->getChain(), LN0->getBasePtr(), LN0->getSrcValue(), @@ -4043,7 +4043,7 @@ // fold (fpext (load x)) -> (fpext (fptrunc (extload x))) if (ISD::isNON_EXTLoad(N0.getNode()) && N0.hasOneUse() && ((!AfterLegalize && !cast(N0)->isVolatile()) || - TLI.isLoadXLegal(ISD::EXTLOAD, N0.getValueType()))) { + TLI.isLoadExtLegal(ISD::EXTLOAD, N0.getValueType()))) { LoadSDNode *LN0 = cast(N0); SDValue ExtLoad = DAG.getExtLoad(ISD::EXTLOAD, VT, LN0->getChain(), LN0->getBasePtr(), LN0->getSrcValue(), Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=57526&r1=57525&r2=57526&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Oct 14 16:26:46 2008 @@ -456,7 +456,7 @@ if (CFP->isValueValidForType(SVT, CFP->getValueAPF()) && // Only do this if the target has a native EXTLOAD instruction from // smaller type. - TLI.isLoadXLegal(ISD::EXTLOAD, SVT) && + TLI.isLoadExtLegal(ISD::EXTLOAD, SVT) && TLI.ShouldShrinkFPConstant(OrigVT)) { const Type *SType = SVT.getTypeForMVT(); LLVMC = cast(ConstantExpr::getFPTrunc(LLVMC, SType)); @@ -1981,7 +1981,7 @@ // nice to have an effective generic way of getting these benefits... // Until such a way is found, don't insist on promoting i1 here. (SrcVT != MVT::i1 || - TLI.getLoadXAction(ExtType, MVT::i1) == TargetLowering::Promote)) { + TLI.getLoadExtAction(ExtType, MVT::i1) == TargetLowering::Promote)) { // Promote to a byte-sized load if not loading an integral number of // bytes. For example, promote EXTLOAD:i20 -> EXTLOAD:i24. unsigned NewWidth = SrcVT.getStoreSizeInBits(); @@ -2086,7 +2086,7 @@ Tmp1 = LegalizeOp(Result); Tmp2 = LegalizeOp(Ch); } else { - switch (TLI.getLoadXAction(ExtType, SrcVT)) { + switch (TLI.getLoadExtAction(ExtType, SrcVT)) { default: assert(0 && "This action is not supported yet!"); case TargetLowering::Custom: isCustom = true; Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=57526&r1=57525&r2=57526&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Tue Oct 14 16:26:46 2008 @@ -402,7 +402,7 @@ "Fixed size array in TargetLowering is not large enough!"); // All operations default to being supported. memset(OpActions, 0, sizeof(OpActions)); - memset(LoadXActions, 0, sizeof(LoadXActions)); + memset(LoadExtActions, 0, sizeof(LoadExtActions)); memset(TruncStoreActions, 0, sizeof(TruncStoreActions)); memset(IndexedModeActions, 0, sizeof(IndexedModeActions)); memset(ConvertActions, 0, sizeof(ConvertActions)); Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=57526&r1=57525&r2=57526&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Oct 14 16:26:46 2008 @@ -131,10 +131,10 @@ computeRegisterProperties(); // ARM does not have f32 extending load. - setLoadXAction(ISD::EXTLOAD, MVT::f32, Expand); + setLoadExtAction(ISD::EXTLOAD, MVT::f32, Expand); // ARM does not have i1 sign extending load. - setLoadXAction(ISD::SEXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::SEXTLOAD, MVT::i1, Promote); // ARM supports all 4 flavors of integer indexed load / store. for (unsigned im = (unsigned)ISD::PRE_INC; Modified: llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp?rev=57526&r1=57525&r2=57526&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp Tue Oct 14 16:26:46 2008 @@ -52,15 +52,15 @@ // We want to custom lower some of our intrinsics. setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::Other, Custom); - setLoadXAction(ISD::EXTLOAD, MVT::i1, Promote); - setLoadXAction(ISD::EXTLOAD, MVT::f32, Expand); + setLoadExtAction(ISD::EXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::EXTLOAD, MVT::f32, Expand); - setLoadXAction(ISD::ZEXTLOAD, MVT::i1, Promote); - setLoadXAction(ISD::ZEXTLOAD, MVT::i32, Expand); + setLoadExtAction(ISD::ZEXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::ZEXTLOAD, MVT::i32, Expand); - setLoadXAction(ISD::SEXTLOAD, MVT::i1, Promote); - setLoadXAction(ISD::SEXTLOAD, MVT::i8, Expand); - setLoadXAction(ISD::SEXTLOAD, MVT::i16, Expand); + setLoadExtAction(ISD::SEXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::SEXTLOAD, MVT::i8, Expand); + setLoadExtAction(ISD::SEXTLOAD, MVT::i16, Expand); // setOperationAction(ISD::BRIND, MVT::Other, Expand); setOperationAction(ISD::BR_JT, MVT::Other, Expand); Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp?rev=57526&r1=57525&r2=57526&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp Tue Oct 14 16:26:46 2008 @@ -131,27 +131,27 @@ addRegisterClass(MVT::i128, SPU::GPRCRegisterClass); // SPU has no sign or zero extended loads for i1, i8, i16: - setLoadXAction(ISD::EXTLOAD, MVT::i1, Promote); - setLoadXAction(ISD::SEXTLOAD, MVT::i1, Promote); - setLoadXAction(ISD::ZEXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::EXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::SEXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::ZEXTLOAD, MVT::i1, Promote); setTruncStoreAction(MVT::i8, MVT::i1, Custom); setTruncStoreAction(MVT::i16, MVT::i1, Custom); setTruncStoreAction(MVT::i32, MVT::i1, Custom); setTruncStoreAction(MVT::i64, MVT::i1, Custom); setTruncStoreAction(MVT::i128, MVT::i1, Custom); - setLoadXAction(ISD::EXTLOAD, MVT::i8, Custom); - setLoadXAction(ISD::SEXTLOAD, MVT::i8, Custom); - setLoadXAction(ISD::ZEXTLOAD, MVT::i8, Custom); + setLoadExtAction(ISD::EXTLOAD, MVT::i8, Custom); + setLoadExtAction(ISD::SEXTLOAD, MVT::i8, Custom); + setLoadExtAction(ISD::ZEXTLOAD, MVT::i8, Custom); setTruncStoreAction(MVT::i8 , MVT::i8, Custom); setTruncStoreAction(MVT::i16 , MVT::i8, Custom); setTruncStoreAction(MVT::i32 , MVT::i8, Custom); setTruncStoreAction(MVT::i64 , MVT::i8, Custom); setTruncStoreAction(MVT::i128, MVT::i8, Custom); - setLoadXAction(ISD::EXTLOAD, MVT::i16, Custom); - setLoadXAction(ISD::SEXTLOAD, MVT::i16, Custom); - setLoadXAction(ISD::ZEXTLOAD, MVT::i16, Custom); + setLoadExtAction(ISD::EXTLOAD, MVT::i16, Custom); + setLoadExtAction(ISD::SEXTLOAD, MVT::i16, Custom); + setLoadExtAction(ISD::ZEXTLOAD, MVT::i16, Custom); // SPU constant load actions are custom lowered: setOperationAction(ISD::Constant, MVT::i64, Custom); Modified: llvm/trunk/lib/Target/IA64/IA64ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/IA64/IA64ISelLowering.cpp?rev=57526&r1=57525&r2=57526&view=diff ============================================================================== --- llvm/trunk/lib/Target/IA64/IA64ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/IA64/IA64ISelLowering.cpp Tue Oct 14 16:26:46 2008 @@ -35,14 +35,14 @@ // register class for predicate registers addRegisterClass(MVT::i1, IA64::PRRegisterClass); - setLoadXAction(ISD::EXTLOAD , MVT::i1 , Promote); + setLoadExtAction(ISD::EXTLOAD , MVT::i1 , Promote); - setLoadXAction(ISD::ZEXTLOAD , MVT::i1 , Promote); + setLoadExtAction(ISD::ZEXTLOAD , MVT::i1 , Promote); - setLoadXAction(ISD::SEXTLOAD , MVT::i1 , Promote); - setLoadXAction(ISD::SEXTLOAD , MVT::i8 , Expand); - setLoadXAction(ISD::SEXTLOAD , MVT::i16 , Expand); - setLoadXAction(ISD::SEXTLOAD , MVT::i32 , Expand); + setLoadExtAction(ISD::SEXTLOAD , MVT::i1 , Promote); + setLoadExtAction(ISD::SEXTLOAD , MVT::i8 , Expand); + setLoadExtAction(ISD::SEXTLOAD , MVT::i16 , Expand); + setLoadExtAction(ISD::SEXTLOAD , MVT::i32 , Expand); setOperationAction(ISD::BRIND , MVT::Other, Expand); setOperationAction(ISD::BR_JT , MVT::Other, Expand); Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=57526&r1=57525&r2=57526&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Tue Oct 14 16:26:46 2008 @@ -82,9 +82,9 @@ addLegalFPImmediate(APFloat(+0.0f)); // Load extented operations for i1 types must be promoted - setLoadXAction(ISD::EXTLOAD, MVT::i1, Promote); - setLoadXAction(ISD::ZEXTLOAD, MVT::i1, Promote); - setLoadXAction(ISD::SEXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::EXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::ZEXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::SEXTLOAD, MVT::i1, Promote); // Used by legalize types to correctly generate the setcc result. // Without this, every float setcc comes with a AND/OR with the result, Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp?rev=57526&r1=57525&r2=57526&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp Tue Oct 14 16:26:46 2008 @@ -60,9 +60,9 @@ addRegisterClass(MVT::i16, PIC16::PTRRegsRegisterClass); // Load extented operations for i1 types must be promoted . - setLoadXAction(ISD::EXTLOAD, MVT::i1, Promote); - setLoadXAction(ISD::ZEXTLOAD, MVT::i1, Promote); - setLoadXAction(ISD::SEXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::EXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::ZEXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::SEXTLOAD, MVT::i1, Promote); setOperationAction(ISD::ADD, MVT::i1, Promote); setOperationAction(ISD::ADD, MVT::i8, Legal); Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=57526&r1=57525&r2=57526&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Tue Oct 14 16:26:46 2008 @@ -53,8 +53,8 @@ addRegisterClass(MVT::f64, PPC::F8RCRegisterClass); // PowerPC has an i16 but no i8 (or i1) SEXTLOAD - setLoadXAction(ISD::SEXTLOAD, MVT::i1, Promote); - setLoadXAction(ISD::SEXTLOAD, MVT::i8, Expand); + setLoadExtAction(ISD::SEXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::SEXTLOAD, MVT::i8, Expand); setTruncStoreAction(MVT::f64, MVT::f32, Expand); Modified: llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp?rev=57526&r1=57525&r2=57526&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp Tue Oct 14 16:26:46 2008 @@ -515,9 +515,9 @@ addRegisterClass(MVT::f64, SP::DFPRegsRegisterClass); // Turn FP extload into load/fextend - setLoadXAction(ISD::EXTLOAD, MVT::f32, Expand); + setLoadExtAction(ISD::EXTLOAD, MVT::f32, Expand); // Sparc doesn't have i1 sign extending load - setLoadXAction(ISD::SEXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::SEXTLOAD, MVT::i1, Promote); // Turn FP truncstore into trunc + store. setTruncStoreAction(MVT::f64, MVT::f32, Expand); Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=57526&r1=57525&r2=57526&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Oct 14 16:26:46 2008 @@ -84,7 +84,7 @@ if (Subtarget->is64Bit()) addRegisterClass(MVT::i64, X86::GR64RegisterClass); - setLoadXAction(ISD::SEXTLOAD, MVT::i1, Promote); + setLoadExtAction(ISD::SEXTLOAD, MVT::i1, Promote); // We don't accept any truncstore of integer registers. setTruncStoreAction(MVT::i64, MVT::i32, Expand); From gohman at apple.com Tue Oct 14 16:52:37 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 14 Oct 2008 21:52:37 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57527 - /llvm-gcc-4.2/trunk/gcc/except.c Message-ID: <200810142152.m9ELqcmF027774@zion.cs.uiuc.edu> Author: djg Date: Tue Oct 14 16:52:37 2008 New Revision: 57527 URL: http://llvm.org/viewvc/llvm-project?rev=57527&view=rev Log: Fix the generated declaration of _Unwind_Resume and friends to not use '...' in its argument list. This allows fast-isel to codegen it, and it avoids the need for %al to be set to 0 on x86-64. Modified: llvm-gcc-4.2/trunk/gcc/except.c Modified: llvm-gcc-4.2/trunk/gcc/except.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/except.c?rev=57527&r1=57526&r2=57527&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/except.c (original) +++ llvm-gcc-4.2/trunk/gcc/except.c Tue Oct 14 16:52:37 2008 @@ -4079,13 +4079,25 @@ /* The default c++ routines aren't actually c++ specific, so use those. */ /* LLVM LOCAL begin */ #ifdef ENABLE_LLVM - llvm_unwind_resume_libfunc = llvm_init_one_libfunc ( USING_SJLJ_EXCEPTIONS ? - "_Unwind_SjLj_Resume" + /* Create the decl with build_decl instead of using llvm_init_one_libfunc + so that we can specify an argument type instead of just using '...'. + '...' is functionally correct, but more work for codegen to handle, + and even requires additional instructions on some targets. */ + const char *name = USING_SJLJ_EXCEPTIONS ? + "_Unwind_SjLj_Resume" #ifdef LLVM_STACKSENSITIVE_UNWIND_RESUME - : "_Unwind_Resume_or_Rethrow"); + : "_Unwind_Resume_or_Rethrow"; #else - : "_Unwind_Resume"); + : "_Unwind_Resume"; #endif + tree decl = build_decl (FUNCTION_DECL, get_identifier (name), + build_function_type (void_type_node, + tree_cons (0, ptr_type_node, + void_list_node))); + DECL_ARTIFICIAL (decl) = 1; + DECL_EXTERNAL (decl) = 1; + TREE_PUBLIC (decl) = 1; + llvm_unwind_resume_libfunc = decl; #else unwind_resume_libfunc = init_one_libfunc ( USING_SJLJ_EXCEPTIONS ? "_Unwind_SjLj_Resume" From dalej at apple.com Tue Oct 14 17:06:34 2008 From: dalej at apple.com (Dale Johannesen) Date: Tue, 14 Oct 2008 22:06:34 -0000 Subject: [llvm-commits] [llvm] r57528 - /llvm/trunk/lib/Target/X86/X86.td Message-ID: <200810142206.m9EM6Yjj028271@zion.cs.uiuc.edu> Author: johannes Date: Tue Oct 14 17:06:33 2008 New Revision: 57528 URL: http://llvm.org/viewvc/llvm-project?rev=57528&view=rev Log: Accept -march=i586, because gcc does (a synonym for pentium). Fixes gcc.target/i386/20000720-1.c gcc.target/i386/pr26826.c Modified: llvm/trunk/lib/Target/X86/X86.td Modified: llvm/trunk/lib/Target/X86/X86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86.td?rev=57528&r1=57527&r2=57528&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86.td (original) +++ llvm/trunk/lib/Target/X86/X86.td Tue Oct 14 17:06:33 2008 @@ -59,6 +59,7 @@ def : Proc<"generic", []>; def : Proc<"i386", []>; def : Proc<"i486", []>; +def : Proc<"i586", []>; def : Proc<"pentium", []>; def : Proc<"pentium-mmx", [FeatureMMX]>; def : Proc<"i686", []>; From dalej at apple.com Tue Oct 14 17:39:36 2008 From: dalej at apple.com (Dale Johannesen) Date: Tue, 14 Oct 2008 22:39:36 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57530 - /llvm-gcc-4.2/trunk/gcc/testsuite/gcc.target/i386/pic-1.c Message-ID: <200810142239.m9EMdaNw029312@zion.cs.uiuc.edu> Author: johannes Date: Tue Oct 14 17:39:36 2008 New Revision: 57530 URL: http://llvm.org/viewvc/llvm-project?rev=57530&view=rev Log: llvm doesn't reserve EBX as the pic register, so there's no reason to consider this code erroneous. Modified: llvm-gcc-4.2/trunk/gcc/testsuite/gcc.target/i386/pic-1.c Modified: llvm-gcc-4.2/trunk/gcc/testsuite/gcc.target/i386/pic-1.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.target/i386/pic-1.c?rev=57530&r1=57529&r2=57530&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/testsuite/gcc.target/i386/pic-1.c (original) +++ llvm-gcc-4.2/trunk/gcc/testsuite/gcc.target/i386/pic-1.c Tue Oct 14 17:39:36 2008 @@ -7,7 +7,10 @@ { static int a; - __asm__ __volatile__ ( /* { dg-error "PIC register" } */ +/* LLVM LOCAL begin we don't reserve EBX as the pic register, it's variable, +/* so there is no reason this code shouldn't work. dg-error removed. */ + __asm__ __volatile__ ( +/* LLVM LOCAL end */ "xorl %%ebx, %%ebx\n" "movl %%ebx, %0\n" : "=m" (a) From alenhar2 at cs.uiuc.edu Tue Oct 14 17:44:04 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 14 Oct 2008 22:44:04 -0000 Subject: [llvm-commits] [poolalloc] r57531 - /poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Message-ID: <200810142244.m9EMi4Nw029455@zion.cs.uiuc.edu> Author: alenhar2 Date: Tue Oct 14 17:44:04 2008 New Revision: 57531 URL: http://llvm.org/viewvc/llvm-project?rev=57531&view=rev Log: Fix for external main Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=57531&r1=57530&r2=57531&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original) +++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Tue Oct 14 17:44:04 2008 @@ -48,7 +48,7 @@ unsigned NextID = 1; Function *MainFunc = M.getFunction("main"); - if (MainFunc) { + if (MainFunc && !MainFunc->isDeclaration()) { calculateGraphs(MainFunc, Stack, NextID, ValMap); CloneAuxIntoGlobal(getDSGraph(*MainFunc)); } else { From alenhar2 at cs.uiuc.edu Tue Oct 14 17:44:28 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 14 Oct 2008 22:44:28 -0000 Subject: [llvm-commits] [poolalloc] r57532 - /poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h Message-ID: <200810142244.m9EMiSJJ029489@zion.cs.uiuc.edu> Author: alenhar2 Date: Tue Oct 14 17:44:27 2008 New Revision: 57532 URL: http://llvm.org/viewvc/llvm-project?rev=57532&view=rev Log: fast check for when slab managers and stacked Modified: poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h Modified: poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h?rev=57532&r1=57531&r2=57532&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h (original) +++ poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h Tue Oct 14 17:44:27 2008 @@ -68,8 +68,15 @@ bool slab_valid(void* obj) { return objs.find(obj); } + bool slab_contains(void* obj) { + return objs.find(obj); + } bool slab_getbounds(void* obj, void*& start, void*& end) { return objs.find(obj, start, end); - } + } +}; + +template +class BitMaskSlabManager { }; From alenhar2 at cs.uiuc.edu Tue Oct 14 17:51:02 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 14 Oct 2008 22:51:02 -0000 Subject: [llvm-commits] [poolalloc] r57533 - /poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Message-ID: <200810142251.m9EMp24L029717@zion.cs.uiuc.edu> Author: alenhar2 Date: Tue Oct 14 17:51:02 2008 New Revision: 57533 URL: http://llvm.org/viewvc/llvm-project?rev=57533&view=rev Log: just because the Globals graph has the pointer doesn't mean it has a call site for that pointer Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=57533&r1=57532&r2=57533&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original) +++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Tue Oct 14 17:51:02 2008 @@ -360,8 +360,10 @@ if (GGii->getCallSite().getInstruction()->getOperand(0) == ii->getCallSite().getInstruction()->getOperand(0)) break; - assert (GGii != GG.afc_end() && "Callsite should exist but doesn't"); - RC.cloneCallSite(*ii).mergeWith(*GGii); + if (GGii != GG.afc_end()) + RC.cloneCallSite(*ii).mergeWith(*GGii); + else + GG.getAuxFunctionCalls().push_front(RC.cloneCallSite(*ii)); } else { GG.getAuxFunctionCalls().push_front(RC.cloneCallSite(*ii)); } From daniel at zuster.org Tue Oct 14 18:24:01 2008 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 14 Oct 2008 23:24:01 -0000 Subject: [llvm-commits] [llvm] r57534 - /llvm/trunk/Xcode/LLVM.xcodeproj/project.pbxproj Message-ID: <200810142324.m9ENO1hb030914@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Oct 14 18:23:59 2008 New Revision: 57534 URL: http://llvm.org/viewvc/llvm-project?rev=57534&view=rev Log: Remove Stacker.html from Xcode project. Modified: llvm/trunk/Xcode/LLVM.xcodeproj/project.pbxproj Modified: llvm/trunk/Xcode/LLVM.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Xcode/LLVM.xcodeproj/project.pbxproj?rev=57534&r1=57533&r2=57534&view=diff ============================================================================== --- llvm/trunk/Xcode/LLVM.xcodeproj/project.pbxproj (original) +++ llvm/trunk/Xcode/LLVM.xcodeproj/project.pbxproj Tue Oct 14 18:23:59 2008 @@ -1035,7 +1035,6 @@ DE66F3F308ABF35D00323D32 /* Projects.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = Projects.html; sourceTree = ""; }; DE66F3F408ABF35D00323D32 /* ReleaseNotes.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = ReleaseNotes.html; sourceTree = ""; }; DE66F3F508ABF35D00323D32 /* SourceLevelDebugging.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = SourceLevelDebugging.html; sourceTree = ""; }; - DE66F3F608ABF35D00323D32 /* Stacker.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = Stacker.html; sourceTree = ""; }; DE66F3F708ABF35D00323D32 /* SystemLibrary.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = SystemLibrary.html; sourceTree = ""; }; DE66F3F808ABF35D00323D32 /* TableGenFundamentals.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = TableGenFundamentals.html; sourceTree = ""; }; DE66F3F908ABF35D00323D32 /* TestingGuide.html */ = {isa = PBXFileReference; explicitFileType = text.html.documentation; fileEncoding = 30; path = TestingGuide.html; sourceTree = ""; }; @@ -2688,7 +2687,6 @@ DE66F3F308ABF35D00323D32 /* Projects.html */, DE66F3F408ABF35D00323D32 /* ReleaseNotes.html */, DE66F3F508ABF35D00323D32 /* SourceLevelDebugging.html */, - DE66F3F608ABF35D00323D32 /* Stacker.html */, DE66F3F708ABF35D00323D32 /* SystemLibrary.html */, DE66F3F808ABF35D00323D32 /* TableGenFundamentals.html */, DE66F3F908ABF35D00323D32 /* TestingGuide.html */, From daniel at zuster.org Tue Oct 14 18:25:09 2008 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 14 Oct 2008 23:25:09 -0000 Subject: [llvm-commits] [llvm] r57535 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810142325.m9ENP9Ng030955@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Oct 14 18:25:09 2008 New Revision: 57535 URL: http://llvm.org/viewvc/llvm-project?rev=57535&view=rev Log: Add some ReleaseNotes on clang codegen. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57535&r1=57534&r2=57535&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Oct 14 18:25:09 2008 @@ -98,7 +98,29 @@ yet production quality, it is progressing very nicely. In addition, C++ front-end work has started to make significant progress.

                                                                      -

                                                                      Codegen progress/state [DANIEL]

                                                                      +Clang, in conjunction with the ccc driver, is now usable as a +replacement for gcc for building some small- to medium-sized C applications. +Additionally, Clang now has code generation support for Objective-C on Mac OS X +platform. Major highlights include: +
                                                                        +
                                                                      • Clang/ccc pass almost all of the LLVM test suite on Mac OS X and Linux +on the 32-bit x86 architecture. This includes significant C +applications such as sqlite3, +lua, and +Clam AntiVirus. + +
                                                                      • Clang can build the majority of Objective-C examples shipped with the +Mac OS X Developer Tools. +
                                                                      + +Clang code generation still needs considerable testing and development, however. +Some areas under active development include: +
                                                                        +
                                                                      • Improved support for C and Objective-C features, for example + variable-length arries, va_arg, exception handling (Obj-C), and garbage + collection (Obj-C). +
                                                                      • ABI compatibility, especially for platforms other than 32-bit x86. +
                                                                      From daniel at zuster.org Tue Oct 14 18:26:20 2008 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 14 Oct 2008 23:26:20 -0000 Subject: [llvm-commits] [llvm] r57536 - /llvm/trunk/include/llvm/ADT/StringExtras.h Message-ID: <200810142326.m9ENQKIt030997@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Oct 14 18:26:20 2008 New Revision: 57536 URL: http://llvm.org/viewvc/llvm-project?rev=57536&view=rev Log: Add llvm::hexdigit to StringExtras (number -> hexadecimal char) Modified: llvm/trunk/include/llvm/ADT/StringExtras.h Modified: llvm/trunk/include/llvm/ADT/StringExtras.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringExtras.h?rev=57536&r1=57535&r2=57536&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/StringExtras.h (original) +++ llvm/trunk/include/llvm/ADT/StringExtras.h Tue Oct 14 18:26:20 2008 @@ -23,6 +23,12 @@ namespace llvm { +/// hexdigit - Return the (uppercase) hexadecimal character for the +/// given number \arg X (which should be less than 16). +static inline char hexdigit(unsigned X) { + return X < 10 ? '0' + X : 'A' + X - 10; +} + static inline std::string utohexstr(uint64_t X) { char Buffer[40]; char *BufPtr = Buffer+39; @@ -32,10 +38,7 @@ while (X) { unsigned char Mod = static_cast(X) & 15; - if (Mod < 10) - *--BufPtr = '0' + Mod; - else - *--BufPtr = 'A' + Mod-10; + *--BufPtr = hexdigit(Mod); X >>= 4; } return std::string(BufPtr); From daniel at zuster.org Tue Oct 14 18:28:10 2008 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 14 Oct 2008 23:28:10 -0000 Subject: [llvm-commits] [llvm] r57537 - /llvm/trunk/lib/VMCore/AsmWriter.cpp Message-ID: <200810142328.m9ENSAxP031066@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Oct 14 18:28:09 2008 New Revision: 57537 URL: http://llvm.org/viewvc/llvm-project?rev=57537&view=rev Log: Change getLLVMName to use raw_ostream & PrintLLVMName. - Avoids duplicated quotification code. - Remove QuoteNameIfNeeded. - No functionality change. Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=57537&r1=57536&r2=57537&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/AsmWriter.cpp (original) +++ llvm/trunk/lib/VMCore/AsmWriter.cpp Tue Oct 14 18:28:09 2008 @@ -68,58 +68,11 @@ return 0; } - -/// NameNeedsQuotes - Return true if the specified llvm name should be wrapped -/// with ""'s. -static std::string QuoteNameIfNeeded(const std::string &Name) { - std::string result; - bool needsQuotes = Name[0] >= '0' && Name[0] <= '9'; - // Scan the name to see if it needs quotes and to replace funky chars with - // their octal equivalent. - for (unsigned i = 0, e = Name.size(); i != e; ++i) { - char C = Name[i]; - assert(C != '"' && "Illegal character in LLVM value name!"); - if (isalnum(C) || C == '-' || C == '.' || C == '_') - result += C; - else if (C == '\\') { - needsQuotes = true; - result += "\\\\"; - } else if (isprint(C)) { - needsQuotes = true; - result += C; - } else { - needsQuotes = true; - result += "\\"; - char hex1 = (C >> 4) & 0x0F; - if (hex1 < 10) - result += hex1 + '0'; - else - result += hex1 - 10 + 'A'; - char hex2 = C & 0x0F; - if (hex2 < 10) - result += hex2 + '0'; - else - result += hex2 - 10 + 'A'; - } - } - if (needsQuotes) { - result.insert(0,"\""); - result += '"'; - } - return result; -} - -/// getLLVMName - Turn the specified string into an 'LLVM name', which is -/// surrounded with ""'s and escaped if it has special chars in it. -static std::string getLLVMName(const std::string &Name) { - assert(!Name.empty() && "Cannot get empty name!"); - return QuoteNameIfNeeded(Name); -} - enum PrefixType { GlobalPrefix, LabelPrefix, - LocalPrefix + LocalPrefix, + NoPrefix }; /// PrintLLVMName - Turn the specified name into an 'LLVM name', which is either @@ -130,6 +83,7 @@ assert(NameStr && "Cannot get empty name!"); switch (Prefix) { default: assert(0 && "Bad prefix!"); + case NoPrefix: break; case GlobalPrefix: OS << '@'; break; case LabelPrefix: break; case LocalPrefix: OS << '%'; break; @@ -165,21 +119,23 @@ OS << C; } else { OS << '\\'; - char hex1 = (C >> 4) & 0x0F; - if (hex1 < 10) - OS << (char)(hex1 + '0'); - else - OS << (char)(hex1 - 10 + 'A'); - char hex2 = C & 0x0F; - if (hex2 < 10) - OS << (char)(hex2 + '0'); - else - OS << (char)(hex2 - 10 + 'A'); + OS << hexdigit((C >> 4) & 0x0F); + OS << hexdigit((C >> 0) & 0x0F); } } OS << '"'; } +/// getLLVMName - Turn the specified string into an 'LLVM name', which is +/// surrounded with ""'s and escaped if it has special chars in it. +static std::string getLLVMName(const std::string &Name) { + assert(!Name.empty() && "Cannot get empty name!"); + std::string result; + raw_string_ostream OS(result); + PrintLLVMName(OS, Name.c_str(), Name.length(), NoPrefix); + return OS.str(); +} + /// PrintLLVMName - Turn the specified name into an 'LLVM name', which is either /// prefixed with % (if the string only contains simple characters) or is /// surrounded with ""'s (if it has special chars in it). Print it out. From daniel at zuster.org Tue Oct 14 18:51:44 2008 From: daniel at zuster.org (Daniel Dunbar) Date: Tue, 14 Oct 2008 23:51:44 -0000 Subject: [llvm-commits] [llvm] r57538 - in /llvm/trunk: docs/LangRef.html lib/VMCore/AsmWriter.cpp test/Assembler/2008-10-14-QuoteInName.ll Message-ID: <200810142351.m9ENpimx031878@zion.cs.uiuc.edu> Author: ddunbar Date: Tue Oct 14 18:51:43 2008 New Revision: 57538 URL: http://llvm.org/viewvc/llvm-project?rev=57538&view=rev Log: Prevent assert when using '"' in names (via hexadecimal). Update LangRef to mention \xx quoting in names. Added: llvm/trunk/test/Assembler/2008-10-14-QuoteInName.ll Modified: llvm/trunk/docs/LangRef.html llvm/trunk/lib/VMCore/AsmWriter.cpp Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=57538&r1=57537&r2=57538&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Tue Oct 14 18:51:43 2008 @@ -335,8 +335,9 @@ For example, %foo, @DivisionByZero, %a.really.long.identifier. The actual regular expression used is '[%@][a-zA-Z$._][a-zA-Z$._0-9]*'. Identifiers which require other characters in their names can be surrounded - with quotes. In this way, anything except a " character can - be used in a named value.
                                                                    • + with quotes. Special characters may be escaped using "\xx" where xx is the + ASCII code for the character in hexadecimal. In this way, any character can + be used in a name value, even quotes themselves.
                                                                    • Unnamed values are represented as an unsigned numeric value with their prefix. For example, %12, @2, %44.
                                                                    • Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=57538&r1=57537&r2=57538&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/AsmWriter.cpp (original) +++ llvm/trunk/lib/VMCore/AsmWriter.cpp Tue Oct 14 18:51:43 2008 @@ -112,10 +112,9 @@ OS << '"'; for (unsigned i = 0; i != NameLen; ++i) { char C = NameStr[i]; - assert(C != '"' && "Illegal character in LLVM value name!"); if (C == '\\') { OS << "\\\\"; - } else if (isprint(C)) { + } else if (C != '"' && isprint(C)) { OS << C; } else { OS << '\\'; Added: llvm/trunk/test/Assembler/2008-10-14-QuoteInName.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2008-10-14-QuoteInName.ll?rev=57538&view=auto ============================================================================== --- llvm/trunk/test/Assembler/2008-10-14-QuoteInName.ll (added) +++ llvm/trunk/test/Assembler/2008-10-14-QuoteInName.ll Tue Oct 14 18:51:43 2008 @@ -0,0 +1,3 @@ +; RUN: llvm-as < %s | llvm-dis | grep "quote" + +@"a\22quote" = global i32 0 From gohman at apple.com Tue Oct 14 18:54:12 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 14 Oct 2008 23:54:12 -0000 Subject: [llvm-commits] [llvm] r57539 - in /llvm/trunk: include/llvm/CodeGen/FastISel.h include/llvm/CodeGen/SelectionDAGISel.h include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/FastISel.cpp lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp lib/Target/X86/X86FastISel.cpp lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h Message-ID: <200810142354.m9ENsC2M031970@zion.cs.uiuc.edu> Author: djg Date: Tue Oct 14 18:54:11 2008 New Revision: 57539 URL: http://llvm.org/viewvc/llvm-project?rev=57539&view=rev Log: FastISel support for exception-handling constructs. - Move the EH landing-pad code and adjust it so that it works with FastISel as well as with SDISel. - Add FastISel support for @llvm.eh.exception and @llvm.eh.selector. Modified: llvm/trunk/include/llvm/CodeGen/FastISel.h llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/trunk/lib/Target/X86/X86FastISel.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.h Modified: llvm/trunk/include/llvm/CodeGen/FastISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/FastISel.h?rev=57539&r1=57538&r2=57539&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/FastISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/FastISel.h Tue Oct 14 18:54:11 2008 @@ -16,12 +16,14 @@ #include "llvm/BasicBlock.h" #include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/CodeGen/SelectionDAGNodes.h" namespace llvm { class AllocaInst; class ConstantFP; +class Instruction; class MachineBasicBlock; class MachineConstantPool; class MachineFunction; @@ -44,6 +46,9 @@ DenseMap &ValueMap; DenseMap &MBBMap; DenseMap &StaticAllocaMap; +#ifndef NDEBUG + SmallSet &CatchInfoLost; +#endif MachineFunction &MF; MachineModuleInfo *MMI; MachineRegisterInfo &MRI; @@ -108,7 +113,11 @@ MachineModuleInfo *mmi, DenseMap &vm, DenseMap &bm, - DenseMap &am); + DenseMap &am +#ifndef NDEBUG + , SmallSet &cil +#endif + ); /// FastEmit_r - This method is called by target-independent code /// to request that an instruction with the given type and opcode Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=57539&r1=57538&r2=57539&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Tue Oct 14 18:54:11 2008 @@ -30,6 +30,7 @@ class MachineInstr; class MachineModuleInfo; class TargetLowering; + class TargetInstrInfo; class FunctionLoweringInfo; class HazardRecognizer; class GCFunctionInfo; @@ -107,7 +108,8 @@ private: void SelectAllBasicBlocks(Function &Fn, MachineFunction &MF, - MachineModuleInfo *MMI); + MachineModuleInfo *MMI, + const TargetInstrInfo &TII); void FinishBasicBlock(); void SelectBasicBlock(BasicBlock *LLVMBB, Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=57539&r1=57538&r2=57539&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Tue Oct 14 18:54:11 2008 @@ -28,6 +28,7 @@ #include "llvm/CodeGen/RuntimeLibcalls.h" #include "llvm/ADT/APFloat.h" #include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/ADT/STLExtras.h" #include #include @@ -1124,7 +1125,11 @@ MachineModuleInfo *, DenseMap &, DenseMap &, - DenseMap &) { + DenseMap & +#ifndef NDEBUG + , SmallSet &CatchInfoLost +#endif + ) { return 0; } Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=57539&r1=57538&r2=57539&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Tue Oct 14 18:54:11 2008 @@ -51,6 +51,7 @@ #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetLowering.h" #include "llvm/Target/TargetMachine.h" +#include "SelectionDAGBuild.h" using namespace llvm; unsigned FastISel::getRegForValue(Value *V) { @@ -379,6 +380,66 @@ } return true; } + case Intrinsic::eh_exception: { + MVT VT = TLI.getValueType(I->getType()); + switch (TLI.getOperationAction(ISD::EXCEPTIONADDR, VT)) { + default: break; + case TargetLowering::Expand: { + if (!MBB->isLandingPad()) { + // FIXME: Mark exception register as live in. Hack for PR1508. + unsigned Reg = TLI.getExceptionAddressRegister(); + if (Reg) MBB->addLiveIn(Reg); + } + unsigned Reg = TLI.getExceptionAddressRegister(); + const TargetRegisterClass *RC = TLI.getRegClassFor(VT); + unsigned ResultReg = createResultReg(RC); + bool InsertedCopy = TII.copyRegToReg(*MBB, MBB->end(), ResultReg, + Reg, RC, RC); + assert(InsertedCopy && "Can't copy address registers!"); + UpdateValueMap(I, ResultReg); + return true; + } + } + break; + } + case Intrinsic::eh_selector_i32: + case Intrinsic::eh_selector_i64: { + MVT VT = TLI.getValueType(I->getType()); + switch (TLI.getOperationAction(ISD::EHSELECTION, VT)) { + default: break; + case TargetLowering::Expand: { + MVT VT = (IID == Intrinsic::eh_selector_i32 ? + MVT::i32 : MVT::i64); + + if (MMI) { + if (MBB->isLandingPad()) + AddCatchInfo(*cast(I), MMI, MBB); + else { +#ifndef NDEBUG + CatchInfoLost.insert(cast(I)); +#endif + // FIXME: Mark exception selector register as live in. Hack for PR1508. + unsigned Reg = TLI.getExceptionSelectorRegister(); + if (Reg) MBB->addLiveIn(Reg); + } + + unsigned Reg = TLI.getExceptionSelectorRegister(); + const TargetRegisterClass *RC = TLI.getRegClassFor(VT); + unsigned ResultReg = createResultReg(RC); + bool InsertedCopy = TII.copyRegToReg(*MBB, MBB->end(), ResultReg, + Reg, RC, RC); + assert(InsertedCopy && "Can't copy address registers!"); + UpdateValueMap(I, ResultReg); + } else { + unsigned ResultReg = + getRegForValue(Constant::getNullValue(I->getType())); + UpdateValueMap(I, ResultReg); + } + return true; + } + } + break; + } } return false; } @@ -607,11 +668,18 @@ MachineModuleInfo *mmi, DenseMap &vm, DenseMap &bm, - DenseMap &am) + DenseMap &am +#ifndef NDEBUG + , SmallSet &cil +#endif + ) : MBB(0), ValueMap(vm), MBBMap(bm), StaticAllocaMap(am), +#ifndef NDEBUG + CatchInfoLost(cil), +#endif MF(mf), MMI(mmi), MRI(MF.getRegInfo()), Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=57539&r1=57538&r2=57539&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Oct 14 18:54:11 2008 @@ -314,7 +314,7 @@ // Mark landing pad. FuncInfo->MBBMap[Invoke->getSuccessor(1)]->setIsLandingPad(); - SelectAllBasicBlocks(Fn, MF, MMI); + SelectAllBasicBlocks(Fn, MF, MMI, TII); // If the first basic block in the function has live ins that need to be // copied into vregs, emit the copies into the top of the block before @@ -452,48 +452,6 @@ BasicBlock::iterator End) { SDL->setCurrentBasicBlock(BB); - MachineModuleInfo *MMI = CurDAG->getMachineModuleInfo(); - - if (MMI && BB->isLandingPad()) { - // Add a label to mark the beginning of the landing pad. Deletion of the - // landing pad can thus be detected via the MachineModuleInfo. - unsigned LabelID = MMI->addLandingPad(BB); - CurDAG->setRoot(CurDAG->getLabel(ISD::EH_LABEL, - CurDAG->getEntryNode(), LabelID)); - - // Mark exception register as live in. - unsigned Reg = TLI.getExceptionAddressRegister(); - if (Reg) BB->addLiveIn(Reg); - - // Mark exception selector register as live in. - Reg = TLI.getExceptionSelectorRegister(); - if (Reg) BB->addLiveIn(Reg); - - // FIXME: Hack around an exception handling flaw (PR1508): the personality - // function and list of typeids logically belong to the invoke (or, if you - // like, the basic block containing the invoke), and need to be associated - // with it in the dwarf exception handling tables. Currently however the - // information is provided by an intrinsic (eh.selector) that can be moved - // to unexpected places by the optimizers: if the unwind edge is critical, - // then breaking it can result in the intrinsics being in the successor of - // the landing pad, not the landing pad itself. This results in exceptions - // not being caught because no typeids are associated with the invoke. - // This may not be the only way things can go wrong, but it is the only way - // we try to work around for the moment. - BranchInst *Br = dyn_cast(LLVMBB->getTerminator()); - - if (Br && Br->isUnconditional()) { // Critical edge? - BasicBlock::iterator I, E; - for (I = LLVMBB->begin(), E = --LLVMBB->end(); I != E; ++I) - if (isa(I)) - break; - - if (I == E) - // No catch info found - try to extract some from the successor. - copyCatchInfo(Br->getSuccessor(0), LLVMBB, MMI, *FuncInfo); - } - } - // Lower all of the non-terminator instructions. for (BasicBlock::iterator I = Begin; I != End; ++I) if (!isa(I)) @@ -708,14 +666,19 @@ } void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF, - MachineModuleInfo *MMI) { + MachineModuleInfo *MMI, + const TargetInstrInfo &TII) { // Initialize the Fast-ISel state, if needed. FastISel *FastIS = 0; if (EnableFastISel) FastIS = TLI.createFastISel(*FuncInfo->MF, MMI, FuncInfo->ValueMap, FuncInfo->MBBMap, - FuncInfo->StaticAllocaMap); + FuncInfo->StaticAllocaMap +#ifndef NDEBUG + , FuncInfo->CatchInfoLost +#endif + ); // Iterate over all basic blocks in the function. for (Function::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) { @@ -746,9 +709,49 @@ } } + if (MMI && BB->isLandingPad()) { + // Add a label to mark the beginning of the landing pad. Deletion of the + // landing pad can thus be detected via the MachineModuleInfo. + unsigned LabelID = MMI->addLandingPad(BB); + + const TargetInstrDesc &II = TII.get(TargetInstrInfo::EH_LABEL); + BuildMI(BB, II).addImm(LabelID); + + // Mark exception register as live in. + unsigned Reg = TLI.getExceptionAddressRegister(); + if (Reg) BB->addLiveIn(Reg); + + // Mark exception selector register as live in. + Reg = TLI.getExceptionSelectorRegister(); + if (Reg) BB->addLiveIn(Reg); + + // FIXME: Hack around an exception handling flaw (PR1508): the personality + // function and list of typeids logically belong to the invoke (or, if you + // like, the basic block containing the invoke), and need to be associated + // with it in the dwarf exception handling tables. Currently however the + // information is provided by an intrinsic (eh.selector) that can be moved + // to unexpected places by the optimizers: if the unwind edge is critical, + // then breaking it can result in the intrinsics being in the successor of + // the landing pad, not the landing pad itself. This results in exceptions + // not being caught because no typeids are associated with the invoke. + // This may not be the only way things can go wrong, but it is the only way + // we try to work around for the moment. + BranchInst *Br = dyn_cast(LLVMBB->getTerminator()); + + if (Br && Br->isUnconditional()) { // Critical edge? + BasicBlock::iterator I, E; + for (I = LLVMBB->begin(), E = --LLVMBB->end(); I != E; ++I) + if (isa(I)) + break; + + if (I == E) + // No catch info found - try to extract some from the successor. + copyCatchInfo(Br->getSuccessor(0), LLVMBB, MMI, *FuncInfo); + } + } + // Before doing SelectionDAG ISel, see if FastISel has been requested. - // FastISel doesn't support EH landing pads, which require special handling. - if (FastIS && !SuppressFastISel && !BB->isLandingPad()) { + if (FastIS && !SuppressFastISel) { // Emit code for any incoming arguments. This must happen before // beginning FastISel on the entry block. if (LLVMBB == &Fn.getEntryBlock()) { Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=57539&r1=57538&r2=57539&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original) +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Tue Oct 14 18:54:11 2008 @@ -52,8 +52,16 @@ MachineModuleInfo *mmi, DenseMap &vm, DenseMap &bm, - DenseMap &am) - : FastISel(mf, mmi, vm, bm, am) { + DenseMap &am +#ifndef NDEBUG + , SmallSet &cil +#endif + ) + : FastISel(mf, mmi, vm, bm, am +#ifndef NDEBUG + , cil +#endif + ) { Subtarget = &TM.getSubtarget(); StackPtr = Subtarget->is64Bit() ? X86::RSP : X86::ESP; X86ScalarSSEf64 = Subtarget->hasSSE2(); @@ -1391,7 +1399,15 @@ MachineModuleInfo *mmi, DenseMap &vm, DenseMap &bm, - DenseMap &am) { - return new X86FastISel(mf, mmi, vm, bm, am); + DenseMap &am +#ifndef NDEBUG + , SmallSet &cil +#endif + ) { + return new X86FastISel(mf, mmi, vm, bm, am +#ifndef NDEBUG + , cil +#endif + ); } } Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=57539&r1=57538&r2=57539&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Oct 14 18:54:11 2008 @@ -1884,9 +1884,16 @@ DenseMap &vm, DenseMap &bm, - DenseMap &am) { - - return X86::createFastISel(mf, mmo, vm, bm, am); + DenseMap &am +#ifndef NDEBUG + , SmallSet &cil +#endif + ) { + return X86::createFastISel(mf, mmo, vm, bm, am +#ifndef NDEBUG + , cil +#endif + ); } Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=57539&r1=57538&r2=57539&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Tue Oct 14 18:54:11 2008 @@ -493,7 +493,11 @@ MachineModuleInfo *mmi, DenseMap &, DenseMap &, - DenseMap &); + DenseMap & +#ifndef NDEBUG + , SmallSet & +#endif + ); private: /// Subtarget - Keep a pointer to the X86Subtarget around so that we can @@ -638,7 +642,11 @@ MachineModuleInfo *mmi, DenseMap &, DenseMap &, - DenseMap &); + DenseMap & +#ifndef NDEBUG + , SmallSet & +#endif + ); } } From clattner at apple.com Tue Oct 14 19:28:52 2008 From: clattner at apple.com (Chris Lattner) Date: Tue, 14 Oct 2008 17:28:52 -0700 Subject: [llvm-commits] [llvm] r57524 - in /llvm/trunk/lib/Target/ARM: ARMInstrFormats.td ARMInstrInfo.td In-Reply-To: <200810142036.m9EKaO7V025116@zion.cs.uiuc.edu> References: <200810142036.m9EKaO7V025116@zion.cs.uiuc.edu> Message-ID: On Oct 14, 2008, at 1:36 PM, Jim Grosbach wrote: > Author: grosbach > Date: Tue Oct 14 15:36:24 2008 > New Revision: 57524 > > URL: http://llvm.org/viewvc/llvm-project?rev=57524&view=rev > Log: > Update ARM Insn encoding to get endian-ness to match the > documentation (31-0 left to right) Nice! > -defm ADD : AsI1_bin_irs<{0,0,1,0}, "add", > +defm ADD : AsI1_bin_irs<0b0100, "add", > BinOpFrag<(add node:$LHS, node:$RHS)>>; This is a major improvement, thanks Jim, -Chris From clattner at apple.com Tue Oct 14 19:33:08 2008 From: clattner at apple.com (Chris Lattner) Date: Tue, 14 Oct 2008 17:33:08 -0700 Subject: [llvm-commits] [llvm] r57517 - /llvm/trunk/docs/ReleaseNotes.html In-Reply-To: <200810141923.m9EJN4BF022680@zion.cs.uiuc.edu> References: <200810141923.m9EJN4BF022680@zion.cs.uiuc.edu> Message-ID: On Oct 14, 2008, at 12:23 PM, Nicolas Geoffray wrote: > Author: geoffray > Date: Tue Oct 14 14:23:04 2008 > New Revision: 57517 > > URL: http://llvm.org/viewvc/llvm-project?rev=57517&view=rev > Log: > Add VMKit notes. Thanks Nicolas! One minor change, please don't cite the person who did the change, just say 'this release includes'. For better or worse, we don't thank individual people in the release notes. -Chris > > > > Modified: > llvm/trunk/docs/ReleaseNotes.html > > Modified: llvm/trunk/docs/ReleaseNotes.html > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57517&r1=57516&r2=57517&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/docs/ReleaseNotes.html (original) > +++ llvm/trunk/docs/ReleaseNotes.html Tue Oct 14 14:23:04 2008 > @@ -77,7 +77,7 @@ > supporting tools) and the llvm-gcc repository. In addition to this > code, the > LLVM Project includes other sub-projects that are in development. > The two which > are the most actively developed are the Clang > Project and > -the vmkit Project. > +the VMKit Project. >

                                                                      > > > @@ -137,17 +137,35 @@ > > > > >
                                                                      >

                                                                      > -The vmkit project is an > implementation of > +The VMKit project is an > implementation of > a JVM and a CLI Virtual Machines (Microsoft .NET is an > implementation of the CLI) using the Just-In-Time compiler of LLVM. p> > > -

                                                                      [NICOLAS]

                                                                      > +

                                                                      Following LLVM 2.4, VMKit has its first release 0.24 that you > can find on > +the release page. The > release includes > +bug fixes, cleanup and new features. The major changes include:

                                                                      > > +
                                                                        > + > +
                                                                      • Support for generics in the .Net virtual machine. This was > implemented > +by Tilmann Scheller during his Google Summer of Code project.

                                                                      • p> > +
                                                                      • Initial support for the Mono class libraries.

                                                                      • > +
                                                                      • Support for MacOSX/x86, following LLVM's support for > exceptions in > +JIT on MacOSX/x86. > +

                                                                      • A new vmkit driver: a program to run java or .net > applications. The > +driver supports llvm command line arguments including the new "- > fast" option. > +

                                                                      • > +
                                                                      • A new memory allocation scheme in the JVM that makes > unloading a > +class loader very fast.

                                                                      • > +
                                                                      • VMKit now follows the LLVM Makefile machinery.

                                                                      • > + > + > +
                                                                      >
                                                                      > > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From evan.cheng at apple.com Tue Oct 14 21:05:33 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 15 Oct 2008 02:05:33 -0000 Subject: [llvm-commits] [llvm] r57542 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/setoeq.ll Message-ID: <200810150205.m9F25X8g003798@zion.cs.uiuc.edu> Author: evancheng Date: Tue Oct 14 21:05:31 2008 New Revision: 57542 URL: http://llvm.org/viewvc/llvm-project?rev=57542&view=rev Log: - Add target lowering hooks that specify which setcc conditions are illegal, i.e. conditions that cannot be checked with a single instruction. For example, SETONE and SETUEQ on x86. - Teach legalizer to implement *illegal* setcc as a and / or of a number of legal setcc nodes. For now, only implement FP conditions. e.g. SETONE is implemented as SETO & SETNE, SETUEQ is SETUO | SETEQ. - Move x86 target over. Added: llvm/trunk/test/CodeGen/X86/setoeq.ll Modified: llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=57542&r1=57541&r2=57542&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Tue Oct 14 21:05:31 2008 @@ -409,6 +409,28 @@ getConvertAction(FromVT, ToVT) == Custom); } + /// getCondCodeAction - Return how the condition code should be treated: + /// either it is legal, needs to be expanded to some other code sequence, + /// or the target has a custom expander for it. + LegalizeAction + getCondCodeAction(ISD::CondCode CC, MVT VT) const { + assert((unsigned)CC < array_lengthof(CondCodeActions) && + (unsigned)VT.getSimpleVT() < sizeof(CondCodeActions[0])*4 && + "Table isn't big enough!"); + LegalizeAction Action = (LegalizeAction) + ((CondCodeActions[CC] >> (2*VT.getSimpleVT())) & 3); + assert(Action != Promote && "Can't promote condition code!"); + return Action; + } + + /// isCondCodeLegal - Return true if the specified condition code is legal + /// on this target. + bool isCondCodeLegal(ISD::CondCode CC, MVT VT) const { + return getCondCodeAction(CC, VT) == Legal || + getCondCodeAction(CC, VT) == Custom; + } + + /// getTypeToPromoteTo - If the action for this operation is to promote, this /// method returns the ValueType to promote to. MVT getTypeToPromoteTo(unsigned Op, MVT VT) const { @@ -903,6 +925,16 @@ ToVT.getSimpleVT()*2; } + /// setCondCodeAction - Indicate that the specified condition code is or isn't + /// supported on the target and indicate what to do about it. + void setCondCodeAction(ISD::CondCode CC, MVT VT, LegalizeAction Action) { + assert((unsigned)VT.getSimpleVT() < sizeof(CondCodeActions[0])*4 && + (unsigned)CC < array_lengthof(CondCodeActions) && + "Table isn't big enough!"); + CondCodeActions[(unsigned)CC] &= ~(uint64_t(3UL) << VT.getSimpleVT()*2); + CondCodeActions[(unsigned)CC] |= (uint64_t)Action << VT.getSimpleVT()*2; + } + /// AddPromotedToType - If Opc/OrigVT is specified as being promoted, the /// promotion code defaults to trying a larger integer/fp until it can find /// one that works. If that default is insufficient, this method can be used @@ -1437,6 +1469,11 @@ /// (FP_EXTEND and FP_ROUND). uint64_t ConvertActions[MVT::LAST_VALUETYPE]; + /// CondCodeActions - For each condition code (ISD::CondCode) keep a + /// LegalizeAction that indicates how instruction selection should + /// deal with the condition code. + uint64_t CondCodeActions[ISD::SETCC_INVALID]; + ValueTypeActionImpl ValueTypeActions; std::vector LegalFPImmediates; Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=57542&r1=57541&r2=57542&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Oct 14 21:05:31 2008 @@ -193,6 +193,11 @@ SmallPtrSet &NodesLeadingTo); void LegalizeSetCCOperands(SDValue &LHS, SDValue &RHS, SDValue &CC); + void LegalizeSetCCCondCode(MVT VT, SDValue &LHS, SDValue &RHS, SDValue &CC); + void LegalizeSetCC(MVT VT, SDValue &LHS, SDValue &RHS, SDValue &CC) { + LegalizeSetCCOperands(LHS, RHS, CC); + LegalizeSetCCCondCode(VT, LHS, RHS, CC); + } SDValue ExpandLibCall(RTLIB::Libcall LC, SDNode *Node, bool isSigned, SDValue &Hi); @@ -1886,10 +1891,10 @@ Tmp3 = Node->getOperand(3); // RHS Tmp4 = Node->getOperand(1); // CC - LegalizeSetCCOperands(Tmp2, Tmp3, Tmp4); + LegalizeSetCC(Node->getValueType(0), Tmp2, Tmp3, Tmp4); LastCALLSEQ_END = DAG.getEntryNode(); - // If we didn't get both a LHS and RHS back from LegalizeSetCCOperands, + // If we didn't get both a LHS and RHS back from LegalizeSetCC, // the LHS is a legal SETCC itself. In this case, we need to compare // the result against zero to select between true and false values. if (Tmp3.getNode() == 0) { @@ -2772,9 +2777,9 @@ Tmp4 = LegalizeOp(Node->getOperand(3)); // False SDValue CC = Node->getOperand(4); - LegalizeSetCCOperands(Tmp1, Tmp2, CC); + LegalizeSetCC(Node->getValueType(0), Tmp1, Tmp2, CC); - // If we didn't get both a LHS and RHS back from LegalizeSetCCOperands, + // If we didn't get both a LHS and RHS back from LegalizeSetCC, // the LHS is a legal SETCC itself. In this case, we need to compare // the result against zero to select between true and false values. if (Tmp2.getNode() == 0) { @@ -2798,7 +2803,7 @@ Tmp1 = Node->getOperand(0); Tmp2 = Node->getOperand(1); Tmp3 = Node->getOperand(2); - LegalizeSetCCOperands(Tmp1, Tmp2, Tmp3); + LegalizeSetCC(Node->getValueType(0), Tmp1, Tmp2, Tmp3); // If we had to Expand the SetCC operands into a SELECT node, then it may // not always be possible to return a true LHS & RHS. In this case, just @@ -4877,6 +4882,50 @@ RHS = Tmp2; } +/// LegalizeSetCCCondCode - Legalize a SETCC with given LHS and RHS and +/// condition code CC on the current target. This routine assumes LHS and rHS +/// have already been legalized by LegalizeSetCCOperands. It expands SETCC with +/// illegal condition code into AND / OR of multiple SETCC values. +void SelectionDAGLegalize::LegalizeSetCCCondCode(MVT VT, + SDValue &LHS, SDValue &RHS, + SDValue &CC) { + MVT OpVT = LHS.getValueType(); + ISD::CondCode CCCode = cast(CC)->get(); + switch (TLI.getCondCodeAction(CCCode, OpVT)) { + default: assert(0 && "Unknown condition code action!"); + case TargetLowering::Legal: + // Nothing to do. + break; + case TargetLowering::Expand: { + ISD::CondCode CC1 = ISD::SETCC_INVALID, CC2 = ISD::SETCC_INVALID; + unsigned Opc = 0; + switch (CCCode) { + default: assert(0 && "Don't know how to expand this condition!"); abort(); + case ISD::SETOEQ: CC1 = ISD::SETO; CC2 = ISD::SETEQ; Opc = ISD::AND; break; + case ISD::SETOGT: CC1 = ISD::SETO; CC2 = ISD::SETGT; Opc = ISD::AND; break; + case ISD::SETOGE: CC1 = ISD::SETO; CC2 = ISD::SETGE; Opc = ISD::AND; break; + case ISD::SETOLT: CC1 = ISD::SETO; CC2 = ISD::SETLT; Opc = ISD::AND; break; + case ISD::SETOLE: CC1 = ISD::SETO; CC2 = ISD::SETLE; Opc = ISD::AND; break; + case ISD::SETONE: CC1 = ISD::SETO; CC2 = ISD::SETNE; Opc = ISD::AND; break; + case ISD::SETUEQ: CC1 = ISD::SETUO; CC2 = ISD::SETEQ; Opc = ISD::OR; break; + case ISD::SETUGT: CC1 = ISD::SETUO; CC2 = ISD::SETGT; Opc = ISD::OR; break; + case ISD::SETUGE: CC1 = ISD::SETUO; CC2 = ISD::SETGE; Opc = ISD::OR; break; + case ISD::SETULT: CC1 = ISD::SETUO; CC2 = ISD::SETLT; Opc = ISD::OR; break; + case ISD::SETULE: CC1 = ISD::SETUO; CC2 = ISD::SETLE; Opc = ISD::OR; break; + case ISD::SETUNE: CC1 = ISD::SETUO; CC2 = ISD::SETNE; Opc = ISD::OR; break; + // FIXME: Implement more expansions. + } + + SDValue SetCC1 = DAG.getSetCC(VT, LHS, RHS, CC1); + SDValue SetCC2 = DAG.getSetCC(VT, LHS, RHS, CC2); + LHS = DAG.getNode(Opc, VT, SetCC1, SetCC2); + RHS = SDValue(); + CC = SDValue(); + break; + } + } +} + /// EmitStackConvert - Emit a store/load combination to the stack. This stores /// SrcOp to a stack slot of type SlotVT, truncating it if needed. It then does /// a load from the stack slot to DestVT, extending it if needed. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=57542&r1=57541&r2=57542&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Tue Oct 14 21:05:31 2008 @@ -406,6 +406,7 @@ memset(TruncStoreActions, 0, sizeof(TruncStoreActions)); memset(IndexedModeActions, 0, sizeof(IndexedModeActions)); memset(ConvertActions, 0, sizeof(ConvertActions)); + memset(CondCodeActions, 0, sizeof(CondCodeActions)); // Set default actions for various operations. for (unsigned VT = 0; VT != (unsigned)MVT::LAST_VALUETYPE; ++VT) { Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=57542&r1=57541&r2=57542&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Oct 14 21:05:31 2008 @@ -92,7 +92,15 @@ setTruncStoreAction(MVT::i64, MVT::i8 , Expand); setTruncStoreAction(MVT::i32, MVT::i16, Expand); setTruncStoreAction(MVT::i32, MVT::i8 , Expand); - setTruncStoreAction(MVT::i16, MVT::i8, Expand); + setTruncStoreAction(MVT::i16, MVT::i8, Expand); + + // SETOEQ and SETUNE require checking two conditions. + setCondCodeAction(ISD::SETOEQ, MVT::f32, Expand); + setCondCodeAction(ISD::SETOEQ, MVT::f64, Expand); + setCondCodeAction(ISD::SETOEQ, MVT::f80, Expand); + setCondCodeAction(ISD::SETUNE, MVT::f32, Expand); + setCondCodeAction(ISD::SETUNE, MVT::f64, Expand); + setCondCodeAction(ISD::SETUNE, MVT::f80, Expand); // Promote all UINT_TO_FP to larger SINT_TO_FP's, as X86 doesn't have this // operation. @@ -4883,26 +4891,8 @@ DAG.getConstant(X86CC, MVT::i8), Cond); } - assert(isFP && "Illegal integer SetCC!"); - - Cond = DAG.getNode(X86ISD::CMP, MVT::i32, Op0, Op1); - switch (SetCCOpcode) { - default: assert(false && "Illegal floating point SetCC!"); - case ISD::SETOEQ: { // !PF & ZF - SDValue Tmp1 = DAG.getNode(X86ISD::SETCC, MVT::i8, - DAG.getConstant(X86::COND_NP, MVT::i8), Cond); - SDValue Tmp2 = DAG.getNode(X86ISD::SETCC, MVT::i8, - DAG.getConstant(X86::COND_E, MVT::i8), Cond); - return DAG.getNode(ISD::AND, MVT::i8, Tmp1, Tmp2); - } - case ISD::SETUNE: { // PF | !ZF - SDValue Tmp1 = DAG.getNode(X86ISD::SETCC, MVT::i8, - DAG.getConstant(X86::COND_P, MVT::i8), Cond); - SDValue Tmp2 = DAG.getNode(X86ISD::SETCC, MVT::i8, - DAG.getConstant(X86::COND_NE, MVT::i8), Cond); - return DAG.getNode(ISD::OR, MVT::i8, Tmp1, Tmp2); - } - } + assert(0 && "Illegal SetCC!"); + return SDValue(); } SDValue X86TargetLowering::LowerVSETCC(SDValue Op, SelectionDAG &DAG) { Added: llvm/trunk/test/CodeGen/X86/setoeq.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/setoeq.ll?rev=57542&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/setoeq.ll (added) +++ llvm/trunk/test/CodeGen/X86/setoeq.ll Tue Oct 14 21:05:31 2008 @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llc -march=x86 | grep set | count 2 +; RUN: llvm-as < %s | llc -march=x86 | grep and + +define zeroext i8 @t(double %x) nounwind readnone { +entry: + %0 = fptosi double %x to i32 ; [#uses=1] + %1 = sitofp i32 %0 to double ; [#uses=1] + %2 = fcmp oeq double %1, %x ; [#uses=1] + %retval12 = zext i1 %2 to i8 ; [#uses=1] + ret i8 %retval12 +} From gohman at apple.com Tue Oct 14 21:57:39 2008 From: gohman at apple.com (Dan Gohman) Date: Wed, 15 Oct 2008 02:57:39 -0000 Subject: [llvm-commits] [llvm] r57543 - in /llvm/trunk/lib/CodeGen: MachineFunction.cpp StackSlotColoring.cpp Message-ID: <200810150257.m9F2vdMK005503@zion.cs.uiuc.edu> Author: djg Date: Tue Oct 14 21:57:38 2008 New Revision: 57543 URL: http://llvm.org/viewvc/llvm-project?rev=57543&view=rev Log: Adjust whitespace in debug messages to be more consistent with other debug messages. Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp llvm/trunk/lib/CodeGen/StackSlotColoring.cpp Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=57543&r1=57542&r2=57543&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Tue Oct 14 21:57:38 2008 @@ -400,7 +400,7 @@ for (unsigned i = 0, e = Objects.size(); i != e; ++i) { const StackObject &SO = Objects[i]; - OS << " : "; + OS << " : "; if (SO.Size == ~0ULL) { OS << "dead\n"; continue; @@ -458,7 +458,7 @@ // FIXME: this is lame, maybe we could print out the MBB numbers or something // like {1, 2, 4, 5, 3, 0} for (unsigned i = 0, e = JumpTables.size(); i != e; ++i) { - OS << " has " << JumpTables[i].MBBs.size() + OS << " has " << JumpTables[i].MBBs.size() << " entries\n"; } } @@ -536,7 +536,7 @@ void MachineConstantPool::print(raw_ostream &OS) const { for (unsigned i = 0, e = Constants.size(); i != e; ++i) { - OS << " is"; + OS << " is"; if (Constants[i].isMachineConstantPoolEntry()) Constants[i].Val.MachineCPVal->print(OS); else Modified: llvm/trunk/lib/CodeGen/StackSlotColoring.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackSlotColoring.cpp?rev=57543&r1=57542&r2=57543&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/StackSlotColoring.cpp (original) +++ llvm/trunk/lib/CodeGen/StackSlotColoring.cpp Tue Oct 14 21:57:38 2008 @@ -179,7 +179,7 @@ // Record the assignment. Assignments[Color].push_back(li); int FI = li->getStackSlotIndex(); - DOUT << "Assigning fi #" << FI << " to fi #" << Color << "\n"; + DOUT << "Assigning fi#" << FI << " to fi#" << Color << "\n"; // Change size and alignment of the allocated slot. If there are multiple // objects sharing the same slot, then make sure the size and alignment @@ -235,7 +235,7 @@ // Delete unused stack slots. while (NextColor != -1) { - DOUT << "Removing unused stack object fi #" << NextColor << "\n"; + DOUT << "Removing unused stack object fi#" << NextColor << "\n"; MFI->RemoveStackObject(NextColor); NextColor = AllColors.find_next(NextColor); } From sabre at nondot.org Tue Oct 14 22:47:19 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 03:47:19 -0000 Subject: [llvm-commits] [llvm] r57544 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp Message-ID: <200810150347.m9F3lJDR006888@zion.cs.uiuc.edu> Author: lattner Date: Tue Oct 14 22:47:17 2008 New Revision: 57544 URL: http://llvm.org/viewvc/llvm-project?rev=57544&view=rev Log: factor some BuildMI calls, no functionality change. Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=57544&r1=57543&r2=57544&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original) +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Tue Oct 14 22:47:17 2008 @@ -545,6 +545,8 @@ unsigned Opc = X86ChooseCmpOpcode(VT); unsigned ResultReg = createResultReg(&X86::GR8RegClass); + unsigned SetCCOpc; + switch (CI->getPredicate()) { case CmpInst::FCMP_OEQ: { unsigned EReg = createResultReg(&X86::GR8RegClass); @@ -553,7 +555,8 @@ BuildMI(MBB, TII.get(X86::SETEr), EReg); BuildMI(MBB, TII.get(X86::SETNPr), NPReg); BuildMI(MBB, TII.get(X86::AND8rr), ResultReg).addReg(NPReg).addReg(EReg); - break; + UpdateValueMap(I, ResultReg); + return true; } case CmpInst::FCMP_UNE: { unsigned NEReg = createResultReg(&X86::GR8RegClass); @@ -562,100 +565,104 @@ BuildMI(MBB, TII.get(X86::SETNEr), NEReg); BuildMI(MBB, TII.get(X86::SETPr), PReg); BuildMI(MBB, TII.get(X86::OR8rr), ResultReg).addReg(PReg).addReg(NEReg); - break; + UpdateValueMap(I, ResultReg); + return true; } case CmpInst::FCMP_OGT: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETAr), ResultReg); + SetCCOpc = X86::SETAr; break; case CmpInst::FCMP_OGE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETAEr), ResultReg); + SetCCOpc = X86::SETAEr; break; case CmpInst::FCMP_OLT: BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - BuildMI(MBB, TII.get(X86::SETAr), ResultReg); + SetCCOpc = X86::SETAr; break; case CmpInst::FCMP_OLE: BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - BuildMI(MBB, TII.get(X86::SETAEr), ResultReg); + SetCCOpc = X86::SETAEr; break; case CmpInst::FCMP_ONE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETNEr), ResultReg); + SetCCOpc = X86::SETNEr; break; case CmpInst::FCMP_ORD: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETNPr), ResultReg); + SetCCOpc = X86::SETNPr; break; case CmpInst::FCMP_UNO: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETPr), ResultReg); + SetCCOpc = X86::SETPr; break; case CmpInst::FCMP_UEQ: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETEr), ResultReg); + SetCCOpc = X86::SETEr; break; case CmpInst::FCMP_UGT: BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - BuildMI(MBB, TII.get(X86::SETBr), ResultReg); + SetCCOpc = X86::SETBr; break; case CmpInst::FCMP_UGE: BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - BuildMI(MBB, TII.get(X86::SETBEr), ResultReg); + SetCCOpc = X86::SETBEr; break; case CmpInst::FCMP_ULT: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETBr), ResultReg); + SetCCOpc = X86::SETBr; break; case CmpInst::FCMP_ULE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETBEr), ResultReg); + SetCCOpc = X86::SETBEr; break; case CmpInst::ICMP_EQ: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETEr), ResultReg); + SetCCOpc = X86::SETEr; break; case CmpInst::ICMP_NE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETNEr), ResultReg); + SetCCOpc = X86::SETNEr; break; case CmpInst::ICMP_UGT: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETAr), ResultReg); + SetCCOpc = X86::SETAr; break; case CmpInst::ICMP_UGE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETAEr), ResultReg); + SetCCOpc = X86::SETAEr; break; case CmpInst::ICMP_ULT: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETBr), ResultReg); + SetCCOpc = X86::SETBr; break; case CmpInst::ICMP_ULE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETBEr), ResultReg); + SetCCOpc = X86::SETBEr; break; case CmpInst::ICMP_SGT: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETGr), ResultReg); + SetCCOpc = X86::SETGr; break; case CmpInst::ICMP_SGE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETGEr), ResultReg); + SetCCOpc = X86::SETGEr; break; case CmpInst::ICMP_SLT: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETLr), ResultReg); + SetCCOpc = X86::SETLr; break; case CmpInst::ICMP_SLE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::SETLEr), ResultReg); + SetCCOpc = X86::SETLEr; break; default: return false; } + if (SetCCOpc) + BuildMI(MBB, TII.get(SetCCOpc), ResultReg); + UpdateValueMap(I, ResultReg); return true; } @@ -700,98 +707,101 @@ unsigned Op1Reg = getRegForValue(CI->getOperand(1)); if (Op1Reg == 0) return false; + unsigned BranchOpc; switch (Predicate) { case CmpInst::FCMP_OGT: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JA)).addMBB(TrueMBB); + BranchOpc = X86::JA; break; case CmpInst::FCMP_OGE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JAE)).addMBB(TrueMBB); + BranchOpc = X86::JAE; break; case CmpInst::FCMP_OLT: BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - BuildMI(MBB, TII.get(X86::JA)).addMBB(TrueMBB); + BranchOpc = X86::JA; break; case CmpInst::FCMP_OLE: BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - BuildMI(MBB, TII.get(X86::JAE)).addMBB(TrueMBB); + BranchOpc = X86::JAE; break; case CmpInst::FCMP_ONE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JNE)).addMBB(TrueMBB); + BranchOpc = X86::JNE; break; case CmpInst::FCMP_ORD: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JNP)).addMBB(TrueMBB); + BranchOpc = X86::JNP; break; case CmpInst::FCMP_UNO: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JP)).addMBB(TrueMBB); + BranchOpc = X86::JP; break; case CmpInst::FCMP_UEQ: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JE)).addMBB(TrueMBB); + BranchOpc = X86::JE; break; case CmpInst::FCMP_UGT: BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - BuildMI(MBB, TII.get(X86::JB)).addMBB(TrueMBB); + BranchOpc = X86::JB; break; case CmpInst::FCMP_UGE: BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - BuildMI(MBB, TII.get(X86::JBE)).addMBB(TrueMBB); + BranchOpc = X86::JBE; break; case CmpInst::FCMP_ULT: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JB)).addMBB(TrueMBB); + BranchOpc = X86::JB; break; case CmpInst::FCMP_ULE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JBE)).addMBB(TrueMBB); + BranchOpc = X86::JBE; break; case CmpInst::ICMP_EQ: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JE)).addMBB(TrueMBB); + BranchOpc = X86::JE; break; case CmpInst::ICMP_NE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JNE)).addMBB(TrueMBB); + BranchOpc = X86::JNE; break; case CmpInst::ICMP_UGT: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JA)).addMBB(TrueMBB); + BranchOpc = X86::JA; break; case CmpInst::ICMP_UGE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JAE)).addMBB(TrueMBB); + BranchOpc = X86::JAE; break; case CmpInst::ICMP_ULT: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JB)).addMBB(TrueMBB); + BranchOpc = X86::JB; break; case CmpInst::ICMP_ULE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JBE)).addMBB(TrueMBB); + BranchOpc = X86::JBE; break; case CmpInst::ICMP_SGT: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JG)).addMBB(TrueMBB); + BranchOpc = X86::JG; break; case CmpInst::ICMP_SGE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JGE)).addMBB(TrueMBB); + BranchOpc = X86::JGE; break; case CmpInst::ICMP_SLT: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JL)).addMBB(TrueMBB); + BranchOpc = X86::JL; break; case CmpInst::ICMP_SLE: BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BuildMI(MBB, TII.get(X86::JLE)).addMBB(TrueMBB); + BranchOpc = X86::JLE; break; default: return false; } + + BuildMI(MBB, TII.get(BranchOpc)).addMBB(TrueMBB); FastEmitBranch(FalseMBB); MBB->addSuccessor(TrueMBB); return true; From sabre at nondot.org Tue Oct 14 22:52:54 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 03:52:54 -0000 Subject: [llvm-commits] [llvm] r57545 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp Message-ID: <200810150352.m9F3qt5T007084@zion.cs.uiuc.edu> Author: lattner Date: Tue Oct 14 22:52:54 2008 New Revision: 57545 URL: http://llvm.org/viewvc/llvm-project?rev=57545&view=rev Log: factor some more BuildMI's in X86SelectCmp Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=57545&r1=57544&r2=57545&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original) +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Tue Oct 14 22:52:54 2008 @@ -546,7 +546,7 @@ unsigned ResultReg = createResultReg(&X86::GR8RegClass); unsigned SetCCOpc; - + bool SwapArgs; // false -> compare Op0, Op1. true -> compare Op1, Op0. switch (CI->getPredicate()) { case CmpInst::FCMP_OEQ: { unsigned EReg = createResultReg(&X86::GR8RegClass); @@ -568,101 +568,39 @@ UpdateValueMap(I, ResultReg); return true; } - case CmpInst::FCMP_OGT: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETAr; - break; - case CmpInst::FCMP_OGE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETAEr; - break; - case CmpInst::FCMP_OLT: - BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - SetCCOpc = X86::SETAr; - break; - case CmpInst::FCMP_OLE: - BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - SetCCOpc = X86::SETAEr; - break; - case CmpInst::FCMP_ONE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETNEr; - break; - case CmpInst::FCMP_ORD: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETNPr; - break; - case CmpInst::FCMP_UNO: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETPr; - break; - case CmpInst::FCMP_UEQ: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETEr; - break; - case CmpInst::FCMP_UGT: - BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - SetCCOpc = X86::SETBr; - break; - case CmpInst::FCMP_UGE: - BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - SetCCOpc = X86::SETBEr; - break; - case CmpInst::FCMP_ULT: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETBr; - break; - case CmpInst::FCMP_ULE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETBEr; - break; - case CmpInst::ICMP_EQ: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETEr; - break; - case CmpInst::ICMP_NE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETNEr; - break; - case CmpInst::ICMP_UGT: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETAr; - break; - case CmpInst::ICMP_UGE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETAEr; - break; - case CmpInst::ICMP_ULT: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETBr; - break; - case CmpInst::ICMP_ULE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETBEr; - break; - case CmpInst::ICMP_SGT: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETGr; - break; - case CmpInst::ICMP_SGE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETGEr; - break; - case CmpInst::ICMP_SLT: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETLr; - break; - case CmpInst::ICMP_SLE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - SetCCOpc = X86::SETLEr; - break; + case CmpInst::FCMP_OGT: SwapArgs = false; SetCCOpc = X86::SETAr; break; + case CmpInst::FCMP_OGE: SwapArgs = false; SetCCOpc = X86::SETAEr; break; + case CmpInst::FCMP_OLT: SwapArgs = true; SetCCOpc = X86::SETAr; break; + case CmpInst::FCMP_OLE: SwapArgs = true; SetCCOpc = X86::SETAEr; break; + case CmpInst::FCMP_ONE: SwapArgs = false; SetCCOpc = X86::SETNEr; break; + case CmpInst::FCMP_ORD: SwapArgs = false; SetCCOpc = X86::SETNPr; break; + case CmpInst::FCMP_UNO: SwapArgs = false; SetCCOpc = X86::SETPr; break; + case CmpInst::FCMP_UEQ: SwapArgs = false; SetCCOpc = X86::SETEr; break; + case CmpInst::FCMP_UGT: SwapArgs = true; SetCCOpc = X86::SETBr; break; + case CmpInst::FCMP_UGE: SwapArgs = true; SetCCOpc = X86::SETBEr; break; + case CmpInst::FCMP_ULT: SwapArgs = false; SetCCOpc = X86::SETBr; break; + case CmpInst::FCMP_ULE: SwapArgs = false; SetCCOpc = X86::SETBEr; break; + + case CmpInst::ICMP_EQ: SwapArgs = false; SetCCOpc = X86::SETEr; break; + case CmpInst::ICMP_NE: SwapArgs = false; SetCCOpc = X86::SETNEr; break; + case CmpInst::ICMP_UGT: SwapArgs = false; SetCCOpc = X86::SETAr; break; + case CmpInst::ICMP_UGE: SwapArgs = false; SetCCOpc = X86::SETAEr; break; + case CmpInst::ICMP_ULT: SwapArgs = false; SetCCOpc = X86::SETBr; break; + case CmpInst::ICMP_ULE: SwapArgs = false; SetCCOpc = X86::SETBEr; break; + case CmpInst::ICMP_SGT: SwapArgs = false; SetCCOpc = X86::SETGr; break; + case CmpInst::ICMP_SGE: SwapArgs = false; SetCCOpc = X86::SETGEr; break; + case CmpInst::ICMP_SLT: SwapArgs = false; SetCCOpc = X86::SETLr; break; + case CmpInst::ICMP_SLE: SwapArgs = false; SetCCOpc = X86::SETLEr; break; default: return false; } - if (SetCCOpc) - BuildMI(MBB, TII.get(SetCCOpc), ResultReg); - + if (SwapArgs) + BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); + else + BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); + + BuildMI(MBB, TII.get(SetCCOpc), ResultReg); UpdateValueMap(I, ResultReg); return true; } From sabre at nondot.org Tue Oct 14 22:58:06 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 03:58:06 -0000 Subject: [llvm-commits] [llvm] r57546 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp Message-ID: <200810150358.m9F3w61c007295@zion.cs.uiuc.edu> Author: lattner Date: Tue Oct 14 22:58:05 2008 New Revision: 57546 URL: http://llvm.org/viewvc/llvm-project?rev=57546&view=rev Log: factor buildmi calls in X86SelectBranch Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=57546&r1=57545&r2=57546&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original) +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Tue Oct 14 22:58:05 2008 @@ -645,99 +645,40 @@ unsigned Op1Reg = getRegForValue(CI->getOperand(1)); if (Op1Reg == 0) return false; - unsigned BranchOpc; + bool SwapArgs; // false -> compare Op0, Op1. true -> compare Op1, Op0. + unsigned BranchOpc; // Opcode to jump on, e.g. "X86::JA" + switch (Predicate) { - case CmpInst::FCMP_OGT: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JA; - break; - case CmpInst::FCMP_OGE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JAE; - break; - case CmpInst::FCMP_OLT: - BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - BranchOpc = X86::JA; - break; - case CmpInst::FCMP_OLE: - BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - BranchOpc = X86::JAE; - break; - case CmpInst::FCMP_ONE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JNE; - break; - case CmpInst::FCMP_ORD: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JNP; - break; - case CmpInst::FCMP_UNO: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JP; - break; - case CmpInst::FCMP_UEQ: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JE; - break; - case CmpInst::FCMP_UGT: - BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - BranchOpc = X86::JB; - break; - case CmpInst::FCMP_UGE: - BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - BranchOpc = X86::JBE; - break; - case CmpInst::FCMP_ULT: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JB; - break; - case CmpInst::FCMP_ULE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JBE; - break; - case CmpInst::ICMP_EQ: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JE; - break; - case CmpInst::ICMP_NE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JNE; - break; - case CmpInst::ICMP_UGT: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JA; - break; - case CmpInst::ICMP_UGE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JAE; - break; - case CmpInst::ICMP_ULT: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JB; - break; - case CmpInst::ICMP_ULE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JBE; - break; - case CmpInst::ICMP_SGT: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JG; - break; - case CmpInst::ICMP_SGE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JGE; - break; - case CmpInst::ICMP_SLT: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JL; - break; - case CmpInst::ICMP_SLE: - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); - BranchOpc = X86::JLE; - break; + case CmpInst::FCMP_OGT: SwapArgs = false; BranchOpc = X86::JA; break; + case CmpInst::FCMP_OGE: SwapArgs = false; BranchOpc = X86::JAE; break; + case CmpInst::FCMP_OLT: SwapArgs = true; BranchOpc = X86::JA; break; + case CmpInst::FCMP_OLE: SwapArgs = true; BranchOpc = X86::JAE; break; + case CmpInst::FCMP_ONE: SwapArgs = false; BranchOpc = X86::JNE; break; + case CmpInst::FCMP_ORD: SwapArgs = false; BranchOpc = X86::JNP; break; + case CmpInst::FCMP_UNO: SwapArgs = false; BranchOpc = X86::JP; break; + case CmpInst::FCMP_UEQ: SwapArgs = false; BranchOpc = X86::JE; break; + case CmpInst::FCMP_UGT: SwapArgs = true; BranchOpc = X86::JB; break; + case CmpInst::FCMP_UGE: SwapArgs = true; BranchOpc = X86::JBE; break; + case CmpInst::FCMP_ULT: SwapArgs = false; BranchOpc = X86::JB; break; + case CmpInst::FCMP_ULE: SwapArgs = false; BranchOpc = X86::JBE; break; + case CmpInst::ICMP_EQ: SwapArgs = false; BranchOpc = X86::JE; break; + case CmpInst::ICMP_NE: SwapArgs = false; BranchOpc = X86::JNE; break; + case CmpInst::ICMP_UGT: SwapArgs = false; BranchOpc = X86::JA; break; + case CmpInst::ICMP_UGE: SwapArgs = false; BranchOpc = X86::JAE; break; + case CmpInst::ICMP_ULT: SwapArgs = false; BranchOpc = X86::JB; break; + case CmpInst::ICMP_ULE: SwapArgs = false; BranchOpc = X86::JBE; break; + case CmpInst::ICMP_SGT: SwapArgs = false; BranchOpc = X86::JG; break; + case CmpInst::ICMP_SGE: SwapArgs = false; BranchOpc = X86::JGE; break; + case CmpInst::ICMP_SLT: SwapArgs = false; BranchOpc = X86::JL; break; + case CmpInst::ICMP_SLE: SwapArgs = false; BranchOpc = X86::JLE; break; default: return false; } + + if (SwapArgs) + BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); + else + BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); BuildMI(MBB, TII.get(BranchOpc)).addMBB(TrueMBB); FastEmitBranch(FalseMBB); From sabre at nondot.org Tue Oct 14 23:02:27 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 04:02:27 -0000 Subject: [llvm-commits] [llvm] r57547 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp Message-ID: <200810150402.m9F42R89007444@zion.cs.uiuc.edu> Author: lattner Date: Tue Oct 14 23:02:26 2008 New Revision: 57547 URL: http://llvm.org/viewvc/llvm-project?rev=57547&view=rev Log: more minor refactoring of X86SelectBranch, no functionality change. Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=57547&r1=57546&r2=57547&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original) +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Tue Oct 14 23:02:26 2008 @@ -630,8 +630,6 @@ if (CmpInst *CI = dyn_cast(BI->getCondition())) { if (CI->hasOneUse()) { MVT VT = TLI.getValueType(CI->getOperand(0)->getType()); - unsigned Opc = X86ChooseCmpOpcode(VT); - if (Opc == 0) return false; // Try to take advantage of fallthrough opportunities. CmpInst::Predicate Predicate = CI->getPredicate(); @@ -640,11 +638,6 @@ Predicate = CmpInst::getInversePredicate(Predicate); } - unsigned Op0Reg = getRegForValue(CI->getOperand(0)); - if (Op0Reg == 0) return false; - unsigned Op1Reg = getRegForValue(CI->getOperand(1)); - if (Op1Reg == 0) return false; - bool SwapArgs; // false -> compare Op0, Op1. true -> compare Op1, Op0. unsigned BranchOpc; // Opcode to jump on, e.g. "X86::JA" @@ -674,12 +667,19 @@ default: return false; } - + + Value *Op0 = CI->getOperand(0), *Op1 = CI->getOperand(1); if (SwapArgs) - BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - else - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); + std::swap(Op0, Op1); + + unsigned CompareOpc = X86ChooseCmpOpcode(VT); + if (CompareOpc == 0) return false; + unsigned Op0Reg = getRegForValue(Op0); + if (Op0Reg == 0) return false; + unsigned Op1Reg = getRegForValue(Op1); + if (Op1Reg == 0) return false; + BuildMI(MBB, TII.get(CompareOpc)).addReg(Op0Reg).addReg(Op1Reg); BuildMI(MBB, TII.get(BranchOpc)).addMBB(TrueMBB); FastEmitBranch(FalseMBB); MBB->addSuccessor(TrueMBB); @@ -692,11 +692,9 @@ if (OpReg == 0) return false; BuildMI(MBB, TII.get(X86::TEST8rr)).addReg(OpReg).addReg(OpReg); - BuildMI(MBB, TII.get(X86::JNE)).addMBB(TrueMBB); FastEmitBranch(FalseMBB); MBB->addSuccessor(TrueMBB); - return true; } From sabre at nondot.org Tue Oct 14 23:13:30 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 04:13:30 -0000 Subject: [llvm-commits] [llvm] r57548 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp Message-ID: <200810150413.m9F4DUYf007808@zion.cs.uiuc.edu> Author: lattner Date: Tue Oct 14 23:13:29 2008 New Revision: 57548 URL: http://llvm.org/viewvc/llvm-project?rev=57548&view=rev Log: Fold immediates into compares when possible, producing "cmp $4, %eax" instead of loading 4 into a register and then doing the compare. Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=57548&r1=57547&r2=57548&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original) +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Tue Oct 14 23:13:29 2008 @@ -530,6 +530,29 @@ return 0; } +/// X86ChooseCmpImmediateOpcode - If we have a comparison with RHS as the RHS +/// of the comparison, return an opcode that works for the compare (e.g. +/// CMP32ri) otherwise return 0. +static unsigned X86ChooseCmpImmediateOpcode(ConstantInt *RHSC) { + if (RHSC == 0) return 0; + + if (RHSC->getType() == Type::Int8Ty) + return X86::CMP8ri; + if (RHSC->getType() == Type::Int16Ty) + return X86::CMP16ri; + if (RHSC->getType() == Type::Int32Ty) + return X86::CMP32ri; + + // 64-bit comparisons are only valid if the immediate fits in a 32-bit sext + // field. + if (RHSC->getType() == Type::Int64Ty && + (int)RHSC->getSExtValue() == RHSC->getSExtValue()) + return X86::CMP64ri32; + + // Otherwise, we can't fold the immediate into this comparison. + return 0; +} + bool X86FastISel::X86SelectCmp(Instruction *I) { CmpInst *CI = cast(I); @@ -676,10 +699,20 @@ if (CompareOpc == 0) return false; unsigned Op0Reg = getRegForValue(Op0); if (Op0Reg == 0) return false; - unsigned Op1Reg = getRegForValue(Op1); - if (Op1Reg == 0) return false; - BuildMI(MBB, TII.get(CompareOpc)).addReg(Op0Reg).addReg(Op1Reg); + // We have two options: compare with register or immediate. If the RHS of + // the compare is an immediate that we can fold into this compare, use + // CMPri, otherwise use CMPrr. + ConstantInt *Op1C = dyn_cast(Op1); + if (unsigned CompareImmOpc = X86ChooseCmpImmediateOpcode(Op1C)) { + BuildMI(MBB, TII.get(CompareOpc)).addReg(Op0Reg) + .addImm(Op1C->getSExtValue()); + } else { + unsigned Op1Reg = getRegForValue(Op1); + if (Op1Reg == 0) return false; + BuildMI(MBB, TII.get(CompareOpc)).addReg(Op0Reg).addReg(Op1Reg); + } + BuildMI(MBB, TII.get(BranchOpc)).addMBB(TrueMBB); FastEmitBranch(FalseMBB); MBB->addSuccessor(TrueMBB); From sabre at nondot.org Tue Oct 14 23:26:38 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 04:26:38 -0000 Subject: [llvm-commits] [llvm] r57549 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp Message-ID: <200810150426.m9F4Qc5m008256@zion.cs.uiuc.edu> Author: lattner Date: Tue Oct 14 23:26:38 2008 New Revision: 57549 URL: http://llvm.org/viewvc/llvm-project?rev=57549&view=rev Log: refactor compare emission out into a new X86FastEmitCompare method, which makes it easy to share the compare/imm folding logic with 'setcc'. This shaves a bunch of instructions off the common select case, which happens a lot in llvm-gcc. Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=57549&r1=57548&r2=57549&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original) +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Tue Oct 14 23:26:38 2008 @@ -73,6 +73,8 @@ #include "X86GenFastISel.inc" private: + bool X86FastEmitCompare(Value *LHS, Value *RHS, MVT VT); + bool X86FastEmitLoad(MVT VT, const X86AddressMode &AM, unsigned &RR); bool X86FastEmitStore(MVT VT, unsigned Val, @@ -534,8 +536,6 @@ /// of the comparison, return an opcode that works for the compare (e.g. /// CMP32ri) otherwise return 0. static unsigned X86ChooseCmpImmediateOpcode(ConstantInt *RHSC) { - if (RHSC == 0) return 0; - if (RHSC->getType() == Type::Int8Ty) return X86::CMP8ri; if (RHSC->getType() == Type::Int16Ty) @@ -553,6 +553,31 @@ return 0; } +bool X86FastISel::X86FastEmitCompare(Value *Op0, Value *Op1, MVT VT) { + unsigned Op0Reg = getRegForValue(Op0); + if (Op0Reg == 0) return false; + + // We have two options: compare with register or immediate. If the RHS of + // the compare is an immediate that we can fold into this compare, use + // CMPri, otherwise use CMPrr. + if (ConstantInt *Op1C = dyn_cast(Op1)) { + if (unsigned CompareImmOpc = X86ChooseCmpImmediateOpcode(Op1C)) { + BuildMI(MBB, TII.get(CompareImmOpc)).addReg(Op0Reg) + .addImm(Op1C->getSExtValue()); + return true; + } + } + + unsigned CompareOpc = X86ChooseCmpOpcode(VT); + if (CompareOpc == 0) return false; + + unsigned Op1Reg = getRegForValue(Op1); + if (Op1Reg == 0) return false; + BuildMI(MBB, TII.get(CompareOpc)).addReg(Op0Reg).addReg(Op1Reg); + + return true; +} + bool X86FastISel::X86SelectCmp(Instruction *I) { CmpInst *CI = cast(I); @@ -560,18 +585,17 @@ if (!isTypeLegal(I->getOperand(0)->getType(), TLI, VT)) return false; - unsigned Op0Reg = getRegForValue(CI->getOperand(0)); - if (Op0Reg == 0) return false; - unsigned Op1Reg = getRegForValue(CI->getOperand(1)); - if (Op1Reg == 0) return false; - - unsigned Opc = X86ChooseCmpOpcode(VT); - unsigned ResultReg = createResultReg(&X86::GR8RegClass); unsigned SetCCOpc; bool SwapArgs; // false -> compare Op0, Op1. true -> compare Op1, Op0. switch (CI->getPredicate()) { case CmpInst::FCMP_OEQ: { + unsigned Op0Reg = getRegForValue(CI->getOperand(0)); + if (Op0Reg == 0) return false; + unsigned Op1Reg = getRegForValue(CI->getOperand(1)); + if (Op1Reg == 0) return false; + unsigned Opc = X86ChooseCmpOpcode(VT); + unsigned EReg = createResultReg(&X86::GR8RegClass); unsigned NPReg = createResultReg(&X86::GR8RegClass); BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); @@ -582,6 +606,12 @@ return true; } case CmpInst::FCMP_UNE: { + unsigned Op0Reg = getRegForValue(CI->getOperand(0)); + if (Op0Reg == 0) return false; + unsigned Op1Reg = getRegForValue(CI->getOperand(1)); + if (Op1Reg == 0) return false; + unsigned Opc = X86ChooseCmpOpcode(VT); + unsigned NEReg = createResultReg(&X86::GR8RegClass); unsigned PReg = createResultReg(&X86::GR8RegClass); BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); @@ -618,11 +648,13 @@ return false; } + Value *Op0 = CI->getOperand(0), *Op1 = CI->getOperand(1); if (SwapArgs) - BuildMI(MBB, TII.get(Opc)).addReg(Op1Reg).addReg(Op0Reg); - else - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); + std::swap(Op0, Op1); + // Emit a compare of Op0/Op1. + X86FastEmitCompare(Op0, Op1, VT); + BuildMI(MBB, TII.get(SetCCOpc), ResultReg); UpdateValueMap(I, ResultReg); return true; @@ -642,6 +674,7 @@ return false; } + bool X86FastISel::X86SelectBranch(Instruction *I) { // Unconditional branches are selected by tablegen-generated code. // Handle a conditional branch. @@ -677,6 +710,7 @@ case CmpInst::FCMP_UGE: SwapArgs = true; BranchOpc = X86::JBE; break; case CmpInst::FCMP_ULT: SwapArgs = false; BranchOpc = X86::JB; break; case CmpInst::FCMP_ULE: SwapArgs = false; BranchOpc = X86::JBE; break; + case CmpInst::ICMP_EQ: SwapArgs = false; BranchOpc = X86::JE; break; case CmpInst::ICMP_NE: SwapArgs = false; BranchOpc = X86::JNE; break; case CmpInst::ICMP_UGT: SwapArgs = false; BranchOpc = X86::JA; break; @@ -695,23 +729,9 @@ if (SwapArgs) std::swap(Op0, Op1); - unsigned CompareOpc = X86ChooseCmpOpcode(VT); - if (CompareOpc == 0) return false; - unsigned Op0Reg = getRegForValue(Op0); - if (Op0Reg == 0) return false; - - // We have two options: compare with register or immediate. If the RHS of - // the compare is an immediate that we can fold into this compare, use - // CMPri, otherwise use CMPrr. - ConstantInt *Op1C = dyn_cast(Op1); - if (unsigned CompareImmOpc = X86ChooseCmpImmediateOpcode(Op1C)) { - BuildMI(MBB, TII.get(CompareOpc)).addReg(Op0Reg) - .addImm(Op1C->getSExtValue()); - } else { - unsigned Op1Reg = getRegForValue(Op1); - if (Op1Reg == 0) return false; - BuildMI(MBB, TII.get(CompareOpc)).addReg(Op0Reg).addReg(Op1Reg); - } + // Emit a compare of the LHS and RHS, setting the flags. + if (!X86FastEmitCompare(Op0, Op1, VT)) + return false; BuildMI(MBB, TII.get(BranchOpc)).addMBB(TrueMBB); FastEmitBranch(FalseMBB); From sabre at nondot.org Tue Oct 14 23:29:23 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 04:29:23 -0000 Subject: [llvm-commits] [llvm] r57550 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp Message-ID: <200810150429.m9F4TNl3008341@zion.cs.uiuc.edu> Author: lattner Date: Tue Oct 14 23:29:23 2008 New Revision: 57550 URL: http://llvm.org/viewvc/llvm-project?rev=57550&view=rev Log: Use X86FastEmitCompare for FCMP_OEQ and FCMP_UNE: it doesn't change the generated code, but makes the code simpler. Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=57550&r1=57549&r2=57550&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original) +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Tue Oct 14 23:29:23 2008 @@ -101,8 +101,6 @@ bool X86SelectTrunc(Instruction *I); - unsigned X86ChooseCmpOpcode(MVT VT); - bool X86SelectFPExt(Instruction *I); bool X86SelectFPTrunc(Instruction *I); @@ -519,7 +517,7 @@ return false; } -unsigned X86FastISel::X86ChooseCmpOpcode(MVT VT) { +static unsigned X86ChooseCmpOpcode(MVT VT) { switch (VT.getSimpleVT()) { case MVT::i8: return X86::CMP8rr; case MVT::i16: return X86::CMP16rr; @@ -590,15 +588,11 @@ bool SwapArgs; // false -> compare Op0, Op1. true -> compare Op1, Op0. switch (CI->getPredicate()) { case CmpInst::FCMP_OEQ: { - unsigned Op0Reg = getRegForValue(CI->getOperand(0)); - if (Op0Reg == 0) return false; - unsigned Op1Reg = getRegForValue(CI->getOperand(1)); - if (Op1Reg == 0) return false; - unsigned Opc = X86ChooseCmpOpcode(VT); + if (!X86FastEmitCompare(CI->getOperand(0), CI->getOperand(1), VT)) + return false; unsigned EReg = createResultReg(&X86::GR8RegClass); unsigned NPReg = createResultReg(&X86::GR8RegClass); - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); BuildMI(MBB, TII.get(X86::SETEr), EReg); BuildMI(MBB, TII.get(X86::SETNPr), NPReg); BuildMI(MBB, TII.get(X86::AND8rr), ResultReg).addReg(NPReg).addReg(EReg); @@ -606,15 +600,11 @@ return true; } case CmpInst::FCMP_UNE: { - unsigned Op0Reg = getRegForValue(CI->getOperand(0)); - if (Op0Reg == 0) return false; - unsigned Op1Reg = getRegForValue(CI->getOperand(1)); - if (Op1Reg == 0) return false; - unsigned Opc = X86ChooseCmpOpcode(VT); - + if (!X86FastEmitCompare(CI->getOperand(0), CI->getOperand(1), VT)) + return false; + unsigned NEReg = createResultReg(&X86::GR8RegClass); unsigned PReg = createResultReg(&X86::GR8RegClass); - BuildMI(MBB, TII.get(Opc)).addReg(Op0Reg).addReg(Op1Reg); BuildMI(MBB, TII.get(X86::SETNEr), NEReg); BuildMI(MBB, TII.get(X86::SETPr), PReg); BuildMI(MBB, TII.get(X86::OR8rr), ResultReg).addReg(PReg).addReg(NEReg); @@ -653,7 +643,8 @@ std::swap(Op0, Op1); // Emit a compare of Op0/Op1. - X86FastEmitCompare(Op0, Op1, VT); + if (!X86FastEmitCompare(Op0, Op1, VT)) + return false; BuildMI(MBB, TII.get(SetCCOpc), ResultReg); UpdateValueMap(I, ResultReg); From sabre at nondot.org Tue Oct 14 23:32:45 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 04:32:45 -0000 Subject: [llvm-commits] [llvm] r57551 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp Message-ID: <200810150432.m9F4Wjnc008517@zion.cs.uiuc.edu> Author: lattner Date: Tue Oct 14 23:32:45 2008 New Revision: 57551 URL: http://llvm.org/viewvc/llvm-project?rev=57551&view=rev Log: Use switch on VT instead of Type* comparisons. Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=57551&r1=57550&r2=57551&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original) +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Tue Oct 14 23:32:45 2008 @@ -519,36 +519,35 @@ static unsigned X86ChooseCmpOpcode(MVT VT) { switch (VT.getSimpleVT()) { - case MVT::i8: return X86::CMP8rr; + default: return 0; + case MVT::i8: return X86::CMP8rr; case MVT::i16: return X86::CMP16rr; case MVT::i32: return X86::CMP32rr; case MVT::i64: return X86::CMP64rr; case MVT::f32: return X86::UCOMISSrr; case MVT::f64: return X86::UCOMISDrr; - default: break; } - return 0; + } /// X86ChooseCmpImmediateOpcode - If we have a comparison with RHS as the RHS /// of the comparison, return an opcode that works for the compare (e.g. /// CMP32ri) otherwise return 0. -static unsigned X86ChooseCmpImmediateOpcode(ConstantInt *RHSC) { - if (RHSC->getType() == Type::Int8Ty) - return X86::CMP8ri; - if (RHSC->getType() == Type::Int16Ty) - return X86::CMP16ri; - if (RHSC->getType() == Type::Int32Ty) - return X86::CMP32ri; - - // 64-bit comparisons are only valid if the immediate fits in a 32-bit sext - // field. - if (RHSC->getType() == Type::Int64Ty && - (int)RHSC->getSExtValue() == RHSC->getSExtValue()) - return X86::CMP64ri32; - +static unsigned X86ChooseCmpImmediateOpcode(MVT VT, ConstantInt *RHSC) { + switch (VT.getSimpleVT()) { // Otherwise, we can't fold the immediate into this comparison. - return 0; + default: return 0; + case MVT::i8: return X86::CMP8ri; + case MVT::i16: return X86::CMP16ri; + case MVT::i32: return X86::CMP32ri; + case MVT::i64: + // 64-bit comparisons are only valid if the immediate fits in a 32-bit sext + // field. + if (RHSC->getType() == Type::Int64Ty && + (int)RHSC->getSExtValue() == RHSC->getSExtValue()) + return X86::CMP64ri32; + return 0; + } } bool X86FastISel::X86FastEmitCompare(Value *Op0, Value *Op1, MVT VT) { @@ -559,7 +558,7 @@ // the compare is an immediate that we can fold into this compare, use // CMPri, otherwise use CMPrr. if (ConstantInt *Op1C = dyn_cast(Op1)) { - if (unsigned CompareImmOpc = X86ChooseCmpImmediateOpcode(Op1C)) { + if (unsigned CompareImmOpc = X86ChooseCmpImmediateOpcode(VT, Op1C)) { BuildMI(MBB, TII.get(CompareImmOpc)).addReg(Op0Reg) .addImm(Op1C->getSExtValue()); return true; From sabre at nondot.org Wed Oct 15 00:07:36 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 05:07:36 -0000 Subject: [llvm-commits] [llvm] r57552 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp Message-ID: <200810150507.m9F57bck009774@zion.cs.uiuc.edu> Author: lattner Date: Wed Oct 15 00:07:36 2008 New Revision: 57552 URL: http://llvm.org/viewvc/llvm-project?rev=57552&view=rev Log: Some minor cleanups: 1. Compute action in X86SelectSelect based on MVT instead of type. 2. Use TLI.getValueType(..) instead of MVT::getVT(..) because the former handles pointers and the later doesn't. 3. Don't pass TLI into isTypeLegal, since it already has access to it as an ivar. #2 gives fast isel some minor new functionality: handling load/stores of pointers. Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=57552&r1=57551&r2=57552&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original) +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Wed Oct 15 00:07:36 2008 @@ -126,19 +126,15 @@ (VT == MVT::f32 && X86ScalarSSEf32); // f32 is when SSE1 } - bool isTypeLegal(const Type *Ty, const TargetLowering &TLI, MVT &VT, - bool AllowI1 = false); + bool isTypeLegal(const Type *Ty, MVT &VT, bool AllowI1 = false); }; -bool X86FastISel::isTypeLegal(const Type *Ty, const TargetLowering &TLI, - MVT &VT, bool AllowI1) { - VT = MVT::getMVT(Ty, /*HandleUnknown=*/true); +bool X86FastISel::isTypeLegal(const Type *Ty, MVT &VT, bool AllowI1) { + VT = TLI.getValueType(Ty, /*HandleUnknown=*/true); if (VT == MVT::Other || !VT.isSimple()) // Unhandled type. Halt "fast" selection and bail. return false; - if (VT == MVT::iPTR) - // Use pointer type. - VT = TLI.getPointerTy(); + // For now, require SSE/SSE2 for performing floating-point operations, // since x87 requires additional work. if (VT == MVT::f64 && !X86ScalarSSEf64) @@ -484,7 +480,7 @@ /// X86SelectStore - Select and emit code to implement store instructions. bool X86FastISel::X86SelectStore(Instruction* I) { MVT VT; - if (!isTypeLegal(I->getOperand(0)->getType(), TLI, VT)) + if (!isTypeLegal(I->getOperand(0)->getType(), VT)) return false; unsigned Val = getRegForValue(I->getOperand(0)); if (Val == 0) @@ -502,7 +498,7 @@ /// bool X86FastISel::X86SelectLoad(Instruction *I) { MVT VT; - if (!isTypeLegal(I->getType(), TLI, VT)) + if (!isTypeLegal(I->getType(), VT)) return false; X86AddressMode AM; @@ -527,7 +523,6 @@ case MVT::f32: return X86::UCOMISSrr; case MVT::f64: return X86::UCOMISDrr; } - } /// X86ChooseCmpImmediateOpcode - If we have a comparison with RHS as the RHS @@ -579,7 +574,7 @@ CmpInst *CI = cast(I); MVT VT; - if (!isTypeLegal(I->getOperand(0)->getType(), TLI, VT)) + if (!isTypeLegal(I->getOperand(0)->getType(), VT)) return false; unsigned ResultReg = createResultReg(&X86::GR8RegClass); @@ -784,8 +779,8 @@ return false; } - MVT VT = MVT::getMVT(I->getType(), /*HandleUnknown=*/true); - if (VT == MVT::Other || !isTypeLegal(I->getType(), TLI, VT)) + MVT VT = TLI.getValueType(I->getType(), /*HandleUnknown=*/true); + if (VT == MVT::Other || !isTypeLegal(I->getType(), VT)) return false; unsigned Op0Reg = getRegForValue(I->getOperand(0)); @@ -818,29 +813,25 @@ } bool X86FastISel::X86SelectSelect(Instruction *I) { - const Type *Ty = I->getType(); - if (isa(Ty)) - Ty = TD.getIntPtrType(); - + MVT VT = TLI.getValueType(I->getType(), /*HandleUnknown=*/true); + if (VT == MVT::Other || !isTypeLegal(I->getType(), VT)) + return false; + unsigned Opc = 0; const TargetRegisterClass *RC = NULL; - if (Ty == Type::Int16Ty) { + if (VT.getSimpleVT() == MVT::i16) { Opc = X86::CMOVE16rr; RC = &X86::GR16RegClass; - } else if (Ty == Type::Int32Ty) { + } else if (VT.getSimpleVT() == MVT::i32) { Opc = X86::CMOVE32rr; RC = &X86::GR32RegClass; - } else if (Ty == Type::Int64Ty) { + } else if (VT.getSimpleVT() == MVT::i64) { Opc = X86::CMOVE64rr; RC = &X86::GR64RegClass; } else { return false; } - MVT VT = MVT::getMVT(Ty, /*HandleUnknown=*/true); - if (VT == MVT::Other || !isTypeLegal(Ty, TLI, VT)) - return false; - unsigned Op0Reg = getRegForValue(I->getOperand(0)); if (Op0Reg == 0) return false; unsigned Op1Reg = getRegForValue(I->getOperand(1)); @@ -856,17 +847,16 @@ } bool X86FastISel::X86SelectFPExt(Instruction *I) { - if (Subtarget->hasSSE2()) { - if (I->getType() == Type::DoubleTy) { - Value *V = I->getOperand(0); - if (V->getType() == Type::FloatTy) { - unsigned OpReg = getRegForValue(V); - if (OpReg == 0) return false; - unsigned ResultReg = createResultReg(X86::FR64RegisterClass); - BuildMI(MBB, TII.get(X86::CVTSS2SDrr), ResultReg).addReg(OpReg); - UpdateValueMap(I, ResultReg); - return true; - } + // fpext from float to double. + if (Subtarget->hasSSE2() && I->getType() == Type::DoubleTy) { + Value *V = I->getOperand(0); + if (V->getType() == Type::FloatTy) { + unsigned OpReg = getRegForValue(V); + if (OpReg == 0) return false; + unsigned ResultReg = createResultReg(X86::FR64RegisterClass); + BuildMI(MBB, TII.get(X86::CVTSS2SDrr), ResultReg).addReg(OpReg); + UpdateValueMap(I, ResultReg); + return true; } } @@ -958,7 +948,7 @@ MVT RetVT; if (RetTy == Type::VoidTy) RetVT = MVT::isVoid; - else if (!isTypeLegal(RetTy, TLI, RetVT, true)) + else if (!isTypeLegal(RetTy, RetVT, true)) return false; // Materialize callee address in a register. FIXME: GV address can be @@ -1012,7 +1002,7 @@ const Type *ArgTy = (*i)->getType(); MVT ArgVT; - if (!isTypeLegal(ArgTy, TLI, ArgVT)) + if (!isTypeLegal(ArgTy, ArgVT)) return false; unsigned OriginalAlignment = TD.getABITypeAlignment(ArgTy); Flags.setOrigAlign(OriginalAlignment); @@ -1065,7 +1055,7 @@ Arg, ArgVT, Arg); if (!Emitted) Emitted = X86FastEmitExtend(ISD::ZERO_EXTEND, VA.getLocVT(), - Arg, ArgVT, Arg); + Arg, ArgVT, Arg); if (!Emitted) Emitted = X86FastEmitExtend(ISD::SIGN_EXTEND, VA.getLocVT(), Arg, ArgVT, Arg); @@ -1217,7 +1207,7 @@ unsigned X86FastISel::TargetMaterializeConstant(Constant *C) { MVT VT; - if (!isTypeLegal(C->getType(), TLI, VT)) + if (!isTypeLegal(C->getType(), VT)) return false; // Get opcode and regclass of the output for the given load instruction. From sabre at nondot.org Wed Oct 15 00:18:04 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 05:18:04 -0000 Subject: [llvm-commits] [llvm] r57553 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp Message-ID: <200810150518.m9F5I4qo010155@zion.cs.uiuc.edu> Author: lattner Date: Wed Oct 15 00:18:04 2008 New Revision: 57553 URL: http://llvm.org/viewvc/llvm-project?rev=57553&view=rev Log: fold compare of null pointer into compare with 0. Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=57553&r1=57552&r2=57553&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original) +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Wed Oct 15 00:18:04 2008 @@ -549,6 +549,10 @@ unsigned Op0Reg = getRegForValue(Op0); if (Op0Reg == 0) return false; + // Handle 'null' like i32/i64 0. + if (isa(Op1)) + Op1 = Constant::getNullValue(TD.getIntPtrType()); + // We have two options: compare with register or immediate. If the RHS of // the compare is an immediate that we can fold into this compare, use // CMPri, otherwise use CMPrr. From sabre at nondot.org Wed Oct 15 00:30:52 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 05:30:52 -0000 Subject: [llvm-commits] [llvm] r57555 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp Message-ID: <200810150530.m9F5UqaK010609@zion.cs.uiuc.edu> Author: lattner Date: Wed Oct 15 00:30:52 2008 New Revision: 57555 URL: http://llvm.org/viewvc/llvm-project?rev=57555&view=rev Log: fold immediates into stores in simple cases, this produces diffs like this: - movl $0, %eax - movl %eax, _yy_n_chars + movl $0, _yy_n_chars Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=57555&r1=57554&r2=57555&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original) +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Wed Oct 15 00:30:52 2008 @@ -77,6 +77,8 @@ bool X86FastEmitLoad(MVT VT, const X86AddressMode &AM, unsigned &RR); + bool X86FastEmitStore(MVT VT, Value *Val, + const X86AddressMode &AM); bool X86FastEmitStore(MVT VT, unsigned Val, const X86AddressMode &AM); @@ -237,53 +239,72 @@ const X86AddressMode &AM) { // Get opcode and regclass of the output for the given store instruction. unsigned Opc = 0; - const TargetRegisterClass *RC = NULL; switch (VT.getSimpleVT()) { default: return false; case MVT::i8: Opc = X86::MOV8mr; - RC = X86::GR8RegisterClass; break; case MVT::i16: Opc = X86::MOV16mr; - RC = X86::GR16RegisterClass; break; case MVT::i32: Opc = X86::MOV32mr; - RC = X86::GR32RegisterClass; break; case MVT::i64: - // Must be in x86-64 mode. - Opc = X86::MOV64mr; - RC = X86::GR64RegisterClass; + Opc = X86::MOV64mr; // Must be in x86-64 mode. break; case MVT::f32: - if (Subtarget->hasSSE1()) { - Opc = X86::MOVSSmr; - RC = X86::FR32RegisterClass; - } else { - Opc = X86::ST_Fp32m; - RC = X86::RFP32RegisterClass; - } + Opc = Subtarget->hasSSE1() ? X86::MOVSSmr : X86::ST_Fp32m; break; case MVT::f64: - if (Subtarget->hasSSE2()) { - Opc = X86::MOVSDmr; - RC = X86::FR64RegisterClass; - } else { - Opc = X86::ST_Fp64m; - RC = X86::RFP64RegisterClass; - } + Opc = Subtarget->hasSSE2() ? X86::MOVSDmr : X86::ST_Fp64m; break; case MVT::f80: // No f80 support yet. return false; } - + addFullAddress(BuildMI(MBB, TII.get(Opc)), AM).addReg(Val); return true; } +bool X86FastISel::X86FastEmitStore(MVT VT, Value *Val, + const X86AddressMode &AM) { + // Handle 'null' like i32/i64 0. + if (isa(Val)) + Val = Constant::getNullValue(TD.getIntPtrType()); + + // If this is a store of a simple constant, fold the constant into the store. + if (ConstantInt *CI = dyn_cast(Val)) { + unsigned Opc = 0; + switch (VT.getSimpleVT()) { + default: break; + case MVT::i8: Opc = X86::MOV8mi; break; + case MVT::i16: Opc = X86::MOV16mi; break; + case MVT::i32: Opc = X86::MOV32mi; break; + case MVT::i64: + // Must be a 32-bit sign extended value. + if ((int)CI->getSExtValue() == CI->getSExtValue()) + Opc = X86::MOV64mi32; + break; + } + + if (Opc) { + addFullAddress(BuildMI(MBB, TII.get(Opc)), AM).addImm(CI->getSExtValue()); + return true; + } + } + + unsigned ValReg = getRegForValue(Val); + if (ValReg == 0) + // Unhandled operand. Halt "fast" selection and bail. + return false; + + return X86FastEmitStore(VT, ValReg, AM); +} + + + /// X86FastEmitExtend - Emit a machine instruction to extend a value Src of /// type SrcVT to type DstVT using the specified extension opcode Opc (e.g. /// ISD::SIGN_EXTEND). @@ -482,16 +503,12 @@ MVT VT; if (!isTypeLegal(I->getOperand(0)->getType(), VT)) return false; - unsigned Val = getRegForValue(I->getOperand(0)); - if (Val == 0) - // Unhandled operand. Halt "fast" selection and bail. - return false; X86AddressMode AM; if (!X86SelectAddress(I->getOperand(1), AM, false)) return false; - return X86FastEmitStore(VT, Val, AM); + return X86FastEmitStore(VT, I->getOperand(0), AM); } /// X86SelectLoad - Select and emit code to implement load instructions. @@ -538,8 +555,7 @@ case MVT::i64: // 64-bit comparisons are only valid if the immediate fits in a 32-bit sext // field. - if (RHSC->getType() == Type::Int64Ty && - (int)RHSC->getSExtValue() == RHSC->getSExtValue()) + if ((int)RHSC->getSExtValue() == RHSC->getSExtValue()) return X86::CMP64ri32; return 0; } @@ -1028,7 +1044,7 @@ unsigned AdjStackDown = TM.getRegisterInfo()->getCallFrameSetupOpcode(); BuildMI(MBB, TII.get(AdjStackDown)).addImm(NumBytes); - // Process argumenet: walk the register/memloc assignments, inserting + // Process argument: walk the register/memloc assignments, inserting // copies / loads. SmallVector RegArgs; for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) { From sabre at nondot.org Wed Oct 15 00:38:33 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 05:38:33 -0000 Subject: [llvm-commits] [llvm] r57556 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp Message-ID: <200810150538.m9F5cXOg010885@zion.cs.uiuc.edu> Author: lattner Date: Wed Oct 15 00:38:32 2008 New Revision: 57556 URL: http://llvm.org/viewvc/llvm-project?rev=57556&view=rev Log: add support for folding immediates into stores when they are due to argument passing in calls. This is significant because it hits all immediate arguments to calls on x86-32. Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=57556&r1=57555&r2=57556&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original) +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Wed Oct 15 00:38:32 2008 @@ -240,28 +240,18 @@ // Get opcode and regclass of the output for the given store instruction. unsigned Opc = 0; switch (VT.getSimpleVT()) { + case MVT::f80: // No f80 support yet. default: return false; - case MVT::i8: - Opc = X86::MOV8mr; - break; - case MVT::i16: - Opc = X86::MOV16mr; - break; - case MVT::i32: - Opc = X86::MOV32mr; - break; - case MVT::i64: - Opc = X86::MOV64mr; // Must be in x86-64 mode. - break; + case MVT::i8: Opc = X86::MOV8mr; break; + case MVT::i16: Opc = X86::MOV16mr; break; + case MVT::i32: Opc = X86::MOV32mr; break; + case MVT::i64: Opc = X86::MOV64mr; break; // Must be in x86-64 mode. case MVT::f32: Opc = Subtarget->hasSSE1() ? X86::MOVSSmr : X86::ST_Fp32m; break; case MVT::f64: Opc = Subtarget->hasSSE2() ? X86::MOVSDmr : X86::ST_Fp64m; break; - case MVT::f80: - // No f80 support yet. - return false; } addFullAddress(BuildMI(MBB, TII.get(Opc)), AM).addReg(Val); @@ -297,7 +287,6 @@ unsigned ValReg = getRegForValue(Val); if (ValReg == 0) - // Unhandled operand. Halt "fast" selection and bail. return false; return X86FastEmitStore(VT, ValReg, AM); @@ -995,10 +984,12 @@ } // Deal with call operands first. - SmallVector Args; - SmallVector ArgVTs; - SmallVector ArgFlags; + SmallVector ArgVals; + SmallVector Args; + SmallVector ArgVTs; + SmallVector ArgFlags; Args.reserve(CS.arg_size()); + ArgVals.reserve(CS.arg_size()); ArgVTs.reserve(CS.arg_size()); ArgFlags.reserve(CS.arg_size()); for (CallSite::arg_iterator i = CS.arg_begin(), e = CS.arg_end(); @@ -1028,6 +1019,7 @@ Flags.setOrigAlign(OriginalAlignment); Args.push_back(Arg); + ArgVals.push_back(*i); ArgVTs.push_back(ArgVT); ArgFlags.push_back(Flags); } @@ -1097,7 +1089,15 @@ X86AddressMode AM; AM.Base.Reg = StackPtr; AM.Disp = LocMemOffset; - X86FastEmitStore(ArgVT, Arg, AM); + Value *ArgVal = ArgVals[VA.getValNo()]; + + // If this is a really simple value, emit this with the Value* version of + // X86FastEmitStore. If it isn't simple, we don't want to do this, as it + // can cause us to reevaluate the argument. + if (isa(ArgVal) || isa(ArgVal)) + X86FastEmitStore(ArgVT, ArgVal, AM); + else + X86FastEmitStore(ArgVT, Arg, AM); } } From sabre at nondot.org Wed Oct 15 00:53:25 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 05:53:25 -0000 Subject: [llvm-commits] [llvm] r57557 - /llvm/trunk/lib/Target/README.txt Message-ID: <200810150553.m9F5rQon011421@zion.cs.uiuc.edu> Author: lattner Date: Wed Oct 15 00:53:25 2008 New Revision: 57557 URL: http://llvm.org/viewvc/llvm-project?rev=57557&view=rev Log: add a note Modified: llvm/trunk/lib/Target/README.txt Modified: llvm/trunk/lib/Target/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/README.txt?rev=57557&r1=57556&r2=57557&view=diff ============================================================================== --- llvm/trunk/lib/Target/README.txt (original) +++ llvm/trunk/lib/Target/README.txt Wed Oct 15 00:53:25 2008 @@ -891,3 +891,33 @@ } //===---------------------------------------------------------------------===// + +This C++ file: +void g(); struct A { int n; int m; A& operator++(void) { ++n; if (n == m) g(); +return *this; } A() : n(0), m(0) { } friend bool operator!=(A const& a1, +A const& a2) { return a1.n != a2.n; } }; void testfunction(A& iter) { A const +end; while (iter != end) ++iter; } + +Compiles down to: + +bb: ; preds = %bb3.backedge, %bb.nph + %.rle = phi i32 [ %1, %bb.nph ], [ %7, %bb3.backedge ] ; [#uses=1] + %4 = add i32 %.rle, 1 ; [#uses=2] + store i32 %4, i32* %0, align 4 + %5 = load i32* %3, align 4 ; [#uses=1] + %6 = icmp eq i32 %4, %5 ; [#uses=1] + br i1 %6, label %bb1, label %bb3.backedge + +bb1: ; preds = %bb + tail call void @_Z1gv() + br label %bb3.backedge + +bb3.backedge: ; preds = %bb, %bb1 + %7 = load i32* %0, align 4 ; [#uses=2] + + +The %7 load is partially redundant with the store of %4 to %0, GVN's PRE +should remove it, but it doesn't apply to memory objects. + +//===---------------------------------------------------------------------===// + From sabre at nondot.org Wed Oct 15 01:03:38 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 06:03:38 -0000 Subject: [llvm-commits] [llvm] r57558 - /llvm/trunk/lib/AsmParser/llvmAsmParser.y Message-ID: <200810150603.m9F63d0b011855@zion.cs.uiuc.edu> Author: lattner Date: Wed Oct 15 01:03:37 2008 New Revision: 57558 URL: http://llvm.org/viewvc/llvm-project?rev=57558&view=rev Log: Eliminate the "IntType ::= INTTYPE" production, just use INTTYPE everywhere. Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=57558&r1=57557&r2=57558&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Wed Oct 15 01:03:37 2008 @@ -1071,7 +1071,7 @@ // Built in types... %type Types ResultTypes -%type IntType FPType PrimType // Classifications +%type FPType PrimType // Classifications %token VOID INTTYPE %token FLOAT DOUBLE X86_FP80 FP128 PPC_FP128 LABEL %token TYPE @@ -1167,7 +1167,6 @@ // These are some types that allow classification if we only want a particular // thing... for example, only a signed, unsigned, or integral type. -IntType : INTTYPE; FPType : FLOAT | DOUBLE | PPC_FP128 | FP128 | X86_FP80; LocalName : LOCALVAR | STRINGCONSTANT | PCTSTRINGCONSTANT ; @@ -1883,13 +1882,13 @@ delete $1; CHECK_FOR_ERROR } - | IntType ESINT64VAL { // integral constants + | INTTYPE ESINT64VAL { // integral constants if (!ConstantInt::isValueValidForType($1, $2)) GEN_ERROR("Constant value doesn't fit in type"); $$ = ConstantInt::get($1, $2, true); CHECK_FOR_ERROR } - | IntType ESAPINTVAL { // arbitrary precision integer constants + | INTTYPE ESAPINTVAL { // arbitrary precision integer constants uint32_t BitWidth = cast($1)->getBitWidth(); if ($2->getBitWidth() > BitWidth) { GEN_ERROR("Constant value does not fit in type"); @@ -1899,13 +1898,13 @@ delete $2; CHECK_FOR_ERROR } - | IntType EUINT64VAL { // integral constants + | INTTYPE EUINT64VAL { // integral constants if (!ConstantInt::isValueValidForType($1, $2)) GEN_ERROR("Constant value doesn't fit in type"); $$ = ConstantInt::get($1, $2, false); CHECK_FOR_ERROR } - | IntType EUAPINTVAL { // arbitrary precision integer constants + | INTTYPE EUAPINTVAL { // arbitrary precision integer constants uint32_t BitWidth = cast($1)->getBitWidth(); if ($2->getBitWidth() > BitWidth) { GEN_ERROR("Constant value does not fit in type"); @@ -2823,7 +2822,7 @@ CHECK_FOR_ERROR $$ = BranchInst::Create(tmpBBA, tmpBBB, tmpVal); } - | SWITCH IntType ValueRef ',' LABEL ValueRef '[' JumpTable ']' { + | SWITCH INTTYPE ValueRef ',' LABEL ValueRef '[' JumpTable ']' { Value* tmpVal = getVal($2, $3); CHECK_FOR_ERROR BasicBlock* tmpBB = getBBVal($6); @@ -2842,7 +2841,7 @@ delete $8; CHECK_FOR_ERROR } - | SWITCH IntType ValueRef ',' LABEL ValueRef '[' ']' { + | SWITCH INTTYPE ValueRef ',' LABEL ValueRef '[' ']' { Value* tmpVal = getVal($2, $3); CHECK_FOR_ERROR BasicBlock* tmpBB = getBBVal($6); @@ -2966,7 +2965,7 @@ -JumpTable : JumpTable IntType ConstValueRef ',' LABEL ValueRef { +JumpTable : JumpTable INTTYPE ConstValueRef ',' LABEL ValueRef { $$ = $1; Constant *V = cast(getExistingVal($2, $3)); CHECK_FOR_ERROR @@ -2977,7 +2976,7 @@ CHECK_FOR_ERROR $$->push_back(std::make_pair(V, tmpBB)); } - | IntType ConstValueRef ',' LABEL ValueRef { + | INTTYPE ConstValueRef ',' LABEL ValueRef { $$ = new std::vector >(); Constant *V = cast(getExistingVal($1, $2)); CHECK_FOR_ERROR From sabre at nondot.org Wed Oct 15 01:03:48 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 06:03:48 -0000 Subject: [llvm-commits] [llvm] r57559 - in /llvm/trunk/lib/AsmParser: llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y.cvs Message-ID: <200810150603.m9F63mZk011872@zion.cs.uiuc.edu> Author: lattner Date: Wed Oct 15 01:03:48 2008 New Revision: 57559 URL: http://llvm.org/viewvc/llvm-project?rev=57559&view=rev Log: regenerate Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs?rev=57559&r1=57558&r2=57559&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs Wed Oct 15 01:03:48 2008 @@ -394,7 +394,7 @@ /* Copy the first part of user declarations. */ -#line 14 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 14 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -1378,7 +1378,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 977 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 977 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -1655,16 +1655,16 @@ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 44 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 2439 +#define YYLAST 2334 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 89 +#define YYNNTS 88 /* YYNRULES -- Number of rules. */ -#define YYNRULES 354 +#define YYNRULES 353 /* YYNRULES -- Number of states. */ -#define YYNSTATES 717 +#define YYNSTATES 715 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -1731,42 +1731,42 @@ 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, - 119, 121, 123, 125, 127, 129, 130, 135, 136, 139, - 140, 143, 145, 147, 149, 150, 153, 155, 157, 159, - 161, 163, 165, 167, 169, 171, 172, 174, 176, 178, - 179, 181, 183, 184, 186, 188, 190, 192, 193, 195, - 197, 198, 200, 202, 204, 206, 208, 211, 213, 215, - 217, 219, 221, 223, 225, 227, 229, 232, 233, 236, - 238, 240, 242, 243, 246, 248, 250, 252, 254, 256, - 258, 260, 262, 264, 266, 267, 270, 271, 274, 275, - 278, 279, 283, 286, 287, 289, 290, 294, 296, 299, - 301, 303, 305, 307, 309, 311, 313, 315, 317, 321, - 323, 326, 332, 338, 344, 350, 354, 357, 363, 368, - 371, 373, 375, 377, 381, 383, 387, 389, 390, 392, - 396, 401, 405, 409, 414, 419, 423, 430, 436, 439, - 442, 445, 448, 451, 454, 457, 460, 463, 466, 469, - 472, 479, 485, 494, 501, 508, 516, 524, 532, 540, - 547, 556, 565, 571, 579, 583, 585, 587, 589, 591, - 592, 595, 602, 604, 605, 607, 610, 611, 615, 616, - 620, 624, 628, 632, 633, 642, 643, 653, 654, 664, - 670, 673, 677, 679, 683, 687, 691, 695, 697, 698, - 704, 708, 710, 714, 716, 717, 729, 731, 733, 738, - 740, 742, 745, 749, 750, 752, 754, 756, 758, 760, - 762, 764, 766, 768, 770, 772, 776, 780, 783, 786, - 790, 793, 799, 804, 806, 812, 814, 816, 818, 820, - 822, 824, 827, 829, 833, 836, 839, 843, 847, 850, - 851, 853, 856, 859, 863, 873, 883, 892, 908, 910, - 912, 919, 925, 928, 931, 938, 946, 951, 956, 963, - 970, 971, 972, 976, 979, 983, 986, 988, 994, 1000, - 1007, 1014, 1021, 1028, 1033, 1040, 1045, 1050, 1057, 1064, - 1067, 1077, 1079, 1081, 1082, 1086, 1093, 1097, 1104, 1107, - 1113, 1121, 1127, 1132, 1137 + 119, 121, 123, 125, 127, 128, 133, 134, 137, 138, + 141, 143, 145, 147, 148, 151, 153, 155, 157, 159, + 161, 163, 165, 167, 169, 170, 172, 174, 176, 177, + 179, 181, 182, 184, 186, 188, 190, 191, 193, 195, + 196, 198, 200, 202, 204, 206, 209, 211, 213, 215, + 217, 219, 221, 223, 225, 227, 230, 231, 234, 236, + 238, 240, 241, 244, 246, 248, 250, 252, 254, 256, + 258, 260, 262, 264, 265, 268, 269, 272, 273, 276, + 277, 281, 284, 285, 287, 288, 292, 294, 297, 299, + 301, 303, 305, 307, 309, 311, 313, 315, 319, 321, + 324, 330, 336, 342, 348, 352, 355, 361, 366, 369, + 371, 373, 375, 379, 381, 385, 387, 388, 390, 394, + 399, 403, 407, 412, 417, 421, 428, 434, 437, 440, + 443, 446, 449, 452, 455, 458, 461, 464, 467, 470, + 477, 483, 492, 499, 506, 514, 522, 530, 538, 545, + 554, 563, 569, 577, 581, 583, 585, 587, 589, 590, + 593, 600, 602, 603, 605, 608, 609, 613, 614, 618, + 622, 626, 630, 631, 640, 641, 651, 652, 662, 668, + 671, 675, 677, 681, 685, 689, 693, 695, 696, 702, + 706, 708, 712, 714, 715, 727, 729, 731, 736, 738, + 740, 743, 747, 748, 750, 752, 754, 756, 758, 760, + 762, 764, 766, 768, 770, 774, 778, 781, 784, 788, + 791, 797, 802, 804, 810, 812, 814, 816, 818, 820, + 822, 825, 827, 831, 834, 837, 841, 845, 848, 849, + 851, 854, 857, 861, 871, 881, 890, 906, 908, 910, + 917, 923, 926, 929, 936, 944, 949, 954, 961, 968, + 969, 970, 974, 977, 981, 984, 986, 992, 998, 1005, + 1012, 1019, 1026, 1031, 1038, 1043, 1048, 1055, 1062, 1065, + 1075, 1077, 1079, 1080, 1084, 1091, 1095, 1102, 1105, 1111, + 1119, 1125, 1130, 1135 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 222, 0, -1, 75, -1, 76, -1, 77, -1, 78, + 221, 0, -1, 75, -1, 76, -1, 77, -1, 78, -1, 79, -1, 80, -1, 81, -1, 82, -1, 83, -1, 87, -1, 88, -1, 89, -1, 84, -1, 85, -1, 86, -1, 120, -1, 121, -1, 122, -1, 123, @@ -1776,111 +1776,111 @@ -1, 101, -1, 102, -1, 103, -1, 104, -1, 105, -1, 106, -1, 107, -1, 108, -1, 109, -1, 110, -1, 111, -1, 112, -1, 113, -1, 100, -1, 101, - -1, 102, -1, 103, -1, 26, -1, 27, -1, 11, - -1, 12, -1, 13, -1, 16, -1, 15, -1, 14, - -1, 19, -1, 22, -1, 24, -1, 181, -1, -1, - 55, 159, 4, 160, -1, -1, 181, 161, -1, -1, - 7, 161, -1, 20, -1, 23, -1, 188, -1, -1, - 186, 161, -1, 42, -1, 44, -1, 43, -1, 45, - -1, 47, -1, 49, -1, 46, -1, 48, -1, 51, - -1, -1, 156, -1, 157, -1, 158, -1, -1, 46, - -1, 48, -1, -1, 42, -1, 43, -1, 44, -1, - 47, -1, -1, 44, -1, 42, -1, -1, 63, -1, - 64, -1, 65, -1, 66, -1, 67, -1, 62, 4, - -1, 142, -1, 121, -1, 141, -1, 122, -1, 144, - -1, 145, -1, 147, -1, 148, -1, 149, -1, 54, - 4, -1, -1, 197, 196, -1, 144, -1, 142, -1, - 141, -1, -1, 199, 198, -1, 143, -1, 146, -1, - 144, -1, 142, -1, 141, -1, 150, -1, 151, -1, - 154, -1, 155, -1, 153, -1, -1, 201, 200, -1, - -1, 152, 22, -1, -1, 54, 4, -1, -1, 162, - 54, 4, -1, 34, 22, -1, -1, 205, -1, -1, - 162, 208, 207, -1, 205, -1, 54, 4, -1, 11, - -1, 12, -1, 13, -1, 16, -1, 15, -1, 14, - -1, 17, -1, 50, -1, 209, -1, 210, 183, 163, - -1, 244, -1, 164, 4, -1, 210, 159, 214, 160, - 201, -1, 10, 159, 214, 160, 201, -1, 165, 4, - 166, 210, 167, -1, 168, 4, 166, 210, 169, -1, - 170, 215, 171, -1, 170, 171, -1, 168, 170, 215, - 171, 169, -1, 168, 170, 171, 169, -1, 210, 197, - -1, 210, -1, 10, -1, 211, -1, 213, 162, 211, - -1, 213, -1, 213, 162, 39, -1, 39, -1, -1, - 210, -1, 215, 162, 210, -1, 210, 165, 218, 167, - -1, 210, 165, 167, -1, 210, 172, 22, -1, 210, - 168, 218, 169, -1, 210, 170, 218, 171, -1, 210, - 170, 171, -1, 210, 168, 170, 218, 171, 169, -1, - 210, 168, 170, 171, 169, -1, 210, 40, -1, 210, - 41, -1, 210, 244, -1, 210, 217, -1, 210, 25, - -1, 179, 3, -1, 179, 5, -1, 179, 4, -1, - 179, 6, -1, 11, 26, -1, 11, 27, -1, 180, - 9, -1, 176, 159, 216, 38, 210, 160, -1, 119, - 159, 216, 256, 160, -1, 133, 159, 216, 162, 216, - 162, 216, 160, -1, 174, 159, 216, 162, 216, 160, - -1, 175, 159, 216, 162, 216, 160, -1, 90, 177, - 159, 216, 162, 216, 160, -1, 91, 178, 159, 216, - 162, 216, 160, -1, 92, 177, 159, 216, 162, 216, - 160, -1, 93, 178, 159, 216, 162, 216, 160, -1, - 135, 159, 216, 162, 216, 160, -1, 136, 159, 216, - 162, 216, 162, 216, 160, -1, 137, 159, 216, 162, - 216, 162, 216, 160, -1, 139, 159, 216, 257, 160, - -1, 140, 159, 216, 162, 216, 257, 160, -1, 218, - 162, 216, -1, 216, -1, 32, -1, 33, -1, 37, - -1, -1, 212, 244, -1, 125, 159, 221, 38, 210, - 160, -1, 223, -1, -1, 224, -1, 223, 224, -1, - -1, 31, 225, 240, -1, -1, 30, 226, 241, -1, - 60, 59, 230, -1, 184, 18, 210, -1, 184, 18, - 10, -1, -1, 187, 191, 220, 219, 216, 183, 227, - 207, -1, -1, 187, 189, 191, 220, 219, 216, 183, - 228, 207, -1, -1, 187, 190, 191, 220, 219, 210, - 183, 229, 207, -1, 187, 191, 35, 194, 221, -1, - 52, 231, -1, 56, 161, 232, -1, 22, -1, 53, - 161, 22, -1, 68, 161, 22, -1, 165, 233, 167, - -1, 233, 162, 22, -1, 22, -1, -1, 234, 162, - 210, 197, 182, -1, 210, 197, 182, -1, 234, -1, - 234, 162, 39, -1, 39, -1, -1, 195, 199, 212, - 186, 159, 235, 160, 201, 206, 203, 202, -1, 28, - -1, 170, -1, 193, 191, 236, 237, -1, 29, -1, - 171, -1, 248, 239, -1, 192, 191, 236, -1, -1, - 61, -1, 3, -1, 4, -1, 5, -1, 6, -1, - 9, -1, 26, -1, 27, -1, 40, -1, 41, -1, - 25, -1, 168, 218, 169, -1, 165, 218, 167, -1, - 165, 167, -1, 172, 22, -1, 170, 218, 171, -1, - 170, 171, -1, 168, 170, 218, 171, 169, -1, 168, - 170, 171, 169, -1, 217, -1, 59, 242, 22, 162, - 22, -1, 7, -1, 8, -1, 181, -1, 186, -1, - 244, -1, 243, -1, 210, 245, -1, 246, -1, 247, - 162, 246, -1, 248, 249, -1, 238, 249, -1, 250, - 184, 251, -1, 250, 185, 251, -1, 250, 253, -1, - -1, 21, -1, 69, 247, -1, 69, 10, -1, 70, - 17, 245, -1, 70, 11, 245, 162, 17, 245, 162, - 17, 245, -1, 71, 179, 245, 162, 17, 245, 165, - 252, 167, -1, 71, 179, 245, 162, 17, 245, 165, - 167, -1, 72, 195, 199, 212, 245, 159, 255, 160, - 201, 38, 17, 245, 73, 17, 245, -1, 73, -1, - 74, -1, 252, 179, 243, 162, 17, 245, -1, 179, - 243, 162, 17, 245, -1, 184, 259, -1, 185, 259, - -1, 210, 165, 245, 162, 245, 167, -1, 254, 162, - 165, 245, 162, 245, 167, -1, 210, 197, 245, 197, - -1, 17, 197, 245, 197, -1, 255, 162, 210, 197, - 245, 197, -1, 255, 162, 17, 197, 245, 197, -1, - -1, -1, 256, 162, 246, -1, 162, 4, -1, 257, - 162, 4, -1, 58, 57, -1, 57, -1, 174, 210, - 245, 162, 245, -1, 175, 210, 245, 162, 245, -1, - 90, 177, 210, 245, 162, 245, -1, 91, 178, 210, - 245, 162, 245, -1, 92, 177, 210, 245, 162, 245, - -1, 93, 178, 210, 245, 162, 245, -1, 176, 246, - 38, 210, -1, 133, 246, 162, 246, 162, 246, -1, - 134, 246, 162, 210, -1, 135, 246, 162, 246, -1, - 136, 246, 162, 246, 162, 246, -1, 137, 246, 162, - 246, 162, 246, -1, 132, 254, -1, 258, 195, 199, - 212, 245, 159, 255, 160, 201, -1, 261, -1, 36, - -1, -1, 114, 210, 204, -1, 114, 210, 162, 11, - 245, 204, -1, 115, 210, 204, -1, 115, 210, 162, - 11, 245, 204, -1, 116, 246, -1, 260, 117, 210, - 245, 204, -1, 260, 118, 246, 162, 210, 245, 204, - -1, 138, 210, 245, 162, 4, -1, 119, 210, 245, - 256, -1, 139, 210, 245, 257, -1, 140, 210, 245, - 162, 210, 245, 257, -1 + -1, 102, -1, 103, -1, 26, -1, 27, -1, 12, + -1, 13, -1, 16, -1, 15, -1, 14, -1, 19, + -1, 22, -1, 24, -1, 180, -1, -1, 55, 159, + 4, 160, -1, -1, 180, 161, -1, -1, 7, 161, + -1, 20, -1, 23, -1, 187, -1, -1, 185, 161, + -1, 42, -1, 44, -1, 43, -1, 45, -1, 47, + -1, 49, -1, 46, -1, 48, -1, 51, -1, -1, + 156, -1, 157, -1, 158, -1, -1, 46, -1, 48, + -1, -1, 42, -1, 43, -1, 44, -1, 47, -1, + -1, 44, -1, 42, -1, -1, 63, -1, 64, -1, + 65, -1, 66, -1, 67, -1, 62, 4, -1, 142, + -1, 121, -1, 141, -1, 122, -1, 144, -1, 145, + -1, 147, -1, 148, -1, 149, -1, 54, 4, -1, + -1, 196, 195, -1, 144, -1, 142, -1, 141, -1, + -1, 198, 197, -1, 143, -1, 146, -1, 144, -1, + 142, -1, 141, -1, 150, -1, 151, -1, 154, -1, + 155, -1, 153, -1, -1, 200, 199, -1, -1, 152, + 22, -1, -1, 54, 4, -1, -1, 162, 54, 4, + -1, 34, 22, -1, -1, 204, -1, -1, 162, 207, + 206, -1, 204, -1, 54, 4, -1, 11, -1, 12, + -1, 13, -1, 16, -1, 15, -1, 14, -1, 17, + -1, 50, -1, 208, -1, 209, 182, 163, -1, 243, + -1, 164, 4, -1, 209, 159, 213, 160, 200, -1, + 10, 159, 213, 160, 200, -1, 165, 4, 166, 209, + 167, -1, 168, 4, 166, 209, 169, -1, 170, 214, + 171, -1, 170, 171, -1, 168, 170, 214, 171, 169, + -1, 168, 170, 171, 169, -1, 209, 196, -1, 209, + -1, 10, -1, 210, -1, 212, 162, 210, -1, 212, + -1, 212, 162, 39, -1, 39, -1, -1, 209, -1, + 214, 162, 209, -1, 209, 165, 217, 167, -1, 209, + 165, 167, -1, 209, 172, 22, -1, 209, 168, 217, + 169, -1, 209, 170, 217, 171, -1, 209, 170, 171, + -1, 209, 168, 170, 217, 171, 169, -1, 209, 168, + 170, 171, 169, -1, 209, 40, -1, 209, 41, -1, + 209, 243, -1, 209, 216, -1, 209, 25, -1, 11, + 3, -1, 11, 5, -1, 11, 4, -1, 11, 6, + -1, 11, 26, -1, 11, 27, -1, 179, 9, -1, + 176, 159, 215, 38, 209, 160, -1, 119, 159, 215, + 255, 160, -1, 133, 159, 215, 162, 215, 162, 215, + 160, -1, 174, 159, 215, 162, 215, 160, -1, 175, + 159, 215, 162, 215, 160, -1, 90, 177, 159, 215, + 162, 215, 160, -1, 91, 178, 159, 215, 162, 215, + 160, -1, 92, 177, 159, 215, 162, 215, 160, -1, + 93, 178, 159, 215, 162, 215, 160, -1, 135, 159, + 215, 162, 215, 160, -1, 136, 159, 215, 162, 215, + 162, 215, 160, -1, 137, 159, 215, 162, 215, 162, + 215, 160, -1, 139, 159, 215, 256, 160, -1, 140, + 159, 215, 162, 215, 256, 160, -1, 217, 162, 215, + -1, 215, -1, 32, -1, 33, -1, 37, -1, -1, + 211, 243, -1, 125, 159, 220, 38, 209, 160, -1, + 222, -1, -1, 223, -1, 222, 223, -1, -1, 31, + 224, 239, -1, -1, 30, 225, 240, -1, 60, 59, + 229, -1, 183, 18, 209, -1, 183, 18, 10, -1, + -1, 186, 190, 219, 218, 215, 182, 226, 206, -1, + -1, 186, 188, 190, 219, 218, 215, 182, 227, 206, + -1, -1, 186, 189, 190, 219, 218, 209, 182, 228, + 206, -1, 186, 190, 35, 193, 220, -1, 52, 230, + -1, 56, 161, 231, -1, 22, -1, 53, 161, 22, + -1, 68, 161, 22, -1, 165, 232, 167, -1, 232, + 162, 22, -1, 22, -1, -1, 233, 162, 209, 196, + 181, -1, 209, 196, 181, -1, 233, -1, 233, 162, + 39, -1, 39, -1, -1, 194, 198, 211, 185, 159, + 234, 160, 200, 205, 202, 201, -1, 28, -1, 170, + -1, 192, 190, 235, 236, -1, 29, -1, 171, -1, + 247, 238, -1, 191, 190, 235, -1, -1, 61, -1, + 3, -1, 4, -1, 5, -1, 6, -1, 9, -1, + 26, -1, 27, -1, 40, -1, 41, -1, 25, -1, + 168, 217, 169, -1, 165, 217, 167, -1, 165, 167, + -1, 172, 22, -1, 170, 217, 171, -1, 170, 171, + -1, 168, 170, 217, 171, 169, -1, 168, 170, 171, + 169, -1, 216, -1, 59, 241, 22, 162, 22, -1, + 7, -1, 8, -1, 180, -1, 185, -1, 243, -1, + 242, -1, 209, 244, -1, 245, -1, 246, 162, 245, + -1, 247, 248, -1, 237, 248, -1, 249, 183, 250, + -1, 249, 184, 250, -1, 249, 252, -1, -1, 21, + -1, 69, 246, -1, 69, 10, -1, 70, 17, 244, + -1, 70, 11, 244, 162, 17, 244, 162, 17, 244, + -1, 71, 11, 244, 162, 17, 244, 165, 251, 167, + -1, 71, 11, 244, 162, 17, 244, 165, 167, -1, + 72, 194, 198, 211, 244, 159, 254, 160, 200, 38, + 17, 244, 73, 17, 244, -1, 73, -1, 74, -1, + 251, 11, 242, 162, 17, 244, -1, 11, 242, 162, + 17, 244, -1, 183, 258, -1, 184, 258, -1, 209, + 165, 244, 162, 244, 167, -1, 253, 162, 165, 244, + 162, 244, 167, -1, 209, 196, 244, 196, -1, 17, + 196, 244, 196, -1, 254, 162, 209, 196, 244, 196, + -1, 254, 162, 17, 196, 244, 196, -1, -1, -1, + 255, 162, 245, -1, 162, 4, -1, 256, 162, 4, + -1, 58, 57, -1, 57, -1, 174, 209, 244, 162, + 244, -1, 175, 209, 244, 162, 244, -1, 90, 177, + 209, 244, 162, 244, -1, 91, 178, 209, 244, 162, + 244, -1, 92, 177, 209, 244, 162, 244, -1, 93, + 178, 209, 244, 162, 244, -1, 176, 245, 38, 209, + -1, 133, 245, 162, 245, 162, 245, -1, 134, 245, + 162, 209, -1, 135, 245, 162, 245, -1, 136, 245, + 162, 245, 162, 245, -1, 137, 245, 162, 245, 162, + 245, -1, 132, 253, -1, 257, 194, 198, 211, 244, + 159, 254, 160, 200, -1, 260, -1, 36, -1, -1, + 114, 209, 203, -1, 114, 209, 162, 11, 244, 203, + -1, 115, 209, 203, -1, 115, 209, 162, 11, 244, + 203, -1, 116, 245, -1, 259, 117, 209, 244, 203, + -1, 259, 118, 245, 162, 209, 244, 203, -1, 138, + 209, 244, 162, 4, -1, 119, 209, 244, 255, -1, + 139, 209, 244, 256, -1, 140, 209, 244, 162, 209, + 244, 256, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -1891,37 +1891,37 @@ 1145, 1145, 1145, 1146, 1146, 1146, 1146, 1146, 1146, 1149, 1149, 1150, 1150, 1151, 1151, 1152, 1152, 1153, 1153, 1157, 1157, 1158, 1158, 1159, 1159, 1160, 1160, 1161, 1161, 1162, - 1162, 1163, 1163, 1164, 1165, 1170, 1171, 1171, 1171, 1171, - 1171, 1173, 1173, 1173, 1174, 1174, 1176, 1177, 1181, 1185, - 1190, 1196, 1196, 1198, 1199, 1204, 1210, 1211, 1212, 1213, - 1214, 1215, 1219, 1220, 1221, 1225, 1226, 1227, 1228, 1232, - 1233, 1234, 1238, 1239, 1240, 1241, 1242, 1246, 1247, 1248, - 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1264, 1265, 1266, - 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1277, 1278, 1283, - 1284, 1285, 1288, 1289, 1295, 1296, 1297, 1298, 1299, 1300, - 1301, 1302, 1303, 1304, 1307, 1308, 1314, 1315, 1322, 1323, - 1329, 1330, 1339, 1347, 1348, 1353, 1354, 1355, 1360, 1373, - 1373, 1373, 1373, 1373, 1373, 1373, 1376, 1380, 1384, 1391, - 1396, 1404, 1439, 1470, 1475, 1485, 1495, 1499, 1509, 1516, - 1525, 1532, 1537, 1542, 1549, 1550, 1557, 1564, 1572, 1578, - 1590, 1618, 1634, 1661, 1689, 1715, 1735, 1761, 1781, 1793, - 1800, 1866, 1876, 1886, 1892, 1902, 1908, 1918, 1924, 1930, - 1946, 1958, 1979, 1987, 1993, 2004, 2009, 2014, 2019, 2024, - 2030, 2036, 2042, 2050, 2061, 2065, 2073, 2073, 2076, 2076, - 2079, 2091, 2112, 2117, 2125, 2126, 2130, 2130, 2134, 2134, - 2137, 2140, 2164, 2176, 2175, 2187, 2186, 2196, 2195, 2206, - 2246, 2249, 2255, 2265, 2269, 2274, 2276, 2281, 2286, 2295, - 2305, 2316, 2320, 2329, 2338, 2343, 2492, 2492, 2494, 2503, - 2503, 2505, 2510, 2522, 2526, 2531, 2535, 2539, 2544, 2549, - 2553, 2557, 2561, 2565, 2569, 2573, 2595, 2617, 2623, 2636, - 2648, 2653, 2665, 2671, 2675, 2685, 2689, 2693, 2698, 2705, - 2705, 2711, 2720, 2725, 2730, 2734, 2743, 2752, 2765, 2774, - 2778, 2786, 2806, 2810, 2815, 2826, 2845, 2854, 2958, 2962, - 2969, 2980, 2993, 3002, 3015, 3026, 3036, 3047, 3055, 3065, - 3072, 3075, 3076, 3084, 3090, 3099, 3103, 3108, 3124, 3141, - 3153, 3165, 3179, 3193, 3205, 3226, 3233, 3239, 3245, 3251, - 3266, 3376, 3381, 3385, 3392, 3399, 3409, 3416, 3426, 3434, - 3448, 3465, 3479, 3494, 3509 + 1162, 1163, 1163, 1164, 1165, 1170, 1170, 1170, 1170, 1170, + 1172, 1172, 1172, 1173, 1173, 1175, 1176, 1180, 1184, 1189, + 1195, 1195, 1197, 1198, 1203, 1209, 1210, 1211, 1212, 1213, + 1214, 1218, 1219, 1220, 1224, 1225, 1226, 1227, 1231, 1232, + 1233, 1237, 1238, 1239, 1240, 1241, 1245, 1246, 1247, 1250, + 1251, 1252, 1253, 1254, 1255, 1256, 1263, 1264, 1265, 1266, + 1267, 1268, 1269, 1270, 1271, 1272, 1276, 1277, 1282, 1283, + 1284, 1287, 1288, 1294, 1295, 1296, 1297, 1298, 1299, 1300, + 1301, 1302, 1303, 1306, 1307, 1313, 1314, 1321, 1322, 1328, + 1329, 1338, 1346, 1347, 1352, 1353, 1354, 1359, 1372, 1372, + 1372, 1372, 1372, 1372, 1372, 1375, 1379, 1383, 1390, 1395, + 1403, 1438, 1469, 1474, 1484, 1494, 1498, 1508, 1515, 1524, + 1531, 1536, 1541, 1548, 1549, 1556, 1563, 1571, 1577, 1589, + 1617, 1633, 1660, 1688, 1714, 1734, 1760, 1780, 1792, 1799, + 1865, 1875, 1885, 1891, 1901, 1907, 1917, 1923, 1929, 1945, + 1957, 1978, 1986, 1992, 2003, 2008, 2013, 2018, 2023, 2029, + 2035, 2041, 2049, 2060, 2064, 2072, 2072, 2075, 2075, 2078, + 2090, 2111, 2116, 2124, 2125, 2129, 2129, 2133, 2133, 2136, + 2139, 2163, 2175, 2174, 2186, 2185, 2195, 2194, 2205, 2245, + 2248, 2254, 2264, 2268, 2273, 2275, 2280, 2285, 2294, 2304, + 2315, 2319, 2328, 2337, 2342, 2491, 2491, 2493, 2502, 2502, + 2504, 2509, 2521, 2525, 2530, 2534, 2538, 2543, 2548, 2552, + 2556, 2560, 2564, 2568, 2572, 2594, 2616, 2622, 2635, 2647, + 2652, 2664, 2670, 2674, 2684, 2688, 2692, 2697, 2704, 2704, + 2710, 2719, 2724, 2729, 2733, 2742, 2751, 2764, 2773, 2777, + 2785, 2805, 2809, 2814, 2825, 2844, 2853, 2957, 2961, 2968, + 2979, 2992, 3001, 3014, 3025, 3035, 3046, 3054, 3064, 3071, + 3074, 3075, 3083, 3089, 3098, 3102, 3107, 3123, 3140, 3152, + 3164, 3178, 3192, 3204, 3225, 3232, 3238, 3244, 3250, 3265, + 3375, 3380, 3384, 3391, 3398, 3408, 3415, 3425, 3433, 3447, + 3464, 3478, 3493, 3508 }; #endif @@ -1957,13 +1957,13 @@ "DEFAULT", "HIDDEN", "PROTECTED", "'('", "')'", "'='", "','", "'*'", "'\\\\'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'", "'c'", "$accept", "ArithmeticOps", "LogicalOps", "CastOps", "IPredicates", - "FPredicates", "IntType", "FPType", "LocalName", "OptLocalName", - "OptAddrSpace", "OptLocalAssign", "LocalNumber", "GlobalName", - "OptGlobalAssign", "GlobalAssign", "GVInternalLinkage", - "GVExternalLinkage", "GVVisibilityStyle", "FunctionDeclareLinkage", - "FunctionDefineLinkage", "AliasLinkage", "OptCallingConv", "Attribute", - "OptAttributes", "RetAttr", "OptRetAttrs", "FuncAttr", "OptFuncAttrs", - "OptGC", "OptAlign", "OptCAlign", "SectionString", "OptSection", + "FPredicates", "FPType", "LocalName", "OptLocalName", "OptAddrSpace", + "OptLocalAssign", "LocalNumber", "GlobalName", "OptGlobalAssign", + "GlobalAssign", "GVInternalLinkage", "GVExternalLinkage", + "GVVisibilityStyle", "FunctionDeclareLinkage", "FunctionDefineLinkage", + "AliasLinkage", "OptCallingConv", "Attribute", "OptAttributes", + "RetAttr", "OptRetAttrs", "FuncAttr", "OptFuncAttrs", "OptGC", + "OptAlign", "OptCAlign", "SectionString", "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "PrimType", "Types", "ArgType", "ResultTypes", "ArgTypeList", "ArgTypeListI", "TypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType", "ThreadLocal", @@ -2013,37 +2013,37 @@ 176, 176, 176, 176, 176, 176, 176, 176, 176, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 179, 180, 180, 180, 180, - 180, 181, 181, 181, 182, 182, 183, 183, 184, 184, - 185, 186, 186, 187, 187, 188, 189, 189, 189, 189, - 189, 189, 190, 190, 190, 191, 191, 191, 191, 192, - 192, 192, 193, 193, 193, 193, 193, 194, 194, 194, - 195, 195, 195, 195, 195, 195, 195, 196, 196, 196, - 196, 196, 196, 196, 196, 196, 196, 197, 197, 198, - 198, 198, 199, 199, 200, 200, 200, 200, 200, 200, - 200, 200, 200, 200, 201, 201, 202, 202, 203, 203, - 204, 204, 205, 206, 206, 207, 207, 208, 208, 209, - 209, 209, 209, 209, 209, 209, 210, 210, 210, 210, - 210, 210, 210, 210, 210, 210, 210, 210, 210, 211, - 212, 212, 213, 213, 214, 214, 214, 214, 215, 215, + 178, 178, 178, 178, 178, 179, 179, 179, 179, 179, + 180, 180, 180, 181, 181, 182, 182, 183, 183, 184, + 185, 185, 186, 186, 187, 188, 188, 188, 188, 188, + 188, 189, 189, 189, 190, 190, 190, 190, 191, 191, + 191, 192, 192, 192, 192, 192, 193, 193, 193, 194, + 194, 194, 194, 194, 194, 194, 195, 195, 195, 195, + 195, 195, 195, 195, 195, 195, 196, 196, 197, 197, + 197, 198, 198, 199, 199, 199, 199, 199, 199, 199, + 199, 199, 199, 200, 200, 201, 201, 202, 202, 203, + 203, 204, 205, 205, 206, 206, 207, 207, 208, 208, + 208, 208, 208, 208, 208, 209, 209, 209, 209, 209, + 209, 209, 209, 209, 209, 209, 209, 209, 210, 211, + 211, 212, 212, 213, 213, 213, 213, 214, 214, 215, + 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, + 215, 215, 215, 215, 215, 215, 215, 215, 215, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 217, 217, 217, 217, 217, 217, 217, 217, 217, 217, - 217, 217, 217, 217, 218, 218, 219, 219, 220, 220, - 221, 221, 222, 222, 223, 223, 225, 224, 226, 224, - 224, 224, 224, 227, 224, 228, 224, 229, 224, 224, - 224, 224, 230, 231, 231, 232, 233, 233, 233, 234, - 234, 235, 235, 235, 235, 236, 237, 237, 238, 239, - 239, 240, 241, 242, 242, 243, 243, 243, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, - 243, 243, 243, 243, 243, 244, 244, 244, 244, 245, - 245, 246, 247, 247, 248, 248, 249, 249, 250, 250, - 250, 251, 251, 251, 251, 251, 251, 251, 251, 251, - 252, 252, 253, 253, 254, 254, 255, 255, 255, 255, - 255, 256, 256, 257, 257, 258, 258, 259, 259, 259, - 259, 259, 259, 259, 259, 259, 259, 259, 259, 259, - 259, 259, 260, 260, 261, 261, 261, 261, 261, 261, - 261, 261, 261, 261, 261 + 216, 216, 216, 217, 217, 218, 218, 219, 219, 220, + 220, 221, 221, 222, 222, 224, 223, 225, 223, 223, + 223, 223, 226, 223, 227, 223, 228, 223, 223, 223, + 223, 229, 230, 230, 231, 232, 232, 232, 233, 233, + 234, 234, 234, 234, 235, 236, 236, 237, 238, 238, + 239, 240, 241, 241, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, + 242, 242, 242, 242, 243, 243, 243, 243, 244, 244, + 245, 246, 246, 247, 247, 248, 248, 249, 249, 249, + 250, 250, 250, 250, 250, 250, 250, 250, 250, 251, + 251, 252, 252, 253, 253, 254, 254, 254, 254, 254, + 255, 255, 256, 256, 257, 257, 258, 258, 258, 258, + 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, + 258, 259, 259, 260, 260, 260, 260, 260, 260, 260, + 260, 260, 260, 260 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -2055,36 +2055,36 @@ 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, 1, 1, 0, 4, 0, 2, 0, - 2, 1, 1, 1, 0, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, - 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, - 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 0, 2, 1, - 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 2, 0, 2, 0, 2, - 0, 3, 2, 0, 1, 0, 3, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, - 2, 5, 5, 5, 5, 3, 2, 5, 4, 2, - 1, 1, 1, 3, 1, 3, 1, 0, 1, 3, - 4, 3, 3, 4, 4, 3, 6, 5, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 6, 5, 8, 6, 6, 7, 7, 7, 7, 6, - 8, 8, 5, 7, 3, 1, 1, 1, 1, 0, - 2, 6, 1, 0, 1, 2, 0, 3, 0, 3, - 3, 3, 3, 0, 8, 0, 9, 0, 9, 5, - 2, 3, 1, 3, 3, 3, 3, 1, 0, 5, - 3, 1, 3, 1, 0, 11, 1, 1, 4, 1, - 1, 2, 3, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 3, 2, 2, 3, - 2, 5, 4, 1, 5, 1, 1, 1, 1, 1, - 1, 2, 1, 3, 2, 2, 3, 3, 2, 0, - 1, 2, 2, 3, 9, 9, 8, 15, 1, 1, - 6, 5, 2, 2, 6, 7, 4, 4, 6, 6, - 0, 0, 3, 2, 3, 2, 1, 5, 5, 6, - 6, 6, 6, 4, 6, 4, 4, 6, 6, 2, - 9, 1, 1, 0, 3, 6, 3, 6, 2, 5, - 7, 5, 4, 4, 7 + 1, 1, 1, 1, 0, 4, 0, 2, 0, 2, + 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, + 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, + 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 2, 0, 2, 1, 1, + 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 0, 2, 0, 2, 0, 2, 0, + 3, 2, 0, 1, 0, 3, 1, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, + 5, 5, 5, 5, 3, 2, 5, 4, 2, 1, + 1, 1, 3, 1, 3, 1, 0, 1, 3, 4, + 3, 3, 4, 4, 3, 6, 5, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, + 5, 8, 6, 6, 7, 7, 7, 7, 6, 8, + 8, 5, 7, 3, 1, 1, 1, 1, 0, 2, + 6, 1, 0, 1, 2, 0, 3, 0, 3, 3, + 3, 3, 0, 8, 0, 9, 0, 9, 5, 2, + 3, 1, 3, 3, 3, 3, 1, 0, 5, 3, + 1, 3, 1, 0, 11, 1, 1, 4, 1, 1, + 2, 3, 0, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 3, 2, 2, 3, 2, + 5, 4, 1, 5, 1, 1, 1, 1, 1, 1, + 2, 1, 3, 2, 2, 3, 3, 2, 0, 1, + 2, 2, 3, 9, 9, 8, 15, 1, 1, 6, + 5, 2, 2, 6, 7, 4, 4, 6, 6, 0, + 0, 3, 2, 3, 2, 1, 5, 5, 6, 6, + 6, 6, 4, 6, 4, 4, 6, 6, 2, 9, + 1, 1, 0, 3, 6, 3, 6, 2, 5, 7, + 5, 4, 4, 7 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -2092,628 +2092,613 @@ means the default is an error. */ static const yytype_uint16 yydefact[] = { - 74, 61, 71, 62, 72, 63, 228, 226, 0, 0, - 0, 0, 0, 0, 85, 73, 0, 74, 224, 89, - 92, 0, 0, 240, 0, 0, 68, 0, 75, 76, - 78, 77, 79, 82, 80, 83, 81, 84, 86, 87, - 88, 85, 85, 219, 1, 225, 90, 91, 85, 229, - 93, 94, 95, 96, 85, 299, 227, 299, 0, 0, - 248, 241, 242, 230, 285, 286, 232, 149, 150, 151, - 154, 153, 152, 155, 156, 0, 0, 0, 0, 287, - 288, 157, 231, 159, 219, 219, 97, 218, 0, 100, - 100, 300, 295, 69, 259, 260, 261, 294, 243, 244, - 247, 0, 177, 160, 0, 0, 0, 0, 166, 178, - 0, 0, 177, 0, 0, 0, 99, 98, 0, 216, - 217, 0, 0, 101, 102, 103, 104, 105, 122, 262, - 0, 0, 343, 343, 298, 0, 245, 176, 117, 172, - 174, 0, 0, 0, 0, 0, 0, 165, 0, 0, - 158, 0, 0, 171, 0, 170, 0, 239, 149, 150, - 151, 154, 153, 152, 0, 0, 67, 67, 106, 0, - 256, 257, 258, 70, 342, 326, 0, 0, 0, 0, - 100, 308, 309, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 14, 15, 16, 11, 12, 13, 0, 0, - 0, 0, 0, 0, 0, 0, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 296, 100, 312, 0, 341, 297, 313, 246, 169, 0, - 134, 67, 67, 168, 0, 179, 0, 134, 67, 67, - 0, 220, 197, 198, 193, 195, 194, 196, 199, 192, - 188, 189, 0, 0, 0, 0, 0, 0, 0, 0, + 73, 60, 70, 61, 71, 62, 227, 225, 0, 0, + 0, 0, 0, 0, 84, 72, 0, 73, 223, 88, + 91, 0, 0, 239, 0, 0, 67, 0, 74, 75, + 77, 76, 78, 81, 79, 82, 80, 83, 85, 86, + 87, 84, 84, 218, 1, 224, 89, 90, 84, 228, + 92, 93, 94, 95, 84, 298, 226, 298, 0, 0, + 247, 240, 241, 229, 284, 285, 231, 148, 149, 150, + 153, 152, 151, 154, 155, 0, 0, 0, 0, 286, + 287, 156, 230, 158, 218, 218, 96, 217, 0, 99, + 99, 299, 294, 68, 258, 259, 260, 293, 242, 243, + 246, 0, 176, 159, 0, 0, 0, 0, 165, 177, + 0, 0, 176, 0, 0, 0, 98, 97, 0, 215, + 216, 0, 0, 100, 101, 102, 103, 104, 121, 261, + 0, 0, 342, 342, 297, 0, 244, 175, 116, 171, + 173, 0, 0, 0, 0, 0, 0, 164, 0, 0, + 157, 0, 0, 170, 0, 169, 0, 238, 148, 149, + 150, 153, 152, 151, 0, 66, 66, 105, 0, 255, + 256, 257, 69, 341, 325, 0, 0, 0, 0, 99, + 307, 308, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 14, 15, 16, 11, 12, 13, 0, 0, 0, + 0, 0, 0, 0, 0, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 295, + 99, 311, 0, 340, 296, 312, 245, 168, 0, 133, + 66, 66, 167, 0, 178, 0, 133, 66, 66, 0, + 219, 192, 194, 193, 195, 196, 197, 198, 191, 187, + 188, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 190, + 189, 232, 120, 119, 118, 122, 0, 324, 301, 66, + 291, 300, 0, 0, 0, 121, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 0, 53, 54, 49, + 50, 51, 52, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 0, 0, 0, 139, 139, 347, 66, + 66, 338, 0, 0, 0, 0, 0, 66, 66, 66, + 66, 66, 0, 121, 0, 0, 0, 107, 109, 108, + 106, 110, 111, 112, 113, 114, 117, 174, 172, 161, + 162, 163, 166, 65, 160, 234, 236, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, + 214, 0, 0, 0, 184, 0, 181, 0, 0, 0, + 144, 0, 264, 265, 266, 267, 268, 273, 269, 270, + 271, 272, 262, 0, 0, 0, 0, 282, 289, 288, + 290, 0, 0, 302, 0, 0, 66, 66, 66, 66, + 0, 343, 0, 345, 320, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, + 0, 115, 127, 126, 123, 125, 124, 128, 129, 132, + 130, 131, 134, 144, 144, 0, 0, 0, 0, 0, + 320, 0, 0, 0, 0, 0, 0, 0, 179, 165, + 177, 0, 182, 183, 0, 0, 0, 0, 233, 253, + 263, 0, 276, 0, 0, 0, 279, 0, 277, 292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 191, 190, 233, 121, 120, 119, 123, 0, 325, 302, - 67, 292, 301, 0, 0, 55, 0, 122, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 0, 53, - 54, 49, 50, 51, 52, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 0, 0, 0, 140, 140, - 348, 67, 67, 339, 0, 0, 0, 0, 0, 67, - 67, 67, 67, 67, 0, 122, 0, 0, 0, 108, - 110, 109, 107, 111, 112, 113, 114, 115, 118, 175, - 173, 162, 163, 164, 167, 66, 161, 235, 237, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 181, 215, 0, 0, 0, 185, 0, 182, 0, - 0, 0, 145, 0, 265, 266, 267, 268, 269, 274, - 270, 271, 272, 273, 263, 0, 0, 0, 0, 283, - 290, 289, 291, 0, 0, 303, 0, 0, 67, 67, - 67, 67, 0, 344, 0, 346, 321, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 67, 0, 116, 128, 127, 124, 126, 125, 129, - 130, 133, 131, 132, 135, 145, 145, 0, 0, 0, - 0, 0, 321, 0, 0, 0, 0, 0, 0, 0, - 180, 166, 178, 0, 183, 184, 0, 0, 0, 0, - 234, 254, 264, 0, 277, 0, 0, 0, 280, 0, - 278, 293, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 352, 0, 0, 0, 335, 336, 0, 0, - 0, 0, 353, 0, 0, 0, 333, 0, 140, 0, - 236, 238, 67, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 214, 187, 0, 0, 0, 0, - 0, 0, 147, 145, 253, 117, 251, 0, 0, 276, - 166, 0, 275, 279, 0, 0, 0, 0, 0, 0, - 0, 140, 141, 140, 0, 0, 0, 0, 0, 0, - 351, 323, 0, 67, 327, 328, 0, 0, 349, 67, - 221, 0, 0, 0, 0, 201, 0, 0, 0, 0, - 212, 0, 186, 0, 0, 67, 142, 148, 146, 65, - 0, 134, 0, 282, 0, 0, 0, 320, 329, 330, - 331, 332, 345, 347, 322, 0, 0, 334, 337, 338, - 324, 0, 320, 140, 0, 0, 0, 0, 0, 209, - 0, 0, 0, 203, 204, 200, 64, 250, 252, 117, - 143, 284, 281, 0, 0, 117, 117, 0, 314, 0, - 354, 0, 350, 205, 206, 207, 208, 0, 0, 0, - 213, 65, 144, 138, 0, 306, 0, 0, 0, 0, - 134, 0, 315, 134, 202, 210, 211, 249, 0, 136, - 304, 0, 305, 0, 108, 110, 117, 117, 0, 117, - 117, 340, 139, 0, 255, 0, 0, 317, 316, 0, - 0, 0, 137, 0, 0, 0, 117, 117, 311, 0, - 0, 319, 318, 310, 0, 0, 307 + 351, 0, 0, 0, 334, 335, 0, 0, 0, 0, + 352, 0, 0, 0, 332, 0, 139, 0, 235, 237, + 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 213, 186, 0, 0, 0, 0, 0, 0, + 146, 144, 252, 116, 250, 0, 0, 275, 165, 0, + 274, 278, 0, 0, 0, 0, 0, 0, 0, 139, + 140, 139, 0, 0, 0, 0, 0, 0, 350, 322, + 0, 66, 326, 327, 0, 0, 348, 66, 220, 0, + 0, 0, 0, 200, 0, 0, 0, 0, 211, 0, + 185, 0, 0, 66, 141, 147, 145, 64, 0, 133, + 0, 281, 0, 0, 0, 319, 328, 329, 330, 331, + 344, 346, 321, 0, 0, 333, 336, 337, 323, 0, + 319, 139, 0, 0, 0, 0, 0, 208, 0, 0, + 0, 202, 203, 199, 63, 249, 251, 116, 142, 283, + 280, 0, 0, 116, 116, 0, 313, 0, 353, 0, + 349, 204, 205, 206, 207, 0, 0, 0, 212, 64, + 143, 137, 0, 0, 305, 0, 0, 0, 133, 0, + 314, 133, 201, 209, 210, 248, 0, 135, 303, 0, + 0, 304, 107, 109, 116, 116, 0, 116, 116, 339, + 138, 0, 254, 0, 0, 316, 315, 0, 0, 0, + 136, 0, 0, 0, 116, 116, 310, 0, 0, 318, + 317, 309, 0, 0, 306 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 277, 278, 279, 308, 325, 164, 165, 79, 637, - 113, 12, 133, 80, 14, 15, 41, 42, 43, 48, - 54, 118, 128, 358, 238, 286, 169, 454, 361, 694, - 679, 423, 542, 663, 480, 543, 81, 166, 139, 156, - 140, 141, 110, 382, 409, 383, 121, 88, 157, 16, - 17, 18, 20, 19, 392, 455, 456, 63, 23, 61, - 101, 546, 547, 129, 172, 55, 96, 56, 49, 483, - 410, 83, 412, 291, 292, 57, 92, 93, 230, 667, - 134, 333, 647, 502, 512, 231, 232, 233, 234 + -1, 276, 277, 278, 306, 323, 164, 79, 635, 113, + 12, 133, 80, 14, 15, 41, 42, 43, 48, 54, + 118, 128, 356, 237, 285, 168, 452, 359, 692, 677, + 421, 540, 661, 478, 541, 81, 165, 139, 156, 140, + 141, 110, 380, 407, 381, 121, 88, 157, 16, 17, + 18, 20, 19, 390, 453, 454, 63, 23, 61, 101, + 544, 545, 129, 171, 55, 96, 56, 49, 481, 408, + 83, 410, 290, 291, 57, 92, 93, 229, 665, 134, + 331, 645, 500, 510, 230, 231, 232, 233 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -620 +#define YYPACT_NINF -613 static const yytype_int16 yypact[] = { - 484, -620, -620, -620, -620, -620, -620, -620, -14, -116, - -6, -83, 104, -31, 24, -620, 161, 528, -620, 238, - 204, 43, 49, -620, 5, 196, -620, 1912, -620, -620, - -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, - -620, 173, 173, 227, -620, -620, -620, -620, 173, -620, - -620, -620, -620, -620, 173, 202, -620, -9, 234, 243, - 246, -620, -620, -620, -620, -620, 67, -620, -620, -620, - -620, -620, -620, -620, -620, 273, 285, 3, 624, -620, - -620, -620, 4, -620, 201, 201, 253, -620, 81, 240, - 240, -620, -620, 39, -620, -620, -620, -620, -620, -620, - -620, -59, 1564, -620, 128, 132, 643, 67, -620, 4, - -114, 165, 1564, 145, 81, 81, -620, -620, 1605, -620, - -620, 2014, 324, -620, -620, -620, -620, -620, -620, -620, - -13, 188, 2299, 2299, -620, 328, -620, -620, 4, -620, - 189, 194, 2076, 2076, 186, -111, 2076, -620, 352, 205, - -620, 2014, 2076, 67, 208, 4, 247, -620, 216, 351, - 355, 359, 365, 368, 269, 372, 1625, 306, -620, 1517, - -620, -620, -620, -620, -620, -620, 325, 2094, 38, 373, - 240, -620, -620, -620, -620, -620, -620, -620, -620, -620, - -620, -620, -620, -620, -620, -620, -620, -620, 298, 336, - 298, 336, 2076, 2076, 2076, 2076, -620, -620, -620, -620, - -620, -620, -620, -620, -620, -620, -620, -620, 2076, 2076, - 2076, 2076, 2076, 2076, 2076, 2076, 2076, 2076, 2076, 2076, - -620, 240, -620, 66, -620, -620, -620, -620, 231, 1791, - -620, -17, -21, -620, 214, 4, 225, -620, 306, -5, - 1605, -620, -620, -620, -620, -620, -620, -620, -620, -620, - -620, -620, 298, 336, 298, 336, 229, 230, 249, 250, - 251, 252, 256, 1809, 2117, 690, 364, 257, 259, 261, - -620, -620, -620, -620, -620, -620, -620, 114, -620, 67, - 1019, -620, 262, 1189, 1189, -620, 1189, -620, -620, -620, - -620, -620, -620, -620, -620, -620, -620, -620, 2076, -620, - -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, - -620, -620, -620, -620, -620, 2076, 2076, 2076, -23, 28, - -620, 1019, -18, 265, 266, 268, 272, 288, 289, 1019, - 1019, 1019, 1019, 1019, 383, -620, 2076, 2076, 398, -620, - -620, -620, -620, -620, -620, -620, -620, -620, -620, -620, - -620, 137, -620, -620, -620, -620, 137, -620, 145, 385, - 293, 294, 295, 297, 2014, 2014, 2014, 2014, 2014, 2014, - 2014, -620, -620, -56, 1069, -74, -620, -80, -620, 2014, - 2014, 2014, 296, 300, -620, -620, -620, -620, -620, -620, - -620, -620, -620, -620, 396, 1832, 2135, 1239, 403, -620, - -620, -620, -620, 2076, 299, -620, 301, 1517, 1019, 1019, - 1019, 1019, 8, -620, 33, -620, -620, 1189, 303, 2076, - 2076, 2076, 2076, 2076, 302, 304, 307, 308, 309, 2076, - 1517, 1019, 312, -620, -620, -620, -620, -620, -620, -620, - -620, -620, -620, -620, -620, 296, 296, 2076, 2014, 2014, - 2014, 2014, -620, 317, 318, 319, 320, 304, 323, 2014, - -620, 326, 1471, -77, -620, -620, 327, 330, 424, 2, - -620, 1850, -620, 443, -620, -52, 1280, -73, -620, -72, - -620, -620, 469, 471, 1189, 332, 334, 337, 338, 1189, - 494, 1189, 339, 343, 1189, 347, 4, -620, 348, 349, - 508, 519, 362, 2076, 1189, 1189, 4, 1189, 363, 2076, - -620, -620, 26, 367, 375, 377, 387, 149, 2014, 2014, - 2014, 2014, 157, 2014, -620, -620, 357, 2014, 2014, 2076, - 505, 526, -620, 296, -620, 4, 391, 394, 393, -620, - 366, -62, -620, -620, 1189, 1189, 386, 1189, 1189, 1189, - 1189, 363, -620, 363, 2076, 1189, 395, 2076, 2076, 2076, - -620, -620, 552, 1019, -620, -620, 405, 511, -620, 1019, - -620, 2014, 2014, 2014, 2014, -620, 400, 406, 407, 408, - -620, 304, -620, 411, 412, 57, -620, -620, -620, 11, - 1891, -620, 545, -620, 399, 413, 414, 2179, -620, -620, - -620, -620, -620, -620, -620, 409, 1189, -620, -620, -620, - -620, 304, 2179, 363, 417, 418, 423, 425, 2014, -620, - 2014, 2014, 180, -620, -620, -620, -620, -620, -620, 4, - 172, -620, -620, 556, -3, 46, 4, 181, -620, 422, - 362, 184, -620, -620, -620, -620, -620, 430, 431, 432, - -620, 11, -620, 539, 1189, -620, 1337, -1, 865, 865, - -620, 2197, -620, -620, -620, -620, -620, -620, 590, 445, - -620, 433, -620, 1337, 446, 453, -620, -620, 86, 46, - 4, 137, -620, 582, -620, 596, 452, 231, 231, 598, - 865, 865, -620, 1189, 599, 1189, -620, -620, -620, 1189, - 544, 231, 231, -620, 603, 1189, -620 + 715, -613, -613, -613, -613, -613, -613, -613, 3, -86, + 32, -39, 107, -22, 138, -613, 203, 859, -613, 142, + 191, 55, 64, -613, -20, 189, -613, 1862, -613, -613, + -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, + -613, 52, 52, 213, -613, -613, -613, -613, 52, -613, + -613, -613, -613, -613, 52, 216, -613, -10, 237, 246, + 249, -613, -613, -613, -613, -613, 119, -613, -613, -613, + -613, -613, -613, -613, -613, 278, 308, 9, 50, -613, + -613, -613, -30, -613, 285, 285, 209, -613, 14, 165, + 165, -613, -613, 200, -613, -613, -613, -613, -613, -613, + -613, -21, 1546, -613, 161, 170, 250, 119, -613, -30, + -121, 180, 1546, 182, 14, 14, -613, -613, 1262, -613, + -613, 1906, 344, -613, -613, -613, -613, -613, -613, -613, + -14, 196, 2194, 2194, -613, 331, -613, -613, -30, -613, + 198, 201, 1964, 1964, 193, -118, 1964, -613, 363, 218, + -613, 1906, 1964, 119, 210, -30, 351, -613, 79, 367, + 370, 374, 375, 378, 379, 1607, 335, -613, 1221, -613, + -613, -613, -613, -613, -613, 336, 2027, 102, 381, 165, + -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, + -613, -613, -613, -613, -613, -613, -613, 431, 598, 431, + 598, 1964, 1964, 1964, 1964, -613, -613, -613, -613, -613, + -613, -613, -613, -613, -613, -613, -613, 1964, 1964, 1964, + 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, -613, + 165, -613, 45, -613, -613, -613, -613, 202, 1741, -613, + -32, -35, -613, 226, -30, 238, -613, 335, -29, 1262, + -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, + -613, 431, 598, 431, 598, 240, 241, 257, 263, 264, + 266, 269, 1499, 2045, 318, 386, 271, 272, 273, -613, + -613, -613, -613, -613, -613, -613, 25, -613, 119, 1001, + -613, 235, 1171, 1171, 1171, -613, -613, -613, -613, -613, + -613, -613, -613, -613, -613, -613, 1964, -613, -613, -613, + -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, + -613, -613, -613, 1964, 1964, 1964, -31, -15, -613, 1001, + -16, 247, 248, 274, 275, 276, 279, 1001, 1001, 1001, + 1001, 1001, 395, -613, 1964, 1964, 430, -613, -613, -613, + -613, -613, -613, -613, -613, -613, -613, -613, -613, 160, + -613, -613, -613, -613, 160, -613, 182, 397, 281, 283, + 284, 286, 1906, 1906, 1906, 1906, 1906, 1906, 1906, -613, + -613, 6, 672, -67, -613, -84, -613, 1906, 1906, 1906, + 288, 292, -613, -613, -613, -613, -613, -613, -613, -613, + -613, -613, 391, 1782, 2074, 777, 425, -613, -613, -613, + -613, 1964, 293, -613, 294, 1221, 1001, 1001, 1001, 1001, + 1, -613, 27, -613, -613, 1171, 289, 1964, 1964, 1964, + 1964, 1964, 295, 299, 301, 309, 310, 1964, 1221, 1001, + 311, -613, -613, -613, -613, -613, -613, -613, -613, -613, + -613, -613, -613, 288, 288, 1964, 1906, 1906, 1906, 1906, + -613, 312, 313, 314, 315, 299, 316, 1906, -613, 321, + 1453, -74, -613, -613, 322, 325, 454, -12, -613, 1800, + -613, 474, -613, 7, 1051, -55, -613, -73, -613, -613, + 480, 481, 1171, 339, 345, 346, 347, 1171, 502, 1171, + 350, 353, 1171, 360, -30, -613, 361, 373, 533, 534, + 380, 1964, 1171, 1171, -30, 1171, 384, 1964, -613, -613, + -1, 385, 390, 392, 400, 117, 1906, 1906, 1906, 1906, + 121, 1906, -613, -613, 394, 1906, 1906, 1964, 531, 562, + -613, 288, -613, -30, 408, 411, 412, -613, 404, -72, + -613, -613, 1171, 1171, 416, 1171, 1171, 1171, 1171, 384, + -613, 384, 1964, 1171, 415, 1964, 1964, 1964, -613, -613, + 572, 1001, -613, -613, 419, 527, -613, 1001, -613, 1906, + 1906, 1906, 1906, -613, 420, 423, 422, 424, -613, 299, + -613, 427, 433, 46, -613, -613, -613, 372, 1841, -613, + 563, -613, 426, 434, 437, 2092, -613, -613, -613, -613, + -613, -613, -613, 438, 1171, -613, -613, -613, -613, 299, + 2092, 384, 444, 446, 455, 456, 1906, -613, 1906, 1906, + 129, -613, -613, -613, -613, -613, -613, -30, 414, -613, + -613, 600, -3, -6, -30, 145, -613, 459, 380, 192, + -613, -613, -613, -613, -613, 462, 469, 470, -613, 372, + -613, 577, 1171, 1319, -613, -2, 847, 847, -613, 2133, + -613, -613, -613, -613, -613, -613, 628, 482, -613, 471, + 1319, -613, 476, 477, -613, -613, 457, -6, -30, 160, + -613, 615, -613, 621, 478, 202, 202, 622, 847, 847, + -613, 1171, 624, 1171, -613, -613, -613, 1171, 569, 202, + 202, -613, 627, 1171, -613 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -620, 42, 112, 200, -160, -158, -177, -620, 0, -39, - -151, 531, -620, 9, -620, -620, -620, -620, 77, -620, - -620, -620, -152, -620, -518, -620, -268, -620, -244, -620, - -620, -311, -15, -620, -414, -620, -620, -26, 389, -164, - -620, 514, 523, 142, -162, -261, 220, 263, 380, -620, - -620, 625, -620, -620, -620, -620, -620, -620, -620, -620, - -620, -620, -620, 559, -620, -620, -620, -620, -620, -620, - -619, -82, 267, -198, -620, -620, 595, -620, 535, -620, - -620, -620, 47, 215, -456, -620, 543, -620, -620 + -613, 34, 122, 184, -167, -141, -613, 0, -8, -139, + 554, -613, 4, -613, -613, -613, -613, 365, -613, -613, + -613, -151, -613, -533, -613, -266, -613, -244, -613, -613, + -312, 11, -613, -423, -613, -613, -26, 417, -163, -613, + 540, 547, 92, -162, -267, 178, 236, 407, -613, -613, + 640, -613, -613, -613, -613, -613, -613, -613, -613, -613, + -613, -613, 568, -613, -613, -613, -613, -613, -613, -612, + -53, 251, -185, -613, -613, 604, -613, 529, -613, -613, + -613, 43, 204, -449, -613, 532, -613, -613 }; /* 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 -224 +#define YYTABLE_NINF -223 static const yytype_int16 yytable[] = { - 11, 82, 296, 366, 280, 287, 330, 105, 295, 13, - 295, 532, 91, 385, 387, 170, 282, 11, 425, 499, - 94, 334, 335, 336, 337, 338, 13, 599, 297, 417, - 1, 344, 111, 3, 111, 5, 540, 111, 111, 21, - 326, 520, 521, 327, 501, 24, 131, 681, 146, 293, - 111, 146, 109, 25, 22, 294, 541, 147, 1, 111, - 244, 3, 500, 5, 696, 348, 29, 30, 31, 32, - 33, 34, 35, 36, 251, 37, 138, 440, 26, 345, - 109, 111, 469, 111, 281, 469, 138, 500, 469, 469, - 469, 475, 155, 11, 536, 474, 552, 367, 368, 553, - 469, -155, 370, 135, 372, 371, 469, 373, 136, 604, - 469, 470, 111, 119, 120, 549, 241, 242, 84, 85, - 245, 661, 27, 473, 699, 89, 249, 668, 669, 598, - 28, 90, 349, 350, 2, 632, 112, 4, 112, 422, - -67, 112, 112, 155, 485, 487, 489, 427, 363, 442, - 362, 290, 351, 352, 112, 353, 354, 171, 355, 356, - 357, 44, 95, 112, 665, 650, 682, -67, 697, 698, - 60, 700, 701, 106, 227, 227, 328, 329, 290, 331, - 38, 39, 40, 346, 347, 112, 580, 112, 711, 712, - 424, -67, 332, 290, 290, 290, 290, 290, 339, 340, - 341, 342, 343, 290, 58, -155, 540, 578, 411, -155, - 59, 411, 411, 138, 411, 491, 112, 635, 62, -55, - -55, -55, -55, 91, 155, 551, 102, 444, 445, 446, - 447, 505, 448, 507, 508, 509, 449, 450, 87, 451, - 452, 453, 252, 253, 228, 228, 50, 51, 52, 411, - 612, 53, 613, 494, 64, 65, 98, 411, 411, 411, - 411, 411, 86, 167, 87, 99, 1, 2, 100, 3, - 4, 5, 254, 255, 256, 257, 517, 103, 444, 445, - 446, 447, 418, 448, 46, 348, 47, 449, 450, 104, - 451, 452, 453, 248, 142, 116, 393, 117, 143, 419, - 420, 421, 122, 123, 124, 125, 126, 127, 150, 585, - 280, 564, 652, 444, 445, 446, 447, 590, 448, 572, - 441, 290, 449, 450, 148, 451, 452, 453, 168, 38, - 39, 40, 229, 229, 151, 152, 411, 411, 411, 411, - 660, 670, 572, 671, 673, 411, 671, 114, 115, 173, - 237, 239, 349, 350, 240, 243, 246, 640, 472, 411, - -56, 111, 309, 310, -57, 247, 614, 250, -60, 617, - 618, 619, 351, 352, -59, 353, 354, -58, 355, 356, - 357, 258, 288, 364, 295, 365, 388, 290, 374, 375, - 281, 155, 298, 299, 300, 301, 302, 303, 304, 305, - 306, 307, 443, 290, 506, 290, 290, 290, 376, 377, - 378, 379, 411, 516, 155, 380, 389, 411, 390, 411, - 391, 439, 411, 457, 413, 490, 688, 428, 429, 691, - 430, 522, 411, 411, 431, 411, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 432, 433, 458, 459, 460, 545, 461, 482, 479, 481, - 472, 492, 539, 493, 510, 548, 511, 666, 504, 513, - 514, 515, 411, 411, 519, 411, 411, 411, 411, 528, - 529, 530, 531, 411, -223, 533, 554, 573, 555, 537, - 683, 411, 538, 579, 557, 535, 558, 411, 562, 559, - 560, 564, -69, 1, 2, 565, 3, 4, 5, 567, - 568, 569, 570, 595, 6, 7, 462, 463, 464, 465, - 466, 467, 468, 571, 572, 577, 592, 596, -222, 581, - 597, 476, 477, 478, 411, 603, 8, 582, 290, 583, - 9, 290, 290, 290, 10, 607, -69, 1, 2, 584, - 3, 4, 5, 600, 601, 602, 620, 616, 6, 7, - 414, 415, 628, 416, 622, 500, 629, 641, 642, 630, - 631, 633, 634, 664, 639, 643, 648, 653, 654, 644, - 8, 646, 411, 655, 9, 656, 411, 411, 10, 672, - 674, 675, 676, 678, 692, 695, 646, 693, 426, 636, - 523, 524, 525, 526, 702, -18, 434, 435, 436, 437, - 438, 534, -19, 703, 704, 705, 709, 714, 411, 411, - 715, 411, 677, 411, 132, 662, 149, 411, 360, 145, - 369, 64, 65, 411, 107, 67, 68, 69, 70, 71, - 72, 73, 45, 1, 2, 690, 3, 4, 5, 130, - 64, 65, 97, 107, 67, 68, 69, 70, 71, 72, - 73, 636, 1, 2, 0, 3, 4, 5, 235, 651, - 586, 587, 588, 589, 74, 591, 236, 527, 0, 593, - 594, 0, 0, 0, 0, 495, 496, 497, 498, 0, - 0, 0, 0, 74, 503, 0, 0, 64, 65, 0, - 107, 158, 159, 160, 161, 162, 163, 73, 518, 1, - 2, 0, 3, 4, 5, 0, 0, 0, 0, 0, - 0, 0, 0, 624, 625, 626, 627, 0, 0, 0, + 11, 82, 364, 279, 13, 286, 383, 385, 663, 680, + 597, 91, 497, 105, 169, 423, 530, 11, 328, 94, + 111, 13, 538, 111, 111, 111, 111, 281, 295, 415, + 518, 519, 324, 332, 333, 334, 335, 336, 499, 111, + 111, 146, 539, 342, 146, 2, 119, 120, 4, -154, + 147, 679, 109, 243, 111, 498, 21, 64, 65, 325, + 107, 67, 68, 69, 70, 71, 72, 73, 694, 1, + 2, 22, 3, 4, 5, 24, 138, 438, 467, 343, + 109, 498, 251, 252, 253, 254, 138, 473, 467, 467, + 467, 25, 155, 11, 368, 467, 370, 534, 551, 602, + 74, 111, 472, 250, 659, 255, 256, 467, 365, 366, + 666, 667, 280, 292, 550, 471, 240, 241, 596, 293, + 244, 369, 26, 371, 112, 27, 248, 112, 112, 112, + 112, 420, -66, -66, 361, 360, 483, 485, 487, 28, + 630, 135, 155, 112, 112, 60, 136, 422, -66, 425, + 289, 695, 696, -154, 698, 699, 170, -154, 112, 578, + 440, 95, 344, 345, 664, 681, 226, 226, 467, 467, + 648, 709, 710, 468, 547, 326, 327, 289, 329, 106, + 29, 30, 31, 32, 33, 34, 35, 36, 46, 37, + 47, 330, 289, 289, 289, 289, 289, 337, 338, 339, + 340, 341, 289, 44, 576, 112, 633, 131, 38, 39, + 40, 62, 138, 166, 75, 76, 58, 549, 77, 1, + 78, 108, 3, 155, 5, 59, 489, 122, 123, 124, + 125, 126, 127, 50, 51, 52, 409, 91, 53, 409, + 409, 409, 503, 247, 505, 506, 507, 610, 86, 611, + 87, 116, 492, 117, 227, 227, 346, 64, 65, 98, + 107, 67, 68, 69, 70, 71, 72, 73, 99, 1, + 2, 100, 3, 4, 5, 515, 409, 583, 102, 562, + 416, 588, 103, 570, 409, 409, 409, 409, 409, 658, + 391, 570, 151, 152, 38, 39, 40, 417, 418, 419, + 74, 442, 443, 444, 445, 668, 446, 669, 279, 650, + 447, 448, 104, 449, 450, 451, 228, 228, 439, 289, + 114, 115, 87, 347, 348, 64, 65, 142, 107, 158, + 159, 160, 161, 162, 163, 73, 143, 1, 2, 148, + 3, 4, 5, 349, 350, 150, 351, 352, 167, 353, + 354, 355, 671, 236, 669, 638, 470, 172, 64, 65, + 238, 239, 242, 409, 409, 409, 409, 245, 74, 249, + 1, 2, 409, 3, 4, 5, -55, 612, 246, -56, + 615, 616, 617, -59, -58, 289, 409, -57, 257, 155, + 111, 1, 294, 287, 3, 362, 5, 411, 363, 372, + 373, 289, 504, 289, 289, 289, 84, 85, 386, 426, + 427, 514, 155, 89, 75, 76, 374, 280, 77, 90, + 78, 144, 375, 376, 686, 377, 346, 689, 378, 520, + 387, 388, 389, 437, 441, 455, 428, 429, 430, 409, + 456, 431, 457, 458, 409, 459, 409, 488, 538, 409, + 477, 479, 480, 543, 502, 490, 491, 508, 470, 409, + 409, 509, 409, 511, 460, 461, 462, 463, 464, 465, + 466, 512, 513, 517, 526, 527, 528, 529, 531, 474, + 475, 476, 75, 76, 535, 571, 77, 536, 78, 384, + 533, 577, 537, 347, 348, 697, 546, 552, 553, 409, + 409, 555, 409, 409, 409, 409, 560, 556, 557, 558, + 409, 593, 562, 349, 350, 563, 351, 352, 409, 353, + 354, 355, 565, 566, 409, 296, 297, 298, 299, 300, + 301, 302, 303, 304, 305, 567, 289, 568, 569, 289, + 289, 289, 570, 412, 413, 414, 575, 579, 521, 522, + 523, 524, 580, 594, 581, 442, 443, 444, 445, 532, + 446, 409, 582, 590, 447, 448, 595, 449, 450, 451, + 598, 599, 637, 601, 600, 605, 618, 614, 620, 644, + 424, 498, 626, 627, 628, 639, 629, 631, 432, 433, + 434, 435, 436, 632, 644, 640, 641, 634, 442, 443, + 444, 445, 642, 446, 651, 646, 652, 447, 448, 409, + 449, 450, 451, 409, 409, 653, 654, 662, 584, 585, + 586, 587, 672, 589, 307, 308, 670, 591, 592, 673, + 674, 676, 690, 693, 691, -18, -19, 700, 701, 703, + 702, 707, 712, 688, 713, 409, 409, 132, 409, 660, + 409, 675, 149, 145, 409, 358, 367, 45, 130, 634, + 409, 97, 234, 649, 525, 235, 0, 493, 494, 495, + 496, 622, 623, 624, 625, 0, 501, 0, 0, 64, + 65, 0, 107, 158, 159, 160, 161, 162, 163, 73, + 516, 1, 2, 0, 3, 4, 5, 0, 309, 310, + 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, + 321, 322, 0, 0, 0, -222, 0, 0, 655, 0, + 656, 657, 74, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -68, 1, 2, 0, 3, 4, 5, + 0, 0, 0, 554, 0, 6, 7, 0, 559, 0, + 561, 0, 0, 564, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 572, 573, 0, 574, 8, 0, 0, + 0, 9, 0, 0, 0, 10, 0, 0, 0, 0, + 0, 0, 0, 0, 64, 65, 0, 107, 158, 159, + 160, 161, 162, 163, 73, 0, 1, 2, 0, 3, + 4, 5, 0, 603, 604, 0, 606, 607, 608, 609, + 0, 0, 0, 0, 613, 0, 0, 0, 0, 0, + 0, 0, 619, 0, 0, 0, 0, 74, 621, 0, + 0, 0, 0, 0, 0, 0, 75, 76, 0, 0, + 77, 0, 78, 469, 0, 0, 0, 0, 0, 0, + 392, 393, 394, 395, 64, 65, 396, 0, 0, -221, + 0, 0, 0, 0, 0, 647, 1, 2, 0, 3, + 4, 5, 397, 398, 399, 0, 0, -68, 1, 2, + 0, 3, 4, 5, 0, 0, 0, 400, 401, 6, + 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 346, 0, 0, 0, 0, 402, 0, 0, 0, + 0, 8, 0, 678, 0, 9, 0, 684, 685, 10, + 0, 0, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 261, 262, 263, + 264, 75, 76, 0, 0, 77, 0, 78, 486, 704, + 705, 0, 706, 0, 708, 0, 0, 0, 711, 0, + 0, 0, 0, 0, 714, 0, 265, 205, 682, 683, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 0, + 266, 0, 267, 268, 269, 0, 270, 271, 349, 350, + 0, 351, 352, 0, 353, 354, 355, 0, 0, 0, + 0, 0, 0, 0, 392, 393, 394, 395, 64, 65, + 396, 0, 403, 0, 0, 404, 0, 405, 0, 406, + 1, 2, 0, 3, 4, 5, 397, 398, 399, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 400, 401, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 111, 0, 64, 65, + 402, 107, 158, 159, 160, 161, 162, 163, 73, 0, + 1, 2, 0, 3, 4, 5, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 261, 262, 263, 264, 0, 0, 0, 0, 0, + 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 556, 0, 0, 0, 0, 561, 0, 563, 0, - 657, 566, 658, 659, 0, 0, 0, 0, 0, 0, - 0, 574, 575, 0, 576, 0, 0, 0, 75, 76, - 0, 0, 77, 0, 78, 108, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 75, 76, 0, - 0, 77, 0, 78, 144, 0, 0, 0, 0, 0, - 0, 605, 606, 0, 608, 609, 610, 611, 0, 0, - 0, 0, 615, 0, 0, 0, 0, 0, 0, 0, - 621, 0, 0, 0, 0, 0, 623, 0, 0, 0, - 0, 0, 0, 0, 75, 76, 0, 0, 77, 0, - 78, 386, 0, 0, 0, 0, 0, 0, 394, 395, - 396, 397, 64, 65, 398, 0, 0, 0, 0, 0, - 0, 0, 0, 649, 1, 2, 0, 3, 4, 5, - 399, 400, 401, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 402, 403, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, - 0, 0, 0, 0, 404, 0, 0, 0, 0, 0, - 0, 680, 0, 0, 0, 686, 687, 0, 0, 0, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 262, 263, 264, 265, 0, - 0, 0, 0, 0, 0, 0, 0, 706, 707, 0, - 708, 0, 710, 0, 0, 0, 713, 0, 0, 0, - 0, 0, 716, 0, 266, 206, 684, 685, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 0, 267, 0, - 268, 269, 270, 0, 271, 272, 351, 352, 0, 353, - 354, 0, 355, 356, 357, 0, 0, 0, 0, 0, - 0, 0, 394, 395, 396, 397, 64, 65, 398, 0, - 405, 0, 0, 406, 0, 407, 0, 408, 1, 2, - 0, 3, 4, 5, 399, 400, 401, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 403, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 111, 0, 64, 65, 404, 107, - 158, 159, 160, 161, 162, 163, 73, 0, 1, 2, - 0, 3, 4, 5, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 262, - 263, 264, 265, 0, 0, 0, 0, 0, 0, 74, + 265, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 0, 266, 0, 267, 268, 269, 0, + 270, 271, 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, 266, 206, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 0, 267, 0, 268, 269, 270, 0, 271, 272, + 112, 0, 0, 0, 0, 0, 403, 0, 0, 404, + 0, 405, 0, 406, 392, 393, 394, 395, 64, 65, + 396, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 2, 0, 3, 4, 5, 397, 398, 399, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 112, 0, - 0, 0, 0, 0, 405, 0, 0, 406, 0, 407, - 0, 408, 394, 395, 396, 397, 64, 65, 398, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, - 0, 3, 4, 5, 399, 400, 401, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, - 403, 0, 0, 75, 76, 0, 0, 77, 0, 78, - 471, 0, 0, 0, 0, 0, 64, 65, 404, 107, + 0, 400, 401, 0, 0, 75, 76, 0, 0, 77, + 0, 78, 548, 0, 0, 0, 0, 0, 64, 65, + 402, 153, 67, 68, 69, 70, 71, 72, 73, 0, + 1, 2, 0, 3, 4, 5, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 261, 262, 263, 264, 0, 0, 0, 0, 64, + 65, 74, 153, 67, 68, 69, 70, 71, 72, 73, + 0, 1, 2, 0, 3, 4, 5, 0, 0, 0, + 265, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 0, 266, 0, 267, 268, 269, 0, + 270, 271, 74, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 392, 393, 394, 395, 0, 0, 396, 0, + 0, 0, 0, 0, 0, 0, 403, 0, 0, 404, + 0, 405, 0, 406, 397, 398, 399, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 400, + 401, 0, 282, 283, 0, 284, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 402, 0, + 0, 0, 0, 0, 0, 75, 76, 154, 0, 77, + 0, 78, 0, 0, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 261, + 262, 263, 264, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 75, 76, 0, 0, + 77, 0, 78, 0, 0, 0, 0, 0, 265, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 0, 266, 0, 267, 268, 269, 0, 270, 271, + 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 2, 0, 3, 4, 5, 258, 0, + 0, 0, 0, 0, 403, 0, 0, 404, 0, 405, + 0, 406, 0, 259, 260, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 64, 65, 111, 107, 158, 159, 160, 161, 162, 163, 73, 0, 1, 2, - 0, 3, 4, 5, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 262, - 263, 264, 265, 0, 0, 0, 0, 64, 65, 74, - 107, 158, 159, 160, 161, 162, 163, 73, 0, 1, - 2, 0, 3, 4, 5, 0, 0, 0, 266, 206, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 0, 267, 0, 268, 269, 270, 0, 271, 272, - 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 394, 395, 396, 397, 0, 0, 398, 0, 0, 0, - 0, 0, 0, 0, 405, 0, 0, 406, 0, 407, - 0, 408, 399, 400, 401, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 402, 403, 0, + 0, 3, 4, 5, 0, 0, 0, 0, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 261, 262, 263, 264, 0, 0, 74, + 0, 0, 0, 64, 65, 0, 107, 67, 68, 69, + 70, 71, 72, 73, 0, 1, 2, 0, 3, 4, + 5, 0, 265, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 137, 266, 0, 267, 268, + 269, 0, 270, 271, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 404, 0, 0, 0, - 0, 0, 0, 75, 76, 0, 0, 77, 0, 78, - 488, 0, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 262, 263, 264, - 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 75, 76, 0, 0, 77, 0, - 78, 550, 0, 0, 0, 0, 266, 206, 207, 208, - 209, 210, 211, 212, 213, 214, 215, 216, 217, 0, - 267, 0, 268, 269, 270, 0, 271, 272, 64, 65, + 0, 0, 112, 0, 64, 65, -66, 0, 272, 0, + 0, 273, 0, 274, 0, 275, 1, 2, 0, 3, + 4, 5, 258, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 259, 260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 2, 0, 3, 4, 5, 259, 0, 0, 0, - 0, 0, 405, 0, 0, 406, 0, 407, 0, 408, - 0, 260, 261, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 64, 65, 111, 153, 67, 68, - 69, 70, 71, 72, 73, 0, 1, 2, 0, 3, - 4, 5, 0, 0, 0, 0, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, - 197, 262, 263, 264, 265, 0, 0, 74, 0, 0, - 0, 64, 65, 0, 107, 67, 68, 69, 70, 71, - 72, 73, 0, 1, 2, 0, 3, 4, 5, 0, - 266, 206, 207, 208, 209, 210, 211, 212, 213, 214, - 215, 216, 217, 137, 267, 0, 268, 269, 270, 0, - 271, 272, 64, 65, 74, 153, 67, 68, 69, 70, - 71, 72, 73, 0, 1, 2, 0, 3, 4, 5, - 112, 0, 64, 65, -67, 0, 273, 0, 0, 274, - 0, 275, 0, 276, 1, 2, 0, 3, 4, 5, - 259, 0, 0, 0, 0, 74, 0, 0, 283, 284, - 0, 285, 0, 0, 0, 260, 261, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 111, 75, 76, 0, 0, 77, 0, 78, 0, 0, + 0, 0, 111, 75, 76, 0, 379, 77, 0, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 262, 263, 264, 265, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 75, 76, - 154, 0, 77, 0, 78, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 266, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 0, 267, 0, - 268, 269, 270, 0, 271, 272, 0, 0, 0, 75, - 76, 0, 0, 77, 0, 78, 0, 0, 0, 0, - 0, 0, 0, 0, 112, 0, 0, 0, 0, 0, - 273, 0, 0, 274, 0, 275, 0, 276, 64, 65, + 0, 0, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 261, 262, 263, + 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 75, 76, 0, 0, 77, 0, 78, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 265, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 0, + 266, 0, 267, 268, 269, 0, 270, 271, 64, 65, 0, 107, 67, 68, 69, 70, 71, 72, 73, 0, - 1, 2, 0, 3, 4, 5, 64, 65, 0, 107, - 158, 159, 160, 161, 162, 163, 73, 0, 1, 2, - 359, 3, 4, 5, 0, 0, 0, 0, 0, 64, + 1, 2, 0, 3, 4, 5, 112, 0, 0, 0, + 0, 0, 272, 0, 0, 273, 0, 274, 0, 275, + 357, 0, 0, 0, 0, 0, 0, 0, 0, 64, 65, 74, 107, 158, 159, 160, 161, 162, 163, 73, - 0, 1, 2, 0, 3, 4, 5, 64, 65, 74, + 0, 1, 2, 0, 3, 4, 5, 64, 65, 0, 107, 67, 68, 69, 70, 71, 72, 73, 0, 1, 2, 0, 3, 4, 5, 0, 0, 0, 0, 0, - 0, 0, 74, 0, 0, 0, 0, 0, 0, 544, + 0, 0, 74, 0, 0, 0, 0, 0, 0, 542, 0, 0, 0, 0, 0, 0, 0, 0, 64, 65, 74, 107, 67, 68, 69, 70, 71, 72, 73, 0, 1, 2, 0, 3, 4, 5, 0, 0, 0, 64, 65, 0, 66, 67, 68, 69, 70, 71, 72, 73, - 638, 1, 2, 0, 3, 4, 5, 0, 0, 0, + 636, 1, 2, 0, 3, 4, 5, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 76, 0, 0, 77, - 0, 78, 74, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 75, 76, 0, 381, 77, 0, 78, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 75, 76, 0, 484, - 77, 0, 78, 0, 0, 0, 0, 0, 0, 0, + 0, 78, 74, 64, 65, 0, 107, 158, 159, 160, + 161, 162, 163, 73, 0, 1, 2, 0, 3, 4, + 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 75, 76, 0, 482, + 77, 0, 78, 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 75, 76, 0, 0, 77, 0, - 78, 64, 65, 0, 107, 158, 159, 160, 161, 162, - 163, 73, 0, 1, 2, 0, 3, 4, 5, 0, + 78, 64, 65, 0, 107, 67, 68, 69, 70, 71, + 72, 73, 0, 1, 2, 0, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 76, 0, 0, 77, 0, 78, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 76, 0, 0, - 77, 0, 78, 64, 65, 0, 107, 67, 68, 69, - 70, 71, 72, 73, 0, 1, 2, 0, 3, 4, - 5, 64, 65, 0, 289, 67, 68, 69, 70, 71, - 72, 73, 0, 1, 2, 0, 3, 4, 5, 0, - 0, 0, 0, 0, 64, 65, 74, 107, 158, 159, - 160, 161, 162, 163, 73, 0, 1, 2, 0, 3, - 4, 5, 64, 65, 74, 107, 158, 159, 160, 161, + 77, 0, 78, 0, 64, 65, 0, 288, 67, 68, + 69, 70, 71, 72, 73, 0, 1, 2, 0, 3, + 4, 5, 64, 65, 0, 107, 158, 159, 160, 161, 162, 163, 73, 0, 1, 2, 0, 3, 4, 5, - 0, 0, 0, 0, 0, 0, 0, 74, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 75, 76, - 0, 0, 77, 0, 78, 74, 64, 65, 0, 107, - 67, 68, 69, 70, 71, 72, 645, 0, 1, 2, - 0, 3, 4, 5, 64, 65, 0, 107, 67, 68, - 69, 70, 71, 72, 689, 0, 1, 2, 0, 3, - 4, 5, 0, 0, 0, 0, 0, 0, 0, 74, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 76, 0, 0, 77, 0, 78, 74, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 75, 76, + 0, 64, 65, 0, 107, 158, 159, 160, 161, 162, + 163, 73, 0, 1, 2, 74, 3, 4, 5, 64, + 65, 0, 107, 67, 68, 69, 70, 71, 72, 643, + 0, 1, 2, 0, 3, 4, 5, 0, 0, 0, + 0, 0, 0, 0, 74, 0, 0, 0, 75, 76, 0, 0, 77, 0, 78, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 75, 76, 0, 0, 77, 0, 384, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, - 76, 0, 0, 77, 0, 486, 0, 0, 0, 0, + 64, 65, 74, 107, 67, 68, 69, 70, 71, 72, + 687, 0, 1, 2, 0, 3, 4, 5, 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, 174, 0, 0, 0, 0, - 0, 0, 0, 75, 76, 0, 0, 77, 0, 78, - 0, 0, 0, 0, 0, 0, 175, 176, 0, 0, - 0, 75, 76, 0, 0, 77, 0, 78, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, + 0, 75, 76, 0, 0, 77, 0, 78, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, + 76, 0, 0, 77, 0, 382, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 202, 203, 204, 0, 0, 205, 206, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, 222, 223, 224, 225, 226 + 173, 0, 0, 0, 0, 0, 0, 0, 75, 76, + 0, 0, 77, 0, 484, 0, 0, 0, 0, 0, + 0, 174, 175, 0, 0, 0, 75, 76, 0, 0, + 77, 0, 78, 176, 177, 178, 179, 180, 181, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, 194, 195, 196, 197, 198, 199, 200, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 75, 76, 0, + 0, 77, 0, 78, 0, 0, 0, 0, 201, 202, + 203, 0, 0, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, + 221, 222, 223, 224, 225 }; static const yytype_int16 yycheck[] = { - 0, 27, 179, 247, 166, 169, 204, 4, 11, 0, - 11, 467, 21, 274, 275, 28, 167, 17, 329, 11, - 29, 219, 220, 221, 222, 223, 17, 545, 180, 297, - 19, 229, 55, 22, 55, 24, 34, 55, 55, 53, - 200, 455, 456, 201, 11, 161, 7, 666, 162, 11, - 55, 162, 78, 59, 68, 17, 54, 171, 19, 55, - 171, 22, 54, 24, 683, 54, 42, 43, 44, 45, - 46, 47, 48, 49, 156, 51, 102, 345, 161, 231, - 106, 55, 162, 55, 166, 162, 112, 54, 162, 162, - 162, 171, 118, 93, 171, 169, 169, 248, 249, 171, - 162, 55, 262, 162, 264, 263, 162, 265, 167, 171, - 162, 167, 55, 32, 33, 167, 142, 143, 41, 42, - 146, 639, 18, 384, 38, 48, 152, 645, 646, 543, - 161, 54, 121, 122, 20, 591, 159, 23, 159, 162, - 163, 159, 159, 169, 405, 406, 407, 165, 169, 347, - 167, 177, 141, 142, 159, 144, 145, 170, 147, 148, - 149, 0, 171, 159, 167, 621, 167, 163, 686, 687, - 165, 689, 690, 170, 132, 133, 202, 203, 204, 205, - 156, 157, 158, 117, 118, 159, 160, 159, 706, 707, - 162, 163, 218, 219, 220, 221, 222, 223, 224, 225, - 226, 227, 228, 229, 161, 159, 34, 518, 290, 163, - 161, 293, 294, 239, 296, 413, 159, 160, 22, 3, - 4, 5, 6, 21, 250, 486, 159, 141, 142, 143, - 144, 429, 146, 431, 432, 433, 150, 151, 37, 153, - 154, 155, 26, 27, 132, 133, 42, 43, 44, 331, - 561, 47, 563, 417, 7, 8, 22, 339, 340, 341, - 342, 343, 35, 121, 37, 22, 19, 20, 22, 22, - 23, 24, 3, 4, 5, 6, 440, 4, 141, 142, - 143, 144, 308, 146, 46, 54, 48, 150, 151, 4, - 153, 154, 155, 151, 166, 42, 287, 44, 166, 325, - 326, 327, 62, 63, 64, 65, 66, 67, 163, 160, - 472, 162, 623, 141, 142, 143, 144, 160, 146, 162, - 346, 347, 150, 151, 159, 153, 154, 155, 4, 156, - 157, 158, 132, 133, 114, 115, 418, 419, 420, 421, - 160, 160, 162, 162, 160, 427, 162, 84, 85, 161, - 22, 162, 121, 122, 160, 169, 4, 601, 384, 441, - 9, 55, 26, 27, 9, 160, 564, 159, 9, 567, - 568, 569, 141, 142, 9, 144, 145, 9, 147, 148, - 149, 9, 57, 169, 11, 160, 22, 413, 159, 159, - 472, 417, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 4, 429, 430, 431, 432, 433, 159, 159, - 159, 159, 494, 439, 440, 159, 159, 499, 159, 501, - 159, 38, 504, 38, 162, 22, 670, 162, 162, 673, - 162, 457, 514, 515, 162, 517, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 162, 162, 159, 159, 159, 481, 159, 61, 162, 159, - 486, 162, 38, 162, 162, 22, 162, 644, 165, 162, - 162, 162, 554, 555, 162, 557, 558, 559, 560, 162, - 162, 162, 162, 565, 0, 162, 17, 513, 17, 162, - 667, 573, 162, 519, 162, 169, 162, 579, 4, 162, - 162, 162, 18, 19, 20, 162, 22, 23, 24, 162, - 162, 162, 4, 539, 30, 31, 374, 375, 376, 377, - 378, 379, 380, 4, 162, 162, 169, 22, 0, 162, - 4, 389, 390, 391, 616, 169, 52, 162, 564, 162, - 56, 567, 568, 569, 60, 159, 18, 19, 20, 162, - 22, 23, 24, 162, 160, 162, 4, 162, 30, 31, - 293, 294, 162, 296, 159, 54, 160, 22, 169, 162, - 162, 160, 160, 17, 600, 162, 167, 160, 160, 165, - 52, 607, 664, 160, 56, 160, 668, 669, 60, 167, - 160, 160, 160, 54, 4, 162, 622, 152, 331, 599, - 458, 459, 460, 461, 22, 159, 339, 340, 341, 342, - 343, 469, 159, 17, 162, 17, 17, 73, 700, 701, - 17, 703, 661, 705, 93, 640, 112, 709, 239, 106, - 250, 7, 8, 715, 10, 11, 12, 13, 14, 15, - 16, 17, 17, 19, 20, 671, 22, 23, 24, 90, - 7, 8, 57, 10, 11, 12, 13, 14, 15, 16, - 17, 661, 19, 20, -1, 22, 23, 24, 133, 622, - 528, 529, 530, 531, 50, 533, 133, 462, -1, 537, - 538, -1, -1, -1, -1, 418, 419, 420, 421, -1, - -1, -1, -1, 50, 427, -1, -1, 7, 8, -1, - 10, 11, 12, 13, 14, 15, 16, 17, 441, 19, - 20, -1, 22, 23, 24, -1, -1, -1, -1, -1, - -1, -1, -1, 581, 582, 583, 584, -1, -1, -1, + 0, 27, 246, 165, 0, 168, 273, 274, 11, 11, + 543, 21, 11, 4, 28, 327, 465, 17, 203, 29, + 55, 17, 34, 55, 55, 55, 55, 166, 179, 295, + 453, 454, 199, 218, 219, 220, 221, 222, 11, 55, + 55, 162, 54, 228, 162, 20, 32, 33, 23, 55, + 171, 663, 78, 171, 55, 54, 53, 7, 8, 200, + 10, 11, 12, 13, 14, 15, 16, 17, 680, 19, + 20, 68, 22, 23, 24, 161, 102, 343, 162, 230, + 106, 54, 3, 4, 5, 6, 112, 171, 162, 162, + 162, 59, 118, 93, 261, 162, 263, 171, 171, 171, + 50, 55, 169, 156, 637, 26, 27, 162, 247, 248, + 643, 644, 165, 11, 169, 382, 142, 143, 541, 17, + 146, 262, 161, 264, 159, 18, 152, 159, 159, 159, + 159, 162, 163, 163, 169, 167, 403, 404, 405, 161, + 589, 162, 168, 159, 159, 165, 167, 162, 163, 165, + 176, 684, 685, 159, 687, 688, 170, 163, 159, 160, + 345, 171, 117, 118, 167, 167, 132, 133, 162, 162, + 619, 704, 705, 167, 167, 201, 202, 203, 204, 170, + 42, 43, 44, 45, 46, 47, 48, 49, 46, 51, + 48, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 0, 516, 159, 160, 7, 156, 157, + 158, 22, 238, 121, 164, 165, 161, 484, 168, 19, + 170, 171, 22, 249, 24, 161, 411, 62, 63, 64, + 65, 66, 67, 42, 43, 44, 289, 21, 47, 292, + 293, 294, 427, 151, 429, 430, 431, 559, 35, 561, + 37, 42, 415, 44, 132, 133, 54, 7, 8, 22, + 10, 11, 12, 13, 14, 15, 16, 17, 22, 19, + 20, 22, 22, 23, 24, 438, 329, 160, 159, 162, + 306, 160, 4, 162, 337, 338, 339, 340, 341, 160, + 286, 162, 114, 115, 156, 157, 158, 323, 324, 325, + 50, 141, 142, 143, 144, 160, 146, 162, 470, 621, + 150, 151, 4, 153, 154, 155, 132, 133, 344, 345, + 84, 85, 37, 121, 122, 7, 8, 166, 10, 11, + 12, 13, 14, 15, 16, 17, 166, 19, 20, 159, + 22, 23, 24, 141, 142, 163, 144, 145, 4, 147, + 148, 149, 160, 22, 162, 599, 382, 161, 7, 8, + 162, 160, 169, 416, 417, 418, 419, 4, 50, 159, + 19, 20, 425, 22, 23, 24, 9, 562, 160, 9, + 565, 566, 567, 9, 9, 411, 439, 9, 9, 415, + 55, 19, 11, 57, 22, 169, 24, 162, 160, 159, + 159, 427, 428, 429, 430, 431, 41, 42, 22, 162, + 162, 437, 438, 48, 164, 165, 159, 470, 168, 54, + 170, 171, 159, 159, 668, 159, 54, 671, 159, 455, + 159, 159, 159, 38, 4, 38, 162, 162, 162, 492, + 159, 162, 159, 159, 497, 159, 499, 22, 34, 502, + 162, 159, 61, 479, 165, 162, 162, 162, 484, 512, + 513, 162, 515, 162, 372, 373, 374, 375, 376, 377, + 378, 162, 162, 162, 162, 162, 162, 162, 162, 387, + 388, 389, 164, 165, 162, 511, 168, 162, 170, 171, + 169, 517, 38, 121, 122, 38, 22, 17, 17, 552, + 553, 162, 555, 556, 557, 558, 4, 162, 162, 162, + 563, 537, 162, 141, 142, 162, 144, 145, 571, 147, + 148, 149, 162, 162, 577, 94, 95, 96, 97, 98, + 99, 100, 101, 102, 103, 162, 562, 4, 4, 565, + 566, 567, 162, 292, 293, 294, 162, 162, 456, 457, + 458, 459, 162, 22, 162, 141, 142, 143, 144, 467, + 146, 614, 162, 169, 150, 151, 4, 153, 154, 155, + 162, 160, 598, 169, 162, 159, 4, 162, 159, 605, + 329, 54, 162, 160, 162, 22, 162, 160, 337, 338, + 339, 340, 341, 160, 620, 169, 162, 597, 141, 142, + 143, 144, 165, 146, 160, 167, 160, 150, 151, 662, + 153, 154, 155, 666, 667, 160, 160, 17, 526, 527, + 528, 529, 160, 531, 26, 27, 167, 535, 536, 160, + 160, 54, 4, 162, 152, 159, 159, 22, 17, 17, + 162, 17, 73, 669, 17, 698, 699, 93, 701, 638, + 703, 659, 112, 106, 707, 238, 249, 17, 90, 659, + 713, 57, 133, 620, 460, 133, -1, 416, 417, 418, + 419, 579, 580, 581, 582, -1, 425, -1, -1, 7, + 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, + 439, 19, 20, -1, 22, 23, 24, -1, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, -1, -1, -1, 0, -1, -1, 626, -1, + 628, 629, 50, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 18, 19, 20, -1, 22, 23, 24, + -1, -1, -1, 492, -1, 30, 31, -1, 497, -1, + 499, -1, -1, 502, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 512, 513, -1, 515, 52, -1, -1, + -1, 56, -1, -1, -1, 60, -1, -1, -1, -1, + -1, -1, -1, -1, 7, 8, -1, 10, 11, 12, + 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, + 23, 24, -1, 552, 553, -1, 555, 556, 557, 558, + -1, -1, -1, -1, 563, -1, -1, -1, -1, -1, + -1, -1, 571, -1, -1, -1, -1, 50, 577, -1, + -1, -1, -1, -1, -1, -1, 164, 165, -1, -1, + 168, -1, 170, 171, -1, -1, -1, -1, -1, -1, + 3, 4, 5, 6, 7, 8, 9, -1, -1, 0, + -1, -1, -1, -1, -1, 614, 19, 20, -1, 22, + 23, 24, 25, 26, 27, -1, -1, 18, 19, 20, + -1, 22, 23, 24, -1, -1, -1, 40, 41, 30, + 31, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 54, -1, -1, -1, -1, 59, -1, -1, -1, + -1, 52, -1, 662, -1, 56, -1, 666, 667, 60, + -1, -1, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 164, 165, -1, -1, 168, -1, 170, 171, 698, + 699, -1, 701, -1, 703, -1, -1, -1, 707, -1, + -1, -1, -1, -1, 713, -1, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, -1, + 133, -1, 135, 136, 137, -1, 139, 140, 141, 142, + -1, 144, 145, -1, 147, 148, 149, -1, -1, -1, + -1, -1, -1, -1, 3, 4, 5, 6, 7, 8, + 9, -1, 165, -1, -1, 168, -1, 170, -1, 172, + 19, 20, -1, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 40, 41, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 55, -1, 7, 8, + 59, 10, 11, 12, 13, 14, 15, 16, 17, -1, + 19, 20, -1, 22, 23, 24, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, -1, -1, -1, -1, -1, + -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 494, -1, -1, -1, -1, 499, -1, 501, -1, - 628, 504, 630, 631, -1, -1, -1, -1, -1, -1, - -1, 514, 515, -1, 517, -1, -1, -1, 164, 165, - -1, -1, 168, -1, 170, 171, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 164, 165, -1, - -1, 168, -1, 170, 171, -1, -1, -1, -1, -1, - -1, 554, 555, -1, 557, 558, 559, 560, -1, -1, - -1, -1, 565, -1, -1, -1, -1, -1, -1, -1, - 573, -1, -1, -1, -1, -1, 579, -1, -1, -1, - -1, -1, -1, -1, 164, 165, -1, -1, 168, -1, - 170, 171, -1, -1, -1, -1, -1, -1, 3, 4, - 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, - -1, -1, -1, 616, 19, 20, -1, 22, 23, 24, - 25, 26, 27, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 40, 41, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 54, - -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, - -1, 664, -1, -1, -1, 668, 669, -1, -1, -1, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, -1, - -1, -1, -1, -1, -1, -1, -1, 700, 701, -1, - 703, -1, 705, -1, -1, -1, 709, -1, -1, -1, - -1, -1, 715, -1, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, -1, 133, -1, - 135, 136, 137, -1, 139, 140, 141, 142, -1, 144, - 145, -1, 147, 148, 149, -1, -1, -1, -1, -1, - -1, -1, 3, 4, 5, 6, 7, 8, 9, -1, - 165, -1, -1, 168, -1, 170, -1, 172, 19, 20, - -1, 22, 23, 24, 25, 26, 27, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, - 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 55, -1, 7, 8, 59, 10, - 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, - -1, 22, 23, 24, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, -1, -1, -1, -1, -1, -1, 50, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, -1, 133, -1, 135, 136, 137, -1, + 139, 140, -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, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, -1, 133, -1, 135, 136, 137, -1, 139, 140, + 159, -1, -1, -1, -1, -1, 165, -1, -1, 168, + -1, 170, -1, 172, 3, 4, 5, 6, 7, 8, + 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 19, 20, -1, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 159, -1, - -1, -1, -1, -1, 165, -1, -1, 168, -1, 170, - -1, 172, 3, 4, 5, 6, 7, 8, 9, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 19, 20, - -1, 22, 23, 24, 25, 26, 27, -1, -1, -1, + -1, 40, 41, -1, -1, 164, 165, -1, -1, 168, + -1, 170, 171, -1, -1, -1, -1, -1, 7, 8, + 59, 10, 11, 12, 13, 14, 15, 16, 17, -1, + 19, 20, -1, 22, 23, 24, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, -1, -1, -1, -1, 7, + 8, 50, 10, 11, 12, 13, 14, 15, 16, 17, + -1, 19, 20, -1, 22, 23, 24, -1, -1, -1, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, -1, 133, -1, 135, 136, 137, -1, + 139, 140, 50, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 3, 4, 5, 6, -1, -1, 9, -1, + -1, -1, -1, -1, -1, -1, 165, -1, -1, 168, + -1, 170, -1, 172, 25, 26, 27, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, - 41, -1, -1, 164, 165, -1, -1, 168, -1, 170, - 171, -1, -1, -1, -1, -1, 7, 8, 59, 10, - 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, - -1, 22, 23, 24, 75, 76, 77, 78, 79, 80, + 41, -1, 141, 142, -1, 144, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, + -1, -1, -1, -1, -1, 164, 165, 125, -1, 168, + -1, 170, -1, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, -1, -1, -1, -1, 7, 8, 50, - 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, - 20, -1, 22, 23, 24, -1, -1, -1, 119, 120, + 91, 92, 93, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 164, 165, -1, -1, + 168, -1, 170, -1, -1, -1, -1, -1, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, -1, 133, -1, 135, 136, 137, -1, 139, 140, - 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 3, 4, 5, 6, -1, -1, 9, -1, -1, -1, + 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 19, 20, -1, 22, 23, 24, 25, -1, -1, -1, -1, -1, 165, -1, -1, 168, -1, 170, - -1, 172, 25, 26, 27, -1, -1, -1, -1, -1, + -1, 172, -1, 40, 41, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 7, 8, 55, 10, + 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, + -1, 22, 23, 24, -1, -1, -1, -1, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, -1, -1, 50, + -1, -1, -1, 7, 8, -1, 10, 11, 12, 13, + 14, 15, 16, 17, -1, 19, 20, -1, 22, 23, + 24, -1, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 39, 133, -1, 135, 136, + 137, -1, 139, 140, -1, -1, 50, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 159, -1, 7, 8, 163, -1, 165, -1, + -1, 168, -1, 170, -1, 172, 19, 20, -1, 22, + 23, 24, 25, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, - -1, -1, -1, 164, 165, -1, -1, 168, -1, 170, - 171, -1, 75, 76, 77, 78, 79, 80, 81, 82, + -1, -1, 55, 164, 165, -1, 167, 168, -1, 170, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 164, 165, -1, -1, 168, -1, - 170, 171, -1, -1, -1, -1, 119, 120, 121, 122, + 164, 165, -1, -1, 168, -1, 170, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, -1, 133, -1, 135, 136, 137, -1, 139, 140, 7, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 19, 20, -1, 22, 23, 24, 25, -1, -1, -1, - -1, -1, 165, -1, -1, 168, -1, 170, -1, 172, - -1, 40, 41, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 7, 8, 55, 10, 11, 12, - 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, - 23, 24, -1, -1, -1, -1, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, -1, -1, 50, -1, -1, - -1, 7, 8, -1, 10, 11, 12, 13, 14, 15, - 16, 17, -1, 19, 20, -1, 22, 23, 24, -1, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 39, 133, -1, 135, 136, 137, -1, - 139, 140, 7, 8, 50, 10, 11, 12, 13, 14, - 15, 16, 17, -1, 19, 20, -1, 22, 23, 24, - 159, -1, 7, 8, 163, -1, 165, -1, -1, 168, - -1, 170, -1, 172, 19, 20, -1, 22, 23, 24, - 25, -1, -1, -1, -1, 50, -1, -1, 141, 142, - -1, 144, -1, -1, -1, 40, 41, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 55, 164, 165, -1, -1, 168, -1, 170, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 164, 165, - 125, -1, 168, -1, 170, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, -1, 133, -1, - 135, 136, 137, -1, 139, 140, -1, -1, -1, 164, - 165, -1, -1, 168, -1, 170, -1, -1, -1, -1, - -1, -1, -1, -1, 159, -1, -1, -1, -1, -1, - 165, -1, -1, 168, -1, 170, -1, 172, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, - 19, 20, -1, 22, 23, 24, 7, 8, -1, 10, - 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, - 39, 22, 23, 24, -1, -1, -1, -1, -1, 7, + 19, 20, -1, 22, 23, 24, 159, -1, -1, -1, + -1, -1, 165, -1, -1, 168, -1, 170, -1, 172, + 39, -1, -1, -1, -1, -1, -1, -1, -1, 7, 8, 50, 10, 11, 12, 13, 14, 15, 16, 17, - -1, 19, 20, -1, 22, 23, 24, 7, 8, 50, + -1, 19, 20, -1, 22, 23, 24, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, 23, 24, -1, -1, -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, -1, -1, 39, @@ -2724,11 +2709,11 @@ 39, 19, 20, -1, 22, 23, 24, -1, -1, -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 164, 165, -1, -1, 168, - -1, 170, 50, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 164, 165, -1, 167, 168, -1, 170, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 170, 50, 7, 8, -1, 10, 11, 12, 13, + 14, 15, 16, 17, -1, 19, 20, -1, 22, 23, + 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 164, 165, -1, 167, - 168, -1, 170, -1, -1, -1, -1, -1, -1, -1, + 168, -1, 170, -1, -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, 164, 165, -1, -1, 168, -1, 170, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, 23, 24, -1, @@ -2736,42 +2721,37 @@ -1, -1, -1, -1, -1, 164, 165, -1, -1, 168, -1, 170, -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 164, 165, -1, -1, - 168, -1, 170, 7, 8, -1, 10, 11, 12, 13, - 14, 15, 16, 17, -1, 19, 20, -1, 22, 23, - 24, 7, 8, -1, 10, 11, 12, 13, 14, 15, - 16, 17, -1, 19, 20, -1, 22, 23, 24, -1, - -1, -1, -1, -1, 7, 8, 50, 10, 11, 12, + 168, -1, 170, -1, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, - 23, 24, 7, 8, 50, 10, 11, 12, 13, 14, + 23, 24, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, 23, 24, - -1, -1, -1, -1, -1, -1, -1, 50, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 164, 165, - -1, -1, 168, -1, 170, 50, 7, 8, -1, 10, - 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, - -1, 22, 23, 24, 7, 8, -1, 10, 11, 12, - 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, - 23, 24, -1, -1, -1, -1, -1, -1, -1, 50, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 164, 165, -1, -1, 168, -1, 170, 50, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 164, 165, + -1, 7, 8, -1, 10, 11, 12, 13, 14, 15, + 16, 17, -1, 19, 20, 50, 22, 23, 24, 7, + 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, + -1, 19, 20, -1, 22, 23, 24, -1, -1, -1, + -1, -1, -1, -1, 50, -1, -1, -1, 164, 165, -1, -1, 168, -1, 170, -1, -1, -1, -1, -1, + 7, 8, 50, 10, 11, 12, 13, 14, 15, 16, + 17, -1, 19, 20, -1, 22, 23, 24, -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, 50, -1, -1, -1, -1, -1, -1, -1, 164, 165, -1, -1, 168, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 164, 165, -1, -1, 168, -1, 170, -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, 36, -1, -1, -1, -1, - -1, -1, -1, 164, 165, -1, -1, 168, -1, 170, - -1, -1, -1, -1, -1, -1, 57, 58, -1, -1, - -1, 164, 165, -1, -1, 168, -1, 170, 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, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 114, 115, 116, -1, -1, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140 + 36, -1, -1, -1, -1, -1, -1, -1, 164, 165, + -1, -1, 168, -1, 170, -1, -1, -1, -1, -1, + -1, 57, 58, -1, -1, -1, 164, 165, -1, -1, + 168, -1, 170, 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, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 164, 165, -1, + -1, 168, -1, 170, -1, -1, -1, -1, 114, 115, + 116, -1, -1, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -2779,77 +2759,77 @@ static const yytype_uint16 yystos[] = { 0, 19, 20, 22, 23, 24, 30, 31, 52, 56, - 60, 181, 184, 186, 187, 188, 222, 223, 224, 226, - 225, 53, 68, 231, 161, 59, 161, 18, 161, 42, + 60, 180, 183, 185, 186, 187, 221, 222, 223, 225, + 224, 53, 68, 230, 161, 59, 161, 18, 161, 42, 43, 44, 45, 46, 47, 48, 49, 51, 156, 157, - 158, 189, 190, 191, 0, 224, 46, 48, 192, 241, - 42, 43, 44, 47, 193, 238, 240, 248, 161, 161, - 165, 232, 22, 230, 7, 8, 10, 11, 12, 13, - 14, 15, 16, 17, 50, 164, 165, 168, 170, 181, - 186, 209, 210, 244, 191, 191, 35, 37, 220, 191, - 191, 21, 249, 250, 29, 171, 239, 249, 22, 22, - 22, 233, 159, 4, 4, 4, 170, 10, 171, 210, - 215, 55, 159, 183, 220, 220, 42, 44, 194, 32, - 33, 219, 62, 63, 64, 65, 66, 67, 195, 236, - 236, 7, 184, 185, 253, 162, 167, 39, 210, 211, - 213, 214, 166, 166, 171, 215, 162, 171, 159, 214, - 163, 219, 219, 10, 125, 210, 212, 221, 11, 12, - 13, 14, 15, 16, 179, 180, 210, 216, 4, 199, - 28, 170, 237, 161, 36, 57, 58, 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, 114, 115, 116, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 174, 175, 176, - 251, 258, 259, 260, 261, 251, 259, 22, 197, 162, - 160, 210, 210, 169, 171, 210, 4, 160, 216, 210, - 159, 244, 26, 27, 3, 4, 5, 6, 9, 25, - 40, 41, 90, 91, 92, 93, 119, 133, 135, 136, - 137, 139, 140, 165, 168, 170, 172, 174, 175, 176, - 217, 244, 183, 141, 142, 144, 198, 212, 57, 10, - 210, 246, 247, 11, 17, 11, 179, 195, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 177, 26, - 27, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 178, 177, 178, 210, 210, - 246, 210, 210, 254, 246, 246, 246, 246, 246, 210, - 210, 210, 210, 210, 246, 195, 117, 118, 54, 121, - 122, 141, 142, 144, 145, 147, 148, 149, 196, 39, - 211, 201, 167, 169, 169, 160, 201, 183, 183, 221, - 177, 178, 177, 178, 159, 159, 159, 159, 159, 159, - 159, 167, 216, 218, 170, 218, 171, 218, 22, 159, - 159, 159, 227, 186, 3, 4, 5, 6, 9, 25, - 26, 27, 40, 41, 59, 165, 168, 170, 172, 217, - 243, 244, 245, 162, 245, 245, 245, 199, 210, 210, - 210, 210, 162, 204, 162, 204, 245, 165, 162, 162, - 162, 162, 162, 162, 245, 245, 245, 245, 245, 38, - 199, 210, 246, 4, 141, 142, 143, 144, 146, 150, - 151, 153, 154, 155, 200, 228, 229, 38, 159, 159, - 159, 159, 216, 216, 216, 216, 216, 216, 216, 162, - 167, 171, 210, 218, 169, 171, 216, 216, 216, 162, - 207, 159, 61, 242, 167, 218, 170, 218, 171, 218, - 22, 246, 162, 162, 212, 245, 245, 245, 245, 11, - 54, 11, 256, 245, 165, 246, 210, 246, 246, 246, - 162, 162, 257, 162, 162, 162, 210, 212, 245, 162, - 207, 207, 210, 216, 216, 216, 216, 256, 162, 162, - 162, 162, 257, 162, 216, 169, 171, 162, 162, 38, - 34, 54, 205, 208, 39, 210, 234, 235, 22, 167, - 171, 218, 169, 171, 17, 17, 245, 162, 162, 162, - 162, 245, 4, 245, 162, 162, 245, 162, 162, 162, - 4, 4, 162, 210, 245, 245, 245, 162, 204, 210, - 160, 162, 162, 162, 162, 160, 216, 216, 216, 216, - 160, 216, 169, 216, 216, 210, 22, 4, 207, 197, - 162, 160, 162, 169, 171, 245, 245, 159, 245, 245, - 245, 245, 204, 204, 246, 245, 162, 246, 246, 246, - 4, 245, 159, 245, 216, 216, 216, 216, 162, 160, - 162, 162, 257, 160, 160, 160, 181, 182, 39, 210, - 201, 22, 169, 162, 165, 17, 210, 255, 167, 245, - 257, 255, 204, 160, 160, 160, 160, 216, 216, 216, - 160, 197, 205, 206, 17, 167, 179, 252, 197, 197, - 160, 162, 167, 160, 160, 160, 160, 182, 54, 203, - 245, 243, 167, 179, 121, 122, 245, 245, 201, 17, - 210, 201, 4, 152, 202, 162, 243, 197, 197, 38, - 197, 197, 22, 17, 162, 17, 245, 245, 245, 17, - 245, 197, 197, 245, 73, 17, 245 + 158, 188, 189, 190, 0, 223, 46, 48, 191, 240, + 42, 43, 44, 47, 192, 237, 239, 247, 161, 161, + 165, 231, 22, 229, 7, 8, 10, 11, 12, 13, + 14, 15, 16, 17, 50, 164, 165, 168, 170, 180, + 185, 208, 209, 243, 190, 190, 35, 37, 219, 190, + 190, 21, 248, 249, 29, 171, 238, 248, 22, 22, + 22, 232, 159, 4, 4, 4, 170, 10, 171, 209, + 214, 55, 159, 182, 219, 219, 42, 44, 193, 32, + 33, 218, 62, 63, 64, 65, 66, 67, 194, 235, + 235, 7, 183, 184, 252, 162, 167, 39, 209, 210, + 212, 213, 166, 166, 171, 214, 162, 171, 159, 213, + 163, 218, 218, 10, 125, 209, 211, 220, 11, 12, + 13, 14, 15, 16, 179, 209, 215, 4, 198, 28, + 170, 236, 161, 36, 57, 58, 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, 114, 115, 116, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 174, 175, 176, 250, + 257, 258, 259, 260, 250, 258, 22, 196, 162, 160, + 209, 209, 169, 171, 209, 4, 160, 215, 209, 159, + 243, 3, 4, 5, 6, 26, 27, 9, 25, 40, + 41, 90, 91, 92, 93, 119, 133, 135, 136, 137, + 139, 140, 165, 168, 170, 172, 174, 175, 176, 216, + 243, 182, 141, 142, 144, 197, 211, 57, 10, 209, + 245, 246, 11, 17, 11, 194, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 177, 26, 27, 100, + 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 178, 177, 178, 209, 209, 245, 209, + 209, 253, 245, 245, 245, 245, 245, 209, 209, 209, + 209, 209, 245, 194, 117, 118, 54, 121, 122, 141, + 142, 144, 145, 147, 148, 149, 195, 39, 210, 200, + 167, 169, 169, 160, 200, 182, 182, 220, 177, 178, + 177, 178, 159, 159, 159, 159, 159, 159, 159, 167, + 215, 217, 170, 217, 171, 217, 22, 159, 159, 159, + 226, 185, 3, 4, 5, 6, 9, 25, 26, 27, + 40, 41, 59, 165, 168, 170, 172, 216, 242, 243, + 244, 162, 244, 244, 244, 198, 209, 209, 209, 209, + 162, 203, 162, 203, 244, 165, 162, 162, 162, 162, + 162, 162, 244, 244, 244, 244, 244, 38, 198, 209, + 245, 4, 141, 142, 143, 144, 146, 150, 151, 153, + 154, 155, 199, 227, 228, 38, 159, 159, 159, 159, + 215, 215, 215, 215, 215, 215, 215, 162, 167, 171, + 209, 217, 169, 171, 215, 215, 215, 162, 206, 159, + 61, 241, 167, 217, 170, 217, 171, 217, 22, 245, + 162, 162, 211, 244, 244, 244, 244, 11, 54, 11, + 255, 244, 165, 245, 209, 245, 245, 245, 162, 162, + 256, 162, 162, 162, 209, 211, 244, 162, 206, 206, + 209, 215, 215, 215, 215, 255, 162, 162, 162, 162, + 256, 162, 215, 169, 171, 162, 162, 38, 34, 54, + 204, 207, 39, 209, 233, 234, 22, 167, 171, 217, + 169, 171, 17, 17, 244, 162, 162, 162, 162, 244, + 4, 244, 162, 162, 244, 162, 162, 162, 4, 4, + 162, 209, 244, 244, 244, 162, 203, 209, 160, 162, + 162, 162, 162, 160, 215, 215, 215, 215, 160, 215, + 169, 215, 215, 209, 22, 4, 206, 196, 162, 160, + 162, 169, 171, 244, 244, 159, 244, 244, 244, 244, + 203, 203, 245, 244, 162, 245, 245, 245, 4, 244, + 159, 244, 215, 215, 215, 215, 162, 160, 162, 162, + 256, 160, 160, 160, 180, 181, 39, 209, 200, 22, + 169, 162, 165, 17, 209, 254, 167, 244, 256, 254, + 203, 160, 160, 160, 160, 215, 215, 215, 160, 196, + 204, 205, 17, 11, 167, 251, 196, 196, 160, 162, + 167, 160, 160, 160, 160, 181, 54, 202, 244, 242, + 11, 167, 121, 122, 244, 244, 200, 17, 209, 200, + 4, 152, 201, 162, 242, 196, 196, 38, 196, 196, + 22, 17, 162, 17, 244, 244, 244, 17, 244, 196, + 196, 244, 73, 17, 244 }; #define yyerrok (yyerrstatus = 0) @@ -3664,342 +3644,342 @@ switch (yyn) { case 29: -#line 1149 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1149 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_EQ; ;} break; case 30: -#line 1149 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1149 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_NE; ;} break; case 31: -#line 1150 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1150 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLT; ;} break; case 32: -#line 1150 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1150 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGT; ;} break; case 33: -#line 1151 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1151 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLE; ;} break; case 34: -#line 1151 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1151 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGE; ;} break; case 35: -#line 1152 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1152 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULT; ;} break; case 36: -#line 1152 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1152 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGT; ;} break; case 37: -#line 1153 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1153 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULE; ;} break; case 38: -#line 1153 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1153 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGE; ;} break; case 39: -#line 1157 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1157 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OEQ; ;} break; case 40: -#line 1157 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1157 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ONE; ;} break; case 41: -#line 1158 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1158 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLT; ;} break; case 42: -#line 1158 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1158 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGT; ;} break; case 43: -#line 1159 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1159 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLE; ;} break; case 44: -#line 1159 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1159 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGE; ;} break; case 45: -#line 1160 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1160 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ORD; ;} break; case 46: -#line 1160 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1160 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNO; ;} break; case 47: -#line 1161 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1161 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UEQ; ;} break; case 48: -#line 1161 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1161 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNE; ;} break; case 49: -#line 1162 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1162 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULT; ;} break; case 50: -#line 1162 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1162 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGT; ;} break; case 51: -#line 1163 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1163 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULE; ;} break; case 52: -#line 1163 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1163 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGE; ;} break; case 53: -#line 1164 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1164 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_TRUE; ;} break; case 54: -#line 1165 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1165 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;} break; - case 65: -#line 1174 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 64: +#line 1173 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; - case 66: -#line 1176 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 65: +#line 1175 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=(yyvsp[(3) - (4)].UInt64Val); ;} break; - case 67: -#line 1177 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 66: +#line 1176 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=0; ;} break; - case 68: -#line 1181 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 67: +#line 1180 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR ;} break; - case 69: -#line 1185 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 68: +#line 1184 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR ;} break; - case 70: -#line 1190 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 69: +#line 1189 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(1) - (2)].UIntVal); CHECK_FOR_ERROR ;} break; - case 74: -#line 1199 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 73: +#line 1198 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR ;} break; - case 75: -#line 1204 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 74: +#line 1203 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR ;} break; - case 76: -#line 1210 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 75: +#line 1209 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; - case 77: -#line 1211 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 76: +#line 1210 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; - case 78: -#line 1212 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 77: +#line 1211 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; - case 79: -#line 1213 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 78: +#line 1212 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; - case 80: -#line 1214 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 79: +#line 1213 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; - case 81: -#line 1215 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 80: +#line 1214 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::CommonLinkage; ;} break; - case 82: -#line 1219 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 81: +#line 1218 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; - case 83: -#line 1220 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 82: +#line 1219 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; - case 84: -#line 1221 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 83: +#line 1220 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; - case 85: -#line 1225 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 84: +#line 1224 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; - case 86: -#line 1226 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 85: +#line 1225 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; - case 87: -#line 1227 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 86: +#line 1226 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::HiddenVisibility; ;} break; - case 88: -#line 1228 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 87: +#line 1227 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::ProtectedVisibility; ;} break; - case 89: -#line 1232 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 88: +#line 1231 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; - case 90: -#line 1233 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 89: +#line 1232 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; - case 91: -#line 1234 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 90: +#line 1233 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; - case 92: -#line 1238 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 91: +#line 1237 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; - case 93: -#line 1239 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 92: +#line 1238 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; - case 94: -#line 1240 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 93: +#line 1239 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; - case 95: -#line 1241 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 94: +#line 1240 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; - case 96: -#line 1242 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 95: +#line 1241 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; - case 97: -#line 1246 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 96: +#line 1245 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; - case 98: -#line 1247 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 97: +#line 1246 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; - case 99: -#line 1248 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 98: +#line 1247 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; - case 100: -#line 1251 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 99: +#line 1250 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; - case 101: -#line 1252 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 100: +#line 1251 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; - case 102: -#line 1253 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 101: +#line 1252 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Fast; ;} break; - case 103: -#line 1254 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 102: +#line 1253 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Cold; ;} break; - case 104: -#line 1255 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 103: +#line 1254 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_StdCall; ;} break; - case 105: -#line 1256 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 104: +#line 1255 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_FastCall; ;} break; - case 106: -#line 1257 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 105: +#line 1256 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val)) GEN_ERROR("Calling conv too large"); @@ -4008,177 +3988,177 @@ ;} break; - case 107: -#line 1264 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 106: +#line 1263 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; - case 108: -#line 1265 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 107: +#line 1264 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; - case 109: -#line 1266 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 108: +#line 1265 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; - case 110: -#line 1267 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 109: +#line 1266 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; - case 111: -#line 1268 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 110: +#line 1267 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::InReg; ;} break; - case 112: -#line 1269 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 111: +#line 1268 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::StructRet; ;} break; - case 113: -#line 1270 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 112: +#line 1269 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoAlias; ;} break; - case 114: -#line 1271 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 113: +#line 1270 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ByVal; ;} break; - case 115: -#line 1272 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 114: +#line 1271 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::Nest; ;} break; - case 116: -#line 1273 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 115: +#line 1272 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::constructAlignmentFromInt((yyvsp[(2) - (2)].UInt64Val)); ;} break; - case 117: -#line 1277 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 116: +#line 1276 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::None; ;} break; - case 118: -#line 1278 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 117: +#line 1277 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes); ;} break; - case 119: -#line 1283 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 118: +#line 1282 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::InReg; ;} break; - case 120: -#line 1284 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 119: +#line 1283 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; - case 121: -#line 1285 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 120: +#line 1284 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; - case 122: -#line 1288 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 121: +#line 1287 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::None; ;} break; - case 123: -#line 1289 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 122: +#line 1288 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes); ;} break; - case 124: -#line 1295 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 123: +#line 1294 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoReturn; ;} break; - case 125: -#line 1296 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 124: +#line 1295 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoUnwind; ;} break; - case 126: -#line 1297 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 125: +#line 1296 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::InReg; ;} break; - case 127: -#line 1298 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 126: +#line 1297 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; - case 128: -#line 1299 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 127: +#line 1298 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; - case 129: -#line 1300 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 128: +#line 1299 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ReadNone; ;} break; - case 130: -#line 1301 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 129: +#line 1300 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ReadOnly; ;} break; - case 131: -#line 1302 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 130: +#line 1301 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoInline; ;} break; - case 132: -#line 1303 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 131: +#line 1302 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::AlwaysInline; ;} break; - case 133: -#line 1304 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 132: +#line 1303 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::OptimizeForSize; ;} break; - case 134: -#line 1307 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 133: +#line 1306 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::None; ;} break; - case 135: -#line 1308 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 134: +#line 1307 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes); ;} break; - case 136: -#line 1314 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 135: +#line 1313 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; - case 137: -#line 1315 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 136: +#line 1314 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(2) - (2)].StrVal); ;} break; - case 138: -#line 1322 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 137: +#line 1321 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; - case 139: -#line 1323 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 138: +#line 1322 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(2) - (2)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4187,13 +4167,13 @@ ;} break; - case 140: -#line 1329 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 139: +#line 1328 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; - case 141: -#line 1330 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 140: +#line 1329 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(3) - (3)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4202,8 +4182,8 @@ ;} break; - case 142: -#line 1339 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 141: +#line 1338 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { for (unsigned i = 0, e = (yyvsp[(2) - (2)].StrVal)->length(); i != e; ++i) if ((*(yyvsp[(2) - (2)].StrVal))[i] == '"' || (*(yyvsp[(2) - (2)].StrVal))[i] == '\\') @@ -4213,28 +4193,28 @@ ;} break; - case 143: -#line 1347 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 142: +#line 1346 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; - case 144: -#line 1348 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 143: +#line 1347 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (1)].StrVal); ;} break; - case 145: -#line 1353 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 144: +#line 1352 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; - case 146: -#line 1354 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 145: +#line 1353 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; - case 147: -#line 1355 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 146: +#line 1354 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV->setSection(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -4242,8 +4222,8 @@ ;} break; - case 148: -#line 1360 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 147: +#line 1359 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(2) - (2)].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[(2) - (2)].UInt64Val))) GEN_ERROR("Alignment must be a power of two"); @@ -4252,24 +4232,24 @@ ;} break; - case 156: -#line 1376 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 155: +#line 1375 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(OpaqueType::get()); CHECK_FOR_ERROR ;} break; - case 157: -#line 1380 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 156: +#line 1379 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[(1) - (1)].PrimType)); CHECK_FOR_ERROR ;} break; - case 158: -#line 1384 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 157: +#line 1383 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Pointer type? if (*(yyvsp[(1) - (3)].TypeVal) == Type::LabelTy) GEN_ERROR("Cannot form a pointer to a basic block"); @@ -4279,8 +4259,8 @@ ;} break; - case 159: -#line 1391 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 158: +#line 1390 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... const Type* tmp = getTypeVal((yyvsp[(1) - (1)].ValIDVal)); CHECK_FOR_ERROR @@ -4288,8 +4268,8 @@ ;} break; - case 160: -#line 1396 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 159: +#line 1395 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if ((yyvsp[(2) - (2)].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -4300,8 +4280,8 @@ ;} break; - case 161: -#line 1404 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 160: +#line 1403 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4339,8 +4319,8 @@ ;} break; - case 162: -#line 1439 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 161: +#line 1438 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4373,8 +4353,8 @@ ;} break; - case 163: -#line 1470 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 162: +#line 1469 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Sized array type? (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[(4) - (5)].TypeVal), (yyvsp[(2) - (5)].UInt64Val)))); delete (yyvsp[(4) - (5)].TypeVal); @@ -4382,8 +4362,8 @@ ;} break; - case 164: -#line 1475 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 163: +#line 1474 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Vector type? const llvm::Type* ElemTy = (yyvsp[(4) - (5)].TypeVal)->get(); if ((unsigned)(yyvsp[(2) - (5)].UInt64Val) != (yyvsp[(2) - (5)].UInt64Val)) @@ -4396,8 +4376,8 @@ ;} break; - case 165: -#line 1485 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 164: +#line 1484 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = (yyvsp[(2) - (3)].TypeList)->begin(), @@ -4410,16 +4390,16 @@ ;} break; - case 166: -#line 1495 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 165: +#line 1494 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector())); CHECK_FOR_ERROR ;} break; - case 167: -#line 1499 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 166: +#line 1498 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements; for (std::list::iterator I = (yyvsp[(3) - (5)].TypeList)->begin(), @@ -4432,16 +4412,16 @@ ;} break; - case 168: -#line 1509 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 167: +#line 1508 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector(), true)); CHECK_FOR_ERROR ;} break; - case 169: -#line 1516 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 168: +#line 1515 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4450,8 +4430,8 @@ ;} break; - case 170: -#line 1525 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 169: +#line 1524 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (1)].TypeVal))->getDescription()); @@ -4461,15 +4441,15 @@ ;} break; - case 171: -#line 1532 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 170: +#line 1531 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(Type::VoidTy); ;} break; - case 172: -#line 1537 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 171: +#line 1536 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); (yyval.TypeWithAttrsList)->push_back((yyvsp[(1) - (1)].TypeWithAttrs)); @@ -4477,16 +4457,16 @@ ;} break; - case 173: -#line 1542 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 172: +#line 1541 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList))->push_back((yyvsp[(3) - (3)].TypeWithAttrs)); CHECK_FOR_ERROR ;} break; - case 175: -#line 1550 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 174: +#line 1549 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList); TypeWithAttrs TWA; TWA.Attrs = Attribute::None; @@ -4496,8 +4476,8 @@ ;} break; - case 176: -#line 1557 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 175: +#line 1556 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList; TypeWithAttrs TWA; TWA.Attrs = Attribute::None; @@ -4507,16 +4487,16 @@ ;} break; - case 177: -#line 1564 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 176: +#line 1563 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); CHECK_FOR_ERROR ;} break; - case 178: -#line 1572 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 177: +#line 1571 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); (yyval.TypeList)->push_back(*(yyvsp[(1) - (1)].TypeVal)); @@ -4525,8 +4505,8 @@ ;} break; - case 179: -#line 1578 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 178: +#line 1577 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[(1) - (3)].TypeList))->push_back(*(yyvsp[(3) - (3)].TypeVal)); delete (yyvsp[(3) - (3)].TypeVal); @@ -4534,8 +4514,8 @@ ;} break; - case 180: -#line 1590 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 179: +#line 1589 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4566,8 +4546,8 @@ ;} break; - case 181: -#line 1618 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 180: +#line 1617 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4586,8 +4566,8 @@ ;} break; - case 182: -#line 1634 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 181: +#line 1633 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4617,8 +4597,8 @@ ;} break; - case 183: -#line 1661 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 182: +#line 1660 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4649,8 +4629,8 @@ ;} break; - case 184: -#line 1689 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 183: +#line 1688 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (4)].TypeVal)->get()); if (STy == 0) @@ -4679,8 +4659,8 @@ ;} break; - case 185: -#line 1715 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 184: +#line 1714 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4703,8 +4683,8 @@ ;} break; - case 186: -#line 1735 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 185: +#line 1734 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (6)].TypeVal)->get()); if (STy == 0) @@ -4733,8 +4713,8 @@ ;} break; - case 187: -#line 1761 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 186: +#line 1760 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (5)].TypeVal))->getDescription()); @@ -4757,8 +4737,8 @@ ;} break; - case 188: -#line 1781 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 187: +#line 1780 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4773,8 +4753,8 @@ ;} break; - case 189: -#line 1793 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 188: +#line 1792 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4784,8 +4764,8 @@ ;} break; - case 190: -#line 1800 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 189: +#line 1799 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4854,8 +4834,8 @@ ;} break; - case 191: -#line 1866 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 190: +#line 1865 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4868,8 +4848,8 @@ ;} break; - case 192: -#line 1876 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 191: +#line 1875 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4882,8 +4862,8 @@ ;} break; - case 193: -#line 1886 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 192: +#line 1885 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].SInt64Val))) GEN_ERROR("Constant value doesn't fit in type"); @@ -4892,8 +4872,8 @@ ;} break; - case 194: -#line 1892 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 193: +#line 1891 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth(); if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) { @@ -4906,8 +4886,8 @@ ;} break; - case 195: -#line 1902 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 194: +#line 1901 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].UInt64Val))) GEN_ERROR("Constant value doesn't fit in type"); @@ -4916,8 +4896,8 @@ ;} break; - case 196: -#line 1908 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 195: +#line 1907 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth(); if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) { @@ -4930,8 +4910,8 @@ ;} break; - case 197: -#line 1918 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 196: +#line 1917 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants if (cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() != 1) GEN_ERROR("Constant true must have type i1"); @@ -4940,8 +4920,8 @@ ;} break; - case 198: -#line 1924 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 197: +#line 1923 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants if (cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() != 1) GEN_ERROR("Constant false must have type i1"); @@ -4950,8 +4930,8 @@ ;} break; - case 199: -#line 1930 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 198: +#line 1929 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Floating point constants if (!ConstantFP::isValueValidForType((yyvsp[(1) - (2)].PrimType), *(yyvsp[(2) - (2)].FPVal))) GEN_ERROR("Floating point constant invalid for type"); @@ -4968,8 +4948,8 @@ ;} break; - case 200: -#line 1946 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 199: +#line 1945 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (6)].TypeVal))->getDescription()); @@ -4984,8 +4964,8 @@ ;} break; - case 201: -#line 1958 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 200: +#line 1957 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (5)].ConstVal)->getType())) GEN_ERROR("GetElementPtr requires a pointer operand"); @@ -5009,8 +4989,8 @@ ;} break; - case 202: -#line 1979 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 201: +#line 1978 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (8)].ConstVal)->getType() != Type::Int1Ty) GEN_ERROR("Select condition must be of boolean type"); @@ -5021,8 +5001,8 @@ ;} break; - case 203: -#line 1987 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 202: +#line 1986 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Binary operator types must match"); @@ -5031,8 +5011,8 @@ ;} break; - case 204: -#line 1993 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 203: +#line 1992 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Logical operator types must match"); @@ -5046,8 +5026,8 @@ ;} break; - case 205: -#line 2004 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 204: +#line 2003 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("icmp operand types must match"); @@ -5055,8 +5035,8 @@ ;} break; - case 206: -#line 2009 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 205: +#line 2008 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("fcmp operand types must match"); @@ -5064,8 +5044,8 @@ ;} break; - case 207: -#line 2014 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 206: +#line 2013 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vicmp operand types must match"); @@ -5073,8 +5053,8 @@ ;} break; - case 208: -#line 2019 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 207: +#line 2018 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vfcmp operand types must match"); @@ -5082,8 +5062,8 @@ ;} break; - case 209: -#line 2024 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 208: +#line 2023 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(3) - (6)].ConstVal), (yyvsp[(5) - (6)].ConstVal))) GEN_ERROR("Invalid extractelement operands"); @@ -5092,8 +5072,8 @@ ;} break; - case 210: -#line 2030 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 209: +#line 2029 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid insertelement operands"); @@ -5102,8 +5082,8 @@ ;} break; - case 211: -#line 2036 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 210: +#line 2035 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -5112,8 +5092,8 @@ ;} break; - case 212: -#line 2042 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 211: +#line 2041 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (5)].ConstVal)->getType()) && !isa((yyvsp[(3) - (5)].ConstVal)->getType())) GEN_ERROR("ExtractValue requires an aggregate operand"); @@ -5124,8 +5104,8 @@ ;} break; - case 213: -#line 2050 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 212: +#line 2049 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (7)].ConstVal)->getType()) && !isa((yyvsp[(3) - (7)].ConstVal)->getType())) GEN_ERROR("InsertValue requires an aggregate operand"); @@ -5136,16 +5116,16 @@ ;} break; - case 214: -#line 2061 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 213: +#line 2060 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ConstVector) = (yyvsp[(1) - (3)].ConstVector))->push_back((yyvsp[(3) - (3)].ConstVal)); CHECK_FOR_ERROR ;} break; - case 215: -#line 2065 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 214: +#line 2064 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector) = new std::vector(); (yyval.ConstVector)->push_back((yyvsp[(1) - (1)].ConstVal)); @@ -5153,28 +5133,28 @@ ;} break; - case 216: -#line 2073 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 215: +#line 2072 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; - case 217: -#line 2073 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 216: +#line 2072 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; - case 218: -#line 2076 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 217: +#line 2075 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; - case 219: -#line 2076 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 218: +#line 2075 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; - case 220: -#line 2079 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 219: +#line 2078 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { const Type* VTy = (yyvsp[(1) - (2)].TypeVal)->get(); Value *V = getVal(VTy, (yyvsp[(2) - (2)].ValIDVal)); @@ -5189,8 +5169,8 @@ ;} break; - case 221: -#line 2091 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 220: +#line 2090 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { Constant *Val = (yyvsp[(3) - (6)].ConstVal); const Type *DestTy = (yyvsp[(5) - (6)].TypeVal)->get(); @@ -5205,8 +5185,8 @@ ;} break; - case 222: -#line 2112 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 221: +#line 2111 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -5214,8 +5194,8 @@ ;} break; - case 223: -#line 2117 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 222: +#line 2116 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -5223,40 +5203,40 @@ ;} break; - case 226: -#line 2130 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 225: +#line 2129 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = false; ;} break; - case 227: -#line 2130 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 226: +#line 2129 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.FunctionDone(); CHECK_FOR_ERROR ;} break; - case 228: -#line 2134 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 227: +#line 2133 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ;} break; - case 229: -#line 2134 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 228: +#line 2133 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 230: -#line 2137 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 229: +#line 2136 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 231: -#line 2140 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 230: +#line 2139 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (3)].TypeVal))->getDescription()); @@ -5283,8 +5263,8 @@ ;} break; - case 232: -#line 2164 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 231: +#line 2163 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { ResolveTypeTo((yyvsp[(1) - (3)].StrVal), (yyvsp[(3) - (3)].PrimType)); @@ -5298,8 +5278,8 @@ ;} break; - case 233: -#line 2176 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 232: +#line 2175 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { /* "Externally Visible" Linkage */ if ((yyvsp[(5) - (6)].ConstVal) == 0) @@ -5310,15 +5290,15 @@ ;} break; - case 234: -#line 2183 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 233: +#line 2182 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; - case 235: -#line 2187 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 234: +#line 2186 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(6) - (7)].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant"); @@ -5327,15 +5307,15 @@ ;} break; - case 236: -#line 2192 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 235: +#line 2191 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; - case 237: -#line 2196 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 236: +#line 2195 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(6) - (7)].TypeVal))->getDescription()); @@ -5345,16 +5325,16 @@ ;} break; - case 238: -#line 2202 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 237: +#line 2201 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR ;} break; - case 239: -#line 2206 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 238: +#line 2205 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { std::string Name; if ((yyvsp[(1) - (5)].StrVal)) { @@ -5397,22 +5377,22 @@ ;} break; - case 240: -#line 2246 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 239: +#line 2245 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 241: -#line 2249 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 240: +#line 2248 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 242: -#line 2255 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 241: +#line 2254 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); if (AsmSoFar.empty()) @@ -5424,24 +5404,24 @@ ;} break; - case 243: -#line 2265 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 242: +#line 2264 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); ;} break; - case 244: -#line 2269 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 243: +#line 2268 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setDataLayout(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); ;} break; - case 246: -#line 2276 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 245: +#line 2275 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5449,8 +5429,8 @@ ;} break; - case 247: -#line 2281 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 246: +#line 2280 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5458,15 +5438,15 @@ ;} break; - case 248: -#line 2286 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 247: +#line 2285 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 249: -#line 2295 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 248: +#line 2294 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -5479,8 +5459,8 @@ ;} break; - case 250: -#line 2305 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 249: +#line 2304 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -5493,16 +5473,16 @@ ;} break; - case 251: -#line 2316 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 250: +#line 2315 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (1)].ArgList); CHECK_FOR_ERROR ;} break; - case 252: -#line 2320 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 251: +#line 2319 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (3)].ArgList); struct ArgListEntry E; @@ -5514,8 +5494,8 @@ ;} break; - case 253: -#line 2329 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 252: +#line 2328 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = new ArgListType; struct ArgListEntry E; @@ -5527,16 +5507,16 @@ ;} break; - case 254: -#line 2338 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 253: +#line 2337 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = 0; CHECK_FOR_ERROR ;} break; - case 255: -#line 2344 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 254: +#line 2343 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { std::string FunctionName(*(yyvsp[(4) - (11)].StrVal)); delete (yyvsp[(4) - (11)].StrVal); // Free strdup'd memory! @@ -5686,8 +5666,8 @@ ;} break; - case 258: -#line 2494 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 257: +#line 2493 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -5698,16 +5678,16 @@ ;} break; - case 261: -#line 2505 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 260: +#line 2504 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR ;} break; - case 262: -#line 2510 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 261: +#line 2509 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.CurrentFunction->setLinkage((yyvsp[(1) - (3)].Linkage)); CurFun.CurrentFunction->setVisibility((yyvsp[(2) - (3)].Visibility)); @@ -5717,40 +5697,40 @@ ;} break; - case 263: -#line 2522 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 262: +#line 2521 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 264: -#line 2526 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 263: +#line 2525 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 265: -#line 2531 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 264: +#line 2530 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].SInt64Val)); CHECK_FOR_ERROR ;} break; - case 266: -#line 2535 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 265: +#line 2534 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].UInt64Val)); CHECK_FOR_ERROR ;} break; - case 267: -#line 2539 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 266: +#line 2538 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants (yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), true); delete (yyvsp[(1) - (1)].APIntVal); @@ -5758,8 +5738,8 @@ ;} break; - case 268: -#line 2544 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 267: +#line 2543 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants (yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), false); delete (yyvsp[(1) - (1)].APIntVal); @@ -5767,56 +5747,56 @@ ;} break; - case 269: -#line 2549 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 268: +#line 2548 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].FPVal)); CHECK_FOR_ERROR ;} break; - case 270: -#line 2553 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 269: +#line 2552 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getTrue()); CHECK_FOR_ERROR ;} break; - case 271: -#line 2557 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 270: +#line 2556 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getFalse()); CHECK_FOR_ERROR ;} break; - case 272: -#line 2561 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 271: +#line 2560 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createNull(); CHECK_FOR_ERROR ;} break; - case 273: -#line 2565 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 272: +#line 2564 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createUndef(); CHECK_FOR_ERROR ;} break; - case 274: -#line 2569 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 273: +#line 2568 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // A vector zero constant. (yyval.ValIDVal) = ValID::createZeroInit(); CHECK_FOR_ERROR ;} break; - case 275: -#line 2573 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 274: +#line 2572 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType(); unsigned NumElements = (yyvsp[(2) - (3)].ConstVector)->size(); @@ -5841,8 +5821,8 @@ ;} break; - case 276: -#line 2595 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 275: +#line 2594 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType(); uint64_t NumElements = (yyvsp[(2) - (3)].ConstVector)->size(); @@ -5867,8 +5847,8 @@ ;} break; - case 277: -#line 2617 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 276: +#line 2616 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Use undef instead of an array because it's inconvenient to determine // the element type at this point, there being no elements to examine. @@ -5877,8 +5857,8 @@ ;} break; - case 278: -#line 2623 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 277: +#line 2622 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { uint64_t NumElements = (yyvsp[(2) - (2)].StrVal)->length(); const Type *ETy = Type::Int8Ty; @@ -5894,8 +5874,8 @@ ;} break; - case 279: -#line 2636 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 278: +#line 2635 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements((yyvsp[(2) - (3)].ConstVector)->size()); for (unsigned i = 0, e = (yyvsp[(2) - (3)].ConstVector)->size(); i != e; ++i) @@ -5910,8 +5890,8 @@ ;} break; - case 280: -#line 2648 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 279: +#line 2647 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = StructType::get(std::vector()); (yyval.ValIDVal) = ValID::create(ConstantStruct::get(STy, std::vector())); @@ -5919,8 +5899,8 @@ ;} break; - case 281: -#line 2653 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 280: +#line 2652 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements((yyvsp[(3) - (5)].ConstVector)->size()); for (unsigned i = 0, e = (yyvsp[(3) - (5)].ConstVector)->size(); i != e; ++i) @@ -5935,8 +5915,8 @@ ;} break; - case 282: -#line 2665 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 281: +#line 2664 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = StructType::get(std::vector(), /*isPacked=*/true); @@ -5945,16 +5925,16 @@ ;} break; - case 283: -#line 2671 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 282: +#line 2670 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].ConstVal)); CHECK_FOR_ERROR ;} break; - case 284: -#line 2675 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 283: +#line 2674 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createInlineAsm(*(yyvsp[(3) - (5)].StrVal), *(yyvsp[(5) - (5)].StrVal), (yyvsp[(2) - (5)].BoolVal)); delete (yyvsp[(3) - (5)].StrVal); @@ -5963,24 +5943,24 @@ ;} break; - case 285: -#line 2685 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 284: +#line 2684 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? (yyval.ValIDVal) = ValID::createLocalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR ;} break; - case 286: -#line 2689 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 285: +#line 2688 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createGlobalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR ;} break; - case 287: -#line 2693 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 286: +#line 2692 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5988,8 +5968,8 @@ ;} break; - case 288: -#line 2698 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 287: +#line 2697 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createGlobalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5997,8 +5977,8 @@ ;} break; - case 291: -#line 2711 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 290: +#line 2710 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -6008,8 +5988,8 @@ ;} break; - case 292: -#line 2720 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 291: +#line 2719 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); (yyval.ValueList)->push_back((yyvsp[(1) - (1)].ValueVal)); @@ -6017,32 +5997,32 @@ ;} break; - case 293: -#line 2725 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 292: +#line 2724 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ValueList)=(yyvsp[(1) - (3)].ValueList))->push_back((yyvsp[(3) - (3)].ValueVal)); CHECK_FOR_ERROR ;} break; - case 294: -#line 2730 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 293: +#line 2729 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR ;} break; - case 295: -#line 2734 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 294: +#line 2733 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR ;} break; - case 296: -#line 2743 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 295: +#line 2742 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { setValueName((yyvsp[(3) - (3)].TermInstVal), (yyvsp[(2) - (3)].StrVal)); CHECK_FOR_ERROR @@ -6053,8 +6033,8 @@ ;} break; - case 297: -#line 2752 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 296: +#line 2751 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR int ValNum = InsertValue((yyvsp[(3) - (3)].TermInstVal)); @@ -6068,8 +6048,8 @@ ;} break; - case 298: -#line 2765 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 297: +#line 2764 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (CastInst *CI1 = dyn_cast((yyvsp[(2) - (2)].InstVal))) if (CastInst *CI2 = dyn_cast(CI1->getOperand(0))) @@ -6081,16 +6061,16 @@ ;} break; - case 299: -#line 2774 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 298: +#line 2773 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty space between instruction lists (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalID(CurFun.NextValNum)); CHECK_FOR_ERROR ;} break; - case 300: -#line 2778 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 299: +#line 2777 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Labelled (named) basic block (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal))); delete (yyvsp[(1) - (1)].StrVal); @@ -6099,8 +6079,8 @@ ;} break; - case 301: -#line 2786 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 300: +#line 2785 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with a result... ValueList &VL = *(yyvsp[(2) - (2)].ValueList); assert(!VL.empty() && "Invalid ret operands!"); @@ -6123,16 +6103,16 @@ ;} break; - case 302: -#line 2806 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 301: +#line 2805 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with no result... (yyval.TermInstVal) = ReturnInst::Create(); CHECK_FOR_ERROR ;} break; - case 303: -#line 2810 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 302: +#line 2809 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[(3) - (3)].ValIDVal)); CHECK_FOR_ERROR @@ -6140,8 +6120,8 @@ ;} break; - case 304: -#line 2815 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 303: +#line 2814 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (cast((yyvsp[(2) - (9)].PrimType))->getBitWidth() != 1) GEN_ERROR("Branch condition must have type i1"); @@ -6155,8 +6135,8 @@ ;} break; - case 305: -#line 2826 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 304: +#line 2825 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (9)].PrimType), (yyvsp[(3) - (9)].ValIDVal)); CHECK_FOR_ERROR @@ -6178,8 +6158,8 @@ ;} break; - case 306: -#line 2845 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 305: +#line 2844 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (8)].PrimType), (yyvsp[(3) - (8)].ValIDVal)); CHECK_FOR_ERROR @@ -6191,8 +6171,8 @@ ;} break; - case 307: -#line 2855 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 306: +#line 2854 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -6298,24 +6278,24 @@ ;} break; - case 308: -#line 2958 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 307: +#line 2957 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnwindInst(); CHECK_FOR_ERROR ;} break; - case 309: -#line 2962 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 308: +#line 2961 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnreachableInst(); CHECK_FOR_ERROR ;} break; - case 310: -#line 2969 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 309: +#line 2968 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = (yyvsp[(1) - (6)].JumpTable); Constant *V = cast(getExistingVal((yyvsp[(2) - (6)].PrimType), (yyvsp[(3) - (6)].ValIDVal))); @@ -6329,8 +6309,8 @@ ;} break; - case 311: -#line 2980 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 310: +#line 2979 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = new std::vector >(); Constant *V = cast(getExistingVal((yyvsp[(1) - (5)].PrimType), (yyvsp[(2) - (5)].ValIDVal))); @@ -6345,8 +6325,8 @@ ;} break; - case 312: -#line 2993 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 311: +#line 2992 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName((yyvsp[(2) - (2)].InstVal), (yyvsp[(1) - (2)].StrVal)); @@ -6357,8 +6337,8 @@ ;} break; - case 313: -#line 3002 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 312: +#line 3001 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR int ValNum = InsertValue((yyvsp[(2) - (2)].InstVal)); @@ -6372,8 +6352,8 @@ ;} break; - case 314: -#line 3015 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 313: +#line 3014 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (6)].TypeVal))->getDescription()); @@ -6387,8 +6367,8 @@ ;} break; - case 315: -#line 3026 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 314: +#line 3025 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.PHIList) = (yyvsp[(1) - (7)].PHIList); Value* tmpVal = getVal((yyvsp[(1) - (7)].PHIList)->front().first->getType(), (yyvsp[(4) - (7)].ValIDVal)); @@ -6399,8 +6379,8 @@ ;} break; - case 316: -#line 3036 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 315: +#line 3035 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -6414,8 +6394,8 @@ ;} break; - case 317: -#line 3047 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 316: +#line 3046 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 // Labels are only valid in ASMs @@ -6426,8 +6406,8 @@ ;} break; - case 318: -#line 3055 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 317: +#line 3054 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -6440,8 +6420,8 @@ ;} break; - case 319: -#line 3065 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 318: +#line 3064 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 (yyval.ParamList) = (yyvsp[(1) - (6)].ParamList); @@ -6451,18 +6431,18 @@ ;} break; - case 320: -#line 3072 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 319: +#line 3071 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamList) = new ParamList(); ;} break; - case 321: -#line 3075 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 320: +#line 3074 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); ;} break; - case 322: -#line 3076 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 321: +#line 3075 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[(1) - (3)].ValueList); (yyval.ValueList)->push_back((yyvsp[(3) - (3)].ValueVal)); @@ -6470,8 +6450,8 @@ ;} break; - case 323: -#line 3084 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 322: +#line 3083 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstantList) = new std::vector(); if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val)) @@ -6480,8 +6460,8 @@ ;} break; - case 324: -#line 3090 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 323: +#line 3089 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstantList) = (yyvsp[(1) - (3)].ConstantList); if ((unsigned)(yyvsp[(3) - (3)].UInt64Val) != (yyvsp[(3) - (3)].UInt64Val)) @@ -6491,24 +6471,24 @@ ;} break; - case 325: -#line 3099 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 324: +#line 3098 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 326: -#line 3103 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 325: +#line 3102 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 327: -#line 3108 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 326: +#line 3107 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6527,8 +6507,8 @@ ;} break; - case 328: -#line 3124 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 327: +#line 3123 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6548,8 +6528,8 @@ ;} break; - case 329: -#line 3141 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 328: +#line 3140 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6564,8 +6544,8 @@ ;} break; - case 330: -#line 3153 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 329: +#line 3152 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6580,8 +6560,8 @@ ;} break; - case 331: -#line 3165 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 330: +#line 3164 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6598,8 +6578,8 @@ ;} break; - case 332: -#line 3179 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 331: +#line 3178 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6616,8 +6596,8 @@ ;} break; - case 333: -#line 3193 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 332: +#line 3192 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6632,8 +6612,8 @@ ;} break; - case 334: -#line 3205 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 333: +#line 3204 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (isa((yyvsp[(2) - (6)].ValueVal)->getType())) { // vector select @@ -6657,8 +6637,8 @@ ;} break; - case 335: -#line 3226 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 334: +#line 3225 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6668,8 +6648,8 @@ ;} break; - case 336: -#line 3233 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 335: +#line 3232 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(2) - (4)].ValueVal), (yyvsp[(4) - (4)].ValueVal))) GEN_ERROR("Invalid extractelement operands"); @@ -6678,8 +6658,8 @@ ;} break; - case 337: -#line 3239 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 336: +#line 3238 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid insertelement operands"); @@ -6688,8 +6668,8 @@ ;} break; - case 338: -#line 3245 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 337: +#line 3244 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -6698,8 +6678,8 @@ ;} break; - case 339: -#line 3251 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 338: +#line 3250 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[(2) - (2)].PHIList)->front().first->getType(); if (!Ty->isFirstClassType()) @@ -6717,8 +6697,8 @@ ;} break; - case 340: -#line 3267 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 339: +#line 3266 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -6830,32 +6810,32 @@ ;} break; - case 341: -#line 3376 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 340: +#line 3375 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = (yyvsp[(1) - (1)].InstVal); CHECK_FOR_ERROR ;} break; - case 342: -#line 3381 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 341: +#line 3380 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 343: -#line 3385 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 342: +#line 3384 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 344: -#line 3392 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 343: +#line 3391 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6865,8 +6845,8 @@ ;} break; - case 345: -#line 3399 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 344: +#line 3398 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6879,8 +6859,8 @@ ;} break; - case 346: -#line 3409 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 345: +#line 3408 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6890,8 +6870,8 @@ ;} break; - case 347: -#line 3416 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 346: +#line 3415 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6904,8 +6884,8 @@ ;} break; - case 348: -#line 3426 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 347: +#line 3425 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(2) - (2)].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + @@ -6915,8 +6895,8 @@ ;} break; - case 349: -#line 3434 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 348: +#line 3433 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -6933,8 +6913,8 @@ ;} break; - case 350: -#line 3448 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 349: +#line 3447 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (7)].TypeVal))->getDescription()); @@ -6954,8 +6934,8 @@ ;} break; - case 351: -#line 3465 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 350: +#line 3464 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6972,8 +6952,8 @@ ;} break; - case 352: -#line 3479 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 351: +#line 3478 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()); @@ -6991,8 +6971,8 @@ ;} break; - case 353: -#line 3494 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 352: +#line 3493 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()); @@ -7010,8 +6990,8 @@ ;} break; - case 354: -#line 3509 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" + case 353: +#line 3508 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (7)].TypeVal))->getDescription()); @@ -7033,7 +7013,7 @@ /* Line 1267 of yacc.c. */ -#line 7037 "llvmAsmParser.tab.c" +#line 7017 "llvmAsmParser.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -7247,7 +7227,7 @@ } -#line 3528 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3527 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" // common code from the two 'RunVMAsmParser' functions Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs?rev=57559&r1=57558&r2=57559&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs Wed Oct 15 01:03:48 2008 @@ -360,7 +360,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 977 "/Volumes/MacOS9/gcc/llvm/lib/AsmParser/llvmAsmParser.y" +#line 977 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { llvm::Module *ModuleVal; llvm::Function *FunctionVal; Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs?rev=57559&r1=57558&r2=57559&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Wed Oct 15 01:03:48 2008 @@ -1071,7 +1071,7 @@ // Built in types... %type Types ResultTypes -%type IntType FPType PrimType // Classifications +%type FPType PrimType // Classifications %token VOID INTTYPE %token FLOAT DOUBLE X86_FP80 FP128 PPC_FP128 LABEL %token TYPE @@ -1167,7 +1167,6 @@ // These are some types that allow classification if we only want a particular // thing... for example, only a signed, unsigned, or integral type. -IntType : INTTYPE; FPType : FLOAT | DOUBLE | PPC_FP128 | FP128 | X86_FP80; LocalName : LOCALVAR | STRINGCONSTANT | PCTSTRINGCONSTANT ; @@ -1883,13 +1882,13 @@ delete $1; CHECK_FOR_ERROR } - | IntType ESINT64VAL { // integral constants + | INTTYPE ESINT64VAL { // integral constants if (!ConstantInt::isValueValidForType($1, $2)) GEN_ERROR("Constant value doesn't fit in type"); $$ = ConstantInt::get($1, $2, true); CHECK_FOR_ERROR } - | IntType ESAPINTVAL { // arbitrary precision integer constants + | INTTYPE ESAPINTVAL { // arbitrary precision integer constants uint32_t BitWidth = cast($1)->getBitWidth(); if ($2->getBitWidth() > BitWidth) { GEN_ERROR("Constant value does not fit in type"); @@ -1899,13 +1898,13 @@ delete $2; CHECK_FOR_ERROR } - | IntType EUINT64VAL { // integral constants + | INTTYPE EUINT64VAL { // integral constants if (!ConstantInt::isValueValidForType($1, $2)) GEN_ERROR("Constant value doesn't fit in type"); $$ = ConstantInt::get($1, $2, false); CHECK_FOR_ERROR } - | IntType EUAPINTVAL { // arbitrary precision integer constants + | INTTYPE EUAPINTVAL { // arbitrary precision integer constants uint32_t BitWidth = cast($1)->getBitWidth(); if ($2->getBitWidth() > BitWidth) { GEN_ERROR("Constant value does not fit in type"); @@ -2823,7 +2822,7 @@ CHECK_FOR_ERROR $$ = BranchInst::Create(tmpBBA, tmpBBB, tmpVal); } - | SWITCH IntType ValueRef ',' LABEL ValueRef '[' JumpTable ']' { + | SWITCH INTTYPE ValueRef ',' LABEL ValueRef '[' JumpTable ']' { Value* tmpVal = getVal($2, $3); CHECK_FOR_ERROR BasicBlock* tmpBB = getBBVal($6); @@ -2842,7 +2841,7 @@ delete $8; CHECK_FOR_ERROR } - | SWITCH IntType ValueRef ',' LABEL ValueRef '[' ']' { + | SWITCH INTTYPE ValueRef ',' LABEL ValueRef '[' ']' { Value* tmpVal = getVal($2, $3); CHECK_FOR_ERROR BasicBlock* tmpBB = getBBVal($6); @@ -2966,7 +2965,7 @@ -JumpTable : JumpTable IntType ConstValueRef ',' LABEL ValueRef { +JumpTable : JumpTable INTTYPE ConstValueRef ',' LABEL ValueRef { $$ = $1; Constant *V = cast(getExistingVal($2, $3)); CHECK_FOR_ERROR @@ -2977,7 +2976,7 @@ CHECK_FOR_ERROR $$->push_back(std::make_pair(V, tmpBB)); } - | IntType ConstValueRef ',' LABEL ValueRef { + | INTTYPE ConstValueRef ',' LABEL ValueRef { $$ = new std::vector >(); Constant *V = cast(getExistingVal($1, $2)); CHECK_FOR_ERROR From sabre at nondot.org Wed Oct 15 01:16:45 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 06:16:45 -0000 Subject: [llvm-commits] [llvm] r57560 - in /llvm/trunk: lib/AsmParser/llvmAsmParser.y test/Assembler/2008-10-14-NamedTypeOnInteger.ll Message-ID: <200810150616.m9F6GjFj012311@zion.cs.uiuc.edu> Author: lattner Date: Wed Oct 15 01:16:45 2008 New Revision: 57560 URL: http://llvm.org/viewvc/llvm-project?rev=57560&view=rev Log: Fix the .ll grammar rules to allow any type before an 'i32', not just an integer type. Invalid things like 'float 42' are now rejected by the semantic analysis in the productions not the parser. This fixes PR2733. Added: llvm/trunk/test/Assembler/2008-10-14-NamedTypeOnInteger.ll Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=57560&r1=57559&r2=57560&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Wed Oct 15 01:16:45 2008 @@ -1071,7 +1071,7 @@ // Built in types... %type Types ResultTypes -%type FPType PrimType // Classifications +%type PrimType // Classifications %token VOID INTTYPE %token FLOAT DOUBLE X86_FP80 FP128 PPC_FP128 LABEL %token TYPE @@ -1165,10 +1165,6 @@ | FALSETOK { $$ = FCmpInst::FCMP_FALSE; } ; -// These are some types that allow classification if we only want a particular -// thing... for example, only a signed, unsigned, or integral type. -FPType : FLOAT | DOUBLE | PPC_FP128 | FP128 | X86_FP80; - LocalName : LOCALVAR | STRINGCONSTANT | PCTSTRINGCONSTANT ; OptLocalName : LocalName | /*empty*/ { $$ = 0; }; @@ -1882,61 +1878,82 @@ delete $1; CHECK_FOR_ERROR } - | INTTYPE ESINT64VAL { // integral constants - if (!ConstantInt::isValueValidForType($1, $2)) - GEN_ERROR("Constant value doesn't fit in type"); - $$ = ConstantInt::get($1, $2, true); + | Types ESINT64VAL { // integral constants + if (IntegerType *IT = dyn_cast($1->get())) { + if (!ConstantInt::isValueValidForType(IT, $2)) + GEN_ERROR("Constant value doesn't fit in type"); + $$ = ConstantInt::get(IT, $2, true); + } else { + GEN_ERROR("integer constant must have integer type"); + } + delete $1; CHECK_FOR_ERROR } - | INTTYPE ESAPINTVAL { // arbitrary precision integer constants - uint32_t BitWidth = cast($1)->getBitWidth(); - if ($2->getBitWidth() > BitWidth) { - GEN_ERROR("Constant value does not fit in type"); + | Types ESAPINTVAL { // arbitrary precision integer constants + if (IntegerType *IT = dyn_cast($1->get())) { + if ($2->getBitWidth() > IT->getBitWidth()) + GEN_ERROR("Constant value does not fit in type"); + $2->sextOrTrunc(IT->getBitWidth()); + $$ = ConstantInt::get(*$2); + } else { + GEN_ERROR("integer constant must have integer type"); } - $2->sextOrTrunc(BitWidth); - $$ = ConstantInt::get(*$2); + delete $1; delete $2; CHECK_FOR_ERROR } - | INTTYPE EUINT64VAL { // integral constants - if (!ConstantInt::isValueValidForType($1, $2)) - GEN_ERROR("Constant value doesn't fit in type"); - $$ = ConstantInt::get($1, $2, false); + | Types EUINT64VAL { // integral constants + if (IntegerType *IT = dyn_cast($1->get())) { + if (!ConstantInt::isValueValidForType(IT, $2)) + GEN_ERROR("Constant value doesn't fit in type"); + $$ = ConstantInt::get(IT, $2, false); + } else { + GEN_ERROR("integer constant must have integer type"); + } + delete $1; CHECK_FOR_ERROR } - | INTTYPE EUAPINTVAL { // arbitrary precision integer constants - uint32_t BitWidth = cast($1)->getBitWidth(); - if ($2->getBitWidth() > BitWidth) { - GEN_ERROR("Constant value does not fit in type"); + | Types EUAPINTVAL { // arbitrary precision integer constants + if (IntegerType *IT = dyn_cast($1->get())) { + if ($2->getBitWidth() > IT->getBitWidth()) + GEN_ERROR("Constant value does not fit in type"); + $2->zextOrTrunc(IT->getBitWidth()); + $$ = ConstantInt::get(*$2); + } else { + GEN_ERROR("integer constant must have integer type"); } - $2->zextOrTrunc(BitWidth); - $$ = ConstantInt::get(*$2); + delete $2; + delete $1; CHECK_FOR_ERROR } - | INTTYPE TRUETOK { // Boolean constants - if (cast($1)->getBitWidth() != 1) + | Types TRUETOK { // Boolean constants + if ($1->get() != Type::Int1Ty) GEN_ERROR("Constant true must have type i1"); $$ = ConstantInt::getTrue(); + delete $1; CHECK_FOR_ERROR } - | INTTYPE FALSETOK { // Boolean constants - if (cast($1)->getBitWidth() != 1) + | Types FALSETOK { // Boolean constants + if ($1->get() != Type::Int1Ty) GEN_ERROR("Constant false must have type i1"); $$ = ConstantInt::getFalse(); + delete $1; CHECK_FOR_ERROR } - | FPType FPVAL { // Floating point constants - if (!ConstantFP::isValueValidForType($1, *$2)) + | Types FPVAL { // Floating point constants + if (!ConstantFP::isValueValidForType($1->get(), *$2)) GEN_ERROR("Floating point constant invalid for type"); + // Lexer has no type info, so builds all float and double FP constants // as double. Fix this here. Long double is done right. - if (&$2->getSemantics()==&APFloat::IEEEdouble && $1==Type::FloatTy) { + if (&$2->getSemantics()==&APFloat::IEEEdouble && $1->get()==Type::FloatTy) { bool ignored; $2->convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven, &ignored); } $$ = ConstantFP::get(*$2); + delete $1; delete $2; CHECK_FOR_ERROR }; Added: llvm/trunk/test/Assembler/2008-10-14-NamedTypeOnInteger.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2008-10-14-NamedTypeOnInteger.ll?rev=57560&view=auto ============================================================================== --- llvm/trunk/test/Assembler/2008-10-14-NamedTypeOnInteger.ll (added) +++ llvm/trunk/test/Assembler/2008-10-14-NamedTypeOnInteger.ll Wed Oct 15 01:16:45 2008 @@ -0,0 +1,6 @@ +; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis +; PR2733 + +%t1 = type i32 +%t2 = type { %t1 } + at i1 = constant %t2 { %t1 15 } From sabre at nondot.org Wed Oct 15 01:16:57 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 06:16:57 -0000 Subject: [llvm-commits] [llvm] r57561 - in /llvm/trunk/lib/AsmParser: llvmAsmParser.cpp.cvs llvmAsmParser.y.cvs Message-ID: <200810150616.m9F6GwDo012328@zion.cs.uiuc.edu> Author: lattner Date: Wed Oct 15 01:16:57 2008 New Revision: 57561 URL: http://llvm.org/viewvc/llvm-project?rev=57561&view=rev Log: regenerate Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs?rev=57561&r1=57560&r2=57561&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs Wed Oct 15 01:16:57 2008 @@ -1655,16 +1655,16 @@ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 44 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 2334 +#define YYLAST 2377 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 173 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 88 +#define YYNNTS 87 /* YYNRULES -- Number of rules. */ -#define YYNRULES 353 +#define YYNRULES 348 /* YYNRULES -- Number of states. */ -#define YYNSTATES 715 +#define YYNSTATES 708 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -1731,42 +1731,41 @@ 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, - 119, 121, 123, 125, 127, 128, 133, 134, 137, 138, - 141, 143, 145, 147, 148, 151, 153, 155, 157, 159, - 161, 163, 165, 167, 169, 170, 172, 174, 176, 177, - 179, 181, 182, 184, 186, 188, 190, 191, 193, 195, - 196, 198, 200, 202, 204, 206, 209, 211, 213, 215, - 217, 219, 221, 223, 225, 227, 230, 231, 234, 236, - 238, 240, 241, 244, 246, 248, 250, 252, 254, 256, - 258, 260, 262, 264, 265, 268, 269, 272, 273, 276, - 277, 281, 284, 285, 287, 288, 292, 294, 297, 299, - 301, 303, 305, 307, 309, 311, 313, 315, 319, 321, - 324, 330, 336, 342, 348, 352, 355, 361, 366, 369, - 371, 373, 375, 379, 381, 385, 387, 388, 390, 394, - 399, 403, 407, 412, 417, 421, 428, 434, 437, 440, - 443, 446, 449, 452, 455, 458, 461, 464, 467, 470, - 477, 483, 492, 499, 506, 514, 522, 530, 538, 545, - 554, 563, 569, 577, 581, 583, 585, 587, 589, 590, - 593, 600, 602, 603, 605, 608, 609, 613, 614, 618, - 622, 626, 630, 631, 640, 641, 651, 652, 662, 668, - 671, 675, 677, 681, 685, 689, 693, 695, 696, 702, - 706, 708, 712, 714, 715, 727, 729, 731, 736, 738, - 740, 743, 747, 748, 750, 752, 754, 756, 758, 760, - 762, 764, 766, 768, 770, 774, 778, 781, 784, 788, - 791, 797, 802, 804, 810, 812, 814, 816, 818, 820, - 822, 825, 827, 831, 834, 837, 841, 845, 848, 849, - 851, 854, 857, 861, 871, 881, 890, 906, 908, 910, - 917, 923, 926, 929, 936, 944, 949, 954, 961, 968, - 969, 970, 974, 977, 981, 984, 986, 992, 998, 1005, - 1012, 1019, 1026, 1031, 1038, 1043, 1048, 1055, 1062, 1065, - 1075, 1077, 1079, 1080, 1084, 1091, 1095, 1102, 1105, 1111, - 1119, 1125, 1130, 1135 + 118, 123, 124, 127, 128, 131, 133, 135, 137, 138, + 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, + 160, 162, 164, 166, 167, 169, 171, 172, 174, 176, + 178, 180, 181, 183, 185, 186, 188, 190, 192, 194, + 196, 199, 201, 203, 205, 207, 209, 211, 213, 215, + 217, 220, 221, 224, 226, 228, 230, 231, 234, 236, + 238, 240, 242, 244, 246, 248, 250, 252, 254, 255, + 258, 259, 262, 263, 266, 267, 271, 274, 275, 277, + 278, 282, 284, 287, 289, 291, 293, 295, 297, 299, + 301, 303, 305, 309, 311, 314, 320, 326, 332, 338, + 342, 345, 351, 356, 359, 361, 363, 365, 369, 371, + 375, 377, 378, 380, 384, 389, 393, 397, 402, 407, + 411, 418, 424, 427, 430, 433, 436, 439, 442, 445, + 448, 451, 454, 457, 460, 467, 473, 482, 489, 496, + 504, 512, 520, 528, 535, 544, 553, 559, 567, 571, + 573, 575, 577, 579, 580, 583, 590, 592, 593, 595, + 598, 599, 603, 604, 608, 612, 616, 620, 621, 630, + 631, 641, 642, 652, 658, 661, 665, 667, 671, 675, + 679, 683, 685, 686, 692, 696, 698, 702, 704, 705, + 717, 719, 721, 726, 728, 730, 733, 737, 738, 740, + 742, 744, 746, 748, 750, 752, 754, 756, 758, 760, + 764, 768, 771, 774, 778, 781, 787, 792, 794, 800, + 802, 804, 806, 808, 810, 812, 815, 817, 821, 824, + 827, 831, 835, 838, 839, 841, 844, 847, 851, 861, + 871, 880, 896, 898, 900, 907, 913, 916, 919, 926, + 934, 939, 944, 951, 958, 959, 960, 964, 967, 971, + 974, 976, 982, 988, 995, 1002, 1009, 1016, 1021, 1028, + 1033, 1038, 1045, 1052, 1055, 1065, 1067, 1069, 1070, 1074, + 1081, 1085, 1092, 1095, 1101, 1109, 1115, 1120, 1125 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 221, 0, -1, 75, -1, 76, -1, 77, -1, 78, + 220, 0, -1, 75, -1, 76, -1, 77, -1, 78, -1, 79, -1, 80, -1, 81, -1, 82, -1, 83, -1, 87, -1, 88, -1, 89, -1, 84, -1, 85, -1, 86, -1, 120, -1, 121, -1, 122, -1, 123, @@ -1776,11 +1775,10 @@ -1, 101, -1, 102, -1, 103, -1, 104, -1, 105, -1, 106, -1, 107, -1, 108, -1, 109, -1, 110, -1, 111, -1, 112, -1, 113, -1, 100, -1, 101, - -1, 102, -1, 103, -1, 26, -1, 27, -1, 12, - -1, 13, -1, 16, -1, 15, -1, 14, -1, 19, - -1, 22, -1, 24, -1, 180, -1, -1, 55, 159, - 4, 160, -1, -1, 180, 161, -1, -1, 7, 161, - -1, 20, -1, 23, -1, 187, -1, -1, 185, 161, + -1, 102, -1, 103, -1, 26, -1, 27, -1, 19, + -1, 22, -1, 24, -1, 179, -1, -1, 55, 159, + 4, 160, -1, -1, 179, 161, -1, -1, 7, 161, + -1, 20, -1, 23, -1, 186, -1, -1, 184, 161, -1, 42, -1, 44, -1, 43, -1, 45, -1, 47, -1, 49, -1, 46, -1, 48, -1, 51, -1, -1, 156, -1, 157, -1, 158, -1, -1, 46, -1, 48, @@ -1789,98 +1787,98 @@ 65, -1, 66, -1, 67, -1, 62, 4, -1, 142, -1, 121, -1, 141, -1, 122, -1, 144, -1, 145, -1, 147, -1, 148, -1, 149, -1, 54, 4, -1, - -1, 196, 195, -1, 144, -1, 142, -1, 141, -1, - -1, 198, 197, -1, 143, -1, 146, -1, 144, -1, + -1, 195, 194, -1, 144, -1, 142, -1, 141, -1, + -1, 197, 196, -1, 143, -1, 146, -1, 144, -1, 142, -1, 141, -1, 150, -1, 151, -1, 154, -1, - 155, -1, 153, -1, -1, 200, 199, -1, -1, 152, + 155, -1, 153, -1, -1, 199, 198, -1, -1, 152, 22, -1, -1, 54, 4, -1, -1, 162, 54, 4, - -1, 34, 22, -1, -1, 204, -1, -1, 162, 207, - 206, -1, 204, -1, 54, 4, -1, 11, -1, 12, + -1, 34, 22, -1, -1, 203, -1, -1, 162, 206, + 205, -1, 203, -1, 54, 4, -1, 11, -1, 12, -1, 13, -1, 16, -1, 15, -1, 14, -1, 17, - -1, 50, -1, 208, -1, 209, 182, 163, -1, 243, - -1, 164, 4, -1, 209, 159, 213, 160, 200, -1, - 10, 159, 213, 160, 200, -1, 165, 4, 166, 209, - 167, -1, 168, 4, 166, 209, 169, -1, 170, 214, - 171, -1, 170, 171, -1, 168, 170, 214, 171, 169, - -1, 168, 170, 171, 169, -1, 209, 196, -1, 209, - -1, 10, -1, 210, -1, 212, 162, 210, -1, 212, - -1, 212, 162, 39, -1, 39, -1, -1, 209, -1, - 214, 162, 209, -1, 209, 165, 217, 167, -1, 209, - 165, 167, -1, 209, 172, 22, -1, 209, 168, 217, - 169, -1, 209, 170, 217, 171, -1, 209, 170, 171, - -1, 209, 168, 170, 217, 171, 169, -1, 209, 168, - 170, 171, 169, -1, 209, 40, -1, 209, 41, -1, - 209, 243, -1, 209, 216, -1, 209, 25, -1, 11, - 3, -1, 11, 5, -1, 11, 4, -1, 11, 6, - -1, 11, 26, -1, 11, 27, -1, 179, 9, -1, - 176, 159, 215, 38, 209, 160, -1, 119, 159, 215, - 255, 160, -1, 133, 159, 215, 162, 215, 162, 215, - 160, -1, 174, 159, 215, 162, 215, 160, -1, 175, - 159, 215, 162, 215, 160, -1, 90, 177, 159, 215, - 162, 215, 160, -1, 91, 178, 159, 215, 162, 215, - 160, -1, 92, 177, 159, 215, 162, 215, 160, -1, - 93, 178, 159, 215, 162, 215, 160, -1, 135, 159, - 215, 162, 215, 160, -1, 136, 159, 215, 162, 215, - 162, 215, 160, -1, 137, 159, 215, 162, 215, 162, - 215, 160, -1, 139, 159, 215, 256, 160, -1, 140, - 159, 215, 162, 215, 256, 160, -1, 217, 162, 215, - -1, 215, -1, 32, -1, 33, -1, 37, -1, -1, - 211, 243, -1, 125, 159, 220, 38, 209, 160, -1, - 222, -1, -1, 223, -1, 222, 223, -1, -1, 31, - 224, 239, -1, -1, 30, 225, 240, -1, 60, 59, - 229, -1, 183, 18, 209, -1, 183, 18, 10, -1, - -1, 186, 190, 219, 218, 215, 182, 226, 206, -1, - -1, 186, 188, 190, 219, 218, 215, 182, 227, 206, - -1, -1, 186, 189, 190, 219, 218, 209, 182, 228, - 206, -1, 186, 190, 35, 193, 220, -1, 52, 230, - -1, 56, 161, 231, -1, 22, -1, 53, 161, 22, - -1, 68, 161, 22, -1, 165, 232, 167, -1, 232, - 162, 22, -1, 22, -1, -1, 233, 162, 209, 196, - 181, -1, 209, 196, 181, -1, 233, -1, 233, 162, - 39, -1, 39, -1, -1, 194, 198, 211, 185, 159, - 234, 160, 200, 205, 202, 201, -1, 28, -1, 170, - -1, 192, 190, 235, 236, -1, 29, -1, 171, -1, - 247, 238, -1, 191, 190, 235, -1, -1, 61, -1, + -1, 50, -1, 207, -1, 208, 181, 163, -1, 242, + -1, 164, 4, -1, 208, 159, 212, 160, 199, -1, + 10, 159, 212, 160, 199, -1, 165, 4, 166, 208, + 167, -1, 168, 4, 166, 208, 169, -1, 170, 213, + 171, -1, 170, 171, -1, 168, 170, 213, 171, 169, + -1, 168, 170, 171, 169, -1, 208, 195, -1, 208, + -1, 10, -1, 209, -1, 211, 162, 209, -1, 211, + -1, 211, 162, 39, -1, 39, -1, -1, 208, -1, + 213, 162, 208, -1, 208, 165, 216, 167, -1, 208, + 165, 167, -1, 208, 172, 22, -1, 208, 168, 216, + 169, -1, 208, 170, 216, 171, -1, 208, 170, 171, + -1, 208, 168, 170, 216, 171, 169, -1, 208, 168, + 170, 171, 169, -1, 208, 40, -1, 208, 41, -1, + 208, 242, -1, 208, 215, -1, 208, 25, -1, 208, + 3, -1, 208, 5, -1, 208, 4, -1, 208, 6, + -1, 208, 26, -1, 208, 27, -1, 208, 9, -1, + 176, 159, 214, 38, 208, 160, -1, 119, 159, 214, + 254, 160, -1, 133, 159, 214, 162, 214, 162, 214, + 160, -1, 174, 159, 214, 162, 214, 160, -1, 175, + 159, 214, 162, 214, 160, -1, 90, 177, 159, 214, + 162, 214, 160, -1, 91, 178, 159, 214, 162, 214, + 160, -1, 92, 177, 159, 214, 162, 214, 160, -1, + 93, 178, 159, 214, 162, 214, 160, -1, 135, 159, + 214, 162, 214, 160, -1, 136, 159, 214, 162, 214, + 162, 214, 160, -1, 137, 159, 214, 162, 214, 162, + 214, 160, -1, 139, 159, 214, 255, 160, -1, 140, + 159, 214, 162, 214, 255, 160, -1, 216, 162, 214, + -1, 214, -1, 32, -1, 33, -1, 37, -1, -1, + 210, 242, -1, 125, 159, 219, 38, 208, 160, -1, + 221, -1, -1, 222, -1, 221, 222, -1, -1, 31, + 223, 238, -1, -1, 30, 224, 239, -1, 60, 59, + 228, -1, 182, 18, 208, -1, 182, 18, 10, -1, + -1, 185, 189, 218, 217, 214, 181, 225, 205, -1, + -1, 185, 187, 189, 218, 217, 214, 181, 226, 205, + -1, -1, 185, 188, 189, 218, 217, 208, 181, 227, + 205, -1, 185, 189, 35, 192, 219, -1, 52, 229, + -1, 56, 161, 230, -1, 22, -1, 53, 161, 22, + -1, 68, 161, 22, -1, 165, 231, 167, -1, 231, + 162, 22, -1, 22, -1, -1, 232, 162, 208, 195, + 180, -1, 208, 195, 180, -1, 232, -1, 232, 162, + 39, -1, 39, -1, -1, 193, 197, 210, 184, 159, + 233, 160, 199, 204, 201, 200, -1, 28, -1, 170, + -1, 191, 189, 234, 235, -1, 29, -1, 171, -1, + 246, 237, -1, 190, 189, 234, -1, -1, 61, -1, 3, -1, 4, -1, 5, -1, 6, -1, 9, -1, 26, -1, 27, -1, 40, -1, 41, -1, 25, -1, - 168, 217, 169, -1, 165, 217, 167, -1, 165, 167, - -1, 172, 22, -1, 170, 217, 171, -1, 170, 171, - -1, 168, 170, 217, 171, 169, -1, 168, 170, 171, - 169, -1, 216, -1, 59, 241, 22, 162, 22, -1, - 7, -1, 8, -1, 180, -1, 185, -1, 243, -1, - 242, -1, 209, 244, -1, 245, -1, 246, 162, 245, - -1, 247, 248, -1, 237, 248, -1, 249, 183, 250, - -1, 249, 184, 250, -1, 249, 252, -1, -1, 21, - -1, 69, 246, -1, 69, 10, -1, 70, 17, 244, - -1, 70, 11, 244, 162, 17, 244, 162, 17, 244, - -1, 71, 11, 244, 162, 17, 244, 165, 251, 167, - -1, 71, 11, 244, 162, 17, 244, 165, 167, -1, - 72, 194, 198, 211, 244, 159, 254, 160, 200, 38, - 17, 244, 73, 17, 244, -1, 73, -1, 74, -1, - 251, 11, 242, 162, 17, 244, -1, 11, 242, 162, - 17, 244, -1, 183, 258, -1, 184, 258, -1, 209, - 165, 244, 162, 244, 167, -1, 253, 162, 165, 244, - 162, 244, 167, -1, 209, 196, 244, 196, -1, 17, - 196, 244, 196, -1, 254, 162, 209, 196, 244, 196, - -1, 254, 162, 17, 196, 244, 196, -1, -1, -1, - 255, 162, 245, -1, 162, 4, -1, 256, 162, 4, - -1, 58, 57, -1, 57, -1, 174, 209, 244, 162, - 244, -1, 175, 209, 244, 162, 244, -1, 90, 177, - 209, 244, 162, 244, -1, 91, 178, 209, 244, 162, - 244, -1, 92, 177, 209, 244, 162, 244, -1, 93, - 178, 209, 244, 162, 244, -1, 176, 245, 38, 209, - -1, 133, 245, 162, 245, 162, 245, -1, 134, 245, - 162, 209, -1, 135, 245, 162, 245, -1, 136, 245, - 162, 245, 162, 245, -1, 137, 245, 162, 245, 162, - 245, -1, 132, 253, -1, 257, 194, 198, 211, 244, - 159, 254, 160, 200, -1, 260, -1, 36, -1, -1, - 114, 209, 203, -1, 114, 209, 162, 11, 244, 203, - -1, 115, 209, 203, -1, 115, 209, 162, 11, 244, - 203, -1, 116, 245, -1, 259, 117, 209, 244, 203, - -1, 259, 118, 245, 162, 209, 244, 203, -1, 138, - 209, 244, 162, 4, -1, 119, 209, 244, 255, -1, - 139, 209, 244, 256, -1, 140, 209, 244, 162, 209, - 244, 256, -1 + 168, 216, 169, -1, 165, 216, 167, -1, 165, 167, + -1, 172, 22, -1, 170, 216, 171, -1, 170, 171, + -1, 168, 170, 216, 171, 169, -1, 168, 170, 171, + 169, -1, 215, -1, 59, 240, 22, 162, 22, -1, + 7, -1, 8, -1, 179, -1, 184, -1, 242, -1, + 241, -1, 208, 243, -1, 244, -1, 245, 162, 244, + -1, 246, 247, -1, 236, 247, -1, 248, 182, 249, + -1, 248, 183, 249, -1, 248, 251, -1, -1, 21, + -1, 69, 245, -1, 69, 10, -1, 70, 17, 243, + -1, 70, 11, 243, 162, 17, 243, 162, 17, 243, + -1, 71, 11, 243, 162, 17, 243, 165, 250, 167, + -1, 71, 11, 243, 162, 17, 243, 165, 167, -1, + 72, 193, 197, 210, 243, 159, 253, 160, 199, 38, + 17, 243, 73, 17, 243, -1, 73, -1, 74, -1, + 250, 11, 241, 162, 17, 243, -1, 11, 241, 162, + 17, 243, -1, 182, 257, -1, 183, 257, -1, 208, + 165, 243, 162, 243, 167, -1, 252, 162, 165, 243, + 162, 243, 167, -1, 208, 195, 243, 195, -1, 17, + 195, 243, 195, -1, 253, 162, 208, 195, 243, 195, + -1, 253, 162, 17, 195, 243, 195, -1, -1, -1, + 254, 162, 244, -1, 162, 4, -1, 255, 162, 4, + -1, 58, 57, -1, 57, -1, 174, 208, 243, 162, + 243, -1, 175, 208, 243, 162, 243, -1, 90, 177, + 208, 243, 162, 243, -1, 91, 178, 208, 243, 162, + 243, -1, 92, 177, 208, 243, 162, 243, -1, 93, + 178, 208, 243, 162, 243, -1, 176, 244, 38, 208, + -1, 133, 244, 162, 244, 162, 244, -1, 134, 244, + 162, 208, -1, 135, 244, 162, 244, -1, 136, 244, + 162, 244, 162, 244, -1, 137, 244, 162, 244, 162, + 244, -1, 132, 252, -1, 256, 193, 197, 210, 243, + 159, 253, 160, 199, -1, 259, -1, 36, -1, -1, + 114, 208, 202, -1, 114, 208, 162, 11, 243, 202, + -1, 115, 208, 202, -1, 115, 208, 162, 11, 243, + 202, -1, 116, 244, -1, 258, 117, 208, 243, 202, + -1, 258, 118, 244, 162, 208, 243, 202, -1, 138, + 208, 243, 162, 4, -1, 119, 208, 243, 254, -1, + 139, 208, 243, 255, -1, 140, 208, 243, 162, 208, + 243, 255, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -1891,37 +1889,36 @@ 1145, 1145, 1145, 1146, 1146, 1146, 1146, 1146, 1146, 1149, 1149, 1150, 1150, 1151, 1151, 1152, 1152, 1153, 1153, 1157, 1157, 1158, 1158, 1159, 1159, 1160, 1160, 1161, 1161, 1162, - 1162, 1163, 1163, 1164, 1165, 1170, 1170, 1170, 1170, 1170, - 1172, 1172, 1172, 1173, 1173, 1175, 1176, 1180, 1184, 1189, - 1195, 1195, 1197, 1198, 1203, 1209, 1210, 1211, 1212, 1213, - 1214, 1218, 1219, 1220, 1224, 1225, 1226, 1227, 1231, 1232, - 1233, 1237, 1238, 1239, 1240, 1241, 1245, 1246, 1247, 1250, - 1251, 1252, 1253, 1254, 1255, 1256, 1263, 1264, 1265, 1266, - 1267, 1268, 1269, 1270, 1271, 1272, 1276, 1277, 1282, 1283, - 1284, 1287, 1288, 1294, 1295, 1296, 1297, 1298, 1299, 1300, - 1301, 1302, 1303, 1306, 1307, 1313, 1314, 1321, 1322, 1328, - 1329, 1338, 1346, 1347, 1352, 1353, 1354, 1359, 1372, 1372, - 1372, 1372, 1372, 1372, 1372, 1375, 1379, 1383, 1390, 1395, - 1403, 1438, 1469, 1474, 1484, 1494, 1498, 1508, 1515, 1524, - 1531, 1536, 1541, 1548, 1549, 1556, 1563, 1571, 1577, 1589, - 1617, 1633, 1660, 1688, 1714, 1734, 1760, 1780, 1792, 1799, - 1865, 1875, 1885, 1891, 1901, 1907, 1917, 1923, 1929, 1945, - 1957, 1978, 1986, 1992, 2003, 2008, 2013, 2018, 2023, 2029, - 2035, 2041, 2049, 2060, 2064, 2072, 2072, 2075, 2075, 2078, - 2090, 2111, 2116, 2124, 2125, 2129, 2129, 2133, 2133, 2136, - 2139, 2163, 2175, 2174, 2186, 2185, 2195, 2194, 2205, 2245, - 2248, 2254, 2264, 2268, 2273, 2275, 2280, 2285, 2294, 2304, - 2315, 2319, 2328, 2337, 2342, 2491, 2491, 2493, 2502, 2502, - 2504, 2509, 2521, 2525, 2530, 2534, 2538, 2543, 2548, 2552, - 2556, 2560, 2564, 2568, 2572, 2594, 2616, 2622, 2635, 2647, - 2652, 2664, 2670, 2674, 2684, 2688, 2692, 2697, 2704, 2704, - 2710, 2719, 2724, 2729, 2733, 2742, 2751, 2764, 2773, 2777, - 2785, 2805, 2809, 2814, 2825, 2844, 2853, 2957, 2961, 2968, - 2979, 2992, 3001, 3014, 3025, 3035, 3046, 3054, 3064, 3071, - 3074, 3075, 3083, 3089, 3098, 3102, 3107, 3123, 3140, 3152, - 3164, 3178, 3192, 3204, 3225, 3232, 3238, 3244, 3250, 3265, - 3375, 3380, 3384, 3391, 3398, 3408, 3415, 3425, 3433, 3447, - 3464, 3478, 3493, 3508 + 1162, 1163, 1163, 1164, 1165, 1168, 1168, 1168, 1169, 1169, + 1171, 1172, 1176, 1180, 1185, 1191, 1191, 1193, 1194, 1199, + 1205, 1206, 1207, 1208, 1209, 1210, 1214, 1215, 1216, 1220, + 1221, 1222, 1223, 1227, 1228, 1229, 1233, 1234, 1235, 1236, + 1237, 1241, 1242, 1243, 1246, 1247, 1248, 1249, 1250, 1251, + 1252, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, + 1268, 1272, 1273, 1278, 1279, 1280, 1283, 1284, 1290, 1291, + 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1302, 1303, + 1309, 1310, 1317, 1318, 1324, 1325, 1334, 1342, 1343, 1348, + 1349, 1350, 1355, 1368, 1368, 1368, 1368, 1368, 1368, 1368, + 1371, 1375, 1379, 1386, 1391, 1399, 1434, 1465, 1470, 1480, + 1490, 1494, 1504, 1511, 1520, 1527, 1532, 1537, 1544, 1545, + 1552, 1559, 1567, 1573, 1585, 1613, 1629, 1656, 1684, 1710, + 1730, 1756, 1776, 1788, 1795, 1861, 1871, 1881, 1892, 1905, + 1916, 1930, 1937, 1944, 1962, 1974, 1995, 2003, 2009, 2020, + 2025, 2030, 2035, 2040, 2046, 2052, 2058, 2066, 2077, 2081, + 2089, 2089, 2092, 2092, 2095, 2107, 2128, 2133, 2141, 2142, + 2146, 2146, 2150, 2150, 2153, 2156, 2180, 2192, 2191, 2203, + 2202, 2212, 2211, 2222, 2262, 2265, 2271, 2281, 2285, 2290, + 2292, 2297, 2302, 2311, 2321, 2332, 2336, 2345, 2354, 2359, + 2508, 2508, 2510, 2519, 2519, 2521, 2526, 2538, 2542, 2547, + 2551, 2555, 2560, 2565, 2569, 2573, 2577, 2581, 2585, 2589, + 2611, 2633, 2639, 2652, 2664, 2669, 2681, 2687, 2691, 2701, + 2705, 2709, 2714, 2721, 2721, 2727, 2736, 2741, 2746, 2750, + 2759, 2768, 2781, 2790, 2794, 2802, 2822, 2826, 2831, 2842, + 2861, 2870, 2974, 2978, 2985, 2996, 3009, 3018, 3031, 3042, + 3052, 3063, 3071, 3081, 3088, 3091, 3092, 3100, 3106, 3115, + 3119, 3124, 3140, 3157, 3169, 3181, 3195, 3209, 3221, 3242, + 3249, 3255, 3261, 3267, 3282, 3392, 3397, 3401, 3408, 3415, + 3425, 3432, 3442, 3450, 3464, 3481, 3495, 3510, 3525 }; #endif @@ -1957,7 +1954,7 @@ "DEFAULT", "HIDDEN", "PROTECTED", "'('", "')'", "'='", "','", "'*'", "'\\\\'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'", "'c'", "$accept", "ArithmeticOps", "LogicalOps", "CastOps", "IPredicates", - "FPredicates", "FPType", "LocalName", "OptLocalName", "OptAddrSpace", + "FPredicates", "LocalName", "OptLocalName", "OptAddrSpace", "OptLocalAssign", "LocalNumber", "GlobalName", "OptGlobalAssign", "GlobalAssign", "GVInternalLinkage", "GVExternalLinkage", "GVVisibilityStyle", "FunctionDeclareLinkage", "FunctionDefineLinkage", @@ -2013,37 +2010,36 @@ 176, 176, 176, 176, 176, 176, 176, 176, 176, 177, 177, 177, 177, 177, 177, 177, 177, 177, 177, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 179, 179, 179, 179, 179, - 180, 180, 180, 181, 181, 182, 182, 183, 183, 184, - 185, 185, 186, 186, 187, 188, 188, 188, 188, 188, - 188, 189, 189, 189, 190, 190, 190, 190, 191, 191, - 191, 192, 192, 192, 192, 192, 193, 193, 193, 194, - 194, 194, 194, 194, 194, 194, 195, 195, 195, 195, - 195, 195, 195, 195, 195, 195, 196, 196, 197, 197, - 197, 198, 198, 199, 199, 199, 199, 199, 199, 199, - 199, 199, 199, 200, 200, 201, 201, 202, 202, 203, - 203, 204, 205, 205, 206, 206, 207, 207, 208, 208, - 208, 208, 208, 208, 208, 209, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 210, 211, - 211, 212, 212, 213, 213, 213, 213, 214, 214, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 215, 216, - 216, 216, 216, 216, 216, 216, 216, 216, 216, 216, - 216, 216, 216, 217, 217, 218, 218, 219, 219, 220, - 220, 221, 221, 222, 222, 224, 223, 225, 223, 223, - 223, 223, 226, 223, 227, 223, 228, 223, 223, 223, - 223, 229, 230, 230, 231, 232, 232, 232, 233, 233, - 234, 234, 234, 234, 235, 236, 236, 237, 238, 238, - 239, 240, 241, 241, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, - 242, 242, 242, 242, 243, 243, 243, 243, 244, 244, - 245, 246, 246, 247, 247, 248, 248, 249, 249, 249, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 251, - 251, 252, 252, 253, 253, 254, 254, 254, 254, 254, - 255, 255, 256, 256, 257, 257, 258, 258, 258, 258, - 258, 258, 258, 258, 258, 258, 258, 258, 258, 258, - 258, 259, 259, 260, 260, 260, 260, 260, 260, 260, - 260, 260, 260, 260 + 178, 178, 178, 178, 178, 179, 179, 179, 180, 180, + 181, 181, 182, 182, 183, 184, 184, 185, 185, 186, + 187, 187, 187, 187, 187, 187, 188, 188, 188, 189, + 189, 189, 189, 190, 190, 190, 191, 191, 191, 191, + 191, 192, 192, 192, 193, 193, 193, 193, 193, 193, + 193, 194, 194, 194, 194, 194, 194, 194, 194, 194, + 194, 195, 195, 196, 196, 196, 197, 197, 198, 198, + 198, 198, 198, 198, 198, 198, 198, 198, 199, 199, + 200, 200, 201, 201, 202, 202, 203, 204, 204, 205, + 205, 206, 206, 207, 207, 207, 207, 207, 207, 207, + 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, + 208, 208, 208, 209, 210, 210, 211, 211, 212, 212, + 212, 212, 213, 213, 214, 214, 214, 214, 214, 214, + 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, + 214, 214, 214, 214, 215, 215, 215, 215, 215, 215, + 215, 215, 215, 215, 215, 215, 215, 215, 216, 216, + 217, 217, 218, 218, 219, 219, 220, 220, 221, 221, + 223, 222, 224, 222, 222, 222, 222, 225, 222, 226, + 222, 227, 222, 222, 222, 222, 228, 229, 229, 230, + 231, 231, 231, 232, 232, 233, 233, 233, 233, 234, + 235, 235, 236, 237, 237, 238, 239, 240, 240, 241, + 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, + 241, 241, 241, 241, 241, 241, 241, 241, 241, 242, + 242, 242, 242, 243, 243, 244, 245, 245, 246, 246, + 247, 247, 248, 248, 248, 249, 249, 249, 249, 249, + 249, 249, 249, 249, 250, 250, 251, 251, 252, 252, + 253, 253, 253, 253, 253, 254, 254, 255, 255, 256, + 256, 257, 257, 257, 257, 257, 257, 257, 257, 257, + 257, 257, 257, 257, 257, 257, 258, 258, 259, 259, + 259, 259, 259, 259, 259, 259, 259, 259, 259 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -2054,37 +2050,36 @@ 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, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 4, 0, 2, 0, 2, - 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, - 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, - 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 2, 0, 2, 1, 1, - 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 0, 2, 0, 2, 0, 2, 0, - 3, 2, 0, 1, 0, 3, 1, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, - 5, 5, 5, 5, 3, 2, 5, 4, 2, 1, - 1, 1, 3, 1, 3, 1, 0, 1, 3, 4, - 3, 3, 4, 4, 3, 6, 5, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, - 5, 8, 6, 6, 7, 7, 7, 7, 6, 8, - 8, 5, 7, 3, 1, 1, 1, 1, 0, 2, - 6, 1, 0, 1, 2, 0, 3, 0, 3, 3, - 3, 3, 0, 8, 0, 9, 0, 9, 5, 2, - 3, 1, 3, 3, 3, 3, 1, 0, 5, 3, - 1, 3, 1, 0, 11, 1, 1, 4, 1, 1, - 2, 3, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 3, 2, 2, 3, 2, - 5, 4, 1, 5, 1, 1, 1, 1, 1, 1, - 2, 1, 3, 2, 2, 3, 3, 2, 0, 1, - 2, 2, 3, 9, 9, 8, 15, 1, 1, 6, - 5, 2, 2, 6, 7, 4, 4, 6, 6, 0, - 0, 3, 2, 3, 2, 1, 5, 5, 6, 6, - 6, 6, 4, 6, 4, 4, 6, 6, 2, 9, - 1, 1, 0, 3, 6, 3, 6, 2, 5, 7, - 5, 4, 4, 7 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 4, 0, 2, 0, 2, 1, 1, 1, 0, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, + 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, + 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, + 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 0, 2, 1, 1, 1, 0, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, + 0, 2, 0, 2, 0, 3, 2, 0, 1, 0, + 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 1, 2, 5, 5, 5, 5, 3, + 2, 5, 4, 2, 1, 1, 1, 3, 1, 3, + 1, 0, 1, 3, 4, 3, 3, 4, 4, 3, + 6, 5, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 6, 5, 8, 6, 6, 7, + 7, 7, 7, 6, 8, 8, 5, 7, 3, 1, + 1, 1, 1, 0, 2, 6, 1, 0, 1, 2, + 0, 3, 0, 3, 3, 3, 3, 0, 8, 0, + 9, 0, 9, 5, 2, 3, 1, 3, 3, 3, + 3, 1, 0, 5, 3, 1, 3, 1, 0, 11, + 1, 1, 4, 1, 1, 2, 3, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 3, 2, 2, 3, 2, 5, 4, 1, 5, 1, + 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, + 3, 3, 2, 0, 1, 2, 2, 3, 9, 9, + 8, 15, 1, 1, 6, 5, 2, 2, 6, 7, + 4, 4, 6, 6, 0, 0, 3, 2, 3, 2, + 1, 5, 5, 6, 6, 6, 6, 4, 6, 4, + 4, 6, 6, 2, 9, 1, 1, 0, 3, 6, + 3, 6, 2, 5, 7, 5, 4, 4, 7 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -2092,666 +2087,672 @@ means the default is an error. */ static const yytype_uint16 yydefact[] = { - 73, 60, 70, 61, 71, 62, 227, 225, 0, 0, - 0, 0, 0, 0, 84, 72, 0, 73, 223, 88, - 91, 0, 0, 239, 0, 0, 67, 0, 74, 75, - 77, 76, 78, 81, 79, 82, 80, 83, 85, 86, - 87, 84, 84, 218, 1, 224, 89, 90, 84, 228, - 92, 93, 94, 95, 84, 298, 226, 298, 0, 0, - 247, 240, 241, 229, 284, 285, 231, 148, 149, 150, - 153, 152, 151, 154, 155, 0, 0, 0, 0, 286, - 287, 156, 230, 158, 218, 218, 96, 217, 0, 99, - 99, 299, 294, 68, 258, 259, 260, 293, 242, 243, - 246, 0, 176, 159, 0, 0, 0, 0, 165, 177, - 0, 0, 176, 0, 0, 0, 98, 97, 0, 215, - 216, 0, 0, 100, 101, 102, 103, 104, 121, 261, - 0, 0, 342, 342, 297, 0, 244, 175, 116, 171, - 173, 0, 0, 0, 0, 0, 0, 164, 0, 0, - 157, 0, 0, 170, 0, 169, 0, 238, 148, 149, - 150, 153, 152, 151, 0, 66, 66, 105, 0, 255, - 256, 257, 69, 341, 325, 0, 0, 0, 0, 99, - 307, 308, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 14, 15, 16, 11, 12, 13, 0, 0, 0, - 0, 0, 0, 0, 0, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 295, - 99, 311, 0, 340, 296, 312, 245, 168, 0, 133, - 66, 66, 167, 0, 178, 0, 133, 66, 66, 0, - 219, 192, 194, 193, 195, 196, 197, 198, 191, 187, - 188, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 190, - 189, 232, 120, 119, 118, 122, 0, 324, 301, 66, - 291, 300, 0, 0, 0, 121, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 0, 53, 54, 49, - 50, 51, 52, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 0, 0, 0, 139, 139, 347, 66, - 66, 338, 0, 0, 0, 0, 0, 66, 66, 66, - 66, 66, 0, 121, 0, 0, 0, 107, 109, 108, - 106, 110, 111, 112, 113, 114, 117, 174, 172, 161, - 162, 163, 166, 65, 160, 234, 236, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, - 214, 0, 0, 0, 184, 0, 181, 0, 0, 0, - 144, 0, 264, 265, 266, 267, 268, 273, 269, 270, - 271, 272, 262, 0, 0, 0, 0, 282, 289, 288, - 290, 0, 0, 302, 0, 0, 66, 66, 66, 66, - 0, 343, 0, 345, 320, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, - 0, 115, 127, 126, 123, 125, 124, 128, 129, 132, - 130, 131, 134, 144, 144, 0, 0, 0, 0, 0, - 320, 0, 0, 0, 0, 0, 0, 0, 179, 165, - 177, 0, 182, 183, 0, 0, 0, 0, 233, 253, - 263, 0, 276, 0, 0, 0, 279, 0, 277, 292, + 68, 55, 65, 56, 66, 57, 222, 220, 0, 0, + 0, 0, 0, 0, 79, 67, 0, 68, 218, 83, + 86, 0, 0, 234, 0, 0, 62, 0, 69, 70, + 72, 71, 73, 76, 74, 77, 75, 78, 80, 81, + 82, 79, 79, 213, 1, 219, 84, 85, 79, 223, + 87, 88, 89, 90, 79, 293, 221, 293, 0, 0, + 242, 235, 236, 224, 279, 280, 226, 143, 144, 145, + 148, 147, 146, 149, 150, 0, 0, 0, 0, 281, + 282, 151, 225, 153, 213, 213, 91, 212, 0, 94, + 94, 294, 289, 63, 253, 254, 255, 288, 237, 238, + 241, 0, 171, 154, 0, 0, 0, 0, 160, 172, + 0, 0, 171, 0, 0, 0, 93, 92, 0, 210, + 211, 0, 0, 95, 96, 97, 98, 99, 116, 256, + 0, 0, 337, 337, 292, 0, 239, 170, 111, 166, + 168, 0, 0, 0, 0, 0, 0, 159, 0, 0, + 152, 0, 0, 165, 0, 164, 0, 233, 61, 61, + 100, 0, 250, 251, 252, 64, 336, 320, 0, 0, + 0, 0, 94, 302, 303, 2, 3, 4, 5, 6, + 7, 8, 9, 10, 14, 15, 16, 11, 12, 13, + 0, 0, 0, 0, 0, 0, 0, 0, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 290, 94, 306, 0, 335, 291, 307, 240, + 163, 0, 128, 61, 61, 162, 0, 173, 0, 128, + 61, 61, 0, 214, 187, 189, 188, 190, 193, 186, + 191, 192, 182, 183, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 185, 184, 227, 115, 114, 113, 117, 0, + 319, 296, 61, 286, 295, 0, 0, 0, 116, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 0, + 53, 54, 49, 50, 51, 52, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 0, 0, 0, 134, + 134, 342, 61, 61, 333, 0, 0, 0, 0, 0, + 61, 61, 61, 61, 61, 0, 116, 0, 0, 0, + 102, 104, 103, 101, 105, 106, 107, 108, 109, 112, + 169, 167, 156, 157, 158, 161, 60, 155, 229, 231, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 175, 209, 0, 0, 0, 179, 0, 176, + 0, 0, 0, 139, 0, 259, 260, 261, 262, 263, + 268, 264, 265, 266, 267, 257, 0, 0, 0, 0, + 277, 284, 283, 285, 0, 0, 297, 0, 0, 61, + 61, 61, 61, 0, 338, 0, 340, 315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 351, 0, 0, 0, 334, 335, 0, 0, 0, 0, - 352, 0, 0, 0, 332, 0, 139, 0, 235, 237, - 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 213, 186, 0, 0, 0, 0, 0, 0, - 146, 144, 252, 116, 250, 0, 0, 275, 165, 0, - 274, 278, 0, 0, 0, 0, 0, 0, 0, 139, - 140, 139, 0, 0, 0, 0, 0, 0, 350, 322, - 0, 66, 326, 327, 0, 0, 348, 66, 220, 0, - 0, 0, 0, 200, 0, 0, 0, 0, 211, 0, - 185, 0, 0, 66, 141, 147, 145, 64, 0, 133, - 0, 281, 0, 0, 0, 319, 328, 329, 330, 331, - 344, 346, 321, 0, 0, 333, 336, 337, 323, 0, - 319, 139, 0, 0, 0, 0, 0, 208, 0, 0, - 0, 202, 203, 199, 63, 249, 251, 116, 142, 283, - 280, 0, 0, 116, 116, 0, 313, 0, 353, 0, - 349, 204, 205, 206, 207, 0, 0, 0, 212, 64, - 143, 137, 0, 0, 305, 0, 0, 0, 133, 0, - 314, 133, 201, 209, 210, 248, 0, 135, 303, 0, - 0, 304, 107, 109, 116, 116, 0, 116, 116, 339, - 138, 0, 254, 0, 0, 316, 315, 0, 0, 0, - 136, 0, 0, 0, 116, 116, 310, 0, 0, 318, - 317, 309, 0, 0, 306 + 0, 0, 61, 0, 110, 122, 121, 118, 120, 119, + 123, 124, 127, 125, 126, 129, 139, 139, 0, 0, + 0, 0, 0, 315, 0, 0, 0, 0, 0, 0, + 0, 174, 160, 172, 0, 177, 178, 0, 0, 0, + 0, 228, 248, 258, 0, 271, 0, 0, 0, 274, + 0, 272, 287, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 346, 0, 0, 0, 329, 330, 0, + 0, 0, 0, 347, 0, 0, 0, 327, 0, 134, + 0, 230, 232, 61, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 208, 181, 0, 0, 0, + 0, 0, 0, 141, 139, 247, 111, 245, 0, 0, + 270, 160, 0, 269, 273, 0, 0, 0, 0, 0, + 0, 0, 134, 135, 134, 0, 0, 0, 0, 0, + 0, 345, 317, 0, 61, 321, 322, 0, 0, 343, + 61, 215, 0, 0, 0, 0, 195, 0, 0, 0, + 0, 206, 0, 180, 0, 0, 61, 136, 142, 140, + 59, 0, 128, 0, 276, 0, 0, 0, 314, 323, + 324, 325, 326, 339, 341, 316, 0, 0, 328, 331, + 332, 318, 0, 314, 134, 0, 0, 0, 0, 0, + 203, 0, 0, 0, 197, 198, 194, 58, 244, 246, + 111, 137, 278, 275, 0, 0, 111, 111, 0, 308, + 0, 348, 0, 344, 199, 200, 201, 202, 0, 0, + 0, 207, 59, 138, 132, 0, 0, 300, 0, 0, + 0, 128, 0, 309, 128, 196, 204, 205, 243, 0, + 130, 298, 0, 0, 299, 102, 104, 111, 111, 0, + 111, 111, 334, 133, 0, 249, 0, 0, 311, 310, + 0, 0, 0, 131, 0, 0, 0, 111, 111, 305, + 0, 0, 313, 312, 304, 0, 0, 301 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 276, 277, 278, 306, 323, 164, 79, 635, 113, - 12, 133, 80, 14, 15, 41, 42, 43, 48, 54, - 118, 128, 356, 237, 285, 168, 452, 359, 692, 677, - 421, 540, 661, 478, 541, 81, 165, 139, 156, 140, - 141, 110, 380, 407, 381, 121, 88, 157, 16, 17, - 18, 20, 19, 390, 453, 454, 63, 23, 61, 101, - 544, 545, 129, 171, 55, 96, 56, 49, 481, 408, - 83, 410, 290, 291, 57, 92, 93, 229, 665, 134, - 331, 645, 500, 510, 230, 231, 232, 233 + -1, 269, 270, 271, 299, 316, 79, 628, 113, 12, + 133, 80, 14, 15, 41, 42, 43, 48, 54, 118, + 128, 349, 230, 278, 161, 445, 352, 685, 670, 414, + 533, 654, 471, 534, 81, 158, 139, 156, 140, 141, + 110, 373, 400, 374, 121, 88, 157, 16, 17, 18, + 20, 19, 383, 446, 447, 63, 23, 61, 101, 537, + 538, 129, 164, 55, 96, 56, 49, 474, 401, 83, + 403, 283, 284, 57, 92, 93, 222, 658, 134, 324, + 638, 493, 503, 223, 224, 225, 226 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -613 +#define YYPACT_NINF -624 static const yytype_int16 yypact[] = { - 715, -613, -613, -613, -613, -613, -613, -613, 3, -86, - 32, -39, 107, -22, 138, -613, 203, 859, -613, 142, - 191, 55, 64, -613, -20, 189, -613, 1862, -613, -613, - -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, - -613, 52, 52, 213, -613, -613, -613, -613, 52, -613, - -613, -613, -613, -613, 52, 216, -613, -10, 237, 246, - 249, -613, -613, -613, -613, -613, 119, -613, -613, -613, - -613, -613, -613, -613, -613, 278, 308, 9, 50, -613, - -613, -613, -30, -613, 285, 285, 209, -613, 14, 165, - 165, -613, -613, 200, -613, -613, -613, -613, -613, -613, - -613, -21, 1546, -613, 161, 170, 250, 119, -613, -30, - -121, 180, 1546, 182, 14, 14, -613, -613, 1262, -613, - -613, 1906, 344, -613, -613, -613, -613, -613, -613, -613, - -14, 196, 2194, 2194, -613, 331, -613, -613, -30, -613, - 198, 201, 1964, 1964, 193, -118, 1964, -613, 363, 218, - -613, 1906, 1964, 119, 210, -30, 351, -613, 79, 367, - 370, 374, 375, 378, 379, 1607, 335, -613, 1221, -613, - -613, -613, -613, -613, -613, 336, 2027, 102, 381, 165, - -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, - -613, -613, -613, -613, -613, -613, -613, 431, 598, 431, - 598, 1964, 1964, 1964, 1964, -613, -613, -613, -613, -613, - -613, -613, -613, -613, -613, -613, -613, 1964, 1964, 1964, - 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, -613, - 165, -613, 45, -613, -613, -613, -613, 202, 1741, -613, - -32, -35, -613, 226, -30, 238, -613, 335, -29, 1262, - -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, - -613, 431, 598, 431, 598, 240, 241, 257, 263, 264, - 266, 269, 1499, 2045, 318, 386, 271, 272, 273, -613, - -613, -613, -613, -613, -613, -613, 25, -613, 119, 1001, - -613, 235, 1171, 1171, 1171, -613, -613, -613, -613, -613, - -613, -613, -613, -613, -613, -613, 1964, -613, -613, -613, - -613, -613, -613, -613, -613, -613, -613, -613, -613, -613, - -613, -613, -613, 1964, 1964, 1964, -31, -15, -613, 1001, - -16, 247, 248, 274, 275, 276, 279, 1001, 1001, 1001, - 1001, 1001, 395, -613, 1964, 1964, 430, -613, -613, -613, - -613, -613, -613, -613, -613, -613, -613, -613, -613, 160, - -613, -613, -613, -613, 160, -613, 182, 397, 281, 283, - 284, 286, 1906, 1906, 1906, 1906, 1906, 1906, 1906, -613, - -613, 6, 672, -67, -613, -84, -613, 1906, 1906, 1906, - 288, 292, -613, -613, -613, -613, -613, -613, -613, -613, - -613, -613, 391, 1782, 2074, 777, 425, -613, -613, -613, - -613, 1964, 293, -613, 294, 1221, 1001, 1001, 1001, 1001, - 1, -613, 27, -613, -613, 1171, 289, 1964, 1964, 1964, - 1964, 1964, 295, 299, 301, 309, 310, 1964, 1221, 1001, - 311, -613, -613, -613, -613, -613, -613, -613, -613, -613, - -613, -613, -613, 288, 288, 1964, 1906, 1906, 1906, 1906, - -613, 312, 313, 314, 315, 299, 316, 1906, -613, 321, - 1453, -74, -613, -613, 322, 325, 454, -12, -613, 1800, - -613, 474, -613, 7, 1051, -55, -613, -73, -613, -613, - 480, 481, 1171, 339, 345, 346, 347, 1171, 502, 1171, - 350, 353, 1171, 360, -30, -613, 361, 373, 533, 534, - 380, 1964, 1171, 1171, -30, 1171, 384, 1964, -613, -613, - -1, 385, 390, 392, 400, 117, 1906, 1906, 1906, 1906, - 121, 1906, -613, -613, 394, 1906, 1906, 1964, 531, 562, - -613, 288, -613, -30, 408, 411, 412, -613, 404, -72, - -613, -613, 1171, 1171, 416, 1171, 1171, 1171, 1171, 384, - -613, 384, 1964, 1171, 415, 1964, 1964, 1964, -613, -613, - 572, 1001, -613, -613, 419, 527, -613, 1001, -613, 1906, - 1906, 1906, 1906, -613, 420, 423, 422, 424, -613, 299, - -613, 427, 433, 46, -613, -613, -613, 372, 1841, -613, - 563, -613, 426, 434, 437, 2092, -613, -613, -613, -613, - -613, -613, -613, 438, 1171, -613, -613, -613, -613, 299, - 2092, 384, 444, 446, 455, 456, 1906, -613, 1906, 1906, - 129, -613, -613, -613, -613, -613, -613, -30, 414, -613, - -613, 600, -3, -6, -30, 145, -613, 459, 380, 192, - -613, -613, -613, -613, -613, 462, 469, 470, -613, 372, - -613, 577, 1171, 1319, -613, -2, 847, 847, -613, 2133, - -613, -613, -613, -613, -613, -613, 628, 482, -613, 471, - 1319, -613, 476, 477, -613, -613, 457, -6, -30, 160, - -613, 615, -613, 621, 478, 202, 202, 622, 847, 847, - -613, 1171, 624, 1171, -613, -613, -613, 1171, 569, 202, - 202, -613, 627, 1171, -613 + 815, -624, -624, -624, -624, -624, -624, -624, 14, -114, + 16, -73, 78, -31, 299, -624, 163, 2187, -624, 164, + 80, 19, 22, -624, 2, 179, -624, 1912, -624, -624, + -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, + -624, 68, 68, 201, -624, -624, -624, -624, 68, -624, + -624, -624, -624, -624, 68, 200, -624, 5, 215, 222, + 225, -624, -624, -624, -624, -624, 117, -624, -624, -624, + -624, -624, -624, -624, -624, 264, 277, 7, 49, -624, + -624, -624, -12, -624, 252, 252, 198, -624, 79, 231, + 231, -624, -624, 83, -624, -624, -624, -624, -624, -624, + -624, -21, 649, -624, 138, 149, 627, 117, -624, -12, + -120, 159, 649, 158, 79, 79, -624, -624, 1557, -624, + -624, 2012, 320, -624, -624, -624, -624, -624, -624, -624, + -13, 173, 2237, 2237, -624, 313, -624, -624, -12, -624, + 174, 177, 2012, 2012, 169, -118, 2012, -624, 336, 191, + -624, 2012, 2012, 117, 193, -12, 226, -624, 1296, 308, + -624, 1516, -624, -624, -624, -624, -624, -624, 307, 2031, + 108, 357, 231, -624, -624, -624, -624, -624, -624, -624, + -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, + 454, 958, 454, 958, 2012, 2012, 2012, 2012, -624, -624, + -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, + 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, + 2012, 2012, -624, 231, -624, 55, -624, -624, -624, -624, + 161, 1748, -624, -23, -41, -624, 203, -12, 214, -624, + 308, -20, 1557, -624, -624, -624, -624, -624, -624, -624, + -624, -624, -624, -624, 454, 958, 454, 958, 216, 217, + 218, 220, 221, 224, 227, 1789, 2076, 732, 351, 228, + 229, 230, -624, -624, -624, -624, -624, -624, -624, 109, + -624, 117, 956, -624, 219, 1466, 1466, 1466, -624, -624, + -624, -624, -624, -624, -624, -624, -624, -624, -624, 2012, + -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, + -624, -624, -624, -624, -624, -624, 2012, 2012, 2012, -10, + 3, -624, 956, -17, 223, 237, 238, 239, 240, 241, + 956, 956, 956, 956, 956, 352, -624, 2012, 2012, 387, + -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, + -624, -624, 539, -624, -624, -624, -624, 539, -624, 158, + 354, 234, 248, 249, 250, 2012, 2012, 2012, 2012, 2012, + 2012, 2012, -624, -624, 42, 1006, -121, -624, -116, -624, + 2012, 2012, 2012, 253, 251, -624, -624, -624, -624, -624, + -624, -624, -624, -624, -624, 353, 1807, 2094, 1175, 390, + -624, -624, -624, -624, 2012, 255, -624, 256, 1516, 956, + 956, 956, 956, 20, -624, 29, -624, -624, 1466, 254, + 2012, 2012, 2012, 2012, 2012, 258, 259, 261, 262, 263, + 2012, 1516, 956, 266, -624, -624, -624, -624, -624, -624, + -624, -624, -624, -624, -624, -624, 253, 253, 2012, 2012, + 2012, 2012, 2012, -624, 269, 270, 272, 273, 259, 274, + 2012, -624, 268, 1126, -84, -624, -624, 280, 281, 406, + -5, -624, 1830, -624, 423, -624, 61, 1345, -56, -624, + -77, -624, -624, 430, 431, 1466, 288, 290, 291, 292, + 1466, 455, 1466, 296, 298, 1466, 300, -12, -624, 301, + 302, 457, 461, 306, 2012, 1466, 1466, -12, 1466, 311, + 2012, -624, -624, -1, 312, 314, 317, 319, 101, 2012, + 2012, 2012, 2012, 112, 2012, -624, -624, 318, 2012, 2012, + 2012, 453, 478, -624, 253, -624, -12, 321, 326, 327, + -624, 323, -67, -624, -624, 1466, 1466, 329, 1466, 1466, + 1466, 1466, 311, -624, 311, 2012, 1466, 328, 2012, 2012, + 2012, -624, -624, 489, 956, -624, -624, 335, 441, -624, + 956, -624, 2012, 2012, 2012, 2012, -624, 334, 337, 339, + 340, -624, 259, -624, 343, 345, 15, -624, -624, -624, + 178, 1848, -624, 484, -624, 338, 350, 349, 2117, -624, + -624, -624, -624, -624, -624, -624, 348, 1466, -624, -624, + -624, -624, 259, 2117, 311, 356, 359, 360, 361, 2012, + -624, 2012, 2012, 115, -624, -624, -624, -624, -624, -624, + -12, 116, -624, -624, 505, -7, 59, -12, 118, -624, + 358, 306, 124, -624, -624, -624, -624, -624, 363, 364, + 366, -624, 178, -624, 473, 1466, 1614, -624, -6, 802, + 802, -624, 2135, -624, -624, -624, -624, -624, -624, 526, + 379, -624, 374, 1614, -624, 378, 380, -624, -624, 442, + 59, -12, 539, -624, 516, -624, 523, 396, 161, 161, + 524, 802, 802, -624, 1466, 525, 1466, -624, -624, -624, + 1466, 486, 161, 161, -624, 543, 1466, -624 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -613, 34, 122, 184, -167, -141, -613, 0, -8, -139, - 554, -613, 4, -613, -613, -613, -613, 365, -613, -613, - -613, -151, -613, -533, -613, -266, -613, -244, -613, -613, - -312, 11, -613, -423, -613, -613, -26, 417, -163, -613, - 540, 547, 92, -162, -267, 178, 236, 407, -613, -613, - 640, -613, -613, -613, -613, -613, -613, -613, -613, -613, - -613, -613, 568, -613, -613, -613, -613, -613, -613, -612, - -53, 251, -185, -613, -613, 604, -613, 529, -613, -613, - -613, 43, 204, -449, -613, 532, -613, -613 + -624, 132, 155, 181, -165, -154, 0, -86, -143, 474, + -624, 6, -624, -624, -624, -624, 67, -624, -624, -624, + -142, -624, -499, -624, -252, -624, -231, -624, -624, -313, + -63, -624, -434, -624, -624, -26, 342, -152, -624, 458, + 463, -11, -156, -242, 202, 244, 332, -624, -624, 554, + -624, -624, -624, -624, -624, -624, -624, -624, -624, -624, + -624, 485, -624, -624, -624, -624, -624, -624, -623, -79, + 213, -193, -624, -624, 520, -624, 445, -624, -624, -624, + -34, 129, -448, -624, 456, -624, -624 }; /* 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 -223 +#define YYTABLE_NINF -218 static const yytype_int16 yytable[] = { - 11, 82, 364, 279, 13, 286, 383, 385, 663, 680, - 597, 91, 497, 105, 169, 423, 530, 11, 328, 94, - 111, 13, 538, 111, 111, 111, 111, 281, 295, 415, - 518, 519, 324, 332, 333, 334, 335, 336, 499, 111, - 111, 146, 539, 342, 146, 2, 119, 120, 4, -154, - 147, 679, 109, 243, 111, 498, 21, 64, 65, 325, - 107, 67, 68, 69, 70, 71, 72, 73, 694, 1, - 2, 22, 3, 4, 5, 24, 138, 438, 467, 343, - 109, 498, 251, 252, 253, 254, 138, 473, 467, 467, - 467, 25, 155, 11, 368, 467, 370, 534, 551, 602, - 74, 111, 472, 250, 659, 255, 256, 467, 365, 366, - 666, 667, 280, 292, 550, 471, 240, 241, 596, 293, - 244, 369, 26, 371, 112, 27, 248, 112, 112, 112, - 112, 420, -66, -66, 361, 360, 483, 485, 487, 28, - 630, 135, 155, 112, 112, 60, 136, 422, -66, 425, - 289, 695, 696, -154, 698, 699, 170, -154, 112, 578, - 440, 95, 344, 345, 664, 681, 226, 226, 467, 467, - 648, 709, 710, 468, 547, 326, 327, 289, 329, 106, - 29, 30, 31, 32, 33, 34, 35, 36, 46, 37, - 47, 330, 289, 289, 289, 289, 289, 337, 338, 339, - 340, 341, 289, 44, 576, 112, 633, 131, 38, 39, - 40, 62, 138, 166, 75, 76, 58, 549, 77, 1, - 78, 108, 3, 155, 5, 59, 489, 122, 123, 124, - 125, 126, 127, 50, 51, 52, 409, 91, 53, 409, - 409, 409, 503, 247, 505, 506, 507, 610, 86, 611, - 87, 116, 492, 117, 227, 227, 346, 64, 65, 98, - 107, 67, 68, 69, 70, 71, 72, 73, 99, 1, - 2, 100, 3, 4, 5, 515, 409, 583, 102, 562, - 416, 588, 103, 570, 409, 409, 409, 409, 409, 658, - 391, 570, 151, 152, 38, 39, 40, 417, 418, 419, - 74, 442, 443, 444, 445, 668, 446, 669, 279, 650, - 447, 448, 104, 449, 450, 451, 228, 228, 439, 289, - 114, 115, 87, 347, 348, 64, 65, 142, 107, 158, - 159, 160, 161, 162, 163, 73, 143, 1, 2, 148, - 3, 4, 5, 349, 350, 150, 351, 352, 167, 353, - 354, 355, 671, 236, 669, 638, 470, 172, 64, 65, - 238, 239, 242, 409, 409, 409, 409, 245, 74, 249, - 1, 2, 409, 3, 4, 5, -55, 612, 246, -56, - 615, 616, 617, -59, -58, 289, 409, -57, 257, 155, - 111, 1, 294, 287, 3, 362, 5, 411, 363, 372, - 373, 289, 504, 289, 289, 289, 84, 85, 386, 426, - 427, 514, 155, 89, 75, 76, 374, 280, 77, 90, - 78, 144, 375, 376, 686, 377, 346, 689, 378, 520, - 387, 388, 389, 437, 441, 455, 428, 429, 430, 409, - 456, 431, 457, 458, 409, 459, 409, 488, 538, 409, - 477, 479, 480, 543, 502, 490, 491, 508, 470, 409, - 409, 509, 409, 511, 460, 461, 462, 463, 464, 465, - 466, 512, 513, 517, 526, 527, 528, 529, 531, 474, - 475, 476, 75, 76, 535, 571, 77, 536, 78, 384, - 533, 577, 537, 347, 348, 697, 546, 552, 553, 409, - 409, 555, 409, 409, 409, 409, 560, 556, 557, 558, - 409, 593, 562, 349, 350, 563, 351, 352, 409, 353, - 354, 355, 565, 566, 409, 296, 297, 298, 299, 300, - 301, 302, 303, 304, 305, 567, 289, 568, 569, 289, - 289, 289, 570, 412, 413, 414, 575, 579, 521, 522, - 523, 524, 580, 594, 581, 442, 443, 444, 445, 532, - 446, 409, 582, 590, 447, 448, 595, 449, 450, 451, - 598, 599, 637, 601, 600, 605, 618, 614, 620, 644, - 424, 498, 626, 627, 628, 639, 629, 631, 432, 433, - 434, 435, 436, 632, 644, 640, 641, 634, 442, 443, - 444, 445, 642, 446, 651, 646, 652, 447, 448, 409, - 449, 450, 451, 409, 409, 653, 654, 662, 584, 585, - 586, 587, 672, 589, 307, 308, 670, 591, 592, 673, - 674, 676, 690, 693, 691, -18, -19, 700, 701, 703, - 702, 707, 712, 688, 713, 409, 409, 132, 409, 660, - 409, 675, 149, 145, 409, 358, 367, 45, 130, 634, - 409, 97, 234, 649, 525, 235, 0, 493, 494, 495, - 496, 622, 623, 624, 625, 0, 501, 0, 0, 64, - 65, 0, 107, 158, 159, 160, 161, 162, 163, 73, - 516, 1, 2, 0, 3, 4, 5, 0, 309, 310, - 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, - 321, 322, 0, 0, 0, -222, 0, 0, 655, 0, - 656, 657, 74, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -68, 1, 2, 0, 3, 4, 5, - 0, 0, 0, 554, 0, 6, 7, 0, 559, 0, - 561, 0, 0, 564, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 572, 573, 0, 574, 8, 0, 0, - 0, 9, 0, 0, 0, 10, 0, 0, 0, 0, - 0, 0, 0, 0, 64, 65, 0, 107, 158, 159, - 160, 161, 162, 163, 73, 0, 1, 2, 0, 3, - 4, 5, 0, 603, 604, 0, 606, 607, 608, 609, - 0, 0, 0, 0, 613, 0, 0, 0, 0, 0, - 0, 0, 619, 0, 0, 0, 0, 74, 621, 0, - 0, 0, 0, 0, 0, 0, 75, 76, 0, 0, - 77, 0, 78, 469, 0, 0, 0, 0, 0, 0, - 392, 393, 394, 395, 64, 65, 396, 0, 0, -221, - 0, 0, 0, 0, 0, 647, 1, 2, 0, 3, - 4, 5, 397, 398, 399, 0, 0, -68, 1, 2, - 0, 3, 4, 5, 0, 0, 0, 400, 401, 6, - 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 346, 0, 0, 0, 0, 402, 0, 0, 0, - 0, 8, 0, 678, 0, 9, 0, 684, 685, 10, - 0, 0, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 261, 262, 263, - 264, 75, 76, 0, 0, 77, 0, 78, 486, 704, - 705, 0, 706, 0, 708, 0, 0, 0, 711, 0, - 0, 0, 0, 0, 714, 0, 265, 205, 682, 683, - 208, 209, 210, 211, 212, 213, 214, 215, 216, 0, - 266, 0, 267, 268, 269, 0, 270, 271, 349, 350, - 0, 351, 352, 0, 353, 354, 355, 0, 0, 0, - 0, 0, 0, 0, 392, 393, 394, 395, 64, 65, - 396, 0, 403, 0, 0, 404, 0, 405, 0, 406, - 1, 2, 0, 3, 4, 5, 397, 398, 399, 0, + 11, 82, 272, 321, 656, 673, 13, 416, 357, 279, + 523, 105, 511, 512, 111, 162, 274, 11, 325, 326, + 327, 328, 329, 13, 376, 378, 91, 317, 335, 531, + 288, 490, 111, 672, 94, 111, 408, 590, 111, 318, + 492, 460, 146, 111, 146, 111, 460, 24, 465, 532, + 687, 147, 109, 236, 111, 466, 64, 65, 111, 107, + 67, 68, 69, 70, 71, 72, 73, 21, 1, 2, + 111, 3, 4, 5, 491, 25, 138, 243, 460, 273, + 109, 336, 22, 491, 431, 460, 138, 527, 26, 361, + 131, 363, 155, 11, 544, 460, 27, 358, 359, 74, + 589, 362, 1, 364, 595, 3, 460, 5, 84, 85, + 159, 119, 120, 543, -149, 89, 233, 234, 112, 285, + 237, 90, 50, 51, 52, 286, 241, 53, 354, 2, + 28, 652, 4, 464, 623, 155, 112, 659, 660, 112, + 240, 135, 112, 282, 353, 433, 136, 112, 418, 112, + 531, -61, 413, -61, 476, 478, 480, 163, 112, 571, + 657, 674, 112, 44, 641, 415, -61, 60, 319, 320, + 282, 322, 337, 338, 112, 626, 95, 106, 688, 689, + 58, 691, 692, 59, 323, 282, 282, 282, 282, 282, + 330, 331, 332, 333, 334, 282, 569, 1, 702, 703, + 3, 62, 5, 402, 460, 138, 402, 402, 402, 461, + 46, 482, 47, 75, 76, 339, 155, 77, -149, 78, + 108, 91, -149, 460, 38, 39, 40, 496, 540, 498, + 499, 500, 339, 64, 65, 542, 86, 98, 87, 603, + 116, 604, 117, 402, 99, 1, 2, 100, 3, 4, + 5, 402, 402, 402, 402, 402, 485, 435, 436, 437, + 438, 576, 439, 555, 219, 219, 440, 441, 103, 442, + 443, 444, 581, 409, 563, 651, 102, 563, 661, 508, + 662, 104, 340, 341, 664, 384, 662, 220, 220, 87, + 410, 411, 412, 122, 123, 124, 125, 126, 127, 340, + 341, 643, 342, 343, 142, 344, 345, 272, 346, 347, + 348, 432, 282, 221, 221, 143, 151, 152, 148, 342, + 343, 150, 344, 345, 160, 346, 347, 348, 114, 115, + 402, 402, 402, 402, 165, 229, 231, 232, 235, 402, + 238, 29, 30, 31, 32, 33, 34, 35, 36, 463, + 37, 239, 242, 402, 453, 454, 455, 456, 457, 458, + 459, 631, 605, 111, 280, 608, 609, 610, 287, 467, + 468, 469, 355, 379, 356, 365, 366, 367, 282, 368, + 369, 404, 155, 370, 273, 419, 371, 380, 381, 382, + 430, 434, 448, 449, 282, 497, 282, 282, 282, 420, + 421, 422, 423, 424, 507, 155, 402, 450, 451, 452, + 472, 402, 481, 402, 473, 470, 402, 483, 484, 495, + 501, 502, 513, 504, 505, 506, 402, 402, 510, 402, + 679, 519, 520, 682, 521, 522, 524, 526, 514, 515, + 516, 517, 528, 529, 530, 539, 536, 545, 546, 525, + 548, 463, 549, 550, 551, 38, 39, 40, 555, 553, + 556, 561, 558, 559, 560, 562, 402, 402, 563, 402, + 402, 402, 402, 568, 572, 587, 573, 402, 564, 574, + 690, 575, 588, 591, 570, 402, 592, 583, 598, 593, + 607, 402, 594, 611, 613, 491, 619, 620, 405, 406, + 407, 621, 622, 624, 586, 625, 632, 633, 577, 578, + 579, 580, 634, 582, 635, 639, 644, 584, 585, 645, + 646, 647, 655, 665, 666, 663, 667, 669, 402, 282, + 683, 684, 282, 282, 282, 417, 686, -18, 693, -19, + 694, 696, 700, 425, 426, 427, 428, 429, 289, 290, + 291, 292, 293, 294, 295, 296, 297, 298, 695, 705, + 706, 615, 616, 617, 618, 630, 668, 132, 653, 145, + 149, 45, 637, 351, 360, 130, 402, 97, 227, 642, + 402, 402, 518, 435, 436, 437, 438, 637, 439, 228, + 627, 0, 440, 441, 0, 442, 443, 444, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 648, 0, + 649, 650, 402, 402, 0, 402, 0, 402, 0, 0, + 0, 402, 486, 487, 488, 489, 0, 402, 0, 0, + 0, 494, 0, 0, 64, 65, 681, 107, 67, 68, + 69, 70, 71, 72, 73, 509, 1, 2, 0, 3, + 4, 5, 627, 0, 0, 0, 64, 65, 0, 107, + 67, 68, 69, 70, 71, 72, 73, 0, 1, 2, + 0, 3, 4, 5, 0, 0, 0, 74, 0, 0, + 435, 436, 437, 438, 0, 439, 0, 0, 137, 440, + 441, 0, 442, 443, 444, 0, 0, 0, 547, 74, + 0, 0, 0, 552, 0, 554, 0, 0, 557, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 565, 566, + 0, 567, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, + 65, 0, 107, 67, 68, 69, 70, 71, 72, 73, + 0, 1, 2, 0, 3, 4, 5, 0, 596, 597, + 0, 599, 600, 601, 602, 0, 0, 0, 0, 606, + 0, 0, 0, 0, 0, 0, 0, 612, 0, 0, + 0, 0, 74, 614, 0, 0, 0, 0, 0, 0, + 0, 75, 76, 0, 0, 77, 0, 78, 144, 0, + 0, 0, 0, 0, 0, 385, 386, 387, 388, 64, + 65, 389, 0, 75, 76, -217, 0, 77, 0, 78, + 640, 1, 2, 0, 3, 4, 5, 390, 391, 392, + 0, 0, 0, -63, 1, 2, 0, 3, 4, 5, + 0, 0, 393, 394, 0, 6, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 339, 0, 0, 0, + 0, 395, 0, 0, 0, 0, 0, 8, 671, 0, + 0, 9, 677, 678, 0, 10, 0, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 254, 255, 256, 257, 75, 76, 0, 0, + 77, 0, 78, 377, 697, 698, 0, 699, 0, 701, + 0, 0, 0, 704, 0, 0, 0, 0, 0, 707, + 0, 258, 198, 675, 676, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 0, 259, 0, 260, 261, 262, + 0, 263, 264, 342, 343, 0, 344, 345, 0, 346, + 347, 348, 0, 0, 0, 0, 0, 0, 0, 385, + 386, 387, 388, 64, 65, 389, 0, 396, 0, 0, + 397, 0, 398, 0, 399, 1, 2, 0, 3, 4, + 5, 390, 391, 392, 300, 301, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 393, 394, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 400, 401, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 111, 0, 64, 65, - 402, 107, 158, 159, 160, 161, 162, 163, 73, 0, - 1, 2, 0, 3, 4, 5, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, - 196, 261, 262, 263, 264, 0, 0, 0, 0, 0, - 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 111, 0, 64, 65, 395, 107, 67, 68, 69, + 70, 71, 72, 73, 0, 1, 2, 0, 3, 4, + 5, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 254, 255, 256, 257, + 0, 0, 0, 0, 0, 0, 74, 0, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 0, 0, 0, 258, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 0, 259, + 0, 260, 261, 262, 0, 263, 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 265, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 0, 266, 0, 267, 268, 269, 0, - 270, 271, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 112, 0, 0, 0, 0, + 0, 396, 0, 0, 397, 0, 398, 0, 399, 244, + 245, 246, 247, 64, 65, 248, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 0, 3, 4, + 5, 249, 250, 251, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 252, 253, 0, 0, + 75, 76, 0, 0, 77, 0, 78, 462, 0, 0, + 0, 111, 64, 65, 0, 107, 67, 68, 69, 70, + 71, 72, 73, 0, 1, 2, 0, 3, 4, 5, + 0, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 254, 255, 256, 257, + 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 112, 0, 0, 0, 0, 0, 403, 0, 0, 404, - 0, 405, 0, 406, 392, 393, 394, 395, 64, 65, - 396, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 2, 0, 3, 4, 5, 397, 398, 399, 0, + 0, 0, 0, 0, 0, 258, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 0, 259, + 0, 260, 261, 262, 0, 263, 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 400, 401, 0, 0, 75, 76, 0, 0, 77, - 0, 78, 548, 0, 0, 0, 0, 0, 64, 65, - 402, 153, 67, 68, 69, 70, 71, 72, 73, 0, - 1, 2, 0, 3, 4, 5, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, - 196, 261, 262, 263, 264, 0, 0, 0, 0, 64, - 65, 74, 153, 67, 68, 69, 70, 71, 72, 73, - 0, 1, 2, 0, 3, 4, 5, 0, 0, 0, - 265, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 0, 266, 0, 267, 268, 269, 0, - 270, 271, 74, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 392, 393, 394, 395, 0, 0, 396, 0, - 0, 0, 0, 0, 0, 0, 403, 0, 0, 404, - 0, 405, 0, 406, 397, 398, 399, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 400, - 401, 0, 282, 283, 0, 284, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 402, 0, - 0, 0, 0, 0, 0, 75, 76, 154, 0, 77, - 0, 78, 0, 0, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 261, - 262, 263, 264, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 75, 76, 0, 0, - 77, 0, 78, 0, 0, 0, 0, 0, 265, 205, - 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 0, 266, 0, 267, 268, 269, 0, 270, 271, - 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 0, 3, 4, 5, 258, 0, - 0, 0, 0, 0, 403, 0, 0, 404, 0, 405, - 0, 406, 0, 259, 260, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 64, 65, 111, 107, - 158, 159, 160, 161, 162, 163, 73, 0, 1, 2, - 0, 3, 4, 5, 0, 0, 0, 0, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 261, 262, 263, 264, 0, 0, 74, - 0, 0, 0, 64, 65, 0, 107, 67, 68, 69, - 70, 71, 72, 73, 0, 1, 2, 0, 3, 4, - 5, 0, 265, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 137, 266, 0, 267, 268, - 269, 0, 270, 271, 0, 0, 74, 0, 0, 0, + 0, 0, 0, 0, 0, 112, 0, 0, 0, -61, + 0, 265, 0, 0, 266, 0, 267, 0, 268, 244, + 245, 246, 247, 64, 65, 248, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 0, 3, 4, + 5, 249, 250, 251, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 252, 253, 0, 75, + 76, 0, 0, 77, 0, 78, 479, 0, 0, 0, + 0, 111, 64, 65, 0, 107, 67, 68, 69, 70, + 71, 72, 73, 0, 1, 2, 0, 3, 4, 5, + 0, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 254, 255, 256, 257, + 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 112, 0, 64, 65, -66, 0, 272, 0, - 0, 273, 0, 274, 0, 275, 1, 2, 0, 3, - 4, 5, 258, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 259, 260, 0, + 0, 0, 0, 0, 0, 258, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 0, 259, + 0, 260, 261, 262, 0, 263, 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 111, 75, 76, 0, 379, 77, 0, 78, + 0, 0, 0, 0, 0, 112, 0, 0, 0, 0, + 0, 265, 0, 0, 266, 0, 267, 0, 268, 385, + 386, 387, 388, 64, 65, 389, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 2, 0, 3, 4, + 5, 390, 391, 392, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 393, 394, 0, 75, + 76, 0, 0, 77, 0, 78, 541, 0, 0, 0, + 0, 0, 0, 64, 65, 395, 153, 67, 68, 69, + 70, 71, 72, 73, 0, 1, 2, 0, 3, 4, + 5, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 254, 255, 256, 257, + 0, 0, 0, 0, 64, 65, 74, 153, 67, 68, + 69, 70, 71, 72, 73, 0, 1, 2, 0, 3, + 4, 5, 0, 0, 0, 258, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 0, 259, + 0, 260, 261, 262, 0, 263, 264, 74, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 385, 386, 387, + 388, 0, 0, 389, 0, 0, 0, 0, 0, 0, + 0, 396, 0, 0, 397, 0, 398, 0, 399, 390, + 391, 392, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 393, 394, 0, 275, 276, 0, + 277, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 395, 0, 0, 0, 0, 0, 0, + 75, 76, 154, 0, 77, 0, 78, 0, 0, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 254, 255, 256, 257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 261, 262, 263, - 264, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 75, 76, 0, 0, 77, 0, 78, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 265, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, 0, - 266, 0, 267, 268, 269, 0, 270, 271, 64, 65, - 0, 107, 67, 68, 69, 70, 71, 72, 73, 0, - 1, 2, 0, 3, 4, 5, 112, 0, 0, 0, - 0, 0, 272, 0, 0, 273, 0, 274, 0, 275, - 357, 0, 0, 0, 0, 0, 0, 0, 0, 64, - 65, 74, 107, 158, 159, 160, 161, 162, 163, 73, - 0, 1, 2, 0, 3, 4, 5, 64, 65, 0, + 0, 75, 76, 0, 0, 77, 0, 78, 0, 0, + 0, 0, 0, 258, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 0, 259, 0, 260, + 261, 262, 0, 263, 264, 64, 65, 0, 107, 67, + 68, 69, 70, 71, 72, 73, 0, 1, 2, 0, + 3, 4, 5, 0, 0, 0, 0, 0, 0, 396, + 0, 0, 397, 0, 398, 0, 399, 350, 0, 0, + 0, 0, 0, 0, 0, 0, 64, 65, 74, 107, + 67, 68, 69, 70, 71, 72, 73, 0, 1, 2, + 0, 3, 4, 5, 64, 65, 0, 107, 67, 68, + 69, 70, 71, 72, 73, 0, 1, 2, 0, 3, + 4, 5, 0, 0, 0, 0, 0, 64, 65, 74, 107, 67, 68, 69, 70, 71, 72, 73, 0, 1, - 2, 0, 3, 4, 5, 0, 0, 0, 0, 0, - 0, 0, 74, 0, 0, 0, 0, 0, 0, 542, - 0, 0, 0, 0, 0, 0, 0, 0, 64, 65, - 74, 107, 67, 68, 69, 70, 71, 72, 73, 0, - 1, 2, 0, 3, 4, 5, 0, 0, 0, 64, + 2, 0, 3, 4, 5, 64, 65, 74, 107, 67, + 68, 69, 70, 71, 72, 73, 0, 1, 2, 535, + 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, + 74, 0, 0, 0, 0, 0, 0, 629, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 74, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 75, 76, 0, 0, 77, 0, 78, 64, 65, 0, 66, 67, 68, 69, 70, 71, 72, 73, - 636, 1, 2, 0, 3, 4, 5, 0, 0, 0, - 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 75, 76, 0, 0, 77, - 0, 78, 74, 64, 65, 0, 107, 158, 159, 160, - 161, 162, 163, 73, 0, 1, 2, 0, 3, 4, - 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 75, 76, 0, 482, - 77, 0, 78, 0, 0, 0, 74, 0, 0, 0, + 0, 1, 2, 0, 3, 4, 5, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 75, 76, 0, 372, 77, 0, 78, + 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, + 0, 75, 76, 0, 475, 77, 0, 78, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 76, 0, 0, 77, 0, - 78, 64, 65, 0, 107, 67, 68, 69, 70, 71, + 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 75, 76, 0, 0, 77, 0, 78, 64, + 65, 0, 107, 67, 68, 69, 70, 71, 72, 73, + 0, 1, 2, 0, 3, 4, 5, 0, 64, 65, + 0, 281, 67, 68, 69, 70, 71, 72, 73, 0, + 1, 2, 0, 3, 4, 5, 0, 0, 0, 0, + 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 75, 76, 0, 0, + 77, 74, 78, 64, 65, 0, 107, 67, 68, 69, + 70, 71, 72, 73, 0, 1, 2, 0, 3, 4, + 5, 64, 65, 0, 107, 67, 68, 69, 70, 71, 72, 73, 0, 1, 2, 0, 3, 4, 5, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 75, 76, 0, 0, 77, - 0, 78, 0, 0, 74, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 64, 65, 74, 107, 67, 68, + 69, 70, 71, 72, 636, 0, 1, 2, 0, 3, + 4, 5, 64, 65, 74, 107, 67, 68, 69, 70, + 71, 72, 680, 0, 1, 2, 0, 3, 4, 5, + 0, 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 75, 76, 0, 0, - 77, 0, 78, 0, 64, 65, 0, 288, 67, 68, - 69, 70, 71, 72, 73, 0, 1, 2, 0, 3, - 4, 5, 64, 65, 0, 107, 158, 159, 160, 161, - 162, 163, 73, 0, 1, 2, 0, 3, 4, 5, - 75, 76, 0, 0, 77, 0, 78, 74, 0, 0, - 0, 64, 65, 0, 107, 158, 159, 160, 161, 162, - 163, 73, 0, 1, 2, 74, 3, 4, 5, 64, - 65, 0, 107, 67, 68, 69, 70, 71, 72, 643, - 0, 1, 2, 0, 3, 4, 5, 0, 0, 0, - 0, 0, 0, 0, 74, 0, 0, 0, 75, 76, - 0, 0, 77, 0, 78, 0, 0, 0, 0, 0, - 64, 65, 74, 107, 67, 68, 69, 70, 71, 72, - 687, 0, 1, 2, 0, 3, 4, 5, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 77, 0, 78, 0, 0, 74, 0, -216, 0, 0, + 0, 0, 0, 0, 0, 75, 76, 0, 0, 77, + 0, 78, 0, 0, 0, -63, 1, 2, 0, 3, + 4, 5, 0, 0, 0, 0, 0, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, + 75, 76, 0, 9, 77, 0, 375, 10, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 75, 76, + 0, 0, 77, 0, 477, 0, 0, 0, 0, 0, + 0, 0, 0, 166, 0, 0, 0, 0, 0, 0, 0, 75, 76, 0, 0, 77, 0, 78, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, - 76, 0, 0, 77, 0, 382, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 173, 0, 0, 0, 0, 0, 0, 0, 75, 76, - 0, 0, 77, 0, 484, 0, 0, 0, 0, 0, - 0, 174, 175, 0, 0, 0, 75, 76, 0, 0, - 77, 0, 78, 176, 177, 178, 179, 180, 181, 182, + 0, 0, 0, 0, 167, 168, 0, 0, 0, 75, + 76, 0, 0, 77, 0, 78, 169, 170, 171, 172, + 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 75, 76, 0, - 0, 77, 0, 78, 0, 0, 0, 0, 201, 202, - 203, 0, 0, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 225 + 193, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 194, 195, 196, 0, 0, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, + 211, 212, 213, 214, 215, 216, 217, 218 }; static const yytype_int16 yycheck[] = { - 0, 27, 246, 165, 0, 168, 273, 274, 11, 11, - 543, 21, 11, 4, 28, 327, 465, 17, 203, 29, - 55, 17, 34, 55, 55, 55, 55, 166, 179, 295, - 453, 454, 199, 218, 219, 220, 221, 222, 11, 55, - 55, 162, 54, 228, 162, 20, 32, 33, 23, 55, - 171, 663, 78, 171, 55, 54, 53, 7, 8, 200, - 10, 11, 12, 13, 14, 15, 16, 17, 680, 19, - 20, 68, 22, 23, 24, 161, 102, 343, 162, 230, - 106, 54, 3, 4, 5, 6, 112, 171, 162, 162, - 162, 59, 118, 93, 261, 162, 263, 171, 171, 171, - 50, 55, 169, 156, 637, 26, 27, 162, 247, 248, - 643, 644, 165, 11, 169, 382, 142, 143, 541, 17, - 146, 262, 161, 264, 159, 18, 152, 159, 159, 159, - 159, 162, 163, 163, 169, 167, 403, 404, 405, 161, - 589, 162, 168, 159, 159, 165, 167, 162, 163, 165, - 176, 684, 685, 159, 687, 688, 170, 163, 159, 160, - 345, 171, 117, 118, 167, 167, 132, 133, 162, 162, - 619, 704, 705, 167, 167, 201, 202, 203, 204, 170, - 42, 43, 44, 45, 46, 47, 48, 49, 46, 51, - 48, 217, 218, 219, 220, 221, 222, 223, 224, 225, - 226, 227, 228, 0, 516, 159, 160, 7, 156, 157, - 158, 22, 238, 121, 164, 165, 161, 484, 168, 19, - 170, 171, 22, 249, 24, 161, 411, 62, 63, 64, - 65, 66, 67, 42, 43, 44, 289, 21, 47, 292, - 293, 294, 427, 151, 429, 430, 431, 559, 35, 561, - 37, 42, 415, 44, 132, 133, 54, 7, 8, 22, - 10, 11, 12, 13, 14, 15, 16, 17, 22, 19, - 20, 22, 22, 23, 24, 438, 329, 160, 159, 162, - 306, 160, 4, 162, 337, 338, 339, 340, 341, 160, - 286, 162, 114, 115, 156, 157, 158, 323, 324, 325, - 50, 141, 142, 143, 144, 160, 146, 162, 470, 621, - 150, 151, 4, 153, 154, 155, 132, 133, 344, 345, - 84, 85, 37, 121, 122, 7, 8, 166, 10, 11, - 12, 13, 14, 15, 16, 17, 166, 19, 20, 159, - 22, 23, 24, 141, 142, 163, 144, 145, 4, 147, - 148, 149, 160, 22, 162, 599, 382, 161, 7, 8, - 162, 160, 169, 416, 417, 418, 419, 4, 50, 159, - 19, 20, 425, 22, 23, 24, 9, 562, 160, 9, - 565, 566, 567, 9, 9, 411, 439, 9, 9, 415, - 55, 19, 11, 57, 22, 169, 24, 162, 160, 159, - 159, 427, 428, 429, 430, 431, 41, 42, 22, 162, - 162, 437, 438, 48, 164, 165, 159, 470, 168, 54, - 170, 171, 159, 159, 668, 159, 54, 671, 159, 455, - 159, 159, 159, 38, 4, 38, 162, 162, 162, 492, - 159, 162, 159, 159, 497, 159, 499, 22, 34, 502, - 162, 159, 61, 479, 165, 162, 162, 162, 484, 512, - 513, 162, 515, 162, 372, 373, 374, 375, 376, 377, - 378, 162, 162, 162, 162, 162, 162, 162, 162, 387, - 388, 389, 164, 165, 162, 511, 168, 162, 170, 171, - 169, 517, 38, 121, 122, 38, 22, 17, 17, 552, - 553, 162, 555, 556, 557, 558, 4, 162, 162, 162, - 563, 537, 162, 141, 142, 162, 144, 145, 571, 147, - 148, 149, 162, 162, 577, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 162, 562, 4, 4, 565, - 566, 567, 162, 292, 293, 294, 162, 162, 456, 457, - 458, 459, 162, 22, 162, 141, 142, 143, 144, 467, - 146, 614, 162, 169, 150, 151, 4, 153, 154, 155, - 162, 160, 598, 169, 162, 159, 4, 162, 159, 605, - 329, 54, 162, 160, 162, 22, 162, 160, 337, 338, - 339, 340, 341, 160, 620, 169, 162, 597, 141, 142, - 143, 144, 165, 146, 160, 167, 160, 150, 151, 662, - 153, 154, 155, 666, 667, 160, 160, 17, 526, 527, - 528, 529, 160, 531, 26, 27, 167, 535, 536, 160, - 160, 54, 4, 162, 152, 159, 159, 22, 17, 17, - 162, 17, 73, 669, 17, 698, 699, 93, 701, 638, - 703, 659, 112, 106, 707, 238, 249, 17, 90, 659, - 713, 57, 133, 620, 460, 133, -1, 416, 417, 418, - 419, 579, 580, 581, 582, -1, 425, -1, -1, 7, + 0, 27, 158, 196, 11, 11, 0, 320, 239, 161, + 458, 4, 446, 447, 55, 28, 159, 17, 211, 212, + 213, 214, 215, 17, 266, 267, 21, 192, 221, 34, + 172, 11, 55, 656, 29, 55, 288, 536, 55, 193, + 11, 162, 162, 55, 162, 55, 162, 161, 169, 54, + 673, 171, 78, 171, 55, 171, 7, 8, 55, 10, + 11, 12, 13, 14, 15, 16, 17, 53, 19, 20, + 55, 22, 23, 24, 54, 59, 102, 156, 162, 158, + 106, 223, 68, 54, 336, 162, 112, 171, 161, 254, + 7, 256, 118, 93, 171, 162, 18, 240, 241, 50, + 534, 255, 19, 257, 171, 22, 162, 24, 41, 42, + 121, 32, 33, 169, 55, 48, 142, 143, 159, 11, + 146, 54, 42, 43, 44, 17, 152, 47, 169, 20, + 161, 630, 23, 375, 582, 161, 159, 636, 637, 159, + 151, 162, 159, 169, 167, 338, 167, 159, 165, 159, + 34, 163, 162, 163, 396, 397, 398, 170, 159, 160, + 167, 167, 159, 0, 612, 162, 163, 165, 194, 195, + 196, 197, 117, 118, 159, 160, 171, 170, 677, 678, + 161, 680, 681, 161, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 509, 19, 697, 698, + 22, 22, 24, 282, 162, 231, 285, 286, 287, 167, + 46, 404, 48, 164, 165, 54, 242, 168, 159, 170, + 171, 21, 163, 162, 156, 157, 158, 420, 167, 422, + 423, 424, 54, 7, 8, 477, 35, 22, 37, 552, + 42, 554, 44, 322, 22, 19, 20, 22, 22, 23, + 24, 330, 331, 332, 333, 334, 408, 141, 142, 143, + 144, 160, 146, 162, 132, 133, 150, 151, 4, 153, + 154, 155, 160, 299, 162, 160, 159, 162, 160, 431, + 162, 4, 121, 122, 160, 279, 162, 132, 133, 37, + 316, 317, 318, 62, 63, 64, 65, 66, 67, 121, + 122, 614, 141, 142, 166, 144, 145, 463, 147, 148, + 149, 337, 338, 132, 133, 166, 114, 115, 159, 141, + 142, 163, 144, 145, 4, 147, 148, 149, 84, 85, + 409, 410, 411, 412, 161, 22, 162, 160, 169, 418, + 4, 42, 43, 44, 45, 46, 47, 48, 49, 375, + 51, 160, 159, 432, 365, 366, 367, 368, 369, 370, + 371, 592, 555, 55, 57, 558, 559, 560, 11, 380, + 381, 382, 169, 22, 160, 159, 159, 159, 404, 159, + 159, 162, 408, 159, 463, 162, 159, 159, 159, 159, + 38, 4, 38, 159, 420, 421, 422, 423, 424, 162, + 162, 162, 162, 162, 430, 431, 485, 159, 159, 159, + 159, 490, 22, 492, 61, 162, 495, 162, 162, 165, + 162, 162, 448, 162, 162, 162, 505, 506, 162, 508, + 661, 162, 162, 664, 162, 162, 162, 169, 449, 450, + 451, 452, 162, 162, 38, 22, 472, 17, 17, 460, + 162, 477, 162, 162, 162, 156, 157, 158, 162, 4, + 162, 4, 162, 162, 162, 4, 545, 546, 162, 548, + 549, 550, 551, 162, 162, 22, 162, 556, 504, 162, + 38, 162, 4, 162, 510, 564, 160, 169, 159, 162, + 162, 570, 169, 4, 159, 54, 162, 160, 285, 286, + 287, 162, 162, 160, 530, 160, 22, 169, 519, 520, + 521, 522, 162, 524, 165, 167, 160, 528, 529, 160, + 160, 160, 17, 160, 160, 167, 160, 54, 607, 555, + 4, 152, 558, 559, 560, 322, 162, 159, 22, 159, + 17, 17, 17, 330, 331, 332, 333, 334, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 162, 73, + 17, 572, 573, 574, 575, 591, 652, 93, 631, 106, + 112, 17, 598, 231, 242, 90, 655, 57, 133, 613, + 659, 660, 453, 141, 142, 143, 144, 613, 146, 133, + 590, -1, 150, 151, -1, 153, 154, 155, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 619, -1, + 621, 622, 691, 692, -1, 694, -1, 696, -1, -1, + -1, 700, 409, 410, 411, 412, -1, 706, -1, -1, + -1, 418, -1, -1, 7, 8, 662, 10, 11, 12, + 13, 14, 15, 16, 17, 432, 19, 20, -1, 22, + 23, 24, 652, -1, -1, -1, 7, 8, -1, 10, + 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, + -1, 22, 23, 24, -1, -1, -1, 50, -1, -1, + 141, 142, 143, 144, -1, 146, -1, -1, 39, 150, + 151, -1, 153, 154, 155, -1, -1, -1, 485, 50, + -1, -1, -1, 490, -1, 492, -1, -1, 495, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 505, 506, + -1, 508, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, - 439, 19, 20, -1, 22, 23, 24, -1, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, -1, -1, -1, 0, -1, -1, 626, -1, - 628, 629, 50, -1, -1, -1, -1, -1, -1, -1, + -1, 19, 20, -1, 22, 23, 24, -1, 545, 546, + -1, 548, 549, 550, 551, -1, -1, -1, -1, 556, + -1, -1, -1, -1, -1, -1, -1, 564, -1, -1, + -1, -1, 50, 570, -1, -1, -1, -1, -1, -1, + -1, 164, 165, -1, -1, 168, -1, 170, 171, -1, + -1, -1, -1, -1, -1, 3, 4, 5, 6, 7, + 8, 9, -1, 164, 165, 0, -1, 168, -1, 170, + 607, 19, 20, -1, 22, 23, 24, 25, 26, 27, -1, -1, -1, 18, 19, 20, -1, 22, 23, 24, - -1, -1, -1, 492, -1, 30, 31, -1, 497, -1, - 499, -1, -1, 502, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 512, 513, -1, 515, 52, -1, -1, - -1, 56, -1, -1, -1, 60, -1, -1, -1, -1, - -1, -1, -1, -1, 7, 8, -1, 10, 11, 12, - 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, - 23, 24, -1, 552, 553, -1, 555, 556, 557, 558, - -1, -1, -1, -1, 563, -1, -1, -1, -1, -1, - -1, -1, 571, -1, -1, -1, -1, 50, 577, -1, - -1, -1, -1, -1, -1, -1, 164, 165, -1, -1, - 168, -1, 170, 171, -1, -1, -1, -1, -1, -1, - 3, 4, 5, 6, 7, 8, 9, -1, -1, 0, - -1, -1, -1, -1, -1, 614, 19, 20, -1, 22, - 23, 24, 25, 26, 27, -1, -1, 18, 19, 20, - -1, 22, 23, 24, -1, -1, -1, 40, 41, 30, - 31, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 54, -1, -1, -1, -1, 59, -1, -1, -1, - -1, 52, -1, 662, -1, 56, -1, 666, 667, 60, - -1, -1, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 164, 165, -1, -1, 168, -1, 170, 171, 698, - 699, -1, 701, -1, 703, -1, -1, -1, 707, -1, - -1, -1, -1, -1, 713, -1, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, -1, - 133, -1, 135, 136, 137, -1, 139, 140, 141, 142, - -1, 144, 145, -1, 147, 148, 149, -1, -1, -1, - -1, -1, -1, -1, 3, 4, 5, 6, 7, 8, - 9, -1, 165, -1, -1, 168, -1, 170, -1, 172, - 19, 20, -1, 22, 23, 24, 25, 26, 27, -1, + -1, -1, 40, 41, -1, 30, 31, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 54, -1, -1, -1, + -1, 59, -1, -1, -1, -1, -1, 52, 655, -1, + -1, 56, 659, 660, -1, 60, -1, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 164, 165, -1, -1, + 168, -1, 170, 171, 691, 692, -1, 694, -1, 696, + -1, -1, -1, 700, -1, -1, -1, -1, -1, 706, + -1, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, -1, 133, -1, 135, 136, 137, + -1, 139, 140, 141, 142, -1, 144, 145, -1, 147, + 148, 149, -1, -1, -1, -1, -1, -1, -1, 3, + 4, 5, 6, 7, 8, 9, -1, 165, -1, -1, + 168, -1, 170, -1, 172, 19, 20, -1, 22, 23, + 24, 25, 26, 27, 26, 27, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 40, 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 40, 41, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 55, -1, 7, 8, - 59, 10, 11, 12, 13, 14, 15, 16, 17, -1, - 19, 20, -1, 22, 23, 24, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, -1, -1, -1, -1, -1, - -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 55, -1, 7, 8, 59, 10, 11, 12, 13, + 14, 15, 16, 17, -1, 19, 20, -1, 22, 23, + 24, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + -1, -1, -1, -1, -1, -1, 50, -1, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, -1, -1, -1, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, -1, 133, + -1, 135, 136, 137, -1, 139, 140, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, -1, 133, -1, 135, 136, 137, -1, - 139, 140, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 159, -1, -1, -1, -1, + -1, 165, -1, -1, 168, -1, 170, -1, 172, 3, + 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 19, 20, -1, 22, 23, + 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 40, 41, -1, -1, + 164, 165, -1, -1, 168, -1, 170, 171, -1, -1, + -1, 55, 7, 8, -1, 10, 11, 12, 13, 14, + 15, 16, 17, -1, 19, 20, -1, 22, 23, 24, + -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 159, -1, -1, -1, -1, -1, 165, -1, -1, 168, - -1, 170, -1, 172, 3, 4, 5, 6, 7, 8, - 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 19, 20, -1, 22, 23, 24, 25, 26, 27, -1, + -1, -1, -1, -1, -1, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, -1, 133, + -1, 135, 136, 137, -1, 139, 140, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 40, 41, -1, -1, 164, 165, -1, -1, 168, - -1, 170, 171, -1, -1, -1, -1, -1, 7, 8, - 59, 10, 11, 12, 13, 14, 15, 16, 17, -1, - 19, 20, -1, 22, 23, 24, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, -1, -1, -1, -1, 7, - 8, 50, 10, 11, 12, 13, 14, 15, 16, 17, - -1, 19, 20, -1, 22, 23, 24, -1, -1, -1, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, -1, 133, -1, 135, 136, 137, -1, - 139, 140, 50, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 3, 4, 5, 6, -1, -1, 9, -1, - -1, -1, -1, -1, -1, -1, 165, -1, -1, 168, - -1, 170, -1, 172, 25, 26, 27, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, - 41, -1, 141, 142, -1, 144, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 59, -1, - -1, -1, -1, -1, -1, 164, 165, 125, -1, 168, - -1, 170, -1, -1, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 164, 165, -1, -1, - 168, -1, 170, -1, -1, -1, -1, -1, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, -1, 133, -1, 135, 136, 137, -1, 139, 140, - 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 19, 20, -1, 22, 23, 24, 25, -1, - -1, -1, -1, -1, 165, -1, -1, 168, -1, 170, - -1, 172, -1, 40, 41, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 7, 8, 55, 10, - 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, - -1, 22, 23, 24, -1, -1, -1, -1, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, -1, -1, 50, - -1, -1, -1, 7, 8, -1, 10, 11, 12, 13, - 14, 15, 16, 17, -1, 19, 20, -1, 22, 23, - 24, -1, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 39, 133, -1, 135, 136, - 137, -1, 139, 140, -1, -1, 50, -1, -1, -1, + -1, -1, -1, -1, -1, 159, -1, -1, -1, 163, + -1, 165, -1, -1, 168, -1, 170, -1, 172, 3, + 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 19, 20, -1, 22, 23, + 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 40, 41, -1, 164, + 165, -1, -1, 168, -1, 170, 171, -1, -1, -1, + -1, 55, 7, 8, -1, 10, 11, 12, 13, 14, + 15, 16, 17, -1, 19, 20, -1, 22, 23, 24, + -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + -1, -1, -1, -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 159, -1, 7, 8, 163, -1, 165, -1, - -1, 168, -1, 170, -1, 172, 19, 20, -1, 22, - 23, 24, 25, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 40, 41, -1, + -1, -1, -1, -1, -1, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, -1, 133, + -1, 135, 136, 137, -1, 139, 140, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 55, 164, 165, -1, 167, 168, -1, 170, + -1, -1, -1, -1, -1, 159, -1, -1, -1, -1, + -1, 165, -1, -1, 168, -1, 170, -1, 172, 3, + 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 19, 20, -1, 22, 23, + 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 40, 41, -1, 164, + 165, -1, -1, 168, -1, 170, 171, -1, -1, -1, + -1, -1, -1, 7, 8, 59, 10, 11, 12, 13, + 14, 15, 16, 17, -1, 19, 20, -1, 22, 23, + 24, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + -1, -1, -1, -1, 7, 8, 50, 10, 11, 12, + 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, + 23, 24, -1, -1, -1, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, -1, 133, + -1, 135, 136, 137, -1, 139, 140, 50, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 3, 4, 5, + 6, -1, -1, 9, -1, -1, -1, -1, -1, -1, + -1, 165, -1, -1, 168, -1, 170, -1, 172, 25, + 26, 27, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 40, 41, -1, 141, 142, -1, + 144, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 59, -1, -1, -1, -1, -1, -1, + 164, 165, 125, -1, 168, -1, 170, -1, -1, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 164, 165, -1, -1, 168, -1, 170, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, -1, - 133, -1, 135, 136, 137, -1, 139, 140, 7, 8, - -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, - 19, 20, -1, 22, 23, 24, 159, -1, -1, -1, - -1, -1, 165, -1, -1, 168, -1, 170, -1, 172, - 39, -1, -1, -1, -1, -1, -1, -1, -1, 7, - 8, 50, 10, 11, 12, 13, 14, 15, 16, 17, - -1, 19, 20, -1, 22, 23, 24, 7, 8, -1, + -1, 164, 165, -1, -1, 168, -1, 170, -1, -1, + -1, -1, -1, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, -1, 133, -1, 135, + 136, 137, -1, 139, 140, 7, 8, -1, 10, 11, + 12, 13, 14, 15, 16, 17, -1, 19, 20, -1, + 22, 23, 24, -1, -1, -1, -1, -1, -1, 165, + -1, -1, 168, -1, 170, -1, 172, 39, -1, -1, + -1, -1, -1, -1, -1, -1, 7, 8, 50, 10, + 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, + -1, 22, 23, 24, 7, 8, -1, 10, 11, 12, + 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, + 23, 24, -1, -1, -1, -1, -1, 7, 8, 50, 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, - 20, -1, 22, 23, 24, -1, -1, -1, -1, -1, - -1, -1, 50, -1, -1, -1, -1, -1, -1, 39, - -1, -1, -1, -1, -1, -1, -1, -1, 7, 8, - 50, 10, 11, 12, 13, 14, 15, 16, 17, -1, - 19, 20, -1, 22, 23, 24, -1, -1, -1, 7, + 20, -1, 22, 23, 24, 7, 8, 50, 10, 11, + 12, 13, 14, 15, 16, 17, -1, 19, 20, 39, + 22, 23, 24, -1, -1, -1, -1, -1, -1, -1, + 50, -1, -1, -1, -1, -1, -1, 39, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 50, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 164, 165, -1, -1, 168, -1, 170, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, - 39, 19, 20, -1, 22, 23, 24, -1, -1, -1, - -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 164, 165, -1, -1, 168, - -1, 170, 50, 7, 8, -1, 10, 11, 12, 13, - 14, 15, 16, 17, -1, 19, 20, -1, 22, 23, - 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 164, 165, -1, 167, - 168, -1, 170, -1, -1, -1, 50, -1, -1, -1, - -1, -1, -1, -1, 164, 165, -1, -1, 168, -1, - 170, 7, 8, -1, 10, 11, 12, 13, 14, 15, - 16, 17, -1, 19, 20, -1, 22, 23, 24, -1, + -1, 19, 20, -1, 22, 23, 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 164, 165, -1, -1, 168, - -1, 170, -1, -1, 50, -1, -1, -1, -1, -1, + -1, -1, -1, 164, 165, -1, 167, 168, -1, 170, + -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, + -1, 164, 165, -1, 167, 168, -1, 170, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 164, 165, -1, -1, 168, -1, + 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 164, 165, -1, -1, 168, -1, 170, 7, + 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, + -1, 19, 20, -1, 22, 23, 24, -1, 7, 8, + -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, + 19, 20, -1, 22, 23, 24, -1, -1, -1, -1, + -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 164, 165, -1, -1, - 168, -1, 170, -1, 7, 8, -1, 10, 11, 12, + 168, 50, 170, 7, 8, -1, 10, 11, 12, 13, + 14, 15, 16, 17, -1, 19, 20, -1, 22, 23, + 24, 7, 8, -1, 10, 11, 12, 13, 14, 15, + 16, 17, -1, 19, 20, -1, 22, 23, 24, -1, + -1, -1, -1, -1, 7, 8, 50, 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, - 23, 24, 7, 8, -1, 10, 11, 12, 13, 14, + 23, 24, 7, 8, 50, 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, 23, 24, - 164, 165, -1, -1, 168, -1, 170, 50, -1, -1, - -1, 7, 8, -1, 10, 11, 12, 13, 14, 15, - 16, 17, -1, 19, 20, 50, 22, 23, 24, 7, - 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, - -1, 19, 20, -1, 22, 23, 24, -1, -1, -1, - -1, -1, -1, -1, 50, -1, -1, -1, 164, 165, - -1, -1, 168, -1, 170, -1, -1, -1, -1, -1, - 7, 8, 50, 10, 11, 12, 13, 14, 15, 16, - 17, -1, 19, 20, -1, 22, 23, 24, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 50, -1, -1, + -1, -1, -1, -1, -1, -1, 164, 165, -1, -1, + 168, -1, 170, -1, -1, 50, -1, 0, -1, -1, + -1, -1, -1, -1, -1, 164, 165, -1, -1, 168, + -1, 170, -1, -1, -1, 18, 19, 20, -1, 22, + 23, 24, -1, -1, -1, -1, -1, 30, 31, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 50, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 52, + 164, 165, -1, 56, 168, -1, 170, 60, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 164, 165, + -1, -1, 168, -1, 170, -1, -1, -1, -1, -1, + -1, -1, -1, 36, -1, -1, -1, -1, -1, -1, -1, 164, 165, -1, -1, 168, -1, 170, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 164, - 165, -1, -1, 168, -1, 170, -1, -1, -1, -1, + -1, -1, -1, -1, 57, 58, -1, -1, -1, 164, + 165, -1, -1, 168, -1, 170, 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, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 36, -1, -1, -1, -1, -1, -1, -1, 164, 165, - -1, -1, 168, -1, 170, -1, -1, -1, -1, -1, - -1, 57, 58, -1, -1, -1, 164, 165, -1, -1, - 168, -1, 170, 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, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 164, 165, -1, - -1, 168, -1, 170, -1, -1, -1, -1, 114, 115, - 116, -1, -1, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140 + -1, 114, 115, 116, -1, -1, 119, 120, 121, 122, + 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, + 133, 134, 135, 136, 137, 138, 139, 140 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -2759,77 +2760,76 @@ static const yytype_uint16 yystos[] = { 0, 19, 20, 22, 23, 24, 30, 31, 52, 56, - 60, 180, 183, 185, 186, 187, 221, 222, 223, 225, - 224, 53, 68, 230, 161, 59, 161, 18, 161, 42, + 60, 179, 182, 184, 185, 186, 220, 221, 222, 224, + 223, 53, 68, 229, 161, 59, 161, 18, 161, 42, 43, 44, 45, 46, 47, 48, 49, 51, 156, 157, - 158, 188, 189, 190, 0, 223, 46, 48, 191, 240, - 42, 43, 44, 47, 192, 237, 239, 247, 161, 161, - 165, 231, 22, 229, 7, 8, 10, 11, 12, 13, - 14, 15, 16, 17, 50, 164, 165, 168, 170, 180, - 185, 208, 209, 243, 190, 190, 35, 37, 219, 190, - 190, 21, 248, 249, 29, 171, 238, 248, 22, 22, - 22, 232, 159, 4, 4, 4, 170, 10, 171, 209, - 214, 55, 159, 182, 219, 219, 42, 44, 193, 32, - 33, 218, 62, 63, 64, 65, 66, 67, 194, 235, - 235, 7, 183, 184, 252, 162, 167, 39, 209, 210, - 212, 213, 166, 166, 171, 214, 162, 171, 159, 213, - 163, 218, 218, 10, 125, 209, 211, 220, 11, 12, - 13, 14, 15, 16, 179, 209, 215, 4, 198, 28, - 170, 236, 161, 36, 57, 58, 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, 114, 115, 116, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 174, 175, 176, 250, - 257, 258, 259, 260, 250, 258, 22, 196, 162, 160, - 209, 209, 169, 171, 209, 4, 160, 215, 209, 159, - 243, 3, 4, 5, 6, 26, 27, 9, 25, 40, - 41, 90, 91, 92, 93, 119, 133, 135, 136, 137, - 139, 140, 165, 168, 170, 172, 174, 175, 176, 216, - 243, 182, 141, 142, 144, 197, 211, 57, 10, 209, - 245, 246, 11, 17, 11, 194, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 177, 26, 27, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 178, 177, 178, 209, 209, 245, 209, - 209, 253, 245, 245, 245, 245, 245, 209, 209, 209, - 209, 209, 245, 194, 117, 118, 54, 121, 122, 141, - 142, 144, 145, 147, 148, 149, 195, 39, 210, 200, - 167, 169, 169, 160, 200, 182, 182, 220, 177, 178, - 177, 178, 159, 159, 159, 159, 159, 159, 159, 167, - 215, 217, 170, 217, 171, 217, 22, 159, 159, 159, - 226, 185, 3, 4, 5, 6, 9, 25, 26, 27, - 40, 41, 59, 165, 168, 170, 172, 216, 242, 243, - 244, 162, 244, 244, 244, 198, 209, 209, 209, 209, - 162, 203, 162, 203, 244, 165, 162, 162, 162, 162, - 162, 162, 244, 244, 244, 244, 244, 38, 198, 209, - 245, 4, 141, 142, 143, 144, 146, 150, 151, 153, - 154, 155, 199, 227, 228, 38, 159, 159, 159, 159, - 215, 215, 215, 215, 215, 215, 215, 162, 167, 171, - 209, 217, 169, 171, 215, 215, 215, 162, 206, 159, - 61, 241, 167, 217, 170, 217, 171, 217, 22, 245, - 162, 162, 211, 244, 244, 244, 244, 11, 54, 11, - 255, 244, 165, 245, 209, 245, 245, 245, 162, 162, - 256, 162, 162, 162, 209, 211, 244, 162, 206, 206, - 209, 215, 215, 215, 215, 255, 162, 162, 162, 162, - 256, 162, 215, 169, 171, 162, 162, 38, 34, 54, - 204, 207, 39, 209, 233, 234, 22, 167, 171, 217, - 169, 171, 17, 17, 244, 162, 162, 162, 162, 244, - 4, 244, 162, 162, 244, 162, 162, 162, 4, 4, - 162, 209, 244, 244, 244, 162, 203, 209, 160, 162, - 162, 162, 162, 160, 215, 215, 215, 215, 160, 215, - 169, 215, 215, 209, 22, 4, 206, 196, 162, 160, - 162, 169, 171, 244, 244, 159, 244, 244, 244, 244, - 203, 203, 245, 244, 162, 245, 245, 245, 4, 244, - 159, 244, 215, 215, 215, 215, 162, 160, 162, 162, - 256, 160, 160, 160, 180, 181, 39, 209, 200, 22, - 169, 162, 165, 17, 209, 254, 167, 244, 256, 254, - 203, 160, 160, 160, 160, 215, 215, 215, 160, 196, - 204, 205, 17, 11, 167, 251, 196, 196, 160, 162, - 167, 160, 160, 160, 160, 181, 54, 202, 244, 242, - 11, 167, 121, 122, 244, 244, 200, 17, 209, 200, - 4, 152, 201, 162, 242, 196, 196, 38, 196, 196, - 22, 17, 162, 17, 244, 244, 244, 17, 244, 196, - 196, 244, 73, 17, 244 + 158, 187, 188, 189, 0, 222, 46, 48, 190, 239, + 42, 43, 44, 47, 191, 236, 238, 246, 161, 161, + 165, 230, 22, 228, 7, 8, 10, 11, 12, 13, + 14, 15, 16, 17, 50, 164, 165, 168, 170, 179, + 184, 207, 208, 242, 189, 189, 35, 37, 218, 189, + 189, 21, 247, 248, 29, 171, 237, 247, 22, 22, + 22, 231, 159, 4, 4, 4, 170, 10, 171, 208, + 213, 55, 159, 181, 218, 218, 42, 44, 192, 32, + 33, 217, 62, 63, 64, 65, 66, 67, 193, 234, + 234, 7, 182, 183, 251, 162, 167, 39, 208, 209, + 211, 212, 166, 166, 171, 213, 162, 171, 159, 212, + 163, 217, 217, 10, 125, 208, 210, 219, 208, 214, + 4, 197, 28, 170, 235, 161, 36, 57, 58, 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, 114, 115, 116, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 174, + 175, 176, 249, 256, 257, 258, 259, 249, 257, 22, + 195, 162, 160, 208, 208, 169, 171, 208, 4, 160, + 214, 208, 159, 242, 3, 4, 5, 6, 9, 25, + 26, 27, 40, 41, 90, 91, 92, 93, 119, 133, + 135, 136, 137, 139, 140, 165, 168, 170, 172, 174, + 175, 176, 215, 242, 181, 141, 142, 144, 196, 210, + 57, 10, 208, 244, 245, 11, 17, 11, 193, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 177, + 26, 27, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 178, 177, 178, 208, + 208, 244, 208, 208, 252, 244, 244, 244, 244, 244, + 208, 208, 208, 208, 208, 244, 193, 117, 118, 54, + 121, 122, 141, 142, 144, 145, 147, 148, 149, 194, + 39, 209, 199, 167, 169, 169, 160, 199, 181, 181, + 219, 177, 178, 177, 178, 159, 159, 159, 159, 159, + 159, 159, 167, 214, 216, 170, 216, 171, 216, 22, + 159, 159, 159, 225, 184, 3, 4, 5, 6, 9, + 25, 26, 27, 40, 41, 59, 165, 168, 170, 172, + 215, 241, 242, 243, 162, 243, 243, 243, 197, 208, + 208, 208, 208, 162, 202, 162, 202, 243, 165, 162, + 162, 162, 162, 162, 162, 243, 243, 243, 243, 243, + 38, 197, 208, 244, 4, 141, 142, 143, 144, 146, + 150, 151, 153, 154, 155, 198, 226, 227, 38, 159, + 159, 159, 159, 214, 214, 214, 214, 214, 214, 214, + 162, 167, 171, 208, 216, 169, 171, 214, 214, 214, + 162, 205, 159, 61, 240, 167, 216, 170, 216, 171, + 216, 22, 244, 162, 162, 210, 243, 243, 243, 243, + 11, 54, 11, 254, 243, 165, 244, 208, 244, 244, + 244, 162, 162, 255, 162, 162, 162, 208, 210, 243, + 162, 205, 205, 208, 214, 214, 214, 214, 254, 162, + 162, 162, 162, 255, 162, 214, 169, 171, 162, 162, + 38, 34, 54, 203, 206, 39, 208, 232, 233, 22, + 167, 171, 216, 169, 171, 17, 17, 243, 162, 162, + 162, 162, 243, 4, 243, 162, 162, 243, 162, 162, + 162, 4, 4, 162, 208, 243, 243, 243, 162, 202, + 208, 160, 162, 162, 162, 162, 160, 214, 214, 214, + 214, 160, 214, 169, 214, 214, 208, 22, 4, 205, + 195, 162, 160, 162, 169, 171, 243, 243, 159, 243, + 243, 243, 243, 202, 202, 244, 243, 162, 244, 244, + 244, 4, 243, 159, 243, 214, 214, 214, 214, 162, + 160, 162, 162, 255, 160, 160, 160, 179, 180, 39, + 208, 199, 22, 169, 162, 165, 17, 208, 253, 167, + 243, 255, 253, 202, 160, 160, 160, 160, 214, 214, + 214, 160, 195, 203, 204, 17, 11, 167, 250, 195, + 195, 160, 162, 167, 160, 160, 160, 160, 180, 54, + 201, 243, 241, 11, 167, 121, 122, 243, 243, 199, + 17, 208, 199, 4, 152, 200, 162, 241, 195, 195, + 38, 195, 195, 22, 17, 162, 17, 243, 243, 243, + 17, 243, 195, 195, 243, 73, 17, 243 }; #define yyerrok (yyerrstatus = 0) @@ -3773,213 +3773,213 @@ { (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;} break; - case 64: -#line 1173 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 59: +#line 1169 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; - case 65: -#line 1175 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 60: +#line 1171 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=(yyvsp[(3) - (4)].UInt64Val); ;} break; - case 66: -#line 1176 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 61: +#line 1172 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=0; ;} break; - case 67: -#line 1180 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 62: +#line 1176 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR ;} break; - case 68: -#line 1184 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 63: +#line 1180 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR ;} break; - case 69: -#line 1189 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 64: +#line 1185 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(1) - (2)].UIntVal); CHECK_FOR_ERROR ;} break; - case 73: -#line 1198 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 68: +#line 1194 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR ;} break; - case 74: -#line 1203 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 69: +#line 1199 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR ;} break; - case 75: -#line 1209 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 70: +#line 1205 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; - case 76: -#line 1210 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 71: +#line 1206 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; - case 77: -#line 1211 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 72: +#line 1207 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; - case 78: -#line 1212 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 73: +#line 1208 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; - case 79: -#line 1213 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 74: +#line 1209 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; - case 80: -#line 1214 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 75: +#line 1210 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::CommonLinkage; ;} break; - case 81: -#line 1218 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 76: +#line 1214 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; - case 82: -#line 1219 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 77: +#line 1215 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; - case 83: -#line 1220 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 78: +#line 1216 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; - case 84: -#line 1224 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 79: +#line 1220 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; - case 85: -#line 1225 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 80: +#line 1221 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; - case 86: -#line 1226 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 81: +#line 1222 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::HiddenVisibility; ;} break; - case 87: -#line 1227 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 82: +#line 1223 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::ProtectedVisibility; ;} break; - case 88: -#line 1231 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 83: +#line 1227 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; - case 89: -#line 1232 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 84: +#line 1228 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; - case 90: -#line 1233 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 85: +#line 1229 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; - case 91: -#line 1237 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 86: +#line 1233 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; - case 92: -#line 1238 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 87: +#line 1234 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; - case 93: -#line 1239 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 88: +#line 1235 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; - case 94: -#line 1240 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 89: +#line 1236 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; - case 95: -#line 1241 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 90: +#line 1237 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; - case 96: -#line 1245 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 91: +#line 1241 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; - case 97: -#line 1246 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 92: +#line 1242 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; - case 98: -#line 1247 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 93: +#line 1243 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; - case 99: -#line 1250 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 94: +#line 1246 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; - case 100: -#line 1251 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 95: +#line 1247 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; - case 101: -#line 1252 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 96: +#line 1248 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Fast; ;} break; - case 102: -#line 1253 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 97: +#line 1249 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Cold; ;} break; - case 103: -#line 1254 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 98: +#line 1250 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_StdCall; ;} break; - case 104: -#line 1255 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 99: +#line 1251 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_FastCall; ;} break; - case 105: -#line 1256 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 100: +#line 1252 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val)) GEN_ERROR("Calling conv too large"); @@ -3988,177 +3988,177 @@ ;} break; - case 106: -#line 1263 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 101: +#line 1259 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; - case 107: -#line 1264 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 102: +#line 1260 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; - case 108: -#line 1265 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 103: +#line 1261 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; - case 109: -#line 1266 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 104: +#line 1262 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; - case 110: -#line 1267 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 105: +#line 1263 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::InReg; ;} break; - case 111: -#line 1268 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 106: +#line 1264 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::StructRet; ;} break; - case 112: -#line 1269 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 107: +#line 1265 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoAlias; ;} break; - case 113: -#line 1270 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 108: +#line 1266 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ByVal; ;} break; - case 114: -#line 1271 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 109: +#line 1267 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::Nest; ;} break; - case 115: -#line 1272 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 110: +#line 1268 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::constructAlignmentFromInt((yyvsp[(2) - (2)].UInt64Val)); ;} break; - case 116: -#line 1276 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 111: +#line 1272 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::None; ;} break; - case 117: -#line 1277 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 112: +#line 1273 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes); ;} break; - case 118: -#line 1282 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 113: +#line 1278 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::InReg; ;} break; - case 119: -#line 1283 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 114: +#line 1279 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; - case 120: -#line 1284 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 115: +#line 1280 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; - case 121: -#line 1287 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 116: +#line 1283 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::None; ;} break; - case 122: -#line 1288 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 117: +#line 1284 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes); ;} break; - case 123: -#line 1294 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 118: +#line 1290 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoReturn; ;} break; - case 124: -#line 1295 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 119: +#line 1291 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoUnwind; ;} break; - case 125: -#line 1296 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 120: +#line 1292 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::InReg; ;} break; - case 126: -#line 1297 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 121: +#line 1293 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; - case 127: -#line 1298 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 122: +#line 1294 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; - case 128: -#line 1299 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 123: +#line 1295 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ReadNone; ;} break; - case 129: -#line 1300 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 124: +#line 1296 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ReadOnly; ;} break; - case 130: -#line 1301 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 125: +#line 1297 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoInline; ;} break; - case 131: -#line 1302 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 126: +#line 1298 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::AlwaysInline; ;} break; - case 132: -#line 1303 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 127: +#line 1299 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::OptimizeForSize; ;} break; - case 133: -#line 1306 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 128: +#line 1302 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::None; ;} break; - case 134: -#line 1307 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 129: +#line 1303 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes); ;} break; - case 135: -#line 1313 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 130: +#line 1309 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; - case 136: -#line 1314 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 131: +#line 1310 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(2) - (2)].StrVal); ;} break; - case 137: -#line 1321 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 132: +#line 1317 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; - case 138: -#line 1322 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 133: +#line 1318 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(2) - (2)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4167,13 +4167,13 @@ ;} break; - case 139: -#line 1328 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 134: +#line 1324 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; - case 140: -#line 1329 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 135: +#line 1325 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(3) - (3)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4182,8 +4182,8 @@ ;} break; - case 141: -#line 1338 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 136: +#line 1334 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { for (unsigned i = 0, e = (yyvsp[(2) - (2)].StrVal)->length(); i != e; ++i) if ((*(yyvsp[(2) - (2)].StrVal))[i] == '"' || (*(yyvsp[(2) - (2)].StrVal))[i] == '\\') @@ -4193,28 +4193,28 @@ ;} break; - case 142: -#line 1346 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 137: +#line 1342 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; - case 143: -#line 1347 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 138: +#line 1343 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (1)].StrVal); ;} break; - case 144: -#line 1352 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 139: +#line 1348 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; - case 145: -#line 1353 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 140: +#line 1349 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; - case 146: -#line 1354 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 141: +#line 1350 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV->setSection(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -4222,8 +4222,8 @@ ;} break; - case 147: -#line 1359 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 142: +#line 1355 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(2) - (2)].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[(2) - (2)].UInt64Val))) GEN_ERROR("Alignment must be a power of two"); @@ -4232,24 +4232,24 @@ ;} break; - case 155: -#line 1375 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 150: +#line 1371 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(OpaqueType::get()); CHECK_FOR_ERROR ;} break; - case 156: -#line 1379 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 151: +#line 1375 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[(1) - (1)].PrimType)); CHECK_FOR_ERROR ;} break; - case 157: -#line 1383 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 152: +#line 1379 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Pointer type? if (*(yyvsp[(1) - (3)].TypeVal) == Type::LabelTy) GEN_ERROR("Cannot form a pointer to a basic block"); @@ -4259,8 +4259,8 @@ ;} break; - case 158: -#line 1390 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 153: +#line 1386 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... const Type* tmp = getTypeVal((yyvsp[(1) - (1)].ValIDVal)); CHECK_FOR_ERROR @@ -4268,8 +4268,8 @@ ;} break; - case 159: -#line 1395 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 154: +#line 1391 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if ((yyvsp[(2) - (2)].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -4280,8 +4280,8 @@ ;} break; - case 160: -#line 1403 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 155: +#line 1399 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4319,8 +4319,8 @@ ;} break; - case 161: -#line 1438 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 156: +#line 1434 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4353,8 +4353,8 @@ ;} break; - case 162: -#line 1469 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 157: +#line 1465 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Sized array type? (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[(4) - (5)].TypeVal), (yyvsp[(2) - (5)].UInt64Val)))); delete (yyvsp[(4) - (5)].TypeVal); @@ -4362,8 +4362,8 @@ ;} break; - case 163: -#line 1474 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 158: +#line 1470 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Vector type? const llvm::Type* ElemTy = (yyvsp[(4) - (5)].TypeVal)->get(); if ((unsigned)(yyvsp[(2) - (5)].UInt64Val) != (yyvsp[(2) - (5)].UInt64Val)) @@ -4376,8 +4376,8 @@ ;} break; - case 164: -#line 1484 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 159: +#line 1480 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = (yyvsp[(2) - (3)].TypeList)->begin(), @@ -4390,16 +4390,16 @@ ;} break; - case 165: -#line 1494 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 160: +#line 1490 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector())); CHECK_FOR_ERROR ;} break; - case 166: -#line 1498 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 161: +#line 1494 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements; for (std::list::iterator I = (yyvsp[(3) - (5)].TypeList)->begin(), @@ -4412,16 +4412,16 @@ ;} break; - case 167: -#line 1508 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 162: +#line 1504 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector(), true)); CHECK_FOR_ERROR ;} break; - case 168: -#line 1515 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 163: +#line 1511 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4430,8 +4430,8 @@ ;} break; - case 169: -#line 1524 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 164: +#line 1520 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (1)].TypeVal))->getDescription()); @@ -4441,15 +4441,15 @@ ;} break; - case 170: -#line 1531 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 165: +#line 1527 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(Type::VoidTy); ;} break; - case 171: -#line 1536 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 166: +#line 1532 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); (yyval.TypeWithAttrsList)->push_back((yyvsp[(1) - (1)].TypeWithAttrs)); @@ -4457,16 +4457,16 @@ ;} break; - case 172: -#line 1541 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 167: +#line 1537 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList))->push_back((yyvsp[(3) - (3)].TypeWithAttrs)); CHECK_FOR_ERROR ;} break; - case 174: -#line 1549 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 169: +#line 1545 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList); TypeWithAttrs TWA; TWA.Attrs = Attribute::None; @@ -4476,8 +4476,8 @@ ;} break; - case 175: -#line 1556 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 170: +#line 1552 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList; TypeWithAttrs TWA; TWA.Attrs = Attribute::None; @@ -4487,16 +4487,16 @@ ;} break; - case 176: -#line 1563 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 171: +#line 1559 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); CHECK_FOR_ERROR ;} break; - case 177: -#line 1571 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 172: +#line 1567 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); (yyval.TypeList)->push_back(*(yyvsp[(1) - (1)].TypeVal)); @@ -4505,8 +4505,8 @@ ;} break; - case 178: -#line 1577 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 173: +#line 1573 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[(1) - (3)].TypeList))->push_back(*(yyvsp[(3) - (3)].TypeVal)); delete (yyvsp[(3) - (3)].TypeVal); @@ -4514,8 +4514,8 @@ ;} break; - case 179: -#line 1589 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 174: +#line 1585 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4546,8 +4546,8 @@ ;} break; - case 180: -#line 1617 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 175: +#line 1613 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4566,8 +4566,8 @@ ;} break; - case 181: -#line 1633 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 176: +#line 1629 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4597,8 +4597,8 @@ ;} break; - case 182: -#line 1660 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 177: +#line 1656 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4629,8 +4629,8 @@ ;} break; - case 183: -#line 1688 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 178: +#line 1684 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (4)].TypeVal)->get()); if (STy == 0) @@ -4659,8 +4659,8 @@ ;} break; - case 184: -#line 1714 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 179: +#line 1710 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4683,8 +4683,8 @@ ;} break; - case 185: -#line 1734 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 180: +#line 1730 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (6)].TypeVal)->get()); if (STy == 0) @@ -4713,8 +4713,8 @@ ;} break; - case 186: -#line 1760 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 181: +#line 1756 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (5)].TypeVal))->getDescription()); @@ -4737,8 +4737,8 @@ ;} break; - case 187: -#line 1780 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 182: +#line 1776 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4753,8 +4753,8 @@ ;} break; - case 188: -#line 1792 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 183: +#line 1788 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4764,8 +4764,8 @@ ;} break; - case 189: -#line 1799 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 184: +#line 1795 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4834,8 +4834,8 @@ ;} break; - case 190: -#line 1865 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 185: +#line 1861 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4848,8 +4848,8 @@ ;} break; - case 191: -#line 1875 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 186: +#line 1871 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4862,94 +4862,115 @@ ;} break; - case 192: -#line 1885 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 187: +#line 1881 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants - if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].SInt64Val))) - GEN_ERROR("Constant value doesn't fit in type"); - (yyval.ConstVal) = ConstantInt::get((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].SInt64Val), true); + if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { + if (!ConstantInt::isValueValidForType(IT, (yyvsp[(2) - (2)].SInt64Val))) + GEN_ERROR("Constant value doesn't fit in type"); + (yyval.ConstVal) = ConstantInt::get(IT, (yyvsp[(2) - (2)].SInt64Val), true); + } else { + GEN_ERROR("integer constant must have integer type"); + } + delete (yyvsp[(1) - (2)].TypeVal); CHECK_FOR_ERROR ;} break; - case 193: -#line 1891 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 188: +#line 1892 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants - uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth(); - if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) { - GEN_ERROR("Constant value does not fit in type"); + if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { + if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > IT->getBitWidth()) + GEN_ERROR("Constant value does not fit in type"); + (yyvsp[(2) - (2)].APIntVal)->sextOrTrunc(IT->getBitWidth()); + (yyval.ConstVal) = ConstantInt::get(*(yyvsp[(2) - (2)].APIntVal)); + } else { + GEN_ERROR("integer constant must have integer type"); } - (yyvsp[(2) - (2)].APIntVal)->sextOrTrunc(BitWidth); - (yyval.ConstVal) = ConstantInt::get(*(yyvsp[(2) - (2)].APIntVal)); + delete (yyvsp[(1) - (2)].TypeVal); delete (yyvsp[(2) - (2)].APIntVal); CHECK_FOR_ERROR ;} break; - case 194: -#line 1901 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 189: +#line 1905 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants - if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].UInt64Val))) - GEN_ERROR("Constant value doesn't fit in type"); - (yyval.ConstVal) = ConstantInt::get((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].UInt64Val), false); + if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { + if (!ConstantInt::isValueValidForType(IT, (yyvsp[(2) - (2)].UInt64Val))) + GEN_ERROR("Constant value doesn't fit in type"); + (yyval.ConstVal) = ConstantInt::get(IT, (yyvsp[(2) - (2)].UInt64Val), false); + } else { + GEN_ERROR("integer constant must have integer type"); + } + delete (yyvsp[(1) - (2)].TypeVal); CHECK_FOR_ERROR ;} break; - case 195: -#line 1907 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 190: +#line 1916 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants - uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth(); - if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) { - GEN_ERROR("Constant value does not fit in type"); + if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { + if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > IT->getBitWidth()) + GEN_ERROR("Constant value does not fit in type"); + (yyvsp[(2) - (2)].APIntVal)->zextOrTrunc(IT->getBitWidth()); + (yyval.ConstVal) = ConstantInt::get(*(yyvsp[(2) - (2)].APIntVal)); + } else { + GEN_ERROR("integer constant must have integer type"); } - (yyvsp[(2) - (2)].APIntVal)->zextOrTrunc(BitWidth); - (yyval.ConstVal) = ConstantInt::get(*(yyvsp[(2) - (2)].APIntVal)); + delete (yyvsp[(2) - (2)].APIntVal); + delete (yyvsp[(1) - (2)].TypeVal); CHECK_FOR_ERROR ;} break; - case 196: -#line 1917 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 191: +#line 1930 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants - if (cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() != 1) + if ((yyvsp[(1) - (2)].TypeVal)->get() != Type::Int1Ty) GEN_ERROR("Constant true must have type i1"); (yyval.ConstVal) = ConstantInt::getTrue(); + delete (yyvsp[(1) - (2)].TypeVal); CHECK_FOR_ERROR ;} break; - case 197: -#line 1923 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 192: +#line 1937 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants - if (cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() != 1) + if ((yyvsp[(1) - (2)].TypeVal)->get() != Type::Int1Ty) GEN_ERROR("Constant false must have type i1"); (yyval.ConstVal) = ConstantInt::getFalse(); + delete (yyvsp[(1) - (2)].TypeVal); CHECK_FOR_ERROR ;} break; - case 198: -#line 1929 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 193: +#line 1944 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Floating point constants - if (!ConstantFP::isValueValidForType((yyvsp[(1) - (2)].PrimType), *(yyvsp[(2) - (2)].FPVal))) + if (!ConstantFP::isValueValidForType((yyvsp[(1) - (2)].TypeVal)->get(), *(yyvsp[(2) - (2)].FPVal))) GEN_ERROR("Floating point constant invalid for type"); + // Lexer has no type info, so builds all float and double FP constants // as double. Fix this here. Long double is done right. - if (&(yyvsp[(2) - (2)].FPVal)->getSemantics()==&APFloat::IEEEdouble && (yyvsp[(1) - (2)].PrimType)==Type::FloatTy) { + if (&(yyvsp[(2) - (2)].FPVal)->getSemantics()==&APFloat::IEEEdouble && (yyvsp[(1) - (2)].TypeVal)->get()==Type::FloatTy) { bool ignored; (yyvsp[(2) - (2)].FPVal)->convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven, &ignored); } (yyval.ConstVal) = ConstantFP::get(*(yyvsp[(2) - (2)].FPVal)); + delete (yyvsp[(1) - (2)].TypeVal); delete (yyvsp[(2) - (2)].FPVal); CHECK_FOR_ERROR ;} break; - case 199: -#line 1945 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 194: +#line 1962 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (6)].TypeVal))->getDescription()); @@ -4964,8 +4985,8 @@ ;} break; - case 200: -#line 1957 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 195: +#line 1974 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (5)].ConstVal)->getType())) GEN_ERROR("GetElementPtr requires a pointer operand"); @@ -4989,8 +5010,8 @@ ;} break; - case 201: -#line 1978 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 196: +#line 1995 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (8)].ConstVal)->getType() != Type::Int1Ty) GEN_ERROR("Select condition must be of boolean type"); @@ -5001,8 +5022,8 @@ ;} break; - case 202: -#line 1986 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 197: +#line 2003 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Binary operator types must match"); @@ -5011,8 +5032,8 @@ ;} break; - case 203: -#line 1992 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 198: +#line 2009 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Logical operator types must match"); @@ -5026,8 +5047,8 @@ ;} break; - case 204: -#line 2003 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 199: +#line 2020 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("icmp operand types must match"); @@ -5035,8 +5056,8 @@ ;} break; - case 205: -#line 2008 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 200: +#line 2025 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("fcmp operand types must match"); @@ -5044,8 +5065,8 @@ ;} break; - case 206: -#line 2013 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 201: +#line 2030 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vicmp operand types must match"); @@ -5053,8 +5074,8 @@ ;} break; - case 207: -#line 2018 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 202: +#line 2035 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vfcmp operand types must match"); @@ -5062,8 +5083,8 @@ ;} break; - case 208: -#line 2023 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 203: +#line 2040 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(3) - (6)].ConstVal), (yyvsp[(5) - (6)].ConstVal))) GEN_ERROR("Invalid extractelement operands"); @@ -5072,8 +5093,8 @@ ;} break; - case 209: -#line 2029 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 204: +#line 2046 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid insertelement operands"); @@ -5082,8 +5103,8 @@ ;} break; - case 210: -#line 2035 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 205: +#line 2052 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -5092,8 +5113,8 @@ ;} break; - case 211: -#line 2041 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 206: +#line 2058 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (5)].ConstVal)->getType()) && !isa((yyvsp[(3) - (5)].ConstVal)->getType())) GEN_ERROR("ExtractValue requires an aggregate operand"); @@ -5104,8 +5125,8 @@ ;} break; - case 212: -#line 2049 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 207: +#line 2066 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (7)].ConstVal)->getType()) && !isa((yyvsp[(3) - (7)].ConstVal)->getType())) GEN_ERROR("InsertValue requires an aggregate operand"); @@ -5116,16 +5137,16 @@ ;} break; - case 213: -#line 2060 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 208: +#line 2077 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ConstVector) = (yyvsp[(1) - (3)].ConstVector))->push_back((yyvsp[(3) - (3)].ConstVal)); CHECK_FOR_ERROR ;} break; - case 214: -#line 2064 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 209: +#line 2081 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector) = new std::vector(); (yyval.ConstVector)->push_back((yyvsp[(1) - (1)].ConstVal)); @@ -5133,28 +5154,28 @@ ;} break; - case 215: -#line 2072 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 210: +#line 2089 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; - case 216: -#line 2072 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 211: +#line 2089 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; - case 217: -#line 2075 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 212: +#line 2092 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; - case 218: -#line 2075 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 213: +#line 2092 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; - case 219: -#line 2078 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 214: +#line 2095 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { const Type* VTy = (yyvsp[(1) - (2)].TypeVal)->get(); Value *V = getVal(VTy, (yyvsp[(2) - (2)].ValIDVal)); @@ -5169,8 +5190,8 @@ ;} break; - case 220: -#line 2090 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 215: +#line 2107 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { Constant *Val = (yyvsp[(3) - (6)].ConstVal); const Type *DestTy = (yyvsp[(5) - (6)].TypeVal)->get(); @@ -5185,8 +5206,8 @@ ;} break; - case 221: -#line 2111 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 216: +#line 2128 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -5194,8 +5215,8 @@ ;} break; - case 222: -#line 2116 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 217: +#line 2133 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -5203,40 +5224,40 @@ ;} break; - case 225: -#line 2129 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 220: +#line 2146 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = false; ;} break; - case 226: -#line 2129 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 221: +#line 2146 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.FunctionDone(); CHECK_FOR_ERROR ;} break; - case 227: -#line 2133 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 222: +#line 2150 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ;} break; - case 228: -#line 2133 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 223: +#line 2150 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 229: -#line 2136 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 224: +#line 2153 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 230: -#line 2139 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 225: +#line 2156 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (3)].TypeVal))->getDescription()); @@ -5263,8 +5284,8 @@ ;} break; - case 231: -#line 2163 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 226: +#line 2180 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { ResolveTypeTo((yyvsp[(1) - (3)].StrVal), (yyvsp[(3) - (3)].PrimType)); @@ -5278,8 +5299,8 @@ ;} break; - case 232: -#line 2175 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 227: +#line 2192 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { /* "Externally Visible" Linkage */ if ((yyvsp[(5) - (6)].ConstVal) == 0) @@ -5290,15 +5311,15 @@ ;} break; - case 233: -#line 2182 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 228: +#line 2199 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; - case 234: -#line 2186 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 229: +#line 2203 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(6) - (7)].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant"); @@ -5307,15 +5328,15 @@ ;} break; - case 235: -#line 2191 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 230: +#line 2208 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; - case 236: -#line 2195 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 231: +#line 2212 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(6) - (7)].TypeVal))->getDescription()); @@ -5325,16 +5346,16 @@ ;} break; - case 237: -#line 2201 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 232: +#line 2218 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR ;} break; - case 238: -#line 2205 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 233: +#line 2222 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { std::string Name; if ((yyvsp[(1) - (5)].StrVal)) { @@ -5377,22 +5398,22 @@ ;} break; - case 239: -#line 2245 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 234: +#line 2262 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 240: -#line 2248 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 235: +#line 2265 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 241: -#line 2254 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 236: +#line 2271 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); if (AsmSoFar.empty()) @@ -5404,24 +5425,24 @@ ;} break; - case 242: -#line 2264 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 237: +#line 2281 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); ;} break; - case 243: -#line 2268 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 238: +#line 2285 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setDataLayout(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); ;} break; - case 245: -#line 2275 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 240: +#line 2292 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5429,8 +5450,8 @@ ;} break; - case 246: -#line 2280 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 241: +#line 2297 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5438,15 +5459,15 @@ ;} break; - case 247: -#line 2285 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 242: +#line 2302 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 248: -#line 2294 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 243: +#line 2311 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -5459,8 +5480,8 @@ ;} break; - case 249: -#line 2304 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 244: +#line 2321 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -5473,16 +5494,16 @@ ;} break; - case 250: -#line 2315 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 245: +#line 2332 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (1)].ArgList); CHECK_FOR_ERROR ;} break; - case 251: -#line 2319 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 246: +#line 2336 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (3)].ArgList); struct ArgListEntry E; @@ -5494,8 +5515,8 @@ ;} break; - case 252: -#line 2328 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 247: +#line 2345 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = new ArgListType; struct ArgListEntry E; @@ -5507,16 +5528,16 @@ ;} break; - case 253: -#line 2337 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 248: +#line 2354 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = 0; CHECK_FOR_ERROR ;} break; - case 254: -#line 2343 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 249: +#line 2360 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { std::string FunctionName(*(yyvsp[(4) - (11)].StrVal)); delete (yyvsp[(4) - (11)].StrVal); // Free strdup'd memory! @@ -5666,8 +5687,8 @@ ;} break; - case 257: -#line 2493 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 252: +#line 2510 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -5678,16 +5699,16 @@ ;} break; - case 260: -#line 2504 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 255: +#line 2521 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR ;} break; - case 261: -#line 2509 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 256: +#line 2526 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.CurrentFunction->setLinkage((yyvsp[(1) - (3)].Linkage)); CurFun.CurrentFunction->setVisibility((yyvsp[(2) - (3)].Visibility)); @@ -5697,40 +5718,40 @@ ;} break; - case 262: -#line 2521 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 257: +#line 2538 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 263: -#line 2525 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 258: +#line 2542 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 264: -#line 2530 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 259: +#line 2547 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].SInt64Val)); CHECK_FOR_ERROR ;} break; - case 265: -#line 2534 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 260: +#line 2551 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].UInt64Val)); CHECK_FOR_ERROR ;} break; - case 266: -#line 2538 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 261: +#line 2555 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants (yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), true); delete (yyvsp[(1) - (1)].APIntVal); @@ -5738,8 +5759,8 @@ ;} break; - case 267: -#line 2543 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 262: +#line 2560 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants (yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), false); delete (yyvsp[(1) - (1)].APIntVal); @@ -5747,56 +5768,56 @@ ;} break; - case 268: -#line 2548 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 263: +#line 2565 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].FPVal)); CHECK_FOR_ERROR ;} break; - case 269: -#line 2552 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 264: +#line 2569 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getTrue()); CHECK_FOR_ERROR ;} break; - case 270: -#line 2556 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 265: +#line 2573 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getFalse()); CHECK_FOR_ERROR ;} break; - case 271: -#line 2560 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 266: +#line 2577 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createNull(); CHECK_FOR_ERROR ;} break; - case 272: -#line 2564 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 267: +#line 2581 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createUndef(); CHECK_FOR_ERROR ;} break; - case 273: -#line 2568 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 268: +#line 2585 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // A vector zero constant. (yyval.ValIDVal) = ValID::createZeroInit(); CHECK_FOR_ERROR ;} break; - case 274: -#line 2572 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 269: +#line 2589 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType(); unsigned NumElements = (yyvsp[(2) - (3)].ConstVector)->size(); @@ -5821,8 +5842,8 @@ ;} break; - case 275: -#line 2594 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 270: +#line 2611 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType(); uint64_t NumElements = (yyvsp[(2) - (3)].ConstVector)->size(); @@ -5847,8 +5868,8 @@ ;} break; - case 276: -#line 2616 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 271: +#line 2633 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Use undef instead of an array because it's inconvenient to determine // the element type at this point, there being no elements to examine. @@ -5857,8 +5878,8 @@ ;} break; - case 277: -#line 2622 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 272: +#line 2639 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { uint64_t NumElements = (yyvsp[(2) - (2)].StrVal)->length(); const Type *ETy = Type::Int8Ty; @@ -5874,8 +5895,8 @@ ;} break; - case 278: -#line 2635 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 273: +#line 2652 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements((yyvsp[(2) - (3)].ConstVector)->size()); for (unsigned i = 0, e = (yyvsp[(2) - (3)].ConstVector)->size(); i != e; ++i) @@ -5890,8 +5911,8 @@ ;} break; - case 279: -#line 2647 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 274: +#line 2664 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = StructType::get(std::vector()); (yyval.ValIDVal) = ValID::create(ConstantStruct::get(STy, std::vector())); @@ -5899,8 +5920,8 @@ ;} break; - case 280: -#line 2652 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 275: +#line 2669 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements((yyvsp[(3) - (5)].ConstVector)->size()); for (unsigned i = 0, e = (yyvsp[(3) - (5)].ConstVector)->size(); i != e; ++i) @@ -5915,8 +5936,8 @@ ;} break; - case 281: -#line 2664 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 276: +#line 2681 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = StructType::get(std::vector(), /*isPacked=*/true); @@ -5925,16 +5946,16 @@ ;} break; - case 282: -#line 2670 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 277: +#line 2687 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].ConstVal)); CHECK_FOR_ERROR ;} break; - case 283: -#line 2674 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 278: +#line 2691 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createInlineAsm(*(yyvsp[(3) - (5)].StrVal), *(yyvsp[(5) - (5)].StrVal), (yyvsp[(2) - (5)].BoolVal)); delete (yyvsp[(3) - (5)].StrVal); @@ -5943,24 +5964,24 @@ ;} break; - case 284: -#line 2684 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 279: +#line 2701 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? (yyval.ValIDVal) = ValID::createLocalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR ;} break; - case 285: -#line 2688 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 280: +#line 2705 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createGlobalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR ;} break; - case 286: -#line 2692 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 281: +#line 2709 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5968,8 +5989,8 @@ ;} break; - case 287: -#line 2697 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 282: +#line 2714 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createGlobalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5977,8 +5998,8 @@ ;} break; - case 290: -#line 2710 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 285: +#line 2727 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -5988,8 +6009,8 @@ ;} break; - case 291: -#line 2719 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 286: +#line 2736 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); (yyval.ValueList)->push_back((yyvsp[(1) - (1)].ValueVal)); @@ -5997,32 +6018,32 @@ ;} break; - case 292: -#line 2724 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 287: +#line 2741 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ValueList)=(yyvsp[(1) - (3)].ValueList))->push_back((yyvsp[(3) - (3)].ValueVal)); CHECK_FOR_ERROR ;} break; - case 293: -#line 2729 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 288: +#line 2746 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR ;} break; - case 294: -#line 2733 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 289: +#line 2750 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR ;} break; - case 295: -#line 2742 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 290: +#line 2759 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { setValueName((yyvsp[(3) - (3)].TermInstVal), (yyvsp[(2) - (3)].StrVal)); CHECK_FOR_ERROR @@ -6033,8 +6054,8 @@ ;} break; - case 296: -#line 2751 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 291: +#line 2768 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR int ValNum = InsertValue((yyvsp[(3) - (3)].TermInstVal)); @@ -6048,8 +6069,8 @@ ;} break; - case 297: -#line 2764 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 292: +#line 2781 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (CastInst *CI1 = dyn_cast((yyvsp[(2) - (2)].InstVal))) if (CastInst *CI2 = dyn_cast(CI1->getOperand(0))) @@ -6061,16 +6082,16 @@ ;} break; - case 298: -#line 2773 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 293: +#line 2790 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty space between instruction lists (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalID(CurFun.NextValNum)); CHECK_FOR_ERROR ;} break; - case 299: -#line 2777 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 294: +#line 2794 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Labelled (named) basic block (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal))); delete (yyvsp[(1) - (1)].StrVal); @@ -6079,8 +6100,8 @@ ;} break; - case 300: -#line 2785 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 295: +#line 2802 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with a result... ValueList &VL = *(yyvsp[(2) - (2)].ValueList); assert(!VL.empty() && "Invalid ret operands!"); @@ -6103,16 +6124,16 @@ ;} break; - case 301: -#line 2805 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 296: +#line 2822 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with no result... (yyval.TermInstVal) = ReturnInst::Create(); CHECK_FOR_ERROR ;} break; - case 302: -#line 2809 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 297: +#line 2826 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[(3) - (3)].ValIDVal)); CHECK_FOR_ERROR @@ -6120,8 +6141,8 @@ ;} break; - case 303: -#line 2814 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 298: +#line 2831 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (cast((yyvsp[(2) - (9)].PrimType))->getBitWidth() != 1) GEN_ERROR("Branch condition must have type i1"); @@ -6135,8 +6156,8 @@ ;} break; - case 304: -#line 2825 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 299: +#line 2842 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (9)].PrimType), (yyvsp[(3) - (9)].ValIDVal)); CHECK_FOR_ERROR @@ -6158,8 +6179,8 @@ ;} break; - case 305: -#line 2844 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 300: +#line 2861 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (8)].PrimType), (yyvsp[(3) - (8)].ValIDVal)); CHECK_FOR_ERROR @@ -6171,8 +6192,8 @@ ;} break; - case 306: -#line 2854 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 301: +#line 2871 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -6278,24 +6299,24 @@ ;} break; - case 307: -#line 2957 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 302: +#line 2974 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnwindInst(); CHECK_FOR_ERROR ;} break; - case 308: -#line 2961 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 303: +#line 2978 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnreachableInst(); CHECK_FOR_ERROR ;} break; - case 309: -#line 2968 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 304: +#line 2985 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = (yyvsp[(1) - (6)].JumpTable); Constant *V = cast(getExistingVal((yyvsp[(2) - (6)].PrimType), (yyvsp[(3) - (6)].ValIDVal))); @@ -6309,8 +6330,8 @@ ;} break; - case 310: -#line 2979 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 305: +#line 2996 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = new std::vector >(); Constant *V = cast(getExistingVal((yyvsp[(1) - (5)].PrimType), (yyvsp[(2) - (5)].ValIDVal))); @@ -6325,8 +6346,8 @@ ;} break; - case 311: -#line 2992 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 306: +#line 3009 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName((yyvsp[(2) - (2)].InstVal), (yyvsp[(1) - (2)].StrVal)); @@ -6337,8 +6358,8 @@ ;} break; - case 312: -#line 3001 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 307: +#line 3018 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR int ValNum = InsertValue((yyvsp[(2) - (2)].InstVal)); @@ -6352,8 +6373,8 @@ ;} break; - case 313: -#line 3014 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 308: +#line 3031 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (6)].TypeVal))->getDescription()); @@ -6367,8 +6388,8 @@ ;} break; - case 314: -#line 3025 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 309: +#line 3042 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.PHIList) = (yyvsp[(1) - (7)].PHIList); Value* tmpVal = getVal((yyvsp[(1) - (7)].PHIList)->front().first->getType(), (yyvsp[(4) - (7)].ValIDVal)); @@ -6379,8 +6400,8 @@ ;} break; - case 315: -#line 3035 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 310: +#line 3052 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -6394,8 +6415,8 @@ ;} break; - case 316: -#line 3046 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 311: +#line 3063 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 // Labels are only valid in ASMs @@ -6406,8 +6427,8 @@ ;} break; - case 317: -#line 3054 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 312: +#line 3071 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -6420,8 +6441,8 @@ ;} break; - case 318: -#line 3064 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 313: +#line 3081 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 (yyval.ParamList) = (yyvsp[(1) - (6)].ParamList); @@ -6431,18 +6452,18 @@ ;} break; - case 319: -#line 3071 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 314: +#line 3088 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamList) = new ParamList(); ;} break; - case 320: -#line 3074 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 315: +#line 3091 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); ;} break; - case 321: -#line 3075 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 316: +#line 3092 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[(1) - (3)].ValueList); (yyval.ValueList)->push_back((yyvsp[(3) - (3)].ValueVal)); @@ -6450,8 +6471,8 @@ ;} break; - case 322: -#line 3083 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 317: +#line 3100 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstantList) = new std::vector(); if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val)) @@ -6460,8 +6481,8 @@ ;} break; - case 323: -#line 3089 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 318: +#line 3106 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstantList) = (yyvsp[(1) - (3)].ConstantList); if ((unsigned)(yyvsp[(3) - (3)].UInt64Val) != (yyvsp[(3) - (3)].UInt64Val)) @@ -6471,24 +6492,24 @@ ;} break; - case 324: -#line 3098 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 319: +#line 3115 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 325: -#line 3102 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 320: +#line 3119 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 326: -#line 3107 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 321: +#line 3124 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6507,8 +6528,8 @@ ;} break; - case 327: -#line 3123 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 322: +#line 3140 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6528,8 +6549,8 @@ ;} break; - case 328: -#line 3140 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 323: +#line 3157 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6544,8 +6565,8 @@ ;} break; - case 329: -#line 3152 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 324: +#line 3169 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6560,8 +6581,8 @@ ;} break; - case 330: -#line 3164 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 325: +#line 3181 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6578,8 +6599,8 @@ ;} break; - case 331: -#line 3178 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 326: +#line 3195 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6596,8 +6617,8 @@ ;} break; - case 332: -#line 3192 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 327: +#line 3209 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6612,8 +6633,8 @@ ;} break; - case 333: -#line 3204 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 328: +#line 3221 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (isa((yyvsp[(2) - (6)].ValueVal)->getType())) { // vector select @@ -6637,8 +6658,8 @@ ;} break; - case 334: -#line 3225 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 329: +#line 3242 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6648,8 +6669,8 @@ ;} break; - case 335: -#line 3232 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 330: +#line 3249 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(2) - (4)].ValueVal), (yyvsp[(4) - (4)].ValueVal))) GEN_ERROR("Invalid extractelement operands"); @@ -6658,8 +6679,8 @@ ;} break; - case 336: -#line 3238 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 331: +#line 3255 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid insertelement operands"); @@ -6668,8 +6689,8 @@ ;} break; - case 337: -#line 3244 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 332: +#line 3261 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -6678,8 +6699,8 @@ ;} break; - case 338: -#line 3250 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 333: +#line 3267 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[(2) - (2)].PHIList)->front().first->getType(); if (!Ty->isFirstClassType()) @@ -6697,8 +6718,8 @@ ;} break; - case 339: -#line 3266 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 334: +#line 3283 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -6810,32 +6831,32 @@ ;} break; - case 340: -#line 3375 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 335: +#line 3392 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = (yyvsp[(1) - (1)].InstVal); CHECK_FOR_ERROR ;} break; - case 341: -#line 3380 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 336: +#line 3397 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 342: -#line 3384 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 337: +#line 3401 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 343: -#line 3391 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 338: +#line 3408 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6845,8 +6866,8 @@ ;} break; - case 344: -#line 3398 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 339: +#line 3415 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6859,8 +6880,8 @@ ;} break; - case 345: -#line 3408 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 340: +#line 3425 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6870,8 +6891,8 @@ ;} break; - case 346: -#line 3415 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 341: +#line 3432 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6884,8 +6905,8 @@ ;} break; - case 347: -#line 3425 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 342: +#line 3442 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(2) - (2)].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + @@ -6895,8 +6916,8 @@ ;} break; - case 348: -#line 3433 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 343: +#line 3450 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -6913,8 +6934,8 @@ ;} break; - case 349: -#line 3447 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 344: +#line 3464 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (7)].TypeVal))->getDescription()); @@ -6934,8 +6955,8 @@ ;} break; - case 350: -#line 3464 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 345: +#line 3481 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6952,8 +6973,8 @@ ;} break; - case 351: -#line 3478 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 346: +#line 3495 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()); @@ -6971,8 +6992,8 @@ ;} break; - case 352: -#line 3493 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 347: +#line 3510 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()); @@ -6990,8 +7011,8 @@ ;} break; - case 353: -#line 3508 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" + case 348: +#line 3525 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (7)].TypeVal))->getDescription()); @@ -7013,7 +7034,7 @@ /* Line 1267 of yacc.c. */ -#line 7017 "llvmAsmParser.tab.c" +#line 7038 "llvmAsmParser.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -7227,7 +7248,7 @@ } -#line 3527 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3544 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" // common code from the two 'RunVMAsmParser' functions Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs?rev=57561&r1=57560&r2=57561&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Wed Oct 15 01:16:57 2008 @@ -1071,7 +1071,7 @@ // Built in types... %type Types ResultTypes -%type FPType PrimType // Classifications +%type PrimType // Classifications %token VOID INTTYPE %token FLOAT DOUBLE X86_FP80 FP128 PPC_FP128 LABEL %token TYPE @@ -1165,10 +1165,6 @@ | FALSETOK { $$ = FCmpInst::FCMP_FALSE; } ; -// These are some types that allow classification if we only want a particular -// thing... for example, only a signed, unsigned, or integral type. -FPType : FLOAT | DOUBLE | PPC_FP128 | FP128 | X86_FP80; - LocalName : LOCALVAR | STRINGCONSTANT | PCTSTRINGCONSTANT ; OptLocalName : LocalName | /*empty*/ { $$ = 0; }; @@ -1882,61 +1878,82 @@ delete $1; CHECK_FOR_ERROR } - | INTTYPE ESINT64VAL { // integral constants - if (!ConstantInt::isValueValidForType($1, $2)) - GEN_ERROR("Constant value doesn't fit in type"); - $$ = ConstantInt::get($1, $2, true); + | Types ESINT64VAL { // integral constants + if (IntegerType *IT = dyn_cast($1->get())) { + if (!ConstantInt::isValueValidForType(IT, $2)) + GEN_ERROR("Constant value doesn't fit in type"); + $$ = ConstantInt::get(IT, $2, true); + } else { + GEN_ERROR("integer constant must have integer type"); + } + delete $1; CHECK_FOR_ERROR } - | INTTYPE ESAPINTVAL { // arbitrary precision integer constants - uint32_t BitWidth = cast($1)->getBitWidth(); - if ($2->getBitWidth() > BitWidth) { - GEN_ERROR("Constant value does not fit in type"); + | Types ESAPINTVAL { // arbitrary precision integer constants + if (IntegerType *IT = dyn_cast($1->get())) { + if ($2->getBitWidth() > IT->getBitWidth()) + GEN_ERROR("Constant value does not fit in type"); + $2->sextOrTrunc(IT->getBitWidth()); + $$ = ConstantInt::get(*$2); + } else { + GEN_ERROR("integer constant must have integer type"); } - $2->sextOrTrunc(BitWidth); - $$ = ConstantInt::get(*$2); + delete $1; delete $2; CHECK_FOR_ERROR } - | INTTYPE EUINT64VAL { // integral constants - if (!ConstantInt::isValueValidForType($1, $2)) - GEN_ERROR("Constant value doesn't fit in type"); - $$ = ConstantInt::get($1, $2, false); + | Types EUINT64VAL { // integral constants + if (IntegerType *IT = dyn_cast($1->get())) { + if (!ConstantInt::isValueValidForType(IT, $2)) + GEN_ERROR("Constant value doesn't fit in type"); + $$ = ConstantInt::get(IT, $2, false); + } else { + GEN_ERROR("integer constant must have integer type"); + } + delete $1; CHECK_FOR_ERROR } - | INTTYPE EUAPINTVAL { // arbitrary precision integer constants - uint32_t BitWidth = cast($1)->getBitWidth(); - if ($2->getBitWidth() > BitWidth) { - GEN_ERROR("Constant value does not fit in type"); + | Types EUAPINTVAL { // arbitrary precision integer constants + if (IntegerType *IT = dyn_cast($1->get())) { + if ($2->getBitWidth() > IT->getBitWidth()) + GEN_ERROR("Constant value does not fit in type"); + $2->zextOrTrunc(IT->getBitWidth()); + $$ = ConstantInt::get(*$2); + } else { + GEN_ERROR("integer constant must have integer type"); } - $2->zextOrTrunc(BitWidth); - $$ = ConstantInt::get(*$2); + delete $2; + delete $1; CHECK_FOR_ERROR } - | INTTYPE TRUETOK { // Boolean constants - if (cast($1)->getBitWidth() != 1) + | Types TRUETOK { // Boolean constants + if ($1->get() != Type::Int1Ty) GEN_ERROR("Constant true must have type i1"); $$ = ConstantInt::getTrue(); + delete $1; CHECK_FOR_ERROR } - | INTTYPE FALSETOK { // Boolean constants - if (cast($1)->getBitWidth() != 1) + | Types FALSETOK { // Boolean constants + if ($1->get() != Type::Int1Ty) GEN_ERROR("Constant false must have type i1"); $$ = ConstantInt::getFalse(); + delete $1; CHECK_FOR_ERROR } - | FPType FPVAL { // Floating point constants - if (!ConstantFP::isValueValidForType($1, *$2)) + | Types FPVAL { // Floating point constants + if (!ConstantFP::isValueValidForType($1->get(), *$2)) GEN_ERROR("Floating point constant invalid for type"); + // Lexer has no type info, so builds all float and double FP constants // as double. Fix this here. Long double is done right. - if (&$2->getSemantics()==&APFloat::IEEEdouble && $1==Type::FloatTy) { + if (&$2->getSemantics()==&APFloat::IEEEdouble && $1->get()==Type::FloatTy) { bool ignored; $2->convert(APFloat::IEEEsingle, APFloat::rmNearestTiesToEven, &ignored); } $$ = ConstantFP::get(*$2); + delete $1; delete $2; CHECK_FOR_ERROR }; From gohman at apple.com Wed Oct 15 01:17:21 2008 From: gohman at apple.com (Dan Gohman) Date: Wed, 15 Oct 2008 06:17:21 -0000 Subject: [llvm-commits] [llvm] r57562 - in /llvm/trunk/utils/TableGen: CodeGenDAGPatterns.cpp CodeGenDAGPatterns.h DAGISelEmitter.cpp FastISelEmitter.cpp Message-ID: <200810150617.m9F6HLMr012373@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 01:17:21 2008 New Revision: 57562 URL: http://llvm.org/viewvc/llvm-project?rev=57562&view=rev Log: Add support for having multiple predicates on a TreePatternNode. This will allow predicates to be composed, which will allow the predicate definitions to become less redundant, and eventually will allow DAGISelEmitter.cpp to emit less redundant code. Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h llvm/trunk/utils/TableGen/DAGISelEmitter.cpp llvm/trunk/utils/TableGen/FastISelEmitter.cpp Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=57562&r1=57561&r2=57562&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original) +++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Wed Oct 15 01:17:21 2008 @@ -579,8 +579,8 @@ OS << ")"; } - if (!PredicateFn.empty()) - OS << "<>"; + for (unsigned i = 0, e = PredicateFns.size(); i != e; ++i) + OS << "<>"; if (TransformFn) OS << "<getName() << ">>"; if (!getName().empty()) @@ -602,7 +602,7 @@ const MultipleUseVarSet &DepVars) const { if (N == this) return true; if (N->isLeaf() != isLeaf() || getExtTypes() != N->getExtTypes() || - getPredicateFn() != N->getPredicateFn() || + getPredicateFns() != N->getPredicateFns() || getTransformFn() != N->getTransformFn()) return false; @@ -640,7 +640,7 @@ } New->setName(getName()); New->setTypes(getExtTypes()); - New->setPredicateFn(getPredicateFn()); + New->setPredicateFns(getPredicateFns()); New->setTransformFn(getTransformFn()); return New; } @@ -658,9 +658,12 @@ if (dynamic_cast(Val) && static_cast(Val)->getDef()->getName() == "node") { // We found a use of a formal argument, replace it with its value. - Child = ArgMap[Child->getName()]; - assert(Child && "Couldn't find formal argument!"); - setChild(i, Child); + TreePatternNode *NewChild = ArgMap[Child->getName()]; + assert(NewChild && "Couldn't find formal argument!"); + assert((Child->getPredicateFns().empty() || + NewChild->getPredicateFns() == Child->getPredicateFns()) && + "Non-empty child predicate clobbered!"); + setChild(i, NewChild); } } else { getChild(i)->SubstituteFormalArguments(ArgMap); @@ -678,8 +681,16 @@ if (!Op->isSubClassOf("PatFrag")) { // Just recursively inline children nodes. - for (unsigned i = 0, e = getNumChildren(); i != e; ++i) - setChild(i, getChild(i)->InlinePatternFragments(TP)); + for (unsigned i = 0, e = getNumChildren(); i != e; ++i) { + TreePatternNode *Child = getChild(i); + TreePatternNode *NewChild = Child->InlinePatternFragments(TP); + + assert((Child->getPredicateFns().empty() || + NewChild->getPredicateFns() == Child->getPredicateFns()) && + "Non-empty child predicate clobbered!"); + + setChild(i, NewChild); + } return this; } @@ -694,6 +705,10 @@ TreePatternNode *FragTree = Frag->getOnlyTree()->clone(); + std::string Code = Op->getValueAsCode("Predicate"); + if (!Code.empty()) + FragTree->addPredicateFn("Predicate_"+Op->getName()); + // Resolve formal arguments to their actual value. if (Frag->getNumArgs()) { // Compute the map of formal to actual arguments. @@ -706,7 +721,11 @@ FragTree->setName(getName()); FragTree->UpdateNodeType(getExtTypes(), TP); - + + // Transfer in the old predicates. + for (unsigned i = 0, e = getPredicateFns().size(); i != e; ++i) + FragTree->addPredicateFn(getPredicateFns()[i]); + // Get a new copy of this fragment to stitch into here. //delete this; // FIXME: implement refcounting! @@ -1405,7 +1424,7 @@ // this fragment uses it. std::string Code = Fragments[i]->getValueAsCode("Predicate"); if (!Code.empty()) - P->getOnlyTree()->setPredicateFn("Predicate_"+Fragments[i]->getName()); + P->getOnlyTree()->addPredicateFn("Predicate_"+Fragments[i]->getName()); // If there is a node transformation corresponding to this, keep track of // it. @@ -1911,7 +1930,7 @@ TreePatternNode *OpNode = InVal->clone(); // No predicate is useful on the result. - OpNode->setPredicateFn(""); + OpNode->clearPredicateFns(); // Promote the xform function to be an explicit node if set. if (Record *Xform = OpNode->getTransformFn()) { @@ -2138,7 +2157,7 @@ // Copy over properties. R->setName(Orig->getName()); - R->setPredicateFn(Orig->getPredicateFn()); + R->setPredicateFns(Orig->getPredicateFns()); R->setTransformFn(Orig->getTransformFn()); R->setTypes(Orig->getExtTypes()); @@ -2200,7 +2219,7 @@ Record *Operator = N->getOperator(); // Only permit raw nodes. - if (!N->getName().empty() || !N->getPredicateFn().empty() || + if (!N->getName().empty() || !N->getPredicateFns().empty() || N->getTransformFn()) { Children.push_back(N); return; Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h?rev=57562&r1=57561&r2=57562&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h (original) +++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h Wed Oct 15 01:17:21 2008 @@ -16,6 +16,8 @@ #define CODEGEN_DAGPATTERNS_H #include +#include +#include #include "CodeGenTarget.h" #include "CodeGenIntrinsics.h" @@ -158,9 +160,9 @@ /// std::string Name; - /// PredicateFn - The predicate function to execute on this node to check - /// for a match. If this string is empty, no predicate is involved. - std::string PredicateFn; + /// PredicateFns - The predicate functions to execute on this node to check + /// for a match. If this list is empty, no predicate is involved. + std::vector PredicateFns; /// TransformFn - The transformation function to execute on this node before /// it can be substituted into the resulting instruction on a pattern match. @@ -213,8 +215,18 @@ Children[i] = N; } - const std::string &getPredicateFn() const { return PredicateFn; } - void setPredicateFn(const std::string &Fn) { PredicateFn = Fn; } + const std::vector &getPredicateFns() const { return PredicateFns; } + void clearPredicateFns() { PredicateFns.clear(); } + void setPredicateFns(const std::vector &Fns) { + assert(PredicateFns.empty() && "Overwriting non-empty predicate list!"); + PredicateFns = Fns; + } + void addPredicateFn(const std::string &Fn) { + assert(!Fn.empty() && "Empty predicate string!"); + if (std::find(PredicateFns.begin(), PredicateFns.end(), Fn) == + PredicateFns.end()) + PredicateFns.push_back(Fn); + } Record *getTransformFn() const { return TransformFn; } void setTransformFn(Record *Fn) { TransformFn = Fn; } Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=57562&r1=57561&r2=57562&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Wed Oct 15 01:17:21 2008 @@ -76,7 +76,7 @@ // If this node has some predicate function that must match, it adds to the // complexity of this node. - if (!P->getPredicateFn().empty()) + if (!P->getPredicateFns().empty()) ++Size; // Count children in the count if they are also nodes. @@ -89,7 +89,7 @@ Size += 5; // Matches a ConstantSDNode (+3) and a specific value (+2). else if (NodeIsComplexPattern(Child)) Size += getPatternSize(Child, CGP); - else if (!Child->getPredicateFn().empty()) + else if (!Child->getPredicateFns().empty()) ++Size; } } @@ -140,8 +140,15 @@ PatternSortingPredicate(CodeGenDAGPatterns &cgp) : CGP(cgp) {} CodeGenDAGPatterns &CGP; - bool operator()(const PatternToMatch *LHS, - const PatternToMatch *RHS) { + typedef std::pair CodeLine; + typedef std::vector CodeList; + typedef std::vector > PatternList; + + bool operator()(const std::pair &LHSPair, + const std::pair &RHSPair) { + const PatternToMatch *LHS = LHSPair.first; + const PatternToMatch *RHS = RHSPair.first; + unsigned LHSSize = getPatternSize(LHS->getSrcPattern(), CGP); unsigned RHSSize = getPatternSize(RHS->getSrcPattern(), CGP); LHSSize += LHS->getAddedComplexity(); @@ -541,11 +548,10 @@ } } - // If there is a node predicate for this, emit the call. - if (!N->getPredicateFn().empty()) - emitCheck(N->getPredicateFn() + "(" + RootName + ".getNode())"); + // If there are node predicates for this, emit the calls. + for (unsigned i = 0, e = N->getPredicateFns().size(); i != e; ++i) + emitCheck(N->getPredicateFns()[i] + "(" + RootName + ".getNode())"); - // If this is an 'and R, 1234' where the operation is AND/OR and the RHS is // a constant without a predicate fn that has more that one bit set, handle // this as a special case. This is usually for targets that have special @@ -560,7 +566,7 @@ (N->getOperator()->getName() == "and" || N->getOperator()->getName() == "or") && N->getChild(1)->isLeaf() && - N->getChild(1)->getPredicateFn().empty()) { + N->getChild(1)->getPredicateFns().empty()) { if (IntInit *II = dynamic_cast(N->getChild(1)->getLeafValue())) { if (!isPowerOf2_32(II->getValue())) { // Don't bother with single bits. emitInit("SDValue " + RootName + "0" + " = " + @@ -717,9 +723,9 @@ assert(0 && "Unknown leaf type!"); } - // If there is a node predicate for this, emit the call. - if (!Child->getPredicateFn().empty()) - emitCheck(Child->getPredicateFn() + "(" + RootName + + // If there are node predicates for this, emit the calls. + for (unsigned i = 0, e = Child->getPredicateFns().size(); i != e; ++i) + emitCheck(Child->getPredicateFns()[i] + "(" + RootName + ".getNode())"); } else if (IntInit *II = dynamic_cast(Child->getLeafValue())) { @@ -1265,7 +1271,8 @@ emitCode(After[i]); return NodeOps; - } else if (Op->isSubClassOf("SDNodeXForm")) { + } + if (Op->isSubClassOf("SDNodeXForm")) { assert(N->getNumChildren() == 1 && "node xform should have one child!"); // PatLeaf node - the operand may or may not be a leaf node. But it should // behave like one. @@ -1279,11 +1286,11 @@ if (isRoot) emitCode("return Tmp" + utostr(ResNo) + ".getNode();"); return NodeOps; - } else { - N->dump(); - cerr << "\n"; - throw std::string("Unknown node in result pattern!"); } + + N->dump(); + cerr << "\n"; + throw std::string("Unknown node in result pattern!"); } /// InsertOneTypeCheck - Insert a type-check for an unresolved type in 'Pat' @@ -1641,12 +1648,6 @@ std::vector &PatternsOfOp = PBOI->second; assert(!PatternsOfOp.empty() && "No patterns but map has entry?"); - // We want to emit all of the matching code now. However, we want to emit - // the matches in order of minimal cost. Sort the patterns so the least - // cost one is at the start. - std::stable_sort(PatternsOfOp.begin(), PatternsOfOp.end(), - PatternSortingPredicate(CGP)); - // Split them into groups by type. std::map > PatternsByType; @@ -1662,8 +1663,9 @@ ++II) { MVT::SimpleValueType OpVT = II->first; std::vector &Patterns = II->second; - typedef std::vector > CodeList; - typedef std::vector >::iterator CodeListI; + typedef std::pair CodeLine; + typedef std::vector CodeList; + typedef CodeList::iterator CodeListI; std::vector > CodeForPatterns; std::vector > PatternOpcodes; @@ -1689,30 +1691,6 @@ NumInputRootOpsCounts.push_back(NumInputRootOps); } - // Scan the code to see if all of the patterns are reachable and if it is - // possible that the last one might not match. - bool mightNotMatch = true; - for (unsigned i = 0, e = CodeForPatterns.size(); i != e; ++i) { - CodeList &GeneratedCode = CodeForPatterns[i].second; - mightNotMatch = false; - - for (unsigned j = 0, e = GeneratedCode.size(); j != e; ++j) { - if (GeneratedCode[j].first == 1) { // predicate. - mightNotMatch = true; - break; - } - } - - // If this pattern definitely matches, and if it isn't the last one, the - // patterns after it CANNOT ever match. Error out. - if (mightNotMatch == false && i != CodeForPatterns.size()-1) { - cerr << "Pattern '"; - CodeForPatterns[i].first->getSrcPattern()->print(*cerr.stream()); - cerr << "' is impossible to select!\n"; - exit(1); - } - } - // Factor target node emission code (emitted by EmitResultCode) into // separate functions. Uniquing and share them among all instruction // selection routines. @@ -1815,6 +1793,36 @@ OS << "SDNode *Select_" << getLegalCName(OpName) << OpVTStr << "(const SDValue &N) {\n"; + // We want to emit all of the matching code now. However, we want to emit + // the matches in order of minimal cost. Sort the patterns so the least + // cost one is at the start. + std::stable_sort(CodeForPatterns.begin(), CodeForPatterns.end(), + PatternSortingPredicate(CGP)); + + // Scan the code to see if all of the patterns are reachable and if it is + // possible that the last one might not match. + bool mightNotMatch = true; + for (unsigned i = 0, e = CodeForPatterns.size(); i != e; ++i) { + CodeList &GeneratedCode = CodeForPatterns[i].second; + mightNotMatch = false; + + for (unsigned j = 0, e = GeneratedCode.size(); j != e; ++j) { + if (GeneratedCode[j].first == 1) { // predicate. + mightNotMatch = true; + break; + } + } + + // If this pattern definitely matches, and if it isn't the last one, the + // patterns after it CANNOT ever match. Error out. + if (mightNotMatch == false && i != CodeForPatterns.size()-1) { + cerr << "Pattern '"; + CodeForPatterns[i].first->getSrcPattern()->print(*cerr.stream()); + cerr << "' is impossible to select!\n"; + exit(1); + } + } + // Loop through and reverse all of the CodeList vectors, as we will be // accessing them from their logical front, but accessing the end of a // vector is more efficient. Modified: llvm/trunk/utils/TableGen/FastISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FastISelEmitter.cpp?rev=57562&r1=57561&r2=57562&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/FastISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/FastISelEmitter.cpp Wed Oct 15 01:17:21 2008 @@ -71,7 +71,7 @@ for (unsigned i = 0, e = InstPatNode->getNumChildren(); i != e; ++i) { TreePatternNode *Op = InstPatNode->getChild(i); // For now, filter out any operand with a predicate. - if (!Op->getPredicateFn().empty()) + if (!Op->getPredicateFns().empty()) return false; // For now, filter out any operand with multiple values. if (Op->getExtTypes().size() != 1) @@ -309,7 +309,7 @@ continue; // For now, filter out any instructions with predicates. - if (!InstPatNode->getPredicateFn().empty()) + if (!InstPatNode->getPredicateFns().empty()) continue; // Check all the operands. From wangmp at apple.com Wed Oct 15 01:27:16 2008 From: wangmp at apple.com (Mon P Wang) Date: Wed, 15 Oct 2008 06:27:16 -0000 Subject: [llvm-commits] [llvm] r57564 - /llvm/trunk/include/llvm/IntrinsicsX86.td Message-ID: <200810150627.m9F6RGZX012806@zion.cs.uiuc.edu> Author: wangmp Date: Wed Oct 15 01:27:16 2008 New Revision: 57564 URL: http://llvm.org/viewvc/llvm-project?rev=57564&view=rev Log: Removed pinsrd and pinsrq intrinsics because the code generator does not support them since they map to insert element Modified: llvm/trunk/include/llvm/IntrinsicsX86.td Modified: llvm/trunk/include/llvm/IntrinsicsX86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsX86.td?rev=57564&r1=57563&r2=57564&view=diff ============================================================================== --- llvm/trunk/include/llvm/IntrinsicsX86.td (original) +++ llvm/trunk/include/llvm/IntrinsicsX86.td Wed Oct 15 01:27:16 2008 @@ -817,12 +817,6 @@ def int_x86_sse41_pinsrb : GCCBuiltin<"__builtin_ia32_vec_set_v16qi">, Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_sse41_pinsrd : GCCBuiltin<"__builtin_ia32_vec_set_v4si">, - Intrinsic<[llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_sse41_pinsrq : GCCBuiltin<"__builtin_ia32_vec_set_v2di">, - Intrinsic<[llvm_v2i64_ty, llvm_v2i64_ty, llvm_i64_ty, llvm_i32_ty], - [IntrNoMem]>; def int_x86_sse41_insertps : GCCBuiltin<"__builtin_ia32_insertps128">, Intrinsic<[llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i32_ty], [IntrNoMem]>; From gohman at apple.com Wed Oct 15 01:50:19 2008 From: gohman at apple.com (Dan Gohman) Date: Wed, 15 Oct 2008 06:50:19 -0000 Subject: [llvm-commits] [llvm] r57565 - in /llvm/trunk/lib/Target: TargetSelectionDAG.td X86/X86InstrInfo.td X86/X86InstrSSE.td Message-ID: <200810150650.m9F6oJpL013574@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 01:50:19 2008 New Revision: 57565 URL: http://llvm.org/viewvc/llvm-project?rev=57565&view=rev Log: Now that predicates can be composed, simplify several of the predicates by extending simple predicates to create more complex predicates instead of duplicating the logic for the simple predicates. This doesn't reduce much redundancy in DAGISelEmitter.cpp's generated source yet; that will require improvements to DAGISelEmitter.cpp's instruction sorting, to make it more effectively group nodes with similar predicates together. Modified: llvm/trunk/lib/Target/TargetSelectionDAG.td llvm/trunk/lib/Target/X86/X86InstrInfo.td llvm/trunk/lib/Target/X86/X86InstrSSE.td Modified: llvm/trunk/lib/Target/TargetSelectionDAG.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetSelectionDAG.td?rev=57565&r1=57564&r2=57565&view=diff ============================================================================== --- llvm/trunk/lib/Target/TargetSelectionDAG.td (original) +++ llvm/trunk/lib/Target/TargetSelectionDAG.td Wed Oct 15 01:50:19 2008 @@ -573,227 +573,177 @@ def ineg : PatFrag<(ops node:$in), (sub 0, node:$in)>; // load fragments. -def load : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::NON_EXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED; +def unindexedload : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ + return cast(N)->getAddressingMode() == ISD::UNINDEXED; +}]>; +def load : PatFrag<(ops node:$ptr), (unindexedload node:$ptr), [{ + return cast(N)->getExtensionType() == ISD::NON_EXTLOAD; }]>; // extending load fragments. -def extloadi1 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::EXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getMemoryVT() == MVT::i1; -}]>; -def extloadi8 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::EXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getMemoryVT() == MVT::i8; -}]>; -def extloadi16 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::EXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getMemoryVT() == MVT::i16; -}]>; -def extloadi32 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::EXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getMemoryVT() == MVT::i32; -}]>; -def extloadf32 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::EXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getMemoryVT() == MVT::f32; -}]>; -def extloadf64 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::EXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getMemoryVT() == MVT::f64; -}]>; - -def sextloadi1 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::SEXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getMemoryVT() == MVT::i1; -}]>; -def sextloadi8 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::SEXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getMemoryVT() == MVT::i8; -}]>; -def sextloadi16 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::SEXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getMemoryVT() == MVT::i16; -}]>; -def sextloadi32 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::SEXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getMemoryVT() == MVT::i32; -}]>; - -def zextloadi1 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::ZEXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getMemoryVT() == MVT::i1; -}]>; -def zextloadi8 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::ZEXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getMemoryVT() == MVT::i8; -}]>; -def zextloadi16 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::ZEXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getMemoryVT() == MVT::i16; -}]>; -def zextloadi32 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::ZEXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getMemoryVT() == MVT::i32; +def extload : PatFrag<(ops node:$ptr), (unindexedload node:$ptr), [{ + return cast(N)->getExtensionType() == ISD::EXTLOAD; +}]>; +def sextload : PatFrag<(ops node:$ptr), (unindexedload node:$ptr), [{ + return cast(N)->getExtensionType() == ISD::SEXTLOAD; +}]>; +def zextload : PatFrag<(ops node:$ptr), (unindexedload node:$ptr), [{ + return cast(N)->getExtensionType() == ISD::ZEXTLOAD; +}]>; + +def extloadi1 : PatFrag<(ops node:$ptr), (extload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i1; +}]>; +def extloadi8 : PatFrag<(ops node:$ptr), (extload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i8; +}]>; +def extloadi16 : PatFrag<(ops node:$ptr), (extload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i16; +}]>; +def extloadi32 : PatFrag<(ops node:$ptr), (extload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i32; +}]>; +def extloadf32 : PatFrag<(ops node:$ptr), (extload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::f32; +}]>; +def extloadf64 : PatFrag<(ops node:$ptr), (extload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::f64; +}]>; + +def sextloadi1 : PatFrag<(ops node:$ptr), (sextload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i1; +}]>; +def sextloadi8 : PatFrag<(ops node:$ptr), (sextload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i8; +}]>; +def sextloadi16 : PatFrag<(ops node:$ptr), (sextload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i16; +}]>; +def sextloadi32 : PatFrag<(ops node:$ptr), (sextload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i32; +}]>; + +def zextloadi1 : PatFrag<(ops node:$ptr), (zextload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i1; +}]>; +def zextloadi8 : PatFrag<(ops node:$ptr), (zextload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i8; +}]>; +def zextloadi16 : PatFrag<(ops node:$ptr), (zextload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i16; +}]>; +def zextloadi32 : PatFrag<(ops node:$ptr), (zextload node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i32; }]>; // store fragments. +def unindexedstore : PatFrag<(ops node:$val, node:$ptr), + (st node:$val, node:$ptr), [{ + return cast(N)->getAddressingMode() == ISD::UNINDEXED; +}]>; def store : PatFrag<(ops node:$val, node:$ptr), - (st node:$val, node:$ptr), [{ - StoreSDNode *ST = cast(N); - return !ST->isTruncatingStore() && - ST->getAddressingMode() == ISD::UNINDEXED; + (unindexedstore node:$val, node:$ptr), [{ + return !cast(N)->isTruncatingStore(); }]>; // truncstore fragments. +def truncstore : PatFrag<(ops node:$val, node:$ptr), + (unindexedstore node:$val, node:$ptr), [{ + return cast(N)->isTruncatingStore(); +}]>; def truncstorei8 : PatFrag<(ops node:$val, node:$ptr), - (st node:$val, node:$ptr), [{ - StoreSDNode *ST = cast(N); - return ST->isTruncatingStore() && ST->getMemoryVT() == MVT::i8 && - ST->getAddressingMode() == ISD::UNINDEXED; + (truncstore node:$val, node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i8; }]>; def truncstorei16 : PatFrag<(ops node:$val, node:$ptr), - (st node:$val, node:$ptr), [{ - StoreSDNode *ST = cast(N); - return ST->isTruncatingStore() && ST->getMemoryVT() == MVT::i16 && - ST->getAddressingMode() == ISD::UNINDEXED; + (truncstore node:$val, node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i16; }]>; def truncstorei32 : PatFrag<(ops node:$val, node:$ptr), - (st node:$val, node:$ptr), [{ - StoreSDNode *ST = cast(N); - return ST->isTruncatingStore() && ST->getMemoryVT() == MVT::i32 && - ST->getAddressingMode() == ISD::UNINDEXED; + (truncstore node:$val, node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::i32; }]>; def truncstoref32 : PatFrag<(ops node:$val, node:$ptr), - (st node:$val, node:$ptr), [{ - StoreSDNode *ST = cast(N); - return ST->isTruncatingStore() && ST->getMemoryVT() == MVT::f32 && - ST->getAddressingMode() == ISD::UNINDEXED; + (truncstore node:$val, node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::f32; }]>; def truncstoref64 : PatFrag<(ops node:$val, node:$ptr), - (st node:$val, node:$ptr), [{ - StoreSDNode *ST = cast(N); - return ST->isTruncatingStore() && ST->getMemoryVT() == MVT::f64 && - ST->getAddressingMode() == ISD::UNINDEXED; + (truncstore node:$val, node:$ptr), [{ + return cast(N)->getMemoryVT() == MVT::f64; }]>; // indexed store fragments. +def istore : PatFrag<(ops node:$val, node:$base, node:$offset), + (ist node:$val, node:$base, node:$offset), [{ + return !cast(N)->isTruncatingStore(); +}]>; + def pre_store : PatFrag<(ops node:$val, node:$base, node:$offset), - (ist node:$val, node:$base, node:$offset), [{ - StoreSDNode *ST = cast(N); - ISD::MemIndexedMode AM = ST->getAddressingMode(); - return (AM == ISD::PRE_INC || AM == ISD::PRE_DEC) && - !ST->isTruncatingStore(); + (istore node:$val, node:$base, node:$offset), [{ + ISD::MemIndexedMode AM = cast(N)->getAddressingMode(); + return AM == ISD::PRE_INC || AM == ISD::PRE_DEC; }]>; +def itruncstore : PatFrag<(ops node:$val, node:$base, node:$offset), + (ist node:$val, node:$base, node:$offset), [{ + return cast(N)->isTruncatingStore(); +}]>; +def pre_truncst : PatFrag<(ops node:$val, node:$base, node:$offset), + (itruncstore node:$val, node:$base, node:$offset), [{ + ISD::MemIndexedMode AM = cast(N)->getAddressingMode(); + return AM == ISD::PRE_INC || AM == ISD::PRE_DEC; +}]>; def pre_truncsti1 : PatFrag<(ops node:$val, node:$base, node:$offset), - (ist node:$val, node:$base, node:$offset), [{ - StoreSDNode *ST = cast(N); - ISD::MemIndexedMode AM = ST->getAddressingMode(); - return (AM == ISD::PRE_INC || AM == ISD::PRE_DEC) && - ST->isTruncatingStore() && ST->getMemoryVT() == MVT::i1; + (pre_truncst node:$val, node:$base, node:$offset), [{ + return cast(N)->getMemoryVT() == MVT::i1; }]>; def pre_truncsti8 : PatFrag<(ops node:$val, node:$base, node:$offset), - (ist node:$val, node:$base, node:$offset), [{ - StoreSDNode *ST = cast(N); - ISD::MemIndexedMode AM = ST->getAddressingMode(); - return (AM == ISD::PRE_INC || AM == ISD::PRE_DEC) && - ST->isTruncatingStore() && ST->getMemoryVT() == MVT::i8; + (pre_truncst node:$val, node:$base, node:$offset), [{ + return cast(N)->getMemoryVT() == MVT::i8; }]>; def pre_truncsti16 : PatFrag<(ops node:$val, node:$base, node:$offset), - (ist node:$val, node:$base, node:$offset), [{ - StoreSDNode *ST = cast(N); - ISD::MemIndexedMode AM = ST->getAddressingMode(); - return (AM == ISD::PRE_INC || AM == ISD::PRE_DEC) && - ST->isTruncatingStore() && ST->getMemoryVT() == MVT::i16; + (pre_truncst node:$val, node:$base, node:$offset), [{ + return cast(N)->getMemoryVT() == MVT::i16; }]>; def pre_truncsti32 : PatFrag<(ops node:$val, node:$base, node:$offset), - (ist node:$val, node:$base, node:$offset), [{ - StoreSDNode *ST = cast(N); - ISD::MemIndexedMode AM = ST->getAddressingMode(); - return (AM == ISD::PRE_INC || AM == ISD::PRE_DEC) && - ST->isTruncatingStore() && ST->getMemoryVT() == MVT::i32; + (pre_truncst node:$val, node:$base, node:$offset), [{ + return cast(N)->getMemoryVT() == MVT::i32; }]>; def pre_truncstf32 : PatFrag<(ops node:$val, node:$base, node:$offset), - (ist node:$val, node:$base, node:$offset), [{ - StoreSDNode *ST = cast(N); - ISD::MemIndexedMode AM = ST->getAddressingMode(); - return (AM == ISD::PRE_INC || AM == ISD::PRE_DEC) && - ST->isTruncatingStore() && ST->getMemoryVT() == MVT::f32; + (pre_truncst node:$val, node:$base, node:$offset), [{ + return cast(N)->getMemoryVT() == MVT::f32; }]>; def post_store : PatFrag<(ops node:$val, node:$ptr, node:$offset), - (ist node:$val, node:$ptr, node:$offset), [{ - StoreSDNode *ST = cast(N); - ISD::MemIndexedMode AM = ST->getAddressingMode(); - return !ST->isTruncatingStore() && - (AM == ISD::POST_INC || AM == ISD::POST_DEC); + (istore node:$val, node:$ptr, node:$offset), [{ + ISD::MemIndexedMode AM = cast(N)->getAddressingMode(); + return AM == ISD::POST_INC || AM == ISD::POST_DEC; }]>; +def post_truncst : PatFrag<(ops node:$val, node:$base, node:$offset), + (itruncstore node:$val, node:$base, node:$offset), [{ + ISD::MemIndexedMode AM = cast(N)->getAddressingMode(); + return AM == ISD::POST_INC || AM == ISD::POST_DEC; +}]>; def post_truncsti1 : PatFrag<(ops node:$val, node:$base, node:$offset), - (ist node:$val, node:$base, node:$offset), [{ - StoreSDNode *ST = cast(N); - ISD::MemIndexedMode AM = ST->getAddressingMode(); - return (AM == ISD::POST_INC || AM == ISD::POST_DEC) && - ST->isTruncatingStore() && ST->getMemoryVT() == MVT::i1; + (post_truncst node:$val, node:$base, node:$offset), [{ + return cast(N)->getMemoryVT() == MVT::i1; }]>; def post_truncsti8 : PatFrag<(ops node:$val, node:$base, node:$offset), - (ist node:$val, node:$base, node:$offset), [{ - StoreSDNode *ST = cast(N); - ISD::MemIndexedMode AM = ST->getAddressingMode(); - return (AM == ISD::POST_INC || AM == ISD::POST_DEC) && - ST->isTruncatingStore() && ST->getMemoryVT() == MVT::i8; + (post_truncst node:$val, node:$base, node:$offset), [{ + return cast(N)->getMemoryVT() == MVT::i8; }]>; def post_truncsti16 : PatFrag<(ops node:$val, node:$base, node:$offset), - (ist node:$val, node:$base, node:$offset), [{ - StoreSDNode *ST = cast(N); - ISD::MemIndexedMode AM = ST->getAddressingMode(); - return (AM == ISD::POST_INC || AM == ISD::POST_DEC) && - ST->isTruncatingStore() && ST->getMemoryVT() == MVT::i16; + (post_truncst node:$val, node:$base, node:$offset), [{ + return cast(N)->getMemoryVT() == MVT::i16; }]>; def post_truncsti32 : PatFrag<(ops node:$val, node:$base, node:$offset), - (ist node:$val, node:$base, node:$offset), [{ - StoreSDNode *ST = cast(N); - ISD::MemIndexedMode AM = ST->getAddressingMode(); - return (AM == ISD::POST_INC || AM == ISD::POST_DEC) && - ST->isTruncatingStore() && ST->getMemoryVT() == MVT::i32; + (post_truncst node:$val, node:$base, node:$offset), [{ + return cast(N)->getMemoryVT() == MVT::i32; }]>; def post_truncstf32 : PatFrag<(ops node:$val, node:$base, node:$offset), - (ist node:$val, node:$base, node:$offset), [{ - StoreSDNode *ST = cast(N); - ISD::MemIndexedMode AM = ST->getAddressingMode(); - return (AM == ISD::POST_INC || AM == ISD::POST_DEC) && - ST->isTruncatingStore() && ST->getMemoryVT() == MVT::f32; + (post_truncst node:$val, node:$base, node:$offset), [{ + return cast(N)->getMemoryVT() == MVT::f32; }]>; // setcc convenience fragments. Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=57565&r1=57564&r2=57565&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Wed Oct 15 01:50:19 2008 @@ -254,10 +254,8 @@ // Helper fragments for loads. // It's always safe to treat a anyext i16 load as a i32 load if the i16 is // known to be 32-bit aligned or better. Ditto for i8 to i16. -def loadi16 : PatFrag<(ops node:$ptr), (i16 (ld node:$ptr)), [{ +def loadi16 : PatFrag<(ops node:$ptr), (i16 (unindexedload node:$ptr)), [{ LoadSDNode *LD = cast(N); - if (LD->getAddressingMode() != ISD::UNINDEXED) - return false; ISD::LoadExtType ExtType = LD->getExtensionType(); if (ExtType == ISD::NON_EXTLOAD) return true; @@ -266,20 +264,16 @@ return false; }]>; -def loadi16_anyext : PatFrag<(ops node:$ptr), (i32 (ld node:$ptr)), [{ +def loadi16_anyext : PatFrag<(ops node:$ptr), (i32 (unindexedload node:$ptr)), [{ LoadSDNode *LD = cast(N); - if (LD->getAddressingMode() != ISD::UNINDEXED) - return false; ISD::LoadExtType ExtType = LD->getExtensionType(); if (ExtType == ISD::EXTLOAD) return LD->getAlignment() >= 2 && !LD->isVolatile(); return false; }]>; -def loadi32 : PatFrag<(ops node:$ptr), (i32 (ld node:$ptr)), [{ +def loadi32 : PatFrag<(ops node:$ptr), (i32 (unindexedload node:$ptr)), [{ LoadSDNode *LD = cast(N); - if (LD->getAddressingMode() != ISD::UNINDEXED) - return false; ISD::LoadExtType ExtType = LD->getExtensionType(); if (ExtType == ISD::NON_EXTLOAD) return true; @@ -288,12 +282,10 @@ return false; }]>; -def nvloadi32 : PatFrag<(ops node:$ptr), (i32 (ld node:$ptr)), [{ +def nvloadi32 : PatFrag<(ops node:$ptr), (i32 (unindexedload node:$ptr)), [{ LoadSDNode *LD = cast(N); if (LD->isVolatile()) return false; - if (LD->getAddressingMode() != ISD::UNINDEXED) - return false; ISD::LoadExtType ExtType = LD->getExtensionType(); if (ExtType == ISD::NON_EXTLOAD) return true; Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=57565&r1=57564&r2=57565&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Wed Oct 15 01:50:19 2008 @@ -98,19 +98,13 @@ // Like 'store', but always requires vector alignment. def alignedstore : PatFrag<(ops node:$val, node:$ptr), - (st node:$val, node:$ptr), [{ - StoreSDNode *ST = cast(N); - return !ST->isTruncatingStore() && - ST->getAddressingMode() == ISD::UNINDEXED && - ST->getAlignment() >= 16; + (store node:$val, node:$ptr), [{ + return cast(N)->getAlignment() >= 16; }]>; // Like 'load', but always requires vector alignment. -def alignedload : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::NON_EXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getAlignment() >= 16; +def alignedload : PatFrag<(ops node:$ptr), (load node:$ptr), [{ + return cast(N)->getAlignment() >= 16; }]>; def alignedloadfsf32 : PatFrag<(ops node:$ptr), (f32 (alignedload node:$ptr))>; @@ -125,11 +119,8 @@ // be naturally aligned on some targets but not on others. // FIXME: Actually implement support for targets that don't require the // alignment. This probably wants a subtarget predicate. -def memop : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::NON_EXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getAlignment() >= 16; +def memop : PatFrag<(ops node:$ptr), (load node:$ptr), [{ + return cast(N)->getAlignment() >= 16; }]>; def memopfsf32 : PatFrag<(ops node:$ptr), (f32 (memop node:$ptr))>; @@ -143,11 +134,8 @@ // SSSE3 uses MMX registers for some instructions. They aren't aligned on a // 16-byte boundary. // FIXME: 8 byte alignment for mmx reads is not required -def memop64 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ - LoadSDNode *LD = cast(N); - return LD->getExtensionType() == ISD::NON_EXTLOAD && - LD->getAddressingMode() == ISD::UNINDEXED && - LD->getAlignment() >= 8; +def memop64 : PatFrag<(ops node:$ptr), (unindexedload node:$ptr), [{ + return cast(N)->getAlignment() >= 8; }]>; def memopv8i8 : PatFrag<(ops node:$ptr), (v8i8 (memop64 node:$ptr))>; From foldr at codedgers.com Wed Oct 15 04:27:45 2008 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Wed, 15 Oct 2008 09:27:45 -0000 Subject: [llvm-commits] [llvm] r57566 - in /llvm/trunk/tools/llvmc2/doc: Makefile img/ img/lines.gif llvm.css Message-ID: <200810150927.m9F9RjuJ028482@zion.cs.uiuc.edu> Author: foldr Date: Wed Oct 15 04:27:44 2008 New Revision: 57566 URL: http://llvm.org/viewvc/llvm-project?rev=57566&view=rev Log: Use (a slightly modified) llvm.css for llvmc2 docs. Added: llvm/trunk/tools/llvmc2/doc/img/ llvm/trunk/tools/llvmc2/doc/img/lines.gif llvm/trunk/tools/llvmc2/doc/llvm.css Modified: llvm/trunk/tools/llvmc2/doc/Makefile Modified: llvm/trunk/tools/llvmc2/doc/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/doc/Makefile?rev=57566&r1=57565&r2=57566&view=diff ============================================================================== --- llvm/trunk/tools/llvmc2/doc/Makefile (original) +++ llvm/trunk/tools/llvmc2/doc/Makefile Wed Oct 15 04:27:44 2008 @@ -1,12 +1,12 @@ -RST2HTML=rst2html +RST2HTML=rst2html --stylesheet=llvm.css --link-stylesheet all : LLVMC-Reference.html LLVMC-Tutorial.html -LLVMC-Tutorial.html : LLVMC-Tutorial.rst +LLVMC-Tutorial.html : LLVMC-Tutorial.rst llvm.css $(RST2HTML) $< $@ -LLVMC-Reference.html : LLVMC-Reference.rst +LLVMC-Reference.html : LLVMC-Reference.rst llvm.css $(RST2HTML) $< $@ clean : Added: llvm/trunk/tools/llvmc2/doc/img/lines.gif URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/doc/img/lines.gif?rev=57566&view=auto ============================================================================== Binary files llvm/trunk/tools/llvmc2/doc/img/lines.gif (added) and llvm/trunk/tools/llvmc2/doc/img/lines.gif Wed Oct 15 04:27:44 2008 differ Added: llvm/trunk/tools/llvmc2/doc/llvm.css URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/doc/llvm.css?rev=57566&view=auto ============================================================================== --- llvm/trunk/tools/llvmc2/doc/llvm.css (added) +++ llvm/trunk/tools/llvmc2/doc/llvm.css Wed Oct 15 04:27:44 2008 @@ -0,0 +1,86 @@ +/* + * LLVM documentation style sheet + */ + +/* Common styles */ +.body { color: black; background: white; margin: 0 0 0 0 } + +/* No borders on image links */ +a:link img, a:visited img {border-style: none} + +address img { float: right; width: 88px; height: 31px; } +address { clear: right; } + +TR, TD { border: 2px solid gray; padding: 4pt 4pt 2pt 2pt; } +TH { border: 2px solid gray; font-weight: bold; font-size: 105%; + background: url("img/lines.gif"); + font-family: "Georgia,Palatino,Times,Roman,SanSerif"; text-align:center; + vertical-align: middle; } +TABLE { text-align: center; border: 2px solid black; + border-collapse: collapse; margin-top: 1em; margin-left: 1em; + margin-right: 1em; margin-bottom: 1em; } +/* + * Documentation + */ +/* Common for title and header */ +h1 { + color: black; background: url("img/lines.gif"); + font-family: "Georgia,Palatino,Times,Roman,SanSerif"; font-weight: bold; + border-width: 1px; + border-style: solid none solid none; + text-align: center; + vertical-align: middle; + padding-left: 8pt; + padding-top: 1px; + padding-bottom: 2px +} + +.doc_title { text-align: left; font-size: 25pt } +.doc_section { text-align: center; font-size: 22pt; + margin: 20pt 0pt 5pt 0pt; } +.doc_subsection { width: 75%; + text-align: left; font-size: 12pt; padding: 4pt 4pt 4pt 4pt; + margin: 1.5em 0.5em 0.5em 0.5em } + +.doc_subsubsection { margin: 2.0em 0.5em 0.5em 0.5em; + font-weight: bold; font-style: oblique; + border-bottom: 1px solid #999999; font-size: 12pt; + width: 75%; } +.doc_author { text-align: left; font-weight: bold; padding-left: 20pt } +.doc_text { text-align: left; padding-left: 20pt; padding-right: 10pt } + +.doc_footer { text-align: left; padding: 0 0 0 0 } + +.doc_hilite { color: blue; font-weight: bold; } + +.doc_table { text-align: center; width: 90%; + padding: 1px 1px 1px 1px; border: 1px; } + +.doc_table_nw { text-align: center; border: 1px; + padding: 1px 1px 1px 1px; } + +.doc_warning { color: red; font-weight: bold } + +.literal-block { border: solid 1px gray; background: #eeeeee; + margin: 0 1em 0 1em; + padding: 0 1em 0 1em; + display:table; + } +.doc_notes { background: #fafafa; border: 1px solid #cecece; padding: 0.1em } + +TABLE.layout { text-align: left; border: none; border-collapse: collapse; + padding: 4px 4px 4px 4px; } +TR.layout { border: none; padding: 4pt 4pt 2pt 2pt; } +TD.layout { border: none; padding: 4pt 4pt 2pt 2pt; + vertical-align: top;} +TD.left { border: none; padding: 4pt 4pt 2pt 2pt; text-align: left; + vertical-align: top;} +TD.right { border: none; padding: 4pt 4pt 2pt 2pt; text-align: right; + vertical-align: top;} +TH.layout { border: none; font-weight: bold; font-size: 105%; + text-align:center; vertical-align: middle; } + +/* Left align table cell */ +.td_left { border: 2px solid gray; text-align: left; } + +.toc-backref { color: black; } From foldr at codedgers.com Wed Oct 15 04:28:51 2008 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Wed, 15 Oct 2008 09:28:51 -0000 Subject: [llvm-commits] [llvm] r57567 - in /llvm/trunk/tools/llvmc2: Makefile examples/Simple.td plugins/Base/AutoGenerated.cpp plugins/Base/PluginMain.cpp plugins/Clang/AutoGenerated.cpp plugins/Clang/PluginMain.cpp plugins/Makefile plugins/Simple/ plugins/Simple/Makefile plugins/Simple/PluginMain.cpp plugins/Simple/Simple.td Message-ID: <200810150928.m9F9SpRa028529@zion.cs.uiuc.edu> Author: foldr Date: Wed Oct 15 04:28:50 2008 New Revision: 57567 URL: http://llvm.org/viewvc/llvm-project?rev=57567&view=rev Log: llvmc2: Some Makefile fixes and renames. Added: llvm/trunk/tools/llvmc2/plugins/Base/PluginMain.cpp - copied, changed from r57566, llvm/trunk/tools/llvmc2/plugins/Base/AutoGenerated.cpp llvm/trunk/tools/llvmc2/plugins/Clang/PluginMain.cpp - copied, changed from r57566, llvm/trunk/tools/llvmc2/plugins/Clang/AutoGenerated.cpp llvm/trunk/tools/llvmc2/plugins/Simple/ llvm/trunk/tools/llvmc2/plugins/Simple/Makefile llvm/trunk/tools/llvmc2/plugins/Simple/PluginMain.cpp - copied, changed from r57566, llvm/trunk/tools/llvmc2/plugins/Base/AutoGenerated.cpp llvm/trunk/tools/llvmc2/plugins/Simple/Simple.td Removed: llvm/trunk/tools/llvmc2/examples/Simple.td llvm/trunk/tools/llvmc2/plugins/Base/AutoGenerated.cpp llvm/trunk/tools/llvmc2/plugins/Clang/AutoGenerated.cpp Modified: llvm/trunk/tools/llvmc2/Makefile llvm/trunk/tools/llvmc2/plugins/Makefile Modified: llvm/trunk/tools/llvmc2/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/Makefile?rev=57567&r1=57566&r2=57567&view=diff ============================================================================== --- llvm/trunk/tools/llvmc2/Makefile (original) +++ llvm/trunk/tools/llvmc2/Makefile Wed Oct 15 04:28:50 2008 @@ -11,7 +11,7 @@ BUILTIN_PLUGINS = Base DRIVER_NAME = llvmc2 -DIRS = plugins driver +DIRS = plugins driver export BUILTIN_PLUGINS export DRIVER_NAME Removed: llvm/trunk/tools/llvmc2/examples/Simple.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/examples/Simple.td?rev=57566&view=auto ============================================================================== --- llvm/trunk/tools/llvmc2/examples/Simple.td (original) +++ llvm/trunk/tools/llvmc2/examples/Simple.td (removed) @@ -1,17 +0,0 @@ -// A simple wrapper for gcc. -// To compile, use this command: -// TOFIX - -include "Common.td" - -def gcc : Tool< -[(in_language "c"), - (out_language "executable"), - (output_suffix "out"), - (cmd_line "gcc $INFILE -o $OUTFILE"), - (sink) -]>; - -def LanguageMap : LanguageMap<[LangToSuffixes<"c", ["c"]>]>; - -def CompilationGraph : CompilationGraph<[Edge]>; Removed: llvm/trunk/tools/llvmc2/plugins/Base/AutoGenerated.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Base/AutoGenerated.cpp?rev=57566&view=auto ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Base/AutoGenerated.cpp (original) +++ llvm/trunk/tools/llvmc2/plugins/Base/AutoGenerated.cpp (removed) @@ -1 +0,0 @@ -#include "AutoGenerated.inc" Copied: llvm/trunk/tools/llvmc2/plugins/Base/PluginMain.cpp (from r57566, llvm/trunk/tools/llvmc2/plugins/Base/AutoGenerated.cpp) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Base/PluginMain.cpp?p2=llvm/trunk/tools/llvmc2/plugins/Base/PluginMain.cpp&p1=llvm/trunk/tools/llvmc2/plugins/Base/AutoGenerated.cpp&r1=57566&r2=57567&rev=57567&view=diff ============================================================================== (empty) Removed: llvm/trunk/tools/llvmc2/plugins/Clang/AutoGenerated.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Clang/AutoGenerated.cpp?rev=57566&view=auto ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Clang/AutoGenerated.cpp (original) +++ llvm/trunk/tools/llvmc2/plugins/Clang/AutoGenerated.cpp (removed) @@ -1 +0,0 @@ -#include "AutoGenerated.inc" Copied: llvm/trunk/tools/llvmc2/plugins/Clang/PluginMain.cpp (from r57566, llvm/trunk/tools/llvmc2/plugins/Clang/AutoGenerated.cpp) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Clang/PluginMain.cpp?p2=llvm/trunk/tools/llvmc2/plugins/Clang/PluginMain.cpp&p1=llvm/trunk/tools/llvmc2/plugins/Clang/AutoGenerated.cpp&r1=57566&r2=57567&rev=57567&view=diff ============================================================================== (empty) Modified: llvm/trunk/tools/llvmc2/plugins/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Makefile?rev=57567&r1=57566&r2=57567&view=diff ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Makefile (original) +++ llvm/trunk/tools/llvmc2/plugins/Makefile Wed Oct 15 04:28:50 2008 @@ -12,7 +12,7 @@ LEVEL = ../../.. DIRS = $(BUILTIN_PLUGINS) -# TOFIX: DSO versions of plugins are not built +# TOFIX: How to build DSO versions of plugins? export BUILTIN_LLVMC_PLUGIN=1 @@ -22,25 +22,28 @@ LEVEL = ../../../.. -LIBRARYNAME = $(patsubst %,LLVMC%,$(LLVMC_PLUGIN)) -TOOLS_SOURCE = $(wildcard $(PROJ_SRC_DIR)/*.td) +LIBRARYNAME := $(patsubst %,LLVMC%,$(LLVMC_PLUGIN)) REQUIRES_EH = 1 ifndef BUILTIN_LLVMC_PLUGIN LOADABLE_MODULE = 1 endif -ifneq ($(TOOLS_SOURCE),"") -BUILD_AUTOGENERATED_INC=1 +# This probably breaks the build with $ObjDir != $SrcDir +TOOLS_SOURCE := $(strip $(wildcard *.td)) + +ifneq ($(TOOLS_SOURCE),) +BUILD_AUTOGENERATED_INC = 1 BUILT_SOURCES = AutoGenerated.inc endif include $(LEVEL)/Makefile.common -# TOFIX: This should go into Makefile.rules +# TOFIX: This probably should go into Makefile.rules ifdef BUILD_AUTOGENERATED_INC -TD_COMMON = $(wildcard $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td) +TD_COMMON :=$(strip $(wildcard \ + $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td)) $(ObjDir)/AutoGenerated.inc.tmp: $(TOOLS_SOURCE) $(ObjDir)/.dir \ $(TBLGEN) $(TD_COMMON) Added: llvm/trunk/tools/llvmc2/plugins/Simple/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Simple/Makefile?rev=57567&view=auto ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Simple/Makefile (added) +++ llvm/trunk/tools/llvmc2/plugins/Simple/Makefile Wed Oct 15 04:28:50 2008 @@ -0,0 +1,12 @@ +##===- tools/llvmc2/plugins/Simple/Makefile ------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +LLVMC_PLUGIN = Simple + +include ../Makefile Copied: llvm/trunk/tools/llvmc2/plugins/Simple/PluginMain.cpp (from r57566, llvm/trunk/tools/llvmc2/plugins/Base/AutoGenerated.cpp) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Simple/PluginMain.cpp?p2=llvm/trunk/tools/llvmc2/plugins/Simple/PluginMain.cpp&p1=llvm/trunk/tools/llvmc2/plugins/Base/AutoGenerated.cpp&r1=57566&r2=57567&rev=57567&view=diff ============================================================================== (empty) Added: llvm/trunk/tools/llvmc2/plugins/Simple/Simple.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Simple/Simple.td?rev=57567&view=auto ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Simple/Simple.td (added) +++ llvm/trunk/tools/llvmc2/plugins/Simple/Simple.td Wed Oct 15 04:28:50 2008 @@ -0,0 +1,30 @@ +// A simple wrapper for gcc. +// To compile, use this command: +// +// $ cd $LLVMC2_DIR +// $ make DRIVER_NAME=mygcc BUILTIN_PLUGINS=Simple +// +// To build this plugin as a dynamic library: +// +// $ cd $LLVMC2_DIR +// $ make BUILTIN_PLUGINS="" +// $ cd plugins/Simple +// $ make +// +// Run as: +// +// $ llvmc2 -load $LLVM_DIR/Release/lib/LLVMCSimple.so + +include "llvm/CompilerDriver/Common.td" + +def gcc : Tool< +[(in_language "c"), + (out_language "executable"), + (output_suffix "out"), + (cmd_line "gcc $INFILE -o $OUTFILE"), + (sink) +]>; + +def LanguageMap : LanguageMap<[LangToSuffixes<"c", ["c"]>]>; + +def CompilationGraph : CompilationGraph<[Edge]>; From foldr at codedgers.com Wed Oct 15 04:29:13 2008 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Wed, 15 Oct 2008 09:29:13 -0000 Subject: [llvm-commits] [llvm] r57568 - in /llvm/trunk/tools/llvmc2/doc: LLVMC-Reference.rst LLVMC-Tutorial.rst Message-ID: <200810150929.m9F9TDEP028557@zion.cs.uiuc.edu> Author: foldr Date: Wed Oct 15 04:29:13 2008 New Revision: 57568 URL: http://llvm.org/viewvc/llvm-project?rev=57568&view=rev Log: llvmc2: Documentation update. Describe recent work on plugins. Modified: llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst llvm/trunk/tools/llvmc2/doc/LLVMC-Tutorial.rst Modified: llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst?rev=57568&r1=57567&r2=57568&view=diff ============================================================================== --- llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst (original) +++ llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst Wed Oct 15 04:29:13 2008 @@ -10,8 +10,10 @@ are completely customizable - in fact, LLVMC knows nothing about the specifics of transformation (even the command-line options are mostly not hard-coded) and regards the transformation structure as an -abstract graph. This makes it possible to adapt LLVMC for other -purposes - for example, as a build tool for game resources. +abstract graph. The structure of this graph is completely determined +by plugins, which can be either statically or dynamically linked. This +makes it possible to easily adapt LLVMC for other purposes - for +example, as a build tool for game resources. Because LLVMC employs TableGen [1]_ as its configuration language, you need to be familiar with it to customize LLVMC. @@ -55,6 +57,7 @@ $ ./a.out hello + Predefined options ================== @@ -66,6 +69,9 @@ * ``-x LANGUAGE`` - Specify the language of the following input files until the next -x option. +* ``-load PLUGIN_NAME`` - Load the specified plugin DLL. Example: + ``-load $LLVM_DIR/Release/lib/LLVMCSimple.so``. + * ``-v`` - Enable verbose mode, i.e. print out all executed commands. * ``--view-graph`` - Show a graphical representation of the compilation @@ -83,26 +89,76 @@ their standard meaning. +Compiling LLVMC plugins +======================= + +It's easiest to start working on your own LLVMC plugin by copying the +skeleton project which lives under ``$LLVMC_DIR/plugins/Simple``:: + + $ cd $LLVMC_DIR/plugins + $ cp -r Simple MyPlugin + $ cd MyPlugin + $ ls + Makefile PluginMain.cpp Simple.td + +As you can see, our basic plugin consists of only two files (not +counting the build script). ``Simple.td`` contains TableGen +description of the compilation graph; its format is documented in the +following sections. ``PluginMain.cpp`` is just a helper file used to +compile the auto-generated C++ code produced from TableGen source. It +can also contain hook definitions (see `below`__). + +__ hooks_ + +The first thing that you should do is to change the ``LLVMC_PLUGIN`` +variable in the ``Makefile`` to avoid conflicts (since this variable +is used to name the resulting library):: + + LLVMC_PLUGIN=MyPlugin + +It is also a good idea to rename ``Simple.td`` to something less +generic:: + + $ mv Simple.td MyPlugin.td + +Note that the plugin source directory should be placed into +``$LLVMC_DIR/plugins`` to make use of the existing build +infrastructure. To build a version of the LLVMC executable called +``mydriver`` with your plugin compiled in, use the following command:: + + $ cd $LLVMC_DIR + $ make BUILTIN_PLUGINS=MyPlugin DRIVER_NAME=mydriver + +When linking plugins dynamically, you'll usually want a 'bare-bones' +version of LLVMC that has no built-in plugins. It can be compiled with +the following command:: + + $ cd $LLVMC_DIR + $ make BUILTIN_PLUGINS="" + +To build your plugin as a dynamic library, just ``cd`` to its source +directory and run ``make``. The resulting file will be called +``LLVMC$(LLVMC_PLUGIN).$(DLL_EXTENSION)`` (in our case, +``LLVMCMyPlugin.so``). This library can be then loaded in with the +``-load`` option. Example:: + + $ cd $LLVMC_DIR/plugins/Simple + $ make + $ llvmc2 -load $LLVM_DIR/Release/lib/LLVMCSimple.so + +In the future LLVMC will be able to load TableGen files directly. + + Customizing LLVMC: the compilation graph ======================================== -At the time of writing LLVMC does not support on-the-fly reloading of -configuration, so to customize LLVMC you'll have to recompile the -source code (which lives under ``$LLVM_DIR/tools/llvmc2``). The -default configuration files are ``Common.td`` (contains common -definitions, don't forget to ``include`` it in your configuration -files), ``Tools.td`` (tool descriptions) and ``Graph.td`` (compilation -graph definition). - -To compile LLVMC with your own configuration file (say,``MyGraph.td``), -run ``make`` like this:: - - $ cd $LLVM_DIR/tools/llvmc2 - $ make GRAPH=MyGraph.td TOOLNAME=my_llvmc - -This will build an executable named ``my_llvmc``. There are also -several sample configuration files in the ``llvmc2/examples`` -subdirectory that should help to get you started. +Each TableGen configuration file should include the common +definitions:: + + include "llvm/CompilerDriver/Common.td" + // And optionally: + // include "llvm/CompilerDriver/Tools.td" + // which contains tool definitions. Internally, LLVMC stores information about possible source transformations in form of a graph. Nodes in this graph represent @@ -111,8 +167,8 @@ transformations. LLVMC also assigns a weight to each edge (more on this later) to choose between several alternative edges. -The definition of the compilation graph (see file ``Graph.td``) is -just a list of edges:: +The definition of the compilation graph (see file +``plugins/Base/Base.td`` for an example) is just a list of edges:: def CompilationGraph : CompilationGraph<[ Edge, @@ -136,8 +192,8 @@ ]>; As you can see, the edges can be either default or optional, where -optional edges are differentiated by sporting a ``case`` expression -used to calculate the edge's weight. +optional edges are differentiated by an additional ``case`` expression +used to calculate the weight of this edge. The default edges are assigned a weight of 1, and optional edges get a weight of 0 + 2*N where N is the number of tests that evaluated to @@ -162,7 +218,7 @@ As was said earlier, nodes in the compilation graph represent tools, which are described separately. A tool definition looks like this -(taken from the ``Tools.td`` file):: +(taken from the ``include/llvm/CompilerDriver/Tools.td`` file):: def llvm_gcc_cpp : Tool<[ (in_language "c++"), @@ -289,7 +345,9 @@ allowed there are ``help`` and ``required``. Option lists are used at the file scope. See file -``examples/Clang.td`` for an example of ``OptionList`` usage. +``plugins/Clang/Clang.td`` for an example of ``OptionList`` usage. + +.. _hooks: Using hooks and environment variables in the ``cmd_line`` property ================================================================== @@ -297,8 +355,9 @@ Normally, LLVMC executes programs from the system ``PATH``. Sometimes, this is not sufficient: for example, we may want to specify tool names in the configuration file. This can be achieved via the mechanism of -hooks - to compile LLVMC with your hooks, just drop a .cpp file into -``tools/llvmc2`` directory. Hooks should live in the ``hooks`` +hooks - to write your own hooks, just add their definitions to the +``PluginMain.cpp`` or drop a ``.cpp`` file into the +``$LLVMC_DIR/driver`` directory. Hooks should live in the ``hooks`` namespace and have the signature ``std::string hooks::MyHookName (void)``. They can be used from the ``cmd_line`` tool property:: Modified: llvm/trunk/tools/llvmc2/doc/LLVMC-Tutorial.rst URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/doc/LLVMC-Tutorial.rst?rev=57568&r1=57567&r2=57568&view=diff ============================================================================== --- llvm/trunk/tools/llvmc2/doc/LLVMC-Tutorial.rst (original) +++ llvm/trunk/tools/llvmc2/doc/LLVMC-Tutorial.rst Wed Oct 15 04:29:13 2008 @@ -4,8 +4,10 @@ LLVMC is a generic compiler driver, which plays the same role for LLVM as the ``gcc`` program does for GCC - the difference being that LLVMC -is designed to be more adaptable and easier to customize. This -tutorial describes the basic usage and configuration of LLVMC. +is designed to be more adaptable and easier to customize. Most of +LLVMC functionality is implemented via plugins, which can be loaded +dynamically or compiled in. This tutorial describes the basic usage +and configuration of LLVMC. .. contents:: @@ -27,21 +29,25 @@ Using LLVMC to generate toolchain drivers ========================================= -At the time of writing LLVMC does not support on-the-fly reloading of -configuration, so it will be necessary to recompile its source -code. LLVMC uses TableGen [1]_ as its configuration language, so -you need to be familiar with it. +LLVMC plugins are written mostly using TableGen [1]_, so you need to +be familiar with it to get anything done. -Start by compiling ``examples/Simple.td``, which is a simple wrapper -for ``gcc``:: +Start by compiling ``plugins/Simple/Simple.td``, which is a primitive +wrapper for ``gcc``:: $ cd $LLVM_DIR/tools/llvmc2 - $ make TOOLNAME=mygcc GRAPH=examples/Simple.td - $ edit hello.c + $ make DRIVER_NAME=mygcc BUILTIN_PLUGINS=Simple + $ cat > hello.c + [...] $ mygcc hello.c $ ./hello.out Hello +Here we link our plugin with the LLVMC core statically to form an +executable file called ``mygcc``. It is also possible to build our +plugin as a standalone dynamic library; this is described in the +reference manual. + Contents of the file ``Simple.td`` look like this:: // Include common definitions @@ -65,23 +71,24 @@ As you can see, this file consists of three parts: tool descriptions, language map, and the compilation graph definition. -At the heart of LLVMC is the idea of a transformation graph: vertices -in this graph are tools, and edges represent a transformation path +At the heart of LLVMC is the idea of a compilation graph: vertices in +this graph are tools, and edges represent a transformation path between two tools (for example, assembly source produced by the -compiler can be transformed into executable code by an assembler). A -special node named ``root`` is used to mark graph entry points. +compiler can be transformed into executable code by an assembler). The +compilation graph is basically a list of edges; a special node named +``root`` is used to mark graph entry points. -Tool descriptions are basically lists of properties: most properties +Tool descriptions are represented as property lists: most properties in the example above should be self-explanatory; the ``sink`` property means that all options lacking an explicit description should be forwarded to this tool. -``LanguageMap`` associates a language name with a list of suffixes and -is used for deciding which toolchain corresponds to a given input +The ``LanguageMap`` associates a language name with a list of suffixes +and is used for deciding which toolchain corresponds to a given input file. To learn more about LLVMC customization, refer to the reference -manual and sample configuration files in the ``examples`` directory. +manual and plugin source code in the ``plugins`` directory. References ========== From ggreif at gmail.com Wed Oct 15 04:52:56 2008 From: ggreif at gmail.com (Gabor Greif) Date: Wed, 15 Oct 2008 09:52:56 -0000 Subject: [llvm-commits] [llvm] r57569 - /llvm/trunk/include/llvm/InstrTypes.h Message-ID: <200810150952.m9F9quCs029244@zion.cs.uiuc.edu> Author: ggreif Date: Wed Oct 15 04:52:56 2008 New Revision: 57569 URL: http://llvm.org/viewvc/llvm-project?rev=57569&view=rev Log: remove legacy interfaces Modified: llvm/trunk/include/llvm/InstrTypes.h Modified: llvm/trunk/include/llvm/InstrTypes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InstrTypes.h?rev=57569&r1=57568&r2=57569&view=diff ============================================================================== --- llvm/trunk/include/llvm/InstrTypes.h (original) +++ llvm/trunk/include/llvm/InstrTypes.h Wed Oct 15 04:52:56 2008 @@ -242,53 +242,6 @@ static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } - - /// Backward-compatible interfaces - /// @deprecated in 2.4, do not use, will disappear soon - static BinaryOperator *create(BinaryOps Op, Value *S1, Value *S2, - const std::string &Name = "", - Instruction *InsertBefore = 0) { - return Create(Op, S1, S2, Name, InsertBefore); - } - static BinaryOperator *create(BinaryOps Op, Value *S1, Value *S2, - const std::string &Name, - BasicBlock *InsertAtEnd) { - return Create(Op, S1, S2, Name, InsertAtEnd); - } -#define HANDLE_BINARY_INST(N, OPC, CLASS) \ - static BinaryOperator *create##OPC(Value *V1, Value *V2, \ - const std::string &Name = "") {\ - return Create(Instruction::OPC, V1, V2, Name);\ - } -#include "llvm/Instruction.def" -#define HANDLE_BINARY_INST(N, OPC, CLASS) \ - static BinaryOperator *create##OPC(Value *V1, Value *V2, \ - const std::string &Name, BasicBlock *BB) {\ - return Create(Instruction::OPC, V1, V2, Name, BB);\ - } -#include "llvm/Instruction.def" -#define HANDLE_BINARY_INST(N, OPC, CLASS) \ - static BinaryOperator *create##OPC(Value *V1, Value *V2, \ - const std::string &Name, Instruction *I) {\ - return Create(Instruction::OPC, V1, V2, Name, I);\ - } -#include "llvm/Instruction.def" - static BinaryOperator *createNeg(Value *Op, const std::string &Name = "", - Instruction *InsertBefore = 0) { - return CreateNeg(Op, Name, InsertBefore); - } - static BinaryOperator *createNeg(Value *Op, const std::string &Name, - BasicBlock *InsertAtEnd) { - return CreateNeg(Op, Name, InsertAtEnd); - } - static BinaryOperator *createNot(Value *Op, const std::string &Name = "", - Instruction *InsertBefore = 0) { - return CreateNot(Op, Name, InsertBefore); - } - static BinaryOperator *createNot(Value *Op, const std::string &Name, - BasicBlock *InsertAtEnd) { - return CreateNot(Op, Name, InsertAtEnd); - } }; template <> @@ -535,40 +488,6 @@ static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); } - /// Backward-compatible interfaces - /// @deprecated in 2.4, do not use, will disappear soon - static CastInst *create(Instruction::CastOps Op,Value *S,const Type *Ty, - const std::string &Name = "",Instruction *InsertBefore = 0) { - return Create(Op,S,Ty,Name,InsertBefore); - } - static CastInst *create(Instruction::CastOps Op,Value *S,const Type *Ty, - const std::string &Name,BasicBlock *InsertAtEnd) { - return Create(Op,S,Ty,Name,InsertAtEnd); - } - -#define DEFINE_CASTINST_DEPRECATED(OP) \ - static CastInst *create ## OP ## Cast(Value *S, const Type *Ty, \ - const std::string &Name = "", Instruction *InsertBefore = 0) { \ - return Create ## OP ## Cast(S, Ty, Name, InsertBefore); \ - } \ - static CastInst *create ## OP ## Cast(Value *S, const Type *Ty, \ - const std::string &Name, BasicBlock *InsertAtEnd) { \ - return Create ## OP ## Cast(S, Ty, Name, InsertAtEnd); \ - } - DEFINE_CASTINST_DEPRECATED(ZExtOrBit) - DEFINE_CASTINST_DEPRECATED(SExtOrBit) - DEFINE_CASTINST_DEPRECATED(Pointer) - DEFINE_CASTINST_DEPRECATED(FP) - DEFINE_CASTINST_DEPRECATED(TruncOrBit) -#undef DEFINE_CASTINST_DEPRECATED - static CastInst *createIntegerCast(Value *S, const Type *Ty, bool isSigned, - const std::string &Name = "", Instruction *InsertBefore = 0) { - return CreateIntegerCast(S, Ty, isSigned, Name, InsertBefore); - } - static CastInst *createIntegerCast(Value *S, const Type *Ty, bool isSigned, - const std::string &Name, BasicBlock *InsertAtEnd) { - return CreateIntegerCast(S, Ty, isSigned, Name, InsertAtEnd); - } }; //===----------------------------------------------------------------------===// @@ -740,18 +659,6 @@ } return Type::Int1Ty; } - /// Backward-compatible interfaces - /// @deprecated in 2.4, do not use, will disappear soon - static CmpInst *create(OtherOps Op, unsigned short predicate, Value *S1, - Value *S2, const std::string &Name = "", - Instruction *InsertBefore = 0) { - return Create(Op, predicate, S1, S2, Name, InsertBefore); - } - static CmpInst *create(OtherOps Op, unsigned short predicate, Value *S1, - Value *S2, const std::string &Name, - BasicBlock *InsertAtEnd) { - return Create(Op, predicate, S1, S2, Name, InsertAtEnd); - } }; From ggreif at gmail.com Wed Oct 15 05:29:51 2008 From: ggreif at gmail.com (Gabor Greif) Date: Wed, 15 Oct 2008 10:29:51 -0000 Subject: [llvm-commits] [llvm] r57570 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810151029.m9FATqk1030379@zion.cs.uiuc.edu> Author: ggreif Date: Wed Oct 15 05:29:51 2008 New Revision: 57570 URL: http://llvm.org/viewvc/llvm-project?rev=57570&view=rev Log: fix some validation errors, improve formatting, squash a strange plural Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57570&r1=57569&r2=57570&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Wed Oct 15 05:29:51 2008 @@ -117,7 +117,7 @@ Some areas under active development include:
                                                                      • Improved support for C and Objective-C features, for example - variable-length arries, va_arg, exception handling (Obj-C), and garbage + variable-length arrays, va_arg, exception handling (Obj-C), and garbage collection (Obj-C).
                                                                      • ABI compatibility, especially for platforms other than 32-bit x86.
                                                                      @@ -174,18 +174,16 @@
                                                                        -
                                                                      • Support for generics in the .Net virtual machine. This was implemented -by Tilmann Scheller during his Google Summer of Code project.

                                                                      • -
                                                                      • Initial support for the Mono class libraries.

                                                                      • -
                                                                      • Support for MacOSX/x86, following LLVM's support for exceptions in +

                                                                      • Support for generics in the .Net virtual machine. This was implemented +by Tilmann Scheller during his Google Summer of Code project. +
                                                                      • Initial support for the Mono class libraries. +
                                                                      • Support for MacOSX/x86, following LLVM's support for exceptions in JIT on MacOSX/x86. -
                                                                      • A new vmkit driver: a program to run java or .net applications. The +

                                                                      • A new vmkit driver: a program to run java or .net applications. The driver supports llvm command line arguments including the new "-fast" option. -

                                                                      • -
                                                                      • A new memory allocation scheme in the JVM that makes unloading a -class loader very fast.

                                                                      • -
                                                                      • VMKit now follows the LLVM Makefile machinery.

                                                                      • - +
                                                                      • A new memory allocation scheme in the JVM that makes unloading a +class loader very fast. +
                                                                      • VMKit now follows the LLVM Makefile machinery.
                                                                      @@ -523,7 +521,7 @@ stored at index ~0U. Parameter attributes are stored at index that matches parameter number.
                                                                    • ParamAttr namespace is now renamed as Attribute.
                                                                    • -
                                                                    • The name of the class that manages reference count of opaque +
                                                                    • The name of the class that manages reference count of opaque attributes is changed from PAListPtr to AttrListPtr.
                                                                    • ParamAttrsWithIndex is now renamed as AttributeWithIndex.
                                                                    • From ggreif at gmail.com Wed Oct 15 05:47:27 2008 From: ggreif at gmail.com (Gabor Greif) Date: Wed, 15 Oct 2008 10:47:27 -0000 Subject: [llvm-commits] [llvm] r57571 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810151047.m9FAlRRm030994@zion.cs.uiuc.edu> Author: ggreif Date: Wed Oct 15 05:47:24 2008 New Revision: 57571 URL: http://llvm.org/viewvc/llvm-project?rev=57571&view=rev Log: catch one more typo, canonicalize LLVMdev Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57571&r1=57570&r2=57571&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Wed Oct 15 05:47:24 2008 @@ -511,7 +511,7 @@
                                                                      • Now, function attributes and return value attributes are managed -sepearately. Interface exported by ParameterAttributes.h header is now +separately. Interface exported by ParameterAttributes.h header is now experted by Attributes.h header. The new attributes interface changes are:
                                                                        • getParamAttrs method is now replaced by @@ -724,7 +724,7 @@
                                                                          • The Itanium backend is highly experimental, and has a number of known issues. We are looking for a maintainer for the Itanium backend. If you - are interested, please contact the llvmdev mailing list.
                                                                          • + are interested, please contact the LLVMdev mailing list.
                                                                          @@ -757,7 +757,7 @@

                                                                          llvm-gcc does not currently support Link-Time Optimization on most platforms "out-of-the-box". Please inquire on the -llvmdev mailing list if you are interested.

                                                                          +LLVMdev mailing list if you are interested.

                                                                          The only major language feature of GCC not supported by llvm-gcc is the __builtin_apply family of builtins. However, some extensions From nunoplopes at sapo.pt Wed Oct 15 06:10:23 2008 From: nunoplopes at sapo.pt (Nuno Lopes) Date: Wed, 15 Oct 2008 11:10:23 -0000 Subject: [llvm-commits] [llvm] r57572 - /llvm/trunk/lib/AsmParser/llvmAsmParser.y Message-ID: <200810151110.m9FBAOkF031856@zion.cs.uiuc.edu> Author: nlopes Date: Wed Oct 15 06:10:21 2008 New Revision: 57572 URL: http://llvm.org/viewvc/llvm-project?rev=57572&view=rev Log: fix memleak in ResolveTypeTo() Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=57572&r1=57571&r2=57572&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Wed Oct 15 06:10:21 2008 @@ -708,6 +708,7 @@ CurModule.LateResolveTypes.find(D); if (I != CurModule.LateResolveTypes.end()) { ((DerivedType*)I->second.get())->refineAbstractTypeTo(ToTy); + I->first.destroy(); CurModule.LateResolveTypes.erase(I); } D.destroy(); From nunoplopes at sapo.pt Wed Oct 15 06:11:12 2008 From: nunoplopes at sapo.pt (Nuno Lopes) Date: Wed, 15 Oct 2008 11:11:12 -0000 Subject: [llvm-commits] [llvm] r57573 - in /llvm/trunk/lib/AsmParser: llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y.cvs Message-ID: <200810151111.m9FBBCap031886@zion.cs.uiuc.edu> Author: nlopes Date: Wed Oct 15 06:11:12 2008 New Revision: 57573 URL: http://llvm.org/viewvc/llvm-project?rev=57573&view=rev Log: regenerate Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs?rev=57573&r1=57572&r2=57573&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs Wed Oct 15 06:11:12 2008 @@ -394,7 +394,7 @@ /* Copy the first part of user declarations. */ -#line 14 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 14 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -1092,6 +1092,7 @@ CurModule.LateResolveTypes.find(D); if (I != CurModule.LateResolveTypes.end()) { ((DerivedType*)I->second.get())->refineAbstractTypeTo(ToTy); + I->first.destroy(); CurModule.LateResolveTypes.erase(I); } D.destroy(); @@ -1378,7 +1379,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 977 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 978 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -1426,8 +1427,8 @@ llvm::ICmpInst::Predicate IPredicate; llvm::FCmpInst::Predicate FPredicate; } -/* Line 193 of yacc.c. */ -#line 1431 "llvmAsmParser.tab.c" +/* Line 187 of yacc.c. */ +#line 1432 "llvmAsmParser.tab.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -1440,7 +1441,7 @@ /* Line 216 of yacc.c. */ -#line 1444 "llvmAsmParser.tab.c" +#line 1445 "llvmAsmParser.tab.c" #ifdef short # undef short @@ -1490,7 +1491,7 @@ #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS +# if YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) @@ -1884,41 +1885,41 @@ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1143, - 1143, 1144, 1144, 1144, 1144, 1144, 1144, 1145, 1145, 1145, - 1145, 1145, 1145, 1146, 1146, 1146, 1146, 1146, 1146, 1149, - 1149, 1150, 1150, 1151, 1151, 1152, 1152, 1153, 1153, 1157, - 1157, 1158, 1158, 1159, 1159, 1160, 1160, 1161, 1161, 1162, - 1162, 1163, 1163, 1164, 1165, 1168, 1168, 1168, 1169, 1169, - 1171, 1172, 1176, 1180, 1185, 1191, 1191, 1193, 1194, 1199, - 1205, 1206, 1207, 1208, 1209, 1210, 1214, 1215, 1216, 1220, - 1221, 1222, 1223, 1227, 1228, 1229, 1233, 1234, 1235, 1236, - 1237, 1241, 1242, 1243, 1246, 1247, 1248, 1249, 1250, 1251, - 1252, 1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, - 1268, 1272, 1273, 1278, 1279, 1280, 1283, 1284, 1290, 1291, - 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1302, 1303, - 1309, 1310, 1317, 1318, 1324, 1325, 1334, 1342, 1343, 1348, - 1349, 1350, 1355, 1368, 1368, 1368, 1368, 1368, 1368, 1368, - 1371, 1375, 1379, 1386, 1391, 1399, 1434, 1465, 1470, 1480, - 1490, 1494, 1504, 1511, 1520, 1527, 1532, 1537, 1544, 1545, - 1552, 1559, 1567, 1573, 1585, 1613, 1629, 1656, 1684, 1710, - 1730, 1756, 1776, 1788, 1795, 1861, 1871, 1881, 1892, 1905, - 1916, 1930, 1937, 1944, 1962, 1974, 1995, 2003, 2009, 2020, - 2025, 2030, 2035, 2040, 2046, 2052, 2058, 2066, 2077, 2081, - 2089, 2089, 2092, 2092, 2095, 2107, 2128, 2133, 2141, 2142, - 2146, 2146, 2150, 2150, 2153, 2156, 2180, 2192, 2191, 2203, - 2202, 2212, 2211, 2222, 2262, 2265, 2271, 2281, 2285, 2290, - 2292, 2297, 2302, 2311, 2321, 2332, 2336, 2345, 2354, 2359, - 2508, 2508, 2510, 2519, 2519, 2521, 2526, 2538, 2542, 2547, - 2551, 2555, 2560, 2565, 2569, 2573, 2577, 2581, 2585, 2589, - 2611, 2633, 2639, 2652, 2664, 2669, 2681, 2687, 2691, 2701, - 2705, 2709, 2714, 2721, 2721, 2727, 2736, 2741, 2746, 2750, - 2759, 2768, 2781, 2790, 2794, 2802, 2822, 2826, 2831, 2842, - 2861, 2870, 2974, 2978, 2985, 2996, 3009, 3018, 3031, 3042, - 3052, 3063, 3071, 3081, 3088, 3091, 3092, 3100, 3106, 3115, - 3119, 3124, 3140, 3157, 3169, 3181, 3195, 3209, 3221, 3242, - 3249, 3255, 3261, 3267, 3282, 3392, 3397, 3401, 3408, 3415, - 3425, 3432, 3442, 3450, 3464, 3481, 3495, 3510, 3525 + 0, 1144, 1144, 1144, 1144, 1144, 1144, 1144, 1144, 1144, + 1144, 1145, 1145, 1145, 1145, 1145, 1145, 1146, 1146, 1146, + 1146, 1146, 1146, 1147, 1147, 1147, 1147, 1147, 1147, 1150, + 1150, 1151, 1151, 1152, 1152, 1153, 1153, 1154, 1154, 1158, + 1158, 1159, 1159, 1160, 1160, 1161, 1161, 1162, 1162, 1163, + 1163, 1164, 1164, 1165, 1166, 1169, 1169, 1169, 1170, 1170, + 1172, 1173, 1177, 1181, 1186, 1192, 1192, 1194, 1195, 1200, + 1206, 1207, 1208, 1209, 1210, 1211, 1215, 1216, 1217, 1221, + 1222, 1223, 1224, 1228, 1229, 1230, 1234, 1235, 1236, 1237, + 1238, 1242, 1243, 1244, 1247, 1248, 1249, 1250, 1251, 1252, + 1253, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, + 1269, 1273, 1274, 1279, 1280, 1281, 1284, 1285, 1291, 1292, + 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1303, 1304, + 1310, 1311, 1318, 1319, 1325, 1326, 1335, 1343, 1344, 1349, + 1350, 1351, 1356, 1369, 1369, 1369, 1369, 1369, 1369, 1369, + 1372, 1376, 1380, 1387, 1392, 1400, 1435, 1466, 1471, 1481, + 1491, 1495, 1505, 1512, 1521, 1528, 1533, 1538, 1545, 1546, + 1553, 1560, 1568, 1574, 1586, 1614, 1630, 1657, 1685, 1711, + 1731, 1757, 1777, 1789, 1796, 1862, 1872, 1882, 1893, 1906, + 1917, 1931, 1938, 1945, 1963, 1975, 1996, 2004, 2010, 2021, + 2026, 2031, 2036, 2041, 2047, 2053, 2059, 2067, 2078, 2082, + 2090, 2090, 2093, 2093, 2096, 2108, 2129, 2134, 2142, 2143, + 2147, 2147, 2151, 2151, 2154, 2157, 2181, 2193, 2192, 2204, + 2203, 2213, 2212, 2223, 2263, 2266, 2272, 2282, 2286, 2291, + 2293, 2298, 2303, 2312, 2322, 2333, 2337, 2346, 2355, 2360, + 2509, 2509, 2511, 2520, 2520, 2522, 2527, 2539, 2543, 2548, + 2552, 2556, 2561, 2566, 2570, 2574, 2578, 2582, 2586, 2590, + 2612, 2634, 2640, 2653, 2665, 2670, 2682, 2688, 2692, 2702, + 2706, 2710, 2715, 2722, 2722, 2728, 2737, 2742, 2747, 2751, + 2760, 2769, 2782, 2791, 2795, 2803, 2823, 2827, 2832, 2843, + 2862, 2871, 2975, 2979, 2986, 2997, 3010, 3019, 3032, 3043, + 3053, 3064, 3072, 3082, 3089, 3092, 3093, 3101, 3107, 3116, + 3120, 3125, 3141, 3158, 3170, 3182, 3196, 3210, 3222, 3243, + 3250, 3256, 3262, 3268, 3283, 3393, 3398, 3402, 3409, 3416, + 3426, 3433, 3443, 3451, 3465, 3482, 3496, 3511, 3526 }; #endif @@ -2903,7 +2904,7 @@ we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# if YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ @@ -3644,152 +3645,152 @@ switch (yyn) { case 29: -#line 1149 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1150 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_EQ; ;} break; case 30: -#line 1149 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1150 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_NE; ;} break; case 31: -#line 1150 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1151 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLT; ;} break; case 32: -#line 1150 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1151 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGT; ;} break; case 33: -#line 1151 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1152 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLE; ;} break; case 34: -#line 1151 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1152 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGE; ;} break; case 35: -#line 1152 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1153 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULT; ;} break; case 36: -#line 1152 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1153 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGT; ;} break; case 37: -#line 1153 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1154 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULE; ;} break; case 38: -#line 1153 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1154 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGE; ;} break; case 39: -#line 1157 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1158 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OEQ; ;} break; case 40: -#line 1157 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1158 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ONE; ;} break; case 41: -#line 1158 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1159 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLT; ;} break; case 42: -#line 1158 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1159 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGT; ;} break; case 43: -#line 1159 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1160 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLE; ;} break; case 44: -#line 1159 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1160 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGE; ;} break; case 45: -#line 1160 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1161 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ORD; ;} break; case 46: -#line 1160 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1161 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNO; ;} break; case 47: -#line 1161 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1162 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UEQ; ;} break; case 48: -#line 1161 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1162 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNE; ;} break; case 49: -#line 1162 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1163 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULT; ;} break; case 50: -#line 1162 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1163 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGT; ;} break; case 51: -#line 1163 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1164 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULE; ;} break; case 52: -#line 1163 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1164 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGE; ;} break; case 53: -#line 1164 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1165 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_TRUE; ;} break; case 54: -#line 1165 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1166 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;} break; case 59: -#line 1169 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1170 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 60: -#line 1171 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1172 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=(yyvsp[(3) - (4)].UInt64Val); ;} break; case 61: -#line 1172 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1173 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=0; ;} break; case 62: -#line 1176 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1177 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR @@ -3797,7 +3798,7 @@ break; case 63: -#line 1180 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1181 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR @@ -3805,7 +3806,7 @@ break; case 64: -#line 1185 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1186 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(1) - (2)].UIntVal); CHECK_FOR_ERROR @@ -3813,7 +3814,7 @@ break; case 68: -#line 1194 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1195 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR @@ -3821,7 +3822,7 @@ break; case 69: -#line 1199 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1200 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR @@ -3829,157 +3830,157 @@ break; case 70: -#line 1205 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1206 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 71: -#line 1206 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1207 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 72: -#line 1207 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1208 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 73: -#line 1208 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1209 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; case 74: -#line 1209 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1210 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 75: -#line 1210 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1211 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::CommonLinkage; ;} break; case 76: -#line 1214 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1215 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 77: -#line 1215 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1216 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 78: -#line 1216 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1217 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 79: -#line 1220 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1221 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; case 80: -#line 1221 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1222 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; case 81: -#line 1222 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1223 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::HiddenVisibility; ;} break; case 82: -#line 1223 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1224 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::ProtectedVisibility; ;} break; case 83: -#line 1227 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1228 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 84: -#line 1228 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1229 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 85: -#line 1229 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1230 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 86: -#line 1233 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1234 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 87: -#line 1234 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1235 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 88: -#line 1235 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1236 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 89: -#line 1236 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1237 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 90: -#line 1237 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1238 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 91: -#line 1241 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1242 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 92: -#line 1242 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1243 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 93: -#line 1243 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1244 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 94: -#line 1246 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1247 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; case 95: -#line 1247 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1248 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; case 96: -#line 1248 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1249 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Fast; ;} break; case 97: -#line 1249 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1250 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Cold; ;} break; case 98: -#line 1250 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1251 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_StdCall; ;} break; case 99: -#line 1251 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1252 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_FastCall; ;} break; case 100: -#line 1252 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1253 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val)) GEN_ERROR("Calling conv too large"); @@ -3989,176 +3990,176 @@ break; case 101: -#line 1259 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1260 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; case 102: -#line 1260 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1261 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; case 103: -#line 1261 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1262 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; case 104: -#line 1262 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1263 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; case 105: -#line 1263 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1264 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::InReg; ;} break; case 106: -#line 1264 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1265 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::StructRet; ;} break; case 107: -#line 1265 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1266 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoAlias; ;} break; case 108: -#line 1266 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1267 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ByVal; ;} break; case 109: -#line 1267 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1268 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::Nest; ;} break; case 110: -#line 1268 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1269 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::constructAlignmentFromInt((yyvsp[(2) - (2)].UInt64Val)); ;} break; case 111: -#line 1272 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1273 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::None; ;} break; case 112: -#line 1273 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1274 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes); ;} break; case 113: -#line 1278 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1279 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::InReg; ;} break; case 114: -#line 1279 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1280 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; case 115: -#line 1280 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1281 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; case 116: -#line 1283 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1284 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::None; ;} break; case 117: -#line 1284 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1285 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes); ;} break; case 118: -#line 1290 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1291 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoReturn; ;} break; case 119: -#line 1291 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1292 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoUnwind; ;} break; case 120: -#line 1292 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1293 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::InReg; ;} break; case 121: -#line 1293 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1294 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; case 122: -#line 1294 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1295 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; case 123: -#line 1295 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1296 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ReadNone; ;} break; case 124: -#line 1296 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1297 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ReadOnly; ;} break; case 125: -#line 1297 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1298 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoInline; ;} break; case 126: -#line 1298 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1299 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::AlwaysInline; ;} break; case 127: -#line 1299 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1300 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::OptimizeForSize; ;} break; case 128: -#line 1302 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1303 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::None; ;} break; case 129: -#line 1303 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1304 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes); ;} break; case 130: -#line 1309 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1310 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 131: -#line 1310 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1311 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(2) - (2)].StrVal); ;} break; case 132: -#line 1317 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1318 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; case 133: -#line 1318 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1319 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(2) - (2)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4168,12 +4169,12 @@ break; case 134: -#line 1324 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1325 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; case 135: -#line 1325 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1326 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(3) - (3)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4183,7 +4184,7 @@ break; case 136: -#line 1334 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1335 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { for (unsigned i = 0, e = (yyvsp[(2) - (2)].StrVal)->length(); i != e; ++i) if ((*(yyvsp[(2) - (2)].StrVal))[i] == '"' || (*(yyvsp[(2) - (2)].StrVal))[i] == '\\') @@ -4194,27 +4195,27 @@ break; case 137: -#line 1342 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1343 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 138: -#line 1343 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1344 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (1)].StrVal); ;} break; case 139: -#line 1348 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1349 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; case 140: -#line 1349 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1350 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; case 141: -#line 1350 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1351 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV->setSection(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -4223,7 +4224,7 @@ break; case 142: -#line 1355 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1356 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(2) - (2)].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[(2) - (2)].UInt64Val))) GEN_ERROR("Alignment must be a power of two"); @@ -4233,7 +4234,7 @@ break; case 150: -#line 1371 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1372 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(OpaqueType::get()); CHECK_FOR_ERROR @@ -4241,7 +4242,7 @@ break; case 151: -#line 1375 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1376 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[(1) - (1)].PrimType)); CHECK_FOR_ERROR @@ -4249,7 +4250,7 @@ break; case 152: -#line 1379 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1380 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Pointer type? if (*(yyvsp[(1) - (3)].TypeVal) == Type::LabelTy) GEN_ERROR("Cannot form a pointer to a basic block"); @@ -4260,7 +4261,7 @@ break; case 153: -#line 1386 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1387 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... const Type* tmp = getTypeVal((yyvsp[(1) - (1)].ValIDVal)); CHECK_FOR_ERROR @@ -4269,7 +4270,7 @@ break; case 154: -#line 1391 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1392 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if ((yyvsp[(2) - (2)].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -4281,7 +4282,7 @@ break; case 155: -#line 1399 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1400 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4320,7 +4321,7 @@ break; case 156: -#line 1434 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1435 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4354,7 +4355,7 @@ break; case 157: -#line 1465 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1466 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Sized array type? (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[(4) - (5)].TypeVal), (yyvsp[(2) - (5)].UInt64Val)))); delete (yyvsp[(4) - (5)].TypeVal); @@ -4363,7 +4364,7 @@ break; case 158: -#line 1470 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1471 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Vector type? const llvm::Type* ElemTy = (yyvsp[(4) - (5)].TypeVal)->get(); if ((unsigned)(yyvsp[(2) - (5)].UInt64Val) != (yyvsp[(2) - (5)].UInt64Val)) @@ -4377,7 +4378,7 @@ break; case 159: -#line 1480 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1481 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = (yyvsp[(2) - (3)].TypeList)->begin(), @@ -4391,7 +4392,7 @@ break; case 160: -#line 1490 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1491 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector())); CHECK_FOR_ERROR @@ -4399,7 +4400,7 @@ break; case 161: -#line 1494 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1495 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements; for (std::list::iterator I = (yyvsp[(3) - (5)].TypeList)->begin(), @@ -4413,7 +4414,7 @@ break; case 162: -#line 1504 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1505 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector(), true)); CHECK_FOR_ERROR @@ -4421,7 +4422,7 @@ break; case 163: -#line 1511 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1512 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4431,7 +4432,7 @@ break; case 164: -#line 1520 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1521 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (1)].TypeVal))->getDescription()); @@ -4442,14 +4443,14 @@ break; case 165: -#line 1527 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1528 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(Type::VoidTy); ;} break; case 166: -#line 1532 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1533 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); (yyval.TypeWithAttrsList)->push_back((yyvsp[(1) - (1)].TypeWithAttrs)); @@ -4458,7 +4459,7 @@ break; case 167: -#line 1537 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1538 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList))->push_back((yyvsp[(3) - (3)].TypeWithAttrs)); CHECK_FOR_ERROR @@ -4466,7 +4467,7 @@ break; case 169: -#line 1545 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1546 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList); TypeWithAttrs TWA; TWA.Attrs = Attribute::None; @@ -4477,7 +4478,7 @@ break; case 170: -#line 1552 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1553 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList; TypeWithAttrs TWA; TWA.Attrs = Attribute::None; @@ -4488,7 +4489,7 @@ break; case 171: -#line 1559 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1560 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); CHECK_FOR_ERROR @@ -4496,7 +4497,7 @@ break; case 172: -#line 1567 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1568 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); (yyval.TypeList)->push_back(*(yyvsp[(1) - (1)].TypeVal)); @@ -4506,7 +4507,7 @@ break; case 173: -#line 1573 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1574 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[(1) - (3)].TypeList))->push_back(*(yyvsp[(3) - (3)].TypeVal)); delete (yyvsp[(3) - (3)].TypeVal); @@ -4515,7 +4516,7 @@ break; case 174: -#line 1585 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1586 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4547,7 +4548,7 @@ break; case 175: -#line 1613 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1614 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4567,7 +4568,7 @@ break; case 176: -#line 1629 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1630 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4598,7 +4599,7 @@ break; case 177: -#line 1656 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1657 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4630,7 +4631,7 @@ break; case 178: -#line 1684 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1685 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (4)].TypeVal)->get()); if (STy == 0) @@ -4660,7 +4661,7 @@ break; case 179: -#line 1710 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1711 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4684,7 +4685,7 @@ break; case 180: -#line 1730 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1731 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (6)].TypeVal)->get()); if (STy == 0) @@ -4714,7 +4715,7 @@ break; case 181: -#line 1756 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1757 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (5)].TypeVal))->getDescription()); @@ -4738,7 +4739,7 @@ break; case 182: -#line 1776 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1777 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4754,7 +4755,7 @@ break; case 183: -#line 1788 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1789 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4765,7 +4766,7 @@ break; case 184: -#line 1795 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1796 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4835,7 +4836,7 @@ break; case 185: -#line 1861 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1862 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4849,7 +4850,7 @@ break; case 186: -#line 1871 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1872 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4863,7 +4864,7 @@ break; case 187: -#line 1881 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1882 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { if (!ConstantInt::isValueValidForType(IT, (yyvsp[(2) - (2)].SInt64Val))) @@ -4878,7 +4879,7 @@ break; case 188: -#line 1892 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1893 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > IT->getBitWidth()) @@ -4895,7 +4896,7 @@ break; case 189: -#line 1905 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1906 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { if (!ConstantInt::isValueValidForType(IT, (yyvsp[(2) - (2)].UInt64Val))) @@ -4910,7 +4911,7 @@ break; case 190: -#line 1916 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1917 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > IT->getBitWidth()) @@ -4928,7 +4929,7 @@ break; case 191: -#line 1930 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1931 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants if ((yyvsp[(1) - (2)].TypeVal)->get() != Type::Int1Ty) GEN_ERROR("Constant true must have type i1"); @@ -4939,7 +4940,7 @@ break; case 192: -#line 1937 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1938 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants if ((yyvsp[(1) - (2)].TypeVal)->get() != Type::Int1Ty) GEN_ERROR("Constant false must have type i1"); @@ -4950,7 +4951,7 @@ break; case 193: -#line 1944 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1945 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Floating point constants if (!ConstantFP::isValueValidForType((yyvsp[(1) - (2)].TypeVal)->get(), *(yyvsp[(2) - (2)].FPVal))) GEN_ERROR("Floating point constant invalid for type"); @@ -4970,7 +4971,7 @@ break; case 194: -#line 1962 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1963 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (6)].TypeVal))->getDescription()); @@ -4986,7 +4987,7 @@ break; case 195: -#line 1974 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1975 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (5)].ConstVal)->getType())) GEN_ERROR("GetElementPtr requires a pointer operand"); @@ -5011,7 +5012,7 @@ break; case 196: -#line 1995 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1996 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (8)].ConstVal)->getType() != Type::Int1Ty) GEN_ERROR("Select condition must be of boolean type"); @@ -5023,7 +5024,7 @@ break; case 197: -#line 2003 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2004 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Binary operator types must match"); @@ -5033,7 +5034,7 @@ break; case 198: -#line 2009 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2010 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Logical operator types must match"); @@ -5048,7 +5049,7 @@ break; case 199: -#line 2020 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2021 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("icmp operand types must match"); @@ -5057,7 +5058,7 @@ break; case 200: -#line 2025 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2026 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("fcmp operand types must match"); @@ -5066,7 +5067,7 @@ break; case 201: -#line 2030 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2031 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vicmp operand types must match"); @@ -5075,7 +5076,7 @@ break; case 202: -#line 2035 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2036 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vfcmp operand types must match"); @@ -5084,7 +5085,7 @@ break; case 203: -#line 2040 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2041 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(3) - (6)].ConstVal), (yyvsp[(5) - (6)].ConstVal))) GEN_ERROR("Invalid extractelement operands"); @@ -5094,7 +5095,7 @@ break; case 204: -#line 2046 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2047 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid insertelement operands"); @@ -5104,7 +5105,7 @@ break; case 205: -#line 2052 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2053 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -5114,7 +5115,7 @@ break; case 206: -#line 2058 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2059 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (5)].ConstVal)->getType()) && !isa((yyvsp[(3) - (5)].ConstVal)->getType())) GEN_ERROR("ExtractValue requires an aggregate operand"); @@ -5126,7 +5127,7 @@ break; case 207: -#line 2066 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2067 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (7)].ConstVal)->getType()) && !isa((yyvsp[(3) - (7)].ConstVal)->getType())) GEN_ERROR("InsertValue requires an aggregate operand"); @@ -5138,7 +5139,7 @@ break; case 208: -#line 2077 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2078 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ConstVector) = (yyvsp[(1) - (3)].ConstVector))->push_back((yyvsp[(3) - (3)].ConstVal)); CHECK_FOR_ERROR @@ -5146,7 +5147,7 @@ break; case 209: -#line 2081 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2082 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector) = new std::vector(); (yyval.ConstVector)->push_back((yyvsp[(1) - (1)].ConstVal)); @@ -5155,27 +5156,27 @@ break; case 210: -#line 2089 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2090 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; case 211: -#line 2089 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2090 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; case 212: -#line 2092 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2093 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; case 213: -#line 2092 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2093 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; case 214: -#line 2095 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2096 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const Type* VTy = (yyvsp[(1) - (2)].TypeVal)->get(); Value *V = getVal(VTy, (yyvsp[(2) - (2)].ValIDVal)); @@ -5191,7 +5192,7 @@ break; case 215: -#line 2107 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2108 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { Constant *Val = (yyvsp[(3) - (6)].ConstVal); const Type *DestTy = (yyvsp[(5) - (6)].TypeVal)->get(); @@ -5207,7 +5208,7 @@ break; case 216: -#line 2128 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2129 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -5216,7 +5217,7 @@ break; case 217: -#line 2133 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2134 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -5225,12 +5226,12 @@ break; case 220: -#line 2146 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2147 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = false; ;} break; case 221: -#line 2146 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2147 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.FunctionDone(); CHECK_FOR_ERROR @@ -5238,26 +5239,26 @@ break; case 222: -#line 2150 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2151 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ;} break; case 223: -#line 2150 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2151 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 224: -#line 2153 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2154 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 225: -#line 2156 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2157 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (3)].TypeVal))->getDescription()); @@ -5285,7 +5286,7 @@ break; case 226: -#line 2180 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2181 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ResolveTypeTo((yyvsp[(1) - (3)].StrVal), (yyvsp[(3) - (3)].PrimType)); @@ -5300,7 +5301,7 @@ break; case 227: -#line 2192 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2193 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { /* "Externally Visible" Linkage */ if ((yyvsp[(5) - (6)].ConstVal) == 0) @@ -5312,14 +5313,14 @@ break; case 228: -#line 2199 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2200 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; case 229: -#line 2203 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2204 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(6) - (7)].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant"); @@ -5329,14 +5330,14 @@ break; case 230: -#line 2208 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2209 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; case 231: -#line 2212 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2213 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(6) - (7)].TypeVal))->getDescription()); @@ -5347,7 +5348,7 @@ break; case 232: -#line 2218 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2219 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR @@ -5355,7 +5356,7 @@ break; case 233: -#line 2222 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2223 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::string Name; if ((yyvsp[(1) - (5)].StrVal)) { @@ -5399,21 +5400,21 @@ break; case 234: -#line 2262 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2263 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 235: -#line 2265 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2266 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 236: -#line 2271 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2272 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); if (AsmSoFar.empty()) @@ -5426,7 +5427,7 @@ break; case 237: -#line 2281 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2282 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5434,7 +5435,7 @@ break; case 238: -#line 2285 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2286 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setDataLayout(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5442,7 +5443,7 @@ break; case 240: -#line 2292 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2293 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5451,7 +5452,7 @@ break; case 241: -#line 2297 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2298 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5460,14 +5461,14 @@ break; case 242: -#line 2302 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2303 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 243: -#line 2311 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2312 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -5481,7 +5482,7 @@ break; case 244: -#line 2321 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2322 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -5495,7 +5496,7 @@ break; case 245: -#line 2332 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2333 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (1)].ArgList); CHECK_FOR_ERROR @@ -5503,7 +5504,7 @@ break; case 246: -#line 2336 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2337 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (3)].ArgList); struct ArgListEntry E; @@ -5516,7 +5517,7 @@ break; case 247: -#line 2345 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2346 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = new ArgListType; struct ArgListEntry E; @@ -5529,7 +5530,7 @@ break; case 248: -#line 2354 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2355 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = 0; CHECK_FOR_ERROR @@ -5537,7 +5538,7 @@ break; case 249: -#line 2360 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2361 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::string FunctionName(*(yyvsp[(4) - (11)].StrVal)); delete (yyvsp[(4) - (11)].StrVal); // Free strdup'd memory! @@ -5688,7 +5689,7 @@ break; case 252: -#line 2510 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2511 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -5700,7 +5701,7 @@ break; case 255: -#line 2521 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2522 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR @@ -5708,7 +5709,7 @@ break; case 256: -#line 2526 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2527 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.CurrentFunction->setLinkage((yyvsp[(1) - (3)].Linkage)); CurFun.CurrentFunction->setVisibility((yyvsp[(2) - (3)].Visibility)); @@ -5719,7 +5720,7 @@ break; case 257: -#line 2538 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2539 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -5727,7 +5728,7 @@ break; case 258: -#line 2542 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2543 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -5735,7 +5736,7 @@ break; case 259: -#line 2547 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2548 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].SInt64Val)); CHECK_FOR_ERROR @@ -5743,7 +5744,7 @@ break; case 260: -#line 2551 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2552 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].UInt64Val)); CHECK_FOR_ERROR @@ -5751,7 +5752,7 @@ break; case 261: -#line 2555 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2556 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants (yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), true); delete (yyvsp[(1) - (1)].APIntVal); @@ -5760,7 +5761,7 @@ break; case 262: -#line 2560 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2561 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants (yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), false); delete (yyvsp[(1) - (1)].APIntVal); @@ -5769,7 +5770,7 @@ break; case 263: -#line 2565 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2566 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].FPVal)); CHECK_FOR_ERROR @@ -5777,7 +5778,7 @@ break; case 264: -#line 2569 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2570 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getTrue()); CHECK_FOR_ERROR @@ -5785,7 +5786,7 @@ break; case 265: -#line 2573 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2574 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getFalse()); CHECK_FOR_ERROR @@ -5793,7 +5794,7 @@ break; case 266: -#line 2577 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2578 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createNull(); CHECK_FOR_ERROR @@ -5801,7 +5802,7 @@ break; case 267: -#line 2581 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2582 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createUndef(); CHECK_FOR_ERROR @@ -5809,7 +5810,7 @@ break; case 268: -#line 2585 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2586 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // A vector zero constant. (yyval.ValIDVal) = ValID::createZeroInit(); CHECK_FOR_ERROR @@ -5817,7 +5818,7 @@ break; case 269: -#line 2589 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2590 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType(); unsigned NumElements = (yyvsp[(2) - (3)].ConstVector)->size(); @@ -5843,7 +5844,7 @@ break; case 270: -#line 2611 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2612 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType(); uint64_t NumElements = (yyvsp[(2) - (3)].ConstVector)->size(); @@ -5869,7 +5870,7 @@ break; case 271: -#line 2633 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2634 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Use undef instead of an array because it's inconvenient to determine // the element type at this point, there being no elements to examine. @@ -5879,7 +5880,7 @@ break; case 272: -#line 2639 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2640 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { uint64_t NumElements = (yyvsp[(2) - (2)].StrVal)->length(); const Type *ETy = Type::Int8Ty; @@ -5896,7 +5897,7 @@ break; case 273: -#line 2652 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2653 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements((yyvsp[(2) - (3)].ConstVector)->size()); for (unsigned i = 0, e = (yyvsp[(2) - (3)].ConstVector)->size(); i != e; ++i) @@ -5912,7 +5913,7 @@ break; case 274: -#line 2664 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2665 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = StructType::get(std::vector()); (yyval.ValIDVal) = ValID::create(ConstantStruct::get(STy, std::vector())); @@ -5921,7 +5922,7 @@ break; case 275: -#line 2669 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2670 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements((yyvsp[(3) - (5)].ConstVector)->size()); for (unsigned i = 0, e = (yyvsp[(3) - (5)].ConstVector)->size(); i != e; ++i) @@ -5937,7 +5938,7 @@ break; case 276: -#line 2681 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2682 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = StructType::get(std::vector(), /*isPacked=*/true); @@ -5947,7 +5948,7 @@ break; case 277: -#line 2687 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2688 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].ConstVal)); CHECK_FOR_ERROR @@ -5955,7 +5956,7 @@ break; case 278: -#line 2691 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2692 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createInlineAsm(*(yyvsp[(3) - (5)].StrVal), *(yyvsp[(5) - (5)].StrVal), (yyvsp[(2) - (5)].BoolVal)); delete (yyvsp[(3) - (5)].StrVal); @@ -5965,7 +5966,7 @@ break; case 279: -#line 2701 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2702 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? (yyval.ValIDVal) = ValID::createLocalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR @@ -5973,7 +5974,7 @@ break; case 280: -#line 2705 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2706 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createGlobalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR @@ -5981,7 +5982,7 @@ break; case 281: -#line 2709 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2710 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5990,7 +5991,7 @@ break; case 282: -#line 2714 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2715 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createGlobalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5999,7 +6000,7 @@ break; case 285: -#line 2727 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2728 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -6010,7 +6011,7 @@ break; case 286: -#line 2736 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2737 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); (yyval.ValueList)->push_back((yyvsp[(1) - (1)].ValueVal)); @@ -6019,7 +6020,7 @@ break; case 287: -#line 2741 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2742 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ValueList)=(yyvsp[(1) - (3)].ValueList))->push_back((yyvsp[(3) - (3)].ValueVal)); CHECK_FOR_ERROR @@ -6027,7 +6028,7 @@ break; case 288: -#line 2746 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2747 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR @@ -6035,7 +6036,7 @@ break; case 289: -#line 2750 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2751 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR @@ -6043,7 +6044,7 @@ break; case 290: -#line 2759 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2760 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { setValueName((yyvsp[(3) - (3)].TermInstVal), (yyvsp[(2) - (3)].StrVal)); CHECK_FOR_ERROR @@ -6055,7 +6056,7 @@ break; case 291: -#line 2768 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2769 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR int ValNum = InsertValue((yyvsp[(3) - (3)].TermInstVal)); @@ -6070,7 +6071,7 @@ break; case 292: -#line 2781 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2782 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (CastInst *CI1 = dyn_cast((yyvsp[(2) - (2)].InstVal))) if (CastInst *CI2 = dyn_cast(CI1->getOperand(0))) @@ -6083,7 +6084,7 @@ break; case 293: -#line 2790 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2791 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty space between instruction lists (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalID(CurFun.NextValNum)); CHECK_FOR_ERROR @@ -6091,7 +6092,7 @@ break; case 294: -#line 2794 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2795 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Labelled (named) basic block (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal))); delete (yyvsp[(1) - (1)].StrVal); @@ -6101,7 +6102,7 @@ break; case 295: -#line 2802 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2803 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with a result... ValueList &VL = *(yyvsp[(2) - (2)].ValueList); assert(!VL.empty() && "Invalid ret operands!"); @@ -6125,7 +6126,7 @@ break; case 296: -#line 2822 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2823 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with no result... (yyval.TermInstVal) = ReturnInst::Create(); CHECK_FOR_ERROR @@ -6133,7 +6134,7 @@ break; case 297: -#line 2826 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2827 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[(3) - (3)].ValIDVal)); CHECK_FOR_ERROR @@ -6142,7 +6143,7 @@ break; case 298: -#line 2831 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2832 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (cast((yyvsp[(2) - (9)].PrimType))->getBitWidth() != 1) GEN_ERROR("Branch condition must have type i1"); @@ -6157,7 +6158,7 @@ break; case 299: -#line 2842 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2843 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (9)].PrimType), (yyvsp[(3) - (9)].ValIDVal)); CHECK_FOR_ERROR @@ -6180,7 +6181,7 @@ break; case 300: -#line 2861 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2862 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (8)].PrimType), (yyvsp[(3) - (8)].ValIDVal)); CHECK_FOR_ERROR @@ -6193,7 +6194,7 @@ break; case 301: -#line 2871 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2872 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -6300,7 +6301,7 @@ break; case 302: -#line 2974 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2975 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnwindInst(); CHECK_FOR_ERROR @@ -6308,7 +6309,7 @@ break; case 303: -#line 2978 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2979 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnreachableInst(); CHECK_FOR_ERROR @@ -6316,7 +6317,7 @@ break; case 304: -#line 2985 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2986 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = (yyvsp[(1) - (6)].JumpTable); Constant *V = cast(getExistingVal((yyvsp[(2) - (6)].PrimType), (yyvsp[(3) - (6)].ValIDVal))); @@ -6331,7 +6332,7 @@ break; case 305: -#line 2996 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2997 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = new std::vector >(); Constant *V = cast(getExistingVal((yyvsp[(1) - (5)].PrimType), (yyvsp[(2) - (5)].ValIDVal))); @@ -6347,7 +6348,7 @@ break; case 306: -#line 3009 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3010 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName((yyvsp[(2) - (2)].InstVal), (yyvsp[(1) - (2)].StrVal)); @@ -6359,7 +6360,7 @@ break; case 307: -#line 3018 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3019 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR int ValNum = InsertValue((yyvsp[(2) - (2)].InstVal)); @@ -6374,7 +6375,7 @@ break; case 308: -#line 3031 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3032 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (6)].TypeVal))->getDescription()); @@ -6389,7 +6390,7 @@ break; case 309: -#line 3042 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3043 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.PHIList) = (yyvsp[(1) - (7)].PHIList); Value* tmpVal = getVal((yyvsp[(1) - (7)].PHIList)->front().first->getType(), (yyvsp[(4) - (7)].ValIDVal)); @@ -6401,7 +6402,7 @@ break; case 310: -#line 3052 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3053 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -6416,7 +6417,7 @@ break; case 311: -#line 3063 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3064 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 // Labels are only valid in ASMs @@ -6428,7 +6429,7 @@ break; case 312: -#line 3071 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3072 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -6442,7 +6443,7 @@ break; case 313: -#line 3081 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3082 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 (yyval.ParamList) = (yyvsp[(1) - (6)].ParamList); @@ -6453,17 +6454,17 @@ break; case 314: -#line 3088 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3089 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamList) = new ParamList(); ;} break; case 315: -#line 3091 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3092 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); ;} break; case 316: -#line 3092 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3093 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[(1) - (3)].ValueList); (yyval.ValueList)->push_back((yyvsp[(3) - (3)].ValueVal)); @@ -6472,7 +6473,7 @@ break; case 317: -#line 3100 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3101 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstantList) = new std::vector(); if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val)) @@ -6482,7 +6483,7 @@ break; case 318: -#line 3106 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3107 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstantList) = (yyvsp[(1) - (3)].ConstantList); if ((unsigned)(yyvsp[(3) - (3)].UInt64Val) != (yyvsp[(3) - (3)].UInt64Val)) @@ -6493,7 +6494,7 @@ break; case 319: -#line 3115 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3116 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -6501,7 +6502,7 @@ break; case 320: -#line 3119 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3120 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -6509,7 +6510,7 @@ break; case 321: -#line 3124 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3125 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6529,7 +6530,7 @@ break; case 322: -#line 3140 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3141 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6550,7 +6551,7 @@ break; case 323: -#line 3157 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3158 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6566,7 +6567,7 @@ break; case 324: -#line 3169 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3170 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6582,7 +6583,7 @@ break; case 325: -#line 3181 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3182 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6600,7 +6601,7 @@ break; case 326: -#line 3195 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3196 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6618,7 +6619,7 @@ break; case 327: -#line 3209 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3210 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6634,7 +6635,7 @@ break; case 328: -#line 3221 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3222 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (isa((yyvsp[(2) - (6)].ValueVal)->getType())) { // vector select @@ -6659,7 +6660,7 @@ break; case 329: -#line 3242 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3243 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6670,7 +6671,7 @@ break; case 330: -#line 3249 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3250 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(2) - (4)].ValueVal), (yyvsp[(4) - (4)].ValueVal))) GEN_ERROR("Invalid extractelement operands"); @@ -6680,7 +6681,7 @@ break; case 331: -#line 3255 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3256 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid insertelement operands"); @@ -6690,7 +6691,7 @@ break; case 332: -#line 3261 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3262 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -6700,7 +6701,7 @@ break; case 333: -#line 3267 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3268 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[(2) - (2)].PHIList)->front().first->getType(); if (!Ty->isFirstClassType()) @@ -6719,7 +6720,7 @@ break; case 334: -#line 3283 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3284 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -6832,7 +6833,7 @@ break; case 335: -#line 3392 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3393 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = (yyvsp[(1) - (1)].InstVal); CHECK_FOR_ERROR @@ -6840,7 +6841,7 @@ break; case 336: -#line 3397 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3398 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -6848,7 +6849,7 @@ break; case 337: -#line 3401 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3402 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -6856,7 +6857,7 @@ break; case 338: -#line 3408 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3409 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6867,7 +6868,7 @@ break; case 339: -#line 3415 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3416 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6881,7 +6882,7 @@ break; case 340: -#line 3425 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3426 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6892,7 +6893,7 @@ break; case 341: -#line 3432 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3433 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6906,7 +6907,7 @@ break; case 342: -#line 3442 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3443 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(2) - (2)].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + @@ -6917,7 +6918,7 @@ break; case 343: -#line 3450 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3451 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -6935,7 +6936,7 @@ break; case 344: -#line 3464 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3465 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (7)].TypeVal))->getDescription()); @@ -6956,7 +6957,7 @@ break; case 345: -#line 3481 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3482 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6974,7 +6975,7 @@ break; case 346: -#line 3495 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3496 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()); @@ -6993,7 +6994,7 @@ break; case 347: -#line 3510 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3511 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()); @@ -7012,7 +7013,7 @@ break; case 348: -#line 3525 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3526 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (7)].TypeVal))->getDescription()); @@ -7034,7 +7035,7 @@ /* Line 1267 of yacc.c. */ -#line 7038 "llvmAsmParser.tab.c" +#line 7039 "llvmAsmParser.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -7248,7 +7249,7 @@ } -#line 3544 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3545 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" // common code from the two 'RunVMAsmParser' functions Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs?rev=57573&r1=57572&r2=57573&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs Wed Oct 15 06:11:12 2008 @@ -360,7 +360,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 977 "/Users/sabre/llvm/lib/AsmParser/llvmAsmParser.y" +#line 978 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -408,7 +408,7 @@ llvm::ICmpInst::Predicate IPredicate; llvm::FCmpInst::Predicate FPredicate; } -/* Line 1529 of yacc.c. */ +/* Line 1489 of yacc.c. */ #line 413 "llvmAsmParser.tab.h" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs?rev=57573&r1=57572&r2=57573&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Wed Oct 15 06:11:12 2008 @@ -708,6 +708,7 @@ CurModule.LateResolveTypes.find(D); if (I != CurModule.LateResolveTypes.end()) { ((DerivedType*)I->second.get())->refineAbstractTypeTo(ToTy); + I->first.destroy(); CurModule.LateResolveTypes.erase(I); } D.destroy(); From nunoplopes at sapo.pt Wed Oct 15 06:19:35 2008 From: nunoplopes at sapo.pt (Nuno Lopes) Date: Wed, 15 Oct 2008 11:19:35 -0000 Subject: [llvm-commits] [llvm] r57574 - /llvm/trunk/lib/AsmParser/llvmAsmParser.y Message-ID: <200810151119.m9FBJZ5Z032186@zion.cs.uiuc.edu> Author: nlopes Date: Wed Oct 15 06:19:34 2008 New Revision: 57574 URL: http://llvm.org/viewvc/llvm-project?rev=57574&view=rev Log: fix memleak in getTypeVal() Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=57574&r1=57573&r2=57574&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Wed Oct 15 06:19:34 2008 @@ -307,8 +307,10 @@ } std::map::iterator I =CurModule.LateResolveTypes.find(D); - if (I != CurModule.LateResolveTypes.end()) + if (I != CurModule.LateResolveTypes.end()) { + D.destroy(); return I->second; + } Type *Typ = OpaqueType::get(); CurModule.LateResolveTypes.insert(std::make_pair(D, Typ)); From nunoplopes at sapo.pt Wed Oct 15 06:20:21 2008 From: nunoplopes at sapo.pt (Nuno Lopes) Date: Wed, 15 Oct 2008 11:20:21 -0000 Subject: [llvm-commits] [llvm] r57575 - in /llvm/trunk/lib/AsmParser: llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y.cvs Message-ID: <200810151120.m9FBKMr4032258@zion.cs.uiuc.edu> Author: nlopes Date: Wed Oct 15 06:20:21 2008 New Revision: 57575 URL: http://llvm.org/viewvc/llvm-project?rev=57575&view=rev Log: regenerate Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs?rev=57575&r1=57574&r2=57575&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs Wed Oct 15 06:20:21 2008 @@ -691,8 +691,10 @@ } std::map::iterator I =CurModule.LateResolveTypes.find(D); - if (I != CurModule.LateResolveTypes.end()) + if (I != CurModule.LateResolveTypes.end()) { + D.destroy(); return I->second; + } Type *Typ = OpaqueType::get(); CurModule.LateResolveTypes.insert(std::make_pair(D, Typ)); @@ -1379,7 +1381,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 978 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 980 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -1428,7 +1430,7 @@ llvm::FCmpInst::Predicate FPredicate; } /* Line 187 of yacc.c. */ -#line 1432 "llvmAsmParser.tab.c" +#line 1434 "llvmAsmParser.tab.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -1441,7 +1443,7 @@ /* Line 216 of yacc.c. */ -#line 1445 "llvmAsmParser.tab.c" +#line 1447 "llvmAsmParser.tab.c" #ifdef short # undef short @@ -1885,41 +1887,41 @@ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 1144, 1144, 1144, 1144, 1144, 1144, 1144, 1144, 1144, - 1144, 1145, 1145, 1145, 1145, 1145, 1145, 1146, 1146, 1146, - 1146, 1146, 1146, 1147, 1147, 1147, 1147, 1147, 1147, 1150, - 1150, 1151, 1151, 1152, 1152, 1153, 1153, 1154, 1154, 1158, - 1158, 1159, 1159, 1160, 1160, 1161, 1161, 1162, 1162, 1163, - 1163, 1164, 1164, 1165, 1166, 1169, 1169, 1169, 1170, 1170, - 1172, 1173, 1177, 1181, 1186, 1192, 1192, 1194, 1195, 1200, - 1206, 1207, 1208, 1209, 1210, 1211, 1215, 1216, 1217, 1221, - 1222, 1223, 1224, 1228, 1229, 1230, 1234, 1235, 1236, 1237, - 1238, 1242, 1243, 1244, 1247, 1248, 1249, 1250, 1251, 1252, - 1253, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, - 1269, 1273, 1274, 1279, 1280, 1281, 1284, 1285, 1291, 1292, - 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1303, 1304, - 1310, 1311, 1318, 1319, 1325, 1326, 1335, 1343, 1344, 1349, - 1350, 1351, 1356, 1369, 1369, 1369, 1369, 1369, 1369, 1369, - 1372, 1376, 1380, 1387, 1392, 1400, 1435, 1466, 1471, 1481, - 1491, 1495, 1505, 1512, 1521, 1528, 1533, 1538, 1545, 1546, - 1553, 1560, 1568, 1574, 1586, 1614, 1630, 1657, 1685, 1711, - 1731, 1757, 1777, 1789, 1796, 1862, 1872, 1882, 1893, 1906, - 1917, 1931, 1938, 1945, 1963, 1975, 1996, 2004, 2010, 2021, - 2026, 2031, 2036, 2041, 2047, 2053, 2059, 2067, 2078, 2082, - 2090, 2090, 2093, 2093, 2096, 2108, 2129, 2134, 2142, 2143, - 2147, 2147, 2151, 2151, 2154, 2157, 2181, 2193, 2192, 2204, - 2203, 2213, 2212, 2223, 2263, 2266, 2272, 2282, 2286, 2291, - 2293, 2298, 2303, 2312, 2322, 2333, 2337, 2346, 2355, 2360, - 2509, 2509, 2511, 2520, 2520, 2522, 2527, 2539, 2543, 2548, - 2552, 2556, 2561, 2566, 2570, 2574, 2578, 2582, 2586, 2590, - 2612, 2634, 2640, 2653, 2665, 2670, 2682, 2688, 2692, 2702, - 2706, 2710, 2715, 2722, 2722, 2728, 2737, 2742, 2747, 2751, - 2760, 2769, 2782, 2791, 2795, 2803, 2823, 2827, 2832, 2843, - 2862, 2871, 2975, 2979, 2986, 2997, 3010, 3019, 3032, 3043, - 3053, 3064, 3072, 3082, 3089, 3092, 3093, 3101, 3107, 3116, - 3120, 3125, 3141, 3158, 3170, 3182, 3196, 3210, 3222, 3243, - 3250, 3256, 3262, 3268, 3283, 3393, 3398, 3402, 3409, 3416, - 3426, 3433, 3443, 3451, 3465, 3482, 3496, 3511, 3526 + 0, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, + 1146, 1147, 1147, 1147, 1147, 1147, 1147, 1148, 1148, 1148, + 1148, 1148, 1148, 1149, 1149, 1149, 1149, 1149, 1149, 1152, + 1152, 1153, 1153, 1154, 1154, 1155, 1155, 1156, 1156, 1160, + 1160, 1161, 1161, 1162, 1162, 1163, 1163, 1164, 1164, 1165, + 1165, 1166, 1166, 1167, 1168, 1171, 1171, 1171, 1172, 1172, + 1174, 1175, 1179, 1183, 1188, 1194, 1194, 1196, 1197, 1202, + 1208, 1209, 1210, 1211, 1212, 1213, 1217, 1218, 1219, 1223, + 1224, 1225, 1226, 1230, 1231, 1232, 1236, 1237, 1238, 1239, + 1240, 1244, 1245, 1246, 1249, 1250, 1251, 1252, 1253, 1254, + 1255, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, + 1271, 1275, 1276, 1281, 1282, 1283, 1286, 1287, 1293, 1294, + 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1305, 1306, + 1312, 1313, 1320, 1321, 1327, 1328, 1337, 1345, 1346, 1351, + 1352, 1353, 1358, 1371, 1371, 1371, 1371, 1371, 1371, 1371, + 1374, 1378, 1382, 1389, 1394, 1402, 1437, 1468, 1473, 1483, + 1493, 1497, 1507, 1514, 1523, 1530, 1535, 1540, 1547, 1548, + 1555, 1562, 1570, 1576, 1588, 1616, 1632, 1659, 1687, 1713, + 1733, 1759, 1779, 1791, 1798, 1864, 1874, 1884, 1895, 1908, + 1919, 1933, 1940, 1947, 1965, 1977, 1998, 2006, 2012, 2023, + 2028, 2033, 2038, 2043, 2049, 2055, 2061, 2069, 2080, 2084, + 2092, 2092, 2095, 2095, 2098, 2110, 2131, 2136, 2144, 2145, + 2149, 2149, 2153, 2153, 2156, 2159, 2183, 2195, 2194, 2206, + 2205, 2215, 2214, 2225, 2265, 2268, 2274, 2284, 2288, 2293, + 2295, 2300, 2305, 2314, 2324, 2335, 2339, 2348, 2357, 2362, + 2511, 2511, 2513, 2522, 2522, 2524, 2529, 2541, 2545, 2550, + 2554, 2558, 2563, 2568, 2572, 2576, 2580, 2584, 2588, 2592, + 2614, 2636, 2642, 2655, 2667, 2672, 2684, 2690, 2694, 2704, + 2708, 2712, 2717, 2724, 2724, 2730, 2739, 2744, 2749, 2753, + 2762, 2771, 2784, 2793, 2797, 2805, 2825, 2829, 2834, 2845, + 2864, 2873, 2977, 2981, 2988, 2999, 3012, 3021, 3034, 3045, + 3055, 3066, 3074, 3084, 3091, 3094, 3095, 3103, 3109, 3118, + 3122, 3127, 3143, 3160, 3172, 3184, 3198, 3212, 3224, 3245, + 3252, 3258, 3264, 3270, 3285, 3395, 3400, 3404, 3411, 3418, + 3428, 3435, 3445, 3453, 3467, 3484, 3498, 3513, 3528 }; #endif @@ -3645,152 +3647,152 @@ switch (yyn) { case 29: -#line 1150 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1152 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_EQ; ;} break; case 30: -#line 1150 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1152 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_NE; ;} break; case 31: -#line 1151 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1153 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLT; ;} break; case 32: -#line 1151 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1153 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGT; ;} break; case 33: -#line 1152 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1154 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLE; ;} break; case 34: -#line 1152 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1154 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGE; ;} break; case 35: -#line 1153 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1155 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULT; ;} break; case 36: -#line 1153 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1155 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGT; ;} break; case 37: -#line 1154 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1156 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULE; ;} break; case 38: -#line 1154 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1156 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGE; ;} break; case 39: -#line 1158 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1160 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OEQ; ;} break; case 40: -#line 1158 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1160 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ONE; ;} break; case 41: -#line 1159 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1161 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLT; ;} break; case 42: -#line 1159 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1161 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGT; ;} break; case 43: -#line 1160 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1162 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLE; ;} break; case 44: -#line 1160 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1162 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGE; ;} break; case 45: -#line 1161 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1163 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ORD; ;} break; case 46: -#line 1161 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1163 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNO; ;} break; case 47: -#line 1162 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1164 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UEQ; ;} break; case 48: -#line 1162 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1164 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNE; ;} break; case 49: -#line 1163 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1165 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULT; ;} break; case 50: -#line 1163 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1165 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGT; ;} break; case 51: -#line 1164 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1166 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULE; ;} break; case 52: -#line 1164 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1166 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGE; ;} break; case 53: -#line 1165 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1167 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_TRUE; ;} break; case 54: -#line 1166 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1168 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;} break; case 59: -#line 1170 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1172 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 60: -#line 1172 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1174 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=(yyvsp[(3) - (4)].UInt64Val); ;} break; case 61: -#line 1173 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1175 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=0; ;} break; case 62: -#line 1177 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1179 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR @@ -3798,7 +3800,7 @@ break; case 63: -#line 1181 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1183 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR @@ -3806,7 +3808,7 @@ break; case 64: -#line 1186 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1188 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(1) - (2)].UIntVal); CHECK_FOR_ERROR @@ -3814,7 +3816,7 @@ break; case 68: -#line 1195 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1197 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR @@ -3822,7 +3824,7 @@ break; case 69: -#line 1200 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1202 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR @@ -3830,157 +3832,157 @@ break; case 70: -#line 1206 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1208 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 71: -#line 1207 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1209 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 72: -#line 1208 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1210 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 73: -#line 1209 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1211 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; case 74: -#line 1210 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1212 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 75: -#line 1211 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1213 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::CommonLinkage; ;} break; case 76: -#line 1215 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1217 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 77: -#line 1216 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1218 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 78: -#line 1217 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1219 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 79: -#line 1221 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1223 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; case 80: -#line 1222 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1224 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; case 81: -#line 1223 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1225 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::HiddenVisibility; ;} break; case 82: -#line 1224 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1226 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::ProtectedVisibility; ;} break; case 83: -#line 1228 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1230 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 84: -#line 1229 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1231 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 85: -#line 1230 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1232 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 86: -#line 1234 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1236 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 87: -#line 1235 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1237 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 88: -#line 1236 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1238 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 89: -#line 1237 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1239 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 90: -#line 1238 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1240 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 91: -#line 1242 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1244 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 92: -#line 1243 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1245 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 93: -#line 1244 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1246 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 94: -#line 1247 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1249 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; case 95: -#line 1248 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1250 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; case 96: -#line 1249 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1251 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Fast; ;} break; case 97: -#line 1250 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1252 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Cold; ;} break; case 98: -#line 1251 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1253 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_StdCall; ;} break; case 99: -#line 1252 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1254 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_FastCall; ;} break; case 100: -#line 1253 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1255 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val)) GEN_ERROR("Calling conv too large"); @@ -3990,176 +3992,176 @@ break; case 101: -#line 1260 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1262 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; case 102: -#line 1261 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1263 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; case 103: -#line 1262 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1264 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; case 104: -#line 1263 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1265 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; case 105: -#line 1264 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1266 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::InReg; ;} break; case 106: -#line 1265 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1267 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::StructRet; ;} break; case 107: -#line 1266 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1268 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoAlias; ;} break; case 108: -#line 1267 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1269 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ByVal; ;} break; case 109: -#line 1268 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1270 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::Nest; ;} break; case 110: -#line 1269 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1271 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::constructAlignmentFromInt((yyvsp[(2) - (2)].UInt64Val)); ;} break; case 111: -#line 1273 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1275 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::None; ;} break; case 112: -#line 1274 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1276 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes); ;} break; case 113: -#line 1279 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1281 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::InReg; ;} break; case 114: -#line 1280 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1282 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; case 115: -#line 1281 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1283 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; case 116: -#line 1284 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1286 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::None; ;} break; case 117: -#line 1285 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1287 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes); ;} break; case 118: -#line 1291 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1293 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoReturn; ;} break; case 119: -#line 1292 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1294 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoUnwind; ;} break; case 120: -#line 1293 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1295 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::InReg; ;} break; case 121: -#line 1294 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1296 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; case 122: -#line 1295 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1297 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; case 123: -#line 1296 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1298 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ReadNone; ;} break; case 124: -#line 1297 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1299 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ReadOnly; ;} break; case 125: -#line 1298 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1300 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoInline; ;} break; case 126: -#line 1299 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1301 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::AlwaysInline; ;} break; case 127: -#line 1300 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1302 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::OptimizeForSize; ;} break; case 128: -#line 1303 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1305 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::None; ;} break; case 129: -#line 1304 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1306 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes); ;} break; case 130: -#line 1310 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1312 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 131: -#line 1311 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1313 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(2) - (2)].StrVal); ;} break; case 132: -#line 1318 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1320 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; case 133: -#line 1319 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1321 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(2) - (2)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4169,12 +4171,12 @@ break; case 134: -#line 1325 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1327 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; case 135: -#line 1326 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1328 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(3) - (3)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4184,7 +4186,7 @@ break; case 136: -#line 1335 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1337 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { for (unsigned i = 0, e = (yyvsp[(2) - (2)].StrVal)->length(); i != e; ++i) if ((*(yyvsp[(2) - (2)].StrVal))[i] == '"' || (*(yyvsp[(2) - (2)].StrVal))[i] == '\\') @@ -4195,27 +4197,27 @@ break; case 137: -#line 1343 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1345 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 138: -#line 1344 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1346 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (1)].StrVal); ;} break; case 139: -#line 1349 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1351 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; case 140: -#line 1350 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1352 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; case 141: -#line 1351 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1353 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV->setSection(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -4224,7 +4226,7 @@ break; case 142: -#line 1356 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1358 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(2) - (2)].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[(2) - (2)].UInt64Val))) GEN_ERROR("Alignment must be a power of two"); @@ -4234,7 +4236,7 @@ break; case 150: -#line 1372 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1374 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(OpaqueType::get()); CHECK_FOR_ERROR @@ -4242,7 +4244,7 @@ break; case 151: -#line 1376 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1378 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[(1) - (1)].PrimType)); CHECK_FOR_ERROR @@ -4250,7 +4252,7 @@ break; case 152: -#line 1380 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1382 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Pointer type? if (*(yyvsp[(1) - (3)].TypeVal) == Type::LabelTy) GEN_ERROR("Cannot form a pointer to a basic block"); @@ -4261,7 +4263,7 @@ break; case 153: -#line 1387 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1389 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... const Type* tmp = getTypeVal((yyvsp[(1) - (1)].ValIDVal)); CHECK_FOR_ERROR @@ -4270,7 +4272,7 @@ break; case 154: -#line 1392 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1394 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if ((yyvsp[(2) - (2)].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -4282,7 +4284,7 @@ break; case 155: -#line 1400 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1402 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4321,7 +4323,7 @@ break; case 156: -#line 1435 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1437 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4355,7 +4357,7 @@ break; case 157: -#line 1466 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1468 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Sized array type? (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[(4) - (5)].TypeVal), (yyvsp[(2) - (5)].UInt64Val)))); delete (yyvsp[(4) - (5)].TypeVal); @@ -4364,7 +4366,7 @@ break; case 158: -#line 1471 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1473 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Vector type? const llvm::Type* ElemTy = (yyvsp[(4) - (5)].TypeVal)->get(); if ((unsigned)(yyvsp[(2) - (5)].UInt64Val) != (yyvsp[(2) - (5)].UInt64Val)) @@ -4378,7 +4380,7 @@ break; case 159: -#line 1481 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1483 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = (yyvsp[(2) - (3)].TypeList)->begin(), @@ -4392,7 +4394,7 @@ break; case 160: -#line 1491 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1493 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector())); CHECK_FOR_ERROR @@ -4400,7 +4402,7 @@ break; case 161: -#line 1495 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1497 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements; for (std::list::iterator I = (yyvsp[(3) - (5)].TypeList)->begin(), @@ -4414,7 +4416,7 @@ break; case 162: -#line 1505 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1507 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector(), true)); CHECK_FOR_ERROR @@ -4422,7 +4424,7 @@ break; case 163: -#line 1512 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1514 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4432,7 +4434,7 @@ break; case 164: -#line 1521 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1523 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (1)].TypeVal))->getDescription()); @@ -4443,14 +4445,14 @@ break; case 165: -#line 1528 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1530 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(Type::VoidTy); ;} break; case 166: -#line 1533 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1535 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); (yyval.TypeWithAttrsList)->push_back((yyvsp[(1) - (1)].TypeWithAttrs)); @@ -4459,7 +4461,7 @@ break; case 167: -#line 1538 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1540 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList))->push_back((yyvsp[(3) - (3)].TypeWithAttrs)); CHECK_FOR_ERROR @@ -4467,7 +4469,7 @@ break; case 169: -#line 1546 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1548 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList); TypeWithAttrs TWA; TWA.Attrs = Attribute::None; @@ -4478,7 +4480,7 @@ break; case 170: -#line 1553 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1555 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList; TypeWithAttrs TWA; TWA.Attrs = Attribute::None; @@ -4489,7 +4491,7 @@ break; case 171: -#line 1560 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1562 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); CHECK_FOR_ERROR @@ -4497,7 +4499,7 @@ break; case 172: -#line 1568 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1570 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); (yyval.TypeList)->push_back(*(yyvsp[(1) - (1)].TypeVal)); @@ -4507,7 +4509,7 @@ break; case 173: -#line 1574 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1576 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[(1) - (3)].TypeList))->push_back(*(yyvsp[(3) - (3)].TypeVal)); delete (yyvsp[(3) - (3)].TypeVal); @@ -4516,7 +4518,7 @@ break; case 174: -#line 1586 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1588 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4548,7 +4550,7 @@ break; case 175: -#line 1614 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1616 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4568,7 +4570,7 @@ break; case 176: -#line 1630 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1632 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4599,7 +4601,7 @@ break; case 177: -#line 1657 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1659 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4631,7 +4633,7 @@ break; case 178: -#line 1685 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1687 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (4)].TypeVal)->get()); if (STy == 0) @@ -4661,7 +4663,7 @@ break; case 179: -#line 1711 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1713 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4685,7 +4687,7 @@ break; case 180: -#line 1731 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1733 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (6)].TypeVal)->get()); if (STy == 0) @@ -4715,7 +4717,7 @@ break; case 181: -#line 1757 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1759 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (5)].TypeVal))->getDescription()); @@ -4739,7 +4741,7 @@ break; case 182: -#line 1777 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1779 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4755,7 +4757,7 @@ break; case 183: -#line 1789 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1791 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4766,7 +4768,7 @@ break; case 184: -#line 1796 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1798 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4836,7 +4838,7 @@ break; case 185: -#line 1862 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1864 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4850,7 +4852,7 @@ break; case 186: -#line 1872 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1874 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4864,7 +4866,7 @@ break; case 187: -#line 1882 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1884 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { if (!ConstantInt::isValueValidForType(IT, (yyvsp[(2) - (2)].SInt64Val))) @@ -4879,7 +4881,7 @@ break; case 188: -#line 1893 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1895 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > IT->getBitWidth()) @@ -4896,7 +4898,7 @@ break; case 189: -#line 1906 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1908 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { if (!ConstantInt::isValueValidForType(IT, (yyvsp[(2) - (2)].UInt64Val))) @@ -4911,7 +4913,7 @@ break; case 190: -#line 1917 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1919 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > IT->getBitWidth()) @@ -4929,7 +4931,7 @@ break; case 191: -#line 1931 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1933 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants if ((yyvsp[(1) - (2)].TypeVal)->get() != Type::Int1Ty) GEN_ERROR("Constant true must have type i1"); @@ -4940,7 +4942,7 @@ break; case 192: -#line 1938 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1940 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants if ((yyvsp[(1) - (2)].TypeVal)->get() != Type::Int1Ty) GEN_ERROR("Constant false must have type i1"); @@ -4951,7 +4953,7 @@ break; case 193: -#line 1945 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1947 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Floating point constants if (!ConstantFP::isValueValidForType((yyvsp[(1) - (2)].TypeVal)->get(), *(yyvsp[(2) - (2)].FPVal))) GEN_ERROR("Floating point constant invalid for type"); @@ -4971,7 +4973,7 @@ break; case 194: -#line 1963 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1965 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (6)].TypeVal))->getDescription()); @@ -4987,7 +4989,7 @@ break; case 195: -#line 1975 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1977 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (5)].ConstVal)->getType())) GEN_ERROR("GetElementPtr requires a pointer operand"); @@ -5012,7 +5014,7 @@ break; case 196: -#line 1996 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1998 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (8)].ConstVal)->getType() != Type::Int1Ty) GEN_ERROR("Select condition must be of boolean type"); @@ -5024,7 +5026,7 @@ break; case 197: -#line 2004 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2006 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Binary operator types must match"); @@ -5034,7 +5036,7 @@ break; case 198: -#line 2010 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2012 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Logical operator types must match"); @@ -5049,7 +5051,7 @@ break; case 199: -#line 2021 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2023 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("icmp operand types must match"); @@ -5058,7 +5060,7 @@ break; case 200: -#line 2026 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2028 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("fcmp operand types must match"); @@ -5067,7 +5069,7 @@ break; case 201: -#line 2031 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2033 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vicmp operand types must match"); @@ -5076,7 +5078,7 @@ break; case 202: -#line 2036 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2038 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vfcmp operand types must match"); @@ -5085,7 +5087,7 @@ break; case 203: -#line 2041 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2043 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(3) - (6)].ConstVal), (yyvsp[(5) - (6)].ConstVal))) GEN_ERROR("Invalid extractelement operands"); @@ -5095,7 +5097,7 @@ break; case 204: -#line 2047 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2049 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid insertelement operands"); @@ -5105,7 +5107,7 @@ break; case 205: -#line 2053 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2055 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -5115,7 +5117,7 @@ break; case 206: -#line 2059 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2061 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (5)].ConstVal)->getType()) && !isa((yyvsp[(3) - (5)].ConstVal)->getType())) GEN_ERROR("ExtractValue requires an aggregate operand"); @@ -5127,7 +5129,7 @@ break; case 207: -#line 2067 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2069 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (7)].ConstVal)->getType()) && !isa((yyvsp[(3) - (7)].ConstVal)->getType())) GEN_ERROR("InsertValue requires an aggregate operand"); @@ -5139,7 +5141,7 @@ break; case 208: -#line 2078 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2080 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ConstVector) = (yyvsp[(1) - (3)].ConstVector))->push_back((yyvsp[(3) - (3)].ConstVal)); CHECK_FOR_ERROR @@ -5147,7 +5149,7 @@ break; case 209: -#line 2082 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2084 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector) = new std::vector(); (yyval.ConstVector)->push_back((yyvsp[(1) - (1)].ConstVal)); @@ -5156,27 +5158,27 @@ break; case 210: -#line 2090 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2092 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; case 211: -#line 2090 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2092 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; case 212: -#line 2093 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2095 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; case 213: -#line 2093 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2095 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; case 214: -#line 2096 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2098 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const Type* VTy = (yyvsp[(1) - (2)].TypeVal)->get(); Value *V = getVal(VTy, (yyvsp[(2) - (2)].ValIDVal)); @@ -5192,7 +5194,7 @@ break; case 215: -#line 2108 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2110 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { Constant *Val = (yyvsp[(3) - (6)].ConstVal); const Type *DestTy = (yyvsp[(5) - (6)].TypeVal)->get(); @@ -5208,7 +5210,7 @@ break; case 216: -#line 2129 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2131 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -5217,7 +5219,7 @@ break; case 217: -#line 2134 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2136 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -5226,12 +5228,12 @@ break; case 220: -#line 2147 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2149 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = false; ;} break; case 221: -#line 2147 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2149 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.FunctionDone(); CHECK_FOR_ERROR @@ -5239,26 +5241,26 @@ break; case 222: -#line 2151 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2153 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ;} break; case 223: -#line 2151 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2153 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 224: -#line 2154 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2156 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 225: -#line 2157 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2159 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (3)].TypeVal))->getDescription()); @@ -5286,7 +5288,7 @@ break; case 226: -#line 2181 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2183 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ResolveTypeTo((yyvsp[(1) - (3)].StrVal), (yyvsp[(3) - (3)].PrimType)); @@ -5301,7 +5303,7 @@ break; case 227: -#line 2193 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2195 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { /* "Externally Visible" Linkage */ if ((yyvsp[(5) - (6)].ConstVal) == 0) @@ -5313,14 +5315,14 @@ break; case 228: -#line 2200 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2202 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; case 229: -#line 2204 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2206 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(6) - (7)].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant"); @@ -5330,14 +5332,14 @@ break; case 230: -#line 2209 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2211 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; case 231: -#line 2213 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2215 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(6) - (7)].TypeVal))->getDescription()); @@ -5348,7 +5350,7 @@ break; case 232: -#line 2219 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2221 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR @@ -5356,7 +5358,7 @@ break; case 233: -#line 2223 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2225 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::string Name; if ((yyvsp[(1) - (5)].StrVal)) { @@ -5400,21 +5402,21 @@ break; case 234: -#line 2263 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2265 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 235: -#line 2266 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2268 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 236: -#line 2272 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2274 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); if (AsmSoFar.empty()) @@ -5427,7 +5429,7 @@ break; case 237: -#line 2282 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2284 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5435,7 +5437,7 @@ break; case 238: -#line 2286 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2288 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setDataLayout(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5443,7 +5445,7 @@ break; case 240: -#line 2293 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2295 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5452,7 +5454,7 @@ break; case 241: -#line 2298 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2300 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5461,14 +5463,14 @@ break; case 242: -#line 2303 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2305 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 243: -#line 2312 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2314 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -5482,7 +5484,7 @@ break; case 244: -#line 2322 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2324 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -5496,7 +5498,7 @@ break; case 245: -#line 2333 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2335 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (1)].ArgList); CHECK_FOR_ERROR @@ -5504,7 +5506,7 @@ break; case 246: -#line 2337 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2339 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (3)].ArgList); struct ArgListEntry E; @@ -5517,7 +5519,7 @@ break; case 247: -#line 2346 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2348 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = new ArgListType; struct ArgListEntry E; @@ -5530,7 +5532,7 @@ break; case 248: -#line 2355 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2357 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = 0; CHECK_FOR_ERROR @@ -5538,7 +5540,7 @@ break; case 249: -#line 2361 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2363 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::string FunctionName(*(yyvsp[(4) - (11)].StrVal)); delete (yyvsp[(4) - (11)].StrVal); // Free strdup'd memory! @@ -5689,7 +5691,7 @@ break; case 252: -#line 2511 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2513 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -5701,7 +5703,7 @@ break; case 255: -#line 2522 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2524 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR @@ -5709,7 +5711,7 @@ break; case 256: -#line 2527 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2529 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.CurrentFunction->setLinkage((yyvsp[(1) - (3)].Linkage)); CurFun.CurrentFunction->setVisibility((yyvsp[(2) - (3)].Visibility)); @@ -5720,7 +5722,7 @@ break; case 257: -#line 2539 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2541 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -5728,7 +5730,7 @@ break; case 258: -#line 2543 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2545 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -5736,7 +5738,7 @@ break; case 259: -#line 2548 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2550 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].SInt64Val)); CHECK_FOR_ERROR @@ -5744,7 +5746,7 @@ break; case 260: -#line 2552 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2554 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].UInt64Val)); CHECK_FOR_ERROR @@ -5752,7 +5754,7 @@ break; case 261: -#line 2556 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2558 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants (yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), true); delete (yyvsp[(1) - (1)].APIntVal); @@ -5761,7 +5763,7 @@ break; case 262: -#line 2561 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2563 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants (yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), false); delete (yyvsp[(1) - (1)].APIntVal); @@ -5770,7 +5772,7 @@ break; case 263: -#line 2566 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2568 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].FPVal)); CHECK_FOR_ERROR @@ -5778,7 +5780,7 @@ break; case 264: -#line 2570 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2572 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getTrue()); CHECK_FOR_ERROR @@ -5786,7 +5788,7 @@ break; case 265: -#line 2574 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2576 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getFalse()); CHECK_FOR_ERROR @@ -5794,7 +5796,7 @@ break; case 266: -#line 2578 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2580 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createNull(); CHECK_FOR_ERROR @@ -5802,7 +5804,7 @@ break; case 267: -#line 2582 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2584 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createUndef(); CHECK_FOR_ERROR @@ -5810,7 +5812,7 @@ break; case 268: -#line 2586 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2588 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // A vector zero constant. (yyval.ValIDVal) = ValID::createZeroInit(); CHECK_FOR_ERROR @@ -5818,7 +5820,7 @@ break; case 269: -#line 2590 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2592 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType(); unsigned NumElements = (yyvsp[(2) - (3)].ConstVector)->size(); @@ -5844,7 +5846,7 @@ break; case 270: -#line 2612 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2614 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType(); uint64_t NumElements = (yyvsp[(2) - (3)].ConstVector)->size(); @@ -5870,7 +5872,7 @@ break; case 271: -#line 2634 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2636 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Use undef instead of an array because it's inconvenient to determine // the element type at this point, there being no elements to examine. @@ -5880,7 +5882,7 @@ break; case 272: -#line 2640 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2642 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { uint64_t NumElements = (yyvsp[(2) - (2)].StrVal)->length(); const Type *ETy = Type::Int8Ty; @@ -5897,7 +5899,7 @@ break; case 273: -#line 2653 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2655 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements((yyvsp[(2) - (3)].ConstVector)->size()); for (unsigned i = 0, e = (yyvsp[(2) - (3)].ConstVector)->size(); i != e; ++i) @@ -5913,7 +5915,7 @@ break; case 274: -#line 2665 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2667 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = StructType::get(std::vector()); (yyval.ValIDVal) = ValID::create(ConstantStruct::get(STy, std::vector())); @@ -5922,7 +5924,7 @@ break; case 275: -#line 2670 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2672 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements((yyvsp[(3) - (5)].ConstVector)->size()); for (unsigned i = 0, e = (yyvsp[(3) - (5)].ConstVector)->size(); i != e; ++i) @@ -5938,7 +5940,7 @@ break; case 276: -#line 2682 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2684 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = StructType::get(std::vector(), /*isPacked=*/true); @@ -5948,7 +5950,7 @@ break; case 277: -#line 2688 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2690 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].ConstVal)); CHECK_FOR_ERROR @@ -5956,7 +5958,7 @@ break; case 278: -#line 2692 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2694 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createInlineAsm(*(yyvsp[(3) - (5)].StrVal), *(yyvsp[(5) - (5)].StrVal), (yyvsp[(2) - (5)].BoolVal)); delete (yyvsp[(3) - (5)].StrVal); @@ -5966,7 +5968,7 @@ break; case 279: -#line 2702 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2704 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? (yyval.ValIDVal) = ValID::createLocalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR @@ -5974,7 +5976,7 @@ break; case 280: -#line 2706 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2708 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createGlobalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR @@ -5982,7 +5984,7 @@ break; case 281: -#line 2710 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2712 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5991,7 +5993,7 @@ break; case 282: -#line 2715 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2717 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createGlobalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -6000,7 +6002,7 @@ break; case 285: -#line 2728 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2730 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -6011,7 +6013,7 @@ break; case 286: -#line 2737 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2739 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); (yyval.ValueList)->push_back((yyvsp[(1) - (1)].ValueVal)); @@ -6020,7 +6022,7 @@ break; case 287: -#line 2742 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2744 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ValueList)=(yyvsp[(1) - (3)].ValueList))->push_back((yyvsp[(3) - (3)].ValueVal)); CHECK_FOR_ERROR @@ -6028,7 +6030,7 @@ break; case 288: -#line 2747 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2749 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR @@ -6036,7 +6038,7 @@ break; case 289: -#line 2751 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2753 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR @@ -6044,7 +6046,7 @@ break; case 290: -#line 2760 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2762 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { setValueName((yyvsp[(3) - (3)].TermInstVal), (yyvsp[(2) - (3)].StrVal)); CHECK_FOR_ERROR @@ -6056,7 +6058,7 @@ break; case 291: -#line 2769 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2771 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR int ValNum = InsertValue((yyvsp[(3) - (3)].TermInstVal)); @@ -6071,7 +6073,7 @@ break; case 292: -#line 2782 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2784 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (CastInst *CI1 = dyn_cast((yyvsp[(2) - (2)].InstVal))) if (CastInst *CI2 = dyn_cast(CI1->getOperand(0))) @@ -6084,7 +6086,7 @@ break; case 293: -#line 2791 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2793 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty space between instruction lists (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalID(CurFun.NextValNum)); CHECK_FOR_ERROR @@ -6092,7 +6094,7 @@ break; case 294: -#line 2795 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2797 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Labelled (named) basic block (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal))); delete (yyvsp[(1) - (1)].StrVal); @@ -6102,7 +6104,7 @@ break; case 295: -#line 2803 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2805 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with a result... ValueList &VL = *(yyvsp[(2) - (2)].ValueList); assert(!VL.empty() && "Invalid ret operands!"); @@ -6126,7 +6128,7 @@ break; case 296: -#line 2823 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2825 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with no result... (yyval.TermInstVal) = ReturnInst::Create(); CHECK_FOR_ERROR @@ -6134,7 +6136,7 @@ break; case 297: -#line 2827 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2829 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[(3) - (3)].ValIDVal)); CHECK_FOR_ERROR @@ -6143,7 +6145,7 @@ break; case 298: -#line 2832 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2834 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (cast((yyvsp[(2) - (9)].PrimType))->getBitWidth() != 1) GEN_ERROR("Branch condition must have type i1"); @@ -6158,7 +6160,7 @@ break; case 299: -#line 2843 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2845 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (9)].PrimType), (yyvsp[(3) - (9)].ValIDVal)); CHECK_FOR_ERROR @@ -6181,7 +6183,7 @@ break; case 300: -#line 2862 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2864 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (8)].PrimType), (yyvsp[(3) - (8)].ValIDVal)); CHECK_FOR_ERROR @@ -6194,7 +6196,7 @@ break; case 301: -#line 2872 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2874 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -6301,7 +6303,7 @@ break; case 302: -#line 2975 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2977 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnwindInst(); CHECK_FOR_ERROR @@ -6309,7 +6311,7 @@ break; case 303: -#line 2979 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2981 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnreachableInst(); CHECK_FOR_ERROR @@ -6317,7 +6319,7 @@ break; case 304: -#line 2986 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2988 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = (yyvsp[(1) - (6)].JumpTable); Constant *V = cast(getExistingVal((yyvsp[(2) - (6)].PrimType), (yyvsp[(3) - (6)].ValIDVal))); @@ -6332,7 +6334,7 @@ break; case 305: -#line 2997 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2999 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = new std::vector >(); Constant *V = cast(getExistingVal((yyvsp[(1) - (5)].PrimType), (yyvsp[(2) - (5)].ValIDVal))); @@ -6348,7 +6350,7 @@ break; case 306: -#line 3010 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3012 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName((yyvsp[(2) - (2)].InstVal), (yyvsp[(1) - (2)].StrVal)); @@ -6360,7 +6362,7 @@ break; case 307: -#line 3019 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3021 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR int ValNum = InsertValue((yyvsp[(2) - (2)].InstVal)); @@ -6375,7 +6377,7 @@ break; case 308: -#line 3032 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3034 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (6)].TypeVal))->getDescription()); @@ -6390,7 +6392,7 @@ break; case 309: -#line 3043 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3045 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.PHIList) = (yyvsp[(1) - (7)].PHIList); Value* tmpVal = getVal((yyvsp[(1) - (7)].PHIList)->front().first->getType(), (yyvsp[(4) - (7)].ValIDVal)); @@ -6402,7 +6404,7 @@ break; case 310: -#line 3053 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3055 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -6417,7 +6419,7 @@ break; case 311: -#line 3064 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3066 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 // Labels are only valid in ASMs @@ -6429,7 +6431,7 @@ break; case 312: -#line 3072 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3074 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -6443,7 +6445,7 @@ break; case 313: -#line 3082 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3084 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 (yyval.ParamList) = (yyvsp[(1) - (6)].ParamList); @@ -6454,17 +6456,17 @@ break; case 314: -#line 3089 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3091 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamList) = new ParamList(); ;} break; case 315: -#line 3092 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3094 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); ;} break; case 316: -#line 3093 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3095 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[(1) - (3)].ValueList); (yyval.ValueList)->push_back((yyvsp[(3) - (3)].ValueVal)); @@ -6473,7 +6475,7 @@ break; case 317: -#line 3101 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3103 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstantList) = new std::vector(); if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val)) @@ -6483,7 +6485,7 @@ break; case 318: -#line 3107 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3109 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstantList) = (yyvsp[(1) - (3)].ConstantList); if ((unsigned)(yyvsp[(3) - (3)].UInt64Val) != (yyvsp[(3) - (3)].UInt64Val)) @@ -6494,7 +6496,7 @@ break; case 319: -#line 3116 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3118 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -6502,7 +6504,7 @@ break; case 320: -#line 3120 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3122 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -6510,7 +6512,7 @@ break; case 321: -#line 3125 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3127 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6530,7 +6532,7 @@ break; case 322: -#line 3141 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3143 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6551,7 +6553,7 @@ break; case 323: -#line 3158 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3160 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6567,7 +6569,7 @@ break; case 324: -#line 3170 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3172 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6583,7 +6585,7 @@ break; case 325: -#line 3182 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3184 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6601,7 +6603,7 @@ break; case 326: -#line 3196 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3198 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6619,7 +6621,7 @@ break; case 327: -#line 3210 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3212 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6635,7 +6637,7 @@ break; case 328: -#line 3222 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3224 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (isa((yyvsp[(2) - (6)].ValueVal)->getType())) { // vector select @@ -6660,7 +6662,7 @@ break; case 329: -#line 3243 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3245 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6671,7 +6673,7 @@ break; case 330: -#line 3250 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3252 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(2) - (4)].ValueVal), (yyvsp[(4) - (4)].ValueVal))) GEN_ERROR("Invalid extractelement operands"); @@ -6681,7 +6683,7 @@ break; case 331: -#line 3256 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3258 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid insertelement operands"); @@ -6691,7 +6693,7 @@ break; case 332: -#line 3262 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3264 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -6701,7 +6703,7 @@ break; case 333: -#line 3268 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3270 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[(2) - (2)].PHIList)->front().first->getType(); if (!Ty->isFirstClassType()) @@ -6720,7 +6722,7 @@ break; case 334: -#line 3284 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3286 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -6833,7 +6835,7 @@ break; case 335: -#line 3393 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3395 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = (yyvsp[(1) - (1)].InstVal); CHECK_FOR_ERROR @@ -6841,7 +6843,7 @@ break; case 336: -#line 3398 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3400 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -6849,7 +6851,7 @@ break; case 337: -#line 3402 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3404 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -6857,7 +6859,7 @@ break; case 338: -#line 3409 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3411 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6868,7 +6870,7 @@ break; case 339: -#line 3416 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3418 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6882,7 +6884,7 @@ break; case 340: -#line 3426 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3428 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6893,7 +6895,7 @@ break; case 341: -#line 3433 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3435 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6907,7 +6909,7 @@ break; case 342: -#line 3443 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3445 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(2) - (2)].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + @@ -6918,7 +6920,7 @@ break; case 343: -#line 3451 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3453 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -6936,7 +6938,7 @@ break; case 344: -#line 3465 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3467 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (7)].TypeVal))->getDescription()); @@ -6957,7 +6959,7 @@ break; case 345: -#line 3482 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3484 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6975,7 +6977,7 @@ break; case 346: -#line 3496 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3498 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()); @@ -6994,7 +6996,7 @@ break; case 347: -#line 3511 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3513 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()); @@ -7013,7 +7015,7 @@ break; case 348: -#line 3526 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3528 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (7)].TypeVal))->getDescription()); @@ -7035,7 +7037,7 @@ /* Line 1267 of yacc.c. */ -#line 7039 "llvmAsmParser.tab.c" +#line 7041 "llvmAsmParser.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -7249,7 +7251,7 @@ } -#line 3545 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3547 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" // common code from the two 'RunVMAsmParser' functions Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs?rev=57575&r1=57574&r2=57575&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs Wed Oct 15 06:20:21 2008 @@ -360,7 +360,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 978 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 980 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { llvm::Module *ModuleVal; llvm::Function *FunctionVal; Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs?rev=57575&r1=57574&r2=57575&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Wed Oct 15 06:20:21 2008 @@ -307,8 +307,10 @@ } std::map::iterator I =CurModule.LateResolveTypes.find(D); - if (I != CurModule.LateResolveTypes.end()) + if (I != CurModule.LateResolveTypes.end()) { + D.destroy(); return I->second; + } Type *Typ = OpaqueType::get(); CurModule.LateResolveTypes.insert(std::make_pair(D, Typ)); From nunoplopes at sapo.pt Wed Oct 15 07:04:36 2008 From: nunoplopes at sapo.pt (Nuno Lopes) Date: Wed, 15 Oct 2008 12:04:36 -0000 Subject: [llvm-commits] [llvm] r57576 - /llvm/trunk/lib/AsmParser/llvmAsmParser.y Message-ID: <200810151204.m9FC4aig001353@zion.cs.uiuc.edu> Author: nlopes Date: Wed Oct 15 07:04:36 2008 New Revision: 57576 URL: http://llvm.org/viewvc/llvm-project?rev=57576&view=rev Log: fix memleak in GetForwardRefForGlobal() Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=57576&r1=57575&r2=57576&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Wed Oct 15 07:04:36 2008 @@ -140,6 +140,7 @@ GlobalValue *Ret = 0; if (I != GlobalRefs.end()) { Ret = I->second; + I->first.second.destroy(); GlobalRefs.erase(I); } return Ret; From nunoplopes at sapo.pt Wed Oct 15 07:05:02 2008 From: nunoplopes at sapo.pt (Nuno Lopes) Date: Wed, 15 Oct 2008 12:05:02 -0000 Subject: [llvm-commits] [llvm] r57577 - in /llvm/trunk/lib/AsmParser: llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y.cvs Message-ID: <200810151205.m9FC535E001377@zion.cs.uiuc.edu> Author: nlopes Date: Wed Oct 15 07:05:02 2008 New Revision: 57577 URL: http://llvm.org/viewvc/llvm-project?rev=57577&view=rev Log: regenerate Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs?rev=57577&r1=57576&r2=57577&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs Wed Oct 15 07:05:02 2008 @@ -524,6 +524,7 @@ GlobalValue *Ret = 0; if (I != GlobalRefs.end()) { Ret = I->second; + I->first.second.destroy(); GlobalRefs.erase(I); } return Ret; @@ -1381,7 +1382,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 980 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 981 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -1430,7 +1431,7 @@ llvm::FCmpInst::Predicate FPredicate; } /* Line 187 of yacc.c. */ -#line 1434 "llvmAsmParser.tab.c" +#line 1435 "llvmAsmParser.tab.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -1443,7 +1444,7 @@ /* Line 216 of yacc.c. */ -#line 1447 "llvmAsmParser.tab.c" +#line 1448 "llvmAsmParser.tab.c" #ifdef short # undef short @@ -1887,41 +1888,41 @@ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, - 1146, 1147, 1147, 1147, 1147, 1147, 1147, 1148, 1148, 1148, - 1148, 1148, 1148, 1149, 1149, 1149, 1149, 1149, 1149, 1152, - 1152, 1153, 1153, 1154, 1154, 1155, 1155, 1156, 1156, 1160, - 1160, 1161, 1161, 1162, 1162, 1163, 1163, 1164, 1164, 1165, - 1165, 1166, 1166, 1167, 1168, 1171, 1171, 1171, 1172, 1172, - 1174, 1175, 1179, 1183, 1188, 1194, 1194, 1196, 1197, 1202, - 1208, 1209, 1210, 1211, 1212, 1213, 1217, 1218, 1219, 1223, - 1224, 1225, 1226, 1230, 1231, 1232, 1236, 1237, 1238, 1239, - 1240, 1244, 1245, 1246, 1249, 1250, 1251, 1252, 1253, 1254, - 1255, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, - 1271, 1275, 1276, 1281, 1282, 1283, 1286, 1287, 1293, 1294, - 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1305, 1306, - 1312, 1313, 1320, 1321, 1327, 1328, 1337, 1345, 1346, 1351, - 1352, 1353, 1358, 1371, 1371, 1371, 1371, 1371, 1371, 1371, - 1374, 1378, 1382, 1389, 1394, 1402, 1437, 1468, 1473, 1483, - 1493, 1497, 1507, 1514, 1523, 1530, 1535, 1540, 1547, 1548, - 1555, 1562, 1570, 1576, 1588, 1616, 1632, 1659, 1687, 1713, - 1733, 1759, 1779, 1791, 1798, 1864, 1874, 1884, 1895, 1908, - 1919, 1933, 1940, 1947, 1965, 1977, 1998, 2006, 2012, 2023, - 2028, 2033, 2038, 2043, 2049, 2055, 2061, 2069, 2080, 2084, - 2092, 2092, 2095, 2095, 2098, 2110, 2131, 2136, 2144, 2145, - 2149, 2149, 2153, 2153, 2156, 2159, 2183, 2195, 2194, 2206, - 2205, 2215, 2214, 2225, 2265, 2268, 2274, 2284, 2288, 2293, - 2295, 2300, 2305, 2314, 2324, 2335, 2339, 2348, 2357, 2362, - 2511, 2511, 2513, 2522, 2522, 2524, 2529, 2541, 2545, 2550, - 2554, 2558, 2563, 2568, 2572, 2576, 2580, 2584, 2588, 2592, - 2614, 2636, 2642, 2655, 2667, 2672, 2684, 2690, 2694, 2704, - 2708, 2712, 2717, 2724, 2724, 2730, 2739, 2744, 2749, 2753, - 2762, 2771, 2784, 2793, 2797, 2805, 2825, 2829, 2834, 2845, - 2864, 2873, 2977, 2981, 2988, 2999, 3012, 3021, 3034, 3045, - 3055, 3066, 3074, 3084, 3091, 3094, 3095, 3103, 3109, 3118, - 3122, 3127, 3143, 3160, 3172, 3184, 3198, 3212, 3224, 3245, - 3252, 3258, 3264, 3270, 3285, 3395, 3400, 3404, 3411, 3418, - 3428, 3435, 3445, 3453, 3467, 3484, 3498, 3513, 3528 + 0, 1147, 1147, 1147, 1147, 1147, 1147, 1147, 1147, 1147, + 1147, 1148, 1148, 1148, 1148, 1148, 1148, 1149, 1149, 1149, + 1149, 1149, 1149, 1150, 1150, 1150, 1150, 1150, 1150, 1153, + 1153, 1154, 1154, 1155, 1155, 1156, 1156, 1157, 1157, 1161, + 1161, 1162, 1162, 1163, 1163, 1164, 1164, 1165, 1165, 1166, + 1166, 1167, 1167, 1168, 1169, 1172, 1172, 1172, 1173, 1173, + 1175, 1176, 1180, 1184, 1189, 1195, 1195, 1197, 1198, 1203, + 1209, 1210, 1211, 1212, 1213, 1214, 1218, 1219, 1220, 1224, + 1225, 1226, 1227, 1231, 1232, 1233, 1237, 1238, 1239, 1240, + 1241, 1245, 1246, 1247, 1250, 1251, 1252, 1253, 1254, 1255, + 1256, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, + 1272, 1276, 1277, 1282, 1283, 1284, 1287, 1288, 1294, 1295, + 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1306, 1307, + 1313, 1314, 1321, 1322, 1328, 1329, 1338, 1346, 1347, 1352, + 1353, 1354, 1359, 1372, 1372, 1372, 1372, 1372, 1372, 1372, + 1375, 1379, 1383, 1390, 1395, 1403, 1438, 1469, 1474, 1484, + 1494, 1498, 1508, 1515, 1524, 1531, 1536, 1541, 1548, 1549, + 1556, 1563, 1571, 1577, 1589, 1617, 1633, 1660, 1688, 1714, + 1734, 1760, 1780, 1792, 1799, 1865, 1875, 1885, 1896, 1909, + 1920, 1934, 1941, 1948, 1966, 1978, 1999, 2007, 2013, 2024, + 2029, 2034, 2039, 2044, 2050, 2056, 2062, 2070, 2081, 2085, + 2093, 2093, 2096, 2096, 2099, 2111, 2132, 2137, 2145, 2146, + 2150, 2150, 2154, 2154, 2157, 2160, 2184, 2196, 2195, 2207, + 2206, 2216, 2215, 2226, 2266, 2269, 2275, 2285, 2289, 2294, + 2296, 2301, 2306, 2315, 2325, 2336, 2340, 2349, 2358, 2363, + 2512, 2512, 2514, 2523, 2523, 2525, 2530, 2542, 2546, 2551, + 2555, 2559, 2564, 2569, 2573, 2577, 2581, 2585, 2589, 2593, + 2615, 2637, 2643, 2656, 2668, 2673, 2685, 2691, 2695, 2705, + 2709, 2713, 2718, 2725, 2725, 2731, 2740, 2745, 2750, 2754, + 2763, 2772, 2785, 2794, 2798, 2806, 2826, 2830, 2835, 2846, + 2865, 2874, 2978, 2982, 2989, 3000, 3013, 3022, 3035, 3046, + 3056, 3067, 3075, 3085, 3092, 3095, 3096, 3104, 3110, 3119, + 3123, 3128, 3144, 3161, 3173, 3185, 3199, 3213, 3225, 3246, + 3253, 3259, 3265, 3271, 3286, 3396, 3401, 3405, 3412, 3419, + 3429, 3436, 3446, 3454, 3468, 3485, 3499, 3514, 3529 }; #endif @@ -3647,152 +3648,152 @@ switch (yyn) { case 29: -#line 1152 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1153 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_EQ; ;} break; case 30: -#line 1152 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1153 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_NE; ;} break; case 31: -#line 1153 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1154 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLT; ;} break; case 32: -#line 1153 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1154 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGT; ;} break; case 33: -#line 1154 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1155 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLE; ;} break; case 34: -#line 1154 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1155 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGE; ;} break; case 35: -#line 1155 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1156 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULT; ;} break; case 36: -#line 1155 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1156 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGT; ;} break; case 37: -#line 1156 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1157 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULE; ;} break; case 38: -#line 1156 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1157 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGE; ;} break; case 39: -#line 1160 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1161 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OEQ; ;} break; case 40: -#line 1160 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1161 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ONE; ;} break; case 41: -#line 1161 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1162 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLT; ;} break; case 42: -#line 1161 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1162 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGT; ;} break; case 43: -#line 1162 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1163 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLE; ;} break; case 44: -#line 1162 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1163 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGE; ;} break; case 45: -#line 1163 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1164 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ORD; ;} break; case 46: -#line 1163 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1164 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNO; ;} break; case 47: -#line 1164 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1165 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UEQ; ;} break; case 48: -#line 1164 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1165 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNE; ;} break; case 49: -#line 1165 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1166 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULT; ;} break; case 50: -#line 1165 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1166 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGT; ;} break; case 51: -#line 1166 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1167 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULE; ;} break; case 52: -#line 1166 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1167 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGE; ;} break; case 53: -#line 1167 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1168 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_TRUE; ;} break; case 54: -#line 1168 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1169 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;} break; case 59: -#line 1172 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1173 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 60: -#line 1174 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1175 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=(yyvsp[(3) - (4)].UInt64Val); ;} break; case 61: -#line 1175 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1176 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=0; ;} break; case 62: -#line 1179 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1180 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR @@ -3800,7 +3801,7 @@ break; case 63: -#line 1183 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1184 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR @@ -3808,7 +3809,7 @@ break; case 64: -#line 1188 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1189 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(1) - (2)].UIntVal); CHECK_FOR_ERROR @@ -3816,7 +3817,7 @@ break; case 68: -#line 1197 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1198 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR @@ -3824,7 +3825,7 @@ break; case 69: -#line 1202 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1203 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR @@ -3832,157 +3833,157 @@ break; case 70: -#line 1208 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1209 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 71: -#line 1209 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1210 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 72: -#line 1210 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1211 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 73: -#line 1211 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1212 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; case 74: -#line 1212 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1213 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 75: -#line 1213 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1214 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::CommonLinkage; ;} break; case 76: -#line 1217 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1218 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 77: -#line 1218 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1219 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 78: -#line 1219 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1220 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 79: -#line 1223 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1224 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; case 80: -#line 1224 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1225 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; case 81: -#line 1225 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1226 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::HiddenVisibility; ;} break; case 82: -#line 1226 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1227 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::ProtectedVisibility; ;} break; case 83: -#line 1230 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1231 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 84: -#line 1231 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1232 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 85: -#line 1232 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1233 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 86: -#line 1236 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1237 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 87: -#line 1237 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1238 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 88: -#line 1238 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1239 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 89: -#line 1239 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1240 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 90: -#line 1240 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1241 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 91: -#line 1244 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1245 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 92: -#line 1245 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1246 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 93: -#line 1246 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1247 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 94: -#line 1249 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1250 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; case 95: -#line 1250 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1251 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; case 96: -#line 1251 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1252 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Fast; ;} break; case 97: -#line 1252 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1253 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Cold; ;} break; case 98: -#line 1253 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1254 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_StdCall; ;} break; case 99: -#line 1254 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1255 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_FastCall; ;} break; case 100: -#line 1255 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1256 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val)) GEN_ERROR("Calling conv too large"); @@ -3992,176 +3993,176 @@ break; case 101: -#line 1262 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1263 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; case 102: -#line 1263 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1264 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; case 103: -#line 1264 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1265 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; case 104: -#line 1265 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1266 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; case 105: -#line 1266 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1267 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::InReg; ;} break; case 106: -#line 1267 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1268 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::StructRet; ;} break; case 107: -#line 1268 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1269 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoAlias; ;} break; case 108: -#line 1269 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1270 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ByVal; ;} break; case 109: -#line 1270 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1271 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::Nest; ;} break; case 110: -#line 1271 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1272 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::constructAlignmentFromInt((yyvsp[(2) - (2)].UInt64Val)); ;} break; case 111: -#line 1275 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1276 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::None; ;} break; case 112: -#line 1276 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1277 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes); ;} break; case 113: -#line 1281 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1282 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::InReg; ;} break; case 114: -#line 1282 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1283 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; case 115: -#line 1283 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1284 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; case 116: -#line 1286 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1287 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::None; ;} break; case 117: -#line 1287 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1288 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes); ;} break; case 118: -#line 1293 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1294 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoReturn; ;} break; case 119: -#line 1294 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1295 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoUnwind; ;} break; case 120: -#line 1295 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1296 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::InReg; ;} break; case 121: -#line 1296 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1297 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ZExt; ;} break; case 122: -#line 1297 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1298 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::SExt; ;} break; case 123: -#line 1298 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1299 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ReadNone; ;} break; case 124: -#line 1299 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1300 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::ReadOnly; ;} break; case 125: -#line 1300 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1301 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::NoInline; ;} break; case 126: -#line 1301 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1302 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::AlwaysInline; ;} break; case 127: -#line 1302 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1303 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::OptimizeForSize; ;} break; case 128: -#line 1305 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1306 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = Attribute::None; ;} break; case 129: -#line 1306 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1307 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Attributes) = (yyvsp[(1) - (2)].Attributes) | (yyvsp[(2) - (2)].Attributes); ;} break; case 130: -#line 1312 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1313 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 131: -#line 1313 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1314 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(2) - (2)].StrVal); ;} break; case 132: -#line 1320 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1321 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; case 133: -#line 1321 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1322 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(2) - (2)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4171,12 +4172,12 @@ break; case 134: -#line 1327 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1328 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; case 135: -#line 1328 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1329 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(3) - (3)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4186,7 +4187,7 @@ break; case 136: -#line 1337 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1338 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { for (unsigned i = 0, e = (yyvsp[(2) - (2)].StrVal)->length(); i != e; ++i) if ((*(yyvsp[(2) - (2)].StrVal))[i] == '"' || (*(yyvsp[(2) - (2)].StrVal))[i] == '\\') @@ -4197,27 +4198,27 @@ break; case 137: -#line 1345 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1346 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 138: -#line 1346 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1347 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (1)].StrVal); ;} break; case 139: -#line 1351 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1352 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; case 140: -#line 1352 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1353 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; case 141: -#line 1353 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1354 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV->setSection(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -4226,7 +4227,7 @@ break; case 142: -#line 1358 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1359 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(2) - (2)].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[(2) - (2)].UInt64Val))) GEN_ERROR("Alignment must be a power of two"); @@ -4236,7 +4237,7 @@ break; case 150: -#line 1374 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1375 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(OpaqueType::get()); CHECK_FOR_ERROR @@ -4244,7 +4245,7 @@ break; case 151: -#line 1378 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1379 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[(1) - (1)].PrimType)); CHECK_FOR_ERROR @@ -4252,7 +4253,7 @@ break; case 152: -#line 1382 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1383 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Pointer type? if (*(yyvsp[(1) - (3)].TypeVal) == Type::LabelTy) GEN_ERROR("Cannot form a pointer to a basic block"); @@ -4263,7 +4264,7 @@ break; case 153: -#line 1389 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1390 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... const Type* tmp = getTypeVal((yyvsp[(1) - (1)].ValIDVal)); CHECK_FOR_ERROR @@ -4272,7 +4273,7 @@ break; case 154: -#line 1394 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1395 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if ((yyvsp[(2) - (2)].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -4284,7 +4285,7 @@ break; case 155: -#line 1402 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1403 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4323,7 +4324,7 @@ break; case 156: -#line 1437 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1438 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4357,7 +4358,7 @@ break; case 157: -#line 1468 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1469 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Sized array type? (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[(4) - (5)].TypeVal), (yyvsp[(2) - (5)].UInt64Val)))); delete (yyvsp[(4) - (5)].TypeVal); @@ -4366,7 +4367,7 @@ break; case 158: -#line 1473 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1474 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Vector type? const llvm::Type* ElemTy = (yyvsp[(4) - (5)].TypeVal)->get(); if ((unsigned)(yyvsp[(2) - (5)].UInt64Val) != (yyvsp[(2) - (5)].UInt64Val)) @@ -4380,7 +4381,7 @@ break; case 159: -#line 1483 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1484 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = (yyvsp[(2) - (3)].TypeList)->begin(), @@ -4394,7 +4395,7 @@ break; case 160: -#line 1493 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1494 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector())); CHECK_FOR_ERROR @@ -4402,7 +4403,7 @@ break; case 161: -#line 1497 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1498 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements; for (std::list::iterator I = (yyvsp[(3) - (5)].TypeList)->begin(), @@ -4416,7 +4417,7 @@ break; case 162: -#line 1507 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1508 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector(), true)); CHECK_FOR_ERROR @@ -4424,7 +4425,7 @@ break; case 163: -#line 1514 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1515 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4434,7 +4435,7 @@ break; case 164: -#line 1523 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1524 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (1)].TypeVal))->getDescription()); @@ -4445,14 +4446,14 @@ break; case 165: -#line 1530 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1531 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(Type::VoidTy); ;} break; case 166: -#line 1535 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1536 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); (yyval.TypeWithAttrsList)->push_back((yyvsp[(1) - (1)].TypeWithAttrs)); @@ -4461,7 +4462,7 @@ break; case 167: -#line 1540 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1541 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList))->push_back((yyvsp[(3) - (3)].TypeWithAttrs)); CHECK_FOR_ERROR @@ -4469,7 +4470,7 @@ break; case 169: -#line 1548 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1549 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList); TypeWithAttrs TWA; TWA.Attrs = Attribute::None; @@ -4480,7 +4481,7 @@ break; case 170: -#line 1555 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1556 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList; TypeWithAttrs TWA; TWA.Attrs = Attribute::None; @@ -4491,7 +4492,7 @@ break; case 171: -#line 1562 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1563 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); CHECK_FOR_ERROR @@ -4499,7 +4500,7 @@ break; case 172: -#line 1570 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1571 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); (yyval.TypeList)->push_back(*(yyvsp[(1) - (1)].TypeVal)); @@ -4509,7 +4510,7 @@ break; case 173: -#line 1576 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1577 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[(1) - (3)].TypeList))->push_back(*(yyvsp[(3) - (3)].TypeVal)); delete (yyvsp[(3) - (3)].TypeVal); @@ -4518,7 +4519,7 @@ break; case 174: -#line 1588 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1589 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4550,7 +4551,7 @@ break; case 175: -#line 1616 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1617 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4570,7 +4571,7 @@ break; case 176: -#line 1632 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1633 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4601,7 +4602,7 @@ break; case 177: -#line 1659 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1660 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4633,7 +4634,7 @@ break; case 178: -#line 1687 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1688 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (4)].TypeVal)->get()); if (STy == 0) @@ -4663,7 +4664,7 @@ break; case 179: -#line 1713 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1714 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4687,7 +4688,7 @@ break; case 180: -#line 1733 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1734 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (6)].TypeVal)->get()); if (STy == 0) @@ -4717,7 +4718,7 @@ break; case 181: -#line 1759 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1760 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (5)].TypeVal))->getDescription()); @@ -4741,7 +4742,7 @@ break; case 182: -#line 1779 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1780 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4757,7 +4758,7 @@ break; case 183: -#line 1791 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1792 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4768,7 +4769,7 @@ break; case 184: -#line 1798 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1799 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4838,7 +4839,7 @@ break; case 185: -#line 1864 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1865 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4852,7 +4853,7 @@ break; case 186: -#line 1874 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1875 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4866,7 +4867,7 @@ break; case 187: -#line 1884 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1885 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { if (!ConstantInt::isValueValidForType(IT, (yyvsp[(2) - (2)].SInt64Val))) @@ -4881,7 +4882,7 @@ break; case 188: -#line 1895 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1896 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > IT->getBitWidth()) @@ -4898,7 +4899,7 @@ break; case 189: -#line 1908 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1909 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { if (!ConstantInt::isValueValidForType(IT, (yyvsp[(2) - (2)].UInt64Val))) @@ -4913,7 +4914,7 @@ break; case 190: -#line 1919 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1920 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants if (IntegerType *IT = dyn_cast((yyvsp[(1) - (2)].TypeVal)->get())) { if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > IT->getBitWidth()) @@ -4931,7 +4932,7 @@ break; case 191: -#line 1933 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1934 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants if ((yyvsp[(1) - (2)].TypeVal)->get() != Type::Int1Ty) GEN_ERROR("Constant true must have type i1"); @@ -4942,7 +4943,7 @@ break; case 192: -#line 1940 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1941 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants if ((yyvsp[(1) - (2)].TypeVal)->get() != Type::Int1Ty) GEN_ERROR("Constant false must have type i1"); @@ -4953,7 +4954,7 @@ break; case 193: -#line 1947 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1948 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Floating point constants if (!ConstantFP::isValueValidForType((yyvsp[(1) - (2)].TypeVal)->get(), *(yyvsp[(2) - (2)].FPVal))) GEN_ERROR("Floating point constant invalid for type"); @@ -4973,7 +4974,7 @@ break; case 194: -#line 1965 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1966 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (6)].TypeVal))->getDescription()); @@ -4989,7 +4990,7 @@ break; case 195: -#line 1977 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1978 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (5)].ConstVal)->getType())) GEN_ERROR("GetElementPtr requires a pointer operand"); @@ -5014,7 +5015,7 @@ break; case 196: -#line 1998 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1999 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (8)].ConstVal)->getType() != Type::Int1Ty) GEN_ERROR("Select condition must be of boolean type"); @@ -5026,7 +5027,7 @@ break; case 197: -#line 2006 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2007 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Binary operator types must match"); @@ -5036,7 +5037,7 @@ break; case 198: -#line 2012 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2013 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Logical operator types must match"); @@ -5051,7 +5052,7 @@ break; case 199: -#line 2023 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2024 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("icmp operand types must match"); @@ -5060,7 +5061,7 @@ break; case 200: -#line 2028 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2029 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("fcmp operand types must match"); @@ -5069,7 +5070,7 @@ break; case 201: -#line 2033 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2034 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vicmp operand types must match"); @@ -5078,7 +5079,7 @@ break; case 202: -#line 2038 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2039 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vfcmp operand types must match"); @@ -5087,7 +5088,7 @@ break; case 203: -#line 2043 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2044 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(3) - (6)].ConstVal), (yyvsp[(5) - (6)].ConstVal))) GEN_ERROR("Invalid extractelement operands"); @@ -5097,7 +5098,7 @@ break; case 204: -#line 2049 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2050 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid insertelement operands"); @@ -5107,7 +5108,7 @@ break; case 205: -#line 2055 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2056 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -5117,7 +5118,7 @@ break; case 206: -#line 2061 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2062 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (5)].ConstVal)->getType()) && !isa((yyvsp[(3) - (5)].ConstVal)->getType())) GEN_ERROR("ExtractValue requires an aggregate operand"); @@ -5129,7 +5130,7 @@ break; case 207: -#line 2069 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2070 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (7)].ConstVal)->getType()) && !isa((yyvsp[(3) - (7)].ConstVal)->getType())) GEN_ERROR("InsertValue requires an aggregate operand"); @@ -5141,7 +5142,7 @@ break; case 208: -#line 2080 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2081 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ConstVector) = (yyvsp[(1) - (3)].ConstVector))->push_back((yyvsp[(3) - (3)].ConstVal)); CHECK_FOR_ERROR @@ -5149,7 +5150,7 @@ break; case 209: -#line 2084 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2085 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector) = new std::vector(); (yyval.ConstVector)->push_back((yyvsp[(1) - (1)].ConstVal)); @@ -5158,27 +5159,27 @@ break; case 210: -#line 2092 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2093 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; case 211: -#line 2092 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2093 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; case 212: -#line 2095 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2096 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; case 213: -#line 2095 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2096 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; case 214: -#line 2098 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2099 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const Type* VTy = (yyvsp[(1) - (2)].TypeVal)->get(); Value *V = getVal(VTy, (yyvsp[(2) - (2)].ValIDVal)); @@ -5194,7 +5195,7 @@ break; case 215: -#line 2110 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2111 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { Constant *Val = (yyvsp[(3) - (6)].ConstVal); const Type *DestTy = (yyvsp[(5) - (6)].TypeVal)->get(); @@ -5210,7 +5211,7 @@ break; case 216: -#line 2131 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2132 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -5219,7 +5220,7 @@ break; case 217: -#line 2136 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2137 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -5228,12 +5229,12 @@ break; case 220: -#line 2149 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2150 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = false; ;} break; case 221: -#line 2149 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2150 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.FunctionDone(); CHECK_FOR_ERROR @@ -5241,26 +5242,26 @@ break; case 222: -#line 2153 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2154 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ;} break; case 223: -#line 2153 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2154 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 224: -#line 2156 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2157 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 225: -#line 2159 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2160 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (3)].TypeVal))->getDescription()); @@ -5288,7 +5289,7 @@ break; case 226: -#line 2183 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2184 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ResolveTypeTo((yyvsp[(1) - (3)].StrVal), (yyvsp[(3) - (3)].PrimType)); @@ -5303,7 +5304,7 @@ break; case 227: -#line 2195 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2196 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { /* "Externally Visible" Linkage */ if ((yyvsp[(5) - (6)].ConstVal) == 0) @@ -5315,14 +5316,14 @@ break; case 228: -#line 2202 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2203 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; case 229: -#line 2206 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2207 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(6) - (7)].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant"); @@ -5332,14 +5333,14 @@ break; case 230: -#line 2211 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2212 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; case 231: -#line 2215 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2216 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(6) - (7)].TypeVal))->getDescription()); @@ -5350,7 +5351,7 @@ break; case 232: -#line 2221 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2222 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR @@ -5358,7 +5359,7 @@ break; case 233: -#line 2225 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2226 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::string Name; if ((yyvsp[(1) - (5)].StrVal)) { @@ -5402,21 +5403,21 @@ break; case 234: -#line 2265 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2266 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 235: -#line 2268 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2269 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 236: -#line 2274 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2275 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); if (AsmSoFar.empty()) @@ -5429,7 +5430,7 @@ break; case 237: -#line 2284 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2285 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5437,7 +5438,7 @@ break; case 238: -#line 2288 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2289 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setDataLayout(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5445,7 +5446,7 @@ break; case 240: -#line 2295 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2296 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5454,7 +5455,7 @@ break; case 241: -#line 2300 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2301 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5463,14 +5464,14 @@ break; case 242: -#line 2305 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2306 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 243: -#line 2314 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2315 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -5484,7 +5485,7 @@ break; case 244: -#line 2324 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2325 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -5498,7 +5499,7 @@ break; case 245: -#line 2335 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2336 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (1)].ArgList); CHECK_FOR_ERROR @@ -5506,7 +5507,7 @@ break; case 246: -#line 2339 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2340 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (3)].ArgList); struct ArgListEntry E; @@ -5519,7 +5520,7 @@ break; case 247: -#line 2348 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2349 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = new ArgListType; struct ArgListEntry E; @@ -5532,7 +5533,7 @@ break; case 248: -#line 2357 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2358 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = 0; CHECK_FOR_ERROR @@ -5540,7 +5541,7 @@ break; case 249: -#line 2363 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2364 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::string FunctionName(*(yyvsp[(4) - (11)].StrVal)); delete (yyvsp[(4) - (11)].StrVal); // Free strdup'd memory! @@ -5691,7 +5692,7 @@ break; case 252: -#line 2513 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2514 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -5703,7 +5704,7 @@ break; case 255: -#line 2524 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2525 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR @@ -5711,7 +5712,7 @@ break; case 256: -#line 2529 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2530 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.CurrentFunction->setLinkage((yyvsp[(1) - (3)].Linkage)); CurFun.CurrentFunction->setVisibility((yyvsp[(2) - (3)].Visibility)); @@ -5722,7 +5723,7 @@ break; case 257: -#line 2541 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2542 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -5730,7 +5731,7 @@ break; case 258: -#line 2545 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2546 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -5738,7 +5739,7 @@ break; case 259: -#line 2550 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2551 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].SInt64Val)); CHECK_FOR_ERROR @@ -5746,7 +5747,7 @@ break; case 260: -#line 2554 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2555 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].UInt64Val)); CHECK_FOR_ERROR @@ -5754,7 +5755,7 @@ break; case 261: -#line 2558 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2559 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants (yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), true); delete (yyvsp[(1) - (1)].APIntVal); @@ -5763,7 +5764,7 @@ break; case 262: -#line 2563 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2564 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants (yyval.ValIDVal) = ValID::create(*(yyvsp[(1) - (1)].APIntVal), false); delete (yyvsp[(1) - (1)].APIntVal); @@ -5772,7 +5773,7 @@ break; case 263: -#line 2568 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2569 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].FPVal)); CHECK_FOR_ERROR @@ -5780,7 +5781,7 @@ break; case 264: -#line 2572 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2573 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getTrue()); CHECK_FOR_ERROR @@ -5788,7 +5789,7 @@ break; case 265: -#line 2576 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2577 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getFalse()); CHECK_FOR_ERROR @@ -5796,7 +5797,7 @@ break; case 266: -#line 2580 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2581 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createNull(); CHECK_FOR_ERROR @@ -5804,7 +5805,7 @@ break; case 267: -#line 2584 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2585 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createUndef(); CHECK_FOR_ERROR @@ -5812,7 +5813,7 @@ break; case 268: -#line 2588 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2589 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // A vector zero constant. (yyval.ValIDVal) = ValID::createZeroInit(); CHECK_FOR_ERROR @@ -5820,7 +5821,7 @@ break; case 269: -#line 2592 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2593 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType(); unsigned NumElements = (yyvsp[(2) - (3)].ConstVector)->size(); @@ -5846,7 +5847,7 @@ break; case 270: -#line 2614 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2615 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType(); uint64_t NumElements = (yyvsp[(2) - (3)].ConstVector)->size(); @@ -5872,7 +5873,7 @@ break; case 271: -#line 2636 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2637 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Use undef instead of an array because it's inconvenient to determine // the element type at this point, there being no elements to examine. @@ -5882,7 +5883,7 @@ break; case 272: -#line 2642 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2643 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { uint64_t NumElements = (yyvsp[(2) - (2)].StrVal)->length(); const Type *ETy = Type::Int8Ty; @@ -5899,7 +5900,7 @@ break; case 273: -#line 2655 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2656 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements((yyvsp[(2) - (3)].ConstVector)->size()); for (unsigned i = 0, e = (yyvsp[(2) - (3)].ConstVector)->size(); i != e; ++i) @@ -5915,7 +5916,7 @@ break; case 274: -#line 2667 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2668 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = StructType::get(std::vector()); (yyval.ValIDVal) = ValID::create(ConstantStruct::get(STy, std::vector())); @@ -5924,7 +5925,7 @@ break; case 275: -#line 2672 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2673 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements((yyvsp[(3) - (5)].ConstVector)->size()); for (unsigned i = 0, e = (yyvsp[(3) - (5)].ConstVector)->size(); i != e; ++i) @@ -5940,7 +5941,7 @@ break; case 276: -#line 2684 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2685 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = StructType::get(std::vector(), /*isPacked=*/true); @@ -5950,7 +5951,7 @@ break; case 277: -#line 2690 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2691 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].ConstVal)); CHECK_FOR_ERROR @@ -5958,7 +5959,7 @@ break; case 278: -#line 2694 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2695 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createInlineAsm(*(yyvsp[(3) - (5)].StrVal), *(yyvsp[(5) - (5)].StrVal), (yyvsp[(2) - (5)].BoolVal)); delete (yyvsp[(3) - (5)].StrVal); @@ -5968,7 +5969,7 @@ break; case 279: -#line 2704 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2705 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? (yyval.ValIDVal) = ValID::createLocalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR @@ -5976,7 +5977,7 @@ break; case 280: -#line 2708 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2709 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createGlobalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR @@ -5984,7 +5985,7 @@ break; case 281: -#line 2712 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2713 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5993,7 +5994,7 @@ break; case 282: -#line 2717 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2718 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createGlobalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -6002,7 +6003,7 @@ break; case 285: -#line 2730 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2731 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -6013,7 +6014,7 @@ break; case 286: -#line 2739 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2740 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); (yyval.ValueList)->push_back((yyvsp[(1) - (1)].ValueVal)); @@ -6022,7 +6023,7 @@ break; case 287: -#line 2744 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2745 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ValueList)=(yyvsp[(1) - (3)].ValueList))->push_back((yyvsp[(3) - (3)].ValueVal)); CHECK_FOR_ERROR @@ -6030,7 +6031,7 @@ break; case 288: -#line 2749 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2750 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR @@ -6038,7 +6039,7 @@ break; case 289: -#line 2753 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2754 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR @@ -6046,7 +6047,7 @@ break; case 290: -#line 2762 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2763 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { setValueName((yyvsp[(3) - (3)].TermInstVal), (yyvsp[(2) - (3)].StrVal)); CHECK_FOR_ERROR @@ -6058,7 +6059,7 @@ break; case 291: -#line 2771 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2772 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR int ValNum = InsertValue((yyvsp[(3) - (3)].TermInstVal)); @@ -6073,7 +6074,7 @@ break; case 292: -#line 2784 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2785 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (CastInst *CI1 = dyn_cast((yyvsp[(2) - (2)].InstVal))) if (CastInst *CI2 = dyn_cast(CI1->getOperand(0))) @@ -6086,7 +6087,7 @@ break; case 293: -#line 2793 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2794 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty space between instruction lists (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalID(CurFun.NextValNum)); CHECK_FOR_ERROR @@ -6094,7 +6095,7 @@ break; case 294: -#line 2797 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2798 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Labelled (named) basic block (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal))); delete (yyvsp[(1) - (1)].StrVal); @@ -6104,7 +6105,7 @@ break; case 295: -#line 2805 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2806 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with a result... ValueList &VL = *(yyvsp[(2) - (2)].ValueList); assert(!VL.empty() && "Invalid ret operands!"); @@ -6128,7 +6129,7 @@ break; case 296: -#line 2825 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2826 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with no result... (yyval.TermInstVal) = ReturnInst::Create(); CHECK_FOR_ERROR @@ -6136,7 +6137,7 @@ break; case 297: -#line 2829 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2830 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[(3) - (3)].ValIDVal)); CHECK_FOR_ERROR @@ -6145,7 +6146,7 @@ break; case 298: -#line 2834 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2835 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (cast((yyvsp[(2) - (9)].PrimType))->getBitWidth() != 1) GEN_ERROR("Branch condition must have type i1"); @@ -6160,7 +6161,7 @@ break; case 299: -#line 2845 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2846 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (9)].PrimType), (yyvsp[(3) - (9)].ValIDVal)); CHECK_FOR_ERROR @@ -6183,7 +6184,7 @@ break; case 300: -#line 2864 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2865 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (8)].PrimType), (yyvsp[(3) - (8)].ValIDVal)); CHECK_FOR_ERROR @@ -6196,7 +6197,7 @@ break; case 301: -#line 2874 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2875 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -6303,7 +6304,7 @@ break; case 302: -#line 2977 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2978 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnwindInst(); CHECK_FOR_ERROR @@ -6311,7 +6312,7 @@ break; case 303: -#line 2981 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2982 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnreachableInst(); CHECK_FOR_ERROR @@ -6319,7 +6320,7 @@ break; case 304: -#line 2988 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2989 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = (yyvsp[(1) - (6)].JumpTable); Constant *V = cast(getExistingVal((yyvsp[(2) - (6)].PrimType), (yyvsp[(3) - (6)].ValIDVal))); @@ -6334,7 +6335,7 @@ break; case 305: -#line 2999 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3000 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = new std::vector >(); Constant *V = cast(getExistingVal((yyvsp[(1) - (5)].PrimType), (yyvsp[(2) - (5)].ValIDVal))); @@ -6350,7 +6351,7 @@ break; case 306: -#line 3012 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3013 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName((yyvsp[(2) - (2)].InstVal), (yyvsp[(1) - (2)].StrVal)); @@ -6362,7 +6363,7 @@ break; case 307: -#line 3021 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3022 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR int ValNum = InsertValue((yyvsp[(2) - (2)].InstVal)); @@ -6377,7 +6378,7 @@ break; case 308: -#line 3034 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3035 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (6)].TypeVal))->getDescription()); @@ -6392,7 +6393,7 @@ break; case 309: -#line 3045 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3046 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.PHIList) = (yyvsp[(1) - (7)].PHIList); Value* tmpVal = getVal((yyvsp[(1) - (7)].PHIList)->front().first->getType(), (yyvsp[(4) - (7)].ValIDVal)); @@ -6404,7 +6405,7 @@ break; case 310: -#line 3055 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3056 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -6419,7 +6420,7 @@ break; case 311: -#line 3066 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3067 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 // Labels are only valid in ASMs @@ -6431,7 +6432,7 @@ break; case 312: -#line 3074 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3075 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -6445,7 +6446,7 @@ break; case 313: -#line 3084 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3085 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptAttributes in LLVM 3.0, it was a mistake in 2.0 (yyval.ParamList) = (yyvsp[(1) - (6)].ParamList); @@ -6456,17 +6457,17 @@ break; case 314: -#line 3091 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3092 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamList) = new ParamList(); ;} break; case 315: -#line 3094 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3095 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); ;} break; case 316: -#line 3095 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3096 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[(1) - (3)].ValueList); (yyval.ValueList)->push_back((yyvsp[(3) - (3)].ValueVal)); @@ -6475,7 +6476,7 @@ break; case 317: -#line 3103 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3104 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstantList) = new std::vector(); if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val)) @@ -6485,7 +6486,7 @@ break; case 318: -#line 3109 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3110 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstantList) = (yyvsp[(1) - (3)].ConstantList); if ((unsigned)(yyvsp[(3) - (3)].UInt64Val) != (yyvsp[(3) - (3)].UInt64Val)) @@ -6496,7 +6497,7 @@ break; case 319: -#line 3118 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3119 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -6504,7 +6505,7 @@ break; case 320: -#line 3122 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3123 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -6512,7 +6513,7 @@ break; case 321: -#line 3127 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3128 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6532,7 +6533,7 @@ break; case 322: -#line 3143 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3144 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6553,7 +6554,7 @@ break; case 323: -#line 3160 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3161 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6569,7 +6570,7 @@ break; case 324: -#line 3172 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3173 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6585,7 +6586,7 @@ break; case 325: -#line 3184 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3185 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6603,7 +6604,7 @@ break; case 326: -#line 3198 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3199 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6621,7 +6622,7 @@ break; case 327: -#line 3212 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3213 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6637,7 +6638,7 @@ break; case 328: -#line 3224 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3225 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (isa((yyvsp[(2) - (6)].ValueVal)->getType())) { // vector select @@ -6662,7 +6663,7 @@ break; case 329: -#line 3245 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3246 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6673,7 +6674,7 @@ break; case 330: -#line 3252 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3253 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(2) - (4)].ValueVal), (yyvsp[(4) - (4)].ValueVal))) GEN_ERROR("Invalid extractelement operands"); @@ -6683,7 +6684,7 @@ break; case 331: -#line 3258 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3259 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid insertelement operands"); @@ -6693,7 +6694,7 @@ break; case 332: -#line 3264 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3265 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -6703,7 +6704,7 @@ break; case 333: -#line 3270 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3271 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[(2) - (2)].PHIList)->front().first->getType(); if (!Ty->isFirstClassType()) @@ -6722,7 +6723,7 @@ break; case 334: -#line 3286 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3287 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -6835,7 +6836,7 @@ break; case 335: -#line 3395 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3396 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = (yyvsp[(1) - (1)].InstVal); CHECK_FOR_ERROR @@ -6843,7 +6844,7 @@ break; case 336: -#line 3400 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3401 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -6851,7 +6852,7 @@ break; case 337: -#line 3404 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3405 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -6859,7 +6860,7 @@ break; case 338: -#line 3411 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3412 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6870,7 +6871,7 @@ break; case 339: -#line 3418 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3419 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6884,7 +6885,7 @@ break; case 340: -#line 3428 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3429 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6895,7 +6896,7 @@ break; case 341: -#line 3435 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3436 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6909,7 +6910,7 @@ break; case 342: -#line 3445 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3446 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(2) - (2)].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + @@ -6920,7 +6921,7 @@ break; case 343: -#line 3453 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3454 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -6938,7 +6939,7 @@ break; case 344: -#line 3467 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3468 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (7)].TypeVal))->getDescription()); @@ -6959,7 +6960,7 @@ break; case 345: -#line 3484 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3485 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6977,7 +6978,7 @@ break; case 346: -#line 3498 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3499 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()); @@ -6996,7 +6997,7 @@ break; case 347: -#line 3513 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3514 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()); @@ -7015,7 +7016,7 @@ break; case 348: -#line 3528 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3529 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (7)].TypeVal))->getDescription()); @@ -7037,7 +7038,7 @@ /* Line 1267 of yacc.c. */ -#line 7041 "llvmAsmParser.tab.c" +#line 7042 "llvmAsmParser.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -7251,7 +7252,7 @@ } -#line 3547 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3548 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" // common code from the two 'RunVMAsmParser' functions Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs?rev=57577&r1=57576&r2=57577&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs Wed Oct 15 07:05:02 2008 @@ -360,7 +360,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 980 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" +#line 981 "/cvs/llvm/lib/AsmParser/llvmAsmParser.y" { llvm::Module *ModuleVal; llvm::Function *FunctionVal; Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs?rev=57577&r1=57576&r2=57577&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Wed Oct 15 07:05:02 2008 @@ -140,6 +140,7 @@ GlobalValue *Ret = 0; if (I != GlobalRefs.end()) { Ret = I->second; + I->first.second.destroy(); GlobalRefs.erase(I); } return Ret; From asl at math.spbu.ru Wed Oct 15 09:22:08 2008 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Wed, 15 Oct 2008 14:22:08 -0000 Subject: [llvm-commits] [llvm] r57578 - in /llvm/trunk/tools/llvmc2: Makefile plugins/Base/PluginMain.cpp plugins/Clang/PluginMain.cpp plugins/Makefile plugins/Simple/Makefile plugins/Simple/PluginMain.cpp plugins/Simple/Simple.td Message-ID: <200810151422.m9FEM848006272@zion.cs.uiuc.edu> Author: asl Date: Wed Oct 15 09:22:06 2008 New Revision: 57578 URL: http://llvm.org/viewvc/llvm-project?rev=57578&view=rev Log: Temporary revert r57567 and unbreak the build. Removed: llvm/trunk/tools/llvmc2/plugins/Base/PluginMain.cpp llvm/trunk/tools/llvmc2/plugins/Clang/PluginMain.cpp llvm/trunk/tools/llvmc2/plugins/Simple/Makefile llvm/trunk/tools/llvmc2/plugins/Simple/PluginMain.cpp llvm/trunk/tools/llvmc2/plugins/Simple/Simple.td Modified: llvm/trunk/tools/llvmc2/Makefile llvm/trunk/tools/llvmc2/plugins/Makefile Modified: llvm/trunk/tools/llvmc2/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/Makefile?rev=57578&r1=57577&r2=57578&view=diff ============================================================================== --- llvm/trunk/tools/llvmc2/Makefile (original) +++ llvm/trunk/tools/llvmc2/Makefile Wed Oct 15 09:22:06 2008 @@ -11,7 +11,7 @@ BUILTIN_PLUGINS = Base DRIVER_NAME = llvmc2 -DIRS = plugins driver +DIRS = plugins driver export BUILTIN_PLUGINS export DRIVER_NAME Removed: llvm/trunk/tools/llvmc2/plugins/Base/PluginMain.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Base/PluginMain.cpp?rev=57577&view=auto ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Base/PluginMain.cpp (original) +++ llvm/trunk/tools/llvmc2/plugins/Base/PluginMain.cpp (removed) @@ -1 +0,0 @@ -#include "AutoGenerated.inc" Removed: llvm/trunk/tools/llvmc2/plugins/Clang/PluginMain.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Clang/PluginMain.cpp?rev=57577&view=auto ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Clang/PluginMain.cpp (original) +++ llvm/trunk/tools/llvmc2/plugins/Clang/PluginMain.cpp (removed) @@ -1 +0,0 @@ -#include "AutoGenerated.inc" Modified: llvm/trunk/tools/llvmc2/plugins/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Makefile?rev=57578&r1=57577&r2=57578&view=diff ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Makefile (original) +++ llvm/trunk/tools/llvmc2/plugins/Makefile Wed Oct 15 09:22:06 2008 @@ -12,7 +12,7 @@ LEVEL = ../../.. DIRS = $(BUILTIN_PLUGINS) -# TOFIX: How to build DSO versions of plugins? +# TOFIX: DSO versions of plugins are not built export BUILTIN_LLVMC_PLUGIN=1 @@ -22,28 +22,25 @@ LEVEL = ../../../.. -LIBRARYNAME := $(patsubst %,LLVMC%,$(LLVMC_PLUGIN)) +LIBRARYNAME = $(patsubst %,LLVMC%,$(LLVMC_PLUGIN)) +TOOLS_SOURCE = $(wildcard $(PROJ_SRC_DIR)/*.td) REQUIRES_EH = 1 ifndef BUILTIN_LLVMC_PLUGIN LOADABLE_MODULE = 1 endif -# This probably breaks the build with $ObjDir != $SrcDir -TOOLS_SOURCE := $(strip $(wildcard *.td)) - -ifneq ($(TOOLS_SOURCE),) -BUILD_AUTOGENERATED_INC = 1 +ifneq ($(TOOLS_SOURCE),"") +BUILD_AUTOGENERATED_INC=1 BUILT_SOURCES = AutoGenerated.inc endif include $(LEVEL)/Makefile.common -# TOFIX: This probably should go into Makefile.rules +# TOFIX: This should go into Makefile.rules ifdef BUILD_AUTOGENERATED_INC -TD_COMMON :=$(strip $(wildcard \ - $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td)) +TD_COMMON = $(wildcard $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td) $(ObjDir)/AutoGenerated.inc.tmp: $(TOOLS_SOURCE) $(ObjDir)/.dir \ $(TBLGEN) $(TD_COMMON) Removed: llvm/trunk/tools/llvmc2/plugins/Simple/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Simple/Makefile?rev=57577&view=auto ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Simple/Makefile (original) +++ llvm/trunk/tools/llvmc2/plugins/Simple/Makefile (removed) @@ -1,12 +0,0 @@ -##===- tools/llvmc2/plugins/Simple/Makefile ------------------*- Makefile -*-===## -# -# The LLVM Compiler Infrastructure -# -# This file is distributed under the University of Illinois Open Source -# License. See LICENSE.TXT for details. -# -##===----------------------------------------------------------------------===## - -LLVMC_PLUGIN = Simple - -include ../Makefile Removed: llvm/trunk/tools/llvmc2/plugins/Simple/PluginMain.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Simple/PluginMain.cpp?rev=57577&view=auto ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Simple/PluginMain.cpp (original) +++ llvm/trunk/tools/llvmc2/plugins/Simple/PluginMain.cpp (removed) @@ -1 +0,0 @@ -#include "AutoGenerated.inc" Removed: llvm/trunk/tools/llvmc2/plugins/Simple/Simple.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Simple/Simple.td?rev=57577&view=auto ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Simple/Simple.td (original) +++ llvm/trunk/tools/llvmc2/plugins/Simple/Simple.td (removed) @@ -1,30 +0,0 @@ -// A simple wrapper for gcc. -// To compile, use this command: -// -// $ cd $LLVMC2_DIR -// $ make DRIVER_NAME=mygcc BUILTIN_PLUGINS=Simple -// -// To build this plugin as a dynamic library: -// -// $ cd $LLVMC2_DIR -// $ make BUILTIN_PLUGINS="" -// $ cd plugins/Simple -// $ make -// -// Run as: -// -// $ llvmc2 -load $LLVM_DIR/Release/lib/LLVMCSimple.so - -include "llvm/CompilerDriver/Common.td" - -def gcc : Tool< -[(in_language "c"), - (out_language "executable"), - (output_suffix "out"), - (cmd_line "gcc $INFILE -o $OUTFILE"), - (sink) -]>; - -def LanguageMap : LanguageMap<[LangToSuffixes<"c", ["c"]>]>; - -def CompilationGraph : CompilationGraph<[Edge]>; From sabre at nondot.org Tue Oct 14 01:02:29 2008 From: sabre at nondot.org (Chris Lattner) Date: Tue, 14 Oct 2008 06:02:29 -0000 Subject: [llvm-commits] [llvm] r57478 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810140602.m9E62ToW015837@zion.cs.uiuc.edu> Author: lattner Date: Tue Oct 14 01:02:29 2008 New Revision: 57478 URL: http://llvm.org/viewvc/llvm-project?rev=57478&view=rev Log: add LSR and frameaddress info. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57478&r1=57477&r2=57478&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Oct 14 01:02:29 2008 @@ -112,22 +112,22 @@

                                                                          The Clang project also includes an early stage static source code analysis tool for automatically finding bugs in C and Objective-C programs. The tool performs a growing set -of checks to find bugs that occur on a specific path within a program. Examples +of checks to find bugs that occur on a specific path within a program. Examples of bugs the tool finds include logic errors such as null dereferences, violations of various API rules, dead code, and potential memory leaks in -Objective-C programs. Since its public announcement at Apple's WWDC 2008 -conference, the public feedback on the tool has been extremely positive, and -conservative estimates put the number of real bugs it has found in -industrial-quality software on the order of thousands.

                                                                          +Objective-C programs. Since its inception, public feedback on the tool has been +extremely positive, and conservative estimates put the number of real bugs it +has found in industrial-quality software on the order of thousands.

                                                                          The tool also provides a simple web GUI to inspect potential bugs found by -the tool. While still early in development, the GUI illustrates some of the key +the tool. While still early in development, the GUI illustrates some of the key features of Clang: accurate source location information, which is used by the GUI to highlight specific code expressions that relate to a bug (including those that span multiple lines) and built-in knowledge of macros, which is used to perform inline expansion of macros within the GUI itself.

                                                                          -

                                                                          The set of checks perform by the static analyzer is gradually expanding, and +

                                                                          The set of checks performed by the static analyzer is gradually expanding, +and future plans for the tool include full source-level inter-procedural analysis and deeper checks such as buffer overrun detection. There are many opportunities to extend and enhance the static analyzer, and anyone interested in working on @@ -319,6 +319,11 @@ mechanics of worklist processing, liveness tracking, handling PHI nodes, etc.

                                                                        • +
                                                                        • The Loop Strength Reduction and induction variable optimization passes have +several improvements to avoid inserting MAX expressions, to optimize simple +floating point induction variables and to analyze trip counts of more +loops.
                                                                        • +
                                                                        • Various helper functions (ComputeMaskedBits, ComputeNumSignBits, etc) were pulled out of the Instruction Combining pass and put into a new ValueTracking.h header, where they can be reused by other passes.
                                                                        • @@ -396,6 +401,8 @@
                                                                          • Exception handling is supported by default on Linux/x86-64.
                                                                          • Position Independent Code (PIC) is now supported on Linux/x86-64.
                                                                          • +
                                                                          • @llvm.frameaddress now supports getting the frame address of stack frames + > 0 on x86/x86-64.
                                                                          • MIPS floating point support? [BRUNO]
                                                                          • The PowerPC backend now supports trampolines.
                                                                          From sabre at nondot.org Tue Oct 14 01:37:11 2008 From: sabre at nondot.org (Chris Lattner) Date: Tue, 14 Oct 2008 06:37:11 -0000 Subject: [llvm-commits] [llvm] r57480 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810140637.m9E6bBgQ017036@zion.cs.uiuc.edu> Author: lattner Date: Tue Oct 14 01:37:11 2008 New Revision: 57480 URL: http://llvm.org/viewvc/llvm-project?rev=57480&view=rev Log: add some upgrading notes from Pekka. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57480&r1=57479&r2=57480&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Oct 14 01:37:11 2008 @@ -480,6 +480,12 @@
                                                                        • Various header files like "llvm/ADT/iterator" were given a .h suffix. Change your code to #include "llvm/ADT/iterator.h" instead.
                                                                        • +
                                                                        • In the code generator, many MachineOperand predicates were renamed to be + shorter (e.g. isFrameIndex() -> isFI()), + SDOperand was renamed to SDValue (and the "Val" + member was changed to be the getNode() accessor), and the + MVT::ValueType enum has been replaced with an "MVT" + struct.
                                                                        From sabre at nondot.org Tue Oct 14 01:56:04 2008 From: sabre at nondot.org (Chris Lattner) Date: Tue, 14 Oct 2008 06:56:04 -0000 Subject: [llvm-commits] [llvm] r57481 - /llvm/trunk/test/FrontendC/2008-10-13-FrontendCrash.c Message-ID: <200810140656.m9E6u5Hp017777@zion.cs.uiuc.edu> Author: lattner Date: Tue Oct 14 01:56:04 2008 New Revision: 57481 URL: http://llvm.org/viewvc/llvm-project?rev=57481&view=rev Log: new testcase for PR2797 Added: llvm/trunk/test/FrontendC/2008-10-13-FrontendCrash.c Added: llvm/trunk/test/FrontendC/2008-10-13-FrontendCrash.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/2008-10-13-FrontendCrash.c?rev=57481&view=auto ============================================================================== --- llvm/trunk/test/FrontendC/2008-10-13-FrontendCrash.c (added) +++ llvm/trunk/test/FrontendC/2008-10-13-FrontendCrash.c Tue Oct 14 01:56:04 2008 @@ -0,0 +1,9 @@ +// RUN: %llvmgcc %s -S -o - +// PR2797 + +unsigned int +func_48 (signed char p_49) +{ + signed char l_340; + func_44 (1&((1 ^ 1 == (lshift_u_s (1)) != (l_340 < 1)) & 1L)); +} From sabre at nondot.org Tue Oct 14 01:58:18 2008 From: sabre at nondot.org (Chris Lattner) Date: Tue, 14 Oct 2008 06:58:18 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57482 - /llvm-gcc-4.2/trunk/gcc/fold-const.c Message-ID: <200810140658.m9E6wIC2017846@zion.cs.uiuc.edu> Author: lattner Date: Tue Oct 14 01:58:18 2008 New Revision: 57482 URL: http://llvm.org/viewvc/llvm-project?rev=57482&view=rev Log: Fix a broken invariant in fold-const that caused it to infinitely recurse on the testcase in PR2797. It requires that nested folds be already folded on input. It gets this right in most places in fold_binary, but fails in these two places. This makes the code consistent, which fixes the bug. Yay for much head scratching. Testcase here: llvm/FrontendC/2008-10-13-FrontendCrash.c Modified: llvm-gcc-4.2/trunk/gcc/fold-const.c Modified: llvm-gcc-4.2/trunk/gcc/fold-const.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/fold-const.c?rev=57482&r1=57481&r2=57482&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/fold-const.c (original) +++ llvm-gcc-4.2/trunk/gcc/fold-const.c Tue Oct 14 01:58:18 2008 @@ -10571,12 +10571,12 @@ /* bool_var != 1 becomes !bool_var. */ if (TREE_CODE (TREE_TYPE (arg0)) == BOOLEAN_TYPE && integer_onep (arg1) && code == NE_EXPR) - return fold_build1 (TRUTH_NOT_EXPR, type, arg0); + return fold_build1 (TRUTH_NOT_EXPR, type, fold_convert (type, arg0)); /* bool_var == 0 becomes !bool_var. */ if (TREE_CODE (TREE_TYPE (arg0)) == BOOLEAN_TYPE && integer_zerop (arg1) && code == EQ_EXPR) - return fold_build1 (TRUTH_NOT_EXPR, type, arg0); + return fold_build1 (TRUTH_NOT_EXPR, type, fold_convert (type, arg0)); /* ~a != C becomes a != ~C where C is a constant. Likewise for ==. */ if (TREE_CODE (arg0) == BIT_NOT_EXPR From baldrick at free.fr Tue Oct 14 02:06:37 2008 From: baldrick at free.fr (Duncan Sands) Date: Tue, 14 Oct 2008 07:06:37 -0000 Subject: [llvm-commits] [llvm] r57483 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810140706.m9E76bRZ018153@zion.cs.uiuc.edu> Author: baldrick Date: Tue Oct 14 02:06:37 2008 New Revision: 57483 URL: http://llvm.org/viewvc/llvm-project?rev=57483&view=rev Log: Mention the different constant folders that IRBuilder can use. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57483&r1=57482&r2=57483&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Oct 14 02:06:37 2008 @@ -191,7 +191,7 @@ memory values.

                                                                      • LLVM 2.4 also includes an initial port for the PIC16 microprocessor. This -is the LLVM targer that only has support for 8 bit registers, and a number of +is the LLVM target that only has support for 8 bit registers, and a number of other crazy constraints. While the port is still in early development stages, it shows some interesting things you can do with LLVM.

                                                                      • @@ -273,7 +273,13 @@ easier for front-ends to create debug info descriptors, similar to the way that IRBuilder makes it easier to create LLVM IR. -
                                                                      • LLVM now supports "function attributes", which allows us to seperate return +
                                                                      • The IRBuilder class is now parametrized by a class responsible +for constant folding. The default ConstantFolder class does target independent +constant folding. The NoFolder class does no constant folding at all, which is +useful when learning how LLVM works. The TargetFolder class folds the most, +doing target dependent constant folding.
                                                                      • + +
                                                                      • LLVM now supports "function attributes", which allows us to separate return value attributes from function attributes. LLVM now supports attributes on a function itself, a return value, and its parameters. New supported function attributes include noinline/alwaysinline and the "opt-size" flag which says the From nunoplopes at sapo.pt Tue Oct 14 05:04:53 2008 From: nunoplopes at sapo.pt (Nuno Lopes) Date: Tue, 14 Oct 2008 10:04:53 -0000 Subject: [llvm-commits] [llvm] r57484 - /llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Message-ID: <200810141004.m9EA4rpE001713@zion.cs.uiuc.edu> Author: nlopes Date: Tue Oct 14 05:04:52 2008 New Revision: 57484 URL: http://llvm.org/viewvc/llvm-project?rev=57484&view=rev Log: little optimization: reuse getPointerToGlobalIfAvailable(CGV) value in emitGlobals() Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=57484&r1=57483&r2=57484&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Tue Oct 14 05:04:52 2008 @@ -963,7 +963,7 @@ LinkedGlobalsMap[std::make_pair(GV->getName(), GV->getType())]; void *Ptr = getPointerToGlobalIfAvailable(CGV); assert(Ptr && "Canonical global wasn't codegen'd!"); - addGlobalMapping(GV, getPointerToGlobalIfAvailable(CGV)); + addGlobalMapping(GV, Ptr); } } From ggreif at gmail.com Tue Oct 14 06:00:37 2008 From: ggreif at gmail.com (Gabor Greif) Date: Tue, 14 Oct 2008 11:00:37 -0000 Subject: [llvm-commits] [llvm] r57485 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810141100.m9EB0cAv003787@zion.cs.uiuc.edu> Author: ggreif Date: Tue Oct 14 06:00:32 2008 New Revision: 57485 URL: http://llvm.org/viewvc/llvm-project?rev=57485&view=rev Log: typo and formatting tweaks Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57485&r1=57484&r2=57485&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Oct 14 06:00:32 2008 @@ -46,7 +46,7 @@

                                                                        Note that if you are reading this file from a Subversion checkout or the main LLVM web page, this document applies to the next release, not the -current one. To see the release notes for a specific releases, please see the +current one. To see the release notes for a specific release, please see the releases page.

                                                                        @@ -177,7 +177,7 @@
                                                                        • The most visible end-user change in LLVM 2.4 is that it includes many optimizations and changes to make -O0 compile times much faster. You should see -improvements on the order of 30% or more faster than LLVM 2.3. There are many +improvements on the order of 30% (or more) faster than LLVM 2.3. There are many pieces to this change, described in more detail below. The speedups and new components can also be used for JIT compilers that want fast compilation as well.

                                                                        • @@ -188,7 +188,8 @@ structs and arrays as values in a function. This capability is mostly useful for front-end authors, who prefer to treat things like complex numbers, simple tuples, dope vectors, etc as Value*'s instead of as a tuple of Value*'s or as -memory values.

                                                                          +memory values. Bitcode files from LLVM 2.3 will automatically migrate to the +general representation.

                                                                        • LLVM 2.4 also includes an initial port for the PIC16 microprocessor. This is the LLVM target that only has support for 8 bit registers, and a number of @@ -225,7 +226,7 @@

                                                                        • llvm-gcc now supports a C language extension known as "Blocks -. This feature is similar to nested functions and closures, but does not +". This feature is similar to nested functions and closures, but does not require stack trampolines (with most ABIs) and supports returning closures from functions that define them. Note that actually using Blocks requires a small runtime that is not included with llvm-gcc.
                                                                        • @@ -250,7 +251,7 @@

                                                                            -
                                                                          • A major change to the "Use" class landed, which shrank it by 25%. Since +
                                                                          • A major change to the Use class landed, which shrank it by 25%. Since this is a pervasive part of the LLVM, it ended up reducing the memory use of LLVM IR in general by 15% for most programs.
                                                                          • @@ -274,9 +275,9 @@ IRBuilder makes it easier to create LLVM IR.
                                                                          • The IRBuilder class is now parametrized by a class responsible -for constant folding. The default ConstantFolder class does target independent -constant folding. The NoFolder class does no constant folding at all, which is -useful when learning how LLVM works. The TargetFolder class folds the most, +for constant folding. The default ConstantFolder class does target independent +constant folding. The NoFolder class does no constant folding at all, which is +useful when learning how LLVM works. The TargetFolder class folds the most, doing target dependent constant folding.
                                                                          • LLVM now supports "function attributes", which allows us to separate return From ggreif at gmail.com Tue Oct 14 06:31:14 2008 From: ggreif at gmail.com (Gabor Greif) Date: Tue, 14 Oct 2008 11:31:14 -0000 Subject: [llvm-commits] [llvm] r57486 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810141131.m9EBVEuT004875@zion.cs.uiuc.edu> Author: ggreif Date: Tue Oct 14 06:31:14 2008 New Revision: 57486 URL: http://llvm.org/viewvc/llvm-project?rev=57486&view=rev Log: minor corrections, improved formatting Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57486&r1=57485&r2=57486&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Tue Oct 14 06:31:14 2008 @@ -272,7 +272,7 @@
                                                                          • A new DebugInfoBuilder class is available, which makes it much easier for front-ends to create debug info descriptors, similar to the way that -IRBuilder makes it easier to create LLVM IR.
                                                                          • +IRBuilder makes it easier to create LLVM IR.
                                                                          • The IRBuilder class is now parametrized by a class responsible for constant folding. The default ConstantFolder class does target independent @@ -312,11 +312,11 @@
                                                                          • LLVM 2.4 includes a new loop deletion pass (which removes output-free provably-finite loops) and a rewritten Aggressive Dead Code Elimination (ADCE) pass that no longer uses control dependence information. These changes speed up -the optimizer and also prevents it from deleting output-free infinite +the optimizer and also prevent it from deleting output-free infinite loops.
                                                                          • The new AddReadAttrs pass works out which functions are read-only or -read-none (these correspond to 'pure' and 'const' in C) and marks them +read-none (these correspond to 'pure' and 'const' in GCC) and marks them with the appropriate attribute.
                                                                          • LLVM 2.4 now includes a new SparsePropagation framework, which makes it @@ -350,7 +350,7 @@
                                                                            -

                                                                            We put a significant amount of work into the code generator infrastructure, +

                                                                            We have put a significant amount of work into the code generator infrastructure, which allows us to implement more aggressive algorithms and make it run faster:

                                                                            @@ -365,14 +365,14 @@
                                                                          • In addition to the new 'fast' instruction selection path, many existing pieces of the code generator have been optimized in significant ways. SelectionDAG's are now pool allocated and use better algorithms in many - places, the ".s" file printers now use raw_ostream to emit text much faster, + places, the ".s" file printers now use raw_ostream to emit text much faster, etc. The end result of these improvements is that the compiler also takes substantially less time to generate code that is just as good (and often better) than before.
                                                                          • -
                                                                          • Each target has been split to separate the .s file printing logic from the +
                                                                          • Each target has been split to separate the ".s" file printing logic from the rest of the target. This enables JIT compilers that don't link in the - (somewhat large) code and data tables used for printing a .s file.
                                                                          • + (somewhat large) code and data tables used for printing a ".s" file.
                                                                          • The code generator now includes a "stack slot coloring" pass, which packs together individual spilled values into common stack slots. This reduces @@ -477,17 +477,17 @@
                                                                          • The DbgStopPointInst methods getDirectory and getFileName now return Value* instead of strings. These can be converted to strings using llvm::GetConstantStringInfo defined via -"llvm/Analysis/ValueTracking.h".
                                                                          • +"llvm/Analysis/ValueTracking.h".
                                                                          • The APIs to create various instructions have changed from lower case "create" methods to upper case "Create" methods (e.g. BinaryOperator::create). LLVM 2.4 includes both cases, but the lower case ones are removed in mainline, please migrate.
                                                                          • -
                                                                          • Various header files like "llvm/ADT/iterator" were given a .h suffix. - Change your code to #include "llvm/ADT/iterator.h" instead.
                                                                          • +
                                                                          • Various header files like "llvm/ADT/iterator" were given a ".h" suffix. + Change your code to #include "llvm/ADT/iterator.h" instead.
                                                                          • -
                                                                          • In the code generator, many MachineOperand predicates were renamed to be +
                                                                          • In the code generator, many MachineOperand predicates were renamed to be shorter (e.g. isFrameIndex() -> isFI()), SDOperand was renamed to SDValue (and the "Val" member was changed to be the getNode() accessor), and the @@ -560,7 +560,7 @@ href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list.

                                                                              -
                                                                            • The MSIL, IA64, Alpha, SPU, and MIPS backends are experimental.
                                                                            • +
                                                                            • The MSIL, IA64, Alpha, SPU, MIPS, and PIC16 backends are experimental.
                                                                            • The llc "-filetype=asm" (the default) is the only supported value for this option.
                                                                            From clattner at apple.com Wed Oct 15 10:32:49 2008 From: clattner at apple.com (Chris Lattner) Date: Wed, 15 Oct 2008 08:32:49 -0700 Subject: [llvm-commits] [llvm] r57566 - in /llvm/trunk/tools/llvmc2/doc: Makefile img/ img/lines.gif llvm.css In-Reply-To: <200810150927.m9F9RjuJ028482@zion.cs.uiuc.edu> References: <200810150927.m9F9RjuJ028482@zion.cs.uiuc.edu> Message-ID: <368FCDC0-63CF-430E-9149-CD248CE70A79@apple.com> On Oct 15, 2008, at 2:27 AM, Mikhail Glushenkov wrote: > Author: foldr > Date: Wed Oct 15 04:27:44 2008 > New Revision: 57566 > > URL: http://llvm.org/viewvc/llvm-project?rev=57566&view=rev > Log: > Use (a slightly modified) llvm.css for llvmc2 docs. Hi Mikhail, Would it be possible to just use HTML like the rest of the docs in llvm/docs? I'd strongly prefer to keep the documentation consistent, -Chris From sabre at nondot.org Wed Oct 15 11:02:17 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 16:02:17 -0000 Subject: [llvm-commits] [llvm] r57579 - /llvm/trunk/lib/Target/README.txt Message-ID: <200810151602.m9FG2HpQ010044@zion.cs.uiuc.edu> Author: lattner Date: Wed Oct 15 11:02:15 2008 New Revision: 57579 URL: http://llvm.org/viewvc/llvm-project?rev=57579&view=rev Log: move PR1488 into this file. Modified: llvm/trunk/lib/Target/README.txt Modified: llvm/trunk/lib/Target/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/README.txt?rev=57579&r1=57578&r2=57579&view=diff ============================================================================== --- llvm/trunk/lib/Target/README.txt (original) +++ llvm/trunk/lib/Target/README.txt Wed Oct 15 11:02:15 2008 @@ -283,6 +283,39 @@ //===---------------------------------------------------------------------===// +These idioms should be recognized as popcount (see PR1488): + +unsigned countbits_slow(unsigned v) { + unsigned c; + for (c = 0; v; v >>= 1) + c += v & 1; + return c; +} +unsigned countbits_fast(unsigned v){ + unsigned c; + for (c = 0; v; c++) + v &= v - 1; // clear the least significant bit set + return c; +} + +BITBOARD = unsigned long long +int PopCnt(register BITBOARD a) { + register int c=0; + while(a) { + c++; + a &= a - 1; + } + return c; +} +unsigned int popcount(unsigned int input) { + unsigned int count = 0; + for (unsigned int i = 0; i < 4 * 8; i++) + count += (input >> i) & i; + return count; +} + +//===---------------------------------------------------------------------===// + These should turn into single 16-bit (unaligned?) loads on little/big endian processors. From criswell at uiuc.edu Wed Oct 15 11:02:51 2008 From: criswell at uiuc.edu (John Criswell) Date: Wed, 15 Oct 2008 16:02:51 -0000 Subject: [llvm-commits] [poolalloc] r57580 - /poolalloc/trunk/lib/DSA/DataStructure.cpp Message-ID: <200810151602.m9FG2pnZ010092@zion.cs.uiuc.edu> Author: criswell Date: Wed Oct 15 11:02:51 2008 New Revision: 57580 URL: http://llvm.org/viewvc/llvm-project?rev=57580&view=rev Log: Silenced debugging output. Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=57580&r1=57579&r2=57580&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/DataStructure.cpp (original) +++ poolalloc/trunk/lib/DSA/DataStructure.cpp Wed Oct 15 11:02:51 2008 @@ -2136,7 +2136,7 @@ // If this call site is now the same as the previous one, we can delete it // as a duplicate. if (*OldIt == *CI) { - cerr << "Deleteing " << CI->getCallSite().getInstruction() << "\n"; + DOUT << "Deleteing " << CI->getCallSite().getInstruction() << "\n"; Calls.erase(CI); CI = OldIt; ++NumDeleted; From criswell at uiuc.edu Wed Oct 15 11:03:52 2008 From: criswell at uiuc.edu (John Criswell) Date: Wed, 15 Oct 2008 16:03:52 -0000 Subject: [llvm-commits] [poolalloc] r57581 - in /poolalloc/trunk/lib/PoolAllocate: AccessTrace.cpp PASimple.cpp PointerCompress.cpp TransformFunctionBody.cpp Message-ID: <200810151603.m9FG3qeg010163@zion.cs.uiuc.edu> Author: criswell Date: Wed Oct 15 11:03:51 2008 New Revision: 57581 URL: http://llvm.org/viewvc/llvm-project?rev=57581&view=rev Log: Updated to new post LLVM 2.4 API. Modified: poolalloc/trunk/lib/PoolAllocate/AccessTrace.cpp poolalloc/trunk/lib/PoolAllocate/PASimple.cpp poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp Modified: poolalloc/trunk/lib/PoolAllocate/AccessTrace.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/AccessTrace.cpp?rev=57581&r1=57580&r2=57581&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/AccessTrace.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/AccessTrace.cpp Wed Oct 15 11:03:51 2008 @@ -86,10 +86,10 @@ if (Node == 0) return; Value *PD = FI->PoolDescriptors[Node]; - Ptr = CastInst::createPointerCast (Ptr, VoidPtrTy, Ptr->getName(), I); + Ptr = CastInst::CreatePointerCast (Ptr, VoidPtrTy, Ptr->getName(), I); if (PD) - PD = CastInst::createPointerCast (PD, VoidPtrTy, PD->getName(), I); + PD = CastInst::CreatePointerCast (PD, VoidPtrTy, PD->getName(), I); else PD = Constant::getNullValue(VoidPtrTy); Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PASimple.cpp?rev=57581&r1=57580&r2=57581&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Wed Oct 15 11:03:51 2008 @@ -68,7 +68,7 @@ // // Otherwise, insert a cast instruction. // - return CastInst::createZExtOrBitCast (V, Ty, Name, InsertPt); + return CastInst::CreateZExtOrBitCast (V, Ty, Name, InsertPt); } void PoolAllocateSimple::getAnalysisUsage(AnalysisUsage &AU) const { @@ -180,7 +180,7 @@ Value * NumElements = MI->getArraySize(); Value * ElementSize = ConstantInt::get (Type::Int32Ty, TD.getABITypeSize(MI->getAllocatedType())); - AllocSize = BinaryOperator::create (Instruction::Mul, + AllocSize = BinaryOperator::Create (Instruction::Mul, ElementSize, NumElements, "sizetmp", @@ -192,7 +192,7 @@ Value* args[] = {TheGlobalPool, AllocSize}; Instruction* x = CallInst::Create(PoolAlloc, &args[0], &args[2], MI->getName(), ii); - ii->replaceAllUsesWith(CastInst::createPointerCast(x, ii->getType(), "", ii)); + ii->replaceAllUsesWith(CastInst::CreatePointerCast(x, ii->getType(), "", ii)); } else if (CallInst * CI = dyn_cast(ii)) { CallSite CS(CI); Function *CF = CS.getCalledFunction(); @@ -215,7 +215,7 @@ // Ensure the size and pointer arguments are of the correct type if (Size->getType() != Type::Int32Ty) - Size = CastInst::createIntegerCast (Size, + Size = CastInst::CreateIntegerCast (Size, Type::Int32Ty, false, Size->getName(), @@ -223,7 +223,7 @@ static Type *VoidPtrTy = PointerType::getUnqual(Type::Int8Ty); if (OldPtr->getType() != VoidPtrTy) - OldPtr = CastInst::createPointerCast (OldPtr, + OldPtr = CastInst::CreatePointerCast (OldPtr, VoidPtrTy, OldPtr->getName(), InsertPt); @@ -237,7 +237,7 @@ InsertPt); Instruction *Casted = V; if (V->getType() != CI->getType()) - Casted = CastInst::createPointerCast (V, CI->getType(), V->getName(), InsertPt); + Casted = CastInst::CreatePointerCast (V, CI->getType(), V->getName(), InsertPt); // Update def-use info CI->replaceAllUsesWith(Casted); @@ -256,14 +256,14 @@ // Ensure the size and pointer arguments are of the correct type if (Size->getType() != Type::Int32Ty) - Size = CastInst::createIntegerCast (Size, + Size = CastInst::CreateIntegerCast (Size, Type::Int32Ty, false, Size->getName(), InsertPt); if (NumElements->getType() != Type::Int32Ty) - NumElements = CastInst::createIntegerCast (Size, + NumElements = CastInst::CreateIntegerCast (Size, Type::Int32Ty, false, NumElements->getName(), @@ -279,7 +279,7 @@ Instruction *Casted = V; if (V->getType() != CI->getType()) - Casted = CastInst::createPointerCast (V, CI->getType(), V->getName(), InsertPt); + Casted = CastInst::CreatePointerCast (V, CI->getType(), V->getName(), InsertPt); // Update def-use info CI->replaceAllUsesWith(Casted); @@ -298,7 +298,7 @@ // Ensure the size and pointer arguments are of the correct type static Type *VoidPtrTy = PointerType::getUnqual(Type::Int8Ty); if (OldPtr->getType() != VoidPtrTy) - OldPtr = CastInst::createPointerCast (OldPtr, + OldPtr = CastInst::CreatePointerCast (OldPtr, VoidPtrTy, OldPtr->getName(), InsertPt); @@ -312,7 +312,7 @@ InsertPt); Instruction *Casted = V; if (V->getType() != CI->getType()) - Casted = CastInst::createPointerCast (V, CI->getType(), V->getName(), InsertPt); + Casted = CastInst::CreatePointerCast (V, CI->getType(), V->getName(), InsertPt); // Update def-use info CI->replaceAllUsesWith(Casted); Modified: poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp?rev=57581&r1=57580&r2=57581&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PointerCompress.cpp Wed Oct 15 11:03:51 2008 @@ -714,7 +714,7 @@ uint64_t FieldOffs = TD.getStructLayout(cast(NTy)) ->getElementOffset(Field); Constant *FieldOffsCst = ConstantInt::get(SCALARUINTTYPE, FieldOffs); - Val = BinaryOperator::createAdd(Val, FieldOffsCst, + Val = BinaryOperator::CreateAdd(Val, FieldOffsCst, GEPI.getName(), &GEPI); } @@ -730,12 +730,12 @@ // Add Idx*sizeof(NewElementType) to the index. const Type *ElTy = cast(NTy)->getElementType(); if (Idx->getType() != SCALARUINTTYPE) - Idx = CastInst::createSExtOrBitCast(Idx, SCALARUINTTYPE, Idx->getName(), &GEPI); + Idx = CastInst::CreateSExtOrBitCast(Idx, SCALARUINTTYPE, Idx->getName(), &GEPI); Constant *Scale = ConstantInt::get(SCALARUINTTYPE, TD.getABITypeSize(ElTy)); - Idx = BinaryOperator::createMul(Idx, Scale, "fieldidx", &GEPI); - Val = BinaryOperator::createAdd(Val, Idx, GEPI.getName(), &GEPI); + Idx = BinaryOperator::CreateMul(Idx, Scale, "fieldidx", &GEPI); + Val = BinaryOperator::CreateAdd(Val, Idx, GEPI.getName(), &GEPI); } // If this is a one element array type, NTy may not reflect the array. @@ -756,7 +756,7 @@ // type. if (getPoolInfo(&LI)) { Value *NLI = new LoadInst(LI.getOperand(0), LI.getName()+".cp", &LI); - Value *NC = CastInst::createZExtOrBitCast(NLI, SCALARUINTTYPE, NLI->getName(), &LI); + Value *NC = CastInst::CreateZExtOrBitCast(NLI, SCALARUINTTYPE, NLI->getName(), &LI); setTransformedValue(LI, NC); } return; @@ -772,11 +772,11 @@ // Get the pointer to load from. Value* Ops = getTransformedValue(LI.getOperand(0)); if (Ops->getType() == Type::Int16Ty) - Ops = CastInst::createZExtOrBitCast(Ops, Type::Int32Ty, "extend_idx", &LI); + Ops = CastInst::CreateZExtOrBitCast(Ops, Type::Int32Ty, "extend_idx", &LI); Value *SrcPtr = GetElementPtrInst::Create(BasePtr, Ops, LI.getOperand(0)->getName()+".pp", &LI); const Type *DestTy = LoadingCompressedPtr ? MEMUINTTYPE : LI.getType(); - SrcPtr = CastInst::createPointerCast(SrcPtr, PointerType::getUnqual(DestTy), + SrcPtr = CastInst::CreatePointerCast(SrcPtr, PointerType::getUnqual(DestTy), SrcPtr->getName(), &LI); std::string OldName = LI.getName(); LI.setName(""); Value *NewLoad = new LoadInst(SrcPtr, OldName, &LI); @@ -784,7 +784,7 @@ if (LoadingCompressedPtr) { // Convert from MEMUINTTYPE to SCALARUINTTYPE if different. if (MEMUINTTYPE != SCALARUINTTYPE) - NewLoad = CastInst::createZExtOrBitCast(NewLoad, SCALARUINTTYPE, NewLoad->getName(), &LI); + NewLoad = CastInst::CreateZExtOrBitCast(NewLoad, SCALARUINTTYPE, NewLoad->getName(), &LI); setTransformedValue(LI, NewLoad); } else { @@ -803,7 +803,7 @@ // cast the index to a pointer type and store that. if (getPoolInfo(SI.getOperand(0))) { Value *SrcVal = getTransformedValue(SI.getOperand(0)); - SrcVal = CastInst::createPointerCast(SrcVal, SI.getOperand(0)->getType(), + SrcVal = CastInst::CreatePointerCast(SrcVal, SI.getOperand(0)->getType(), SrcVal->getName(), &SI); SI.setOperand(0, SrcVal); } @@ -824,7 +824,7 @@ // If SCALAR type is not the MEM type, reduce it now. if (SrcVal->getType() != MEMUINTTYPE) - SrcVal = CastInst::createZExtOrBitCast(SrcVal, MEMUINTTYPE, SrcVal->getName(), &SI); + SrcVal = CastInst::CreateZExtOrBitCast(SrcVal, MEMUINTTYPE, SrcVal->getName(), &SI); } } else { // FIXME: This assumes that all null pointers are compressed! @@ -837,12 +837,12 @@ // Get the pointer to store to. Value* Ops = getTransformedValue(SI.getOperand(1)); if (Ops->getType() == Type::Int16Ty) - Ops = CastInst::createZExtOrBitCast(Ops, Type::Int32Ty, "extend_idx", &SI); + Ops = CastInst::CreateZExtOrBitCast(Ops, Type::Int32Ty, "extend_idx", &SI); Value *DestPtr = GetElementPtrInst::Create(BasePtr, Ops, SI.getOperand(1)->getName()+".pp", &SI); - DestPtr = CastInst::createPointerCast(DestPtr, + DestPtr = CastInst::CreatePointerCast(DestPtr, PointerType::getUnqual(SrcVal->getType()), DestPtr->getName(), &SI); new StoreInst(SrcVal, DestPtr, &SI); @@ -904,11 +904,11 @@ Value *OldSize = ConstantInt::get(Type::Int32Ty, OldSizeV); Value *NewSize = ConstantInt::get(Type::Int32Ty, PI->getNewSize()); - Size = BinaryOperator::createAdd(Size, + Size = BinaryOperator::CreateAdd(Size, ConstantInt::get(Type::Int32Ty, OldSizeV-1), "roundup", &CI); - Size = BinaryOperator::createUDiv(Size, OldSize, "numnodes", &CI); - Size = BinaryOperator::createMul(Size, NewSize, "newbytes", &CI); + Size = BinaryOperator::CreateUDiv(Size, OldSize, "numnodes", &CI); + Size = BinaryOperator::CreateMul(Size, NewSize, "newbytes", &CI); } Value *Opts[2] = {CI.getOperand(1), Size}; @@ -971,7 +971,7 @@ Value *BasePtr = DestPI->EmitPoolBaseLoad(CI); Value *SrcPtr = GetElementPtrInst::Create(BasePtr, getTransformedValue(CI.getOperand(2)), CI.getOperand(2)->getName()+".pp", &CI); - SrcPtr = CastInst::createPointerCast(SrcPtr, CI.getOperand(2)->getType(), "", &CI); + SrcPtr = CastInst::CreatePointerCast(SrcPtr, CI.getOperand(2)->getType(), "", &CI); CI.setOperand(2, SrcPtr); return; } @@ -980,7 +980,7 @@ Value *BasePtr = DestPI->EmitPoolBaseLoad(CI); Value *SrcPtr = GetElementPtrInst::Create(BasePtr, getTransformedValue(CI.getOperand(1)), CI.getOperand(1)->getName()+".pp", &CI); - SrcPtr = CastInst::createPointerCast(SrcPtr, CI.getOperand(1)->getType(), "", &CI); + SrcPtr = CastInst::CreatePointerCast(SrcPtr, CI.getOperand(1)->getType(), "", &CI); CI.setOperand(1, SrcPtr); return; } @@ -991,7 +991,7 @@ Value *BasePtr = DestPI->EmitPoolBaseLoad(CI); Value *SrcPtr = GetElementPtrInst::Create(BasePtr, getTransformedValue(CI.getOperand(1)), CI.getOperand(1)->getName()+".pp", &CI); - SrcPtr = CastInst::createPointerCast(SrcPtr, CI.getOperand(1)->getType(), "", &CI); + SrcPtr = CastInst::CreatePointerCast(SrcPtr, CI.getOperand(1)->getType(), "", &CI); CI.setOperand(1, SrcPtr); return; } @@ -1003,7 +1003,7 @@ Value *BasePtr = DestPI->EmitPoolBaseLoad(CI); Value *SrcPtr = GetElementPtrInst::Create(BasePtr, getTransformedValue(CI.getOperand(1)), CI.getOperand(1)->getName()+".pp", &CI); - SrcPtr = CastInst::createPointerCast(SrcPtr, CI.getOperand(1)->getType(), "", &CI); + SrcPtr = CastInst::CreatePointerCast(SrcPtr, CI.getOperand(1)->getType(), "", &CI); CI.setOperand(1, SrcPtr); doret = true; } @@ -1011,7 +1011,7 @@ Value *BasePtr = DestPI->EmitPoolBaseLoad(CI); Value *SrcPtr = GetElementPtrInst::Create(BasePtr, getTransformedValue(CI.getOperand(2)), CI.getOperand(2)->getName()+".pp", &CI); - SrcPtr = CastInst::createPointerCast(SrcPtr, CI.getOperand(2)->getType(), "", &CI); + SrcPtr = CastInst::CreatePointerCast(SrcPtr, CI.getOperand(2)->getType(), "", &CI); CI.setOperand(2, SrcPtr); doret = true; } Modified: poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp?rev=57581&r1=57580&r2=57581&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp Wed Oct 15 11:03:51 2008 @@ -155,7 +155,7 @@ std::string Name = I->getName(); I->setName(""); if (Size->getType() != Type::Int32Ty) - Size = CastInst::createIntegerCast(Size, Type::Int32Ty, false, Size->getName(), I); + Size = CastInst::CreateIntegerCast(Size, Type::Int32Ty, false, Size->getName(), I); // Insert a call to poolalloc Value *PH = getPoolHandle(I); @@ -172,7 +172,7 @@ // Cast to the appropriate type if necessary Instruction *Casted = V; if (V->getType() != I->getType()) - Casted = CastInst::createPointerCast(V, I->getType(), V->getName(), I); + Casted = CastInst::CreatePointerCast(V, I->getType(), V->getName(), I); // Update def-use info I->replaceAllUsesWith(Casted); @@ -210,7 +210,7 @@ ConstantInt::get(Type::Int32Ty, TD.getABITypeSize(MI.getAllocatedType())); if (MI.isArrayAllocation()) - AllocSize = BinaryOperator::create(Instruction::Mul, AllocSize, + AllocSize = BinaryOperator::Create(Instruction::Mul, AllocSize, MI.getOperand(0), "sizetmp", &MI); // // NOTE: @@ -239,7 +239,7 @@ Value *Casted = AI; Instruction *aiNext = AI->getNext(); if (AI->getType() != PointerType::getUnqual(Type::Int8Ty)) - Casted = CastInst::createPointerCast(AI, PointerType::getUnqual(Type::Int8Ty), + Casted = CastInst::CreatePointerCast(AI, PointerType::getUnqual(Type::Int8Ty), AI->getName()+".casted",aiNext); Instruction *V = CallInst::Create(PAInfo.PoolRegister, @@ -268,13 +268,13 @@ ConstantInt::get(Type::Int32Ty, TD.getABITypeSize(MI.getAllocatedType())); if (MI.isArrayAllocation()) - AllocSize = BinaryOperator::create(Instruction::Mul, AllocSize, + AllocSize = BinaryOperator::Create(Instruction::Mul, AllocSize, MI.getOperand(0), "sizetmp", &MI); // TransformAllocationInstr(&MI, AllocSize); BasicBlock::iterator InsertPt(MI); ++InsertPt; - Instruction *Casted = CastInst::createPointerCast(&MI, PointerType::getUnqual(Type::Int8Ty), + Instruction *Casted = CastInst::CreatePointerCast(&MI, PointerType::getUnqual(Type::Int8Ty), MI.getName()+".casted", InsertPt); std::vector args; args.push_back (PH); @@ -294,7 +294,7 @@ // Insert a cast and a call to poolfree... Value *Casted = Arg; if (Arg->getType() != PointerType::getUnqual(Type::Int8Ty)) { - Casted = CastInst::createPointerCast(Arg, PointerType::getUnqual(Type::Int8Ty), + Casted = CastInst::CreatePointerCast(Arg, PointerType::getUnqual(Type::Int8Ty), Arg->getName()+".casted", Where); G.getScalarMap()[Casted] = G.getScalarMap()[Arg]; } @@ -333,14 +333,14 @@ Value *V1 = CS.getArgument(0); Value *V2 = CS.getArgument(1); if (V1->getType() != V2->getType()) { - V1 = CastInst::createZExtOrBitCast(V1, useLong ? Type::Int64Ty : Type::Int32Ty, V1->getName(), CS.getInstruction()); - V2 = CastInst::createZExtOrBitCast(V2, useLong ? Type::Int64Ty : Type::Int32Ty, V2->getName(), CS.getInstruction()); + V1 = CastInst::CreateZExtOrBitCast(V1, useLong ? Type::Int64Ty : Type::Int32Ty, V1->getName(), CS.getInstruction()); + V2 = CastInst::CreateZExtOrBitCast(V2, useLong ? Type::Int64Ty : Type::Int32Ty, V2->getName(), CS.getInstruction()); } - V2 = BinaryOperator::create(Instruction::Mul, V1, V2, "size", + V2 = BinaryOperator::Create(Instruction::Mul, V1, V2, "size", CS.getInstruction()); if (V2->getType() != (useLong ? Type::Int64Ty : Type::Int32Ty)) - V2 = CastInst::createZExtOrBitCast(V2, useLong ? Type::Int64Ty : Type::Int32Ty, V2->getName(), CS.getInstruction()); + V2 = CastInst::CreateZExtOrBitCast(V2, useLong ? Type::Int64Ty : Type::Int32Ty, V2->getName(), CS.getInstruction()); BasicBlock::iterator BBI = TransformAllocationInstr(CS.getInstruction(), V2); @@ -355,7 +355,7 @@ Type::Int32Ty, NULL); if (Ptr->getType() != PointerType::getUnqual(Type::Int8Ty)) - Ptr = CastInst::createPointerCast(Ptr, PointerType::getUnqual(Type::Int8Ty), Ptr->getName(), + Ptr = CastInst::CreatePointerCast(Ptr, PointerType::getUnqual(Type::Int8Ty), Ptr->getName(), BBI); // We know that the memory returned by poolalloc is at least 4 byte aligned. @@ -376,18 +376,18 @@ if (PH == 0 || isa(PH)) return; if (Size->getType() != Type::Int32Ty) - Size = CastInst::createIntegerCast(Size, Type::Int32Ty, false, Size->getName(), I); + Size = CastInst::CreateIntegerCast(Size, Type::Int32Ty, false, Size->getName(), I); static Type *VoidPtrTy = PointerType::getUnqual(Type::Int8Ty); if (OldPtr->getType() != VoidPtrTy) - OldPtr = CastInst::createPointerCast(OldPtr, VoidPtrTy, OldPtr->getName(), I); + OldPtr = CastInst::CreatePointerCast(OldPtr, VoidPtrTy, OldPtr->getName(), I); std::string Name = I->getName(); I->setName(""); Value* Opts[3] = {PH, OldPtr, Size}; Instruction *V = CallInst::Create(PAInfo.PoolRealloc, Opts, Opts + 3, Name, I); Instruction *Casted = V; if (V->getType() != I->getType()) - Casted = CastInst::createPointerCast(V, I->getType(), V->getName(), I); + Casted = CastInst::CreatePointerCast(V, I->getType(), V->getName(), I); // Update def-use info I->replaceAllUsesWith(Casted); @@ -442,13 +442,13 @@ static const Type *PtrPtr=PointerType::getUnqual(PointerType::getUnqual(Type::Int8Ty)); if (ResultDest->getType() != PtrPtr) - ResultDest = CastInst::createPointerCast(ResultDest, PtrPtr, ResultDest->getName(), I); + ResultDest = CastInst::CreatePointerCast(ResultDest, PtrPtr, ResultDest->getName(), I); } if (Align->getType() != Type::Int32Ty) - Align = CastInst::createIntegerCast(Align, Type::Int32Ty, false, Align->getName(), I); + Align = CastInst::CreateIntegerCast(Align, Type::Int32Ty, false, Align->getName(), I); if (Size->getType() != Type::Int32Ty) - Size = CastInst::createIntegerCast(Size, Type::Int32Ty, false, Size->getName(), I); + Size = CastInst::CreateIntegerCast(Size, Type::Int32Ty, false, Size->getName(), I); std::string Name = I->getName(); I->setName(""); Value* Opts[3] = {PH, Align, Size}; @@ -456,7 +456,7 @@ Instruction *Casted = V; if (V->getType() != I->getType()) - Casted = CastInst::createPointerCast(V, I->getType(), V->getName(), I); + Casted = CastInst::CreatePointerCast(V, I->getType(), V->getName(), I); if (ResultDest) new StoreInst(V, ResultDest, I); @@ -503,14 +503,14 @@ static Type *VoidPtrTy = PointerType::getUnqual(Type::Int8Ty); if (OldPtr->getType() != VoidPtrTy) - OldPtr = CastInst::createPointerCast(OldPtr, VoidPtrTy, OldPtr->getName(), I); + OldPtr = CastInst::CreatePointerCast(OldPtr, VoidPtrTy, OldPtr->getName(), I); std::string Name = I->getName(); I->setName(""); Value* Opts[3] = {PH, OldPtr, 0}; Instruction *V = CallInst::Create(PAInfo.PoolStrdup, Opts, Opts + 2, Name, I); Instruction *Casted = V; if (V->getType() != I->getType()) - Casted = CastInst::createPointerCast(V, I->getType(), V->getName(), I); + Casted = CastInst::CreatePointerCast(V, I->getType(), V->getName(), I); // Update def-use info I->replaceAllUsesWith(Casted); @@ -649,7 +649,7 @@ PointerType *PFTy = PointerType::getUnqual(FTy); // If there are any pool arguments cast the func ptr to the right type. - NewCallee = CastInst::createPointerCast(CS.getCalledValue(), PFTy, "tmp", TheCall); + NewCallee = CastInst::CreatePointerCast(CS.getCalledValue(), PFTy, "tmp", TheCall); } Function::const_arg_iterator FAI = CF->arg_begin(), E = CF->arg_end(); From sabre at nondot.org Wed Oct 15 11:06:03 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 16:06:03 -0000 Subject: [llvm-commits] [llvm] r57582 - /llvm/trunk/lib/Target/README.txt Message-ID: <200810151606.m9FG64PM010333@zion.cs.uiuc.edu> Author: lattner Date: Wed Oct 15 11:06:03 2008 New Revision: 57582 URL: http://llvm.org/viewvc/llvm-project?rev=57582&view=rev Log: move PR1604 here. Modified: llvm/trunk/lib/Target/README.txt Modified: llvm/trunk/lib/Target/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/README.txt?rev=57582&r1=57581&r2=57582&view=diff ============================================================================== --- llvm/trunk/lib/Target/README.txt (original) +++ llvm/trunk/lib/Target/README.txt Wed Oct 15 11:06:03 2008 @@ -954,3 +954,20 @@ //===---------------------------------------------------------------------===// +Better mod/ref analysis for scanf would allow us to eliminate the vtable and a +bunch of other stuff from this example (see PR1604): + +#include +struct test { + int val; + virtual ~test() {} +}; + +int main() { + test t; + std::scanf("%d", &t.val); + std::printf("%d\n", t.val); +} + +//===---------------------------------------------------------------------===// + From isanbard at gmail.com Wed Oct 15 11:20:13 2008 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 15 Oct 2008 16:20:13 -0000 Subject: [llvm-commits] [llvm] r57583 - /llvm/trunk/tools/llvmc2/Makefile Message-ID: <200810151620.m9FGKDpg011904@zion.cs.uiuc.edu> Author: void Date: Wed Oct 15 11:20:13 2008 New Revision: 57583 URL: http://llvm.org/viewvc/llvm-project?rev=57583&view=rev Log: Unbreak the build. Please test out the proper fix for this by compiling LLVM with the build directory different from the source directory. Modified: llvm/trunk/tools/llvmc2/Makefile Modified: llvm/trunk/tools/llvmc2/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/Makefile?rev=57583&r1=57582&r2=57583&view=diff ============================================================================== --- llvm/trunk/tools/llvmc2/Makefile (original) +++ llvm/trunk/tools/llvmc2/Makefile Wed Oct 15 11:20:13 2008 @@ -9,7 +9,9 @@ LEVEL = ../.. -BUILTIN_PLUGINS = Base +##### FIXME: Does not work when objdir != srcdir +#####BUILTIN_PLUGINS = Base + DRIVER_NAME = llvmc2 DIRS = plugins driver From alenhar2 at cs.uiuc.edu Wed Oct 15 11:25:24 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Wed, 15 Oct 2008 16:25:24 -0000 Subject: [llvm-commits] [poolalloc] r57584 - in /poolalloc/trunk: include/dsa/DataStructure.h lib/DSA/BottomUpClosure.cpp Message-ID: <200810151625.m9FGPOBa012109@zion.cs.uiuc.edu> Author: alenhar2 Date: Wed Oct 15 11:25:24 2008 New Revision: 57584 URL: http://llvm.org/viewvc/llvm-project?rev=57584&view=rev Log: Fix infinate loop when no ds graph is computed for a call site, but some targets are known Modified: poolalloc/trunk/include/dsa/DataStructure.h poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Modified: poolalloc/trunk/include/dsa/DataStructure.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DataStructure.h?rev=57584&r1=57583&r2=57584&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/DataStructure.h (original) +++ poolalloc/trunk/include/dsa/DataStructure.h Wed Oct 15 11:25:24 2008 @@ -219,16 +219,18 @@ const char* debugname; bool useCallGraph; + bool ReInlineGlobals; public: static char ID; - //Child constructor + //Child constructor (CBU) BUDataStructures(intptr_t CID, const char* name, const char* printname) - : DataStructures(CID, printname), debugname(name), useCallGraph(true) {} + : DataStructures(CID, printname), debugname(name), useCallGraph(true), + ReInlineGlobals(true) {} //main constructor BUDataStructures() : DataStructures((intptr_t)&ID, "bu."), debugname("dsa-bu"), - useCallGraph(false) {} + useCallGraph(false), ReInlineGlobals(false) {} ~BUDataStructures() { releaseMemory(); } virtual bool runOnModule(Module &M); Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=57584&r1=57583&r2=57584&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original) +++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Wed Oct 15 11:25:24 2008 @@ -387,17 +387,24 @@ // Note that this is *required* for correctness. If a callee contains a use // of a global, we have to make sure to link up nodes due to global-argument // bindings. - if (ContainsMain) { + if (ContainsMain || ReInlineGlobals) { const DSGraph &GG = *Graph.getGlobalsGraph(); ReachabilityCloner RC(Graph, GG, DSGraph::DontCloneCallNodes | DSGraph::DontCloneAuxCallNodes); - - // Clone the global nodes into this graph. - for (DSScalarMap::global_iterator I = GG.getScalarMap().global_begin(), - E = GG.getScalarMap().global_end(); I != E; ++I) - if (isa(*I)) - RC.getClonedNH(GG.getNodeForValue(*I)); + if (ContainsMain) { + // Clone the global nodes into this graph. + for (DSScalarMap::global_iterator I = GG.getScalarMap().global_begin(), + E = GG.getScalarMap().global_end(); I != E; ++I) + if (isa(*I)) + RC.getClonedNH(GG.getNodeForValue(*I)); + } else { + // Clone used the global nodes into this graph. + for (DSScalarMap::global_iterator I = Graph.getScalarMap().global_begin(), + E = Graph.getScalarMap().global_end(); I != E; ++I) + if (isa(*I)) + RC.getClonedNH(GG.getNodeForValue(*I)); + } } @@ -471,68 +478,67 @@ CalledFuncs.erase(CalledFuncs.begin() + x); else ++x; - if (!CalledFuncs.size()) - continue; } - - // See if we already computed a graph for this set of callees. - std::sort(CalledFuncs.begin(), CalledFuncs.end()); - std::pair > &IndCallGraph = - IndCallGraphMap[CalledFuncs]; - - if (IndCallGraph.first == 0) { - std::vector::iterator I = CalledFuncs.begin(), - E = CalledFuncs.end(); - - // Start with a copy of the first graph. - GI = IndCallGraph.first = new DSGraph(getDSGraph(**I), GlobalECs); - GI->setGlobalsGraph(Graph.getGlobalsGraph()); - std::vector &Args = IndCallGraph.second; - - // Get the argument nodes for the first callee. The return value is - // the 0th index in the vector. - GI->getFunctionArgumentsForCall(*I, Args); + if (CalledFuncs.size()) { + // See if we already computed a graph for this set of callees. + std::sort(CalledFuncs.begin(), CalledFuncs.end()); + std::pair > &IndCallGraph = + IndCallGraphMap[CalledFuncs]; - // Merge all of the other callees into this graph. - for (++I; I != E; ++I) { - // If the graph already contains the nodes for the function, don't - // bother merging it in again. - if (!GI->containsFunction(*I)) { - GI->cloneInto(getDSGraph(**I)); - ++NumInlines; - } + if (IndCallGraph.first == 0) { + std::vector::iterator I = CalledFuncs.begin(), + E = CalledFuncs.end(); - std::vector NextArgs; - GI->getFunctionArgumentsForCall(*I, NextArgs); - unsigned i = 0, e = Args.size(); - for (; i != e; ++i) { - if (i == NextArgs.size()) break; - Args[i].mergeWith(NextArgs[i]); + // Start with a copy of the first graph. + GI = IndCallGraph.first = new DSGraph(getDSGraph(**I), GlobalECs); + GI->setGlobalsGraph(Graph.getGlobalsGraph()); + std::vector &Args = IndCallGraph.second; + + // Get the argument nodes for the first callee. The return value is + // the 0th index in the vector. + GI->getFunctionArgumentsForCall(*I, Args); + + // Merge all of the other callees into this graph. + for (++I; I != E; ++I) { + // If the graph already contains the nodes for the function, don't + // bother merging it in again. + if (!GI->containsFunction(*I)) { + GI->cloneInto(getDSGraph(**I)); + ++NumInlines; + } + + std::vector NextArgs; + GI->getFunctionArgumentsForCall(*I, NextArgs); + unsigned i = 0, e = Args.size(); + for (; i != e; ++i) { + if (i == NextArgs.size()) break; + Args[i].mergeWith(NextArgs[i]); + } + for (e = NextArgs.size(); i != e; ++i) + Args.push_back(NextArgs[i]); } - for (e = NextArgs.size(); i != e; ++i) - Args.push_back(NextArgs[i]); + + // Clean up the final graph! + GI->removeDeadNodes(DSGraph::KeepUnreachableGlobals); + } else { + DOUT << "***\n*** RECYCLED GRAPH ***\n***\n"; } - // Clean up the final graph! - GI->removeDeadNodes(DSGraph::KeepUnreachableGlobals); - } else { - DOUT << "***\n*** RECYCLED GRAPH ***\n***\n"; + GI = IndCallGraph.first; + + // Merge the unified graph into this graph now. + DOUT << " Inlining multi callee graph " + << "[" << GI->getGraphSize() << "+" + << GI->getAuxFunctionCalls().size() << "] into '" + << Graph.getFunctionNames() << "' [" << Graph.getGraphSize() <<"+" + << Graph.getAuxFunctionCalls().size() << "]\n"; + + Graph.mergeInGraph(CS, IndCallGraph.second, *GI, + DSGraph::StripAllocaBit | + DSGraph::DontCloneCallNodes| + (isComplete?0:DSGraph::DontCloneAuxCallNodes)); + ++NumInlines; } - - GI = IndCallGraph.first; - - // Merge the unified graph into this graph now. - DOUT << " Inlining multi callee graph " - << "[" << GI->getGraphSize() << "+" - << GI->getAuxFunctionCalls().size() << "] into '" - << Graph.getFunctionNames() << "' [" << Graph.getGraphSize() <<"+" - << Graph.getAuxFunctionCalls().size() << "]\n"; - - Graph.mergeInGraph(CS, IndCallGraph.second, *GI, - DSGraph::StripAllocaBit | - DSGraph::DontCloneCallNodes| - (isComplete?0:DSGraph::DontCloneAuxCallNodes)); - ++NumInlines; } if (!isComplete) AuxCallsList.push_front(CS); From alenhar2 at cs.uiuc.edu Wed Oct 15 11:25:41 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Wed, 15 Oct 2008 16:25:41 -0000 Subject: [llvm-commits] [poolalloc] r57585 - /poolalloc/trunk/lib/DSA/StdLibPass.cpp Message-ID: <200810151625.m9FGPfIS012137@zion.cs.uiuc.edu> Author: alenhar2 Date: Wed Oct 15 11:25:41 2008 New Revision: 57585 URL: http://llvm.org/viewvc/llvm-project?rev=57585&view=rev Log: some file io lib calls Modified: poolalloc/trunk/lib/DSA/StdLibPass.cpp Modified: poolalloc/trunk/lib/DSA/StdLibPass.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/StdLibPass.cpp?rev=57585&r1=57584&r2=57585&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/StdLibPass.cpp (original) +++ poolalloc/trunk/lib/DSA/StdLibPass.cpp Wed Oct 15 11:25:41 2008 @@ -65,6 +65,7 @@ {"fprintf", {NRET_YARGS, NRET_YNARGS, NRET_NARGS, false, false, false}}, {"sprintf", {NRET_YARGS, NRET_YNARGS, NRET_NARGS, false, false, false}}, {"snprintf", {NRET_YARGS, NRET_YNARGS, NRET_NARGS, false, false, false}}, + {"fprintf", {NRET_YARGS, NRET_YNARGS, NRET_NARGS, false, false, false}}, {"puts", {NRET_NARGS, NRET_NARGS, NRET_NARGS, false, false, false}}, {"calloc", {NRET_NARGS, YRET_NARGS, YRET_NARGS, false, false, false}}, @@ -103,7 +104,12 @@ {"wcsrchr", {YRET_YARGS, NRET_NARGS, NRET_NARGS, false, true, true}}, {"strchrhul", {YRET_YARGS, NRET_NARGS, NRET_NARGS, false, true, true}}, - + {"fwrite", {NRET_YARGS, NRET_NYARGS, NRET_NARGS, false, false, false}}, + {"fread", {NRET_NYARGS, NRET_YARGS, NRET_NARGS, false, false, false}}, + {"fflush", {NRET_YARGS, NRET_YARGS, NRET_NARGS, false, false, false}}, + {"fclose", {NRET_YARGS, NRET_YARGS, NRET_NARGS, false, false, false}}, + {"fopen", {NRET_YARGS, YRET_NARGS, YRET_NARGS, false, false, false}}, + #if 0 {"remove", {false, false, false, true, false, false, false, false, false}}, {"unlink", {false, false, false, true, false, false, false, false, false}}, @@ -136,8 +142,6 @@ {"wcscpy", {false, true, false, true, true, false, true, true, true}}, {"wcsncpy", {false, true, false, true, true, false, true, true, true}}, {"wmemccpy", {false, true, false, true, true, false, true, true, true}}, - {"fclose", {false, false, false, true, true, false, false, false, false}}, - {"fopen", {false, true, true, true, false, false, false, false, false}}, {"getcwd", { true, true, true, true, true, true, false, true, true}}, #endif // C++ functions, as mangled on linux gcc 4.2 @@ -150,7 +154,7 @@ // operator delete[](void*) {"_ZdaPv", {NRET_NARGS, NRET_NARGS, NRET_YNARGS, false, false, false}}, // Terminate the list of special functions recognized by this pass - {0, {false, false, false, false, false, false}}, + {0, {NRET_NARGS, NRET_NARGS, NRET_NARGS, false, false, false}}, }; void StdLibDataStructures::eraseCallsTo(Function* F) { From sabre at nondot.org Wed Oct 15 11:33:52 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 16:33:52 -0000 Subject: [llvm-commits] [llvm] r57586 - /llvm/trunk/lib/Target/README.txt Message-ID: <200810151633.m9FGXqPp012451@zion.cs.uiuc.edu> Author: lattner Date: Wed Oct 15 11:33:52 2008 New Revision: 57586 URL: http://llvm.org/viewvc/llvm-project?rev=57586&view=rev Log: move PR1941 here. Modified: llvm/trunk/lib/Target/README.txt Modified: llvm/trunk/lib/Target/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/README.txt?rev=57586&r1=57585&r2=57586&view=diff ============================================================================== --- llvm/trunk/lib/Target/README.txt (original) +++ llvm/trunk/lib/Target/README.txt Wed Oct 15 11:33:52 2008 @@ -971,3 +971,17 @@ //===---------------------------------------------------------------------===// +Instcombine will merge comparisons like (x >= 10) && (x < 20) by producing (x - +10) u< 10, but only when the comparisons have matching sign. + +This could be converted with a similiar technique. (PR1941) + +define i1 @test(i8 %x) { + %A = icmp uge i8 %x, 5 + %B = icmp slt i8 %x, 20 + %C = and i1 %A, %B + ret i1 %C +} + +//===---------------------------------------------------------------------===// + From sabre at nondot.org Wed Oct 15 11:56:14 2008 From: sabre at nondot.org (Chris Lattner) Date: Wed, 15 Oct 2008 16:56:14 -0000 Subject: [llvm-commits] [llvm] r57587 - /llvm/trunk/include/llvm/Use.h Message-ID: <200810151656.m9FGuFGo013498@zion.cs.uiuc.edu> Author: lattner Date: Wed Oct 15 11:56:14 2008 New Revision: 57587 URL: http://llvm.org/viewvc/llvm-project?rev=57587&view=rev Log: Fix PR2115 by doxygenating Use more, and make some more methods private. Modified: llvm/trunk/include/llvm/Use.h Modified: llvm/trunk/include/llvm/Use.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Use.h?rev=57587&r1=57586&r2=57587&view=diff ============================================================================== --- llvm/trunk/include/llvm/Use.h (original) +++ llvm/trunk/include/llvm/Use.h Wed Oct 15 11:56:14 2008 @@ -63,8 +63,8 @@ // Use Class //===----------------------------------------------------------------------===// -// Use is here to make keeping the "use" list of a Value up-to-date really easy. -// +/// Use is here to make keeping the "use" list of a Value up-to-date really +/// easy. class Use { public: /// swap - provide a fast substitute to std::swap @@ -80,9 +80,8 @@ if (Val) removeFromList(); } - /// Default ctor - This leaves the Use completely uninitialized. The only thing - /// that is valid to do with this use is to call the "init" method. - + /// Default ctor - This leaves the Use completely uninitialized. The only + /// thing that is valid to do with this use is to call the "init" method. inline Use() {} enum PrevPtrTag { zeroDigitTag = noTag , oneDigitTag = tagOne @@ -90,12 +89,16 @@ , fullStopTag = tagThree }; public: + /// Normally Use will just implicitly convert to a Value* that it holds. operator Value*() const { return Val; } + + /// If implicit conversion to Value* doesn't work, the get() method returns + /// the Value*. Value *get() const { return Val; } + + /// getUser - This returns the User that contains this Use. For an + /// instruction operand, for example, this will return the instruction. User *getUser() const; - const Use* getImpliedUser() const; - static Use *initTags(Use *Start, Use *Stop, ptrdiff_t Done = 0); - static void zap(Use *Start, const Use *Stop, bool del = false); inline void set(Value *Val); @@ -112,7 +115,16 @@ const Value *operator->() const { return Val; } Use *getNext() const { return Next; } + + + /// zap - This is used to destroy Use operands when the number of operands of + /// a User changes. + static void zap(Use *Start, const Use *Stop, bool del = false); + private: + const Use* getImpliedUser() const; + static Use *initTags(Use *Start, Use *Stop, ptrdiff_t Done = 0); + Value *Val; Use *Next, **Prev; @@ -132,6 +144,7 @@ } friend class Value; + friend class User; }; // simplify_type - Allow clients to treat uses just like values when using From gohman at apple.com Wed Oct 15 13:02:08 2008 From: gohman at apple.com (Dan Gohman) Date: Wed, 15 Oct 2008 18:02:08 -0000 Subject: [llvm-commits] [llvm] r57589 - /llvm/trunk/lib/VMCore/AsmWriter.cpp Message-ID: <200810151802.m9FI28Yv015970@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 13:02:08 2008 New Revision: 57589 URL: http://llvm.org/viewvc/llvm-project?rev=57589&view=rev Log: Fix a missing space after the return type in invoke statements. This fixes PR2894. Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=57589&r1=57588&r2=57589&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/AsmWriter.cpp (original) +++ llvm/trunk/lib/VMCore/AsmWriter.cpp Wed Oct 15 13:02:08 2008 @@ -1621,16 +1621,16 @@ // only do this if the first argument is a pointer to a nonvararg function, // and if the return type is not a pointer to a function. // + Out << ' '; if (!FTy->isVarArg() && (!isa(RetTy) || !isa(cast(RetTy)->getElementType()))) { - Out << ' '; printType(RetTy); + printType(RetTy); + Out << ' '; writeOperand(Operand, false); } else { - Out << ' '; writeOperand(Operand, true); } - Out << '('; for (unsigned op = 3, Eop = I.getNumOperands(); op < Eop; ++op) { if (op > 3) From isanbard at gmail.com Wed Oct 15 13:27:15 2008 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 15 Oct 2008 18:27:15 -0000 Subject: [llvm-commits] [llvm] r57590 - /llvm/trunk/test/CodeGen/PowerPC/cr_spilling.ll Message-ID: <200810151827.m9FIRFEv016870@zion.cs.uiuc.edu> Author: void Date: Wed Oct 15 13:27:15 2008 New Revision: 57590 URL: http://llvm.org/viewvc/llvm-project?rev=57590&view=rev Log: Testcase for PR1638. Added: llvm/trunk/test/CodeGen/PowerPC/cr_spilling.ll Added: llvm/trunk/test/CodeGen/PowerPC/cr_spilling.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/cr_spilling.ll?rev=57590&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/PowerPC/cr_spilling.ll (added) +++ llvm/trunk/test/CodeGen/PowerPC/cr_spilling.ll Wed Oct 15 13:27:15 2008 @@ -0,0 +1,27 @@ +; RUN: llvm-as < %s | llc -march=ppc32 -regalloc=local -fast -relocation-model=pic -o - +; PR1638 + + at .str242 = external constant [3 x i8] ; <[3 x i8]*> [#uses=1] + +define fastcc void @ParseContent(i8* %buf, i32 %bufsize) { +entry: + %items = alloca [10000 x i8*], align 16 ; <[10000 x i8*]*> [#uses=0] + %tmp86 = add i32 0, -1 ; [#uses=1] + br i1 false, label %cond_true94, label %cond_next99 + +cond_true94: ; preds = %entry + %tmp98 = call i32 (i8*, ...)* @printf(i8* getelementptr ([3 x i8]* @.str242, i32 0, i32 0), i8* null) ; [#uses=0] + %tmp20971 = icmp sgt i32 %tmp86, 0 ; [#uses=1] + br i1 %tmp20971, label %bb101, label %bb212 + +cond_next99: ; preds = %entry + ret void + +bb101: ; preds = %cond_true94 + ret void + +bb212: ; preds = %cond_true94 + ret void +} + +declare i32 @printf(i8*, ...) From asl at math.spbu.ru Wed Oct 15 15:10:21 2008 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Wed, 15 Oct 2008 20:10:21 -0000 Subject: [llvm-commits] [llvm] r57594 - /llvm/trunk/lib/Linker/LinkModules.cpp Message-ID: <200810152010.m9FKAN2f020771@zion.cs.uiuc.edu> Author: asl Date: Wed Oct 15 15:10:08 2008 New Revision: 57594 URL: http://llvm.org/viewvc/llvm-project?rev=57594&view=rev Log: Properly handle linking of strong alias with weak function, this fixes PR2883 Modified: llvm/trunk/lib/Linker/LinkModules.cpp Modified: llvm/trunk/lib/Linker/LinkModules.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=57594&r1=57593&r2=57594&view=diff ============================================================================== --- llvm/trunk/lib/Linker/LinkModules.cpp (original) +++ llvm/trunk/lib/Linker/LinkModules.cpp Wed Oct 15 15:10:08 2008 @@ -984,7 +984,7 @@ // The only valid mappings are: // - SF is external declaration, which is effectively a no-op. // - SF is weak, when we just need to throw SF out. - if (!SF->isDeclaration()) + if (!SF->isDeclaration() && !SF->mayBeOverridden()) return Error(Err, "Function-Alias Collision on '" + SF->getName() + "': symbol multiple defined"); } From asl at math.spbu.ru Wed Oct 15 15:10:51 2008 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Wed, 15 Oct 2008 20:10:51 -0000 Subject: [llvm-commits] [llvm] r57595 - /llvm/trunk/lib/Linker/LinkModules.cpp Message-ID: <200810152010.m9FKAq19020800@zion.cs.uiuc.edu> Author: asl Date: Wed Oct 15 15:10:50 2008 New Revision: 57595 URL: http://llvm.org/viewvc/llvm-project?rev=57595&view=rev Log: Also properly handle linking of strong alias and weak global Modified: llvm/trunk/lib/Linker/LinkModules.cpp Modified: llvm/trunk/lib/Linker/LinkModules.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=57595&r1=57594&r2=57595&view=diff ============================================================================== --- llvm/trunk/lib/Linker/LinkModules.cpp (original) +++ llvm/trunk/lib/Linker/LinkModules.cpp Wed Oct 15 15:10:50 2008 @@ -662,12 +662,15 @@ if (DGVar->isDeclaration() && SGV->isConstant() && !DGVar->isConstant()) DGVar->setConstant(true); - // SGV is global, but DGV is alias. The only valid mapping is when SGV is - // external declaration, which is effectively a no-op. Also make sure - // linkage calculation was correct. - if (isa(DGV) && !SGV->isDeclaration()) - return Error(Err, "Global-Alias Collision on '" + SGV->getName() + - "': symbol multiple defined"); + // SGV is global, but DGV is alias. + if (isa(DGV)) { + // The only valid mappings are: + // - SGV is external declaration, which is effectively a no-op. + // - SGV is weak, when we just need to throw SGV out. + if (!SGV->isDeclaration() && !SGV->mayBeOverridden()) + return Error(Err, "Global-Alias Collision on '" + SGV->getName() + + "': symbol multiple defined"); + } // Set calculated linkage DGV->setLinkage(NewLinkage); @@ -854,28 +857,39 @@ // Figure out what the initializer looks like in the dest module... Constant *SInit = cast(RemapOperand(SGV->getInitializer(), ValueMap)); + // Grab destination global variable or alias. + GlobalValue *DGV = cast(ValueMap[SGV]->stripPointerCasts()); - GlobalVariable *DGV = - cast(ValueMap[SGV]->stripPointerCasts()); - if (DGV->hasInitializer()) { - if (SGV->hasExternalLinkage()) { - if (DGV->getInitializer() != SInit) - return Error(Err, "Global Variable Collision on '" + SGV->getName() + - "': global variables have different initializers"); - } else if (DGV->mayBeOverridden()) { - // Nothing is required, mapped values will take the new global - // automatically. - } else if (SGV->mayBeOverridden()) { - // Nothing is required, mapped values will take the new global - // automatically. - } else if (DGV->hasAppendingLinkage()) { - assert(0 && "Appending linkage unimplemented!"); + // If dest if global variable, check that initializers match. + if (GlobalVariable *DGVar = dyn_cast(DGV)) { + if (DGVar->hasInitializer()) { + if (SGV->hasExternalLinkage()) { + if (DGVar->getInitializer() != SInit) + return Error(Err, "Global Variable Collision on '" + + SGV->getName() + + "': global variables have different initializers"); + } else if (DGVar->mayBeOverridden()) { + // Nothing is required, mapped values will take the new global + // automatically. + } else if (SGV->mayBeOverridden()) { + // Nothing is required, mapped values will take the new global + // automatically. + } else if (DGVar->hasAppendingLinkage()) { + assert(0 && "Appending linkage unimplemented!"); + } else { + assert(0 && "Unknown linkage!"); + } } else { - assert(0 && "Unknown linkage!"); + // Copy the initializer over now... + DGVar->setInitializer(SInit); } } else { - // Copy the initializer over now... - DGV->setInitializer(SInit); + // Destination is alias, the only valid situation is when source is + // weak. Also, note, that we already checked linkage in LinkGlobals(), + // thus we assert here. + // FIXME: Should we weaken this assumption, 'dereference' alias and + // check for initializer of aliasee? + assert(SGV->mayBeOverridden()); } } } From asl at math.spbu.ru Wed Oct 15 15:13:19 2008 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Wed, 15 Oct 2008 20:13:19 -0000 Subject: [llvm-commits] [llvm] r57596 - /llvm/trunk/test/Linker/2008-07-06-AliasWeakDest.ll Message-ID: <200810152013.m9FKDK0i020905@zion.cs.uiuc.edu> Author: asl Date: Wed Oct 15 15:13:10 2008 New Revision: 57596 URL: http://llvm.org/viewvc/llvm-project?rev=57596&view=rev Log: This is not failing anymore Modified: llvm/trunk/test/Linker/2008-07-06-AliasWeakDest.ll Modified: llvm/trunk/test/Linker/2008-07-06-AliasWeakDest.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2008-07-06-AliasWeakDest.ll?rev=57596&r1=57595&r2=57596&view=diff ============================================================================== --- llvm/trunk/test/Linker/2008-07-06-AliasWeakDest.ll (original) +++ llvm/trunk/test/Linker/2008-07-06-AliasWeakDest.ll Wed Oct 15 15:13:10 2008 @@ -4,8 +4,6 @@ ; RUN: llvm-link %t1.bc %t2.bc -f -o %t3.bc ; RUN: llvm-link %t2.bc %t1.bc -f -o %t4.bc -; XFAIL: * - target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" target triple = "i386-pc-linux-gnu" From asl at math.spbu.ru Wed Oct 15 15:22:47 2008 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Wed, 15 Oct 2008 20:22:47 -0000 Subject: [llvm-commits] [llvm] r57597 - in /llvm/trunk/test/Linker: 2008-07-06-AliasWeakDest.ll 2008-07-06-AliasWeakDest2.ll Message-ID: <200810152022.m9FKMmbV021207@zion.cs.uiuc.edu> Author: asl Date: Wed Oct 15 15:22:44 2008 New Revision: 57597 URL: http://llvm.org/viewvc/llvm-project?rev=57597&view=rev Log: Add global variable to test for consistency Modified: llvm/trunk/test/Linker/2008-07-06-AliasWeakDest.ll llvm/trunk/test/Linker/2008-07-06-AliasWeakDest2.ll Modified: llvm/trunk/test/Linker/2008-07-06-AliasWeakDest.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2008-07-06-AliasWeakDest.ll?rev=57597&r1=57596&r2=57597&view=diff ============================================================================== --- llvm/trunk/test/Linker/2008-07-06-AliasWeakDest.ll (original) +++ llvm/trunk/test/Linker/2008-07-06-AliasWeakDest.ll Wed Oct 15 15:22:44 2008 @@ -9,6 +9,9 @@ @sched_clock = alias i64 ()* @native_sched_clock + at foo = alias i32* @realfoo + at realfoo = global i32 0 + define i64 @native_sched_clock() nounwind { entry: ret i64 0 Modified: llvm/trunk/test/Linker/2008-07-06-AliasWeakDest2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2008-07-06-AliasWeakDest2.ll?rev=57597&r1=57596&r2=57597&view=diff ============================================================================== --- llvm/trunk/test/Linker/2008-07-06-AliasWeakDest2.ll (original) +++ llvm/trunk/test/Linker/2008-07-06-AliasWeakDest2.ll Wed Oct 15 15:22:44 2008 @@ -4,6 +4,7 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" target triple = "i386-pc-linux-gnu" + at foo = weak global i32 2 define i64 @sched_clock_cpu(i32 inreg %cpu) nounwind { entry: From nicolas.geoffray at lip6.fr Wed Oct 15 15:25:04 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Wed, 15 Oct 2008 20:25:04 -0000 Subject: [llvm-commits] [llvm] r57599 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810152025.m9FKP4uK021345@zion.cs.uiuc.edu> Author: geoffray Date: Wed Oct 15 15:25:04 2008 New Revision: 57599 URL: http://llvm.org/viewvc/llvm-project?rev=57599&view=rev Log: Remove naming Tilmann for generics. Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57599&r1=57598&r2=57599&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Wed Oct 15 15:25:04 2008 @@ -168,14 +168,13 @@ a JVM and a CLI Virtual Machines (Microsoft .NET is an implementation of the CLI) using the Just-In-Time compiler of LLVM.

                                                                            -

                                                                            Following LLVM 2.4, VMKit has its first release 0.24 that you can find on -the release page. The release includes -bug fixes, cleanup and new features. The major changes include:

                                                                            +

                                                                            Following LLVM 2.4, VMKit has its first release 0.24 that you can find on its +webpage. The release includes +bug fixes, cleanup and new features. The major changes are:

                                                                              -
                                                                            • Support for generics in the .Net virtual machine. This was implemented -by Tilmann Scheller during his Google Summer of Code project. +
                                                                            • Support for generics in the .Net virtual machine.
                                                                            • Initial support for the Mono class libraries.
                                                                            • Support for MacOSX/x86, following LLVM's support for exceptions in JIT on MacOSX/x86. From dalej at apple.com Wed Oct 15 15:39:31 2008 From: dalej at apple.com (Dale Johannesen) Date: Wed, 15 Oct 2008 13:39:31 -0700 Subject: [llvm-commits] [llvm] r57599 - /llvm/trunk/docs/ReleaseNotes.html In-Reply-To: <200810152025.m9FKP4uK021345@zion.cs.uiuc.edu> References: <200810152025.m9FKP4uK021345@zion.cs.uiuc.edu> Message-ID: You could put something in CREDITS.TXT if you want, I think. On Oct 15, 2008, at 1:25 PMPDT, Nicolas Geoffray wrote: > Author: geoffray > Date: Wed Oct 15 15:25:04 2008 > New Revision: 57599 > > URL: http://llvm.org/viewvc/llvm-project?rev=57599&view=rev > Log: > Remove naming Tilmann for generics. > > > Modified: > llvm/trunk/docs/ReleaseNotes.html > > Modified: llvm/trunk/docs/ReleaseNotes.html > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57599&r1=57598&r2=57599&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/docs/ReleaseNotes.html (original) > +++ llvm/trunk/docs/ReleaseNotes.html Wed Oct 15 15:25:04 2008 > @@ -168,14 +168,13 @@ > a JVM and a CLI Virtual Machines (Microsoft .NET is an > implementation of the CLI) using the Just-In-Time compiler of LLVM. p> > > -

                                                                              Following LLVM 2.4, VMKit has its first release 0.24 that you > can find on > -the release page. The > release includes > -bug fixes, cleanup and new features. The major changes include:

                                                                              > +

                                                                              Following LLVM 2.4, VMKit has its first release 0.24 that you > can find on its > +webpage. The release > includes > +bug fixes, cleanup and new features. The major changes are:

                                                                              > >
                                                                                > > -
                                                                              • Support for generics in the .Net virtual machine. This was > implemented > -by Tilmann Scheller during his Google Summer of Code project. > +
                                                                              • Support for generics in the .Net virtual machine. >
                                                                              • Initial support for the Mono class libraries. >
                                                                              • Support for MacOSX/x86, following LLVM's support for exceptions > in > JIT on MacOSX/x86. > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From alenhar2 at cs.uiuc.edu Wed Oct 15 15:42:10 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Wed, 15 Oct 2008 20:42:10 -0000 Subject: [llvm-commits] [poolalloc] r57600 - /poolalloc/trunk/lib/DSA/DataStructure.cpp Message-ID: <200810152042.m9FKgAu6022020@zion.cs.uiuc.edu> Author: alenhar2 Date: Wed Oct 15 15:42:07 2008 New Revision: 57600 URL: http://llvm.org/viewvc/llvm-project?rev=57600&view=rev Log: cbu now can expand GlobalEC sets Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=57600&r1=57599&r2=57600&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/DataStructure.cpp (original) +++ poolalloc/trunk/lib/DSA/DataStructure.cpp Wed Oct 15 15:42:07 2008 @@ -2779,8 +2779,11 @@ if (I->getGlobalsList().size() <= 1) continue; // First, build up the equivalence set for this block of globals. - DSNode::globals_iterator i = I->globals_begin(); - const GlobalValue *First = *i++; + DSNode::globals_iterator i = I->globals_begin(); + const GlobalValue *First = *i; + if (GlobalECs.findValue(*i) != GlobalECs.end()) + First = GlobalECs.getLeaderValue(*i); + if (*i == First) ++i; for( ; i != I->globals_end(); ++i) { GlobalECs.unionSets(First, *i); ECGlobals.insert(*i); From clattner at apple.com Wed Oct 15 15:51:32 2008 From: clattner at apple.com (Chris Lattner) Date: Wed, 15 Oct 2008 13:51:32 -0700 Subject: [llvm-commits] [llvm] r57599 - /llvm/trunk/docs/ReleaseNotes.html In-Reply-To: References: <200810152025.m9FKP4uK021345@zion.cs.uiuc.edu> Message-ID: On Oct 15, 2008, at 1:39 PM, Dale Johannesen wrote: > You could put something in CREDITS.TXT if you want, I think. Absolutely! -Chris From ggreif at gmail.com Wed Oct 15 17:06:58 2008 From: ggreif at gmail.com (Gabor Greif) Date: Wed, 15 Oct 2008 15:06:58 -0700 (PDT) Subject: [llvm-commits] [llvm] r57599 - /llvm/trunk/docs/ReleaseNotes.html In-Reply-To: References: <200810152025.m9FKP4uK021345@zion.cs.uiuc.edu> Message-ID: <6a4cf084-9da1-4ebf-8469-8bbc4c6d6cf8@a1g2000hsb.googlegroups.com> Dan should update his email in there, it seems a bit outdated. Gabor On Oct 15, 10:51?pm, Chris Lattner wrote: > On Oct 15, 2008, at 1:39 PM, Dale Johannesen wrote: > > > You could put something in CREDITS.TXT if you want, I think. > > Absolutely! > > -Chris > _______________________________________________ > llvm-commits mailing list > llvm-comm... at cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From baldrick at free.fr Wed Oct 15 17:34:36 2008 From: baldrick at free.fr (Duncan Sands) Date: Wed, 15 Oct 2008 22:34:36 -0000 Subject: [llvm-commits] [llvm] r57604 - /llvm/trunk/test/Other/2008-10-15-MissingSpace.ll Message-ID: <200810152234.m9FMYaAj026082@zion.cs.uiuc.edu> Author: baldrick Date: Wed Oct 15 17:34:34 2008 New Revision: 57604 URL: http://llvm.org/viewvc/llvm-project?rev=57604&view=rev Log: Testcase for PR2894. Added: llvm/trunk/test/Other/2008-10-15-MissingSpace.ll Added: llvm/trunk/test/Other/2008-10-15-MissingSpace.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/2008-10-15-MissingSpace.ll?rev=57604&view=auto ============================================================================== --- llvm/trunk/test/Other/2008-10-15-MissingSpace.ll (added) +++ llvm/trunk/test/Other/2008-10-15-MissingSpace.ll Wed Oct 15 17:34:34 2008 @@ -0,0 +1,7 @@ +; RUN: llvm-as < %s | llvm-dis | not grep {void@} +; PR2894 +declare void @g() +define void @f() { + invoke void @g() to label %c unwind label %c + c: ret void +} From gohman at apple.com Wed Oct 15 17:55:12 2008 From: gohman at apple.com (Dan Gohman) Date: Wed, 15 Oct 2008 22:55:12 -0000 Subject: [llvm-commits] [llvm] r57605 - /llvm/trunk/include/llvm/Attributes.h Message-ID: <200810152255.m9FMtDPN026708@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 17:55:03 2008 New Revision: 57605 URL: http://llvm.org/viewvc/llvm-project?rev=57605&view=rev Log: Fix whitespace in a comment. Modified: llvm/trunk/include/llvm/Attributes.h Modified: llvm/trunk/include/llvm/Attributes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=57605&r1=57604&r2=57605&view=diff ============================================================================== --- llvm/trunk/include/llvm/Attributes.h (original) +++ llvm/trunk/include/llvm/Attributes.h Wed Oct 15 17:55:03 2008 @@ -159,7 +159,7 @@ return getAttributes(0); } - /// getFnAttributes - The function attributes are returned. + /// getFnAttributes - The function attributes are returned. Attributes getFnAttributes() const { return getAttributes(~0); } From gohman at apple.com Wed Oct 15 17:56:21 2008 From: gohman at apple.com (Dan Gohman) Date: Wed, 15 Oct 2008 22:56:21 -0000 Subject: [llvm-commits] [llvm] r57606 - in /llvm/trunk: include/llvm/Instruction.h lib/VMCore/Instruction.cpp Message-ID: <200810152256.m9FMuLZT026759@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 17:56:21 2008 New Revision: 57606 URL: http://llvm.org/viewvc/llvm-project?rev=57606&view=rev Log: Correct the name of isTrapping in comments. Modified: llvm/trunk/include/llvm/Instruction.h llvm/trunk/lib/VMCore/Instruction.cpp Modified: llvm/trunk/include/llvm/Instruction.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instruction.h?rev=57606&r1=57605&r2=57606&view=diff ============================================================================== --- llvm/trunk/include/llvm/Instruction.h (original) +++ llvm/trunk/include/llvm/Instruction.h Wed Oct 15 17:56:21 2008 @@ -171,7 +171,7 @@ bool isCommutative() const { return isCommutative(getOpcode()); } static bool isCommutative(unsigned op); - /// isTrappingInstruction - Return true if the instruction may trap. + /// isTrapping - Return true if the instruction may trap. /// bool isTrapping() const { return isTrapping(getOpcode()); Modified: llvm/trunk/lib/VMCore/Instruction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instruction.cpp?rev=57606&r1=57605&r2=57606&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Instruction.cpp (original) +++ llvm/trunk/lib/VMCore/Instruction.cpp Wed Oct 15 17:56:21 2008 @@ -301,7 +301,7 @@ } } -/// isTrappingInstruction - Return true if the instruction may trap. +/// isTrapping - Return true if the instruction may trap. /// bool Instruction::isTrapping(unsigned op) { switch(op) { From lattner at apple.com Wed Oct 15 18:00:02 2008 From: lattner at apple.com (Tanya Lattner) Date: Wed, 15 Oct 2008 16:00:02 -0700 Subject: [llvm-commits] [test-suite] r57281 - /test-suite/trunk/autoconf/configure.ac In-Reply-To: <9E2D17D9-FCBE-473B-86E7-2F49442FA9E3@apple.com> References: <200810072330.m97NUagZ030230@zion.cs.uiuc.edu> <9E2D17D9-FCBE-473B-86E7-2F49442FA9E3@apple.com> Message-ID: Dan? Can you regenerate configure? -Tanya On Oct 8, 2008, at 9:35 AM, Tanya Lattner wrote: > Regenerate the configure script? > > -Tanya > > On Oct 7, 2008, at 4:30 PM, Dan Gohman wrote: > >> Author: djg >> Date: Tue Oct 7 18:30:36 2008 >> New Revision: 57281 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=57281&view=rev >> Log: >> Add '=DIR' to the --with-llvmobj help, for consistency with all the >> other options. >> >> Modified: >> test-suite/trunk/autoconf/configure.ac >> >> Modified: test-suite/trunk/autoconf/configure.ac >> URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/autoconf/configure.ac?rev=57281&r1=57280&r2=57281&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- test-suite/trunk/autoconf/configure.ac (original) >> +++ test-suite/trunk/autoconf/configure.ac Tue Oct 7 18:30:36 2008 >> @@ -58,7 +58,7 @@ >> >> dnl Location of LLVM object code >> AC_ARG_WITH(llvmobj, >> - AS_HELP_STRING([--with-llvmobj],Location of LLVM Object Code), >> + AS_HELP_STRING([--with-llvmobj=DIR],Location of LLVM Object Code), >> AC_SUBST(LLVM_OBJ,[$withval]), >> AC_SUBST(LLVM_OBJ,[`cd ../..; pwd`])) >> >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20081015/eed4b18f/attachment.html From gohman at apple.com Wed Oct 15 18:10:02 2008 From: gohman at apple.com (Dan Gohman) Date: Wed, 15 Oct 2008 23:10:02 -0000 Subject: [llvm-commits] [test-suite] r57607 - /test-suite/trunk/configure Message-ID: <200810152310.m9FNA3G9027383@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 18:10:02 2008 New Revision: 57607 URL: http://llvm.org/viewvc/llvm-project?rev=57607&view=rev Log: Regenerate configure. Modified: test-suite/trunk/configure Modified: test-suite/trunk/configure URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/configure?rev=57607&r1=57606&r2=57607&view=diff ============================================================================== --- test-suite/trunk/configure (original) +++ test-suite/trunk/configure Wed Oct 15 18:10:02 2008 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for LLVM-TEST 2.5svn. +# Generated by GNU Autoconf 2.61 for LLVM-TEST 2.5svn. # # Report bugs to . # @@ -12,7 +12,8 @@ ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -21,10 +22,13 @@ alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + + # PATH needs CR @@ -217,7 +221,7 @@ else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. @@ -235,7 +239,6 @@ # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF -# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -244,10 +247,12 @@ alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + : _ASEOF @@ -255,7 +260,6 @@ CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF -# Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -264,10 +268,12 @@ alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + : (as_func_return () { @@ -514,19 +520,28 @@ as_mkdir_p=false fi -# Find out whether ``test -x'' works. Don't use a zero-byte file, as -# systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - as_executable_p="test -x" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - as_executable_p=: + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi -rm -f conf$$.file +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -721,36 +736,36 @@ # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include #endif -#if HAVE_STDINT_H +#ifdef HAVE_STDINT_H # include #endif -#if HAVE_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif" @@ -828,8 +843,8 @@ CPP ifGNUmake LEX -LEXLIB LEX_OUTPUT_ROOT +LEXLIB FLEX YACC YFLAGS @@ -877,6 +892,7 @@ CXX CXXFLAGS LDFLAGS +LIBS CPPFLAGS CCC CC @@ -992,10 +1008,10 @@ -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) @@ -1011,10 +1027,10 @@ -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ @@ -1208,19 +1224,19 @@ -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) @@ -1475,7 +1491,7 @@ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-llvmsrc=DIR Location of LLVM Source Code - --with-llvmobj Location of LLVM Object Code + --with-llvmobj=DIR Location of LLVM Object Code --with-externals=DIR Location of External Test code --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use @@ -1498,6 +1514,7 @@ CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command @@ -1577,7 +1594,7 @@ if $ac_init_version; then cat <<\_ACEOF LLVM-TEST configure 2.5svn -generated by GNU Autoconf 2.60 +generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -1591,7 +1608,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by LLVM-TEST $as_me 2.5svn, which was -generated by GNU Autoconf 2.60. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2548,7 +2565,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2592,7 +2609,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2726,7 +2743,7 @@ # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. -for ac_file in $ac_files +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in @@ -2754,6 +2771,12 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else + ac_file='' +fi + +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } +if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -2765,8 +2788,6 @@ fi ac_exeext=$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. @@ -2944,27 +2965,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 @@ -3019,27 +3023,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 @@ -3074,27 +3061,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 @@ -3130,27 +3100,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 @@ -3215,7 +3168,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3259,7 +3212,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3377,27 +3330,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 @@ -3452,27 +3388,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 @@ -3507,27 +3426,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 @@ -3563,27 +3465,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 @@ -3699,27 +3584,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 @@ -3808,17 +3676,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -3852,17 +3713,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -3927,17 +3781,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -3971,17 +3818,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -4072,7 +3912,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LEX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4097,209 +3937,108 @@ done test -n "$LEX" || LEX=":" -if test -z "$LEXLIB" -then - { echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5 -echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6; } -if test "${ac_cv_lib_fl_yywrap+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lfl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" +if test "x$LEX" != "x:"; then + cat >conftest.l <<_ACEOF +%% +a { ECHO; } +b { REJECT; } +c { yymore (); } +d { yyless (1); } +e { yyless (input () != 0); } +f { unput (yytext[0]); } +. { BEGIN INITIAL; } +%% +#ifdef YYTEXT_POINTER +extern char *yytext; #endif -char yywrap (); int -main () +main (void) { -return yywrap (); - ; - return 0; + return ! yylex () + ! yywrap (); } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +{ (ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$LEX conftest.l") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_fl_yywrap=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_fl_yywrap=no -fi - -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5 -echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6; } -if test $ac_cv_lib_fl_yywrap = yes; then - LEXLIB="-lfl" -else - { echo "$as_me:$LINENO: checking for yywrap in -ll" >&5 -echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6; } -if test "${ac_cv_lib_l_yywrap+set}" = set; then + (exit $ac_status); } +{ echo "$as_me:$LINENO: checking lex output file root" >&5 +echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; } +if test "${ac_cv_prog_lex_root+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ll $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char yywrap (); -int -main () -{ -return yywrap (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_l_yywrap=yes +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_l_yywrap=no -fi - -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5 -echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6; } -if test $ac_cv_lib_l_yywrap = yes; then - LEXLIB="-ll" -fi - + { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 +echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} + { (exit 1); exit 1; }; } fi - fi +{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 +echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; } +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root -if test "x$LEX" != "x:"; then - { echo "$as_me:$LINENO: checking lex output file root" >&5 -echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; } -if test "${ac_cv_prog_lex_root+set}" = set; then +if test -z "${LEXLIB+set}"; then + { echo "$as_me:$LINENO: checking lex library" >&5 +echo $ECHO_N "checking lex library... $ECHO_C" >&6; } +if test "${ac_cv_lib_lex+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - # The minimal lex program is just a single line: %%. But some broken lexes -# (Solaris, I think it was) want two %% lines, so accommodate them. -cat >conftest.l <<_ACEOF -%% -%% + + ac_save_LIBS=$LIBS + ac_cv_lib_lex='none needed' + for ac_lib in '' -lfl -ll; do + LIBS="$ac_lib $ac_save_LIBS" + cat >conftest.$ac_ext <<_ACEOF +`cat $LEX_OUTPUT_ROOT.c` _ACEOF -{ (ac_try="$LEX conftest.l" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$LEX conftest.l") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy -elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_lex=$ac_lib else - { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 -echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} - { (exit 1); exit 1; }; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + test "$ac_cv_lib_lex" != 'none needed' && break + done + LIBS=$ac_save_LIBS + fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 +echo "${ECHO_T}$ac_cv_lib_lex" >&6; } + test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 -echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; } -rm -f conftest.l -LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + { echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; } @@ -4307,13 +4046,13 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since +# default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no -echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS=$LIBS -LIBS="$LIBS $LEXLIB" +LIBS="$LEXLIB $ac_save_LIBS" cat >conftest.$ac_ext <<_ACEOF +#define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext @@ -4329,27 +4068,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_prog_lex_yytext_pointer=yes else echo "$as_me: failed program was:" >&5 @@ -4358,10 +4081,9 @@ fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS -rm -f "${LEX_OUTPUT_ROOT}.c" fi { echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 @@ -4373,6 +4095,7 @@ _ACEOF fi +rm -f conftest.l $LEX_OUTPUT_ROOT.c fi @@ -4411,7 +4134,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_YACC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4680,7 +4403,7 @@ for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_executable_p "$ac_path_GREP"; } || continue + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4762,7 +4485,7 @@ for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_executable_p "$ac_path_EGREP"; } || continue + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -5242,7 +4965,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5245 "configure"' > conftest.$ac_ext + echo '#line 4968 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5366,27 +5089,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 @@ -5395,7 +5102,7 @@ lt_cv_cc_needs_belf=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -5475,27 +5182,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 @@ -5671,27 +5361,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 @@ -5754,27 +5427,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 @@ -5810,17 +5466,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 @@ -5937,17 +5586,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -5981,17 +5623,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -6056,17 +5691,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : else echo "$as_me: failed program was:" >&5 @@ -6100,17 +5728,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_cxx_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + (exit $ac_status); } >/dev/null && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else @@ -6151,7 +5772,7 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -6169,7 +5790,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6195,7 +5816,7 @@ fi if test -z "$F77"; then ac_ct_F77=$F77 - for ac_prog in g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77 f90 xlf90 pgf90 pghpf epcf90 gfortran g95 f95 fort xlf95 ifort ifc efc pgf95 lf95 ftn + for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -6213,7 +5834,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6320,27 +5941,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 @@ -6383,27 +5987,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 @@ -6858,7 +6445,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6898,7 +6485,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6954,7 +6541,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6994,7 +6581,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7050,7 +6637,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7090,7 +6677,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7407,11 +6994,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7410: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6997: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7414: \$? = $ac_status" >&5 + echo "$as_me:7001: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7675,11 +7262,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7678: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7265: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7682: \$? = $ac_status" >&5 + echo "$as_me:7269: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7779,11 +7366,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7782: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7369: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7786: \$? = $ac_status" >&5 + echo "$as_me:7373: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8259,27 +7846,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -8293,7 +7864,7 @@ fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -8334,27 +7905,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -8368,7 +7923,7 @@ fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -9616,27 +9171,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 @@ -9645,7 +9184,7 @@ ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -9727,27 +9266,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 @@ -9756,7 +9279,7 @@ ac_cv_func_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 @@ -9800,33 +9323,17 @@ *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 @@ -9835,7 +9342,7 @@ ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -9907,27 +9414,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 @@ -9936,7 +9427,7 @@ ac_cv_func_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 @@ -9986,27 +9477,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 @@ -10015,7 +9490,7 @@ ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -10066,27 +9541,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 @@ -10095,7 +9554,7 @@ ac_cv_lib_svld_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -10146,27 +9605,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 @@ -10175,7 +9618,7 @@ ac_cv_lib_dld_dld_link=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi @@ -10231,7 +9674,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -11452,7 +10879,7 @@ fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -11494,27 +10921,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_cxx_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -11528,7 +10939,7 @@ fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -12699,11 +12110,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12702: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12113: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12706: \$? = $ac_status" >&5 + echo "$as_me:12117: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12803,11 +12214,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12806: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12217: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12810: \$? = $ac_status" >&5 + echo "$as_me:12221: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14373,11 +13784,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14376: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13787: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14380: \$? = $ac_status" >&5 + echo "$as_me:13791: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14477,11 +13888,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14480: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13891: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14484: \$? = $ac_status" >&5 + echo "$as_me:13895: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14947,27 +14358,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -14981,7 +14376,7 @@ fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -15012,27 +14407,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_f77_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -15046,7 +14425,7 @@ fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -16712,11 +16091,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16715: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16094: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16719: \$? = $ac_status" >&5 + echo "$as_me:16098: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16980,11 +16359,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16983: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16362: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16987: \$? = $ac_status" >&5 + echo "$as_me:16366: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17084,11 +16463,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17087: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16466: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17091: \$? = $ac_status" >&5 + echo "$as_me:16470: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17564,27 +16943,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -17598,7 +16961,7 @@ fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -17639,27 +17002,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` @@ -17673,7 +17020,7 @@ fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi @@ -20383,27 +19730,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 @@ -20580,27 +19910,10 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 @@ -20663,27 +19976,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then llvm_cv_link_use_r=yes else echo "$as_me: failed program was:" >&5 @@ -20692,7 +19989,7 @@ llvm_cv_link_use_r=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$oldcflags" ac_ext=c @@ -20777,27 +20074,11 @@ rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then ac_cv_func_re_comp=yes else echo "$as_me: failed program was:" >&5 @@ -20806,7 +20087,7 @@ ac_cv_func_re_comp=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_re_comp" >&5 @@ -20994,7 +20275,8 @@ ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: @@ -21003,10 +20285,13 @@ alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh + + # PATH needs CR @@ -21230,19 +20515,28 @@ as_mkdir_p=false fi -# Find out whether ``test -x'' works. Don't use a zero-byte file, as -# systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - as_executable_p="test -x" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' else - as_executable_p=: + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' fi -rm -f conf$$.file +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -21258,7 +20552,7 @@ # values after options handling. ac_log=" This file was extended by LLVM-TEST $as_me 2.5svn, which was -generated by GNU Autoconf 2.60. Invocation command line was +generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -21286,7 +20580,7 @@ Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions @@ -21305,7 +20599,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ LLVM-TEST config.status 2.5svn -configured by $0, generated by GNU Autoconf 2.60, +configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. @@ -21579,8 +20873,8 @@ CPP!$CPP$ac_delim ifGNUmake!$ifGNUmake$ac_delim LEX!$LEX$ac_delim -LEXLIB!$LEXLIB$ac_delim LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim +LEXLIB!$LEXLIB$ac_delim FLEX!$FLEX$ac_delim YACC!$YACC$ac_delim YFLAGS!$YFLAGS$ac_delim From gohman at apple.com Wed Oct 15 18:19:35 2008 From: gohman at apple.com (Dan Gohman) Date: Wed, 15 Oct 2008 23:19:35 -0000 Subject: [llvm-commits] [llvm] r57608 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/load.ll test/Transforms/InstCombine/load3.ll Message-ID: <200810152319.m9FNJaJi027736@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 18:19:35 2008 New Revision: 57608 URL: http://llvm.org/viewvc/llvm-project?rev=57608&view=rev Log: Teach instcombine's visitLoad to scan back several instructions to find opportunities for store-to-load forwarding or load CSE, in the same way that visitStore scans back to do DSE. Also, define a new helper function for testing whether the addresses of two memory accesses are known to have the same value, and use it in both visitStore and visitLoad. These two changes allow instcombine to eliminate loads in code produced by front-ends that frequently emit obviously redundant addressing for memory references. Added: llvm/trunk/test/Transforms/InstCombine/load3.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp llvm/trunk/test/Transforms/InstCombine/load.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=57608&r1=57607&r2=57608&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Wed Oct 15 18:19:35 2008 @@ -10601,6 +10601,31 @@ return false; } +/// equivalentAddressValues - Test if A and B will obviously have the same +/// value. This includes recognizing that %t0 and %t1 will have the same +/// value in code like this: +/// %t0 = getelementptr @a, 0, 3 +/// store i32 0, i32* %t0 +/// %t1 = getelementptr @a, 0, 3 +/// %t2 = load i32* %t1 +/// +static bool equivalentAddressValues(Value *A, Value *B) { + // Test if the values are trivially equivalent. + if (A == B) return true; + + // Test if the values come form identical arithmetic instructions. + if (isa(A) || + isa(A) || + isa(A) || + isa(A)) + if (Instruction *BI = dyn_cast(B)) + if (cast(A)->isIdenticalTo(BI)) + return true; + + // Otherwise they may not be equivalent. + return false; +} + Instruction *InstCombiner::visitLoadInst(LoadInst &LI) { Value *Op = LI.getOperand(0); @@ -10619,16 +10644,25 @@ // None of the following transforms are legal for volatile loads. if (LI.isVolatile()) return 0; - if (&LI.getParent()->front() != &LI) { - BasicBlock::iterator BBI = &LI; --BBI; - // If the instruction immediately before this is a store to the same - // address, do a simple form of store->load forwarding. - if (StoreInst *SI = dyn_cast(BBI)) - if (SI->getOperand(1) == LI.getOperand(0)) + // Do really simple store-to-load forwarding and load CSE, to catch cases + // where there are several consequtive memory accesses to the same location, + // separated by a few arithmetic operations. + BasicBlock::iterator BBI = &LI; + for (unsigned ScanInsts = 6; BBI != LI.getParent()->begin() && ScanInsts; + --ScanInsts) { + --BBI; + + if (StoreInst *SI = dyn_cast(BBI)) { + if (equivalentAddressValues(SI->getOperand(1), LI.getOperand(0))) return ReplaceInstUsesWith(LI, SI->getOperand(0)); - if (LoadInst *LIB = dyn_cast(BBI)) - if (LIB->getOperand(0) == LI.getOperand(0)) + } else if (LoadInst *LIB = dyn_cast(BBI)) { + if (equivalentAddressValues(LIB->getOperand(0), LI.getOperand(0))) return ReplaceInstUsesWith(LI, LIB); + } + + // Don't skip over things that can modify memory. + if (BBI->mayWriteToMemory()) + break; } if (GetElementPtrInst *GEPI = dyn_cast(Op)) { @@ -10841,7 +10875,8 @@ if (StoreInst *PrevSI = dyn_cast(BBI)) { // Prev store isn't volatile, and stores to the same location? - if (!PrevSI->isVolatile() && PrevSI->getOperand(1) == SI.getOperand(1)) { + if (!PrevSI->isVolatile() && equivalentAddressValues(PrevSI->getOperand(1), + SI.getOperand(1))) { ++NumDeadStore; ++BBI; EraseInstFromFunction(*PrevSI); @@ -10854,7 +10889,8 @@ // the pointer we're loading and is producing the pointer we're storing, // then *this* store is dead (X = load P; store X -> P). if (LoadInst *LI = dyn_cast(BBI)) { - if (LI == Val && LI->getOperand(0) == Ptr && !SI.isVolatile()) { + if (LI == Val && equivalentAddressValues(LI->getOperand(0), Ptr) && + !SI.isVolatile()) { EraseInstFromFunction(SI); ++NumCombined; return 0; Modified: llvm/trunk/test/Transforms/InstCombine/load.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/load.ll?rev=57608&r1=57607&r2=57608&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/load.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/load.ll Wed Oct 15 18:19:35 2008 @@ -68,3 +68,11 @@ %V = load i32* %P ; [#uses=1] ret i32 %V } + +define double @test11(double* %p) { + %t0 = getelementptr double* %p, i32 1 + store double 2.0, double* %t0 + %t1 = getelementptr double* %p, i32 1 + %x = load double* %t1 + ret double %x +} Added: llvm/trunk/test/Transforms/InstCombine/load3.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/load3.ll?rev=57608&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/load3.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/load3.ll Wed Oct 15 18:19:35 2008 @@ -0,0 +1,14 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep load | count 1 + +; Instcombine should be able to do trivial CSE of loads. + +declare void @use(double %n) +define void @bar(double* %p) { + %t0 = getelementptr double* %p, i32 1 + %y = load double* %t0 + %t1 = getelementptr double* %p, i32 1 + %x = load double* %t1 + call void @use(double %x) + call void @use(double %y) + ret void +} From isanbard at gmail.com Wed Oct 15 18:43:31 2008 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 15 Oct 2008 23:43:31 -0000 Subject: [llvm-commits] [llvm] r57610 - /llvm/tags/Apple/llvmCore-2076/ Message-ID: <200810152343.m9FNhV5W028526@zion.cs.uiuc.edu> Author: void Date: Wed Oct 15 18:43:28 2008 New Revision: 57610 URL: http://llvm.org/viewvc/llvm-project?rev=57610&view=rev Log: Creating llvmCore-2076 branch Added: llvm/tags/Apple/llvmCore-2076/ - copied from r57609, llvm/trunk/ From isanbard at gmail.com Wed Oct 15 18:43:39 2008 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 15 Oct 2008 23:43:39 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57611 - /llvm-gcc-4.2/tags/Apple/llvmgcc42-2076/ Message-ID: <200810152343.m9FNhdVl028540@zion.cs.uiuc.edu> Author: void Date: Wed Oct 15 18:43:39 2008 New Revision: 57611 URL: http://llvm.org/viewvc/llvm-project?rev=57611&view=rev Log: Creating llvmgcc42-2076 branch Added: llvm-gcc-4.2/tags/Apple/llvmgcc42-2076/ - copied from r57610, llvm-gcc-4.2/trunk/ From gohman at apple.com Wed Oct 15 19:03:02 2008 From: gohman at apple.com (Dan Gohman) Date: Thu, 16 Oct 2008 00:03:02 -0000 Subject: [llvm-commits] [llvm] r57612 - /llvm/trunk/lib/Target/X86/X86InstrSSE.td Message-ID: <200810160003.m9G0335i029514@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 19:03:00 2008 New Revision: 57612 URL: http://llvm.org/viewvc/llvm-project?rev=57612&view=rev Log: Fix the predicate for memop64 to be a regular load, not just an unindexed load. Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=57612&r1=57611&r2=57612&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Wed Oct 15 19:03:00 2008 @@ -134,7 +134,7 @@ // SSSE3 uses MMX registers for some instructions. They aren't aligned on a // 16-byte boundary. // FIXME: 8 byte alignment for mmx reads is not required -def memop64 : PatFrag<(ops node:$ptr), (unindexedload node:$ptr), [{ +def memop64 : PatFrag<(ops node:$ptr), (load node:$ptr), [{ return cast(N)->getAlignment() >= 8; }]>; From gohman at apple.com Wed Oct 15 19:11:23 2008 From: gohman at apple.com (Dan Gohman) Date: Thu, 16 Oct 2008 00:11:23 -0000 Subject: [llvm-commits] [llvm] r57614 - /llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp Message-ID: <200810160011.m9G0BNIg030795@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 19:11:23 2008 New Revision: 57614 URL: http://llvm.org/viewvc/llvm-project?rev=57614&view=rev Log: Fix a subtle bug in DeadMachineInstructionElim's liveness computation. A def of a register doesn't necessarily kill live super-registers. Modified: llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp Modified: llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp?rev=57614&r1=57613&r2=57614&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp (original) +++ llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp Wed Oct 15 19:11:23 2008 @@ -126,7 +126,10 @@ unsigned Reg = MO.getReg(); if (Reg != 0 && TargetRegisterInfo::isPhysicalRegister(Reg)) { LivePhysRegs.reset(Reg); - for (const unsigned *AliasSet = TRI->getAliasSet(Reg); + // Check the subreg set, not the alias set, because a def + // of a super-register may still be partially live after + // this def. + for (const unsigned *AliasSet = TRI->getSubRegisters(Reg); *AliasSet; ++AliasSet) LivePhysRegs.reset(*AliasSet); } From gohman at apple.com Wed Oct 15 19:12:40 2008 From: gohman at apple.com (Dan Gohman) Date: Thu, 16 Oct 2008 00:12:40 -0000 Subject: [llvm-commits] [llvm] r57615 - /llvm/trunk/include/llvm/ADT/STLExtras.h Message-ID: <200810160012.m9G0Ce7g030843@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 19:12:39 2008 New Revision: 57615 URL: http://llvm.org/viewvc/llvm-project?rev=57615&view=rev Log: Fix several places that called mapped_iterator's constructor without passing in a function object. Modified: llvm/trunk/include/llvm/ADT/STLExtras.h Modified: llvm/trunk/include/llvm/ADT/STLExtras.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/STLExtras.h?rev=57615&r1=57614&r2=57615&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/STLExtras.h (original) +++ llvm/trunk/include/llvm/ADT/STLExtras.h Wed Oct 15 19:12:39 2008 @@ -73,6 +73,7 @@ typedef mapped_iterator _Self; inline const RootIt &getCurrent() const { return current; } + inline const UnaryFunc &getFunc() const { return Fn; } inline explicit mapped_iterator(const RootIt &I, UnaryFunc F) : current(I), Fn(F) {} @@ -87,9 +88,13 @@ _Self& operator--() { --current; return *this; } _Self operator++(int) { _Self __tmp = *this; ++current; return __tmp; } _Self operator--(int) { _Self __tmp = *this; --current; return __tmp; } - _Self operator+ (difference_type n) const { return _Self(current + n); } + _Self operator+ (difference_type n) const { + return _Self(current + n, Fn); + } _Self& operator+= (difference_type n) { current += n; return *this; } - _Self operator- (difference_type n) const { return _Self(current - n); } + _Self operator- (difference_type n) const { + return _Self(current - n, Fn); + } _Self& operator-= (difference_type n) { current -= n; return *this; } reference operator[](difference_type n) const { return *(*this + n); } @@ -106,7 +111,7 @@ inline mapped_iterator<_Iterator, Func> operator+(typename mapped_iterator<_Iterator, Func>::difference_type N, const mapped_iterator<_Iterator, Func>& X) { - return mapped_iterator<_Iterator, Func>(X.getCurrent() - N); + return mapped_iterator<_Iterator, Func>(X.getCurrent() - N, X.getFunc()); } From gohman at apple.com Wed Oct 15 19:15:26 2008 From: gohman at apple.com (Dan Gohman) Date: Thu, 16 Oct 2008 00:15:26 -0000 Subject: [llvm-commits] [llvm] r57616 - /llvm/trunk/include/llvm/ADT/SmallVector.h Message-ID: <200810160015.m9G0FQae030932@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 19:15:24 2008 New Revision: 57616 URL: http://llvm.org/viewvc/llvm-project?rev=57616&view=rev Log: Implement a SmallVector insert method that can insert multiple copies of a value, and add several additional utilities to make SmallVector better conform to the Container concept. Modified: llvm/trunk/include/llvm/ADT/SmallVector.h Modified: llvm/trunk/include/llvm/ADT/SmallVector.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallVector.h?rev=57616&r1=57615&r2=57616&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/SmallVector.h (original) +++ llvm/trunk/include/llvm/ADT/SmallVector.h Wed Oct 15 19:15:24 2008 @@ -91,6 +91,7 @@ } typedef size_t size_type; + typedef ptrdiff_t difference_type; typedef T value_type; typedef T* iterator; typedef const T* const_iterator; @@ -100,9 +101,12 @@ typedef T& reference; typedef const T& const_reference; + typedef T* pointer; + typedef const T* const_pointer; bool empty() const { return Begin == End; } size_type size() const { return End-Begin; } + size_type max_size() const { return size_type(-1) / sizeof(T); } // forward iterator creation methods. iterator begin() { return Begin; } @@ -208,6 +212,18 @@ End += NumInputs; } + /// append - Add the specified range to the end of the SmallVector. + /// + void append(size_type NumInputs, const T &Elt) { + // Grow allocated space if needed. + if (End+NumInputs > Capacity) + grow(size()+NumInputs); + + // Copy the new elements over. + std::uninitialized_fill_n(End, NumInputs, Elt); + End += NumInputs; + } + void assign(unsigned NumElts, const T &Elt) { clear(); if (unsigned(Capacity-Begin) < NumElts) @@ -255,6 +271,52 @@ I = Begin+EltNo; goto Retry; } + + iterator insert(iterator I, size_type NumToInsert, const T &Elt) { + if (I == End) { // Important special case for empty vector. + append(NumToInsert, Elt); + return end()-1; + } + + // Convert iterator to elt# to avoid invalidating iterator when we reserve() + size_t InsertElt = I-begin(); + + // Ensure there is enough space. + reserve(static_cast(size() + NumToInsert)); + + // Uninvalidate the iterator. + I = begin()+InsertElt; + + // If we already have this many elements in the collection, append the + // dest elements at the end, then copy over the appropriate elements. Since + // we already reserved space, we know that this won't reallocate the vector. + if (size() >= NumToInsert) { + T *OldEnd = End; + append(End-NumToInsert, End); + + // Copy the existing elements that get replaced. + std::copy(I, OldEnd-NumToInsert, I+NumToInsert); + + std::fill_n(I, NumToInsert, Elt); + return I; + } + + // Otherwise, we're inserting more elements than exist already, and we're + // not inserting at the end. + + // Copy over the elements that we're about to overwrite. + T *OldEnd = End; + End += NumToInsert; + size_t NumOverwritten = OldEnd-I; + std::uninitialized_copy(I, OldEnd, End-NumOverwritten); + + // Replace the overwritten part. + std::fill_n(I, NumOverwritten, Elt); + + // Insert the non-overwritten middle part. + std::uninitialized_fill_n(OldEnd, NumToInsert-NumOverwritten, Elt); + return I; + } template iterator insert(iterator I, ItTy From, ItTy To) { From gohman at apple.com Wed Oct 15 19:20:15 2008 From: gohman at apple.com (Dan Gohman) Date: Thu, 16 Oct 2008 00:20:15 -0000 Subject: [llvm-commits] [llvm] r57617 - in /llvm/trunk: include/llvm/CodeGen/MachineModuleInfo.h lib/CodeGen/MachineModuleInfo.cpp Message-ID: <200810160020.m9G0KFFT031075@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 19:20:14 2008 New Revision: 57617 URL: http://llvm.org/viewvc/llvm-project?rev=57617&view=rev Log: Move the include of MachineLocation.h into MachineModuleInfo.h because it declares a std::vector, and strict concept checking requires the definition of MachineMove to be available. Modified: llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Modified: llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h?rev=57617&r1=57616&r2=57617&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h Wed Oct 15 19:20:14 2008 @@ -38,6 +38,7 @@ #include "llvm/ADT/UniqueVector.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/StringMap.h" +#include "llvm/CodeGen/MachineLocation.h" #include "llvm/GlobalValue.h" #include "llvm/Pass.h" @@ -50,7 +51,6 @@ class GlobalVariable; class MachineBasicBlock; class MachineFunction; -class MachineMove; class Module; class PointerType; class StructType; Modified: llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp?rev=57617&r1=57616&r2=57617&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Wed Oct 15 19:20:14 2008 @@ -13,7 +13,6 @@ #include "llvm/Analysis/ValueTracking.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/MachineLocation.h" #include "llvm/CodeGen/Passes.h" #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" From evan.cheng at apple.com Wed Oct 15 19:40:53 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 15 Oct 2008 17:40:53 -0700 Subject: [llvm-commits] [llvm] r57614 - /llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp In-Reply-To: <200810160011.m9G0BNIg030795@zion.cs.uiuc.edu> References: <200810160011.m9G0BNIg030795@zion.cs.uiuc.edu> Message-ID: It read / mod / write the super-register. I think what LiveVariable does is adding an implicit use (and kill) of the same register. Please change the name of AliasSet to something more appropriate. Thanks, Evan On Oct 15, 2008, at 5:11 PM, Dan Gohman wrote: > Author: djg > Date: Wed Oct 15 19:11:23 2008 > New Revision: 57614 > > URL: http://llvm.org/viewvc/llvm-project?rev=57614&view=rev > Log: > Fix a subtle bug in DeadMachineInstructionElim's liveness > computation. A def of a register doesn't necessarily kill > live super-registers. > > Modified: > llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp > > Modified: llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp?rev=57614&r1=57613&r2=57614&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp (original) > +++ llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp Wed Oct 15 > 19:11:23 2008 > @@ -126,7 +126,10 @@ > unsigned Reg = MO.getReg(); > if (Reg != 0 && > TargetRegisterInfo::isPhysicalRegister(Reg)) { > LivePhysRegs.reset(Reg); > - for (const unsigned *AliasSet = TRI->getAliasSet(Reg); > + // Check the subreg set, not the alias set, because a def > + // of a super-register may still be partially live after > + // this def. > + for (const unsigned *AliasSet = TRI- > >getSubRegisters(Reg); > *AliasSet; ++AliasSet) > LivePhysRegs.reset(*AliasSet); > } > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From gohman at apple.com Wed Oct 15 20:06:20 2008 From: gohman at apple.com (Dan Gohman) Date: Thu, 16 Oct 2008 01:06:20 -0000 Subject: [llvm-commits] [llvm] r57618 - /llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp Message-ID: <200810160106.m9G16LAG032573@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 20:06:18 2008 New Revision: 57618 URL: http://llvm.org/viewvc/llvm-project?rev=57618&view=rev Log: Rename AliasSet to SubRegs, to reflect changes in the surrounding code. Modified: llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp Modified: llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp?rev=57618&r1=57617&r2=57618&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp (original) +++ llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp Wed Oct 15 20:06:18 2008 @@ -129,9 +129,9 @@ // Check the subreg set, not the alias set, because a def // of a super-register may still be partially live after // this def. - for (const unsigned *AliasSet = TRI->getSubRegisters(Reg); - *AliasSet; ++AliasSet) - LivePhysRegs.reset(*AliasSet); + for (const unsigned *SubRegs = TRI->getSubRegisters(Reg); + *SubRegs; ++SubRegs) + LivePhysRegs.reset(*SubRegs); } } } From gohman at apple.com Wed Oct 15 20:08:52 2008 From: gohman at apple.com (Dan Gohman) Date: Wed, 15 Oct 2008 18:08:52 -0700 Subject: [llvm-commits] [llvm] r57614 - /llvm/trunk/lib/CodeGen/DeadMachineInstructionElim.cpp In-Reply-To: References: <200810160011.m9G0BNIg030795@zion.cs.uiuc.edu> Message-ID: <31E7007C-5D61-4A97-9953-0EBC45FA993C@apple.com> On Oct 15, 2008, at 5:40 PM, Evan Cheng wrote: > It read / mod / write the super-register. I think what LiveVariable > does is adding an implicit use (and kill) of the same register. DeadMachineInstructionElim doesn't mark kills or uses, it's just looking for defs with no uses. > > > Please change the name of AliasSet to something more appropriate. Done. Thanks, Dan From gohman at apple.com Wed Oct 15 20:24:50 2008 From: gohman at apple.com (Dan Gohman) Date: Thu, 16 Oct 2008 01:24:50 -0000 Subject: [llvm-commits] [llvm] r57620 - /llvm/trunk/lib/VMCore/Instruction.cpp Message-ID: <200810160124.m9G1OptY000640@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 20:24:45 2008 New Revision: 57620 URL: http://llvm.org/viewvc/llvm-project?rev=57620&view=rev Log: Fix Instruction::isIdenticalTo and isSameOperationAs to recognize additional information in Loads, Stores, Calls, Invokes, InsertValueInsts, and ExtractValueInsts. Modified: llvm/trunk/lib/VMCore/Instruction.cpp Modified: llvm/trunk/lib/VMCore/Instruction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instruction.cpp?rev=57620&r1=57619&r2=57620&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Instruction.cpp (original) +++ llvm/trunk/lib/VMCore/Instruction.cpp Wed Oct 15 20:24:45 2008 @@ -172,13 +172,39 @@ // Check special state that is a part of some instructions. if (const LoadInst *LI = dyn_cast(this)) - return LI->isVolatile() == cast(I)->isVolatile(); + return LI->isVolatile() == cast(I)->isVolatile() && + LI->getAlignment() == cast(I)->getAlignment(); if (const StoreInst *SI = dyn_cast(this)) - return SI->isVolatile() == cast(I)->isVolatile(); + return SI->isVolatile() == cast(I)->isVolatile() && + SI->getAlignment() == cast(I)->getAlignment(); if (const CmpInst *CI = dyn_cast(this)) return CI->getPredicate() == cast(I)->getPredicate(); if (const CallInst *CI = dyn_cast(this)) - return CI->isTailCall() == cast(I)->isTailCall(); + return CI->isTailCall() == cast(I)->isTailCall() && + CI->getCallingConv() == cast(I)->getCallingConv() && + CI->getAttributes().getRawPointer() == + cast(I)->getAttributes().getRawPointer(); + if (const InvokeInst *CI = dyn_cast(this)) + return CI->getCallingConv() == cast(I)->getCallingConv() && + CI->getAttributes().getRawPointer() == + cast(I)->getAttributes().getRawPointer(); + if (const InsertValueInst *IVI = dyn_cast(this)) { + if (IVI->getNumIndices() != cast(I)->getNumIndices()) + return false; + for (unsigned i = 0, e = IVI->getNumIndices(); i != e; ++i) + if (IVI->idx_begin()[i] != cast(I)->idx_begin()[i]) + return false; + return true; + } + if (const ExtractValueInst *EVI = dyn_cast(this)) { + if (EVI->getNumIndices() != cast(I)->getNumIndices()) + return false; + for (unsigned i = 0, e = EVI->getNumIndices(); i != e; ++i) + if (EVI->idx_begin()[i] != cast(I)->idx_begin()[i]) + return false; + return true; + } + return true; } @@ -196,13 +222,38 @@ // Check special state that is a part of some instructions. if (const LoadInst *LI = dyn_cast(this)) - return LI->isVolatile() == cast(I)->isVolatile(); + return LI->isVolatile() == cast(I)->isVolatile() && + LI->getAlignment() == cast(I)->getAlignment(); if (const StoreInst *SI = dyn_cast(this)) - return SI->isVolatile() == cast(I)->isVolatile(); + return SI->isVolatile() == cast(I)->isVolatile() && + SI->getAlignment() == cast(I)->getAlignment(); if (const CmpInst *CI = dyn_cast(this)) return CI->getPredicate() == cast(I)->getPredicate(); if (const CallInst *CI = dyn_cast(this)) - return CI->isTailCall() == cast(I)->isTailCall(); + return CI->isTailCall() == cast(I)->isTailCall() && + CI->getCallingConv() == cast(I)->getCallingConv() && + CI->getAttributes().getRawPointer() == + cast(I)->getAttributes().getRawPointer(); + if (const InvokeInst *CI = dyn_cast(this)) + return CI->getCallingConv() == cast(I)->getCallingConv() && + CI->getAttributes().getRawPointer() == + cast(I)->getAttributes().getRawPointer(); + if (const InsertValueInst *IVI = dyn_cast(this)) { + if (IVI->getNumIndices() != cast(I)->getNumIndices()) + return false; + for (unsigned i = 0, e = IVI->getNumIndices(); i != e; ++i) + if (IVI->idx_begin()[i] != cast(I)->idx_begin()[i]) + return false; + return true; + } + if (const ExtractValueInst *EVI = dyn_cast(this)) { + if (EVI->getNumIndices() != cast(I)->getNumIndices()) + return false; + for (unsigned i = 0, e = EVI->getNumIndices(); i != e; ++i) + if (EVI->idx_begin()[i] != cast(I)->idx_begin()[i]) + return false; + return true; + } return true; } From gohman at apple.com Wed Oct 15 20:47:48 2008 From: gohman at apple.com (Dan Gohman) Date: Thu, 16 Oct 2008 01:47:48 -0000 Subject: [llvm-commits] [llvm] r57621 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200810160147.m9G1lmUd001262@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 20:47:47 2008 New Revision: 57621 URL: http://llvm.org/viewvc/llvm-project?rev=57621&view=rev Log: Remove an unused variable. Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=57621&r1=57620&r2=57621&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Oct 15 20:47:47 2008 @@ -4880,7 +4880,6 @@ SDValue Op0 = Op.getOperand(0); SDValue Op1 = Op.getOperand(1); SDValue CC = Op.getOperand(2); - ISD::CondCode SetCCOpcode = cast(CC)->get(); bool isFP = Op.getOperand(1).getValueType().isFloatingPoint(); unsigned X86CC; From gohman at apple.com Wed Oct 15 20:49:15 2008 From: gohman at apple.com (Dan Gohman) Date: Thu, 16 Oct 2008 01:49:15 -0000 Subject: [llvm-commits] [llvm] r57622 - in /llvm/trunk: include/llvm/CodeGen/ include/llvm/Target/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/CellSPU/ lib/Target/Mips/ lib/Target/PowerPC/ lib/Target/Sparc/ lib/Target/X86/ Message-ID: <200810160149.m9G1nGde001332@zion.cs.uiuc.edu> Author: djg Date: Wed Oct 15 20:49:15 2008 New Revision: 57622 URL: http://llvm.org/viewvc/llvm-project?rev=57622&view=rev Log: Const-ify several TargetInstrInfo methods. Modified: llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h llvm/trunk/include/llvm/Target/TargetInstrInfo.h llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp llvm/trunk/lib/Target/ARM/ARMInstrInfo.h llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.cpp llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.h llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.cpp llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.h llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp llvm/trunk/lib/Target/Mips/MipsInstrInfo.h llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp llvm/trunk/lib/Target/Sparc/SparcInstrInfo.h llvm/trunk/lib/Target/X86/X86InstrInfo.cpp llvm/trunk/lib/Target/X86/X86InstrInfo.h Modified: llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineBasicBlock.h Wed Oct 15 20:49:15 2008 @@ -102,6 +102,8 @@ MachineInstr& front() { return Insts.front(); } MachineInstr& back() { return Insts.back(); } + const MachineInstr& front() const { return Insts.front(); } + const MachineInstr& back() const { return Insts.back(); } iterator begin() { return Insts.begin(); } const_iterator begin() const { return Insts.begin(); } Modified: llvm/trunk/include/llvm/Target/TargetInstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetInstrInfo.h?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetInstrInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetInstrInfo.h Wed Oct 15 20:49:15 2008 @@ -288,7 +288,7 @@ /// stream. virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, int FrameIndex) const { return 0; } @@ -298,7 +298,7 @@ /// stack slot. virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, MachineInstr* LoadMI) const { return 0; } @@ -306,8 +306,8 @@ /// canFoldMemoryOperand - Returns true if the specified load / store is /// folding is possible. virtual - bool canFoldMemoryOperand(MachineInstr *MI, - SmallVectorImpl &Ops) const{ + bool canFoldMemoryOperand(const MachineInstr *MI, + const SmallVectorImpl &Ops) const { return false; } @@ -338,7 +338,7 @@ /// fall-through into its successor block. This is primarily used when a /// branch is unanalyzable. It is useful for things like unconditional /// indirect branches (jump tables). - virtual bool BlockHasNoFallThrough(MachineBasicBlock &MBB) const { + virtual bool BlockHasNoFallThrough(const MachineBasicBlock &MBB) const { return false; } Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.cpp Wed Oct 15 20:49:15 2008 @@ -663,7 +663,7 @@ MachineInstr *ARMInstrInfo::foldMemoryOperand(MachineFunction &MF, MachineInstr *MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, int FI) const { if (Ops.size() != 1) return NULL; @@ -747,8 +747,8 @@ return NewMI; } -bool ARMInstrInfo::canFoldMemoryOperand(MachineInstr *MI, - SmallVectorImpl &Ops) const { +bool ARMInstrInfo::canFoldMemoryOperand(const MachineInstr *MI, + const SmallVectorImpl &Ops) const { if (Ops.size() != 1) return false; unsigned OpNum = Ops[0]; @@ -780,7 +780,7 @@ return false; } -bool ARMInstrInfo::BlockHasNoFallThrough(MachineBasicBlock &MBB) const { +bool ARMInstrInfo::BlockHasNoFallThrough(const MachineBasicBlock &MBB) const { if (MBB.empty()) return false; switch (MBB.back().getOpcode()) { Modified: llvm/trunk/lib/Target/ARM/ARMInstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrInfo.h?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMInstrInfo.h (original) +++ llvm/trunk/lib/Target/ARM/ARMInstrInfo.h Wed Oct 15 20:49:15 2008 @@ -198,20 +198,20 @@ virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, int FrameIndex) const; virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, MachineInstr* LoadMI) const { return 0; } - virtual bool canFoldMemoryOperand(MachineInstr *MI, - SmallVectorImpl &Ops) const; + virtual bool canFoldMemoryOperand(const MachineInstr *MI, + const SmallVectorImpl &Ops) const; - virtual bool BlockHasNoFallThrough(MachineBasicBlock &MBB) const; + virtual bool BlockHasNoFallThrough(const MachineBasicBlock &MBB) const; virtual bool ReverseBranchCondition(SmallVectorImpl &Cond) const; Modified: llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.cpp?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.cpp Wed Oct 15 20:49:15 2008 @@ -255,7 +255,7 @@ MachineInstr *AlphaInstrInfo::foldMemoryOperand(MachineFunction &MF, MachineInstr *MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, int FrameIndex) const { if (Ops.size() != 1) return NULL; @@ -408,7 +408,7 @@ .addReg(Alpha::R31); } -bool AlphaInstrInfo::BlockHasNoFallThrough(MachineBasicBlock &MBB) const { +bool AlphaInstrInfo::BlockHasNoFallThrough(const MachineBasicBlock &MBB) const { if (MBB.empty()) return false; switch (MBB.back().getOpcode()) { Modified: llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.h?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.h (original) +++ llvm/trunk/lib/Target/Alpha/AlphaInstrInfo.h Wed Oct 15 20:49:15 2008 @@ -69,12 +69,12 @@ virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, int FrameIndex) const; virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, MachineInstr* LoadMI) const { return 0; } @@ -85,7 +85,7 @@ unsigned RemoveBranch(MachineBasicBlock &MBB) const; void insertNoop(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const; - bool BlockHasNoFallThrough(MachineBasicBlock &MBB) const; + bool BlockHasNoFallThrough(const MachineBasicBlock &MBB) const; bool ReverseBranchCondition(SmallVectorImpl &Cond) const; }; Modified: llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.cpp?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.cpp Wed Oct 15 20:49:15 2008 @@ -399,7 +399,7 @@ MachineInstr * SPUInstrInfo::foldMemoryOperand(MachineFunction &MF, MachineInstr *MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, int FrameIndex) const { #if SOMEDAY_SCOTT_LOOKS_AT_ME_AGAIN Modified: llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.h?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.h (original) +++ llvm/trunk/lib/Target/CellSPU/SPUInstrInfo.h Wed Oct 15 20:49:15 2008 @@ -79,13 +79,13 @@ //! Fold spills into load/store instructions virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, int FrameIndex) const; //! Fold any load/store to an operand virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, MachineInstr* LoadMI) const { return 0; } Modified: llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.cpp Wed Oct 15 20:49:15 2008 @@ -281,7 +281,7 @@ MachineInstr *MipsInstrInfo:: foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, int FI) const + const SmallVectorImpl &Ops, int FI) const { if (Ops.size() != 1) return NULL; @@ -602,7 +602,7 @@ /// BlockHasNoFallThrough - Analyze if MachineBasicBlock does not /// fall-through into its successor block. bool MipsInstrInfo:: -BlockHasNoFallThrough(MachineBasicBlock &MBB) const +BlockHasNoFallThrough(const MachineBasicBlock &MBB) const { if (MBB.empty()) return false; Modified: llvm/trunk/lib/Target/Mips/MipsInstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrInfo.h?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsInstrInfo.h (original) +++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.h Wed Oct 15 20:49:15 2008 @@ -196,17 +196,17 @@ virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, int FrameIndex) const; virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, MachineInstr* LoadMI) const { return 0; } - virtual bool BlockHasNoFallThrough(MachineBasicBlock &MBB) const; + virtual bool BlockHasNoFallThrough(const MachineBasicBlock &MBB) const; virtual bool ReverseBranchCondition(SmallVectorImpl &Cond) const; Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.cpp Wed Oct 15 20:49:15 2008 @@ -657,7 +657,7 @@ /// copy instructions, turning them into load/store instructions. MachineInstr *PPCInstrInfo::foldMemoryOperand(MachineFunction &MF, MachineInstr *MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, int FrameIndex) const { if (Ops.size() != 1) return NULL; @@ -730,8 +730,8 @@ return NewMI; } -bool PPCInstrInfo::canFoldMemoryOperand(MachineInstr *MI, - SmallVectorImpl &Ops) const { +bool PPCInstrInfo::canFoldMemoryOperand(const MachineInstr *MI, + const SmallVectorImpl &Ops) const { if (Ops.size() != 1) return false; // Make sure this is a reg-reg copy. Note that we can't handle MCRF, because @@ -751,7 +751,7 @@ } -bool PPCInstrInfo::BlockHasNoFallThrough(MachineBasicBlock &MBB) const { +bool PPCInstrInfo::BlockHasNoFallThrough(const MachineBasicBlock &MBB) const { if (MBB.empty()) return false; switch (MBB.back().getOpcode()) { Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h (original) +++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.h Wed Oct 15 20:49:15 2008 @@ -142,20 +142,20 @@ /// copy instructions, turning them into load/store instructions. virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, int FrameIndex) const; virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, MachineInstr* LoadMI) const { return 0; } - virtual bool canFoldMemoryOperand(MachineInstr *MI, - SmallVectorImpl &Ops) const; + virtual bool canFoldMemoryOperand(const MachineInstr *MI, + const SmallVectorImpl &Ops) const; - virtual bool BlockHasNoFallThrough(MachineBasicBlock &MBB) const; + virtual bool BlockHasNoFallThrough(const MachineBasicBlock &MBB) const; virtual bool ReverseBranchCondition(SmallVectorImpl &Cond) const; Modified: llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp (original) +++ llvm/trunk/lib/Target/Sparc/SparcInstrInfo.cpp Wed Oct 15 20:49:15 2008 @@ -227,7 +227,7 @@ MachineInstr *SparcInstrInfo::foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, int FI) const { if (Ops.size() != 1) return NULL; Modified: llvm/trunk/lib/Target/Sparc/SparcInstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcInstrInfo.h?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcInstrInfo.h (original) +++ llvm/trunk/lib/Target/Sparc/SparcInstrInfo.h Wed Oct 15 20:49:15 2008 @@ -96,12 +96,12 @@ virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, int FrameIndex) const; virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, MachineInstr* LoadMI) const { return 0; } Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Wed Oct 15 20:49:15 2008 @@ -1543,7 +1543,7 @@ } static const MachineInstrBuilder &X86InstrAddOperand(MachineInstrBuilder &MIB, - MachineOperand &MO) { + const MachineOperand &MO) { if (MO.isReg()) MIB = MIB.addReg(MO.getReg(), MO.isDef(), MO.isImplicit(), MO.isKill(), MO.isDead(), MO.getSubReg()); @@ -1872,7 +1872,7 @@ } static MachineInstr *FuseTwoAddrInst(MachineFunction &MF, unsigned Opcode, - SmallVector &MOs, + const SmallVector &MOs, MachineInstr *MI, const TargetInstrInfo &TII) { // Create the base instruction with the memory operand as the first part. MachineInstr *NewMI = MF.CreateMachineInstr(TII.get(Opcode), true); @@ -1898,7 +1898,7 @@ static MachineInstr *FuseInst(MachineFunction &MF, unsigned Opcode, unsigned OpNo, - SmallVector &MOs, + const SmallVector &MOs, MachineInstr *MI, const TargetInstrInfo &TII) { MachineInstr *NewMI = MF.CreateMachineInstr(TII.get(Opcode), true); MachineInstrBuilder MIB(NewMI); @@ -1920,7 +1920,7 @@ } static MachineInstr *MakeM0Inst(const TargetInstrInfo &TII, unsigned Opcode, - SmallVector &MOs, + const SmallVector &MOs, MachineInstr *MI) { MachineFunction &MF = *MI->getParent()->getParent(); MachineInstrBuilder MIB = BuildMI(MF, TII.get(Opcode)); @@ -1936,7 +1936,7 @@ MachineInstr* X86InstrInfo::foldMemoryOperand(MachineFunction &MF, MachineInstr *MI, unsigned i, - SmallVector &MOs) const { + const SmallVector &MOs) const{ const DenseMap *OpcodeTablePtr = NULL; bool isTwoAddrFold = false; unsigned NumOps = MI->getDesc().getNumOperands(); @@ -1995,7 +1995,7 @@ MachineInstr* X86InstrInfo::foldMemoryOperand(MachineFunction &MF, MachineInstr *MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, int FrameIndex) const { // Check switch flag if (NoFusing) return NULL; @@ -2042,7 +2042,7 @@ MachineInstr* X86InstrInfo::foldMemoryOperand(MachineFunction &MF, MachineInstr *MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, MachineInstr *LoadMI) const { // Check switch flag if (NoFusing) return NULL; @@ -2093,8 +2093,8 @@ } -bool X86InstrInfo::canFoldMemoryOperand(MachineInstr *MI, - SmallVectorImpl &Ops) const { +bool X86InstrInfo::canFoldMemoryOperand(const MachineInstr *MI, + const SmallVectorImpl &Ops) const { // Check switch flag if (NoFusing) return 0; @@ -2350,7 +2350,7 @@ return I->second.first; } -bool X86InstrInfo::BlockHasNoFallThrough(MachineBasicBlock &MBB) const { +bool X86InstrInfo::BlockHasNoFallThrough(const MachineBasicBlock &MBB) const { if (MBB.empty()) return false; switch (MBB.back().getOpcode()) { Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.h?rev=57622&r1=57621&r2=57622&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.h (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.h Wed Oct 15 20:49:15 2008 @@ -359,7 +359,7 @@ /// references has been changed. virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, int FrameIndex) const; /// foldMemoryOperand - Same as the previous version except it allows folding @@ -367,12 +367,13 @@ /// stack slot. virtual MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, - SmallVectorImpl &Ops, + const SmallVectorImpl &Ops, MachineInstr* LoadMI) const; /// canFoldMemoryOperand - Returns true if the specified load / store is /// folding is possible. - virtual bool canFoldMemoryOperand(MachineInstr*, SmallVectorImpl &) const; + virtual bool canFoldMemoryOperand(const MachineInstr*, + const SmallVectorImpl &) const; /// unfoldMemoryOperand - Separate a single instruction which folded a load or /// a store or a load and a store into two or more instruction. If this is @@ -391,7 +392,7 @@ virtual unsigned getOpcodeAfterMemoryUnfold(unsigned Opc, bool UnfoldLoad, bool UnfoldStore) const; - virtual bool BlockHasNoFallThrough(MachineBasicBlock &MBB) const; + virtual bool BlockHasNoFallThrough(const MachineBasicBlock &MBB) const; virtual bool ReverseBranchCondition(SmallVectorImpl &Cond) const; @@ -431,7 +432,7 @@ MachineInstr* foldMemoryOperand(MachineFunction &MF, MachineInstr* MI, unsigned OpNum, - SmallVector &MOs) const; + const SmallVector &MOs) const; }; } // End llvm namespace From xuzhongxing at gmail.com Wed Oct 15 20:21:46 2008 From: xuzhongxing at gmail.com (Zhongxing Xu) Date: Thu, 16 Oct 2008 01:21:46 -0000 Subject: [llvm-commits] [llvm] r57619 - /llvm/trunk/include/llvm/Bitcode/BitCodes.h Message-ID: <200810160121.m9G1Llp0000551@zion.cs.uiuc.edu> Author: zhongxingxu Date: Wed Oct 15 20:21:44 2008 New Revision: 57619 URL: http://llvm.org/viewvc/llvm-project?rev=57619&view=rev Log: Fix a calculation error in comments. Modified: llvm/trunk/include/llvm/Bitcode/BitCodes.h Modified: llvm/trunk/include/llvm/Bitcode/BitCodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/BitCodes.h?rev=57619&r1=57618&r2=57619&view=diff ============================================================================== --- llvm/trunk/include/llvm/Bitcode/BitCodes.h (original) +++ llvm/trunk/include/llvm/Bitcode/BitCodes.h Wed Oct 15 20:21:44 2008 @@ -27,7 +27,7 @@ enum StandardWidths { BlockIDWidth = 8, // We use VBR-8 for block IDs. CodeLenWidth = 4, // Codelen are VBR-4. - BlockSizeWidth = 32 // BlockSize up to 2^32 32-bit words = 32GB per block. + BlockSizeWidth = 32 // BlockSize up to 2^32 32-bit words = 16GB per block. }; // The standard abbrev namespace always has a way to exit a block, enter a From sabre at nondot.org Thu Oct 16 00:26:52 2008 From: sabre at nondot.org (Chris Lattner) Date: Thu, 16 Oct 2008 05:26:52 -0000 Subject: [llvm-commits] [llvm] r57625 - in /llvm/trunk: lib/VMCore/ConstantFold.cpp test/Transforms/ConstProp/bitcast2.ll Message-ID: <200810160526.m9G5Qq8I008186@zion.cs.uiuc.edu> Author: lattner Date: Thu Oct 16 00:26:51 2008 New Revision: 57625 URL: http://llvm.org/viewvc/llvm-project?rev=57625&view=rev Log: apply Eli's patch for PR2165 and provide a testcase. Added: llvm/trunk/test/Transforms/ConstProp/bitcast2.ll Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=57625&r1=57624&r2=57625&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Thu Oct 16 00:26:51 2008 @@ -133,6 +133,12 @@ if (ConstantVector *CV = dyn_cast(V)) return BitCastConstantVector(CV, DestPTy); } + + // Canonicalize scalar-to-vector bitcasts into vector-to-vector bitcasts + // This allows for other simplifications (although some of them + // can only be handled by Analysis/ConstantFolding.cpp). + if (isa(V) || isa(V)) + return ConstantExpr::getBitCast(ConstantVector::get(&V, 1), DestPTy); } // Finally, implement bitcast folding now. The code below doesn't handle Added: llvm/trunk/test/Transforms/ConstProp/bitcast2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ConstProp/bitcast2.ll?rev=57625&view=auto ============================================================================== --- llvm/trunk/test/Transforms/ConstProp/bitcast2.ll (added) +++ llvm/trunk/test/Transforms/ConstProp/bitcast2.ll Thu Oct 16 00:26:51 2008 @@ -0,0 +1,8 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep bitcast +; PR2165 + +define <1 x i64> @test() { + %A = bitcast i64 63 to <1 x i64> + ret <1 x i64> %A +} + From clattner at apple.com Thu Oct 16 00:29:14 2008 From: clattner at apple.com (Chris Lattner) Date: Wed, 15 Oct 2008 22:29:14 -0700 Subject: [llvm-commits] test failures Message-ID: <06C7E66A-E64A-43FC-ADFD-AFF01EBEF6DF@apple.com> Is anyone else seeing these? FAIL: /Users/sabre/llvm/test/LLVMC/false.c Failed with exit(1) at line 1 while running: llvmc2 -x c++ /Users/sabre/llvm/test/LLVMC/false.c -x c /Users/sabre/llvm/test/LLVMC/test_data/false.cpp -x lisp -x whatnot - x none /Users/sabre/llvm/test/LLVMC/test_data/false2.cpp -o false.c.tmp llvmc2: No tool corresponding to the language c++ found FAIL: /Users/sabre/llvm/test/LLVMC/hello.c Failed with exit(1) at line 1 while running: llvmc2 /Users/sabre/llvm/test/LLVMC/hello.c -o hello.c.tmp llvmc2: Unknown suffix: c FAIL: /Users/sabre/llvm/test/LLVMC/opt-test.c Failed with exit(1) at line 1 while running: llvmc2 /Users/sabre/llvm/test/LLVMC/opt-test.c -opt -o opt-test.c.tmp llvmc2: Unknown command line argument '-opt'. Try: 'llvmc2 --help' FAIL: /Users/sabre/llvm/test/LLVMC/sink.c Failed with exit(1) at line 1 while running: llvmc2 -v -Wall /Users/sabre/llvm/test/LLVMC/sink.c -o sink.c.tmp |& grep "Wall" llvmc2: Unknown command line argument '-Wall'. Try: 'llvmc2 --help' child process exited abnormally FAIL: /Users/sabre/llvm/test/LLVMC/wall.c Failed with exit(1) at line 1 while running: llvmc2 -Wall /Users/sabre/llvm/test/LLVMC/wall.c -o wall.c.tmp llvmc2: Unknown command line argument '-Wall'. Try: 'llvmc2 --help' FAIL: /Users/sabre/llvm/test/LLVMC/hello.cpp Failed with exit(1) at line 1 while running: llvmc2 /Users/sabre/llvm/test/LLVMC/hello.cpp -o hello.cpp.tmp llvmc2: Unknown suffix: cpp FAIL: /Users/sabre/llvm/test/LLVMC/together.cpp Failed with exit(1) at line 1 while running: llvmc2 /Users/sabre/llvm/test/LLVMC/together.cpp /Users/ sabre/llvm/test/LLVMC/test_data/together.c -o together.cpp.tmp llvmc2: Unknown suffix: cpp From anton at korobeynikov.info Thu Oct 16 00:58:05 2008 From: anton at korobeynikov.info (Anton Korobeynikov) Date: Thu, 16 Oct 2008 09:58:05 +0400 Subject: [llvm-commits] test failures In-Reply-To: <06C7E66A-E64A-43FC-ADFD-AFF01EBEF6DF@apple.com> References: <06C7E66A-E64A-43FC-ADFD-AFF01EBEF6DF@apple.com> Message-ID: Hi, Chris On Thu, Oct 16, 2008 at 9:29 AM, Chris Lattner wrote: > Is anyone else seeing these? Yes, Bill disabled building of 'default' implementation of llvmc2 for some reason, however stuff built fine for me. Mikhail should be working on solution. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University From sabre at nondot.org Thu Oct 16 01:00:36 2008 From: sabre at nondot.org (Chris Lattner) Date: Thu, 16 Oct 2008 06:00:36 -0000 Subject: [llvm-commits] [llvm] r57626 - /llvm/trunk/lib/VMCore/Verifier.cpp Message-ID: <200810160600.m9G60akp009914@zion.cs.uiuc.edu> Author: lattner Date: Thu Oct 16 01:00:36 2008 New Revision: 57626 URL: http://llvm.org/viewvc/llvm-project?rev=57626&view=rev Log: Verify prefetch arguments, PR2576. Modified: llvm/trunk/lib/VMCore/Verifier.cpp Modified: llvm/trunk/lib/VMCore/Verifier.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=57626&r1=57625&r2=57626&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Verifier.cpp (original) +++ llvm/trunk/lib/VMCore/Verifier.cpp Thu Oct 16 01:00:36 2008 @@ -1361,6 +1361,14 @@ "llvm.init_trampoline parameter #2 must resolve to a function.", &CI); break; + case Intrinsic::prefetch: + Assert1(isa(CI.getOperand(2)) && + isa(CI.getOperand(3)) && + cast(CI.getOperand(2))->getZExtValue() < 2 && + cast(CI.getOperand(3))->getZExtValue() < 4, + "invalid arguments to llvm.prefetch", + &CI); + break; } } From clattner at apple.com Thu Oct 16 01:03:47 2008 From: clattner at apple.com (Chris Lattner) Date: Wed, 15 Oct 2008 23:03:47 -0700 Subject: [llvm-commits] test failures In-Reply-To: References: <06C7E66A-E64A-43FC-ADFD-AFF01EBEF6DF@apple.com> Message-ID: <9119416A-6A74-43B7-9A54-B23C37F0FBA7@apple.com> On Oct 15, 2008, at 10:58 PM, Anton Korobeynikov wrote: > Hi, Chris > > On Thu, Oct 16, 2008 at 9:29 AM, Chris Lattner > wrote: >> Is anyone else seeing these? > Yes, Bill disabled building of 'default' implementation of llvmc2 for > some reason, however stuff built fine for me. Mikhail should be > working on solution. Bill, please XFAIL the tests when/if you break them. -Chris From sabre at nondot.org Thu Oct 16 01:16:50 2008 From: sabre at nondot.org (Chris Lattner) Date: Thu, 16 Oct 2008 06:16:50 -0000 Subject: [llvm-commits] [llvm] r57628 - in /llvm/trunk/lib/Target: Alpha/AlphaTargetMachine.cpp CellSPU/SPUTargetMachine.cpp IA64/IA64TargetMachine.cpp PIC16/PIC16TargetMachine.cpp Message-ID: <200810160616.m9G6GphK010693@zion.cs.uiuc.edu> Author: lattner Date: Thu Oct 16 01:16:50 2008 New Revision: 57628 URL: http://llvm.org/viewvc/llvm-project?rev=57628&view=rev Log: mark some targets as experimental. Andrew, if you think that Alpha is basically working, feel free to remove the tag. The other targets have really basic things that break them. Modified: llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp llvm/trunk/lib/Target/IA64/IA64TargetMachine.cpp llvm/trunk/lib/Target/PIC16/PIC16TargetMachine.cpp Modified: llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp?rev=57628&r1=57627&r2=57628&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaTargetMachine.cpp Thu Oct 16 01:16:50 2008 @@ -22,7 +22,7 @@ using namespace llvm; // Register the targets -static RegisterTarget X("alpha", "Alpha (incomplete)"); +static RegisterTarget X("alpha", "Alpha [experimental]"); const TargetAsmInfo *AlphaTargetMachine::createTargetAsmInfo() const { return new AlphaTargetAsmInfo(*this); Modified: llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp?rev=57628&r1=57627&r2=57628&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUTargetMachine.cpp Thu Oct 16 01:16:50 2008 @@ -24,7 +24,7 @@ namespace { // Register the targets RegisterTarget - CELLSPU("cellspu", "STI CBEA Cell SPU"); + CELLSPU("cellspu", "STI CBEA Cell SPU [experimental]"); } const std::pair * Modified: llvm/trunk/lib/Target/IA64/IA64TargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/IA64/IA64TargetMachine.cpp?rev=57628&r1=57627&r2=57628&view=diff ============================================================================== --- llvm/trunk/lib/Target/IA64/IA64TargetMachine.cpp (original) +++ llvm/trunk/lib/Target/IA64/IA64TargetMachine.cpp Thu Oct 16 01:16:50 2008 @@ -26,7 +26,8 @@ extern "C" int IA64TargetMachineModule; int IA64TargetMachineModule = 0; -static RegisterTarget X("ia64", "IA-64 (Itanium)"); +static RegisterTarget X("ia64", + "IA-64 (Itanium) [experimental]"); const TargetAsmInfo *IA64TargetMachine::createTargetAsmInfo() const { return new IA64TargetAsmInfo(*this); Modified: llvm/trunk/lib/Target/PIC16/PIC16TargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16TargetMachine.cpp?rev=57628&r1=57627&r2=57628&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16TargetMachine.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16TargetMachine.cpp Thu Oct 16 01:16:50 2008 @@ -23,7 +23,7 @@ namespace { // Register the targets - RegisterTarget X("pic16", "PIC16 14-bit"); + RegisterTarget X("pic16", "PIC16 14-bit [experimental]"); } PIC16TargetMachine:: From sabre at nondot.org Thu Oct 16 01:46:12 2008 From: sabre at nondot.org (Chris Lattner) Date: Thu, 16 Oct 2008 06:46:12 -0000 Subject: [llvm-commits] [llvm] r57630 - /llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt Message-ID: <200810160646.m9G6kCb6012301@zion.cs.uiuc.edu> Author: lattner Date: Thu Oct 16 01:46:12 2008 New Revision: 57630 URL: http://llvm.org/viewvc/llvm-project?rev=57630&view=rev Log: add some notes and a file to collect unimplemented features in the x86 backend. These will all be answered with "patches welcome", so a PR doesn't help drive them along. Added: llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt Added: llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt?rev=57630&view=auto ============================================================================== --- llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt (added) +++ llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt Thu Oct 16 01:46:12 2008 @@ -0,0 +1,14 @@ +//===---------------------------------------------------------------------===// +// Testcases that crash the X86 backend because they aren't implemented +//===---------------------------------------------------------------------===// + +These are cases we know the X86 backend doesn't handle. Patches are welcome +and appreciated, because no one has signed up to implemented these yet. +Implementing these would allow elimination of the corresponding intrinsics, +which would be great. + +1) vector shifts +2) vector comparisons +3) vector fp<->int comparisons: PR2683, PR2684, PR2685, PR2686, PR2688 + + From sabre at nondot.org Thu Oct 16 02:04:06 2008 From: sabre at nondot.org (Chris Lattner) Date: Thu, 16 Oct 2008 07:04:06 -0000 Subject: [llvm-commits] [llvm] r57631 - /llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt Message-ID: <200810160704.m9G746sp013601@zion.cs.uiuc.edu> Author: lattner Date: Thu Oct 16 02:04:06 2008 New Revision: 57631 URL: http://llvm.org/viewvc/llvm-project?rev=57631&view=rev Log: add some notes Modified: llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt Modified: llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt?rev=57631&r1=57630&r2=57631&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt (original) +++ llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt Thu Oct 16 02:04:06 2008 @@ -10,5 +10,5 @@ 1) vector shifts 2) vector comparisons 3) vector fp<->int comparisons: PR2683, PR2684, PR2685, PR2686, PR2688 - +4) bitcasts from vectors to scalars: PR2804 From baldrick at free.fr Thu Oct 16 03:56:48 2008 From: baldrick at free.fr (Duncan Sands) Date: Thu, 16 Oct 2008 08:56:48 -0000 Subject: [llvm-commits] [llvm] r57633 - /llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll Message-ID: <200810160856.m9G8umlJ027006@zion.cs.uiuc.edu> Author: baldrick Date: Thu Oct 16 03:56:46 2008 New Revision: 57633 URL: http://llvm.org/viewvc/llvm-project?rev=57633&view=rev Log: Testcase for PR2762. Added: llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll Added: llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll?rev=57633&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll (added) +++ llvm/trunk/test/CodeGen/X86/2008-10-16-VecUnaryOp.ll Thu Oct 16 03:56:46 2008 @@ -0,0 +1,8 @@ +; RUN: llvm-as < %s | llc -enable-legalize-types +; PR2762 +define void @foo(<4 x i32>* %p, <4 x double>* %q) { + %n = load <4 x i32>* %p + %z = sitofp <4 x i32> %n to <4 x double> + store <4 x double> %z, <4 x double>* %q + ret void +} From baldrick at free.fr Thu Oct 16 04:14:59 2008 From: baldrick at free.fr (Duncan Sands) Date: Thu, 16 Oct 2008 09:14:59 -0000 Subject: [llvm-commits] [llvm] r57634 - /llvm/trunk/lib/Analysis/EscapeAnalysis.cpp Message-ID: <200810160914.m9G9ExaV028177@zion.cs.uiuc.edu> Author: baldrick Date: Thu Oct 16 04:14:58 2008 New Revision: 57634 URL: http://llvm.org/viewvc/llvm-project?rev=57634&view=rev Log: Fix "large integer implicitly truncated to unsigned type" warning on x86-64 with gcc-4.3. Modified: llvm/trunk/lib/Analysis/EscapeAnalysis.cpp Modified: llvm/trunk/lib/Analysis/EscapeAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/EscapeAnalysis.cpp?rev=57634&r1=57633&r2=57634&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/EscapeAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/EscapeAnalysis.cpp Thu Oct 16 04:14:58 2008 @@ -50,7 +50,7 @@ for (Function::arg_iterator AI = F.arg_begin(), AE = F.arg_end(); AI != AE; ++AI) { if (!isa(AI->getType())) continue; - AliasAnalysis::AliasResult R = AA.alias(Pointer, StoreSize, AI, ~0UL); + AliasAnalysis::AliasResult R = AA.alias(Pointer, StoreSize, AI, ~0U); if (R != AliasAnalysis::NoAlias) { EscapePoints.insert(S); inserted = true; @@ -63,7 +63,7 @@ for (Module::global_iterator GI = M->global_begin(), GE = M->global_end(); GI != GE; ++GI) { - AliasAnalysis::AliasResult R = AA.alias(Pointer, StoreSize, GI, ~0UL); + AliasAnalysis::AliasResult R = AA.alias(Pointer, StoreSize, GI, ~0U); if (R != AliasAnalysis::NoAlias) { EscapePoints.insert(S); break; @@ -145,4 +145,4 @@ } return false; -} \ No newline at end of file +} From baldrick at free.fr Thu Oct 16 08:02:34 2008 From: baldrick at free.fr (Duncan Sands) Date: Thu, 16 Oct 2008 13:02:34 -0000 Subject: [llvm-commits] [llvm] r57635 - /llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td Message-ID: <200810161302.m9GD2Yt0003803@zion.cs.uiuc.edu> Author: baldrick Date: Thu Oct 16 08:02:33 2008 New Revision: 57635 URL: http://llvm.org/viewvc/llvm-project?rev=57635&view=rev Log: Fix warnings about mb/me being potentially used uninitialized in these functions with gcc-4.3. Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td Modified: llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td?rev=57635&r1=57634&r2=57635&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td (original) +++ llvm/trunk/lib/Target/PowerPC/PPCInstrInfo.td Thu Oct 16 08:02:33 2008 @@ -180,14 +180,14 @@ }]>; def MB : SDNodeXFormgetZExtValue(), mb, me); return getI32Imm(mb); }]>; def ME : SDNodeXFormgetZExtValue(), mb, me); return getI32Imm(me); }]>; From foldr at codedgers.com Thu Oct 16 09:02:30 2008 From: foldr at codedgers.com (Mikhail Glushenkov) Date: Thu, 16 Oct 2008 14:02:30 -0000 Subject: [llvm-commits] [llvm] r57636 - in /llvm/trunk/tools/llvmc2: Makefile doc/LLVMC-Reference.rst plugins/Base/Makefile plugins/Base/PluginMain.cpp plugins/Clang/Makefile plugins/Clang/PluginMain.cpp plugins/Makefile plugins/Simple/Makefile plugins/Simple/PluginMain.cpp plugins/Simple/Simple.td Message-ID: <200810161402.m9GE2U8T005779@zion.cs.uiuc.edu> Author: foldr Date: Thu Oct 16 09:02:29 2008 New Revision: 57636 URL: http://llvm.org/viewvc/llvm-project?rev=57636&view=rev Log: Re-apply Makefile changes. Fix build with srcdir != objdir. Added: llvm/trunk/tools/llvmc2/plugins/Base/PluginMain.cpp llvm/trunk/tools/llvmc2/plugins/Clang/PluginMain.cpp llvm/trunk/tools/llvmc2/plugins/Simple/Makefile - copied, changed from r57635, llvm/trunk/tools/llvmc2/plugins/Base/Makefile llvm/trunk/tools/llvmc2/plugins/Simple/PluginMain.cpp llvm/trunk/tools/llvmc2/plugins/Simple/Simple.td Modified: llvm/trunk/tools/llvmc2/Makefile llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst llvm/trunk/tools/llvmc2/plugins/Base/Makefile llvm/trunk/tools/llvmc2/plugins/Clang/Makefile llvm/trunk/tools/llvmc2/plugins/Makefile Modified: llvm/trunk/tools/llvmc2/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/Makefile?rev=57636&r1=57635&r2=57636&view=diff ============================================================================== --- llvm/trunk/tools/llvmc2/Makefile (original) +++ llvm/trunk/tools/llvmc2/Makefile Thu Oct 16 09:02:29 2008 @@ -9,11 +9,9 @@ LEVEL = ../.. -##### FIXME: Does not work when objdir != srcdir -#####BUILTIN_PLUGINS = Base - +BUILTIN_PLUGINS = Base DRIVER_NAME = llvmc2 -DIRS = plugins driver +DIRS = plugins driver export BUILTIN_PLUGINS export DRIVER_NAME Modified: llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst?rev=57636&r1=57635&r2=57636&view=diff ============================================================================== --- llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst (original) +++ llvm/trunk/tools/llvmc2/doc/LLVMC-Reference.rst Thu Oct 16 09:02:29 2008 @@ -121,7 +121,7 @@ $ mv Simple.td MyPlugin.td -Note that the plugin source directory should be placed into +Note that the plugin source directory should be placed under ``$LLVMC_DIR/plugins`` to make use of the existing build infrastructure. To build a version of the LLVMC executable called ``mydriver`` with your plugin compiled in, use the following command:: Modified: llvm/trunk/tools/llvmc2/plugins/Base/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Base/Makefile?rev=57636&r1=57635&r2=57636&view=diff ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Base/Makefile (original) +++ llvm/trunk/tools/llvmc2/plugins/Base/Makefile Thu Oct 16 09:02:29 2008 @@ -8,5 +8,6 @@ ##===----------------------------------------------------------------------===## LLVMC_PLUGIN = Base +BUILT_SOURCES = AutoGenerated.inc include ../Makefile Added: llvm/trunk/tools/llvmc2/plugins/Base/PluginMain.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Base/PluginMain.cpp?rev=57636&view=auto ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Base/PluginMain.cpp (added) +++ llvm/trunk/tools/llvmc2/plugins/Base/PluginMain.cpp Thu Oct 16 09:02:29 2008 @@ -0,0 +1 @@ +#include "AutoGenerated.inc" Modified: llvm/trunk/tools/llvmc2/plugins/Clang/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Clang/Makefile?rev=57636&r1=57635&r2=57636&view=diff ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Clang/Makefile (original) +++ llvm/trunk/tools/llvmc2/plugins/Clang/Makefile Thu Oct 16 09:02:29 2008 @@ -8,6 +8,7 @@ ##===----------------------------------------------------------------------===## LLVMC_PLUGIN = Clang +BUILT_SOURCES = AutoGenerated.inc include ../Makefile Added: llvm/trunk/tools/llvmc2/plugins/Clang/PluginMain.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Clang/PluginMain.cpp?rev=57636&view=auto ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Clang/PluginMain.cpp (added) +++ llvm/trunk/tools/llvmc2/plugins/Clang/PluginMain.cpp Thu Oct 16 09:02:29 2008 @@ -0,0 +1 @@ +#include "AutoGenerated.inc" Modified: llvm/trunk/tools/llvmc2/plugins/Makefile URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Makefile?rev=57636&r1=57635&r2=57636&view=diff ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Makefile (original) +++ llvm/trunk/tools/llvmc2/plugins/Makefile Thu Oct 16 09:02:29 2008 @@ -12,8 +12,7 @@ LEVEL = ../../.. DIRS = $(BUILTIN_PLUGINS) -# TOFIX: DSO versions of plugins are not built - +# TOFIX: Should we also build DSO versions of plugins? export BUILTIN_LLVMC_PLUGIN=1 include $(LEVEL)/Makefile.common @@ -22,25 +21,27 @@ LEVEL = ../../../.. -LIBRARYNAME = $(patsubst %,LLVMC%,$(LLVMC_PLUGIN)) -TOOLS_SOURCE = $(wildcard $(PROJ_SRC_DIR)/*.td) +LIBRARYNAME := $(patsubst %,LLVMC%,$(LLVMC_PLUGIN)) REQUIRES_EH = 1 ifndef BUILTIN_LLVMC_PLUGIN LOADABLE_MODULE = 1 endif -ifneq ($(TOOLS_SOURCE),"") +ifneq ($(BUILT_SOURCES),) BUILD_AUTOGENERATED_INC=1 -BUILT_SOURCES = AutoGenerated.inc endif include $(LEVEL)/Makefile.common -# TOFIX: This should go into Makefile.rules +# TOFIX: This probably should go into Makefile.rules ifdef BUILD_AUTOGENERATED_INC -TD_COMMON = $(wildcard $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td) + +TOOLS_SOURCE := $(strip $(wildcard $(PROJ_SRC_DIR)/*.td)) + +TD_COMMON :=$(strip $(wildcard \ + $(LLVM_SRC_ROOT)/include/llvm/CompilerDriver/*.td)) $(ObjDir)/AutoGenerated.inc.tmp: $(TOOLS_SOURCE) $(ObjDir)/.dir \ $(TBLGEN) $(TD_COMMON) Copied: llvm/trunk/tools/llvmc2/plugins/Simple/Makefile (from r57635, llvm/trunk/tools/llvmc2/plugins/Base/Makefile) URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Simple/Makefile?p2=llvm/trunk/tools/llvmc2/plugins/Simple/Makefile&p1=llvm/trunk/tools/llvmc2/plugins/Base/Makefile&r1=57635&r2=57636&rev=57636&view=diff ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Base/Makefile (original) +++ llvm/trunk/tools/llvmc2/plugins/Simple/Makefile Thu Oct 16 09:02:29 2008 @@ -1,4 +1,4 @@ -##===- tools/llvmc2/plugins/Base/Makefile ------------------*- Makefile -*-===## +##===- tools/llvmc2/plugins/Simple/Makefile ------------------*- Makefile -*-===## # # The LLVM Compiler Infrastructure # @@ -7,6 +7,7 @@ # ##===----------------------------------------------------------------------===## -LLVMC_PLUGIN = Base +LLVMC_PLUGIN = Simple +BUILT_SOURCES = AutoGenerated.inc include ../Makefile Added: llvm/trunk/tools/llvmc2/plugins/Simple/PluginMain.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Simple/PluginMain.cpp?rev=57636&view=auto ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Simple/PluginMain.cpp (added) +++ llvm/trunk/tools/llvmc2/plugins/Simple/PluginMain.cpp Thu Oct 16 09:02:29 2008 @@ -0,0 +1 @@ +#include "AutoGenerated.inc" Added: llvm/trunk/tools/llvmc2/plugins/Simple/Simple.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc2/plugins/Simple/Simple.td?rev=57636&view=auto ============================================================================== --- llvm/trunk/tools/llvmc2/plugins/Simple/Simple.td (added) +++ llvm/trunk/tools/llvmc2/plugins/Simple/Simple.td Thu Oct 16 09:02:29 2008 @@ -0,0 +1,30 @@ +// A simple wrapper for gcc. +// To compile, use this command: +// +// $ cd $LLVMC2_DIR +// $ make DRIVER_NAME=mygcc BUILTIN_PLUGINS=Simple +// +// To build this plugin as a dynamic library: +// +// $ cd $LLVMC2_DIR +// $ make BUILTIN_PLUGINS="" +// $ cd plugins/Simple +// $ make +// +// Run as: +// +// $ llvmc2 -load $LLVM_DIR/Release/lib/LLVMCSimple.so + +include "llvm/CompilerDriver/Common.td" + +def gcc : Tool< +[(in_language "c"), + (out_language "executable"), + (output_suffix "out"), + (cmd_line "gcc $INFILE -o $OUTFILE"), + (sink) +]>; + +def LanguageMap : LanguageMap<[LangToSuffixes<"c", ["c"]>]>; + +def CompilationGraph : CompilationGraph<[Edge]>; From stefanus.dutoit at rapidmind.com Thu Oct 16 09:46:43 2008 From: stefanus.dutoit at rapidmind.com (Stefanus Du Toit) Date: Thu, 16 Oct 2008 10:46:43 -0400 Subject: [llvm-commits] [llvm] r57630 - /llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt In-Reply-To: <200810160646.m9G6kCb6012301@zion.cs.uiuc.edu> References: <200810160646.m9G6kCb6012301@zion.cs.uiuc.edu> Message-ID: Hi Chris, On 16-Oct-08, at 2:46 AM, Chris Lattner wrote: > +3) vector fp<->int comparisons: PR2683, PR2684, PR2685, PR2686, > PR2688 I think you mean conversions? -- Stefanus Du Toit RapidMind Inc. phone: +1 519 885 5455 x116 -- fax: +1 519 885 1463 From ggreif at gmail.com Thu Oct 16 10:33:05 2008 From: ggreif at gmail.com (Gabor Greif) Date: Thu, 16 Oct 2008 15:33:05 -0000 Subject: [llvm-commits] [llvm] r57641 - in /llvm/trunk: include/llvm/Use.h lib/VMCore/Use.cpp Message-ID: <200810161533.m9GFX5d6009145@zion.cs.uiuc.edu> Author: ggreif Date: Thu Oct 16 10:33:02 2008 New Revision: 57641 URL: http://llvm.org/viewvc/llvm-project?rev=57641&view=rev Log: Introduce a typing refinenement on tagged data using the 'volatile' qualifier. This should not have any operational consequences on code, because tags should always be stripped off (giving a non-volatile pointer) before dereferencing. The new qualification is there to catch some attempts to use tagged pointers in a context where an untagged pointer is appropriate. Notably this approach does not catch dereferencing of tagged pointers, but helps in separating the two concepts a bit. Modified: llvm/trunk/include/llvm/Use.h llvm/trunk/lib/VMCore/Use.cpp Modified: llvm/trunk/include/llvm/Use.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Use.h?rev=57641&r1=57640&r2=57641&view=diff ============================================================================== --- llvm/trunk/include/llvm/Use.h (original) +++ llvm/trunk/include/llvm/Use.h Thu Oct 16 10:33:02 2008 @@ -34,27 +34,27 @@ /// addTag - insert tag bits into an (untagged) pointer template -inline T *addTag(const T *P, TAG Tag) { +inline volatile T *addTag(const T *P, TAG Tag) { return reinterpret_cast(ptrdiff_t(P) | Tag); } /// stripTag - remove tag bits from a pointer, /// making it dereferencable template -inline T *stripTag(const T *P) { +inline T *stripTag(const volatile T *P) { return reinterpret_cast(ptrdiff_t(P) & ~MASK); } /// extractTag - extract tag bits from a pointer template -inline TAG extractTag(const T *P) { +inline TAG extractTag(const volatile T *P) { return TAG(ptrdiff_t(P) & MASK); } /// transferTag - transfer tag bits from a pointer, /// to an untagged pointer template -inline T *transferTag(const T *From, const T *To) { +inline volatile T *transferTag(const volatile T *From, const T *To) { return reinterpret_cast((ptrdiff_t(From) & MASK) | ptrdiff_t(To)); } @@ -126,7 +126,7 @@ static Use *initTags(Use *Start, Use *Stop, ptrdiff_t Done = 0); Value *Val; - Use *Next, **Prev; + Use *Next, *volatile*Prev; void setPrev(Use **NewPrev) { Prev = transferTag(Prev, NewPrev); Modified: llvm/trunk/lib/VMCore/Use.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Use.cpp?rev=57641&r1=57640&r2=57641&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Use.cpp (original) +++ llvm/trunk/lib/VMCore/Use.cpp Thu Oct 16 10:33:02 2008 @@ -127,7 +127,7 @@ //===----------------------------------------------------------------------===// struct AugmentedUse : Use { - User *ref; + volatile User *ref; AugmentedUse(); // not implemented }; @@ -138,12 +138,10 @@ User *Use::getUser() const { const Use *End = getImpliedUser(); - User *She = static_cast(End - 1)->ref; - She = extractTag(She) + volatile User *She = static_cast(End - 1)->ref; + return extractTag(She) ? llvm::stripTag(She) : reinterpret_cast(const_cast(End)); - - return She; } //===----------------------------------------------------------------------===// From sabre at nondot.org Thu Oct 16 12:02:50 2008 From: sabre at nondot.org (Chris Lattner) Date: Thu, 16 Oct 2008 17:02:50 -0000 Subject: [llvm-commits] [llvm] r57644 - /llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt Message-ID: <200810161702.m9GH2oGQ012724@zion.cs.uiuc.edu> Author: lattner Date: Thu Oct 16 12:02:50 2008 New Revision: 57644 URL: http://llvm.org/viewvc/llvm-project?rev=57644&view=rev Log: fix typo noticed by sdt Modified: llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt Modified: llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt?rev=57644&r1=57643&r2=57644&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt (original) +++ llvm/trunk/lib/Target/X86/README-UNIMPLEMENTED.txt Thu Oct 16 12:02:50 2008 @@ -9,6 +9,6 @@ 1) vector shifts 2) vector comparisons -3) vector fp<->int comparisons: PR2683, PR2684, PR2685, PR2686, PR2688 +3) vector fp<->int conversions: PR2683, PR2684, PR2685, PR2686, PR2688 4) bitcasts from vectors to scalars: PR2804 From clattner at apple.com Thu Oct 16 12:03:37 2008 From: clattner at apple.com (Chris Lattner) Date: Thu, 16 Oct 2008 10:03:37 -0700 Subject: [llvm-commits] [llvm] r57641 - in /llvm/trunk: include/llvm/Use.h lib/VMCore/Use.cpp In-Reply-To: <200810161533.m9GFX5d6009145@zion.cs.uiuc.edu> References: <200810161533.m9GFX5d6009145@zion.cs.uiuc.edu> Message-ID: <8A8679D9-2BD0-418B-BFE3-7D0BD707F285@apple.com> On Oct 16, 2008, at 8:33 AM, Gabor Greif wrote: > Author: ggreif > Date: Thu Oct 16 10:33:02 2008 > New Revision: 57641 > > URL: http://llvm.org/viewvc/llvm-project?rev=57641&view=rev > Log: > Introduce a typing refinenement on tagged data > using the 'volatile' qualifier. This should not have any operational > consequences > on code, because tags should always be stripped off (giving a non- > volatile pointer) > before dereferencing. The new qualification is there to catch some > attempts to use > tagged pointers in a context where an untagged pointer is appropriate. > > Notably this approach does not catch dereferencing of tagged > pointers, but helps > in separating the two concepts a bit. Gabor, this is very interesting, but it is very subtle and definitely needs some comments in the code. Please add them. -Chris From isanbard at gmail.com Thu Oct 16 12:47:59 2008 From: isanbard at gmail.com (Bill Wendling) Date: Thu, 16 Oct 2008 10:47:59 -0700 Subject: [llvm-commits] test failures In-Reply-To: References: <06C7E66A-E64A-43FC-ADFD-AFF01EBEF6DF@apple.com> Message-ID: <16e5fdf90810161047l303f98fat55345d4e6a211d83@mail.gmail.com> On Wed, Oct 15, 2008 at 10:58 PM, Anton Korobeynikov wrote: > Hi, Chris > > On Thu, Oct 16, 2008 at 9:29 AM, Chris Lattner wrote: >> Is anyone else seeing these? > Yes, Bill disabled building of 'default' implementation of llvmc2 for > some reason, however stuff built fine for me. Mikhail should be > working on solution. > This project fails to build for me. As I mentioned in my commit message, it's probably because this project wasn't tested for when the build directory is *not* the same as the source directory. Make sure that you do a clean build of the project. -bw From isanbard at gmail.com Thu Oct 16 12:48:15 2008 From: isanbard at gmail.com (Bill Wendling) Date: Thu, 16 Oct 2008 10:48:15 -0700 Subject: [llvm-commits] test failures In-Reply-To: <9119416A-6A74-43B7-9A54-B23C37F0FBA7@apple.com> References: <06C7E66A-E64A-43FC-ADFD-AFF01EBEF6DF@apple.com> <9119416A-6A74-43B7-9A54-B23C37F0FBA7@apple.com> Message-ID: <16e5fdf90810161048g559ea0aas13f0cac5e37b08d0@mail.gmail.com> On Wed, Oct 15, 2008 at 11:03 PM, Chris Lattner wrote: > > On Oct 15, 2008, at 10:58 PM, Anton Korobeynikov wrote: > >> Hi, Chris >> >> On Thu, Oct 16, 2008 at 9:29 AM, Chris Lattner >> wrote: >>> Is anyone else seeing these? >> Yes, Bill disabled building of 'default' implementation of llvmc2 for >> some reason, however stuff built fine for me. Mikhail should be >> working on solution. > > Bill, please XFAIL the tests when/if you break them. > Sure. -bw From anton at korobeynikov.info Thu Oct 16 13:01:05 2008 From: anton at korobeynikov.info (Anton Korobeynikov) Date: Thu, 16 Oct 2008 22:01:05 +0400 Subject: [llvm-commits] test failures In-Reply-To: <16e5fdf90810161047l303f98fat55345d4e6a211d83@mail.gmail.com> References: <06C7E66A-E64A-43FC-ADFD-AFF01EBEF6DF@apple.com> <16e5fdf90810161047l303f98fat55345d4e6a211d83@mail.gmail.com> Message-ID: Hi Bill, > This project fails to build for me. As I mentioned in my commit > message, it's probably because this project wasn't tested for when the > build directory is *not* the same as the source directory. Make sure > that you do a clean build of the project. Yeah, I also noticed this. However, after partial revert I did a clean rebuild of everything and it passed... -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University From alenhar2 at cs.uiuc.edu Thu Oct 16 13:11:08 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Thu, 16 Oct 2008 18:11:08 -0000 Subject: [llvm-commits] [poolalloc] r57647 - /poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h Message-ID: <200810161811.m9GIB8Wd015708@zion.cs.uiuc.edu> Author: alenhar2 Date: Thu Oct 16 13:11:06 2008 New Revision: 57647 URL: http://llvm.org/viewvc/llvm-project?rev=57647&view=rev Log: splay free version of delete Modified: poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h Modified: poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h?rev=57647&r1=57646&r2=57647&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h (original) +++ poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h Thu Oct 16 13:11:06 2008 @@ -86,6 +86,13 @@ return 0; } + void __clear_internal(tree_node* t) { + if (!t) return; + __clear_internal(t->left); + __clear_internal(t->right); + delete t; + } + protected: RangeSplayTree() : Tree(0) {} @@ -140,8 +147,8 @@ } void __clear() { - while (Tree) - __remove (Tree->start); + __clear_internal(Tree); + Tree = 0; } tree_node* __find(void* key) { From isanbard at gmail.com Thu Oct 16 13:20:04 2008 From: isanbard at gmail.com (Bill Wendling) Date: Thu, 16 Oct 2008 11:20:04 -0700 Subject: [llvm-commits] test failures In-Reply-To: References: <06C7E66A-E64A-43FC-ADFD-AFF01EBEF6DF@apple.com> <16e5fdf90810161047l303f98fat55345d4e6a211d83@mail.gmail.com> Message-ID: <16e5fdf90810161120r3f9f9e7ev8799bee45e3df74f@mail.gmail.com> On Thu, Oct 16, 2008 at 11:01 AM, Anton Korobeynikov wrote: >> This project fails to build for me. As I mentioned in my commit >> message, it's probably because this project wasn't tested for when the >> build directory is *not* the same as the source directory. Make sure >> that you do a clean build of the project. > Yeah, I also noticed this. However, after partial revert I did a clean > rebuild of everything and it passed... > It was still failing for me, though. I got a weird error message because the source file wasn't included in the compile line(?!?). Anyway, with the new set of patches to llvmc2, it seems to be working for me now. -bw From isanbard at gmail.com Thu Oct 16 13:40:50 2008 From: isanbard at gmail.com (Bill Wendling) Date: Thu, 16 Oct 2008 11:40:50 -0700 Subject: [llvm-commits] [llvm] r57636 - in /llvm/trunk/tools/llvmc2: Makefile doc/LLVMC-Reference.rst plugins/Base/Makefile plugins/Base/PluginMain.cpp plugins/Clang/Makefile plugins/Clang/PluginMain.cpp plugins/Makefile plugins/Simple/Makefile plugins/Si Message-ID: <16e5fdf90810161140r714ff304h286d7079936004fc@mail.gmail.com> On Thu, Oct 16, 2008 at 7:02 AM, Mikhail Glushenkov wrote: > Author: foldr > Date: Thu Oct 16 09:02:29 2008 > New Revision: 57636 > > URL: http://llvm.org/viewvc/llvm-project?rev=57636&view=rev > Log: > Re-apply Makefile changes. Fix build with srcdir != objdir. > Thanks, Mikhail! -bw From gohman at apple.com Thu Oct 16 15:18:32 2008 From: gohman at apple.com (Dan Gohman) Date: Thu, 16 Oct 2008 20:18:32 -0000 Subject: [llvm-commits] [llvm] r57649 - in /llvm/trunk: include/llvm/ include/llvm/Analysis/ include/llvm/CodeGen/ include/llvm/Target/ lib/Analysis/ lib/Target/Alpha/ lib/Target/CellSPU/ lib/Target/IA64/ lib/Target/Mips/ lib/Target/PIC16/ lib/Target/PowerPC/ lib/Target/X86/ Message-ID: <200810162018.m9GKIWQ8020964@zion.cs.uiuc.edu> Author: djg Date: Thu Oct 16 15:18:31 2008 New Revision: 57649 URL: http://llvm.org/viewvc/llvm-project?rev=57649&view=rev Log: Trim #includes. Modified: llvm/trunk/include/llvm/Analysis/EscapeAnalysis.h llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h llvm/trunk/include/llvm/CodeGen/SelectionDAG.h llvm/trunk/include/llvm/PassManagers.h llvm/trunk/include/llvm/Target/TargetRegisterInfo.h llvm/trunk/lib/Analysis/EscapeAnalysis.cpp llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Modified: llvm/trunk/include/llvm/Analysis/EscapeAnalysis.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/EscapeAnalysis.h?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/EscapeAnalysis.h (original) +++ llvm/trunk/include/llvm/Analysis/EscapeAnalysis.h Thu Oct 16 15:18:31 2008 @@ -19,7 +19,6 @@ #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Target/TargetData.h" #include -#include namespace llvm { Modified: llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h (original) +++ llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h Thu Oct 16 15:18:31 2008 @@ -28,7 +28,6 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/Support/Allocator.h" #include -#include namespace llvm { Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Thu Oct 16 15:18:31 2008 @@ -21,7 +21,6 @@ #include "llvm/CodeGen/SelectionDAGNodes.h" #include -#include #include #include #include Modified: llvm/trunk/include/llvm/PassManagers.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassManagers.h?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassManagers.h (original) +++ llvm/trunk/include/llvm/PassManagers.h Thu Oct 16 15:18:31 2008 @@ -11,6 +11,9 @@ // //===----------------------------------------------------------------------===// +#ifndef PASSMANAGERS_H +#define PASSMANAGERS_H + #include "llvm/PassManager.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/SmallPtrSet.h" @@ -85,12 +88,6 @@ // MPPassManagers. //===----------------------------------------------------------------------===// -#ifndef PASSMANAGERS_H -#define PASSMANAGERS_H - -#include "llvm/Pass.h" -#include - namespace llvm { /// FunctionPassManager and PassManager, two top level managers, serve Modified: llvm/trunk/include/llvm/Target/TargetRegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetRegisterInfo.h?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetRegisterInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetRegisterInfo.h Thu Oct 16 15:18:31 2008 @@ -21,7 +21,6 @@ #include "llvm/CodeGen/ValueTypes.h" #include #include -#include namespace llvm { Modified: llvm/trunk/lib/Analysis/EscapeAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/EscapeAnalysis.cpp?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/EscapeAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/EscapeAnalysis.cpp Thu Oct 16 15:18:31 2008 @@ -17,6 +17,7 @@ #include "llvm/Module.h" #include "llvm/Support/InstIterator.h" #include "llvm/ADT/SmallPtrSet.h" +#include using namespace llvm; char EscapeAnalysis::ID = 0; Modified: llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaISelDAGToDAG.cpp Thu Oct 16 15:18:31 2008 @@ -30,8 +30,6 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/MathExtras.h" #include -#include -#include using namespace llvm; namespace { Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Thu Oct 16 15:18:31 2008 @@ -31,8 +31,6 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/Compiler.h" -#include -#include using namespace llvm; Modified: llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp Thu Oct 16 15:18:31 2008 @@ -27,8 +27,6 @@ #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Support/MathExtras.h" -#include -#include using namespace llvm; namespace { Modified: llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp Thu Oct 16 15:18:31 2008 @@ -32,9 +32,6 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" -#include -#include - using namespace llvm; //===----------------------------------------------------------------------===// Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Thu Oct 16 15:18:31 2008 @@ -31,9 +31,6 @@ #include "llvm/CodeGen/SelectionDAGISel.h" #include "llvm/CodeGen/ValueTypes.h" #include "llvm/Support/Debug.h" -#include -#include - using namespace llvm; const char *MipsTargetLowering:: Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp Thu Oct 16 15:18:31 2008 @@ -31,9 +31,6 @@ #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" #include "llvm/Target/TargetMachine.h" -#include -#include - using namespace llvm; //===----------------------------------------------------------------------===// Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp Thu Oct 16 15:18:31 2008 @@ -28,9 +28,6 @@ #include "llvm/CodeGen/SelectionDAGISel.h" #include "llvm/CodeGen/ValueTypes.h" #include "llvm/Support/Debug.h" -#include -#include - using namespace llvm; const char *PIC16TargetLowering:: getTargetNodeName(unsigned Opcode) const Modified: llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Thu Oct 16 15:18:31 2008 @@ -30,8 +30,6 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/Compiler.h" -#include -#include using namespace llvm; namespace { Modified: llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp Thu Oct 16 15:18:31 2008 @@ -19,7 +19,6 @@ #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/System/Memory.h" #include "llvm/Support/Debug.h" -#include using namespace llvm; static TargetJITInfo::JITCompilerFn JITCompilerFunction; Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=57649&r1=57648&r2=57649&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Oct 16 15:18:31 2008 @@ -39,8 +39,6 @@ #include "llvm/Support/Streams.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" -#include -#include using namespace llvm; STATISTIC(NumFPKill , "Number of FP_REG_KILL instructions added"); From kremenek at apple.com Thu Oct 16 17:00:27 2008 From: kremenek at apple.com (Ted Kremenek) Date: Thu, 16 Oct 2008 22:00:27 -0000 Subject: [llvm-commits] [llvm] r57650 - /llvm/tags/checker/checker-110/ Message-ID: <200810162200.m9GM0R2n024843@zion.cs.uiuc.edu> Author: kremenek Date: Thu Oct 16 17:00:25 2008 New Revision: 57650 URL: http://llvm.org/viewvc/llvm-project?rev=57650&view=rev Log: Tagging checker-110. Added: llvm/tags/checker/checker-110/ - copied from r57649, llvm/trunk/ From resistor at mac.com Thu Oct 16 17:26:33 2008 From: resistor at mac.com (Owen Anderson) Date: Thu, 16 Oct 2008 22:26:33 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57652 - /llvm-gcc-4.2/trunk/gcc/except.c Message-ID: <200810162226.m9GMQXTx025774@zion.cs.uiuc.edu> Author: resistor Date: Thu Oct 16 17:26:32 2008 New Revision: 57652 URL: http://llvm.org/viewvc/llvm-project?rev=57652&view=rev Log: Revert r57527, which was breaking llvm-gcc on linux. Modified: llvm-gcc-4.2/trunk/gcc/except.c Modified: llvm-gcc-4.2/trunk/gcc/except.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/except.c?rev=57652&r1=57651&r2=57652&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/except.c (original) +++ llvm-gcc-4.2/trunk/gcc/except.c Thu Oct 16 17:26:32 2008 @@ -4079,25 +4079,13 @@ /* The default c++ routines aren't actually c++ specific, so use those. */ /* LLVM LOCAL begin */ #ifdef ENABLE_LLVM - /* Create the decl with build_decl instead of using llvm_init_one_libfunc - so that we can specify an argument type instead of just using '...'. - '...' is functionally correct, but more work for codegen to handle, - and even requires additional instructions on some targets. */ - const char *name = USING_SJLJ_EXCEPTIONS ? - "_Unwind_SjLj_Resume" + llvm_unwind_resume_libfunc = llvm_init_one_libfunc ( USING_SJLJ_EXCEPTIONS ? + "_Unwind_SjLj_Resume" #ifdef LLVM_STACKSENSITIVE_UNWIND_RESUME - : "_Unwind_Resume_or_Rethrow"; + : "_Unwind_Resume_or_Rethrow"); #else - : "_Unwind_Resume"; + : "_Unwind_Resume"); #endif - tree decl = build_decl (FUNCTION_DECL, get_identifier (name), - build_function_type (void_type_node, - tree_cons (0, ptr_type_node, - void_list_node))); - DECL_ARTIFICIAL (decl) = 1; - DECL_EXTERNAL (decl) = 1; - TREE_PUBLIC (decl) = 1; - llvm_unwind_resume_libfunc = decl; #else unwind_resume_libfunc = init_one_libfunc ( USING_SJLJ_EXCEPTIONS ? "_Unwind_SjLj_Resume" From wangmp at apple.com Thu Oct 16 18:12:43 2008 From: wangmp at apple.com (Mon Ping Wang) Date: Thu, 16 Oct 2008 16:12:43 -0700 Subject: [llvm-commits] MemIntrinsicNode patch Message-ID: <51219B37-C775-4478-9BA3-9EAA952A21D9@apple.com> Hi, Here is a patch to introduce a memory intrinsic node. The node is useful when one has a target specific intrinsic that touches memory and needs to be associated with a MemOperand. -- Mon Ping -------------- next part -------------- A non-text attachment was scrubbed... Name: memintrin.patch Type: application/octet-stream Size: 8593 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20081016/42d2489d/attachment.obj From gohman at apple.com Thu Oct 16 18:57:59 2008 From: gohman at apple.com (Dan Gohman) Date: Thu, 16 Oct 2008 23:57:59 -0000 Subject: [llvm-commits] [llvm] r57653 - /llvm/trunk/test/CodeGen/X86/extractps.ll Message-ID: <200810162358.m9GNw0j1028909@zion.cs.uiuc.edu> Author: djg Date: Thu Oct 16 18:57:54 2008 New Revision: 57653 URL: http://llvm.org/viewvc/llvm-project?rev=57653&view=rev Log: Fix this test so it actually runs the grep lines. Modified: llvm/trunk/test/CodeGen/X86/extractps.ll Modified: llvm/trunk/test/CodeGen/X86/extractps.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/extractps.ll?rev=57653&r1=57652&r2=57653&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/extractps.ll (original) +++ llvm/trunk/test/CodeGen/X86/extractps.ll Thu Oct 16 18:57:54 2008 @@ -1,7 +1,7 @@ ; RUN: llvm-as < %s | llc -march=x86 -mcpu=penryn > %t -; not grep movd %t -; not grep movss %t -; grep {extractps \\$0, %xmm0, } %t +; RUN: not grep movd %t +; RUN: not grep movss %t +; RUN: grep {extractps \\\$0, %xmm0, } %t ; PR2647 external global float, align 16 ; :0 [#uses=2] From kremenek at apple.com Thu Oct 16 19:03:39 2008 From: kremenek at apple.com (Ted Kremenek) Date: Fri, 17 Oct 2008 00:03:39 -0000 Subject: [llvm-commits] [llvm] r57655 - /llvm/tags/checker/checker-110/ Message-ID: <200810170003.m9H03dJr029131@zion.cs.uiuc.edu> Author: kremenek Date: Thu Oct 16 19:03:39 2008 New Revision: 57655 URL: http://llvm.org/viewvc/llvm-project?rev=57655&view=rev Log: Removing checker-110. Removed: llvm/tags/checker/checker-110/ From gohman at apple.com Thu Oct 16 19:56:52 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 17 Oct 2008 00:56:52 -0000 Subject: [llvm-commits] [llvm] r57660 - /llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Message-ID: <200810170056.m9H0uqIQ031183@zion.cs.uiuc.edu> Author: djg Date: Thu Oct 16 19:56:52 2008 New Revision: 57660 URL: http://llvm.org/viewvc/llvm-project?rev=57660&view=rev Log: Use 0 instead of false to return a null pointer. Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=57660&r1=57659&r2=57660&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Thu Oct 16 19:56:52 2008 @@ -163,7 +163,7 @@ /// Otherwise, return null. static Value *FindLIVLoopCondition(Value *Cond, Loop *L, bool &Changed) { // Constants should be folded, not unswitched on! - if (isa(Cond)) return false; + if (isa(Cond)) return 0; // TODO: Handle: br (VARIANT|INVARIANT). // TODO: Hoist simple expressions out of loops. From gohman at apple.com Thu Oct 16 20:23:35 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 17 Oct 2008 01:23:35 -0000 Subject: [llvm-commits] [llvm] r57662 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/Target/X86/X86Instr64bit.td lib/Target/X86/X86InstrInfo.cpp lib/Target/X86/X86InstrInfo.td test/CodeGen/X86/rot16.ll test/CodeGen/X86/rot32.ll test/CodeGen/X86/rot64.ll Message-ID: <200810170123.m9H1Na6B032230@zion.cs.uiuc.edu> Author: djg Date: Thu Oct 16 20:23:35 2008 New Revision: 57662 URL: http://llvm.org/viewvc/llvm-project?rev=57662&view=rev Log: Define patterns for shld and shrd that match immediate shift counts, and patterns that match dynamic shift counts when the subtract is obscured by a truncate node. Add DAGCombiner support for recognizing rotate patterns when the shift counts are defined by truncate nodes. Fix and simplify the code for commuting shld and shrd instructions to work even when the given instruction doesn't have a parent, and when the caller needs a new instruction. These changes allow LLVM to use the shld, shrd, rol, and ror instructions on x86 to replace equivalent code using two shifts and an or in many more cases. Added: llvm/trunk/test/CodeGen/X86/rot16.ll llvm/trunk/test/CodeGen/X86/rot32.ll llvm/trunk/test/CodeGen/X86/rot64.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/trunk/lib/Target/X86/X86Instr64bit.td llvm/trunk/lib/Target/X86/X86InstrInfo.cpp llvm/trunk/lib/Target/X86/X86InstrInfo.td Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=57662&r1=57661&r2=57662&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Oct 16 20:23:35 2008 @@ -2053,13 +2053,15 @@ } } - // Look for sign/zext/any-extended cases: + // Look for sign/zext/any-extended or truncate cases: if ((LHSShiftAmt.getOpcode() == ISD::SIGN_EXTEND || LHSShiftAmt.getOpcode() == ISD::ZERO_EXTEND - || LHSShiftAmt.getOpcode() == ISD::ANY_EXTEND) && + || LHSShiftAmt.getOpcode() == ISD::ANY_EXTEND + || LHSShiftAmt.getOpcode() == ISD::TRUNCATE) && (RHSShiftAmt.getOpcode() == ISD::SIGN_EXTEND || RHSShiftAmt.getOpcode() == ISD::ZERO_EXTEND - || RHSShiftAmt.getOpcode() == ISD::ANY_EXTEND)) { + || RHSShiftAmt.getOpcode() == ISD::ANY_EXTEND + || RHSShiftAmt.getOpcode() == ISD::TRUNCATE)) { SDValue LExtOp0 = LHSShiftAmt.getOperand(0); SDValue RExtOp0 = RHSShiftAmt.getOperand(0); if (RExtOp0.getOpcode() == ISD::SUB && @@ -2068,7 +2070,8 @@ // (rotl x, y) // fold (or (shl x, (*ext y)), (srl x, (*ext (sub 32, y)))) -> // (rotr x, (sub 32, y)) - if (ConstantSDNode *SUBC = cast(RExtOp0.getOperand(0))) { + if (ConstantSDNode *SUBC = + dyn_cast(RExtOp0.getOperand(0))) { if (SUBC->getAPIntValue() == OpSizeInBits) { return DAG.getNode(HasROTL ? ISD::ROTL : ISD::ROTR, VT, LHSShiftArg, HasROTL ? LHSShiftAmt : RHSShiftAmt).getNode(); @@ -2080,7 +2083,8 @@ // (rotr x, y) // fold (or (shl x, (*ext (sub 32, y))), (srl x, (*ext y))) -> // (rotl x, (sub 32, y)) - if (ConstantSDNode *SUBC = cast(LExtOp0.getOperand(0))) { + if (ConstantSDNode *SUBC = + dyn_cast(LExtOp0.getOperand(0))) { if (SUBC->getAPIntValue() == OpSizeInBits) { return DAG.getNode(HasROTR ? ISD::ROTR : ISD::ROTL, VT, LHSShiftArg, HasROTR ? RHSShiftAmt : LHSShiftAmt).getNode(); Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Instr64bit.td?rev=57662&r1=57661&r2=57662&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86Instr64bit.td (original) +++ llvm/trunk/lib/Target/X86/X86Instr64bit.td Thu Oct 16 20:23:35 2008 @@ -1397,6 +1397,22 @@ (shl GR64:$src2, (sub 64, CL:$amt))), addr:$dst), (SHRD64mrCL addr:$dst, GR64:$src2)>; +def : Pat<(or (srl GR64:$src1, (i8 (trunc RCX:$amt))), + (shl GR64:$src2, (i8 (trunc (sub 64, RCX:$amt))))), + (SHRD64rrCL GR64:$src1, GR64:$src2)>; + +def : Pat<(store (or (srl (loadi64 addr:$dst), (i8 (trunc RCX:$amt))), + (shl GR64:$src2, (i8 (trunc (sub 64, RCX:$amt))))), + addr:$dst), + (SHRD64mrCL addr:$dst, GR64:$src2)>; + +def : Pat<(shrd GR64:$src1, (i8 imm:$amt1), GR64:$src2, (i8 imm:$amt2)), + (SHRD64rri8 GR64:$src1, GR64:$src2, (i8 imm:$amt1))>; + +def : Pat<(store (shrd (loadi64 addr:$dst), (i8 imm:$amt1), + GR64:$src2, (i8 imm:$amt2)), addr:$dst), + (SHRD64mri8 addr:$dst, GR64:$src2, (i8 imm:$amt1))>; + // (or (x << c) | (y >> (64 - c))) ==> (shld64 x, y, c) def : Pat<(or (shl GR64:$src1, CL:$amt), (srl GR64:$src2, (sub 64, CL:$amt))), @@ -1406,6 +1422,22 @@ (srl GR64:$src2, (sub 64, CL:$amt))), addr:$dst), (SHLD64mrCL addr:$dst, GR64:$src2)>; +def : Pat<(or (shl GR64:$src1, (i8 (trunc RCX:$amt))), + (srl GR64:$src2, (i8 (trunc (sub 64, RCX:$amt))))), + (SHLD64rrCL GR64:$src1, GR64:$src2)>; + +def : Pat<(store (or (shl (loadi64 addr:$dst), (i8 (trunc RCX:$amt))), + (srl GR64:$src2, (i8 (trunc (sub 64, RCX:$amt))))), + addr:$dst), + (SHLD64mrCL addr:$dst, GR64:$src2)>; + +def : Pat<(shld GR64:$src1, (i8 imm:$amt1), GR64:$src2, (i8 imm:$amt2)), + (SHLD64rri8 GR64:$src1, GR64:$src2, (i8 imm:$amt1))>; + +def : Pat<(store (shld (loadi64 addr:$dst), (i8 imm:$amt1), + GR64:$src2, (i8 imm:$amt2)), addr:$dst), + (SHLD64mri8 addr:$dst, GR64:$src2, (i8 imm:$amt1))>; + // X86 specific add which produces a flag. def : Pat<(addc GR64:$src1, GR64:$src2), (ADD64rr GR64:$src1, GR64:$src2)>; Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=57662&r1=57661&r2=57662&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Thu Oct 16 20:23:35 2008 @@ -1248,26 +1248,14 @@ case X86::SHLD64rri8: Size = 64; Opc = X86::SHRD64rri8; break; } unsigned Amt = MI->getOperand(3).getImm(); - unsigned A = MI->getOperand(0).getReg(); - unsigned B = MI->getOperand(1).getReg(); - unsigned C = MI->getOperand(2).getReg(); - bool AisDead = MI->getOperand(0).isDead(); - bool BisKill = MI->getOperand(1).isKill(); - bool CisKill = MI->getOperand(2).isKill(); - // If machine instrs are no longer in two-address forms, update - // destination register as well. - if (A == B) { - // Must be two address instruction! - assert(MI->getDesc().getOperandConstraint(0, TOI::TIED_TO) && - "Expecting a two-address instruction!"); - A = C; - CisKill = false; - } - MachineFunction &MF = *MI->getParent()->getParent(); - return BuildMI(MF, get(Opc)) - .addReg(A, true, false, false, AisDead) - .addReg(C, false, false, CisKill) - .addReg(B, false, false, BisKill).addImm(Size-Amt); + if (NewMI) { + MachineFunction &MF = *MI->getParent()->getParent(); + MI = MF.CloneMachineInstr(MI); + NewMI = false; + } + MI->setDesc(get(Opc)); + MI->getOperand(3).setImm(Size-Amt); + return TargetInstrInfoImpl::commuteInstruction(MI, NewMI); } case X86::CMOVB16rr: case X86::CMOVB32rr: @@ -1357,7 +1345,11 @@ case X86::CMOVNP32rr: Opc = X86::CMOVP32rr; break; case X86::CMOVNP64rr: Opc = X86::CMOVP64rr; break; } - + if (NewMI) { + MachineFunction &MF = *MI->getParent()->getParent(); + MI = MF.CloneMachineInstr(MI); + NewMI = false; + } MI->setDesc(get(Opc)); // Fallthrough intended. } Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=57662&r1=57661&r2=57662&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Thu Oct 16 20:23:35 2008 @@ -325,6 +325,34 @@ return N->hasOneUse(); }]>; +// 'shld' and 'shrd' instruction patterns. Note that even though these have +// the srl and shl in their patterns, the C++ code must still check for them, +// because predicates are tested before children nodes are explored. + +def shrd : PatFrag<(ops node:$src1, node:$amt1, node:$src2, node:$amt2), + (or (srl node:$src1, node:$amt1), + (shl node:$src2, node:$amt2)), [{ + assert(N->getOpcode() == ISD::OR); + return N->getOperand(0).getOpcode() == ISD::SRL && + N->getOperand(1).getOpcode() == ISD::SHL && + isa(N->getOperand(0).getOperand(1)) && + isa(N->getOperand(1).getOperand(1)) && + N->getOperand(0).getConstantOperandVal(1) == + N->getValueSizeInBits(0) - N->getOperand(1).getConstantOperandVal(1); +}]>; + +def shld : PatFrag<(ops node:$src1, node:$amt1, node:$src2, node:$amt2), + (or (shl node:$src1, node:$amt1), + (srl node:$src2, node:$amt2)), [{ + assert(N->getOpcode() == ISD::OR); + return N->getOperand(0).getOpcode() == ISD::SHL && + N->getOperand(1).getOpcode() == ISD::SRL && + isa(N->getOperand(0).getOperand(1)) && + isa(N->getOperand(1).getOperand(1)) && + N->getOperand(0).getConstantOperandVal(1) == + N->getValueSizeInBits(0) - N->getOperand(1).getConstantOperandVal(1); +}]>; + //===----------------------------------------------------------------------===// // Instruction list... // @@ -2973,6 +3001,22 @@ (shl GR32:$src2, (sub 32, CL:$amt))), addr:$dst), (SHRD32mrCL addr:$dst, GR32:$src2)>; +def : Pat<(or (srl GR32:$src1, (i8 (trunc ECX:$amt))), + (shl GR32:$src2, (i8 (trunc (sub 32, ECX:$amt))))), + (SHRD32rrCL GR32:$src1, GR32:$src2)>; + +def : Pat<(store (or (srl (loadi32 addr:$dst), (i8 (trunc ECX:$amt))), + (shl GR32:$src2, (i8 (trunc (sub 32, ECX:$amt))))), + addr:$dst), + (SHRD32mrCL addr:$dst, GR32:$src2)>; + +def : Pat<(shrd GR32:$src1, (i8 imm:$amt1), GR32:$src2, (i8 imm:$amt2)), + (SHRD32rri8 GR32:$src1, GR32:$src2, (i8 imm:$amt1))>; + +def : Pat<(store (shrd (loadi32 addr:$dst), (i8 imm:$amt1), + GR32:$src2, (i8 imm:$amt2)), addr:$dst), + (SHRD32mri8 addr:$dst, GR32:$src2, (i8 imm:$amt1))>; + // (or (x << c) | (y >> (32 - c))) ==> (shld32 x, y, c) def : Pat<(or (shl GR32:$src1, CL:$amt), (srl GR32:$src2, (sub 32, CL:$amt))), @@ -2982,6 +3026,22 @@ (srl GR32:$src2, (sub 32, CL:$amt))), addr:$dst), (SHLD32mrCL addr:$dst, GR32:$src2)>; +def : Pat<(or (shl GR32:$src1, (i8 (trunc ECX:$amt))), + (srl GR32:$src2, (i8 (trunc (sub 32, ECX:$amt))))), + (SHLD32rrCL GR32:$src1, GR32:$src2)>; + +def : Pat<(store (or (shl (loadi32 addr:$dst), (i8 (trunc ECX:$amt))), + (srl GR32:$src2, (i8 (trunc (sub 32, ECX:$amt))))), + addr:$dst), + (SHLD32mrCL addr:$dst, GR32:$src2)>; + +def : Pat<(shld GR32:$src1, (i8 imm:$amt1), GR32:$src2, (i8 imm:$amt2)), + (SHLD32rri8 GR32:$src1, GR32:$src2, (i8 imm:$amt1))>; + +def : Pat<(store (shld (loadi32 addr:$dst), (i8 imm:$amt1), + GR32:$src2, (i8 imm:$amt2)), addr:$dst), + (SHLD32mri8 addr:$dst, GR32:$src2, (i8 imm:$amt1))>; + // (or (x >> c) | (y << (16 - c))) ==> (shrd16 x, y, c) def : Pat<(or (srl GR16:$src1, CL:$amt), (shl GR16:$src2, (sub 16, CL:$amt))), @@ -2991,6 +3051,22 @@ (shl GR16:$src2, (sub 16, CL:$amt))), addr:$dst), (SHRD16mrCL addr:$dst, GR16:$src2)>; +def : Pat<(or (srl GR16:$src1, (i8 (trunc CX:$amt))), + (shl GR16:$src2, (i8 (trunc (sub 16, CX:$amt))))), + (SHRD16rrCL GR16:$src1, GR16:$src2)>; + +def : Pat<(store (or (srl (loadi16 addr:$dst), (i8 (trunc CX:$amt))), + (shl GR16:$src2, (i8 (trunc (sub 16, CX:$amt))))), + addr:$dst), + (SHRD16mrCL addr:$dst, GR16:$src2)>; + +def : Pat<(shrd GR16:$src1, (i8 imm:$amt1), GR16:$src2, (i8 imm:$amt2)), + (SHRD16rri8 GR16:$src1, GR16:$src2, (i8 imm:$amt1))>; + +def : Pat<(store (shrd (loadi16 addr:$dst), (i8 imm:$amt1), + GR16:$src2, (i8 imm:$amt2)), addr:$dst), + (SHRD16mri8 addr:$dst, GR16:$src2, (i8 imm:$amt1))>; + // (or (x << c) | (y >> (16 - c))) ==> (shld16 x, y, c) def : Pat<(or (shl GR16:$src1, CL:$amt), (srl GR16:$src2, (sub 16, CL:$amt))), @@ -3000,6 +3076,22 @@ (srl GR16:$src2, (sub 16, CL:$amt))), addr:$dst), (SHLD16mrCL addr:$dst, GR16:$src2)>; +def : Pat<(or (shl GR16:$src1, (i8 (trunc CX:$amt))), + (srl GR16:$src2, (i8 (trunc (sub 16, CX:$amt))))), + (SHLD16rrCL GR16:$src1, GR16:$src2)>; + +def : Pat<(store (or (shl (loadi16 addr:$dst), (i8 (trunc CX:$amt))), + (srl GR16:$src2, (i8 (trunc (sub 16, CX:$amt))))), + addr:$dst), + (SHLD16mrCL addr:$dst, GR16:$src2)>; + +def : Pat<(shld GR16:$src1, (i8 imm:$amt1), GR16:$src2, (i8 imm:$amt2)), + (SHLD16rri8 GR16:$src1, GR16:$src2, (i8 imm:$amt1))>; + +def : Pat<(store (shld (loadi16 addr:$dst), (i8 imm:$amt1), + GR16:$src2, (i8 imm:$amt2)), addr:$dst), + (SHLD16mri8 addr:$dst, GR16:$src2, (i8 imm:$amt1))>; + //===----------------------------------------------------------------------===// // Floating Point Stack Support //===----------------------------------------------------------------------===// Added: llvm/trunk/test/CodeGen/X86/rot16.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/rot16.ll?rev=57662&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/rot16.ll (added) +++ llvm/trunk/test/CodeGen/X86/rot16.ll Thu Oct 16 20:23:35 2008 @@ -0,0 +1,73 @@ +; RUN: llvm-as < %s | llc -march=x86 > %t +; RUN: grep rol %t | count 3 +; RUN: grep ror %t | count 1 +; RUN: grep shld %t | count 2 +; RUN: grep shrd %t | count 2 + +define i16 @foo(i16 %x, i16 %y, i16 %z) nounwind readnone { +entry: + %0 = shl i16 %x, %z + %1 = sub i16 16, %z + %2 = lshr i16 %x, %1 + %3 = or i16 %2, %0 + ret i16 %3 +} + +define i16 @bar(i16 %x, i16 %y, i16 %z) nounwind readnone { +entry: + %0 = shl i16 %y, %z + %1 = sub i16 16, %z + %2 = lshr i16 %x, %1 + %3 = or i16 %2, %0 + ret i16 %3 +} + +define i16 @un(i16 %x, i16 %y, i16 %z) nounwind readnone { +entry: + %0 = lshr i16 %x, %z + %1 = sub i16 16, %z + %2 = shl i16 %x, %1 + %3 = or i16 %2, %0 + ret i16 %3 +} + +define i16 @bu(i16 %x, i16 %y, i16 %z) nounwind readnone { +entry: + %0 = lshr i16 %y, %z + %1 = sub i16 16, %z + %2 = shl i16 %x, %1 + %3 = or i16 %2, %0 + ret i16 %3 +} + +define i16 @xfoo(i16 %x, i16 %y, i16 %z) nounwind readnone { +entry: + %0 = lshr i16 %x, 11 + %1 = shl i16 %x, 5 + %2 = or i16 %0, %1 + ret i16 %2 +} + +define i16 @xbar(i16 %x, i16 %y, i16 %z) nounwind readnone { +entry: + %0 = shl i16 %y, 5 + %1 = lshr i16 %x, 11 + %2 = or i16 %0, %1 + ret i16 %2 +} + +define i16 @xun(i16 %x, i16 %y, i16 %z) nounwind readnone { +entry: + %0 = lshr i16 %x, 5 + %1 = shl i16 %x, 11 + %2 = or i16 %0, %1 + ret i16 %2 +} + +define i16 @xbu(i16 %x, i16 %y, i16 %z) nounwind readnone { +entry: + %0 = lshr i16 %y, 5 + %1 = shl i16 %x, 11 + %2 = or i16 %0, %1 + ret i16 %2 +} Added: llvm/trunk/test/CodeGen/X86/rot32.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/rot32.ll?rev=57662&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/rot32.ll (added) +++ llvm/trunk/test/CodeGen/X86/rot32.ll Thu Oct 16 20:23:35 2008 @@ -0,0 +1,73 @@ +; RUN: llvm-as < %s | llc -march=x86 > %t +; RUN: grep rol %t | count 3 +; RUN: grep ror %t | count 1 +; RUN: grep shld %t | count 2 +; RUN: grep shrd %t | count 2 + +define i32 @foo(i32 %x, i32 %y, i32 %z) nounwind readnone { +entry: + %0 = shl i32 %x, %z + %1 = sub i32 32, %z + %2 = lshr i32 %x, %1 + %3 = or i32 %2, %0 + ret i32 %3 +} + +define i32 @bar(i32 %x, i32 %y, i32 %z) nounwind readnone { +entry: + %0 = shl i32 %y, %z + %1 = sub i32 32, %z + %2 = lshr i32 %x, %1 + %3 = or i32 %2, %0 + ret i32 %3 +} + +define i32 @un(i32 %x, i32 %y, i32 %z) nounwind readnone { +entry: + %0 = lshr i32 %x, %z + %1 = sub i32 32, %z + %2 = shl i32 %x, %1 + %3 = or i32 %2, %0 + ret i32 %3 +} + +define i32 @bu(i32 %x, i32 %y, i32 %z) nounwind readnone { +entry: + %0 = lshr i32 %y, %z + %1 = sub i32 32, %z + %2 = shl i32 %x, %1 + %3 = or i32 %2, %0 + ret i32 %3 +} + +define i32 @xfoo(i32 %x, i32 %y, i32 %z) nounwind readnone { +entry: + %0 = lshr i32 %x, 25 + %1 = shl i32 %x, 7 + %2 = or i32 %0, %1 + ret i32 %2 +} + +define i32 @xbar(i32 %x, i32 %y, i32 %z) nounwind readnone { +entry: + %0 = shl i32 %y, 7 + %1 = lshr i32 %x, 25 + %2 = or i32 %0, %1 + ret i32 %2 +} + +define i32 @xun(i32 %x, i32 %y, i32 %z) nounwind readnone { +entry: + %0 = lshr i32 %x, 7 + %1 = shl i32 %x, 25 + %2 = or i32 %0, %1 + ret i32 %2 +} + +define i32 @xbu(i32 %x, i32 %y, i32 %z) nounwind readnone { +entry: + %0 = lshr i32 %y, 7 + %1 = shl i32 %x, 25 + %2 = or i32 %0, %1 + ret i32 %2 +} Added: llvm/trunk/test/CodeGen/X86/rot64.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/rot64.ll?rev=57662&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/rot64.ll (added) +++ llvm/trunk/test/CodeGen/X86/rot64.ll Thu Oct 16 20:23:35 2008 @@ -0,0 +1,73 @@ +; RUN: llvm-as < %s | llc -march=x86-64 > %t +; RUN: grep rol %t | count 3 +; RUN: grep ror %t | count 1 +; RUN: grep shld %t | count 2 +; RUN: grep shrd %t | count 2 + +define i64 @foo(i64 %x, i64 %y, i64 %z) nounwind readnone { +entry: + %0 = shl i64 %x, %z + %1 = sub i64 64, %z + %2 = lshr i64 %x, %1 + %3 = or i64 %2, %0 + ret i64 %3 +} + +define i64 @bar(i64 %x, i64 %y, i64 %z) nounwind readnone { +entry: + %0 = shl i64 %y, %z + %1 = sub i64 64, %z + %2 = lshr i64 %x, %1 + %3 = or i64 %2, %0 + ret i64 %3 +} + +define i64 @un(i64 %x, i64 %y, i64 %z) nounwind readnone { +entry: + %0 = lshr i64 %x, %z + %1 = sub i64 64, %z + %2 = shl i64 %x, %1 + %3 = or i64 %2, %0 + ret i64 %3 +} + +define i64 @bu(i64 %x, i64 %y, i64 %z) nounwind readnone { +entry: + %0 = lshr i64 %y, %z + %1 = sub i64 64, %z + %2 = shl i64 %x, %1 + %3 = or i64 %2, %0 + ret i64 %3 +} + +define i64 @xfoo(i64 %x, i64 %y, i64 %z) nounwind readnone { +entry: + %0 = lshr i64 %x, 57 + %1 = shl i64 %x, 7 + %2 = or i64 %0, %1 + ret i64 %2 +} + +define i64 @xbar(i64 %x, i64 %y, i64 %z) nounwind readnone { +entry: + %0 = shl i64 %y, 7 + %1 = lshr i64 %x, 57 + %2 = or i64 %0, %1 + ret i64 %2 +} + +define i64 @xun(i64 %x, i64 %y, i64 %z) nounwind readnone { +entry: + %0 = lshr i64 %x, 7 + %1 = shl i64 %x, 57 + %2 = or i64 %0, %1 + ret i64 %2 +} + +define i64 @xbu(i64 %x, i64 %y, i64 %z) nounwind readnone { +entry: + %0 = lshr i64 %y, 7 + %1 = shl i64 %x, 57 + %2 = or i64 %0, %1 + ret i64 %2 +} From gohman at apple.com Thu Oct 16 20:33:44 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 17 Oct 2008 01:33:44 -0000 Subject: [llvm-commits] [llvm] r57663 - in /llvm/trunk: CMakeLists.txt Makefile.rules lib/Target/X86/X86Instr64bit.td lib/Target/X86/X86InstrInfo.td test/CodeGen/X86/add-trick32.ll test/CodeGen/X86/add-trick64.ll test/TableGen/2006-09-18-LargeInt.td utils/TableGen/DAGISelEmitter.cpp utils/TableGen/Record.cpp utils/TableGen/Record.h utils/TableGen/RegisterInfoEmitter.cpp utils/TableGen/TGLexer.cpp utils/TableGen/TGLexer.h utils/TableGen/TGParser.cpp Message-ID: <200810170133.m9H1Xi4w032668@zion.cs.uiuc.edu> Author: djg Date: Thu Oct 16 20:33:43 2008 New Revision: 57663 URL: http://llvm.org/viewvc/llvm-project?rev=57663&view=rev Log: Fun x86 encoding tricks: when adding an immediate value of 128, use a SUB instruction instead of an ADD, because -128 can be encoded in an 8-bit signed immediate field, while +128 can't be. This avoids the need for a 32-bit immediate field in this case. A similar optimization applies to 64-bit adds with 0x80000000, with the 32-bit signed immediate field. To support this, teach tablegen how to handle 64-bit constants. Added: llvm/trunk/test/CodeGen/X86/add-trick32.ll llvm/trunk/test/CodeGen/X86/add-trick64.ll Modified: llvm/trunk/CMakeLists.txt llvm/trunk/Makefile.rules llvm/trunk/lib/Target/X86/X86Instr64bit.td llvm/trunk/lib/Target/X86/X86InstrInfo.td llvm/trunk/test/TableGen/2006-09-18-LargeInt.td llvm/trunk/utils/TableGen/DAGISelEmitter.cpp llvm/trunk/utils/TableGen/Record.cpp llvm/trunk/utils/TableGen/Record.h llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp llvm/trunk/utils/TableGen/TGLexer.cpp llvm/trunk/utils/TableGen/TGLexer.h llvm/trunk/utils/TableGen/TGParser.cpp Modified: llvm/trunk/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=57663&r1=57662&r2=57663&view=diff ============================================================================== --- llvm/trunk/CMakeLists.txt (original) +++ llvm/trunk/CMakeLists.txt Thu Oct 16 20:33:43 2008 @@ -80,6 +80,7 @@ # set(CMAKE_VERBOSE_MAKEFILE true) add_definitions( -D__STDC_LIMIT_MACROS ) +add_definitions( -D__STDC_CONSTANT_MACROS ) if( LLVM_ON_UNIX ) add_definitions( -DLLVM_ON_UNIX ) Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=57663&r1=57662&r2=57663&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Thu Oct 16 20:33:43 2008 @@ -483,7 +483,7 @@ endif LD.Flags += -L$(LibDir) -L$(LLVMLibDir) -CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS +CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS # All -I flags should go here, so that they don't confuse llvm-config. CPP.Flags += $(sort -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \ $(patsubst %,-I%/include,\ Modified: llvm/trunk/lib/Target/X86/X86Instr64bit.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86Instr64bit.td?rev=57663&r1=57662&r2=57663&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86Instr64bit.td (original) +++ llvm/trunk/lib/Target/X86/X86Instr64bit.td Thu Oct 16 20:33:43 2008 @@ -61,13 +61,6 @@ return (int64_t)N->getZExtValue() == (int8_t)N->getZExtValue(); }]>; -def i64immFFFFFFFF : PatLeaf<(i64 imm), [{ - // i64immFFFFFFFF - True if this is a specific constant we can't write in - // tblgen files. - return N->getZExtValue() == 0x00000000FFFFFFFFULL; -}]>; - - def sextloadi64i8 : PatFrag<(ops node:$ptr), (i64 (sextloadi8 node:$ptr))>; def sextloadi64i16 : PatFrag<(ops node:$ptr), (i64 (sextloadi16 node:$ptr))>; def sextloadi64i32 : PatFrag<(ops node:$ptr), (i64 (sextloadi32 node:$ptr))>; @@ -1323,8 +1316,22 @@ // Some peepholes //===----------------------------------------------------------------------===// +// Odd encoding trick: -128 fits into an 8-bit immediate field while +// +128 doesn't, so in this special case use a sub instead of an add. +def : Pat<(add GR64:$src1, 128), + (SUB64ri8 GR64:$src1, -128)>; +def : Pat<(store (add (loadi64 addr:$dst), 128), addr:$dst), + (SUB64mi8 addr:$dst, -128)>; + +// The same trick applies for 32-bit immediate fields in 64-bit +// instructions. +def : Pat<(add GR64:$src1, 0x0000000080000000), + (SUB64ri32 GR64:$src1, 0xffffffff80000000)>; +def : Pat<(store (add (loadi64 addr:$dst), 0x00000000800000000), addr:$dst), + (SUB64mi32 addr:$dst, 0xffffffff80000000)>; + // r & (2^32-1) ==> movz -def : Pat<(and GR64:$src, i64immFFFFFFFF), +def : Pat<(and GR64:$src, 0x00000000FFFFFFFF), (MOVZX64rr32 (i32 (EXTRACT_SUBREG GR64:$src, x86_subreg_32bit)))>; // r & (2^16-1) ==> movz def : Pat<(and GR64:$src, 0xffff), Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=57663&r1=57662&r2=57663&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Thu Oct 16 20:33:43 2008 @@ -2911,6 +2911,17 @@ // Some peepholes //===----------------------------------------------------------------------===// +// Odd encoding trick: -128 fits into an 8-bit immediate field while +// +128 doesn't, so in this special case use a sub instead of an add. +def : Pat<(add GR16:$src1, 128), + (SUB16ri8 GR16:$src1, -128)>; +def : Pat<(store (add (loadi16 addr:$dst), 128), addr:$dst), + (SUB16mi8 addr:$dst, -128)>; +def : Pat<(add GR32:$src1, 128), + (SUB32ri8 GR32:$src1, -128)>; +def : Pat<(store (add (loadi32 addr:$dst), 128), addr:$dst), + (SUB32mi8 addr:$dst, -128)>; + // r & (2^16-1) ==> movz def : Pat<(and GR32:$src1, 0xffff), (MOVZX32rr16 (i16 (EXTRACT_SUBREG GR32:$src1, x86_subreg_16bit)))>; Added: llvm/trunk/test/CodeGen/X86/add-trick32.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/add-trick32.ll?rev=57663&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/add-trick32.ll (added) +++ llvm/trunk/test/CodeGen/X86/add-trick32.ll Thu Oct 16 20:33:43 2008 @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llc -march=x86 > %t +; RUN: not grep add %t +; RUN: grep subl %t | count 1 + +; The immediate can be encoded in a smaller way if the +; instruction is a sub instead of an add. + +define i32 @foo(i32 inreg %a) nounwind { + %b = add i32 %a, 128 + ret i32 %b +} Added: llvm/trunk/test/CodeGen/X86/add-trick64.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/add-trick64.ll?rev=57663&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/add-trick64.ll (added) +++ llvm/trunk/test/CodeGen/X86/add-trick64.ll Thu Oct 16 20:33:43 2008 @@ -0,0 +1,15 @@ +; RUN: llvm-as < %s | llc -march=x86-64 > %t +; RUN: not grep add %t +; RUN: grep subq %t | count 2 + +; The immediate can be encoded in a smaller way if the +; instruction is a sub instead of an add. + +define i64 @foo(i64 inreg %a) nounwind { + %b = add i64 %a, 2147483648 + ret i64 %b +} +define i64 @bar(i64 inreg %a) nounwind { + %b = add i64 %a, 128 + ret i64 %b +} Modified: llvm/trunk/test/TableGen/2006-09-18-LargeInt.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/TableGen/2006-09-18-LargeInt.td?rev=57663&r1=57662&r2=57663&view=diff ============================================================================== --- llvm/trunk/test/TableGen/2006-09-18-LargeInt.td (original) +++ llvm/trunk/test/TableGen/2006-09-18-LargeInt.td Thu Oct 16 20:33:43 2008 @@ -1,4 +1,4 @@ -// RUN: tblgen %s | grep -- -65536 +// RUN: tblgen %s | grep -- 4294901760 def X { int Y = 0xFFFF0000; Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=57663&r1=57662&r2=57663&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Thu Oct 16 20:33:43 2008 @@ -734,7 +734,8 @@ emitCode("int64_t CN"+utostr(CTmp)+" = cast("+ RootName + ")->getSExtValue();"); - emitCheck("CN" + utostr(CTmp) + " == " +itostr(II->getValue())); + emitCheck("CN" + utostr(CTmp) + " == " + "INT64_C(" +itostr(II->getValue()) + ")"); } else { #ifndef NDEBUG Child->dump(); Modified: llvm/trunk/utils/TableGen/Record.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/Record.cpp?rev=57663&r1=57662&r2=57663&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/Record.cpp (original) +++ llvm/trunk/utils/TableGen/Record.cpp Thu Oct 16 20:33:43 2008 @@ -35,7 +35,7 @@ } Init *BitRecTy::convertValue(IntInit *II) { - int Val = II->getValue(); + int64_t Val = II->getValue(); if (Val != 0 && Val != 1) return 0; // Only accept 0 or 1 for a bit! return new BitInit(Val != 0); @@ -116,7 +116,7 @@ } Init *IntRecTy::convertValue(BitsInit *BI) { - int Result = 0; + int64_t Result = 0; for (unsigned i = 0, e = BI->getNumBits(); i != e; ++i) if (BitInit *Bit = dynamic_cast(BI->getBit(i))) { Result |= Bit->getValue() << i; @@ -262,7 +262,7 @@ bool BitsInit::printInHex(std::ostream &OS) const { // First, attempt to convert the value into an integer value... - int Result = 0; + int64_t Result = 0; for (unsigned i = 0, e = getNumBits(); i != e; ++i) if (BitInit *Bit = dynamic_cast(getBit(i))) { Result |= Bit->getValue() << i; @@ -338,11 +338,11 @@ BitsInit *BI = new BitsInit(Bits.size()); for (unsigned i = 0, e = Bits.size(); i != e; ++i) { - if (Bits[i] >= 32) { + if (Bits[i] >= 64) { delete BI; return 0; } - BI->setBit(i, new BitInit(Value & (1 << Bits[i]))); + BI->setBit(i, new BitInit(Value & (INT64_C(1) << Bits[i]))); } return BI; } @@ -443,13 +443,13 @@ IntInit *LHSi = dynamic_cast(LHS); IntInit *RHSi = dynamic_cast(RHS); if (LHSi && RHSi) { - int LHSv = LHSi->getValue(), RHSv = RHSi->getValue(); - int Result; + int64_t LHSv = LHSi->getValue(), RHSv = RHSi->getValue(); + int64_t Result; switch (getOpcode()) { default: assert(0 && "Bad opcode!"); case SHL: Result = LHSv << RHSv; break; case SRA: Result = LHSv >> RHSv; break; - case SRL: Result = (unsigned)LHSv >> (unsigned)RHSv; break; + case SRL: Result = (uint64_t)LHSv >> (uint64_t)RHSv; break; } return new IntInit(Result); } @@ -861,10 +861,10 @@ } /// getValueAsInt - This method looks up the specified field and returns its -/// value as an int, throwing an exception if the field does not exist or if +/// value as an int64_t, throwing an exception if the field does not exist or if /// the value is not the right type. /// -int Record::getValueAsInt(const std::string &FieldName) const { +int64_t Record::getValueAsInt(const std::string &FieldName) const { const RecordVal *R = getValue(FieldName); if (R == 0 || R->getValue() == 0) throw "Record `" + getName() + "' does not have a field named `" + @@ -880,10 +880,10 @@ /// its value as a vector of integers, throwing an exception if the field does /// not exist or if the value is not the right type. /// -std::vector +std::vector Record::getValueAsListOfInts(const std::string &FieldName) const { ListInit *List = getValueAsListInit(FieldName); - std::vector Ints; + std::vector Ints; for (unsigned i = 0; i < List->getSize(); i++) { if (IntInit *II = dynamic_cast(List->getElement(i))) { Ints.push_back(II->getValue()); Modified: llvm/trunk/utils/TableGen/Record.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/Record.h?rev=57663&r1=57662&r2=57663&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/Record.h (original) +++ llvm/trunk/utils/TableGen/Record.h Thu Oct 16 20:33:43 2008 @@ -565,11 +565,11 @@ /// IntInit - 7 - Represent an initalization by a literal integer value. /// class IntInit : public Init { - int Value; + int64_t Value; public: - explicit IntInit(int V) : Value(V) {} + explicit IntInit(int64_t V) : Value(V) {} - int getValue() const { return Value; } + int64_t getValue() const { return Value; } virtual Init *convertInitializerTo(RecTy *Ty) { return Ty->convertValue(this); @@ -1082,7 +1082,7 @@ /// its value as a vector of integers, throwing an exception if the field does /// not exist or if the value is not the right type. /// - std::vector getValueAsListOfInts(const std::string &FieldName) const; + std::vector getValueAsListOfInts(const std::string &FieldName) const; /// getValueAsDef - This method looks up the specified field and returns its /// value as a Record, throwing an exception if the field does not exist or if @@ -1097,10 +1097,10 @@ bool getValueAsBit(const std::string &FieldName) const; /// getValueAsInt - This method looks up the specified field and returns its - /// value as an int, throwing an exception if the field does not exist or if - /// the value is not the right type. + /// value as an int64_t, throwing an exception if the field does not exist or + /// if the value is not the right type. /// - int getValueAsInt(const std::string &FieldName) const; + int64_t getValueAsInt(const std::string &FieldName) const; /// getValueAsDag - This method looks up the specified field and returns its /// value as an Dag, throwing an exception if the field does not exist or if Modified: llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp?rev=57663&r1=57662&r2=57663&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp Thu Oct 16 20:33:43 2008 @@ -422,7 +422,7 @@ std::map, LessRecord> RegisterSuperRegs; std::map, LessRecord> RegisterAliases; std::map > > SubRegVectors; - typedef std::map, LessRecord> DwarfRegNumsMapTy; + typedef std::map, LessRecord> DwarfRegNumsMapTy; DwarfRegNumsMapTy DwarfRegNums; const std::vector &Regs = Target.getRegisters(); @@ -685,7 +685,7 @@ unsigned maxLength = 0; for (unsigned i = 0, e = Registers.size(); i != e; ++i) { Record *Reg = Registers[i].TheDef; - std::vector RegNums = Reg->getValueAsListOfInts("DwarfNumbers"); + std::vector RegNums = Reg->getValueAsListOfInts("DwarfNumbers"); maxLength = std::max((size_t)maxLength, RegNums.size()); if (DwarfRegNums.count(Reg)) cerr << "Warning: DWARF numbers for register " << getQualifiedName(Reg) Modified: llvm/trunk/utils/TableGen/TGLexer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/TGLexer.cpp?rev=57663&r1=57662&r2=57663&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/TGLexer.cpp (original) +++ llvm/trunk/utils/TableGen/TGLexer.cpp Thu Oct 16 20:33:43 2008 @@ -20,6 +20,7 @@ #include #include #include +#include using namespace llvm; TGLexer::TGLexer(MemoryBuffer *StartBuf) : CurLineNo(1), CurBuf(StartBuf) { @@ -343,7 +344,18 @@ if (CurPtr == NumStart) return ReturnError(CurPtr-2, "Invalid hexadecimal number"); + errno = 0; CurIntVal = strtoll(NumStart, 0, 16); + if (errno == EINVAL) + return ReturnError(CurPtr-2, "Invalid hexadecimal number"); + if (errno == ERANGE) { + errno = 0; + CurIntVal = (int64_t)strtoull(NumStart, 0, 16); + if (errno == EINVAL) + return ReturnError(CurPtr-2, "Invalid hexadecimal number"); + if (errno == ERANGE) + return ReturnError(CurPtr-2, "Hexadecimal number out of range"); + } return tgtok::IntVal; } else if (CurPtr[0] == 'b') { ++CurPtr; Modified: llvm/trunk/utils/TableGen/TGLexer.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/TGLexer.h?rev=57663&r1=57662&r2=57663&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/TGLexer.h (original) +++ llvm/trunk/utils/TableGen/TGLexer.h Thu Oct 16 20:33:43 2008 @@ -62,7 +62,7 @@ const char *TokStart; tgtok::TokKind CurCode; std::string CurStrVal; // This is valid for ID, STRVAL, VARNAME, CODEFRAGMENT - int CurIntVal; // This is valid for INTVAL. + int64_t CurIntVal; // This is valid for INTVAL. /// IncludeRec / IncludeStack - This captures the current set of include /// directives we are nested within. @@ -98,7 +98,7 @@ "This token doesn't have a string value"); return CurStrVal; } - int getCurIntVal() const { + int64_t getCurIntVal() const { assert(CurCode == tgtok::IntVal && "This token isn't an integer"); return CurIntVal; } Modified: llvm/trunk/utils/TableGen/TGParser.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/TGParser.cpp?rev=57663&r1=57662&r2=57663&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/TGParser.cpp (original) +++ llvm/trunk/utils/TableGen/TGParser.cpp Thu Oct 16 20:33:43 2008 @@ -294,8 +294,8 @@ TokError("expected integer or bitrange"); return true; } - int Start = Lex.getCurIntVal(); - int End; + int64_t Start = Lex.getCurIntVal(); + int64_t End; if (Start < 0) return TokError("invalid range, cannot be negative"); @@ -426,7 +426,7 @@ TokError("expected integer in bits type"); return 0; } - unsigned Val = Lex.getCurIntVal(); + uint64_t Val = Lex.getCurIntVal(); if (Lex.Lex() != tgtok::greater) { // Eat count. TokError("expected '>' at end of bits type"); return 0; From clattner at apple.com Thu Oct 16 23:27:51 2008 From: clattner at apple.com (Chris Lattner) Date: Thu, 16 Oct 2008 21:27:51 -0700 Subject: [llvm-commits] tblgen change? Message-ID: I'm seeing tons of warnings like this: In file included from ARMISelDAGToDAG.cpp:90: ARMGenDAGISel.inc:7651: warning: this decimal constant is unsigned only in ISO C90 ARMGenDAGISel.inc:7734: warning: this decimal constant is unsigned only in ISO C90 ARMGenDAGISel.inc:7817: warning: this decimal constant is unsigned only in ISO C90 ARMGenDAGISel.inc:7857: warning: this decimal constant is unsigned only in ISO C90 Is this new? What changed? -Chris From gohman at apple.com Thu Oct 16 23:40:39 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 17 Oct 2008 04:40:39 -0000 Subject: [llvm-commits] [llvm] r57668 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200810170440.m9H4eeR2007398@zion.cs.uiuc.edu> Author: djg Date: Thu Oct 16 23:40:39 2008 New Revision: 57668 URL: http://llvm.org/viewvc/llvm-project?rev=57668&view=rev Log: Use INT64_C to emit constant values, to avoid problems with constants that don't fit in an int. This fixes "this decimal constant is unsigned only in ISO C90" warnings. Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=57668&r1=57667&r2=57668&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Thu Oct 16 23:40:39 2008 @@ -444,7 +444,8 @@ if (N->isLeaf()) { if (IntInit *II = dynamic_cast(N->getLeafValue())) { emitCheck("cast(" + RootName + - ")->getSExtValue() == " + itostr(II->getValue())); + ")->getSExtValue() == INT64_C(" + + itostr(II->getValue()) + ")"); return; } else if (!NodeIsComplexPattern(N)) { assert(0 && "Cannot match this as a leaf value!"); @@ -578,7 +579,7 @@ const char *MaskPredicate = N->getOperator()->getName() == "or" ? "CheckOrMask(" : "CheckAndMask("; emitCheck(MaskPredicate + RootName + "0, cast(" + - RootName + "1), " + itostr(II->getValue()) + ")"); + RootName + "1), INT64_C(" + itostr(II->getValue()) + "))"); EmitChildMatchCode(N->getChild(0), N, RootName + utostr(0), RootName, ChainSuffix + utostr(0), FoundChain); From alenhar2 at cs.uiuc.edu Thu Oct 16 23:44:25 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Fri, 17 Oct 2008 04:44:25 -0000 Subject: [llvm-commits] [poolalloc] r57669 - in /poolalloc/trunk/include/poolalloc_runtime: PoolAllocator.h Support/SplayTree.h test.ex Message-ID: <200810170444.m9H4iPbB007527@zion.cs.uiuc.edu> Author: alenhar2 Date: Thu Oct 16 23:44:25 2008 New Revision: 57669 URL: http://llvm.org/viewvc/llvm-project?rev=57669&view=rev Log: Use c++ allocators. Allow seperation of data and metadata by using different allocators Modified: poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h poolalloc/trunk/include/poolalloc_runtime/test.ex Modified: poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h?rev=57669&r1=57668&r2=57669&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h (original) +++ poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h Thu Oct 16 23:44:25 2008 @@ -1,43 +1,50 @@ #include "poolalloc_runtime/Support/SplayTree.h" +#include "llvm/ADT/hash_map.h" #include -template class SlabManager > -class PoolAllocator : SlabManager { - using SlabManager::slab_alloc; - using SlabManager::slab_free; - using SlabManager::slab_valid; - using SlabManager::slab_getbounds; +template +class PoolAllocator : SlabManager { + using SlabManager::slab_alloc; + using SlabManager::slab_free; + using SlabManager::slab_valid; + using SlabManager::slab_getbounds; + using SlabManager::slab_managed; + public: PoolAllocator(unsigned objsize, unsigned Alignment) - : SlabManager(objsize, Alignment) + : SlabManager(objsize, Alignment) {} - - //In-place new operator + // In-place new operator static void* operator new( std::size_t s, void* p ) throw() { return p; } - //Allocate an object of size objsize + // Allocate an object of size objsize void* alloc() { return slab_alloc(1); } - //Allocate an array with num objects of size objsize + // Allocate an array with num objects of size objsize void* alloc_array(unsigned num) { return slab_alloc(num); } - //Free allocated object + // Free allocated object void dealloc(void* obj) { slab_free(obj); } - //Tests if obj is in an allocated object + // Tests if obj is in an allocated object bool isAllocated(void* obj) { return slab_valid(obj); } + // Tests if the obj is in the managed set + bool isManaged(void* obj) { + return slab_managed(obj); + } + // Returns the start and end of an object, return value is true if found bool getBounds(void* obj, void*& start, void*& end) { return slab_getbounds(obj, start, end); @@ -45,25 +52,31 @@ }; -class mmapPageManager { - enum { pageSize = 4096 }; -}; - -template +template, class DataAllocator = std::allocator > class MallocSlabManager { - RangeSplaySet objs; + typedef typename DataAllocator::template rebind::other DAlloc; + typedef typename SafeAllocator::template rebind::other SAlloc; + + RangeSplaySet objs; unsigned objsize; + + DAlloc allocator; + protected: MallocSlabManager(unsigned Osize, unsigned Alignment) : objsize(Osize) {} void* slab_alloc(unsigned num) { - void* x = malloc(num*objsize); + void* x = allocator.allocate(num*objsize); objs.insert(x, (char*)x + num*objsize - 1); return x; } void slab_free(void* obj) { - objs.remove(obj); - free(obj); + void* start; + void* end; + if (objs.find(obj, start, end)) { + objs.remove(obj); + allocator.deallocate((char*)start, ((char*)end-(char*)start) + 1); + } } bool slab_valid(void* obj) { return objs.find(obj); @@ -71,6 +84,9 @@ bool slab_contains(void* obj) { return objs.find(obj); } + bool slab_managed(void* obj) { + return objs.find(obj); + } bool slab_getbounds(void* obj, void*& start, void*& end) { return objs.find(obj, start, end); } @@ -78,5 +94,8 @@ template class BitMaskSlabManager { + hash_map >slabmetadata; + + unsigned objsize; }; Modified: poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h?rev=57669&r1=57668&r2=57669&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h (original) +++ poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h Thu Oct 16 23:44:25 2008 @@ -1,5 +1,9 @@ +#include + template struct range_tree_node { + range_tree_node(void* s, void* e) : left(0), right(0), start(s), end(e) {} + range_tree_node() : left(0), right(0), start(0), end(0) {} range_tree_node* left; range_tree_node* right; void* start; @@ -9,23 +13,30 @@ template<> struct range_tree_node { + range_tree_node(void* s, void* e) : left(0), right(0), start(s), end(e) {} + range_tree_node() : left(0), right(0), start(0), end(0) {} range_tree_node* left; range_tree_node* right; void* start; void* end; }; -template +template class RangeSplayTree { + public: + typedef range_tree_node tree_node; + private: + typename _Alloc::template rebind::other __node_alloc; + tree_node* Tree; - + tree_node* rotate_right(tree_node* p) { - tree_node* x = p->left; - p->left = x->right; + tree_node* x = p->left; + p->left = x->right; x->right = p; return x; } - + tree_node* rotate_left(tree_node* p) { tree_node* x = p->right; p->right = x->left; @@ -90,12 +101,13 @@ if (!t) return; __clear_internal(t->left); __clear_internal(t->right); - delete t; + __node_alloc.destroy(t); + __node_alloc.deallocate(t, 1); } - protected: + public: - RangeSplayTree() : Tree(0) {} + explicit RangeSplayTree(const _Alloc& a) :__node_alloc(a), Tree(0) {} ~RangeSplayTree() { __clear(); } tree_node* __insert(void* start, void* end) { @@ -104,10 +116,8 @@ if (Tree && !key_lt(start, Tree) && !key_gt(start, Tree)) return 0; - tree_node* n = new tree_node(); - n->start = start; - n->end = end; - n->right = n->left = 0; + tree_node* n = __node_alloc.allocate(1); + __node_alloc.construct(n, tree_node(start,end)); if (Tree) { if (key_lt(start, Tree)) { n->left = Tree->left; @@ -136,7 +146,8 @@ } tree_node* y = Tree; Tree = x; - delete y; + __node_alloc.destroy(y); + __node_alloc.deallocate(y, 1); return true; } return false; /* not there */ @@ -161,74 +172,75 @@ } }; -class RangeSplaySet : RangeSplayTree > { - public: - RangeSplaySet() : RangeSplayTree >() {} - - bool insert(void* start, void* end) { - return 0 != __insert(start,end); - } +template > +class RangeSplaySet +{ + RangeSplayTree Tree; - bool remove(void* key) { - return __remove(key); - } - - bool count() { return __count(); } - - void clear() { __clear(); } - - bool find(void* key, void*& start, void*& end) { - range_tree_node* t = __find(key); - if (!t) return false; - start = t->start; - end = t->end; - return true; - } - bool find(void* key) { - range_tree_node* t = __find(key); - if (!t) return false; - return true; - } + public: + explicit RangeSplaySet(const Allocator& A = Allocator() ) + : Tree(A) {} + + bool insert(void* start, void* end) { + return 0 != Tree.__insert(start,end); + } + + bool remove(void* key) { + return Tree.__remove(key); + } + + bool count() { return Tree.__count(); } + + void clear() { Tree.__clear(); } + + bool find(void* key, void*& start, void*& end) { + range_tree_node* t = Tree.__find(key); + if (!t) return false; + start = t->start; + end = t->end; + return true; + } + bool find(void* key) { + range_tree_node* t = Tree.__find(key); + if (!t) return false; + return true; + } }; -template -class RangeSplayMap : RangeSplayTree > { +template > +class RangeSplayMap { + RangeSplayTree, Allocator> Tree; + public: - RangeSplayMap() : RangeSplayTree >() {} + explicit RangeSplayMap(const Allocator& A= Allocator() ) + : Tree(A) {} - using RangeSplayTree >::__insert; - using RangeSplayTree >::__remove; - using RangeSplayTree >::__count; - using RangeSplayTree >::__clear; - using RangeSplayTree >::__find; - - - bool insert(void* start, void* end, T& d) { - range_tree_node* t = __insert(start,end); - if (t == 0) return false; - t->data = d; - return true; - } - - bool remove(void* key) { - return __remove(key); - } - - bool count() { return __count(); } - - void clear() { __clear(); } - - bool find(void* key, void*& start, void*& end, T& d) { - range_tree_node* t = __find(key); - if (!t) return false; - start = t->start; - end = t->end; - d = t->data; - return true; - } - bool find(void* key) { - range_tree_node* t = __find(key); - if (!t) return false; - return true; - } + bool insert(void* start, void* end, T& d) { + range_tree_node* t = Tree.__insert(start,end); + if (t == 0) return false; + t->data = d; + return true; + } + + bool remove(void* key) { + return Tree.__remove(key); + } + + bool count() { return Tree.__count(); } + + void clear() { Tree.__clear(); } + + bool find(void* key, void*& start, void*& end, T& d) { + range_tree_node* t = Tree.__find(key); + if (!t) return false; + start = t->start; + end = t->end; + d = t->data; + return true; + } + bool find(void* key) { + range_tree_node* t = Tree.__find(key); + if (!t) return false; + return true; + } }; Modified: poolalloc/trunk/include/poolalloc_runtime/test.ex URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/test.ex?rev=57669&r1=57668&r2=57669&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/test.ex (original) +++ poolalloc/trunk/include/poolalloc_runtime/test.ex Thu Oct 16 23:44:25 2008 @@ -1,7 +1,7 @@ #include "PoolAllocator.h" #include -PoolAllocator a(10, 16); +PoolAllocator > a(10, 16); RangeSplayMap x; From clattner at apple.com Fri Oct 17 00:10:54 2008 From: clattner at apple.com (Chris Lattner) Date: Thu, 16 Oct 2008 22:10:54 -0700 Subject: [llvm-commits] [llvm] r57668 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp In-Reply-To: <200810170440.m9H4eeR2007398@zion.cs.uiuc.edu> References: <200810170440.m9H4eeR2007398@zion.cs.uiuc.edu> Message-ID: <844BC4A1-04FE-4F34-8ECC-EE35D37F3C7E@apple.com> On Oct 16, 2008, at 9:40 PM, Dan Gohman wrote: > Author: djg > Date: Thu Oct 16 23:40:39 2008 > New Revision: 57668 > > URL: http://llvm.org/viewvc/llvm-project?rev=57668&view=rev > Log: > Use INT64_C to emit constant values, to avoid problems with > constants that don't fit in an int. This fixes > "this decimal constant is unsigned only in ISO C90" > warnings. Thanks Dan! -Chris From evan.cheng at apple.com Fri Oct 17 00:54:25 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 16 Oct 2008 22:54:25 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r57652 - /llvm-gcc-4.2/trunk/gcc/except.c In-Reply-To: <200810162226.m9GMQXTx025774@zion.cs.uiuc.edu> References: <200810162226.m9GMQXTx025774@zion.cs.uiuc.edu> Message-ID: <3D212849-3284-4497-AAED-B87BADBBAC33@apple.com> Dan? Evan On Oct 16, 2008, at 3:26 PM, Owen Anderson wrote: > Author: resistor > Date: Thu Oct 16 17:26:32 2008 > New Revision: 57652 > > URL: http://llvm.org/viewvc/llvm-project?rev=57652&view=rev > Log: > Revert r57527, which was breaking llvm-gcc on linux. > > Modified: > llvm-gcc-4.2/trunk/gcc/except.c > > Modified: llvm-gcc-4.2/trunk/gcc/except.c > URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/except.c?rev=57652&r1=57651&r2=57652&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm-gcc-4.2/trunk/gcc/except.c (original) > +++ llvm-gcc-4.2/trunk/gcc/except.c Thu Oct 16 17:26:32 2008 > @@ -4079,25 +4079,13 @@ > /* The default c++ routines aren't actually c++ specific, so use > those. */ > /* LLVM LOCAL begin */ > #ifdef ENABLE_LLVM > - /* Create the decl with build_decl instead of using > llvm_init_one_libfunc > - so that we can specify an argument type instead of just using > '...'. > - '...' is functionally correct, but more work for codegen to > handle, > - and even requires additional instructions on some targets. */ > - const char *name = USING_SJLJ_EXCEPTIONS ? > - "_Unwind_SjLj_Resume" > + llvm_unwind_resume_libfunc = llvm_init_one_libfunc > ( USING_SJLJ_EXCEPTIONS ? > + "_Unwind_SjLj_Resume" > #ifdef LLVM_STACKSENSITIVE_UNWIND_RESUME > - : "_Unwind_Resume_or_Rethrow"; > + : > "_Unwind_Resume_or_Rethrow"); > #else > - : "_Unwind_Resume"; > + : "_Unwind_Resume"); > #endif > - tree decl = build_decl (FUNCTION_DECL, get_identifier (name), > - build_function_type (void_type_node, > - tree_cons (0, > ptr_type_node, > - > void_list_node))); > - DECL_ARTIFICIAL (decl) = 1; > - DECL_EXTERNAL (decl) = 1; > - TREE_PUBLIC (decl) = 1; > - llvm_unwind_resume_libfunc = decl; > #else > unwind_resume_libfunc = > init_one_libfunc ( USING_SJLJ_EXCEPTIONS ? "_Unwind_SjLj_Resume" > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From evan.cheng at apple.com Fri Oct 17 00:59:47 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 16 Oct 2008 22:59:47 -0700 Subject: [llvm-commits] MemIntrinsicNode patch In-Reply-To: <51219B37-C775-4478-9BA3-9EAA952A21D9@apple.com> References: <51219B37-C775-4478-9BA3-9EAA952A21D9@apple.com> Message-ID: <700F02B0-1F51-4E79-BC65-18D3C12F96ED@apple.com> +/// Memory intrinsic node +// This node is used for target intrinsic that touches memory and need an +// associated memory operan // -> /// :-) + /// getMemIntrinsicNode - Gets a MemIntrinsicNode +SDValue getMemIntrinsicNode(unsigned Opcode, + const MVT *VTs, unsigned NumVTs, + const SDValue *Ops, unsigned NumOps, + MVT MemVT, const Value *srcValue, int SVOff, + unsigned Align = 0, bool Vol = false, + bool ReadMem = true, bool WriteMem = true); Extra spaces before ///? Also please end a sentence with a period (or Chris' head will explode. :-) Looks great. Thanks! Evan On Oct 16, 2008, at 4:12 PM, Mon Ping Wang wrote: > Hi, > > Here is a patch to introduce a memory intrinsic node. The node is > useful when one has a target specific intrinsic that touches memory > and needs to be associated with a MemOperand. > > -- Mon Ping > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From sabre at nondot.org Fri Oct 17 01:11:49 2008 From: sabre at nondot.org (Chris Lattner) Date: Fri, 17 Oct 2008 06:11:49 -0000 Subject: [llvm-commits] [llvm] r57672 - /llvm/trunk/lib/Target/CBackend/CBackend.cpp Message-ID: <200810170611.m9H6BnY3010808@zion.cs.uiuc.edu> Author: lattner Date: Fri Oct 17 01:11:48 2008 New Revision: 57672 URL: http://llvm.org/viewvc/llvm-project?rev=57672&view=rev Log: add some simple hacky long double support for the CBE. This should work for intel long double, but ppc long double aborts in convert. Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=57672&r1=57671&r2=57672&view=diff ============================================================================== --- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original) +++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Fri Oct 17 01:11:48 2008 @@ -1129,11 +1129,21 @@ "long double") << "*)&FPConstant" << I->second << ')'; } else { - assert(FPC->getType() == Type::FloatTy || - FPC->getType() == Type::DoubleTy); - double V = FPC->getType() == Type::FloatTy ? - FPC->getValueAPF().convertToFloat() : - FPC->getValueAPF().convertToDouble(); + double V; + if (FPC->getType() == Type::FloatTy) + V = FPC->getValueAPF().convertToFloat(); + else if (FPC->getType() == Type::DoubleTy) + V = FPC->getValueAPF().convertToDouble(); + else { + // Long double. Convert the number to double, discarding precision. + // This is not awesome, but it at least makes the CBE output somewhat + // useful. + APFloat Tmp = FPC->getValueAPF(); + bool LosesInfo; + Tmp.convert(APFloat::IEEEdouble, APFloat::rmTowardZero, &LosesInfo); + V = Tmp.convertToDouble(); + } + if (IsNAN(V)) { // The value is NaN From evan.cheng at apple.com Fri Oct 17 01:16:08 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 17 Oct 2008 06:16:08 -0000 Subject: [llvm-commits] [llvm] r57673 - in /llvm/trunk: lib/CodeGen/VirtRegMap.cpp test/CodeGen/X86/2008-10-16-SpillerBug.ll Message-ID: <200810170616.m9H6G8jS010988@zion.cs.uiuc.edu> Author: evancheng Date: Fri Oct 17 01:16:07 2008 New Revision: 57673 URL: http://llvm.org/viewvc/llvm-project?rev=57673&view=rev Log: Fix a very subtle spiller bug: UpdateKills should not forget to track defs of aliases. Added: llvm/trunk/test/CodeGen/X86/2008-10-16-SpillerBug.ll Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/VirtRegMap.cpp?rev=57673&r1=57672&r2=57673&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/VirtRegMap.cpp (original) +++ llvm/trunk/lib/CodeGen/VirtRegMap.cpp Fri Oct 17 01:16:07 2008 @@ -635,7 +635,8 @@ /// marked kill, then it must be due to register reuse. Transfer the kill info /// over. static void UpdateKills(MachineInstr &MI, BitVector &RegKills, - std::vector &KillOps) { + std::vector &KillOps, + const TargetRegisterInfo* TRI) { const TargetInstrDesc &TID = MI.getDesc(); for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) { MachineOperand &MO = MI.getOperand(i); @@ -669,6 +670,11 @@ unsigned Reg = MO.getReg(); RegKills.reset(Reg); KillOps[Reg] = NULL; + // It also defines (or partially define) aliases. + for (const unsigned *AS = TRI->getAliasSet(Reg); *AS; ++AS) { + RegKills.reset(*AS); + KillOps[*AS] = NULL; + } } } @@ -839,7 +845,7 @@ Spills.addAvailable(NewOp.StackSlotOrReMat, MI, NewPhysReg); --MII; - UpdateKills(*MII, RegKills, KillOps); + UpdateKills(*MII, RegKills, KillOps, TRI); DOUT << '\t' << *MII; DOUT << "Reuse undone!\n"; @@ -1283,7 +1289,7 @@ } // This invalidates Phys. Spills.ClobberPhysReg(Phys); - UpdateKills(*prior(MII), RegKills, KillOps); + UpdateKills(*prior(MII), RegKills, KillOps, TRI); DOUT << '\t' << *prior(MII); } } @@ -1500,7 +1506,7 @@ TII->copyRegToReg(MBB, &MI, DesignatedReg, PhysReg, RC, RC); MachineInstr *CopyMI = prior(MII); - UpdateKills(*CopyMI, RegKills, KillOps); + UpdateKills(*CopyMI, RegKills, KillOps, TRI); // This invalidates DesignatedReg. Spills.ClobberPhysReg(DesignatedReg); @@ -1550,7 +1556,7 @@ MI.getOperand(i).setIsKill(); unsigned RReg = SubIdx ? TRI->getSubReg(PhysReg, SubIdx) : PhysReg; MI.getOperand(i).setReg(RReg); - UpdateKills(*prior(MII), RegKills, KillOps); + UpdateKills(*prior(MII), RegKills, KillOps, TRI); DOUT << '\t' << *prior(MII); } @@ -1650,7 +1656,7 @@ // super-register is needed below. if (KillOpnd && !KillOpnd->getSubReg() && TII->unfoldMemoryOperand(MF, &MI, PhysReg, false, true,NewMIs)){ - MBB.insert(MII, NewMIs[0]); + MBB.insert(MII, NewMIs[0]); NewStore = NewMIs[1]; MBB.insert(MII, NewStore); VRM.addSpillSlotUse(SS, NewStore); @@ -1825,7 +1831,7 @@ VRM.RemoveMachineInstrFromMaps(&MI); MBB.erase(&MI); Erased = true; - UpdateKills(*LastStore, RegKills, KillOps); + UpdateKills(*LastStore, RegKills, KillOps, TRI); goto ProcessNextInst; } } @@ -1835,7 +1841,7 @@ DistanceMap.insert(std::make_pair(&MI, Dist++)); if (!Erased && !BackTracked) { for (MachineBasicBlock::iterator II = &MI; II != NextMII; ++II) - UpdateKills(*II, RegKills, KillOps); + UpdateKills(*II, RegKills, KillOps, TRI); } MII = NextMII; } Added: llvm/trunk/test/CodeGen/X86/2008-10-16-SpillerBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-10-16-SpillerBug.ll?rev=57673&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2008-10-16-SpillerBug.ll (added) +++ llvm/trunk/test/CodeGen/X86/2008-10-16-SpillerBug.ll Fri Oct 17 01:16:07 2008 @@ -0,0 +1,155 @@ +; RUN: llvm-as < %s | llc -relocation-model=pic -disable-fp-elim -mtriple=i386-apple-darwin | grep and | grep 7 | grep ebp + + %struct.XXDActiveTextureTargets = type { i64, i64, i64, i64, i64, i64 } + %struct.XXDAlphaTest = type { float, i16, i8, i8 } + %struct.XXDArrayRange = type { i8, i8, i8, i8 } + %struct.XXDBlendMode = type { i16, i16, i16, i16, %struct.XXTColor4, i16, i16, i8, i8, i8, i8 } + %struct.XXDClearColor = type { double, %struct.XXTColor4, %struct.XXTColor4, float, i32 } + %struct.XXDClipPlane = type { i32, [6 x %struct.XXTColor4] } + %struct.XXDColorBuffer = type { i16, i8, i8, [8 x i16], i8, i8, i8, i8 } + %struct.XXDColorMatrix = type { [16 x float]*, %struct.XXDImagingCC } + %struct.XXDConvolution = type { %struct.XXTColor4, %struct.XXDImagingCC, i16, i16, [0 x i32], float*, i32, i32 } + %struct.XXDDepthTest = type { i16, i16, i8, i8, i8, i8, double, double } + %struct.XXDFixedFunction = type { %struct.YYToken* } + %struct.XXDFogMode = type { %struct.XXTColor4, float, float, float, float, float, i16, i16, i16, i8, i8 } + %struct.XXDHintMode = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 } + %struct.XXDHistogram = type { %struct.XXTFixedColor4*, i32, i16, i8, i8 } + %struct.XXDImagingCC = type { { float, float }, { float, float }, { float, float }, { float, float } } + %struct.XXDImagingSubset = type { %struct.XXDConvolution, %struct.XXDConvolution, %struct.XXDConvolution, %struct.XXDColorMatrix, %struct.XXDMinmax, %struct.XXDHistogram, %struct.XXDImagingCC, %struct.XXDImagingCC, %struct.XXDImagingCC, %struct.XXDImagingCC, i32, [0 x i32] } + %struct.XXDLight = type { %struct.XXTColor4, %struct.XXTColor4, %struct.XXTColor4, %struct.XXTColor4, %struct.XXTCoord3, float, float, float, float, float, %struct.XXTCoord3, float, %struct.XXTCoord3, float, %struct.XXTCoord3, float, float, float, float, float } + %struct.XXDLightModel = type { %struct.XXTColor4, [8 x %struct.XXDLight], [2 x %struct.XXDMaterial], i32, i16, i16, i16, i8, i8, i8, i8, i8, i8 } + %struct.XXDLightProduct = type { %struct.XXTColor4, %struct.XXTColor4, %struct.XXTColor4 } + %struct.XXDLineMode = type { float, i32, i16, i16, i8, i8, i8, i8 } + %struct.XXDLogicOp = type { i16, i8, i8 } + %struct.XXDMaskMode = type { i32, [3 x i32], i8, i8, i8, i8, i8, i8, i8, i8 } + %struct.XXDMaterial = type { %struct.XXTColor4, %struct.XXTColor4, %struct.XXTColor4, %struct.XXTColor4, float, float, float, float, [8 x %struct.XXDLightProduct], %struct.XXTColor4, [8 x i32] } + %struct.XXDMinmax = type { %struct.XXDMinmaxTable*, i16, i8, i8, [0 x i32] } + %struct.XXDMinmaxTable = type { %struct.XXTColor4, %struct.XXTColor4 } + %struct.XXDMultisample = type { float, i8, i8, i8, i8, i8, i8, i8, i8 } + %struct.XXDPipelineProgramState = type { i8, i8, i8, i8, [0 x i32], %struct.XXTColor4* } + %struct.XXDPixelMap = type { i32*, float*, float*, float*, float*, float*, float*, float*, float*, i32*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } + %struct.XXDPixelMode = type { float, float, %struct.XXDPixelStore, %struct.XXDPixelTransfer, %struct.XXDPixelMap, %struct.XXDImagingSubset, i32, i32 } + %struct.XXDPixelPack = type { i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8 } + %struct.XXDPixelStore = type { %struct.XXDPixelPack, %struct.XXDPixelPack } + %struct.XXDPixelTransfer = type { float, float, float, float, float, float, float, float, float, float, i32, i32, float, float, float, float, float, float, float, float, float, float, float, float } + %struct.XXDPointMode = type { float, float, float, float, %struct.XXTCoord3, float, i8, i8, i8, i8, i16, i16, i32, i16, i16 } + %struct.XXDPolygonMode = type { [128 x i8], float, float, i16, i16, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8 } + %struct.XXDRegisterCombiners = type { i8, i8, i8, i8, i32, [2 x %struct.XXTColor4], [8 x %struct.XXDRegisterCombinersPerStageState], %struct.XXDRegisterCombinersFinalStageState } + %struct.XXDRegisterCombinersFinalStageState = type { i8, i8, i8, i8, [7 x %struct.XXDRegisterCombinersPerVariableState] } + %struct.XXDRegisterCombinersPerPortionState = type { [4 x %struct.XXDRegisterCombinersPerVariableState], i8, i8, i8, i8, i16, i16, i16, i16, i16, i16 } + %struct.XXDRegisterCombinersPerStageState = type { [2 x %struct.XXDRegisterCombinersPerPortionState], [2 x %struct.XXTColor4] } + %struct.XXDRegisterCombinersPerVariableState = type { i16, i16, i16, i16 } + %struct.XXDScissorTest = type { %struct.XXTFixedColor4, i8, i8, i8, i8 } + %struct.XXDState = type <{ i16, i16, i16, i16, i32, i32, [256 x %struct.XXTColor4], [128 x %struct.XXTColor4], %struct.XXDViewport, %struct.XXDTransform, %struct.XXDLightModel, %struct.XXDActiveTextureTargets, %struct.XXDAlphaTest, %struct.XXDBlendMode, %struct.XXDClearColor, %struct.XXDColorBuffer, %struct.XXDDepthTest, %struct.XXDArrayRange, %struct.XXDFogMode, %struct.XXDHintMode, %struct.XXDLineMode, %struct.XXDLogicOp, %struct.XXDMaskMode, %struct.XXDPixelMode, %struct.XXDPointMode, %struct.XXDPolygonMode, %struct.XXDScissorTest, i32, %struct.XXDStencilTest, [8 x %struct.XXDTextureMode], [16 x %struct.XXDTextureImageMode], %struct.XXDArrayRange, [8 x %struct.XXDTextureCoordGen], %struct.XXDClipPlane, %struct.XXDMultisample, %struct.XXDRegisterCombiners, %struct.XXDArrayRange, %struct.XXDArrayRange, [3 x %struct.XXDPipelineProgramState], %struct.XXDArrayRange, %struct.XXDTransformFeedback, i32*, %struct.XXDFixedFunction, [3 x i32], [2 x i32] }> + %struct.XXDStencilTest = type { [3 x { i32, i32, i16, i16, i16, i16 }], i32, [4 x i8] } + %struct.XXDTextureCoordGen = type { { i16, i16, %struct.XXTColor4, %struct.XXTColor4 }, { i16, i16, %struct.XXTColor4, %struct.XXTColor4 }, { i16, i16, %struct.XXTColor4, %struct.XXTColor4 }, { i16, i16, %struct.XXTColor4, %struct.XXTColor4 }, i8, i8, i8, i8 } + %struct.XXDTextureImageMode = type { float } + %struct.XXDTextureMode = type { %struct.XXTColor4, i32, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, float, float, i16, i16, i16, i16, i16, i16, [4 x i16], i8, i8, i8, i8, [3 x float], [4 x float], float, float } + %struct.XXDTextureRec = type opaque + %struct.XXDTransform = type <{ [24 x [16 x float]], [24 x [16 x float]], [16 x float], float, float, float, float, float, i8, i8, i8, i8, i32, i32, i32, i16, i16, i8, i8, i8, i8, i32 }> + %struct.XXDTransformFeedback = type { i8, i8, i8, i8, [0 x i32], [16 x i32], [16 x i32] } + %struct.XXDViewport = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, double, double, i32, i32, i32, i32, float, float, float, float } + %struct.XXTColor4 = type { float, float, float, float } + %struct.XXTCoord3 = type { float, float, float } + %struct.XXTFixedColor4 = type { i32, i32, i32, i32 } + %struct.XXVMTextures = type { [16 x %struct.XXDTextureRec*] } + %struct.XXVMVPContext = type { i32 } + %struct.XXVMVPStack = type { i32, i32 } + %struct.YYToken = type { { i16, i16, i32 } } + %struct._XXVMConstants = type { <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>, float, float, float, float, float, float, float, float, float, float, float, float, [256 x float], [4096 x i8], [8 x float], [48 x float], [128 x float], [528 x i8], { void (i8*, i8*, i32, i8*)*, float (float)*, float (float)*, float (float)*, i32 (float)* } } + at llvm.used = appending global [1 x i8*] [ i8* bitcast (void (%struct.XXDState*, <4 x float>*, <4 x float>**, %struct._XXVMConstants*, %struct.YYToken*, %struct.XXVMVPContext*, %struct.XXVMTextures*, %struct.XXVMVPStack*, <4 x float>*, <4 x float>*, <4 x float>*, <4 x float>*, <4 x float>*, <4 x float>*, <4 x float>*, <4 x float>*, [4 x <4 x float>]*, i32*, <4 x i32>*, i64)* @t to i8*) ], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0] + +define void @t(%struct.XXDState* %gldst, <4 x float>* %prgrm, <4 x float>** %buffs, %struct._XXVMConstants* %cnstn, %struct.YYToken* %pstrm, %struct.XXVMVPContext* %vmctx, %struct.XXVMTextures* %txtrs, %struct.XXVMVPStack* %vpstk, <4 x float>* %atr0, <4 x float>* %atr1, <4 x float>* %atr2, <4 x float>* %atr3, <4 x float>* %vtx0, <4 x float>* %vtx1, <4 x float>* %vtx2, <4 x float>* %vtx3, [4 x <4 x float>]* %tmpGbl, i32* %oldMsk, <4 x i32>* %adrGbl, i64 %key_token) nounwind { +entry: + %0 = trunc i64 %key_token to i32 ; [#uses=1] + %1 = getelementptr %struct.YYToken* %pstrm, i32 %0 ; <%struct.YYToken*> [#uses=5] + br label %bb1132 + +bb51: ; preds = %bb1132 + %2 = getelementptr %struct.YYToken* %1, i32 %operation.0.rec, i32 0, i32 0 ; [#uses=1] + %3 = load i16* %2, align 1 ; [#uses=3] + %4 = lshr i16 %3, 6 ; [#uses=1] + %5 = trunc i16 %4 to i8 ; [#uses=1] + %6 = zext i8 %5 to i32 ; [#uses=1] + %7 = trunc i16 %3 to i8 ; [#uses=1] + %8 = and i8 %7, 7 ; [#uses=1] + %mask5556 = zext i8 %8 to i32 ; [#uses=3] + %.sum1324 = add i32 %mask5556, 2 ; [#uses=1] + %.rec = add i32 %operation.0.rec, %.sum1324 ; [#uses=1] + %9 = bitcast %struct.YYToken* %operation.0 to i32* ; [#uses=1] + %10 = load i32* %9, align 1 ; [#uses=1] + %11 = lshr i32 %10, 16 ; [#uses=2] + %12 = trunc i32 %11 to i8 ; [#uses=1] + %13 = and i8 %12, 1 ; [#uses=1] + %14 = lshr i16 %3, 15 ; [#uses=1] + %15 = trunc i16 %14 to i8 ; [#uses=1] + %16 = or i8 %13, %15 ; [#uses=1] + %17 = icmp eq i8 %16, 0 ; [#uses=1] + br i1 %17, label %bb94, label %bb75 + +bb75: ; preds = %bb51 + %18 = getelementptr %struct.YYToken* %1, i32 0, i32 0, i32 0 ; [#uses=1] + %19 = load i16* %18, align 4 ; [#uses=1] + %20 = load i16* null, align 2 ; [#uses=1] + %21 = zext i16 %19 to i64 ; [#uses=1] + %22 = zext i16 %20 to i64 ; [#uses=1] + %23 = shl i64 %22, 16 ; [#uses=1] + %.ins1177 = or i64 %23, %21 ; [#uses=1] + %.ins1175 = or i64 %.ins1177, 0 ; [#uses=1] + %24 = and i32 %11, 1 ; [#uses=1] + %.neg1333 = sub i32 %mask5556, %24 ; [#uses=1] + %.neg1335 = sub i32 %.neg1333, 0 ; [#uses=1] + %25 = sub i32 %.neg1335, 0 ; [#uses=1] + br label %bb94 + +bb94: ; preds = %bb75, %bb51 + %extraToken.0 = phi i64 [ %.ins1175, %bb75 ], [ %extraToken.1, %bb51 ] ; [#uses=1] + %argCount.0 = phi i32 [ %25, %bb75 ], [ %mask5556, %bb51 ] ; [#uses=1] + %operation.0.sum1392 = add i32 %operation.0.rec, 1 ; [#uses=2] + %26 = getelementptr %struct.YYToken* %1, i32 %operation.0.sum1392, i32 0, i32 0 ; [#uses=1] + %27 = load i16* %26, align 4 ; [#uses=1] + %28 = getelementptr %struct.YYToken* %1, i32 %operation.0.sum1392, i32 0, i32 1 ; [#uses=1] + %29 = load i16* %28, align 2 ; [#uses=1] + store i16 %27, i16* null, align 8 + store i16 %29, i16* null, align 2 + br i1 false, label %bb1132, label %bb110 + +bb110: ; preds = %bb94 + switch i32 %6, label %bb1078 [ + i32 30, label %bb960 + i32 32, label %bb801 + i32 38, label %bb809 + i32 78, label %bb1066 + ] + +bb801: ; preds = %bb110 + unreachable + +bb809: ; preds = %bb110 + unreachable + +bb960: ; preds = %bb110 + %30 = icmp eq i32 %argCount.0, 1 ; [#uses=1] + br i1 %30, label %bb962, label %bb965 + +bb962: ; preds = %bb960 + unreachable + +bb965: ; preds = %bb960 + unreachable + +bb1066: ; preds = %bb110 + unreachable + +bb1078: ; preds = %bb110 + unreachable + +bb1132: ; preds = %bb94, %entry + %extraToken.1 = phi i64 [ undef, %entry ], [ %extraToken.0, %bb94 ] ; [#uses=1] + %operation.0.rec = phi i32 [ 0, %entry ], [ %.rec, %bb94 ] ; [#uses=4] + %operation.0 = getelementptr %struct.YYToken* %1, i32 %operation.0.rec ; <%struct.YYToken*> [#uses=1] + br i1 false, label %bb1134, label %bb51 + +bb1134: ; preds = %bb1132 + ret void +} From baldrick at free.fr Fri Oct 17 02:48:17 2008 From: baldrick at free.fr (Duncan Sands) Date: Fri, 17 Oct 2008 09:48:17 +0200 Subject: [llvm-commits] [llvm-gcc-4.2] r57652 - /llvm-gcc-4.2/trunk/gcc/except.c In-Reply-To: <200810162226.m9GMQXTx025774@zion.cs.uiuc.edu> References: <200810162226.m9GMQXTx025774@zion.cs.uiuc.edu> Message-ID: <200810170948.18704.baldrick@free.fr> > Revert r57527, which was breaking llvm-gcc on linux. It's unclear why it was breaking the build (I worked on it a bit yesterday to no avail), but it was. Ciao, Duncan. From ggreif at gmail.com Fri Oct 17 03:31:37 2008 From: ggreif at gmail.com (Gabor Greif) Date: Fri, 17 Oct 2008 08:31:37 -0000 Subject: [llvm-commits] [llvm] r57676 - /llvm/trunk/include/llvm/Use.h Message-ID: <200810170831.m9H8VcfP025196@zion.cs.uiuc.edu> Author: ggreif Date: Fri Oct 17 03:31:36 2008 New Revision: 57676 URL: http://llvm.org/viewvc/llvm-project?rev=57676&view=rev Log: Add comment on how tagged pointers are distinguished from normal (untagged) ones as per review comment. I am sufficiently unaquainted with doxygen to defer the markup to someone with more experience. Modified: llvm/trunk/include/llvm/Use.h Modified: llvm/trunk/include/llvm/Use.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Use.h?rev=57676&r1=57675&r2=57676&view=diff ============================================================================== --- llvm/trunk/include/llvm/Use.h (original) +++ llvm/trunk/include/llvm/Use.h Fri Oct 17 03:31:36 2008 @@ -29,13 +29,20 @@ // Generic Tagging Functions //===----------------------------------------------------------------------===// +// We adhere to the following convention: The type of a tagged pointer +// to T is T volatile*. This means that functions that superpose a tag +// on a pointer will be supplied a T* (or T const*) and will return a +// tagged one: T volatile*. Untagging functions do it the other way +// 'round. While this scheme does not prevent dereferencing of tagged +// pointers, proper type annotations do catch most inappropriate uses. + /// Tag - generic tag type for (at least 32 bit) pointers enum Tag { noTag, tagOne, tagTwo, tagThree }; /// addTag - insert tag bits into an (untagged) pointer template inline volatile T *addTag(const T *P, TAG Tag) { - return reinterpret_cast(ptrdiff_t(P) | Tag); + return reinterpret_cast(ptrdiff_t(P) | Tag); } /// stripTag - remove tag bits from a pointer, From ggreif at gmail.com Fri Oct 17 03:42:32 2008 From: ggreif at gmail.com (Gabor Greif) Date: Fri, 17 Oct 2008 01:42:32 -0700 (PDT) Subject: [llvm-commits] [llvm] r57641 - in /llvm/trunk: include/llvm/Use.h lib/VMCore/Use.cpp In-Reply-To: <8A8679D9-2BD0-418B-BFE3-7D0BD707F285@apple.com> References: <200810161533.m9GFX5d6009145@zion.cs.uiuc.edu> <8A8679D9-2BD0-418B-BFE3-7D0BD707F285@apple.com> Message-ID: <8bbe19d5-47ed-478c-9797-9166e581075e@17g2000hsk.googlegroups.com> On Oct 16, 7:03?pm, Chris Lattner wrote: > On Oct 16, 2008, at 8:33 AM, Gabor Greif wrote: > > > > > Author: ggreif > > Date: Thu Oct 16 10:33:02 2008 > > New Revision: 57641 > > > URL:http://llvm.org/viewvc/llvm-project?rev=57641&view=rev > > Log: > > Introduce a typing refinenement on tagged data > > using the 'volatile' qualifier. This should not have any operational ? > > consequences > > on code, because tags should always be stripped off (giving a non- > > volatile pointer) > > before dereferencing. The new qualification is there to catch some ? > > attempts to use > > tagged pointers in a context where an untagged pointer is appropriate. > > > Notably this approach does not catch dereferencing of tagged ? > > pointers, but helps > > in separating the two concepts a bit. > > Gabor, this is very interesting, but it is very subtle and definitely ? > needs some comments in the code. ?Please add them. Hmmm, I am specialized on subtle things :-) I was so happy yesterday that this scheme worked out with minimal changes that I have completely forgotten documenting it. I have just added some lines, but I am not sure how these can find their way into doxygen. Anybody? Cheers, Gabor > > -Chris > _______________________________________________ > llvm-commits mailing list > llvm-comm... at cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From ggreif at gmail.com Fri Oct 17 09:44:02 2008 From: ggreif at gmail.com (Gabor Greif) Date: Fri, 17 Oct 2008 14:44:02 -0000 Subject: [llvm-commits] [llvm] r57677 - /llvm/trunk/docs/ReleaseNotes.html Message-ID: <200810171444.m9HEi3RY007708@zion.cs.uiuc.edu> Author: ggreif Date: Fri Oct 17 09:43:58 2008 New Revision: 57677 URL: http://llvm.org/viewvc/llvm-project?rev=57677&view=rev Log: remove spurious space in link Modified: llvm/trunk/docs/ReleaseNotes.html Modified: llvm/trunk/docs/ReleaseNotes.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.html?rev=57677&r1=57676&r2=57677&view=diff ============================================================================== --- llvm/trunk/docs/ReleaseNotes.html (original) +++ llvm/trunk/docs/ReleaseNotes.html Fri Oct 17 09:43:58 2008 @@ -262,8 +262,8 @@ only need (say) 14-bits of precision.
                                                                              • llvm-gcc now supports a C language extension known as "Blocks -". This feature is similar to nested functions and closures, but does not +href="http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-August/002670.html">Blocks". +This feature is similar to nested functions and closures, but does not require stack trampolines (with most ABIs) and supports returning closures from functions that define them. Note that actually using Blocks requires a small runtime that is not included with llvm-gcc.
                                                                              • From clattner at apple.com Fri Oct 17 10:15:56 2008 From: clattner at apple.com (Chris Lattner) Date: Fri, 17 Oct 2008 08:15:56 -0700 Subject: [llvm-commits] [llvm] r57641 - in /llvm/trunk: include/llvm/Use.h lib/VMCore/Use.cpp In-Reply-To: <8bbe19d5-47ed-478c-9797-9166e581075e@17g2000hsk.googlegroups.com> References: <200810161533.m9GFX5d6009145@zion.cs.uiuc.edu> <8A8679D9-2BD0-418B-BFE3-7D0BD707F285@apple.com> <8bbe19d5-47ed-478c-9797-9166e581075e@17g2000hsk.googlegroups.com> Message-ID: On Oct 17, 2008, at 1:42 AM, Gabor Greif wrote: >>> Notably this approach does not catch dereferencing of tagged >>> pointers, but helps >>> in separating the two concepts a bit. >> >> Gabor, this is very interesting, but it is very subtle and definitely >> needs some comments in the code. Please add them. > > Hmmm, I am specialized on subtle things :-) > I was so happy yesterday that this scheme worked out with minimal > changes that I have completely forgotten documenting it. I have just > added some lines, but I am not sure how these can find their way into > doxygen. Anybody? Thanks Gabor, I'm not too concerned about doxygenating the comments, but if someone wanted to figure that out, it would be fine. On another topic, in Clang we usually represent type tagged pointers as intptr_t members instead of foo*'s. The accessor that extracts the pointer from the intptr_t just does a cast to foo* after masking out the bits. Would this be better than using volatile? -Chris From alenhar2 at cs.uiuc.edu Fri Oct 17 10:51:40 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Fri, 17 Oct 2008 15:51:40 -0000 Subject: [llvm-commits] [poolalloc] r57681 - in /poolalloc/trunk: include/dsa/DataStructure.h lib/DSA/EquivClassGraphs.cpp lib/DSA/TopDownClosure.cpp lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200810171551.m9HFpemj009975@zion.cs.uiuc.edu> Author: alenhar2 Date: Fri Oct 17 10:51:39 2008 New Revision: 57681 URL: http://llvm.org/viewvc/llvm-project?rev=57681&view=rev Log: The return of EQClassGraph, and by popular demand, EQTD Added: poolalloc/trunk/lib/DSA/EquivClassGraphs.cpp Modified: poolalloc/trunk/include/dsa/DataStructure.h poolalloc/trunk/lib/DSA/TopDownClosure.cpp poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Modified: poolalloc/trunk/include/dsa/DataStructure.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/DataStructure.h?rev=57681&r1=57680&r2=57681&view=diff ============================================================================== --- poolalloc/trunk/include/dsa/DataStructure.h (original) +++ poolalloc/trunk/include/dsa/DataStructure.h Fri Oct 17 10:51:39 2008 @@ -52,7 +52,6 @@ /// Do we clone Graphs or steal them? bool Clone; - /// do we reset the aux list to the func list? bool resetAuxCalls; @@ -203,6 +202,8 @@ /// virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); + AU.addPreserved(); + AU.setPreservesCFG(); } }; @@ -237,6 +238,8 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); + AU.addPreserved(); + AU.setPreservesCFG(); } protected: @@ -257,6 +260,54 @@ void finalizeGlobals(void); }; +/// CompleteBUDataStructures - This is the exact same as the bottom-up graphs, +/// but we use take a completed call graph and inline all indirect callees into +/// their callers graphs, making the result more useful for things like pool +/// allocation. +/// +class CompleteBUDataStructures : public BUDataStructures { +protected: + void buildIndirectFunctionSets(Module &M); +public: + static char ID; + CompleteBUDataStructures(intptr_t CID = (intptr_t)&ID, + const char* name = "dsa-cbu", + const char* printname = "cbu.") + : BUDataStructures(CID, name, printname) {} + ~CompleteBUDataStructures() { releaseMemory(); } + + virtual bool runOnModule(Module &M); + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequired(); + AU.addPreserved(); + AU.setPreservesCFG(); + } + +}; + +/// EquivBUDataStructures - This is the same as the complete bottom-up graphs, but +/// with functions partitioned into equivalence classes and a single merged +/// DS graph for all functions in an equivalence class. After this merging, +/// graphs are inlined bottom-up on the SCCs of the final (CBU) call graph. +/// +class EquivBUDataStructures : public CompleteBUDataStructures { + void mergeGraphsByGlobalECs(); +public: + static char ID; + EquivBUDataStructures() + : CompleteBUDataStructures((intptr_t)&ID, "dsa-eq", "eq.") {} + ~EquivBUDataStructures() { releaseMemory(); } + + virtual bool runOnModule(Module &M); + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequired(); + AU.addPreserved(); + AU.setPreservesCFG(); + } + +}; /// TDDataStructures - Analysis that computes new data structure graphs /// for each function using the closed graphs for the callers computed @@ -291,9 +342,12 @@ // the arguments for each function. std::map, DSGraph*> IndCallMap; + bool useEQBU; + public: static char ID; - TDDataStructures() : DataStructures((intptr_t)&ID, "td.") {} + TDDataStructures(intptr_t CID = (intptr_t)&ID, const char* printname = "td.", bool useEQ = false) + : DataStructures(CID, "td."), useEQBU(useEQ) {} ~TDDataStructures() { releaseMemory(); } virtual bool runOnModule(Module &M); @@ -301,8 +355,12 @@ /// getAnalysisUsage - This obviously provides a data structure graph. /// virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired(); - AU.setPreservesAll(); + if (useEQBU) + AU.addRequired(); + else + AU.addRequired(); + AU.addPreserved(); + AU.setPreservesCFG(); } private: @@ -314,27 +372,19 @@ std::vector &PostOrder); }; - -/// CompleteBUDataStructures - This is the exact same as the bottom-up graphs, -/// but we use take a completed call graph and inline all indirect callees into -/// their callers graphs, making the result more useful for things like pool -/// allocation. +/// EQTDDataStructures - Analysis that computes new data structure graphs +/// for each function using the closed graphs for the callers computed +/// by the EQ bottom-up pass. /// -class CompleteBUDataStructures : public BUDataStructures { - void buildIndirectFunctionSets(Module &M); +class EQTDDataStructures : public TDDataStructures { public: static char ID; - CompleteBUDataStructures() - : BUDataStructures((intptr_t)&ID, "dsa-cbu", "cbu.") {} - ~CompleteBUDataStructures() { releaseMemory(); } - - virtual bool runOnModule(Module &M); + EQTDDataStructures() + :TDDataStructures((intptr_t)&ID, "td.", false) + {} +}; - virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired(); - } -}; } // End llvm namespace Added: poolalloc/trunk/lib/DSA/EquivClassGraphs.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/EquivClassGraphs.cpp?rev=57681&view=auto ============================================================================== --- poolalloc/trunk/lib/DSA/EquivClassGraphs.cpp (added) +++ poolalloc/trunk/lib/DSA/EquivClassGraphs.cpp Fri Oct 17 10:51:39 2008 @@ -0,0 +1,89 @@ +//===- EquivClassGraphs.cpp - Merge equiv-class graphs & inline bottom-up -===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by the LLVM research group and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This pass is the same as the complete bottom-up graphs, but +// with functions partitioned into equivalence classes and a single merged +// DS graph for all functions in an equivalence class. After this merging, +// graphs are inlined bottom-up on the SCCs of the final (CBU) call graph. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "ECGraphs" +#include "dsa/DataStructure.h" +#include "llvm/DerivedTypes.h" +#include "llvm/Module.h" +#include "llvm/Pass.h" +#include "dsa/DSGraph.h" +#include "llvm/Support/CallSite.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/SCCIterator.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/ADT/EquivalenceClasses.h" +#include "llvm/ADT/STLExtras.h" +using namespace llvm; + +namespace { + RegisterPass X("dsa-eq", + "Equivalence-class Bottom-up Data Structure Analysis"); +} + +char EquivBUDataStructures::ID = 0; + +// runOnModule - Calculate the bottom up data structure graphs for each function +// in the program. +// +bool EquivBUDataStructures::runOnModule(Module &M) { + init(&getAnalysis(), false, true, false, true); + + //update the EQ class from indirect calls + buildIndirectFunctionSets(M); + + mergeGraphsByGlobalECs(); + + return runOnModuleInternal(M); +} + + +// Merge all graphs that are in the same equivalence class +// the ensures things like poolalloc only deal with one graph for a +// call site +void EquivBUDataStructures::mergeGraphsByGlobalECs() { + // Merge the graphs for each equivalence class. + // + for (EquivalenceClasses::iterator EQSI = GlobalECs.begin(), + EQSE = GlobalECs.end(); EQSI != EQSE; ++EQSI) { + if (!EQSI->isLeader()) continue; + DSGraph* BaseGraph = 0; + std::vector Args; + for (EquivalenceClasses::member_iterator MI = GlobalECs.member_begin(EQSI); + MI != GlobalECs.member_end(); ++MI) { + if (const Function* F = dyn_cast(*MI)) { + if (!BaseGraph) { + BaseGraph = &getOrCreateGraph(F); + BaseGraph->getFunctionArgumentsForCall(F, Args); + } else if (BaseGraph->containsFunction(F)) { + //already merged + } else { + std::vector NextArgs; + BaseGraph->cloneInto(getOrCreateGraph(F)); + BaseGraph->getFunctionArgumentsForCall(F, NextArgs); + unsigned i = 0, e = Args.size(); + for (; i != e; ++i) { + if (i == NextArgs.size()) break; + Args[i].mergeWith(NextArgs[i]); + } + for (e = NextArgs.size(); i != e; ++i) + Args.push_back(NextArgs[i]); + setDSGraph(*F, BaseGraph); + } + } + } + } +} + Modified: poolalloc/trunk/lib/DSA/TopDownClosure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/TopDownClosure.cpp?rev=57681&r1=57680&r2=57681&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/TopDownClosure.cpp (original) +++ poolalloc/trunk/lib/DSA/TopDownClosure.cpp Fri Oct 17 10:51:39 2008 @@ -35,10 +35,14 @@ RegisterPass // Register the pass Y("dsa-td", "Top-down Data Structure Analysis"); + RegisterPass // Register the pass + Z("dsa-eqtd", "EQ Top-down Data Structure Analysis"); + STATISTIC (NumTDInlines, "Number of graphs inlined"); } char TDDataStructures::ID; +char EQTDDataStructures::ID; void TDDataStructures::markReachableFunctionsExternallyAccessible(DSNode *N, hash_set &Visited) { @@ -61,7 +65,10 @@ // program. // bool TDDataStructures::runOnModule(Module &M) { - init(&getAnalysis(), true, true, true, false); + + init(useEQBU ? &getAnalysis() + : &getAnalysis(), + true, true, true, false); // Figure out which functions must not mark their arguments complete because // they are accessible outside this compilation unit. Currently, these Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=57681&r1=57680&r2=57681&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Fri Oct 17 10:51:39 2008 @@ -87,8 +87,8 @@ } void PoolAllocate::getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequiredTransitive(); - AU.addPreserved(); + AU.addRequired(); + AU.addPreserved(); // Preserve the pool information across passes if (SAFECodeEnabled) @@ -100,7 +100,7 @@ bool PoolAllocate::runOnModule(Module &M) { if (M.begin() == M.end()) return false; CurModule = &M; - Graphs = &getAnalysis(); // folded inlined CBU graphs + Graphs = &getAnalysis(); // folded inlined CBU graphs CurHeuristic = Heuristic::create(); CurHeuristic->Initialize(M, Graphs->getGlobalsGraph(), *this); From sabre at nondot.org Fri Oct 17 11:21:11 2008 From: sabre at nondot.org (Chris Lattner) Date: Fri, 17 Oct 2008 16:21:11 -0000 Subject: [llvm-commits] [llvm] r57686 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/CodeGen/SelectionDAG/TargetLowering.cpp Message-ID: <200810171621.m9HGLBW2011094@zion.cs.uiuc.edu> Author: lattner Date: Fri Oct 17 11:21:11 2008 New Revision: 57686 URL: http://llvm.org/viewvc/llvm-project?rev=57686&view=rev Log: add an assert so that PR2356 explodes instead of running off an array. Improve some minor comments, refactor some helpers in AsmOperandInfo. No functionality change for valid code. Modified: llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=57686&r1=57685&r2=57686&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Fri Oct 17 11:21:11 2008 @@ -1181,6 +1181,8 @@ /// lowering. struct AsmOperandInfo : public InlineAsm::ConstraintInfo { /// ConstraintCode - This contains the actual string for the code, like "m". + /// TargetLowering picks the 'best' code from ConstraintInfo::Codes that + /// most closely matches the operand. std::string ConstraintCode; /// ConstraintType - Information about the constraint code, e.g. Register, @@ -1194,6 +1196,14 @@ /// ConstraintVT - The ValueType for the operand value. MVT ConstraintVT; + + /// isMatchingConstraint - Return true of this is an input operand that is a + /// matching constraint like "4". + bool isMatchingConstraint() const; + + /// getMatchedOperand - If this is an input matching constraint, this method + /// returns the output operand it matches. + unsigned getMatchedOperand() const; AsmOperandInfo(const InlineAsm::ConstraintInfo &info) : InlineAsm::ConstraintInfo(info), Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=57686&r1=57685&r2=57686&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Fri Oct 17 11:21:11 2008 @@ -4363,8 +4363,10 @@ for (unsigned Value = 0, Reg = 0, e = ValueVTs.size(); Value != e; ++Value) { unsigned NumRegs = TLI->getNumRegisters(ValueVTs[Value]); MVT RegisterVT = RegVTs[Value]; - for (unsigned i = 0; i != NumRegs; ++i) + for (unsigned i = 0; i != NumRegs; ++i) { + assert(Reg < Regs.size() && "Mismatch in # registers expected"); Ops.push_back(DAG.getRegister(Regs[Reg++], RegisterVT)); + } } } @@ -4557,8 +4559,9 @@ const TargetRegisterClass *RC = PhysReg.second; if (RC) { // If this is a tied register, our regalloc doesn't know how to maintain - // the constraint. If it isn't, go ahead and create vreg - // and let the regalloc do the right thing. + // the constraint, so we have to pick a register to pin the input/output to. + // If it isn't a matched constraint, go ahead and create vreg and let the + // regalloc do its thing. if (!OpInfo.hasMatchingInput) { RegVT = *PhysReg.second->vt_begin(); if (OpInfo.ConstraintVT == MVT::Other) @@ -4785,7 +4788,7 @@ // Second pass - Loop over all of the operands, assigning virtual or physregs - // to registerclass operands. + // to register class operands. for (unsigned i = 0, e = ConstraintOperands.size(); i != e; ++i) { SDISelAsmOperandInfo &OpInfo = ConstraintOperands[i]; @@ -4860,10 +4863,10 @@ case InlineAsm::isInput: { SDValue InOperandVal = OpInfo.CallOperand; - if (isdigit(OpInfo.ConstraintCode[0])) { // Matching constraint? + if (OpInfo.isMatchingConstraint()) { // Matching constraint? // If this is required to match an output register we have already set, // just use its register. - unsigned OperandNo = atoi(OpInfo.ConstraintCode.c_str()); + unsigned OperandNo = OpInfo.getMatchedOperand(); // Scan until we find the definition we already emitted of this operand. // When we find it, create a RegsForValue operand. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=57686&r1=57685&r2=57686&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Fri Oct 17 11:21:11 2008 @@ -1962,6 +1962,21 @@ //===----------------------------------------------------------------------===// // Constraint Selection. +/// isMatchingConstraint - Return true of this is an input operand that is a +/// matching constraint like "4". +bool TargetLowering::AsmOperandInfo::isMatchingConstraint() const { + assert(!ConstraintCode.empty() && "No known constraint!"); + return isdigit(ConstraintCode[0]); +} + +/// getMatchedOperand - If this is an input matching constraint, this method +/// returns the output operand it matches. +unsigned TargetLowering::AsmOperandInfo::getMatchedOperand() const { + assert(!ConstraintCode.empty() && "No known constraint!"); + return atoi(ConstraintCode.c_str()); +} + + /// getConstraintGenerality - Return an integer indicating how general CT /// is. static unsigned getConstraintGenerality(TargetLowering::ConstraintType CT) { From ggreif at gmail.com Fri Oct 17 11:22:15 2008 From: ggreif at gmail.com (Gabor Greif) Date: Fri, 17 Oct 2008 09:22:15 -0700 (PDT) Subject: [llvm-commits] [llvm] r57641 - in /llvm/trunk: include/llvm/Use.h lib/VMCore/Use.cpp In-Reply-To: References: <200810161533.m9GFX5d6009145@zion.cs.uiuc.edu> <8A8679D9-2BD0-418B-BFE3-7D0BD707F285@apple.com> <8bbe19d5-47ed-478c-9797-9166e581075e@17g2000hsk.googlegroups.com> Message-ID: On Oct 17, 5:15?pm, Chris Lattner wrote: > On Oct 17, 2008, at 1:42 AM, Gabor Greif wrote: > > >>> Notably this approach does not catch dereferencing of tagged > >>> pointers, but helps > >>> in separating the two concepts a bit. > > >> Gabor, this is very interesting, but it is very subtle and definitely > >> needs some comments in the code. ?Please add them. > > > Hmmm, I am specialized on subtle things :-) > > I was so happy yesterday that this scheme worked out with minimal > > changes that I have completely forgotten documenting it. I have just > > added some lines, but I am not sure how these can find their way into > > doxygen. Anybody? > > Thanks Gabor, I'm not too concerned about doxygenating the comments, ? > but if someone wanted to figure that out, it would be fine. > > On another topic, in Clang we usually represent type tagged pointers ? > as intptr_t members instead of foo*'s. ?The accessor that extracts the ? > pointer from the intptr_t just does a cast to foo* after masking out ? > the bits. ?Would this be better than using volatile? Definitely not. The underlying type T* allows the selection of the templated tagging/untagging functions. I have some plans to use 3-bit tags on 64- bit platforms, to significantly speed up the algorithms. These would use a template mechanism to select the more efficient algos at compile-time. I would rather suggest that Clang migrates to the Use.h-style tagging if feasible :-) Btw. if SROA could be taken for granted in all compilers, I would have used Tagged instead of T volatile*. But I think the current approach is sufficiently elegant (with the bit of comment I have added). Cheers, Gabor > > -Chris > _______________________________________________ > llvm-commits mailing list > llvm-comm... at cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From sabre at nondot.org Fri Oct 17 11:47:48 2008 From: sabre at nondot.org (Chris Lattner) Date: Fri, 17 Oct 2008 16:47:48 -0000 Subject: [llvm-commits] [llvm] r57687 - in /llvm/trunk: include/llvm/InlineAsm.h include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/VMCore/InlineAsm.cpp Message-ID: <200810171647.m9HGlmLx012044@zion.cs.uiuc.edu> Author: lattner Date: Fri Oct 17 11:47:46 2008 New Revision: 57687 URL: http://llvm.org/viewvc/llvm-project?rev=57687&view=rev Log: Keep track of *which* input constraint matches an output constraint. Reject asms where an output has multiple input constraints tied to it. Modified: llvm/trunk/include/llvm/InlineAsm.h llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/trunk/lib/VMCore/InlineAsm.cpp Modified: llvm/trunk/include/llvm/InlineAsm.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InlineAsm.h?rev=57687&r1=57686&r2=57687&view=diff ============================================================================== --- llvm/trunk/include/llvm/InlineAsm.h (original) +++ llvm/trunk/include/llvm/InlineAsm.h Fri Oct 17 11:47:46 2008 @@ -79,9 +79,15 @@ /// read. This is only ever set for an output operand. bool isEarlyClobber; - /// hasMatchingInput - This is set to true for an output constraint iff - /// there is an input constraint that is required to match it (e.g. "0"). - bool hasMatchingInput; + /// MatchingInput - If this is not -1, this is an output constraint where an + /// input constraint is required to match it (e.g. "0"). The value is the + /// constraint number that matches this one (for example, if this is + /// constraint #0 and constraint #4 has the value "0", this will be 4). + signed char MatchingInput; + + /// hasMatchingInput - Return true if this is an output constraint that has + /// a matching input constraint. + bool hasMatchingInput() const { return MatchingInput != -1; } /// isCommutative - This is set to true for a constraint that is commutative /// with the next operand. Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=57687&r1=57686&r2=57687&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Fri Oct 17 11:47:46 2008 @@ -1197,9 +1197,9 @@ /// ConstraintVT - The ValueType for the operand value. MVT ConstraintVT; - /// isMatchingConstraint - Return true of this is an input operand that is a - /// matching constraint like "4". - bool isMatchingConstraint() const; + /// isMatchingInputConstraint - Return true of this is an input operand that + /// is a matching constraint like "4". + bool isMatchingInputConstraint() const; /// getMatchedOperand - If this is an input matching constraint, this method /// returns the output operand it matches. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=57687&r1=57686&r2=57687&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Fri Oct 17 11:47:46 2008 @@ -4491,7 +4491,7 @@ // If there is an input constraint that matches this, we need to reserve // the input register so no other inputs allocate to it. - isInReg = OpInfo.hasMatchingInput; + isInReg = OpInfo.hasMatchingInput(); break; case InlineAsm::isInput: isInReg = true; @@ -4562,7 +4562,7 @@ // the constraint, so we have to pick a register to pin the input/output to. // If it isn't a matched constraint, go ahead and create vreg and let the // regalloc do its thing. - if (!OpInfo.hasMatchingInput) { + if (!OpInfo.hasMatchingInput()) { RegVT = *PhysReg.second->vt_begin(); if (OpInfo.ConstraintVT == MVT::Other) ValueVT = RegVT; @@ -4863,7 +4863,7 @@ case InlineAsm::isInput: { SDValue InOperandVal = OpInfo.CallOperand; - if (OpInfo.isMatchingConstraint()) { // Matching constraint? + if (OpInfo.isMatchingInputConstraint()) { // Matching constraint? // If this is required to match an output register we have already set, // just use its register. unsigned OperandNo = OpInfo.getMatchedOperand(); Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=57687&r1=57686&r2=57687&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Fri Oct 17 11:47:46 2008 @@ -1962,9 +1962,9 @@ //===----------------------------------------------------------------------===// // Constraint Selection. -/// isMatchingConstraint - Return true of this is an input operand that is a -/// matching constraint like "4". -bool TargetLowering::AsmOperandInfo::isMatchingConstraint() const { +/// isMatchingInputConstraint - Return true of this is an input operand that is +/// a matching constraint like "4". +bool TargetLowering::AsmOperandInfo::isMatchingInputConstraint() const { assert(!ConstraintCode.empty() && "No known constraint!"); return isdigit(ConstraintCode[0]); } Modified: llvm/trunk/lib/VMCore/InlineAsm.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/InlineAsm.cpp?rev=57687&r1=57686&r2=57687&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/InlineAsm.cpp (original) +++ llvm/trunk/lib/VMCore/InlineAsm.cpp Fri Oct 17 11:47:46 2008 @@ -57,7 +57,7 @@ // Initialize Type = isInput; isEarlyClobber = false; - hasMatchingInput = false; + MatchingInput = -1; isCommutative = false; isIndirect = false; @@ -127,8 +127,13 @@ Type != isInput) return true; // Invalid constraint number. + // If Operand N already has a matching input, reject this. An output + // can't be constrained to the same value as multiple inputs. + if (ConstraintsSoFar[N].hasMatchingInput()) + return true; + // Note that operand #n has a matching input. - ConstraintsSoFar[N].hasMatchingInput = true; + ConstraintsSoFar[N].MatchingInput = ConstraintsSoFar.size(); } else { // Single letter constraint. Codes.push_back(std::string(I, I+1)); From isanbard at gmail.com Fri Oct 17 11:53:26 2008 From: isanbard at gmail.com (Bill Wendling) Date: Fri, 17 Oct 2008 16:53:26 -0000 Subject: [llvm-commits] [llvm] r57688 - /llvm/tags/Apple/llvmCore-2077/ Message-ID: <200810171653.m9HGrQmp012267@zion.cs.uiuc.edu> Author: void Date: Fri Oct 17 11:53:26 2008 New Revision: 57688 URL: http://llvm.org/viewvc/llvm-project?rev=57688&view=rev Log: Creating llvmCore-2077 branch Added: llvm/tags/Apple/llvmCore-2077/ - copied from r57687, llvm/trunk/ From isanbard at gmail.com Fri Oct 17 11:53:34 2008 From: isanbard at gmail.com (Bill Wendling) Date: Fri, 17 Oct 2008 16:53:34 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57689 - /llvm-gcc-4.2/tags/Apple/llvmgcc42-2077/ Message-ID: <200810171653.m9HGrYqu012282@zion.cs.uiuc.edu> Author: void Date: Fri Oct 17 11:53:34 2008 New Revision: 57689 URL: http://llvm.org/viewvc/llvm-project?rev=57689&view=rev Log: Creating llvmgcc42-2077 branch Added: llvm-gcc-4.2/tags/Apple/llvmgcc42-2077/ - copied from r57688, llvm-gcc-4.2/trunk/ From sabre at nondot.org Fri Oct 17 12:05:26 2008 From: sabre at nondot.org (Chris Lattner) Date: Fri, 17 Oct 2008 17:05:26 -0000 Subject: [llvm-commits] [llvm] r57690 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Message-ID: <200810171705.m9HH5Qei012851@zion.cs.uiuc.edu> Author: lattner Date: Fri Oct 17 12:05:25 2008 New Revision: 57690 URL: http://llvm.org/viewvc/llvm-project?rev=57690&view=rev Log: refactor some code into a helper method, no functionality change. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=57690&r1=57689&r2=57690&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Fri Oct 17 12:05:25 2008 @@ -4452,6 +4452,42 @@ MarkRegAndAliases(AssignedRegs.Regs[i], InputRegs, TRI); } } + + /// getCallOperandValMVT - Return the MVT of the Value* that this operand + /// corresponds to. If there is no Value* for this operand, it returns + /// MVT::Other. + MVT getCallOperandValMVT(const TargetLowering &TLI, + const TargetData *TD) const { + if (CallOperandVal == 0) return MVT::Other; + + if (isa(CallOperandVal)) + return TLI.getPointerTy(); + + const llvm::Type *OpTy = CallOperandVal->getType(); + + // If this is an indirect operand, the operand is a pointer to the + // accessed type. + if (isIndirect) + OpTy = cast(OpTy)->getElementType(); + + // If OpTy is not a single value, it may be a struct/union that we + // can tile with integers. + if (!OpTy->isSingleValueType() && OpTy->isSized()) { + unsigned BitSize = TD->getTypeSizeInBits(OpTy); + switch (BitSize) { + default: break; + case 1: + case 8: + case 16: + case 32: + case 64: + OpTy = IntegerType::get(BitSize); + break; + } + } + + return TLI.getValueType(OpTy, true); + } private: /// MarkRegAndAliases - Mark the specified register and all aliases in the @@ -4707,34 +4743,13 @@ // If this is an input or an indirect output, process the call argument. // BasicBlocks are labels, currently appearing only in asm's. if (OpInfo.CallOperandVal) { - if (BasicBlock *BB = dyn_cast(OpInfo.CallOperandVal)) + if (BasicBlock *BB = dyn_cast(OpInfo.CallOperandVal)) { OpInfo.CallOperand = DAG.getBasicBlock(FuncInfo.MBBMap[BB]); - else { + } else { OpInfo.CallOperand = getValue(OpInfo.CallOperandVal); - const Type *OpTy = OpInfo.CallOperandVal->getType(); - // If this is an indirect operand, the operand is a pointer to the - // accessed type. - if (OpInfo.isIndirect) - OpTy = cast(OpTy)->getElementType(); - - // If OpTy is not a single value, it may be a struct/union that we - // can tile with integers. - if (!OpTy->isSingleValueType() && OpTy->isSized()) { - unsigned BitSize = TD->getTypeSizeInBits(OpTy); - switch (BitSize) { - default: break; - case 1: - case 8: - case 16: - case 32: - case 64: - OpTy = IntegerType::get(BitSize); - break; - } - } - - OpVT = TLI.getValueType(OpTy, true); } + + OpVT = OpInfo.getCallOperandValMVT(TLI, TD); } OpInfo.ConstraintVT = OpVT; From evan.cheng at apple.com Fri Oct 17 12:12:19 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 17 Oct 2008 17:12:19 -0000 Subject: [llvm-commits] [llvm] r57691 - /llvm/trunk/lib/Target/X86/X86InstrInfo.h Message-ID: <200810171712.m9HHCJgL013063@zion.cs.uiuc.edu> Author: evancheng Date: Fri Oct 17 12:12:18 2008 New Revision: 57691 URL: http://llvm.org/viewvc/llvm-project?rev=57691&view=rev Log: getX86RegNum has long been moved to X86RegisterInfo. Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.h Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.h?rev=57691&r1=57690&r2=57691&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.h (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.h Fri Oct 17 12:12:18 2008 @@ -414,7 +414,6 @@ } static unsigned sizeOfImm(const TargetInstrDesc *Desc); - static unsigned getX86RegNum(unsigned RegNo); static bool isX86_64ExtendedReg(const MachineOperand &MO); static unsigned determineREX(const MachineInstr &MI); From evan.cheng at apple.com Fri Oct 17 12:14:20 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 17 Oct 2008 17:14:20 -0000 Subject: [llvm-commits] [llvm] r57692 - in /llvm/trunk/lib/Target/X86: X86CodeEmitter.cpp X86InstrSSE.td Message-ID: <200810171714.m9HHEK9r013126@zion.cs.uiuc.edu> Author: evancheng Date: Fri Oct 17 12:14:20 2008 New Revision: 57692 URL: http://llvm.org/viewvc/llvm-project?rev=57692&view=rev Log: Fix lfence and mfence encoding. These look like MRM5r and MRM6r instructions except they do not have any operands. The RegModRM byte is encoded with register number 0. Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp llvm/trunk/lib/Target/X86/X86InstrSSE.td Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp?rev=57692&r1=57691&r2=57692&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Fri Oct 17 12:14:20 2008 @@ -84,6 +84,7 @@ intptr_t PCAdj = 0); void emitRegModRMByte(unsigned ModRMReg, unsigned RegOpcodeField); + void emitRegModRMByte(unsigned RegOpcodeField); void emitSIBByte(unsigned SS, unsigned Index, unsigned Base); void emitConstant(uint64_t Val, unsigned Size); @@ -231,6 +232,10 @@ MCE.emitByte(ModRMByte(3, RegOpcodeFld, getX86RegNum(ModRMReg))); } +void Emitter::emitRegModRMByte(unsigned RegOpcodeFld) { + MCE.emitByte(ModRMByte(3, RegOpcodeFld, 0)); +} + void Emitter::emitSIBByte(unsigned SS, unsigned Index, unsigned Base) { // SIB byte is in the same format as the ModRMByte... MCE.emitByte(ModRMByte(SS, Index, Base)); @@ -631,10 +636,16 @@ case X86II::MRM0r: case X86II::MRM1r: case X86II::MRM2r: case X86II::MRM3r: case X86II::MRM4r: case X86II::MRM5r: - case X86II::MRM6r: case X86II::MRM7r: + case X86II::MRM6r: case X86II::MRM7r: { MCE.emitByte(BaseOpcode); - emitRegModRMByte(MI.getOperand(CurOp++).getReg(), - (Desc->TSFlags & X86II::FormMask)-X86II::MRM0r); + + // Special handling of lfence and mfence. + if (Desc->getOpcode() == X86::LFENCE || + Desc->getOpcode() == X86::MFENCE) + emitRegModRMByte((Desc->TSFlags & X86II::FormMask)-X86II::MRM0r); + else + emitRegModRMByte(MI.getOperand(CurOp++).getReg(), + (Desc->TSFlags & X86II::FormMask)-X86II::MRM0r); if (CurOp != NumOps) { const MachineOperand &MO1 = MI.getOperand(CurOp++); @@ -660,6 +671,7 @@ } } break; + } case X86II::MRM0m: case X86II::MRM1m: case X86II::MRM2m: case X86II::MRM3m: Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=57692&r1=57691&r2=57692&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Fri Oct 17 12:14:20 2008 @@ -2239,9 +2239,9 @@ TB, Requires<[HasSSE2]>; // Load, store, and memory fence -def LFENCE : I<0xAE, MRM5m, (outs), (ins), +def LFENCE : I<0xAE, MRM5r, (outs), (ins), "lfence", [(int_x86_sse2_lfence)]>, TB, Requires<[HasSSE2]>; -def MFENCE : I<0xAE, MRM6m, (outs), (ins), +def MFENCE : I<0xAE, MRM6r, (outs), (ins), "mfence", [(int_x86_sse2_mfence)]>, TB, Requires<[HasSSE2]>; //TODO: custom lower this so as to never even generate the noop From sabre at nondot.org Fri Oct 17 12:26:19 2008 From: sabre at nondot.org (Chris Lattner) Date: Fri, 17 Oct 2008 17:26:19 -0000 Subject: [llvm-commits] [llvm] r57694 - /llvm/trunk/test/CodeGen/Generic/2007-04-14-EHSelectorCrash.ll Message-ID: <200810171726.m9HHQJpw013550@zion.cs.uiuc.edu> Author: lattner Date: Fri Oct 17 12:26:19 2008 New Revision: 57694 URL: http://llvm.org/viewvc/llvm-project?rev=57694&view=rev Log: remove this test: it is xfailed anyway, and is failing for a reason other than why it was xfailed. Removed: llvm/trunk/test/CodeGen/Generic/2007-04-14-EHSelectorCrash.ll Removed: llvm/trunk/test/CodeGen/Generic/2007-04-14-EHSelectorCrash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/2007-04-14-EHSelectorCrash.ll?rev=57693&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/Generic/2007-04-14-EHSelectorCrash.ll (original) +++ llvm/trunk/test/CodeGen/Generic/2007-04-14-EHSelectorCrash.ll (removed) @@ -1,18 +0,0 @@ -; RUN: llvm-as < %s | llc -enable-eh -; RUN: llvm-as < %s | llc -enable-eh -march=x86-64 -; XFAIL: * -; Un-XFAIL this when PR1508 is fixed. - -; PR1326 - - at __gnat_others_value = external constant i32 ; [#uses=1] - -define void @_ada_eh() { -entry: - %eh_select = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector( i8* null, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), i32* @__gnat_others_value ) ; [#uses=0] - ret void -} - -declare i32 @llvm.eh.selector(i8*, i8*, ...) - -declare i32 @__gnat_eh_personality(...) From sabre at nondot.org Fri Oct 17 12:26:48 2008 From: sabre at nondot.org (Chris Lattner) Date: Fri, 17 Oct 2008 17:26:48 -0000 Subject: [llvm-commits] [llvm] r57695 - /llvm/trunk/test/CodeGen/CellSPU/and_ops_more.ll Message-ID: <200810171726.m9HHQmQl013582@zion.cs.uiuc.edu> Author: lattner Date: Fri Oct 17 12:26:48 2008 New Revision: 57695 URL: http://llvm.org/viewvc/llvm-project?rev=57695&view=rev Log: remove an xfailed test. Removed: llvm/trunk/test/CodeGen/CellSPU/and_ops_more.ll Removed: llvm/trunk/test/CodeGen/CellSPU/and_ops_more.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CellSPU/and_ops_more.ll?rev=57694&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/CellSPU/and_ops_more.ll (original) +++ llvm/trunk/test/CodeGen/CellSPU/and_ops_more.ll (removed) @@ -1,26 +0,0 @@ -; RUN: llvm-as -o - %s | llc -march=cellspu > %t1.s -; RUN: grep and %t1.s | count 10 -; RUN: not grep andc %t1.s -; RUN: not grep andi %t1.s -; RUN: grep andhi %t1.s | count 5 -; RUN: grep andbi %t1.s | count 1 -; XFAIL: * - -; This testcase is derived from test/CodeGen/CellSPU/and_ops.ll and -; records the changes due to r50358. The and_sext8 function appears -; to be improved by this change, while the andhi_i16 function appears -; to be pessimized. - -target datalayout = "E-p:32:32:128-f64:64:128-f32:32:128-i64:32:128-i32:32:128-i16:16:128-i8:8:128-i1:8:128-a0:0:128-v128:128:128-s0:128:128" -target triple = "spu" - -define i16 @andhi_i16(i16 signext %in) signext { - %tmp38 = and i16 %in, 37 ; [#uses=1] - ret i16 %tmp38 -} - -define i8 @and_sext8(i8 signext %in) signext { - ; ANDBI generated - %tmp38 = and i8 %in, 37 - ret i8 %tmp38 -} From tonic at nondot.org Fri Oct 17 12:40:17 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 17:40:17 -0000 Subject: [llvm-commits] [llvm] r57697 - /llvm/branches/release_24/win32/CodeGen/CodeGen.vcproj Message-ID: <200810171740.m9HHeHrU014168@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 12:40:17 2008 New Revision: 57697 URL: http://llvm.org/viewvc/llvm-project?rev=57697&view=rev Log: update win32 project file, patch provided by OvermindDL1 on llvmdev. Modified: llvm/branches/release_24/win32/CodeGen/CodeGen.vcproj Modified: llvm/branches/release_24/win32/CodeGen/CodeGen.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/win32/CodeGen/CodeGen.vcproj?rev=57697&r1=57696&r2=57697&view=diff ============================================================================== --- llvm/branches/release_24/win32/CodeGen/CodeGen.vcproj (original) +++ llvm/branches/release_24/win32/CodeGen/CodeGen.vcproj Fri Oct 17 12:40:17 2008 @@ -425,6 +425,10 @@ > + + @@ -453,6 +457,10 @@ > + + @@ -739,6 +747,10 @@ > + + From tonic at nondot.org Fri Oct 17 12:50:35 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 17:50:35 -0000 Subject: [llvm-commits] [llvm] r57698 - in /llvm/branches/release_24: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2008-10-11-DivCompareFold.ll Message-ID: <200810171750.m9HHoaon014723@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 12:50:35 2008 New Revision: 57698 URL: http://llvm.org/viewvc/llvm-project?rev=57698&view=rev Log: Merge from mainline. Fix PR2697 by rewriting the '(X / pos) op neg' logic. This also changes a couple other cases for clarity, but shouldn't affect correctness. Added: llvm/branches/release_24/test/Transforms/InstCombine/2008-10-11-DivCompareFold.ll - copied unchanged from r57387, llvm/trunk/test/Transforms/InstCombine/2008-10-11-DivCompareFold.ll Modified: llvm/branches/release_24/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/branches/release_24/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Transforms/Scalar/InstructionCombining.cpp?rev=57698&r1=57697&r2=57698&view=diff ============================================================================== --- llvm/branches/release_24/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/branches/release_24/lib/Transforms/Scalar/InstructionCombining.cpp Fri Oct 17 12:50:35 2008 @@ -5784,6 +5784,11 @@ return 0; if (DivRHS->isZero()) return 0; // The ProdOV computation fails on divide by zero. + if (DivIsSigned && DivRHS->isAllOnesValue()) + return 0; // The overflow computation also screws up here + if (DivRHS->isOne()) + return 0; // Not worth bothering, and eliminates some funny cases + // with INT_MIN. // Compute Prod = CI * DivRHS. We are essentially solving an equation // of form X/C1=C2. We solve for X by multiplying C1 (DivRHS) and @@ -5810,7 +5815,6 @@ int LoOverflow = 0, HiOverflow = 0; ConstantInt *LoBound = 0, *HiBound = 0; - if (!DivIsSigned) { // udiv // e.g. X/5 op 3 --> [15, 20) LoBound = Prod; @@ -5829,11 +5833,13 @@ HiOverflow = AddWithOverflow(HiBound, Prod, DivRHS, true); } else { // (X / pos) op neg // e.g. X/5 op -3 --> [-15-4, -15+1) --> [-19, -14) - Constant *DivRHSH = ConstantExpr::getNeg(SubOne(DivRHS)); - LoOverflow = AddWithOverflow(LoBound, Prod, - cast(DivRHSH), true) ? -1 : 0; HiBound = AddOne(Prod); - HiOverflow = ProdOV ? -1 : 0; + LoOverflow = HiOverflow = ProdOV ? -1 : 0; + if (!LoOverflow) { + ConstantInt* DivNeg = cast(ConstantExpr::getNeg(DivRHS)); + LoOverflow = AddWithOverflow(LoBound, HiBound, DivNeg, + true) ? -1 : 0; + } } } else if (DivRHS->getValue().isNegative()) { // Divisor is < 0. if (CmpRHSV == 0) { // (X / neg) op 0 @@ -5846,14 +5852,13 @@ } } else if (CmpRHSV.isStrictlyPositive()) { // (X / neg) op pos // e.g. X/-5 op 3 --> [-19, -14) + HiBound = AddOne(Prod); HiOverflow = LoOverflow = ProdOV ? -1 : 0; if (!LoOverflow) - LoOverflow = AddWithOverflow(LoBound, Prod, AddOne(DivRHS), true) ?-1:0; - HiBound = AddOne(Prod); + LoOverflow = AddWithOverflow(LoBound, HiBound, DivRHS, true) ? -1 : 0; } else { // (X / neg) op neg - // e.g. X/-5 op -3 --> [15, 20) - LoBound = Prod; - LoOverflow = HiOverflow = ProdOV ? 1 : 0; + LoBound = Prod; // e.g. X/-5 op -3 --> [15, 20) + LoOverflow = HiOverflow = ProdOV; if (!HiOverflow) HiOverflow = SubWithOverflow(HiBound, Prod, DivRHS, true); } From sabre at nondot.org Fri Oct 17 12:52:49 2008 From: sabre at nondot.org (Chris Lattner) Date: Fri, 17 Oct 2008 17:52:49 -0000 Subject: [llvm-commits] [llvm] r57699 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll Message-ID: <200810171752.m9HHqn3G014814@zion.cs.uiuc.edu> Author: lattner Date: Fri Oct 17 12:52:49 2008 New Revision: 57699 URL: http://llvm.org/viewvc/llvm-project?rev=57699&view=rev Log: Fix PR2356 on PowerPC: if we have an input and output that are tied together that have different sizes (e.g. i32 and i64) make sure to reserve registers for the bigger operand. Added: llvm/trunk/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=57699&r1=57698&r2=57699&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Fri Oct 17 12:52:49 2008 @@ -4721,6 +4721,7 @@ OpInfo.CallOperandVal = CS.getArgument(ArgNo++); break; } + // The return value of the call is this value. As such, there is no // corresponding argument. assert(CS.getType() != Type::VoidTy && "Bad inline asm!"); @@ -4753,6 +4754,30 @@ } OpInfo.ConstraintVT = OpVT; + } + + // Second pass over the constraints: compute which constraint option to use + // and assign registers to constraints that want a specific physreg. + for (unsigned i = 0, e = ConstraintInfos.size(); i != e; ++i) { + SDISelAsmOperandInfo &OpInfo = ConstraintOperands[i]; + + // If this is an output operand with a matching input operand, look up the + // matching input. It might have a different type (e.g. the output might be + // i32 and the input i64) and we need to pick the larger width to ensure we + // reserve the right number of registers. + if (OpInfo.hasMatchingInput()) { + SDISelAsmOperandInfo &Input = ConstraintOperands[OpInfo.MatchingInput]; + if (OpInfo.ConstraintVT != Input.ConstraintVT) { + assert(OpInfo.ConstraintVT.isInteger() && + Input.ConstraintVT.isInteger() && + "Asm constraints must be the same or different sized integers"); + if (OpInfo.ConstraintVT.getSizeInBits() < + Input.ConstraintVT.getSizeInBits()) + OpInfo.ConstraintVT = Input.ConstraintVT; + else + Input.ConstraintVT = OpInfo.ConstraintVT; + } + } // Compute the constraint code and ConstraintType to use. TLI.ComputeConstraintToUse(OpInfo, OpInfo.CallOperand, hasMemory, &DAG); @@ -5002,24 +5027,26 @@ // and set it as the value of the call. if (!RetValRegs.Regs.empty()) { SDValue Val = RetValRegs.getCopyFromRegs(DAG, Chain, &Flag); - + MVT ResultType = TLI.getValueType(CS.getType()); + // If any of the results of the inline asm is a vector, it may have the // wrong width/num elts. This can happen for register classes that can // contain multiple different value types. The preg or vreg allocated may - // not have the same VT as was expected. Convert it to the right type with - // bit_convert. - if (const StructType *ResSTy = dyn_cast(CS.getType())) { - for (unsigned i = 0, e = ResSTy->getNumElements(); i != e; ++i) { - if (Val.getNode()->getValueType(i).isVector()) - Val = DAG.getNode(ISD::BIT_CONVERT, - TLI.getValueType(ResSTy->getElementType(i)), Val); - } - } else { - if (Val.getValueType().isVector()) - Val = DAG.getNode(ISD::BIT_CONVERT, TLI.getValueType(CS.getType()), - Val); + // not have the same VT as was expected. Convert it to the right type + // with bit_convert. + // FIXME: Is this sufficient for inline asms with MRVs? + if (ResultType != Val.getValueType() && Val.getValueType().isVector()) { + Val = DAG.getNode(ISD::BIT_CONVERT, ResultType, Val); + + } else if (ResultType != Val.getValueType() && + ResultType.isInteger() && Val.getValueType().isInteger()) { + // If a result value was tied to an input value, the computed result may + // have a wider width than the expected result. Extract the relevant + // portion. + Val = DAG.getNode(ISD::TRUNCATE, ResultType, Val); } - + + assert(ResultType == Val.getValueType() && "Asm result value mismatch!"); setValue(CS.getInstruction(), Val); } @@ -5273,7 +5300,8 @@ Value != NumValues; ++Value) { MVT VT = ValueVTs[Value]; const Type *ArgTy = VT.getTypeForMVT(); - SDValue Op = SDValue(Args[i].Node.getNode(), Args[i].Node.getResNo() + Value); + SDValue Op = SDValue(Args[i].Node.getNode(), + Args[i].Node.getResNo() + Value); ISD::ArgFlagsTy Flags; unsigned OriginalAlignment = getTargetData()->getABITypeAlignment(ArgTy); Added: llvm/trunk/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll?rev=57699&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll (added) +++ llvm/trunk/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll Fri Oct 17 12:52:49 2008 @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llc +; PR2356 +target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128" +target triple = "powerpc-apple-darwin9" + +define i32 @test(i64 %x, i32* %p) nounwind { +entry: + %asmtmp = call i32 asm "", "=r,0"(i64 0) nounwind ; [#uses=0] + %y = add i32 %asmtmp, 1 + ret i32 %y +} From tonic at nondot.org Fri Oct 17 12:53:06 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 17:53:06 -0000 Subject: [llvm-commits] [llvm] r57700 - in /llvm/branches/release_24: lib/CodeGen/SelectionDAG/ lib/Target/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/CellSPU/ lib/Target/IA64/ lib/Target/Mips/ lib/Target/PowerPC/ lib/Target/Sparc/ lib/Target/X86/ test/CodeGen/X86/ Message-ID: <200810171753.m9HHr7EY014850@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 12:53:06 2008 New Revision: 57700 URL: http://llvm.org/viewvc/llvm-project?rev=57700&view=rev Log: Merge from mainline. Change CALLSEQ_BEGIN and CALLSEQ_END to take TargetConstant's as parameters instead of raw Constants. This prevents the constants from being selected by the isel pass, fixing PR2735. Added: llvm/branches/release_24/test/CodeGen/X86/2008-10-11-CallCrash.ll - copied unchanged from r57385, llvm/trunk/test/CodeGen/X86/2008-10-11-CallCrash.ll Modified: llvm/branches/release_24/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp llvm/branches/release_24/lib/Target/ARM/ARMISelLowering.cpp llvm/branches/release_24/lib/Target/ARM/ARMInstrInfo.td llvm/branches/release_24/lib/Target/Alpha/AlphaISelLowering.cpp llvm/branches/release_24/lib/Target/Alpha/AlphaInstrInfo.td llvm/branches/release_24/lib/Target/CellSPU/SPUISelLowering.cpp llvm/branches/release_24/lib/Target/CellSPU/SPUInstrInfo.td llvm/branches/release_24/lib/Target/IA64/IA64ISelLowering.cpp llvm/branches/release_24/lib/Target/Mips/MipsISelLowering.cpp llvm/branches/release_24/lib/Target/Mips/MipsInstrInfo.td llvm/branches/release_24/lib/Target/PowerPC/PPCISelLowering.cpp llvm/branches/release_24/lib/Target/PowerPC/PPCInstrInfo.td llvm/branches/release_24/lib/Target/Sparc/SparcISelLowering.cpp llvm/branches/release_24/lib/Target/Sparc/SparcInstrInfo.td llvm/branches/release_24/lib/Target/TargetSelectionDAG.td llvm/branches/release_24/lib/Target/X86/X86ISelLowering.cpp llvm/branches/release_24/lib/Target/X86/X86Instr64bit.td llvm/branches/release_24/lib/Target/X86/X86InstrInfo.td Modified: llvm/branches/release_24/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/branches/release_24/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Fri Oct 17 12:53:06 2008 @@ -1678,8 +1678,7 @@ // Chain the dynamic stack allocation so that it doesn't modify the stack // pointer when other instructions are using the stack. - Chain = DAG.getCALLSEQ_START(Chain, - DAG.getConstant(0, TLI.getPointerTy())); + Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(0, true)); SDValue Size = Tmp2.getOperand(1); SDValue SP = DAG.getCopyFromReg(Chain, SPReg, VT); @@ -1693,11 +1692,8 @@ Tmp1 = DAG.getNode(ISD::SUB, VT, SP, Size); // Value Chain = DAG.getCopyToReg(Chain, SPReg, Tmp1); // Output chain - Tmp2 = - DAG.getCALLSEQ_END(Chain, - DAG.getConstant(0, TLI.getPointerTy()), - DAG.getConstant(0, TLI.getPointerTy()), - SDValue()); + Tmp2 = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(0, true), + DAG.getIntPtrConstant(0, true), SDValue()); Tmp1 = LegalizeOp(Tmp1); Tmp2 = LegalizeOp(Tmp2); Modified: llvm/branches/release_24/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/ARM/ARMISelLowering.cpp?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/branches/release_24/lib/Target/ARM/ARMISelLowering.cpp Fri Oct 17 12:53:06 2008 @@ -430,8 +430,7 @@ // Adjust the stack pointer for the new arguments... // These operations are automatically eliminated by the prolog/epilog pass - Chain = DAG.getCALLSEQ_START(Chain, - DAG.getConstant(NumBytes, MVT::i32)); + Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(NumBytes, true)); SDValue StackPtr = DAG.getRegister(ARM::SP, MVT::i32); @@ -603,10 +602,8 @@ &Ops[0], Ops.size()); InFlag = Chain.getValue(1); - Chain = DAG.getCALLSEQ_END(Chain, - DAG.getConstant(NumBytes, MVT::i32), - DAG.getConstant(0, MVT::i32), - InFlag); + Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, true), + DAG.getIntPtrConstant(0, true), InFlag); if (RetVT != MVT::Other) InFlag = Chain.getValue(1); Modified: llvm/branches/release_24/lib/Target/ARM/ARMInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/ARM/ARMInstrInfo.td?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/ARM/ARMInstrInfo.td (original) +++ llvm/branches/release_24/lib/Target/ARM/ARMInstrInfo.td Fri Oct 17 12:53:06 2008 @@ -452,12 +452,12 @@ def ADJCALLSTACKUP : PseudoInst<(outs), (ins i32imm:$amt1, i32imm:$amt2, pred:$p), "@ ADJCALLSTACKUP $amt1", - [(ARMcallseq_end imm:$amt1, imm:$amt2)]>; + [(ARMcallseq_end timm:$amt1, timm:$amt2)]>; def ADJCALLSTACKDOWN : PseudoInst<(outs), (ins i32imm:$amt, pred:$p), "@ ADJCALLSTACKDOWN $amt", - [(ARMcallseq_start imm:$amt)]>; + [(ARMcallseq_start timm:$amt)]>; } def DWARF_LOC : Modified: llvm/branches/release_24/lib/Target/Alpha/AlphaISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/Alpha/AlphaISelLowering.cpp?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/Alpha/AlphaISelLowering.cpp (original) +++ llvm/branches/release_24/lib/Target/Alpha/AlphaISelLowering.cpp Fri Oct 17 12:53:06 2008 @@ -358,8 +358,7 @@ if (Args.size() > 6) NumBytes = (Args.size() - 6) * 8; - Chain = DAG.getCALLSEQ_START(Chain, - DAG.getConstant(NumBytes, getPointerTy())); + Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(NumBytes, true)); std::vector args_to_use; for (unsigned i = 0, e = Args.size(); i != e; ++i) { @@ -402,10 +401,8 @@ Ops.insert(Ops.end(), args_to_use.begin(), args_to_use.end()); SDValue TheCall = DAG.getNode(AlphaISD::CALL, RetVals, &Ops[0], Ops.size()); Chain = TheCall.getValue(RetTyVT != MVT::isVoid); - Chain = DAG.getCALLSEQ_END(Chain, - DAG.getConstant(NumBytes, getPointerTy()), - DAG.getConstant(0, getPointerTy()), - SDValue()); + Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, true), + DAG.getIntPtrConstant(0, true), SDValue()); SDValue RetVal = TheCall; if (RetTyVT != ActualRetTyVT) { Modified: llvm/branches/release_24/lib/Target/Alpha/AlphaInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/Alpha/AlphaInstrInfo.td?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/Alpha/AlphaInstrInfo.td (original) +++ llvm/branches/release_24/lib/Target/Alpha/AlphaInstrInfo.td Fri Oct 17 12:53:06 2008 @@ -151,10 +151,10 @@ let hasCtrlDep = 1, Defs = [R30], Uses = [R30] in { def ADJUSTSTACKUP : PseudoInstAlpha<(outs), (ins s64imm:$amt), "; ADJUP $amt", - [(callseq_start imm:$amt)], s_pseudo>; + [(callseq_start timm:$amt)], s_pseudo>; def ADJUSTSTACKDOWN : PseudoInstAlpha<(outs), (ins s64imm:$amt1, s64imm:$amt2), "; ADJDOWN $amt1", - [(callseq_end imm:$amt1, imm:$amt2)], s_pseudo>; + [(callseq_end timm:$amt1, timm:$amt2)], s_pseudo>; } def ALTENT : PseudoInstAlpha<(outs), (ins s64imm:$TARGET), "$$$TARGET..ng:\n", [], s_pseudo>; Modified: llvm/branches/release_24/lib/Target/CellSPU/SPUISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/CellSPU/SPUISelLowering.cpp?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/CellSPU/SPUISelLowering.cpp (original) +++ llvm/branches/release_24/lib/Target/CellSPU/SPUISelLowering.cpp Fri Oct 17 12:53:06 2008 @@ -1171,7 +1171,8 @@ // Update number of stack bytes actually used, insert a call sequence start NumStackBytes = (ArgOffset - SPUFrameInfo::minStackSize()); - Chain = DAG.getCALLSEQ_START(Chain, DAG.getConstant(NumStackBytes, PtrVT)); + Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(NumStackBytes, + true)); if (!MemOpChains.empty()) { // Adjust the stack pointer for the stack arguments. @@ -1243,10 +1244,8 @@ &Ops[0], Ops.size()); InFlag = Chain.getValue(1); - Chain = DAG.getCALLSEQ_END(Chain, - DAG.getConstant(NumStackBytes, PtrVT), - DAG.getConstant(0, PtrVT), - InFlag); + Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumStackBytes, true), + DAG.getIntPtrConstant(0, true), InFlag); if (TheCall->getValueType(0) != MVT::Other) InFlag = Chain.getValue(1); Modified: llvm/branches/release_24/lib/Target/CellSPU/SPUInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/CellSPU/SPUInstrInfo.td?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/CellSPU/SPUInstrInfo.td (original) +++ llvm/branches/release_24/lib/Target/CellSPU/SPUInstrInfo.td Fri Oct 17 12:53:06 2008 @@ -24,10 +24,10 @@ let hasCtrlDep = 1, Defs = [R1], Uses = [R1] in { def ADJCALLSTACKDOWN : Pseudo<(outs), (ins u16imm_i32:$amt), "${:comment} ADJCALLSTACKDOWN", - [(callseq_start imm:$amt)]>; + [(callseq_start timm:$amt)]>; def ADJCALLSTACKUP : Pseudo<(outs), (ins u16imm_i32:$amt), "${:comment} ADJCALLSTACKUP", - [(callseq_end imm:$amt)]>; + [(callseq_end timm:$amt)]>; } //===----------------------------------------------------------------------===// Modified: llvm/branches/release_24/lib/Target/IA64/IA64ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/IA64/IA64ISelLowering.cpp?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/IA64/IA64ISelLowering.cpp (original) +++ llvm/branches/release_24/lib/Target/IA64/IA64ISelLowering.cpp Fri Oct 17 12:53:06 2008 @@ -333,7 +333,7 @@ // "stack frame not 16-byte aligned!"); NumBytes = (NumBytes+15) & ~15; - Chain = DAG.getCALLSEQ_START(Chain,DAG.getConstant(NumBytes, getPointerTy())); + Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(NumBytes, true)); SDValue StackPtr; std::vector Stores; @@ -543,10 +543,8 @@ } } - Chain = DAG.getCALLSEQ_END(Chain, - DAG.getConstant(NumBytes, getPointerTy()), - DAG.getConstant(0, getPointerTy()), - SDValue()); + Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, true), + DAG.getIntPtrConstant(0, true), SDValue()); return std::make_pair(RetVal, Chain); } Modified: llvm/branches/release_24/lib/Target/Mips/MipsISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/Mips/MipsISelLowering.cpp?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/Mips/MipsISelLowering.cpp (original) +++ llvm/branches/release_24/lib/Target/Mips/MipsISelLowering.cpp Fri Oct 17 12:53:06 2008 @@ -608,8 +608,7 @@ // Get a count of how many bytes are to be pushed on the stack. unsigned NumBytes = CCInfo.getNextStackOffset(); - Chain = DAG.getCALLSEQ_START(Chain,DAG.getConstant(NumBytes, - getPointerTy())); + Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(NumBytes, true)); // With EABI is it possible to have 16 args on registers. SmallVector, 16> RegsToPass; @@ -715,10 +714,8 @@ InFlag = Chain.getValue(1); // Create the CALLSEQ_END node. - Chain = DAG.getCALLSEQ_END(Chain, - DAG.getConstant(NumBytes, getPointerTy()), - DAG.getConstant(0, getPointerTy()), - InFlag); + Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, true), + DAG.getIntPtrConstant(0, true), InFlag); InFlag = Chain.getValue(1); // Create a stack location to hold GP when PIC is used. This stack Modified: llvm/branches/release_24/lib/Target/Mips/MipsInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/Mips/MipsInstrInfo.td?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/Mips/MipsInstrInfo.td (original) +++ llvm/branches/release_24/lib/Target/Mips/MipsInstrInfo.td Fri Oct 17 12:53:06 2008 @@ -393,10 +393,10 @@ let Defs = [SP], Uses = [SP] in { def ADJCALLSTACKDOWN : MipsPseudo<(outs), (ins uimm16:$amt), "!ADJCALLSTACKDOWN $amt", - [(callseq_start imm:$amt)]>; + [(callseq_start timm:$amt)]>; def ADJCALLSTACKUP : MipsPseudo<(outs), (ins uimm16:$amt1, uimm16:$amt2), "!ADJCALLSTACKUP $amt1", - [(callseq_end imm:$amt1, imm:$amt2)]>; + [(callseq_end timm:$amt1, timm:$amt2)]>; } // Some assembly macros need to avoid pseudoinstructions and assembler Modified: llvm/branches/release_24/lib/Target/PowerPC/PPCISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/PowerPC/PPCISelLowering.cpp?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/PowerPC/PPCISelLowering.cpp (original) +++ llvm/branches/release_24/lib/Target/PowerPC/PPCISelLowering.cpp Fri Oct 17 12:53:06 2008 @@ -2142,8 +2142,7 @@ // Adjust the stack pointer for the new arguments... // These operations are automatically eliminated by the prolog/epilog pass - Chain = DAG.getCALLSEQ_START(Chain, - DAG.getConstant(NumBytes, PtrVT)); + Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(NumBytes, true)); SDValue CallSeqStart = Chain; // Load the return address and frame pointer so it can be move somewhere else @@ -2476,8 +2475,8 @@ SmallVector CallSeqOps; SDVTList CallSeqNodeTys = DAG.getVTList(MVT::Other, MVT::Flag); CallSeqOps.push_back(Chain); - CallSeqOps.push_back(DAG.getIntPtrConstant(NumBytes)); - CallSeqOps.push_back(DAG.getIntPtrConstant(0)); + CallSeqOps.push_back(DAG.getIntPtrConstant(NumBytes, true)); + CallSeqOps.push_back(DAG.getIntPtrConstant(0, true)); if (InFlag.getNode()) CallSeqOps.push_back(InFlag); Chain = DAG.getNode(ISD::CALLSEQ_END, CallSeqNodeTys, &CallSeqOps[0], @@ -2564,9 +2563,8 @@ Chain = DAG.getNode(CallOpc, NodeTys, &Ops[0], Ops.size()); InFlag = Chain.getValue(1); - Chain = DAG.getCALLSEQ_END(Chain, - DAG.getConstant(NumBytes, PtrVT), - DAG.getConstant(BytesCalleePops, PtrVT), + Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(NumBytes, true), + DAG.getIntPtrConstant(BytesCalleePops, true), InFlag); if (TheCall->getValueType(0) != MVT::Other) InFlag = Chain.getValue(1); Modified: llvm/branches/release_24/lib/Target/PowerPC/PPCInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/PowerPC/PPCInstrInfo.td?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/PowerPC/PPCInstrInfo.td (original) +++ llvm/branches/release_24/lib/Target/PowerPC/PPCInstrInfo.td Fri Oct 17 12:53:06 2008 @@ -342,10 +342,10 @@ let Defs = [R1], Uses = [R1] in { def ADJCALLSTACKDOWN : Pseudo<(outs), (ins u16imm:$amt), "${:comment} ADJCALLSTACKDOWN", - [(callseq_start imm:$amt)]>; + [(callseq_start timm:$amt)]>; def ADJCALLSTACKUP : Pseudo<(outs), (ins u16imm:$amt1, u16imm:$amt2), "${:comment} ADJCALLSTACKUP", - [(callseq_end imm:$amt1, imm:$amt2)]>; + [(callseq_end timm:$amt1, timm:$amt2)]>; } def UPDATE_VRSAVE : Pseudo<(outs GPRC:$rD), (ins GPRC:$rS), Modified: llvm/branches/release_24/lib/Target/Sparc/SparcISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/Sparc/SparcISelLowering.cpp?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/Sparc/SparcISelLowering.cpp (original) +++ llvm/branches/release_24/lib/Target/Sparc/SparcISelLowering.cpp Fri Oct 17 12:53:06 2008 @@ -269,7 +269,7 @@ // Keep stack frames 8-byte aligned. ArgsSize = (ArgsSize+7) & ~7; - Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(ArgsSize)); + Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(ArgsSize, true)); SmallVector, 8> RegsToPass; SmallVector MemOpChains; @@ -420,9 +420,8 @@ Chain = DAG.getNode(SPISD::CALL, NodeTys, Ops, InFlag.getNode() ? 3 : 2); InFlag = Chain.getValue(1); - Chain = DAG.getCALLSEQ_END(Chain, - DAG.getConstant(ArgsSize, MVT::i32), - DAG.getConstant(0, MVT::i32), InFlag); + Chain = DAG.getCALLSEQ_END(Chain, DAG.getIntPtrConstant(ArgsSize, true), + DAG.getIntPtrConstant(0, true), InFlag); InFlag = Chain.getValue(1); // Assign locations to each value returned by this call. Modified: llvm/branches/release_24/lib/Target/Sparc/SparcInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/Sparc/SparcInstrInfo.td?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/Sparc/SparcInstrInfo.td (original) +++ llvm/branches/release_24/lib/Target/Sparc/SparcInstrInfo.td Fri Oct 17 12:53:06 2008 @@ -210,10 +210,10 @@ let Defs = [O6], Uses = [O6] in { def ADJCALLSTACKDOWN : Pseudo<(outs), (ins i32imm:$amt), "!ADJCALLSTACKDOWN $amt", - [(callseq_start imm:$amt)]>; + [(callseq_start timm:$amt)]>; def ADJCALLSTACKUP : Pseudo<(outs), (ins i32imm:$amt1, i32imm:$amt2), "!ADJCALLSTACKUP $amt1", - [(callseq_end imm:$amt1, imm:$amt2)]>; + [(callseq_end timm:$amt1, timm:$amt2)]>; } // FpMOVD/FpNEGD/FpABSD - These are lowered to single-precision ops by the Modified: llvm/branches/release_24/lib/Target/TargetSelectionDAG.td URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/TargetSelectionDAG.td?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/TargetSelectionDAG.td (original) +++ llvm/branches/release_24/lib/Target/TargetSelectionDAG.td Fri Oct 17 12:53:06 2008 @@ -240,6 +240,7 @@ def srcvalue; def imm : SDNode<"ISD::Constant" , SDTIntLeaf , [], "ConstantSDNode">; +def timm : SDNode<"ISD::TargetConstant", SDTIntLeaf , [], "ConstantSDNode">; def fpimm : SDNode<"ISD::ConstantFP", SDTFPLeaf , [], "ConstantFPSDNode">; def vt : SDNode<"ISD::VALUETYPE" , SDTOther , [], "VTSDNode">; def bb : SDNode<"ISD::BasicBlock", SDTOther , [], "BasicBlockSDNode">; Modified: llvm/branches/release_24/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/X86/X86ISelLowering.cpp?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/branches/release_24/lib/Target/X86/X86ISelLowering.cpp Fri Oct 17 12:53:06 2008 @@ -1498,7 +1498,7 @@ MF.getInfo()->setTCReturnAddrDelta(FPDiff); } - Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(NumBytes)); + Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(NumBytes, true)); SDValue RetAddrFrIdx; // Load return adress for tail calls. @@ -1714,8 +1714,8 @@ if (IsTailCall) { Ops.push_back(Chain); - Ops.push_back(DAG.getIntPtrConstant(NumBytes)); - Ops.push_back(DAG.getIntPtrConstant(0)); + Ops.push_back(DAG.getIntPtrConstant(NumBytes, true)); + Ops.push_back(DAG.getIntPtrConstant(0, true)); if (InFlag.getNode()) Ops.push_back(InFlag); Chain = DAG.getNode(ISD::CALLSEQ_END, NodeTys, &Ops[0], Ops.size()); @@ -1777,8 +1777,9 @@ // Returns a flag for retval copy to use. Chain = DAG.getCALLSEQ_END(Chain, - DAG.getIntPtrConstant(NumBytes), - DAG.getIntPtrConstant(NumBytesForCalleeToPush), + DAG.getIntPtrConstant(NumBytes, true), + DAG.getIntPtrConstant(NumBytesForCalleeToPush, + true), InFlag); InFlag = Chain.getValue(1); @@ -5112,7 +5113,7 @@ MVT IntPtr = getPointerTy(); MVT SPTy = Subtarget->is64Bit() ? MVT::i64 : MVT::i32; - Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(0)); + Chain = DAG.getCALLSEQ_START(Chain, DAG.getIntPtrConstant(0, true)); Chain = DAG.getCopyToReg(Chain, X86::EAX, Size, Flag); Flag = Chain.getValue(1); @@ -5127,8 +5128,8 @@ Flag = Chain.getValue(1); Chain = DAG.getCALLSEQ_END(Chain, - DAG.getIntPtrConstant(0), - DAG.getIntPtrConstant(0), + DAG.getIntPtrConstant(0, true), + DAG.getIntPtrConstant(0, true), Flag); Chain = DAG.getCopyFromReg(Chain, X86StackPtr, SPTy).getValue(1); Modified: llvm/branches/release_24/lib/Target/X86/X86Instr64bit.td URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/X86/X86Instr64bit.td?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/X86/X86Instr64bit.td (original) +++ llvm/branches/release_24/lib/Target/X86/X86Instr64bit.td Fri Oct 17 12:53:06 2008 @@ -94,11 +94,11 @@ let Defs = [RSP, EFLAGS], Uses = [RSP] in { def ADJCALLSTACKDOWN64 : I<0, Pseudo, (outs), (ins i32imm:$amt), "#ADJCALLSTACKDOWN", - [(X86callseq_start imm:$amt)]>, + [(X86callseq_start timm:$amt)]>, Requires<[In64BitMode]>; def ADJCALLSTACKUP64 : I<0, Pseudo, (outs), (ins i32imm:$amt1, i32imm:$amt2), "#ADJCALLSTACKUP", - [(X86callseq_end imm:$amt1, imm:$amt2)]>, + [(X86callseq_end timm:$amt1, timm:$amt2)]>, Requires<[In64BitMode]>; } Modified: llvm/branches/release_24/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/X86/X86InstrInfo.td?rev=57700&r1=57699&r2=57700&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/branches/release_24/lib/Target/X86/X86InstrInfo.td Fri Oct 17 12:53:06 2008 @@ -345,11 +345,11 @@ let Defs = [ESP, EFLAGS], Uses = [ESP] in { def ADJCALLSTACKDOWN32 : I<0, Pseudo, (outs), (ins i32imm:$amt), "#ADJCALLSTACKDOWN", - [(X86callseq_start imm:$amt)]>, + [(X86callseq_start timm:$amt)]>, Requires<[In32BitMode]>; def ADJCALLSTACKUP32 : I<0, Pseudo, (outs), (ins i32imm:$amt1, i32imm:$amt2), "#ADJCALLSTACKUP", - [(X86callseq_end imm:$amt1, imm:$amt2)]>, + [(X86callseq_end timm:$amt1, timm:$amt2)]>, Requires<[In32BitMode]>; } From tonic at nondot.org Fri Oct 17 12:55:20 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 17:55:20 -0000 Subject: [llvm-commits] [llvm] r57701 - in /llvm/branches/release_24/test/FrontendC: Atomics-no64bit.c Atomics.c Message-ID: <200810171755.m9HHtKpF014967@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 12:55:20 2008 New Revision: 57701 URL: http://llvm.org/viewvc/llvm-project?rev=57701&view=rev Log: Merge from mainline Modified: llvm/branches/release_24/test/FrontendC/Atomics-no64bit.c llvm/branches/release_24/test/FrontendC/Atomics.c Modified: llvm/branches/release_24/test/FrontendC/Atomics-no64bit.c URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/test/FrontendC/Atomics-no64bit.c?rev=57701&r1=57700&r2=57701&view=diff ============================================================================== --- llvm/branches/release_24/test/FrontendC/Atomics-no64bit.c (original) +++ llvm/branches/release_24/test/FrontendC/Atomics-no64bit.c Fri Oct 17 12:55:20 2008 @@ -1,10 +1,10 @@ // Test frontend handling of __sync builtins. // Modified from a gcc testcase. -// RUN: %llvmgcc -S %s -o - | grep atomic | count 192 +// RUN: %llvmgcc -S %s -o - | grep atomic | count 150 // RUN: %llvmgcc -S %s -o - | grep p0i8 | count 50 // RUN: %llvmgcc -S %s -o - | grep p0i16 | count 50 -// RUN: %llvmgcc -S %s -o - | grep p0i32 | count 92 -// RUN: %llvmgcc -S %s -o - | grep volatile | count 8 +// RUN: %llvmgcc -S %s -o - | grep p0i32 | count 50 +// RUN: %llvmgcc -S %s -o - | grep volatile | count 6 // Currently this is implemented only for Alpha, X86, PowerPC. // Add your target here if it doesn't work. @@ -17,8 +17,6 @@ unsigned short us; signed int si; unsigned int ui; -signed long sl; -unsigned long ul; void test_op_ignore (void) { @@ -28,8 +26,6 @@ (void) __sync_fetch_and_add (&us, 1); (void) __sync_fetch_and_add (&si, 1); (void) __sync_fetch_and_add (&ui, 1); - (void) __sync_fetch_and_add (&sl, 1); - (void) __sync_fetch_and_add (&ul, 1); (void) __sync_fetch_and_sub (&sc, 1); (void) __sync_fetch_and_sub (&uc, 1); @@ -37,8 +33,6 @@ (void) __sync_fetch_and_sub (&us, 1); (void) __sync_fetch_and_sub (&si, 1); (void) __sync_fetch_and_sub (&ui, 1); - (void) __sync_fetch_and_sub (&sl, 1); - (void) __sync_fetch_and_sub (&ul, 1); (void) __sync_fetch_and_or (&sc, 1); (void) __sync_fetch_and_or (&uc, 1); @@ -46,8 +40,6 @@ (void) __sync_fetch_and_or (&us, 1); (void) __sync_fetch_and_or (&si, 1); (void) __sync_fetch_and_or (&ui, 1); - (void) __sync_fetch_and_or (&sl, 1); - (void) __sync_fetch_and_or (&ul, 1); (void) __sync_fetch_and_xor (&sc, 1); (void) __sync_fetch_and_xor (&uc, 1); @@ -55,8 +47,6 @@ (void) __sync_fetch_and_xor (&us, 1); (void) __sync_fetch_and_xor (&si, 1); (void) __sync_fetch_and_xor (&ui, 1); - (void) __sync_fetch_and_xor (&sl, 1); - (void) __sync_fetch_and_xor (&ul, 1); (void) __sync_fetch_and_and (&sc, 1); (void) __sync_fetch_and_and (&uc, 1); @@ -64,8 +54,6 @@ (void) __sync_fetch_and_and (&us, 1); (void) __sync_fetch_and_and (&si, 1); (void) __sync_fetch_and_and (&ui, 1); - (void) __sync_fetch_and_and (&sl, 1); - (void) __sync_fetch_and_and (&ul, 1); (void) __sync_fetch_and_nand (&sc, 1); (void) __sync_fetch_and_nand (&uc, 1); @@ -73,8 +61,6 @@ (void) __sync_fetch_and_nand (&us, 1); (void) __sync_fetch_and_nand (&si, 1); (void) __sync_fetch_and_nand (&ui, 1); - (void) __sync_fetch_and_nand (&sl, 1); - (void) __sync_fetch_and_nand (&ul, 1); } void test_fetch_and_op (void) @@ -85,8 +71,6 @@ us = __sync_fetch_and_add (&us, 11); si = __sync_fetch_and_add (&si, 11); ui = __sync_fetch_and_add (&ui, 11); - sl = __sync_fetch_and_add (&sl, 11); - ul = __sync_fetch_and_add (&ul, 11); sc = __sync_fetch_and_sub (&sc, 11); uc = __sync_fetch_and_sub (&uc, 11); @@ -94,8 +78,6 @@ us = __sync_fetch_and_sub (&us, 11); si = __sync_fetch_and_sub (&si, 11); ui = __sync_fetch_and_sub (&ui, 11); - sl = __sync_fetch_and_sub (&sl, 11); - ul = __sync_fetch_and_sub (&ul, 11); sc = __sync_fetch_and_or (&sc, 11); uc = __sync_fetch_and_or (&uc, 11); @@ -103,8 +85,6 @@ us = __sync_fetch_and_or (&us, 11); si = __sync_fetch_and_or (&si, 11); ui = __sync_fetch_and_or (&ui, 11); - sl = __sync_fetch_and_or (&sl, 11); - ul = __sync_fetch_and_or (&ul, 11); sc = __sync_fetch_and_xor (&sc, 11); uc = __sync_fetch_and_xor (&uc, 11); @@ -112,8 +92,6 @@ us = __sync_fetch_and_xor (&us, 11); si = __sync_fetch_and_xor (&si, 11); ui = __sync_fetch_and_xor (&ui, 11); - sl = __sync_fetch_and_xor (&sl, 11); - ul = __sync_fetch_and_xor (&ul, 11); sc = __sync_fetch_and_and (&sc, 11); uc = __sync_fetch_and_and (&uc, 11); @@ -121,8 +99,6 @@ us = __sync_fetch_and_and (&us, 11); si = __sync_fetch_and_and (&si, 11); ui = __sync_fetch_and_and (&ui, 11); - sl = __sync_fetch_and_and (&sl, 11); - ul = __sync_fetch_and_and (&ul, 11); sc = __sync_fetch_and_nand (&sc, 11); uc = __sync_fetch_and_nand (&uc, 11); @@ -130,8 +106,6 @@ us = __sync_fetch_and_nand (&us, 11); si = __sync_fetch_and_nand (&si, 11); ui = __sync_fetch_and_nand (&ui, 11); - sl = __sync_fetch_and_nand (&sl, 11); - ul = __sync_fetch_and_nand (&ul, 11); } void test_op_and_fetch (void) @@ -142,8 +116,6 @@ us = __sync_add_and_fetch (&us, uc); si = __sync_add_and_fetch (&si, uc); ui = __sync_add_and_fetch (&ui, uc); - sl = __sync_add_and_fetch (&sl, uc); - ul = __sync_add_and_fetch (&ul, uc); sc = __sync_sub_and_fetch (&sc, uc); uc = __sync_sub_and_fetch (&uc, uc); @@ -151,8 +123,6 @@ us = __sync_sub_and_fetch (&us, uc); si = __sync_sub_and_fetch (&si, uc); ui = __sync_sub_and_fetch (&ui, uc); - sl = __sync_sub_and_fetch (&sl, uc); - ul = __sync_sub_and_fetch (&ul, uc); sc = __sync_or_and_fetch (&sc, uc); uc = __sync_or_and_fetch (&uc, uc); @@ -160,8 +130,6 @@ us = __sync_or_and_fetch (&us, uc); si = __sync_or_and_fetch (&si, uc); ui = __sync_or_and_fetch (&ui, uc); - sl = __sync_or_and_fetch (&sl, uc); - ul = __sync_or_and_fetch (&ul, uc); sc = __sync_xor_and_fetch (&sc, uc); uc = __sync_xor_and_fetch (&uc, uc); @@ -169,8 +137,6 @@ us = __sync_xor_and_fetch (&us, uc); si = __sync_xor_and_fetch (&si, uc); ui = __sync_xor_and_fetch (&ui, uc); - sl = __sync_xor_and_fetch (&sl, uc); - ul = __sync_xor_and_fetch (&ul, uc); sc = __sync_and_and_fetch (&sc, uc); uc = __sync_and_and_fetch (&uc, uc); @@ -178,8 +144,6 @@ us = __sync_and_and_fetch (&us, uc); si = __sync_and_and_fetch (&si, uc); ui = __sync_and_and_fetch (&ui, uc); - sl = __sync_and_and_fetch (&sl, uc); - ul = __sync_and_and_fetch (&ul, uc); sc = __sync_nand_and_fetch (&sc, uc); uc = __sync_nand_and_fetch (&uc, uc); @@ -187,8 +151,6 @@ us = __sync_nand_and_fetch (&us, uc); si = __sync_nand_and_fetch (&si, uc); ui = __sync_nand_and_fetch (&ui, uc); - sl = __sync_nand_and_fetch (&sl, uc); - ul = __sync_nand_and_fetch (&ul, uc); } void test_compare_and_swap (void) @@ -199,8 +161,6 @@ us = __sync_val_compare_and_swap (&us, uc, sc); si = __sync_val_compare_and_swap (&si, uc, sc); ui = __sync_val_compare_and_swap (&ui, uc, sc); - sl = __sync_val_compare_and_swap (&sl, uc, sc); - ul = __sync_val_compare_and_swap (&ul, uc, sc); ui = __sync_bool_compare_and_swap (&sc, uc, sc); ui = __sync_bool_compare_and_swap (&uc, uc, sc); @@ -208,8 +168,6 @@ ui = __sync_bool_compare_and_swap (&us, uc, sc); ui = __sync_bool_compare_and_swap (&si, uc, sc); ui = __sync_bool_compare_and_swap (&ui, uc, sc); - ui = __sync_bool_compare_and_swap (&sl, uc, sc); - ui = __sync_bool_compare_and_swap (&ul, uc, sc); } void test_lock (void) @@ -220,8 +178,6 @@ us = __sync_lock_test_and_set (&us, 1); si = __sync_lock_test_and_set (&si, 1); ui = __sync_lock_test_and_set (&ui, 1); - sl = __sync_lock_test_and_set (&sl, 1); - ul = __sync_lock_test_and_set (&ul, 1); __sync_synchronize (); @@ -231,6 +187,4 @@ __sync_lock_release (&us); __sync_lock_release (&si); __sync_lock_release (&ui); - __sync_lock_release (&sl); - __sync_lock_release (&ul); } Modified: llvm/branches/release_24/test/FrontendC/Atomics.c URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/test/FrontendC/Atomics.c?rev=57701&r1=57700&r2=57701&view=diff ============================================================================== --- llvm/branches/release_24/test/FrontendC/Atomics.c (original) +++ llvm/branches/release_24/test/FrontendC/Atomics.c Fri Oct 17 12:55:20 2008 @@ -1,10 +1,10 @@ // Test frontend handling of __sync builtins. // Modified from a gcc testcase. -// RUN: %llvmgcc -S %s -o - | grep atomic | count 242 +// RUN: %llvmgcc -S %s -o - | grep atomic | count 200 // RUN: %llvmgcc -S %s -o - | grep p0i8 | count 50 // RUN: %llvmgcc -S %s -o - | grep p0i16 | count 50 -// RUN: %llvmgcc -S %s -o - | grep p0i32 | count 92 -// RUN: %llvmgcc -S %s -o - | grep volatile | count 10 +// RUN: %llvmgcc -S %s -o - | grep p0i32 | count 50 +// RUN: %llvmgcc -S %s -o - | grep volatile | count 8 // Currently this is implemented only for Alpha, X86, PowerPC. // Add your target here if it doesn't work. @@ -17,8 +17,6 @@ unsigned short us; signed int si; unsigned int ui; -signed long sl; -unsigned long ul; signed long long sll; unsigned long long ull; @@ -30,8 +28,6 @@ (void) __sync_fetch_and_add (&us, 1); (void) __sync_fetch_and_add (&si, 1); (void) __sync_fetch_and_add (&ui, 1); - (void) __sync_fetch_and_add (&sl, 1); - (void) __sync_fetch_and_add (&ul, 1); (void) __sync_fetch_and_add (&sll, 1); (void) __sync_fetch_and_add (&ull, 1); @@ -41,8 +37,6 @@ (void) __sync_fetch_and_sub (&us, 1); (void) __sync_fetch_and_sub (&si, 1); (void) __sync_fetch_and_sub (&ui, 1); - (void) __sync_fetch_and_sub (&sl, 1); - (void) __sync_fetch_and_sub (&ul, 1); (void) __sync_fetch_and_sub (&sll, 1); (void) __sync_fetch_and_sub (&ull, 1); @@ -52,8 +46,6 @@ (void) __sync_fetch_and_or (&us, 1); (void) __sync_fetch_and_or (&si, 1); (void) __sync_fetch_and_or (&ui, 1); - (void) __sync_fetch_and_or (&sl, 1); - (void) __sync_fetch_and_or (&ul, 1); (void) __sync_fetch_and_or (&sll, 1); (void) __sync_fetch_and_or (&ull, 1); @@ -63,8 +55,6 @@ (void) __sync_fetch_and_xor (&us, 1); (void) __sync_fetch_and_xor (&si, 1); (void) __sync_fetch_and_xor (&ui, 1); - (void) __sync_fetch_and_xor (&sl, 1); - (void) __sync_fetch_and_xor (&ul, 1); (void) __sync_fetch_and_xor (&sll, 1); (void) __sync_fetch_and_xor (&ull, 1); @@ -74,8 +64,6 @@ (void) __sync_fetch_and_and (&us, 1); (void) __sync_fetch_and_and (&si, 1); (void) __sync_fetch_and_and (&ui, 1); - (void) __sync_fetch_and_and (&sl, 1); - (void) __sync_fetch_and_and (&ul, 1); (void) __sync_fetch_and_and (&sll, 1); (void) __sync_fetch_and_and (&ull, 1); @@ -85,8 +73,6 @@ (void) __sync_fetch_and_nand (&us, 1); (void) __sync_fetch_and_nand (&si, 1); (void) __sync_fetch_and_nand (&ui, 1); - (void) __sync_fetch_and_nand (&sl, 1); - (void) __sync_fetch_and_nand (&ul, 1); (void) __sync_fetch_and_nand (&sll, 1); (void) __sync_fetch_and_nand (&ull, 1); } @@ -99,8 +85,6 @@ us = __sync_fetch_and_add (&us, 11); si = __sync_fetch_and_add (&si, 11); ui = __sync_fetch_and_add (&ui, 11); - sl = __sync_fetch_and_add (&sl, 11); - ul = __sync_fetch_and_add (&ul, 11); sll = __sync_fetch_and_add (&sll, 11); ull = __sync_fetch_and_add (&ull, 11); @@ -110,8 +94,6 @@ us = __sync_fetch_and_sub (&us, 11); si = __sync_fetch_and_sub (&si, 11); ui = __sync_fetch_and_sub (&ui, 11); - sl = __sync_fetch_and_sub (&sl, 11); - ul = __sync_fetch_and_sub (&ul, 11); sll = __sync_fetch_and_sub (&sll, 11); ull = __sync_fetch_and_sub (&ull, 11); @@ -121,8 +103,6 @@ us = __sync_fetch_and_or (&us, 11); si = __sync_fetch_and_or (&si, 11); ui = __sync_fetch_and_or (&ui, 11); - sl = __sync_fetch_and_or (&sl, 11); - ul = __sync_fetch_and_or (&ul, 11); sll = __sync_fetch_and_or (&sll, 11); ull = __sync_fetch_and_or (&ull, 11); @@ -132,8 +112,6 @@ us = __sync_fetch_and_xor (&us, 11); si = __sync_fetch_and_xor (&si, 11); ui = __sync_fetch_and_xor (&ui, 11); - sl = __sync_fetch_and_xor (&sl, 11); - ul = __sync_fetch_and_xor (&ul, 11); sll = __sync_fetch_and_xor (&sll, 11); ull = __sync_fetch_and_xor (&ull, 11); @@ -143,8 +121,6 @@ us = __sync_fetch_and_and (&us, 11); si = __sync_fetch_and_and (&si, 11); ui = __sync_fetch_and_and (&ui, 11); - sl = __sync_fetch_and_and (&sl, 11); - ul = __sync_fetch_and_and (&ul, 11); sll = __sync_fetch_and_and (&sll, 11); ull = __sync_fetch_and_and (&ull, 11); @@ -154,8 +130,6 @@ us = __sync_fetch_and_nand (&us, 11); si = __sync_fetch_and_nand (&si, 11); ui = __sync_fetch_and_nand (&ui, 11); - sl = __sync_fetch_and_nand (&sl, 11); - ul = __sync_fetch_and_nand (&ul, 11); sll = __sync_fetch_and_nand (&sll, 11); ull = __sync_fetch_and_nand (&ull, 11); } @@ -168,8 +142,6 @@ us = __sync_add_and_fetch (&us, uc); si = __sync_add_and_fetch (&si, uc); ui = __sync_add_and_fetch (&ui, uc); - sl = __sync_add_and_fetch (&sl, uc); - ul = __sync_add_and_fetch (&ul, uc); sll = __sync_add_and_fetch (&sll, uc); ull = __sync_add_and_fetch (&ull, uc); @@ -179,8 +151,6 @@ us = __sync_sub_and_fetch (&us, uc); si = __sync_sub_and_fetch (&si, uc); ui = __sync_sub_and_fetch (&ui, uc); - sl = __sync_sub_and_fetch (&sl, uc); - ul = __sync_sub_and_fetch (&ul, uc); sll = __sync_sub_and_fetch (&sll, uc); ull = __sync_sub_and_fetch (&ull, uc); @@ -190,8 +160,6 @@ us = __sync_or_and_fetch (&us, uc); si = __sync_or_and_fetch (&si, uc); ui = __sync_or_and_fetch (&ui, uc); - sl = __sync_or_and_fetch (&sl, uc); - ul = __sync_or_and_fetch (&ul, uc); sll = __sync_or_and_fetch (&sll, uc); ull = __sync_or_and_fetch (&ull, uc); @@ -201,8 +169,6 @@ us = __sync_xor_and_fetch (&us, uc); si = __sync_xor_and_fetch (&si, uc); ui = __sync_xor_and_fetch (&ui, uc); - sl = __sync_xor_and_fetch (&sl, uc); - ul = __sync_xor_and_fetch (&ul, uc); sll = __sync_xor_and_fetch (&sll, uc); ull = __sync_xor_and_fetch (&ull, uc); @@ -212,8 +178,6 @@ us = __sync_and_and_fetch (&us, uc); si = __sync_and_and_fetch (&si, uc); ui = __sync_and_and_fetch (&ui, uc); - sl = __sync_and_and_fetch (&sl, uc); - ul = __sync_and_and_fetch (&ul, uc); sll = __sync_and_and_fetch (&sll, uc); ull = __sync_and_and_fetch (&ull, uc); @@ -223,8 +187,6 @@ us = __sync_nand_and_fetch (&us, uc); si = __sync_nand_and_fetch (&si, uc); ui = __sync_nand_and_fetch (&ui, uc); - sl = __sync_nand_and_fetch (&sl, uc); - ul = __sync_nand_and_fetch (&ul, uc); sll = __sync_nand_and_fetch (&sll, uc); ull = __sync_nand_and_fetch (&ull, uc); } @@ -237,8 +199,6 @@ us = __sync_val_compare_and_swap (&us, uc, sc); si = __sync_val_compare_and_swap (&si, uc, sc); ui = __sync_val_compare_and_swap (&ui, uc, sc); - sl = __sync_val_compare_and_swap (&sl, uc, sc); - ul = __sync_val_compare_and_swap (&ul, uc, sc); sll = __sync_val_compare_and_swap (&sll, uc, sc); ull = __sync_val_compare_and_swap (&ull, uc, sc); @@ -248,8 +208,6 @@ ui = __sync_bool_compare_and_swap (&us, uc, sc); ui = __sync_bool_compare_and_swap (&si, uc, sc); ui = __sync_bool_compare_and_swap (&ui, uc, sc); - ui = __sync_bool_compare_and_swap (&sl, uc, sc); - ui = __sync_bool_compare_and_swap (&ul, uc, sc); ui = __sync_bool_compare_and_swap (&sll, uc, sc); ui = __sync_bool_compare_and_swap (&ull, uc, sc); } @@ -262,8 +220,6 @@ us = __sync_lock_test_and_set (&us, 1); si = __sync_lock_test_and_set (&si, 1); ui = __sync_lock_test_and_set (&ui, 1); - sl = __sync_lock_test_and_set (&sl, 1); - ul = __sync_lock_test_and_set (&ul, 1); sll = __sync_lock_test_and_set (&sll, 1); ull = __sync_lock_test_and_set (&ull, 1); @@ -275,8 +231,6 @@ __sync_lock_release (&us); __sync_lock_release (&si); __sync_lock_release (&ui); - __sync_lock_release (&sl); - __sync_lock_release (&ul); __sync_lock_release (&sll); __sync_lock_release (&ull); } From tonic at nondot.org Fri Oct 17 12:56:47 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 17:56:47 -0000 Subject: [llvm-commits] [llvm] r57702 - /llvm/branches/release_24/docs/LangRef.html Message-ID: <200810171756.m9HHulhs015055@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 12:56:46 2008 New Revision: 57702 URL: http://llvm.org/viewvc/llvm-project?rev=57702&view=rev Log: Merge from mainline. Improve the description on the getelementptr instruction. It should now better define what the instruction does. This also makes it clear that getelementptr can index into a vector type. Modified: llvm/branches/release_24/docs/LangRef.html Modified: llvm/branches/release_24/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/docs/LangRef.html?rev=57702&r1=57701&r2=57702&view=diff ============================================================================== --- llvm/branches/release_24/docs/LangRef.html (original) +++ llvm/branches/release_24/docs/LangRef.html Fri Oct 17 12:56:46 2008 @@ -3309,25 +3309,34 @@
                                                                                Syntax:
                                                                                -  <result> = getelementptr <ty>* <ptrval>{, <ty> <idx>}*
                                                                                +  <result> = getelementptr <pty>* <ptrval>{, <ty> <idx>}*
                                                                                 
                                                                                Overview:

                                                                                The 'getelementptr' instruction is used to get the address of a -subelement of an aggregate data structure.

                                                                                +subelement of an aggregate data structure. It performs address calculation only +and does not access memory.

                                                                                Arguments:
                                                                                -

                                                                                This instruction takes a list of integer operands that indicate what -elements of the aggregate object to index to. The actual types of the arguments -provided depend on the type of the first pointer argument. The -'getelementptr' instruction is used to index down through the type -levels of a structure or to a specific index in an array. When indexing into a -structure, only i32 integer constants are allowed. When indexing -into an array or pointer, only integers of 32 or 64 bits are allowed; 32-bit -values will be sign extended to 64-bits if required.

                                                                                +

                                                                                The first argument is always a pointer, and forms the basis of the +calculation. The remaining arguments are indices, that indicate which of the +elements of the aggregate object are indexed. The interpretation of each index +is dependent on the type being indexed into. The first index always indexes the +pointer value given as the first argument, the second index indexes a value of +the type pointed to (not necessarily the value directly pointed to, since the +first index can be non-zero), etc. The first type indexed into must be a pointer +value, subsequent types can be arrays, vectors and structs. Note that subsequent +types being indexed into can never be pointers, since that would require loading +the pointer before continuing calculation.

                                                                                + +

                                                                                The type of each index argument depends on the type it is indexing into. +When indexing into a (packed) structure, only i32 integer +constants are allowed. When indexing into an array, pointer or vector, +only integers of 32 or 64 bits are allowed (also non-constants). 32-bit values +will be sign extended to 64-bits if required.

                                                                                For example, let's consider a C code fragment and how it gets compiled to LLVM:

                                                                                @@ -3368,13 +3377,6 @@
                                                                                Semantics:
                                                                                -

                                                                                The index types specified for the 'getelementptr' instruction depend -on the pointer type that is being indexed into. Pointer -and array types can use a 32-bit or 64-bit -integer type but the value will always be sign extended -to 64-bits. Structure and packed -structure types require i32 constants.

                                                                                -

                                                                                In the example above, the first index is indexing into the '%ST*' type, which is a pointer, yielding a '%ST' = '{ i32, double, %RT }' type, a structure. The second index indexes into the third element of @@ -3414,7 +3416,11 @@

                                                                                     ; yields [12 x i8]*:aptr
                                                                                -    %aptr = getelementptr {i32, [12 x i8]}* %sptr, i64 0, i32 1
                                                                                +    %aptr = getelementptr {i32, [12 x i8]}* %saptr, i64 0, i32 1
                                                                                +    ; yields i8*:vptr
                                                                                +    %vptr = getelementptr {i32, <2 x i8>}* %svptr, i64 0, i32 1, i32 1
                                                                                +    ; yields i8*:eptr
                                                                                +    %eptr = getelementptr [12 x i8]* %aptr, i64 0, i32 1
                                                                                 
                                                                                From tonic at nondot.org Fri Oct 17 12:58:40 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 17:58:40 -0000 Subject: [llvm-commits] [llvm] r57703 - /llvm/branches/release_24/lib/VMCore/AsmWriter.cpp Message-ID: <200810171758.m9HHweAh015195@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 12:58:39 2008 New Revision: 57703 URL: http://llvm.org/viewvc/llvm-project?rev=57703&view=rev Log: Merge from mainline. Modified: llvm/branches/release_24/lib/VMCore/AsmWriter.cpp Modified: llvm/branches/release_24/lib/VMCore/AsmWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/VMCore/AsmWriter.cpp?rev=57703&r1=57702&r2=57703&view=diff ============================================================================== --- llvm/branches/release_24/lib/VMCore/AsmWriter.cpp (original) +++ llvm/branches/release_24/lib/VMCore/AsmWriter.cpp Fri Oct 17 12:58:39 2008 @@ -1666,16 +1666,16 @@ // only do this if the first argument is a pointer to a nonvararg function, // and if the return type is not a pointer to a function. // + Out << ' '; if (!FTy->isVarArg() && (!isa(RetTy) || !isa(cast(RetTy)->getElementType()))) { - Out << ' '; printType(RetTy); + printType(RetTy); + Out << ' '; writeOperand(Operand, false); } else { - Out << ' '; writeOperand(Operand, true); } - Out << '('; for (unsigned op = 3, Eop = I.getNumOperands(); op < Eop; ++op) { if (op > 3) From sabre at nondot.org Fri Oct 17 12:59:52 2008 From: sabre at nondot.org (Chris Lattner) Date: Fri, 17 Oct 2008 17:59:52 -0000 Subject: [llvm-commits] [llvm] r57704 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/2008-10-17-Asm64bitRConstraint.ll Message-ID: <200810171759.m9HHxqdX015276@zion.cs.uiuc.edu> Author: lattner Date: Fri Oct 17 12:59:52 2008 New Revision: 57704 URL: http://llvm.org/viewvc/llvm-project?rev=57704&view=rev Log: Fix a bug where the x86 backend would reject 64-bit r constraints when in 32-bit mode instead of assigning a register pair. This has nothing to do with PR2356, but I happened to notice it while working on it. Added: llvm/trunk/test/CodeGen/X86/2008-10-17-Asm64bitRConstraint.ll Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=57704&r1=57703&r2=57704&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri Oct 17 12:59:52 2008 @@ -7511,7 +7511,7 @@ case 'l': // INDEX_REGS if (VT == MVT::i64 && Subtarget->is64Bit()) return std::make_pair(0U, X86::GR64RegisterClass); - if (VT == MVT::i32) + if (VT == MVT::i32 || VT == MVT::i64) return std::make_pair(0U, X86::GR32RegisterClass); else if (VT == MVT::i16) return std::make_pair(0U, X86::GR16RegisterClass); Added: llvm/trunk/test/CodeGen/X86/2008-10-17-Asm64bitRConstraint.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-10-17-Asm64bitRConstraint.ll?rev=57704&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2008-10-17-Asm64bitRConstraint.ll (added) +++ llvm/trunk/test/CodeGen/X86/2008-10-17-Asm64bitRConstraint.ll Fri Oct 17 12:59:52 2008 @@ -0,0 +1,9 @@ +; RUN: llvm-as < %s | llc -march=x86 +; RUN: llvm-as < %s | llc -march=x86-64 + +define void @test(i64 %x) nounwind { +entry: + tail call void asm sideeffect "ASM: $0", "r,~{dirflag},~{fpsr},~{flags}"(i64 %x) nounwind + ret void +} + From tonic at nondot.org Fri Oct 17 13:01:35 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 18:01:35 -0000 Subject: [llvm-commits] [llvm] r57705 - /llvm/branches/release_24/lib/VMCore/IntrinsicInst.cpp Message-ID: <200810171801.m9HI1ZWc015422@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 13:01:34 2008 New Revision: 57705 URL: http://llvm.org/viewvc/llvm-project?rev=57705&view=rev Log: Merge from mainline. Unbreak DbgStopPointInst::getFileName(). Modified: llvm/branches/release_24/lib/VMCore/IntrinsicInst.cpp Modified: llvm/branches/release_24/lib/VMCore/IntrinsicInst.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/VMCore/IntrinsicInst.cpp?rev=57705&r1=57704&r2=57705&view=diff ============================================================================== --- llvm/branches/release_24/lib/VMCore/IntrinsicInst.cpp (original) +++ llvm/branches/release_24/lib/VMCore/IntrinsicInst.cpp Fri Oct 17 13:01:34 2008 @@ -64,7 +64,7 @@ GlobalVariable *GV = cast(getContext()); if (!GV->hasInitializer()) return NULL; ConstantStruct *CS = cast(GV->getInitializer()); - return CS->getOperand(4); + return CS->getOperand(3); } Value *DbgStopPointInst::getDirectory() const { From tonic at nondot.org Fri Oct 17 13:02:30 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 18:02:30 -0000 Subject: [llvm-commits] [llvm] r57706 - in /llvm/branches/release_24: lib/CodeGen/SimpleRegisterCoalescing.cpp test/CodeGen/X86/2008-10-13-CoalescerBug.ll Message-ID: <200810171802.m9HI2U1s015480@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 13:02:30 2008 New Revision: 57706 URL: http://llvm.org/viewvc/llvm-project?rev=57706&view=rev Log: Merge from mainline. Also update sub-register intervals after a trivial computation is rematt'ed for a copy instruction. PR2775. Added: llvm/branches/release_24/test/CodeGen/X86/2008-10-13-CoalescerBug.ll - copied unchanged from r57458, llvm/trunk/test/CodeGen/X86/2008-10-13-CoalescerBug.ll Modified: llvm/branches/release_24/lib/CodeGen/SimpleRegisterCoalescing.cpp Modified: llvm/branches/release_24/lib/CodeGen/SimpleRegisterCoalescing.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=57706&r1=57705&r2=57706&view=diff ============================================================================== --- llvm/branches/release_24/lib/CodeGen/SimpleRegisterCoalescing.cpp (original) +++ llvm/branches/release_24/lib/CodeGen/SimpleRegisterCoalescing.cpp Fri Oct 17 13:02:30 2008 @@ -456,6 +456,16 @@ unsigned DefIdx = li_->getDefIndex(CopyIdx); const LiveRange *DLR= li_->getInterval(DstReg).getLiveRangeContaining(DefIdx); DLR->valno->copy = NULL; + // Don't forget to update sub-register intervals. + if (TargetRegisterInfo::isPhysicalRegister(DstReg)) { + for (const unsigned* SR = tri_->getSubRegisters(DstReg); *SR; ++SR) { + if (!li_->hasInterval(*SR)) + continue; + DLR = li_->getInterval(*SR).getLiveRangeContaining(DefIdx); + if (DLR && DLR->valno->copy == CopyMI) + DLR->valno->copy = NULL; + } + } MachineBasicBlock::iterator MII = CopyMI; MachineBasicBlock *MBB = CopyMI->getParent(); From tonic at nondot.org Fri Oct 17 13:05:18 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 18:05:18 -0000 Subject: [llvm-commits] [llvm] r57707 - /llvm/branches/release_24/lib/Linker/LinkModules.cpp Message-ID: <200810171805.m9HI5IWD015709@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 13:05:18 2008 New Revision: 57707 URL: http://llvm.org/viewvc/llvm-project?rev=57707&view=rev Log: Merge from mainline. Properly handle linking of strong alias with weak function, this fixes PR2883 Modified: llvm/branches/release_24/lib/Linker/LinkModules.cpp Modified: llvm/branches/release_24/lib/Linker/LinkModules.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Linker/LinkModules.cpp?rev=57707&r1=57706&r2=57707&view=diff ============================================================================== --- llvm/branches/release_24/lib/Linker/LinkModules.cpp (original) +++ llvm/branches/release_24/lib/Linker/LinkModules.cpp Fri Oct 17 13:05:18 2008 @@ -984,7 +984,7 @@ // The only valid mappings are: // - SF is external declaration, which is effectively a no-op. // - SF is weak, when we just need to throw SF out. - if (!SF->isDeclaration()) + if (!SF->isDeclaration() && !SF->mayBeOverridden()) return Error(Err, "Function-Alias Collision on '" + SF->getName() + "': symbol multiple defined"); } From tonic at nondot.org Fri Oct 17 13:10:13 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 18:10:13 -0000 Subject: [llvm-commits] [llvm] r57708 - in /llvm/branches/release_24: lib/CodeGen/VirtRegMap.cpp test/CodeGen/X86/2008-10-16-SpillerBug.ll Message-ID: <200810171810.m9HIAD1o015969@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 13:10:12 2008 New Revision: 57708 URL: http://llvm.org/viewvc/llvm-project?rev=57708&view=rev Log: Merge from mainline.. Added: llvm/branches/release_24/test/CodeGen/X86/2008-10-16-SpillerBug.ll - copied unchanged from r57673, llvm/trunk/test/CodeGen/X86/2008-10-16-SpillerBug.ll Modified: llvm/branches/release_24/lib/CodeGen/VirtRegMap.cpp Modified: llvm/branches/release_24/lib/CodeGen/VirtRegMap.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/CodeGen/VirtRegMap.cpp?rev=57708&r1=57707&r2=57708&view=diff ============================================================================== --- llvm/branches/release_24/lib/CodeGen/VirtRegMap.cpp (original) +++ llvm/branches/release_24/lib/CodeGen/VirtRegMap.cpp Fri Oct 17 13:10:12 2008 @@ -635,7 +635,8 @@ /// marked kill, then it must be due to register reuse. Transfer the kill info /// over. static void UpdateKills(MachineInstr &MI, BitVector &RegKills, - std::vector &KillOps) { + std::vector &KillOps, + const TargetRegisterInfo* TRI) { const TargetInstrDesc &TID = MI.getDesc(); for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) { MachineOperand &MO = MI.getOperand(i); @@ -669,6 +670,11 @@ unsigned Reg = MO.getReg(); RegKills.reset(Reg); KillOps[Reg] = NULL; + // It also defines (or partially define) aliases. + for (const unsigned *AS = TRI->getAliasSet(Reg); *AS; ++AS) { + RegKills.reset(*AS); + KillOps[*AS] = NULL; + } } } @@ -839,7 +845,7 @@ Spills.addAvailable(NewOp.StackSlotOrReMat, MI, NewPhysReg); --MII; - UpdateKills(*MII, RegKills, KillOps); + UpdateKills(*MII, RegKills, KillOps, TRI); DOUT << '\t' << *MII; DOUT << "Reuse undone!\n"; @@ -1283,7 +1289,7 @@ } // This invalidates Phys. Spills.ClobberPhysReg(Phys); - UpdateKills(*prior(MII), RegKills, KillOps); + UpdateKills(*prior(MII), RegKills, KillOps, TRI); DOUT << '\t' << *prior(MII); } } @@ -1500,7 +1506,7 @@ TII->copyRegToReg(MBB, &MI, DesignatedReg, PhysReg, RC, RC); MachineInstr *CopyMI = prior(MII); - UpdateKills(*CopyMI, RegKills, KillOps); + UpdateKills(*CopyMI, RegKills, KillOps, TRI); // This invalidates DesignatedReg. Spills.ClobberPhysReg(DesignatedReg); @@ -1550,7 +1556,7 @@ MI.getOperand(i).setIsKill(); unsigned RReg = SubIdx ? TRI->getSubReg(PhysReg, SubIdx) : PhysReg; MI.getOperand(i).setReg(RReg); - UpdateKills(*prior(MII), RegKills, KillOps); + UpdateKills(*prior(MII), RegKills, KillOps, TRI); DOUT << '\t' << *prior(MII); } @@ -1650,7 +1656,7 @@ // super-register is needed below. if (KillOpnd && !KillOpnd->getSubReg() && TII->unfoldMemoryOperand(MF, &MI, PhysReg, false, true,NewMIs)){ - MBB.insert(MII, NewMIs[0]); + MBB.insert(MII, NewMIs[0]); NewStore = NewMIs[1]; MBB.insert(MII, NewStore); VRM.addSpillSlotUse(SS, NewStore); @@ -1825,7 +1831,7 @@ VRM.RemoveMachineInstrFromMaps(&MI); MBB.erase(&MI); Erased = true; - UpdateKills(*LastStore, RegKills, KillOps); + UpdateKills(*LastStore, RegKills, KillOps, TRI); goto ProcessNextInst; } } @@ -1835,7 +1841,7 @@ DistanceMap.insert(std::make_pair(&MI, Dist++)); if (!Erased && !BackTracked) { for (MachineBasicBlock::iterator II = &MI; II != NextMII; ++II) - UpdateKills(*II, RegKills, KillOps); + UpdateKills(*II, RegKills, KillOps, TRI); } MII = NextMII; } From sabre at nondot.org Fri Oct 17 13:15:05 2008 From: sabre at nondot.org (Chris Lattner) Date: Fri, 17 Oct 2008 18:15:05 -0000 Subject: [llvm-commits] [llvm] r57709 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200810171815.m9HIF5Wl016125@zion.cs.uiuc.edu> Author: lattner Date: Fri Oct 17 13:15:05 2008 New Revision: 57709 URL: http://llvm.org/viewvc/llvm-project?rev=57709&view=rev Log: add support for 128 bit inputs on both x86-64 and x86-32. Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=57709&r1=57708&r2=57709&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri Oct 17 13:15:05 2008 @@ -7509,15 +7509,13 @@ case 'r': // GENERAL_REGS case 'R': // LEGACY_REGS case 'l': // INDEX_REGS - if (VT == MVT::i64 && Subtarget->is64Bit()) - return std::make_pair(0U, X86::GR64RegisterClass); - if (VT == MVT::i32 || VT == MVT::i64) - return std::make_pair(0U, X86::GR32RegisterClass); - else if (VT == MVT::i16) - return std::make_pair(0U, X86::GR16RegisterClass); - else if (VT == MVT::i8) + if (VT == MVT::i8) return std::make_pair(0U, X86::GR8RegisterClass); - break; + if (VT == MVT::i16) + return std::make_pair(0U, X86::GR16RegisterClass); + if (VT == MVT::i32 || !Subtarget->is64Bit()) + return std::make_pair(0U, X86::GR32RegisterClass); + return std::make_pair(0U, X86::GR64RegisterClass); case 'f': // FP Stack registers. // If SSE is enabled for this VT, use f80 to ensure the isel moves the // value to the correct fpstack register class. @@ -7529,7 +7527,6 @@ case 'y': // MMX_REGS if MMX allowed. if (!Subtarget->hasMMX()) break; return std::make_pair(0U, X86::VR64RegisterClass); - break; case 'Y': // SSE_REGS if SSE2 allowed if (!Subtarget->hasSSE2()) break; // FALL THROUGH. From lattner at apple.com Fri Oct 17 13:17:35 2008 From: lattner at apple.com (Tanya Lattner) Date: Fri, 17 Oct 2008 11:17:35 -0700 Subject: [llvm-commits] [test-suite] r57071 [1/7] - in /test-suite/trunk/MultiSource/Applications/lua: ./ bench/ input/ test/ In-Reply-To: <200810042058.m94KwJxP005655@zion.cs.uiuc.edu> References: <200810042058.m94KwJxP005655@zion.cs.uiuc.edu> Message-ID: <570225F6-8E8C-4CC5-8D58-014A59AAE2D7@apple.com> Adding a new test program to llvm-test just 2 days before the branch is probably not a good idea in the future. We experienced issues with the gen_input script on darwin and I've gotten a report that it doesn't work with srcDir != objDir. I'm investigating this now. So in the future, it would be good to get this in at least a week before so other platforms can test it out. Thanks, Tanya On Oct 4, 2008, at 1:58 PM, Torok Edwin wrote: > Author: edwin > Date: Sat Oct 4 15:58:08 2008 > New Revision: 57071 > > URL: http://llvm.org/viewvc/llvm-project?rev=57071&view=rev > Log: > Add Lua-5.1.4 and lua_bench-0.1 to the testsuite. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20081017/3d9d57e5/attachment.html From gohman at apple.com Fri Oct 17 13:18:45 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 17 Oct 2008 18:18:45 -0000 Subject: [llvm-commits] [llvm] r57710 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Message-ID: <200810171818.m9HIIjrk016315@zion.cs.uiuc.edu> Author: djg Date: Fri Oct 17 13:18:45 2008 New Revision: 57710 URL: http://llvm.org/viewvc/llvm-project?rev=57710&view=rev Log: Factor out the code for mapping LLVM IR condition opcodes to ISD condition opcodes into helper functions. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=57710&r1=57709&r2=57710&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Fri Oct 17 13:18:45 2008 @@ -996,6 +996,61 @@ return true; } +/// getFCmpCondCode - Return the ISD condition code corresponding to +/// the given LLVM IR floating-point condition code. This includes +/// consideration of global floating-point math flags. +/// +static ISD::CondCode getFCmpCondCode(FCmpInst::Predicate Pred) { + ISD::CondCode FPC, FOC; + switch (Pred) { + case FCmpInst::FCMP_FALSE: FOC = FPC = ISD::SETFALSE; break; + case FCmpInst::FCMP_OEQ: FOC = ISD::SETEQ; FPC = ISD::SETOEQ; break; + case FCmpInst::FCMP_OGT: FOC = ISD::SETGT; FPC = ISD::SETOGT; break; + case FCmpInst::FCMP_OGE: FOC = ISD::SETGE; FPC = ISD::SETOGE; break; + case FCmpInst::FCMP_OLT: FOC = ISD::SETLT; FPC = ISD::SETOLT; break; + case FCmpInst::FCMP_OLE: FOC = ISD::SETLE; FPC = ISD::SETOLE; break; + case FCmpInst::FCMP_ONE: FOC = ISD::SETNE; FPC = ISD::SETONE; break; + case FCmpInst::FCMP_ORD: FOC = FPC = ISD::SETO; break; + case FCmpInst::FCMP_UNO: FOC = FPC = ISD::SETUO; break; + case FCmpInst::FCMP_UEQ: FOC = ISD::SETEQ; FPC = ISD::SETUEQ; break; + case FCmpInst::FCMP_UGT: FOC = ISD::SETGT; FPC = ISD::SETUGT; break; + case FCmpInst::FCMP_UGE: FOC = ISD::SETGE; FPC = ISD::SETUGE; break; + case FCmpInst::FCMP_ULT: FOC = ISD::SETLT; FPC = ISD::SETULT; break; + case FCmpInst::FCMP_ULE: FOC = ISD::SETLE; FPC = ISD::SETULE; break; + case FCmpInst::FCMP_UNE: FOC = ISD::SETNE; FPC = ISD::SETUNE; break; + case FCmpInst::FCMP_TRUE: FOC = FPC = ISD::SETTRUE; break; + default: + assert(0 && "Invalid FCmp predicate opcode!"); + FOC = FPC = ISD::SETFALSE; + break; + } + if (FiniteOnlyFPMath()) + return FOC; + else + return FPC; +} + +/// getICmpCondCode - Return the ISD condition code corresponding to +/// the given LLVM IR integer condition code. +/// +static ISD::CondCode getICmpCondCode(ICmpInst::Predicate Pred) { + switch (Pred) { + case ICmpInst::ICMP_EQ: return ISD::SETEQ; + case ICmpInst::ICMP_NE: return ISD::SETNE; + case ICmpInst::ICMP_SLE: return ISD::SETLE; + case ICmpInst::ICMP_ULE: return ISD::SETULE; + case ICmpInst::ICMP_SGE: return ISD::SETGE; + case ICmpInst::ICMP_UGE: return ISD::SETUGE; + case ICmpInst::ICMP_SLT: return ISD::SETLT; + case ICmpInst::ICMP_ULT: return ISD::SETULT; + case ICmpInst::ICMP_SGT: return ISD::SETGT; + case ICmpInst::ICMP_UGT: return ISD::SETUGT; + default: + assert(0 && "Invalid ICmp predicate opcode!"); + return ISD::SETNE; + } +} + /// FindMergedConditions - If Cond is an expression like void SelectionDAGLowering::FindMergedConditions(Value *Cond, MachineBasicBlock *TBB, @@ -1024,44 +1079,9 @@ BOp = cast(Cond); ISD::CondCode Condition; if (ICmpInst *IC = dyn_cast(Cond)) { - switch (IC->getPredicate()) { - default: assert(0 && "Unknown icmp predicate opcode!"); - case ICmpInst::ICMP_EQ: Condition = ISD::SETEQ; break; - case ICmpInst::ICMP_NE: Condition = ISD::SETNE; break; - case ICmpInst::ICMP_SLE: Condition = ISD::SETLE; break; - case ICmpInst::ICMP_ULE: Condition = ISD::SETULE; break; - case ICmpInst::ICMP_SGE: Condition = ISD::SETGE; break; - case ICmpInst::ICMP_UGE: Condition = ISD::SETUGE; break; - case ICmpInst::ICMP_SLT: Condition = ISD::SETLT; break; - case ICmpInst::ICMP_ULT: Condition = ISD::SETULT; break; - case ICmpInst::ICMP_SGT: Condition = ISD::SETGT; break; - case ICmpInst::ICMP_UGT: Condition = ISD::SETUGT; break; - } + Condition = getICmpCondCode(IC->getPredicate()); } else if (FCmpInst *FC = dyn_cast(Cond)) { - ISD::CondCode FPC, FOC; - switch (FC->getPredicate()) { - default: assert(0 && "Unknown fcmp predicate opcode!"); - case FCmpInst::FCMP_FALSE: FOC = FPC = ISD::SETFALSE; break; - case FCmpInst::FCMP_OEQ: FOC = ISD::SETEQ; FPC = ISD::SETOEQ; break; - case FCmpInst::FCMP_OGT: FOC = ISD::SETGT; FPC = ISD::SETOGT; break; - case FCmpInst::FCMP_OGE: FOC = ISD::SETGE; FPC = ISD::SETOGE; break; - case FCmpInst::FCMP_OLT: FOC = ISD::SETLT; FPC = ISD::SETOLT; break; - case FCmpInst::FCMP_OLE: FOC = ISD::SETLE; FPC = ISD::SETOLE; break; - case FCmpInst::FCMP_ONE: FOC = ISD::SETNE; FPC = ISD::SETONE; break; - case FCmpInst::FCMP_ORD: FOC = FPC = ISD::SETO; break; - case FCmpInst::FCMP_UNO: FOC = FPC = ISD::SETUO; break; - case FCmpInst::FCMP_UEQ: FOC = ISD::SETEQ; FPC = ISD::SETUEQ; break; - case FCmpInst::FCMP_UGT: FOC = ISD::SETGT; FPC = ISD::SETUGT; break; - case FCmpInst::FCMP_UGE: FOC = ISD::SETGE; FPC = ISD::SETUGE; break; - case FCmpInst::FCMP_ULT: FOC = ISD::SETLT; FPC = ISD::SETULT; break; - case FCmpInst::FCMP_ULE: FOC = ISD::SETLE; FPC = ISD::SETULE; break; - case FCmpInst::FCMP_UNE: FOC = ISD::SETNE; FPC = ISD::SETUNE; break; - case FCmpInst::FCMP_TRUE: FOC = FPC = ISD::SETTRUE; break; - } - if (FiniteOnlyFPMath()) - Condition = FOC; - else - Condition = FPC; + Condition = getFCmpCondCode(FC->getPredicate()); } else { Condition = ISD::SETEQ; // silence warning. assert(0 && "Unknown compare instruction"); @@ -2067,23 +2087,7 @@ predicate = ICmpInst::Predicate(IC->getPredicate()); SDValue Op1 = getValue(I.getOperand(0)); SDValue Op2 = getValue(I.getOperand(1)); - ISD::CondCode Opcode; - switch (predicate) { - case ICmpInst::ICMP_EQ : Opcode = ISD::SETEQ; break; - case ICmpInst::ICMP_NE : Opcode = ISD::SETNE; break; - case ICmpInst::ICMP_UGT : Opcode = ISD::SETUGT; break; - case ICmpInst::ICMP_UGE : Opcode = ISD::SETUGE; break; - case ICmpInst::ICMP_ULT : Opcode = ISD::SETULT; break; - case ICmpInst::ICMP_ULE : Opcode = ISD::SETULE; break; - case ICmpInst::ICMP_SGT : Opcode = ISD::SETGT; break; - case ICmpInst::ICMP_SGE : Opcode = ISD::SETGE; break; - case ICmpInst::ICMP_SLT : Opcode = ISD::SETLT; break; - case ICmpInst::ICMP_SLE : Opcode = ISD::SETLE; break; - default: - assert(!"Invalid ICmp predicate value"); - Opcode = ISD::SETEQ; - break; - } + ISD::CondCode Opcode = getICmpCondCode(predicate); setValue(&I, DAG.getSetCC(MVT::i1, Op1, Op2, Opcode)); } @@ -2095,33 +2099,7 @@ predicate = FCmpInst::Predicate(FC->getPredicate()); SDValue Op1 = getValue(I.getOperand(0)); SDValue Op2 = getValue(I.getOperand(1)); - ISD::CondCode Condition, FOC, FPC; - switch (predicate) { - case FCmpInst::FCMP_FALSE: FOC = FPC = ISD::SETFALSE; break; - case FCmpInst::FCMP_OEQ: FOC = ISD::SETEQ; FPC = ISD::SETOEQ; break; - case FCmpInst::FCMP_OGT: FOC = ISD::SETGT; FPC = ISD::SETOGT; break; - case FCmpInst::FCMP_OGE: FOC = ISD::SETGE; FPC = ISD::SETOGE; break; - case FCmpInst::FCMP_OLT: FOC = ISD::SETLT; FPC = ISD::SETOLT; break; - case FCmpInst::FCMP_OLE: FOC = ISD::SETLE; FPC = ISD::SETOLE; break; - case FCmpInst::FCMP_ONE: FOC = ISD::SETNE; FPC = ISD::SETONE; break; - case FCmpInst::FCMP_ORD: FOC = FPC = ISD::SETO; break; - case FCmpInst::FCMP_UNO: FOC = FPC = ISD::SETUO; break; - case FCmpInst::FCMP_UEQ: FOC = ISD::SETEQ; FPC = ISD::SETUEQ; break; - case FCmpInst::FCMP_UGT: FOC = ISD::SETGT; FPC = ISD::SETUGT; break; - case FCmpInst::FCMP_UGE: FOC = ISD::SETGE; FPC = ISD::SETUGE; break; - case FCmpInst::FCMP_ULT: FOC = ISD::SETLT; FPC = ISD::SETULT; break; - case FCmpInst::FCMP_ULE: FOC = ISD::SETLE; FPC = ISD::SETULE; break; - case FCmpInst::FCMP_UNE: FOC = ISD::SETNE; FPC = ISD::SETUNE; break; - case FCmpInst::FCMP_TRUE: FOC = FPC = ISD::SETTRUE; break; - default: - assert(!"Invalid FCmp predicate value"); - FOC = FPC = ISD::SETFALSE; - break; - } - if (FiniteOnlyFPMath()) - Condition = FOC; - else - Condition = FPC; + ISD::CondCode Condition = getFCmpCondCode(predicate); setValue(&I, DAG.getSetCC(MVT::i1, Op1, Op2, Condition)); } @@ -2133,23 +2111,7 @@ predicate = ICmpInst::Predicate(IC->getPredicate()); SDValue Op1 = getValue(I.getOperand(0)); SDValue Op2 = getValue(I.getOperand(1)); - ISD::CondCode Opcode; - switch (predicate) { - case ICmpInst::ICMP_EQ : Opcode = ISD::SETEQ; break; - case ICmpInst::ICMP_NE : Opcode = ISD::SETNE; break; - case ICmpInst::ICMP_UGT : Opcode = ISD::SETUGT; break; - case ICmpInst::ICMP_UGE : Opcode = ISD::SETUGE; break; - case ICmpInst::ICMP_ULT : Opcode = ISD::SETULT; break; - case ICmpInst::ICMP_ULE : Opcode = ISD::SETULE; break; - case ICmpInst::ICMP_SGT : Opcode = ISD::SETGT; break; - case ICmpInst::ICMP_SGE : Opcode = ISD::SETGE; break; - case ICmpInst::ICMP_SLT : Opcode = ISD::SETLT; break; - case ICmpInst::ICMP_SLE : Opcode = ISD::SETLE; break; - default: - assert(!"Invalid ICmp predicate value"); - Opcode = ISD::SETEQ; - break; - } + ISD::CondCode Opcode = getICmpCondCode(predicate); setValue(&I, DAG.getVSetCC(Op1.getValueType(), Op1, Op2, Opcode)); } @@ -2161,34 +2123,7 @@ predicate = FCmpInst::Predicate(FC->getPredicate()); SDValue Op1 = getValue(I.getOperand(0)); SDValue Op2 = getValue(I.getOperand(1)); - ISD::CondCode Condition, FOC, FPC; - switch (predicate) { - case FCmpInst::FCMP_FALSE: FOC = FPC = ISD::SETFALSE; break; - case FCmpInst::FCMP_OEQ: FOC = ISD::SETEQ; FPC = ISD::SETOEQ; break; - case FCmpInst::FCMP_OGT: FOC = ISD::SETGT; FPC = ISD::SETOGT; break; - case FCmpInst::FCMP_OGE: FOC = ISD::SETGE; FPC = ISD::SETOGE; break; - case FCmpInst::FCMP_OLT: FOC = ISD::SETLT; FPC = ISD::SETOLT; break; - case FCmpInst::FCMP_OLE: FOC = ISD::SETLE; FPC = ISD::SETOLE; break; - case FCmpInst::FCMP_ONE: FOC = ISD::SETNE; FPC = ISD::SETONE; break; - case FCmpInst::FCMP_ORD: FOC = FPC = ISD::SETO; break; - case FCmpInst::FCMP_UNO: FOC = FPC = ISD::SETUO; break; - case FCmpInst::FCMP_UEQ: FOC = ISD::SETEQ; FPC = ISD::SETUEQ; break; - case FCmpInst::FCMP_UGT: FOC = ISD::SETGT; FPC = ISD::SETUGT; break; - case FCmpInst::FCMP_UGE: FOC = ISD::SETGE; FPC = ISD::SETUGE; break; - case FCmpInst::FCMP_ULT: FOC = ISD::SETLT; FPC = ISD::SETULT; break; - case FCmpInst::FCMP_ULE: FOC = ISD::SETLE; FPC = ISD::SETULE; break; - case FCmpInst::FCMP_UNE: FOC = ISD::SETNE; FPC = ISD::SETUNE; break; - case FCmpInst::FCMP_TRUE: FOC = FPC = ISD::SETTRUE; break; - default: - assert(!"Invalid VFCmp predicate value"); - FOC = FPC = ISD::SETFALSE; - break; - } - if (FiniteOnlyFPMath()) - Condition = FOC; - else - Condition = FPC; - + ISD::CondCode Condition = getFCmpCondCode(predicate); MVT DestVT = TLI.getValueType(I.getType()); setValue(&I, DAG.getVSetCC(DestVT, Op1, Op2, Condition)); From dalej at apple.com Fri Oct 17 13:19:47 2008 From: dalej at apple.com (Dale Johannesen) Date: Fri, 17 Oct 2008 18:19:47 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57711 - /llvm-gcc-4.2/trunk/gcc/cp/decl.c Message-ID: <200810171819.m9HIJlHq016360@zion.cs.uiuc.edu> Author: johannes Date: Fri Oct 17 13:19:47 2008 New Revision: 57711 URL: http://llvm.org/viewvc/llvm-project?rev=57711&view=rev Log: Bring over fix for PR 2661 from Apple gcc. Fix by Mike Stump. Modified: llvm-gcc-4.2/trunk/gcc/cp/decl.c Modified: llvm-gcc-4.2/trunk/gcc/cp/decl.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cp/decl.c?rev=57711&r1=57710&r2=57711&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/cp/decl.c (original) +++ llvm-gcc-4.2/trunk/gcc/cp/decl.c Fri Oct 17 13:19:47 2008 @@ -5151,10 +5151,15 @@ if (DECL_LANG_SPECIFIC (decl) && DECL_IN_AGGR_P (decl)) { gcc_assert (TREE_STATIC (decl)); + /* APPLE LOCAL begin templated static data 6298605 */ /* An in-class declaration of a static data member should be - external; it is only a declaration, and not a definition. */ - if (init == NULL_TREE) + external if the decl is accessible from outside this + translation unit (eg something not in an anonymous + namespace); it is only a declaration, and not a + definition. */ + if (init == NULL_TREE && TREE_PUBLIC (decl)) gcc_assert (DECL_EXTERNAL (decl)); + /* APPLE LOCAL end templated static data 6298605 */ } /* We don't create any RTL for local variables. */ From wangmp at apple.com Fri Oct 17 13:22:58 2008 From: wangmp at apple.com (Mon P Wang) Date: Fri, 17 Oct 2008 18:22:58 -0000 Subject: [llvm-commits] [llvm] r57712 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAG.h include/llvm/CodeGen/SelectionDAGNodes.h lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200810171822.m9HIMwrP016589@zion.cs.uiuc.edu> Author: wangmp Date: Fri Oct 17 13:22:58 2008 New Revision: 57712 URL: http://llvm.org/viewvc/llvm-project?rev=57712&view=rev Log: Added MemIntrinsicNode which is useful to represent target intrinsics that touches memory and need an associated MemOperand Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=57712&r1=57711&r2=57712&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Fri Oct 17 13:22:58 2008 @@ -436,18 +436,33 @@ SDValue getVAArg(MVT VT, SDValue Chain, SDValue Ptr, SDValue SV); - /// getAtomic - Gets a node for an atomic op, produces result and chain, takes - /// 3 operands + /// getAtomic - Gets a node for an atomic op, produces result and chain and + /// takes 3 operands SDValue getAtomic(unsigned Opcode, SDValue Chain, SDValue Ptr, SDValue Cmp, SDValue Swp, const Value* PtrVal, unsigned Alignment=0); - /// getAtomic - Gets a node for an atomic op, produces result and chain, takes - /// 2 operands + /// getAtomic - Gets a node for an atomic op, produces result and chain and + /// takes 2 operands. SDValue getAtomic(unsigned Opcode, SDValue Chain, SDValue Ptr, SDValue Val, const Value* PtrVal, unsigned Alignment = 0); + /// getMemIntrinsicNode - Creates a MemIntrinsicNode that may produce a + /// result and takes a list of operands. + SDValue getMemIntrinsicNode(unsigned Opcode, + const MVT *VTs, unsigned NumVTs, + const SDValue *Ops, unsigned NumOps, + MVT MemVT, const Value *srcValue, int SVOff, + unsigned Align = 0, bool Vol = false, + bool ReadMem = true, bool WriteMem = true); + + SDValue getMemIntrinsicNode(unsigned Opcode, SDVTList VTList, + const SDValue *Ops, unsigned NumOps, + MVT MemVT, const Value *srcValue, int SVOff, + unsigned Align = 0, bool Vol = false, + bool ReadMem = true, bool WriteMem = true); + /// getMergeValues - Create a MERGE_VALUES node from the given operands. /// Allowed to return something different (and simpler) if Simplify is true. SDValue getMergeValues(const SDValue *Ops, unsigned NumOps, Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=57712&r1=57711&r2=57712&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Fri Oct 17 13:22:58 2008 @@ -1524,6 +1524,10 @@ const Value *srcValue, int SVOff, unsigned alignment, bool isvolatile); + MemSDNode(unsigned Opc, SDVTList VTs, const SDValue *Ops, unsigned NumOps, + MVT MemoryVT, const Value *srcValue, int SVOff, + unsigned alignment, bool isvolatile); + /// Returns alignment and volatility of the memory access unsigned getAlignment() const { return (1u << (Flags >> 1)) >> 1; } bool isVolatile() const { return Flags & 1; } @@ -1551,6 +1555,8 @@ // Methods to support isa and dyn_cast static bool classof(const MemSDNode *) { return true; } static bool classof(const SDNode *N) { + // For some targets, we lower some target intrinsics to a MemIntrinsicNode + // with either an intrinsic or a target opcode. return N->getOpcode() == ISD::LOAD || N->getOpcode() == ISD::STORE || N->getOpcode() == ISD::ATOMIC_CMP_SWAP_8 || @@ -1603,11 +1609,16 @@ N->getOpcode() == ISD::ATOMIC_LOAD_MIN_64 || N->getOpcode() == ISD::ATOMIC_LOAD_MAX_64 || N->getOpcode() == ISD::ATOMIC_LOAD_UMIN_64 || - N->getOpcode() == ISD::ATOMIC_LOAD_UMAX_64; + N->getOpcode() == ISD::ATOMIC_LOAD_UMAX_64 || + + N->getOpcode() == ISD::INTRINSIC_W_CHAIN || + N->getOpcode() == ISD::INTRINSIC_VOID || + N->isTargetOpcode(); } }; -/// Atomic operations node +/// AtomicSDNode - A SDNode reprenting atomic operations. +/// class AtomicSDNode : public MemSDNode { virtual void ANCHOR(); // Out-of-line virtual method to give class a home. SDUse Ops[4]; @@ -1707,6 +1718,36 @@ } }; +/// MemIntrinsicSDNode - This SDNode is used for target intrinsic that touches +/// memory and need an associated memory operand. +/// +class MemIntrinsicSDNode : public MemSDNode { + virtual void ANCHOR(); // Out-of-line virtual method to give class a home. + bool ReadMem; // Intrinsic reads memory + bool WriteMem; // Intrinsic writes memory + public: + MemIntrinsicSDNode(unsigned Opc, SDVTList VTs, + const SDValue *Ops, unsigned NumOps, + MVT MemoryVT, const Value *srcValue, int SVO, + unsigned Align, bool Vol, bool ReadMem, bool WriteMem) + : MemSDNode(Opc, VTs, Ops, NumOps, MemoryVT, srcValue, SVO, Align, Vol), + ReadMem(ReadMem), WriteMem(WriteMem) { + } + + bool readMem() const { return ReadMem; } + bool writeMem() const { return WriteMem; } + + // Methods to support isa and dyn_cast + static bool classof(const MemIntrinsicSDNode *) { return true; } + static bool classof(const SDNode *N) { + // We lower some target intrinsics to their target opcode + // early a node with a target opcode can be of this class + return N->getOpcode() == ISD::INTRINSIC_W_CHAIN || + N->getOpcode() == ISD::INTRINSIC_VOID || + N->isTargetOpcode(); + } +}; + class ConstantSDNode : public SDNode { const ConstantInt *Value; virtual void ANCHOR(); // Out-of-line virtual method to give class a home. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=57712&r1=57711&r2=57712&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Oct 17 13:22:58 2008 @@ -3335,6 +3335,46 @@ } SDValue +SelectionDAG::getMemIntrinsicNode(unsigned Opcode, + const MVT *VTs, unsigned NumVTs, + const SDValue *Ops, unsigned NumOps, + MVT MemVT, const Value *srcValue, int SVOff, + unsigned Align, bool Vol, + bool ReadMem, bool WriteMem) { + return getMemIntrinsicNode(Opcode, makeVTList(VTs, NumVTs), Ops, NumOps, + MemVT, srcValue, SVOff, Align, Vol, + ReadMem, WriteMem); +} + +SDValue +SelectionDAG::getMemIntrinsicNode(unsigned Opcode, SDVTList VTList, + const SDValue *Ops, unsigned NumOps, + MVT MemVT, const Value *srcValue, int SVOff, + unsigned Align, bool Vol, + bool ReadMem, bool WriteMem) { + // Memoize the node unless it returns a flag. + MemIntrinsicSDNode *N; + if (VTList.VTs[VTList.NumVTs-1] != MVT::Flag) { + FoldingSetNodeID ID; + AddNodeIDNode(ID, Opcode, VTList, Ops, NumOps); + void *IP = 0; + if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP)) + return SDValue(E, 0); + + N = NodeAllocator.Allocate(); + new (N) MemIntrinsicSDNode(Opcode, VTList, Ops, NumOps, MemVT, + srcValue, SVOff, Align, Vol, ReadMem, WriteMem); + CSEMap.InsertNode(N, IP); + } else { + N = NodeAllocator.Allocate(); + new (N) MemIntrinsicSDNode(Opcode, VTList, Ops, NumOps, MemVT, + srcValue, SVOff, Align, Vol, ReadMem, WriteMem); + } + AllNodes.push_back(N); + return SDValue(N, 0); +} + +SDValue SelectionDAG::getCall(unsigned CallingConv, bool IsVarArgs, bool IsTailCall, bool IsInreg, SDVTList VTs, const SDValue *Operands, unsigned NumOperands) { @@ -4678,6 +4718,7 @@ void LoadSDNode::ANCHOR() {} void StoreSDNode::ANCHOR() {} void AtomicSDNode::ANCHOR() {} +void MemIntrinsicSDNode::ANCHOR() {} void CallSDNode::ANCHOR() {} HandleSDNode::~HandleSDNode() { @@ -4707,6 +4748,17 @@ assert(isVolatile() == vol && "Volatile representation error!"); } +MemSDNode::MemSDNode(unsigned Opc, SDVTList VTs, const SDValue *Ops, + unsigned NumOps, MVT memvt, const Value *srcValue, + int SVO, unsigned alignment, bool vol) + : SDNode(Opc, VTs, Ops, NumOps), + MemoryVT(memvt), SrcValue(srcValue), SVOffset(SVO), + Flags(vol | ((Log2_32(alignment) + 1) << 1)) { + assert(isPowerOf2_32(alignment) && "Alignment is not a power of 2!"); + assert(getAlignment() == alignment && "Alignment representation error!"); + assert(isVolatile() == vol && "Volatile representation error!"); +} + /// getMemOperand - Return a MachineMemOperand object describing the memory /// reference performed by this memory reference. MachineMemOperand MemSDNode::getMemOperand() const { @@ -4715,10 +4767,15 @@ Flags = MachineMemOperand::MOLoad; else if (isa(this)) Flags = MachineMemOperand::MOStore; - else { - assert(isa(this) && "Unknown MemSDNode opcode!"); + else if (isa(this)) { Flags = MachineMemOperand::MOLoad | MachineMemOperand::MOStore; } + else { + const MemIntrinsicSDNode* MemIntrinNode = dyn_cast(this); + assert(MemIntrinNode && "Unknown MemSDNode opcode!"); + if (MemIntrinNode->readMem()) Flags |= MachineMemOperand::MOLoad; + if (MemIntrinNode->writeMem()) Flags |= MachineMemOperand::MOStore; + } int Size = (getMemoryVT().getSizeInBits() + 7) >> 3; if (isVolatile()) Flags |= MachineMemOperand::MOVolatile; From tonic at nondot.org Fri Oct 17 13:26:57 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 18:26:57 -0000 Subject: [llvm-commits] [llvm] r57713 - /llvm/branches/release_24/lib/Linker/LinkModules.cpp Message-ID: <200810171826.m9HIQvjN016761@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 13:26:56 2008 New Revision: 57713 URL: http://llvm.org/viewvc/llvm-project?rev=57713&view=rev Log: Merge from mainline. Modified: llvm/branches/release_24/lib/Linker/LinkModules.cpp Modified: llvm/branches/release_24/lib/Linker/LinkModules.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Linker/LinkModules.cpp?rev=57713&r1=57712&r2=57713&view=diff ============================================================================== --- llvm/branches/release_24/lib/Linker/LinkModules.cpp (original) +++ llvm/branches/release_24/lib/Linker/LinkModules.cpp Fri Oct 17 13:26:56 2008 @@ -662,12 +662,15 @@ if (DGVar->isDeclaration() && SGV->isConstant() && !DGVar->isConstant()) DGVar->setConstant(true); - // SGV is global, but DGV is alias. The only valid mapping is when SGV is - // external declaration, which is effectively a no-op. Also make sure - // linkage calculation was correct. - if (isa(DGV) && !SGV->isDeclaration()) - return Error(Err, "Global-Alias Collision on '" + SGV->getName() + - "': symbol multiple defined"); + // SGV is global, but DGV is alias. + if (isa(DGV)) { + // The only valid mappings are: + // - SGV is external declaration, which is effectively a no-op. + // - SGV is weak, when we just need to throw SGV out. + if (!SGV->isDeclaration() && !SGV->mayBeOverridden()) + return Error(Err, "Global-Alias Collision on '" + SGV->getName() + + "': symbol multiple defined"); + } // Set calculated linkage DGV->setLinkage(NewLinkage); @@ -854,28 +857,39 @@ // Figure out what the initializer looks like in the dest module... Constant *SInit = cast(RemapOperand(SGV->getInitializer(), ValueMap)); + // Grab destination global variable or alias. + GlobalValue *DGV = cast(ValueMap[SGV]->stripPointerCasts()); - GlobalVariable *DGV = - cast(ValueMap[SGV]->stripPointerCasts()); - if (DGV->hasInitializer()) { - if (SGV->hasExternalLinkage()) { - if (DGV->getInitializer() != SInit) - return Error(Err, "Global Variable Collision on '" + SGV->getName() + - "': global variables have different initializers"); - } else if (DGV->mayBeOverridden()) { - // Nothing is required, mapped values will take the new global - // automatically. - } else if (SGV->mayBeOverridden()) { - // Nothing is required, mapped values will take the new global - // automatically. - } else if (DGV->hasAppendingLinkage()) { - assert(0 && "Appending linkage unimplemented!"); + // If dest if global variable, check that initializers match. + if (GlobalVariable *DGVar = dyn_cast(DGV)) { + if (DGVar->hasInitializer()) { + if (SGV->hasExternalLinkage()) { + if (DGVar->getInitializer() != SInit) + return Error(Err, "Global Variable Collision on '" + + SGV->getName() + + "': global variables have different initializers"); + } else if (DGVar->mayBeOverridden()) { + // Nothing is required, mapped values will take the new global + // automatically. + } else if (SGV->mayBeOverridden()) { + // Nothing is required, mapped values will take the new global + // automatically. + } else if (DGVar->hasAppendingLinkage()) { + assert(0 && "Appending linkage unimplemented!"); + } else { + assert(0 && "Unknown linkage!"); + } } else { - assert(0 && "Unknown linkage!"); + // Copy the initializer over now... + DGVar->setInitializer(SInit); } } else { - // Copy the initializer over now... - DGV->setInitializer(SInit); + // Destination is alias, the only valid situation is when source is + // weak. Also, note, that we already checked linkage in LinkGlobals(), + // thus we assert here. + // FIXME: Should we weaken this assumption, 'dereference' alias and + // check for initializer of aliasee? + assert(SGV->mayBeOverridden()); } } } From wangmp at apple.com Fri Oct 17 13:28:33 2008 From: wangmp at apple.com (Mon Ping Wang) Date: Fri, 17 Oct 2008 11:28:33 -0700 Subject: [llvm-commits] MemIntrinsicNode patch In-Reply-To: <700F02B0-1F51-4E79-BC65-18D3C12F96ED@apple.com> References: <51219B37-C775-4478-9BA3-9EAA952A21D9@apple.com> <700F02B0-1F51-4E79-BC65-18D3C12F96ED@apple.com> Message-ID: <203BED6D-A2A4-4D92-953B-73CDB18D7888@apple.com> Hi, On Oct 16, 2008, at 10:59 PM, Evan Cheng wrote: > +/// Memory intrinsic node > +// This node is used for target intrinsic that touches memory and > need an > +// associated memory operan > > // -> /// :-) > - Fixed > + /// getMemIntrinsicNode - Gets a MemIntrinsicNode > +SDValue getMemIntrinsicNode(unsigned Opcode, > + const MVT *VTs, unsigned NumVTs, > + const SDValue *Ops, unsigned NumOps, > + MVT MemVT, const Value *srcValue, int > SVOff, > + unsigned Align = 0, bool Vol = false, > + bool ReadMem = true, bool WriteMem = > true); > > Extra spaces before ///? Also please end a sentence with a period (or > Chris' head will explode. :-) > -Fixed as well as the indentation problem Thanks, -- Mon Ping From isanbard at gmail.com Fri Oct 17 13:48:59 2008 From: isanbard at gmail.com (Bill Wendling) Date: Fri, 17 Oct 2008 18:48:59 -0000 Subject: [llvm-commits] [llvm] r57714 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfWriter.cpp test/DebugInfo/2008-10-17-C++DebugCrash.ll Message-ID: <200810171848.m9HImxLk017802@zion.cs.uiuc.edu> Author: void Date: Fri Oct 17 13:48:57 2008 New Revision: 57714 URL: http://llvm.org/viewvc/llvm-project?rev=57714&view=rev Log: The Dwarf writer was comparing mangled and unmangled names for C++ code when we have an unreachable block in a function. This was triggering the assert. This is a horrid hack to cover this up. Oh! for a good debug info architecture! Added: llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=57714&r1=57713&r2=57714&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Fri Oct 17 13:48:57 2008 @@ -2060,8 +2060,11 @@ return; } } - +#if 0 + // FIXME: This is causing an abort because C++ mangled names are compared + // with their unmangled counterparts. See PR2885. Don't do this assert. assert(0 && "Couldn't find DIE for machine function!"); +#endif } /// EmitInitial - Emit initial Dwarf declarations. This is necessary for cc Added: llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/2008-10-17-C%2B%2BDebugCrash.ll?rev=57714&view=auto ============================================================================== --- llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll (added) +++ llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll Fri Oct 17 13:48:57 2008 @@ -0,0 +1,58 @@ +; RUN: llvm-as < %s | llc +; PR2885 + +;; NOTE: This generates bad debug info in this case! But that's better than +;; ICEing. + +; ModuleID = 'bug.bc' +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" +target triple = "i386-pc-linux-gnu" + %llvm.dbg.anchor.type = type { i32, i32 } + %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32 } + %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8* } + %llvm.dbg.subprogram.type = type { i32, { }*, { }*, i8*, i8*, i8*, { }*, i32, { }*, i1, i1 } + %llvm.dbg.variable.type = type { i32, { }*, i8*, { }*, i32, { }* } + at llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type { i32 393262, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([11 x i8]* @.str3, i32 0, i32 0), i8* getelementptr ([11 x i8]* @.str3, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 14, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to { }*), i1 true, i1 true } ; <%llvm.dbg.subprogram.type*> [#uses=0] + at llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 46 } ; <%llvm.dbg.anchor.type*> [#uses=1] + at llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type { i32 393233, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 4, i8* getelementptr ([7 x i8]* @.str, i32 0, i32 0), i8* getelementptr ([16 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* @.str2, i32 0, i32 0) } ; <%llvm.dbg.compile_unit.type*> [#uses=1] + at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 17 } ; <%llvm.dbg.anchor.type*> [#uses=1] + at .str = internal constant [7 x i8] c"die.cc\00" ; <[7 x i8]*> [#uses=1] + at .str1 = internal constant [16 x i8] c"/home/nicholas/\00" ; <[16 x i8]*> [#uses=1] + at .str2 = internal constant [52 x i8] c"4.2.1 (Based on Apple Inc. build 5623) (LLVM build)\00" ; <[52 x i8]*> [#uses=1] + at .str3 = internal constant [11 x i8] c"AssertFail\00" ; <[11 x i8]*> [#uses=1] + at llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type { i32 393252, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* @.str4, i32 0, i32 0), { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5 } ; <%llvm.dbg.basictype.type*> [#uses=1] + at .str4 = internal constant [4 x i8] c"int\00" ; <[4 x i8]*> [#uses=1] + at llvm.dbg.subprogram5 = internal constant %llvm.dbg.subprogram.type { i32 393262, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str6, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str6, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 19, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype7 to { }*), i1 true, i1 true } ; <%llvm.dbg.subprogram.type*> [#uses=1] + at .str6 = internal constant [7 x i8] c"FooOne\00" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.basictype7 = internal constant %llvm.dbg.basictype.type { i32 393252, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str8, i32 0, i32 0), { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5 } ; <%llvm.dbg.basictype.type*> [#uses=1] + at .str8 = internal constant [9 x i8] c"long int\00" ; <[9 x i8]*> [#uses=1] + at llvm.dbg.variable = internal constant %llvm.dbg.variable.type { i32 393473, { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram5 to { }*), i8* getelementptr ([6 x i8]* @.str9, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 19, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype10 to { }*) } ; <%llvm.dbg.variable.type*> [#uses=0] + at .str9 = internal constant [6 x i8] c"count\00" ; <[6 x i8]*> [#uses=1] + at llvm.dbg.basictype10 = internal constant %llvm.dbg.basictype.type { i32 393252, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* @.str11, i32 0, i32 0), { }* null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 7 } ; <%llvm.dbg.basictype.type*> [#uses=1] + at .str11 = internal constant [18 x i8] c"long unsigned int\00" ; <[18 x i8]*> [#uses=1] + at llvm.dbg.subprogram12 = internal constant %llvm.dbg.subprogram.type { i32 393262, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([7 x i8]* @.str13, i32 0, i32 0), i8* getelementptr ([7 x i8]* @.str13, i32 0, i32 0), i8* null, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 24, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype7 to { }*), i1 true, i1 true } ; <%llvm.dbg.subprogram.type*> [#uses=0] + at .str13 = internal constant [7 x i8] c"FooTwo\00" ; <[7 x i8]*> [#uses=1] + at llvm.dbg.subprogram14 = internal constant %llvm.dbg.subprogram.type { i32 393262, { }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* @.str15, i32 0, i32 0), i8* getelementptr ([9 x i8]* @.str15, i32 0, i32 0), i8* getelementptr ([13 x i8]* @.str16, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 29, { }* null, i1 false, i1 true } ; <%llvm.dbg.subprogram.type*> [#uses=0] + at .str15 = internal constant [9 x i8] c"FooThree\00" ; <[9 x i8]*> [#uses=1] + at .str16 = internal constant [13 x i8] c"_Z8FooThreev\00" ; <[13 x i8]*> [#uses=1] + +declare void @_Z8FooThreev() nounwind + +define internal i32 @_ZL10AssertFailv() nounwind { +entry: + unreachable +} + +declare void @llvm.dbg.func.start({ }*) nounwind + +declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind + +declare void @abort() noreturn nounwind + +declare void @llvm.dbg.region.end({ }*) nounwind + +declare i32 @_ZL6FooOnem(i32) nounwind + +declare void @llvm.dbg.declare({ }*, { }*) nounwind + +declare i32 @_ZL6FooTwov() nounwind From sabre at nondot.org Fri Oct 17 14:59:52 2008 From: sabre at nondot.org (Chris Lattner) Date: Fri, 17 Oct 2008 19:59:52 -0000 Subject: [llvm-commits] [llvm] r57715 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Message-ID: <200810171959.m9HJxq4J020505@zion.cs.uiuc.edu> Author: lattner Date: Fri Oct 17 14:59:51 2008 New Revision: 57715 URL: http://llvm.org/viewvc/llvm-project?rev=57715&view=rev Log: add support for 128 bit aggregates. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=57715&r1=57714&r2=57715&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Fri Oct 17 14:59:51 2008 @@ -4416,6 +4416,7 @@ case 16: case 32: case 64: + case 128: OpTy = IntegerType::get(BitSize); break; } From evan.cheng at apple.com Fri Oct 17 15:56:41 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 17 Oct 2008 20:56:41 -0000 Subject: [llvm-commits] [llvm] r57720 - in /llvm/trunk: lib/CodeGen/VirtRegMap.cpp test/CodeGen/X86/2008-10-17-SpillerBug.ll Message-ID: <200810172056.m9HKufD9022996@zion.cs.uiuc.edu> Author: evancheng Date: Fri Oct 17 15:56:41 2008 New Revision: 57720 URL: http://llvm.org/viewvc/llvm-project?rev=57720&view=rev Log: Fix PR2898. Spiller delete a store for reuse before it knows for sure the reuse happened. Patch by Lang Hames! Added: llvm/trunk/test/CodeGen/X86/2008-10-17-SpillerBug.ll Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/VirtRegMap.cpp?rev=57720&r1=57719&r2=57720&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/VirtRegMap.cpp (original) +++ llvm/trunk/lib/CodeGen/VirtRegMap.cpp Fri Oct 17 15:56:41 2008 @@ -1342,6 +1342,7 @@ } // Process all of the spilled uses and all non spilled reg references. + SmallVector PotentialDeadStoreSlots; for (unsigned j = 0, e = VirtUseOps.size(); j != e; ++j) { unsigned i = VirtUseOps[j]; MachineOperand &MO = MI.getOperand(i); @@ -1446,17 +1447,14 @@ if (MI.getOperand(i).isKill() && ReuseSlot <= VirtRegMap::MAX_STACK_SLOT) { - // This was the last use and the spilled value is still available - // for reuse. That means the spill was unnecessary! - MachineInstr* DeadStore = MaybeDeadStores[ReuseSlot]; - if (DeadStore) { - DOUT << "Removed dead store:\t" << *DeadStore; - InvalidateKills(*DeadStore, RegKills, KillOps); - VRM.RemoveMachineInstrFromMaps(DeadStore); - MBB.erase(DeadStore); - MaybeDeadStores[ReuseSlot] = NULL; - ++NumDSE; - } + + // The store of this spilled value is potentially dead, but we + // won't know for certain until we've confirmed that the re-use + // above is valid, which means waiting until the other operands + // are processed. For now we just track the spill slot, we'll + // remove it after the other operands are processed if valid. + + PotentialDeadStoreSlots.push_back(ReuseSlot); } continue; } // CanReuse @@ -1560,6 +1558,23 @@ DOUT << '\t' << *prior(MII); } + // Ok - now we can remove stores that have been confirmed dead. + for (unsigned j = 0, e = PotentialDeadStoreSlots.size(); j != e; ++j) { + // This was the last use and the spilled value is still available + // for reuse. That means the spill was unnecessary! + int PDSSlot = PotentialDeadStoreSlots[j]; + MachineInstr* DeadStore = MaybeDeadStores[PDSSlot]; + if (DeadStore) { + DOUT << "Removed dead store:\t" << *DeadStore; + InvalidateKills(*DeadStore, RegKills, KillOps); + VRM.RemoveMachineInstrFromMaps(DeadStore); + MBB.erase(DeadStore); + MaybeDeadStores[PDSSlot] = NULL; + ++NumDSE; + } + } + + DOUT << '\t' << MI; Added: llvm/trunk/test/CodeGen/X86/2008-10-17-SpillerBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-10-17-SpillerBug.ll?rev=57720&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2008-10-17-SpillerBug.ll (added) +++ llvm/trunk/test/CodeGen/X86/2008-10-17-SpillerBug.ll Fri Oct 17 15:56:41 2008 @@ -0,0 +1,129 @@ +; RUN: llvm-as < %s | llc -mtriple=x86_64-pc-linux-gnu -regalloc=pbqp -stats |& grep {Number of dead stores elided} | grep 2 +; PR2898 + + %struct.BiContextType = type { i16, i8 } + %struct.Bitstream = type { i32, i32, i32, i32, i8*, i32 } + %struct.DataPartition = type { %struct.Bitstream*, %struct.DecodingEnvironment, i32 (%struct.SyntaxElement*, %struct.ImageParameters*, %struct.DataPartition*)* } + %struct.DecRefPicMarking_t = type { i32, i32, i32, i32, i32, %struct.DecRefPicMarking_t* } + %struct.DecodingEnvironment = type { i32, i32, i32, i32, i32, i8*, i32* } + %struct.ImageParameters = type { i32, i32, i32, i32, i32*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [16 x [16 x i16]], [6 x [32 x i32]], [16 x [16 x i32]], [4 x [12 x [4 x [4 x i32]]]], [16 x i32], i8**, i32*, i32***, i32**, i32, i32, i32, i32, %struct.Slice*, %struct.Macroblock*, i32, i32, i32, i32, i32, i32, %struct.DecRefPicMarking_t*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32***, i32***, i32****, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [3 x [2 x i32]], [3 x [2 x i32]], i32, i32, i64, i64, %struct.timeb, %struct.timeb, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } + %struct.Macroblock = type { i32, [2 x i32], i32, i32, %struct.Macroblock*, %struct.Macroblock*, i32, [2 x [4 x [4 x [2 x i32]]]], i32, i64, i64, i32, i32, [4 x i8], [4 x i8], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 } + %struct.MotionInfoContexts = type { [4 x [11 x %struct.BiContextType]], [2 x [9 x %struct.BiContextType]], [2 x [10 x %struct.BiContextType]], [2 x [6 x %struct.BiContextType]], [4 x %struct.BiContextType], [4 x %struct.BiContextType], [3 x %struct.BiContextType] } + %struct.Slice = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.DataPartition*, %struct.MotionInfoContexts*, %struct.TextureInfoContexts*, i32, i32*, i32*, i32*, i32, i32*, i32*, i32*, i32 (%struct.ImageParameters*, %struct.inp_par*)*, i32, i32, i32, i32 } + %struct.SyntaxElement = type { i32, i32, i32, i32, i32, i32, i32, i32, void (i32, i32, i32*, i32*)*, void (%struct.SyntaxElement*, %struct.ImageParameters*, %struct.DecodingEnvironment*)* } + %struct.TextureInfoContexts = type { [2 x %struct.BiContextType], [4 x %struct.BiContextType], [3 x [4 x %struct.BiContextType]], [10 x [4 x %struct.BiContextType]], [10 x [15 x %struct.BiContextType]], [10 x [15 x %struct.BiContextType]], [10 x [5 x %struct.BiContextType]], [10 x [5 x %struct.BiContextType]], [10 x [15 x %struct.BiContextType]], [10 x [15 x %struct.BiContextType]] } + %struct.inp_par = type { [1000 x i8], [1000 x i8], [1000 x i8], i32, i32, i32, i32, i32, i32, i32, i32 } + %struct.timeb = type { i64, i16, i16, i16 } + +define i1 @itrans8x8_bb15_bb15_2E_ce(%struct.ImageParameters* %img, i32 %ioff, [8 x [8 x i32]]* %m6, i64, i64, i64, i64, i64, i64, i64, i64, i32 %i.2.reg2mem.0, i32* %.out, i32* %.out1, i32* %.out2, i32* %.out3, i32* %.out4, i32* %.out5, i32* %.out6, i32* %.out7, i32* %.out8, i32* %indvar.next58.out) { +newFuncRoot: + br label %bb15.ce + +codeRepl1.exitStub: ; preds = %bb15.ce + store i32 %8, i32* %.out + store i32 %24, i32* %.out1 + store i32 %25, i32* %.out2 + store i32 %26, i32* %.out3 + store i32 %27, i32* %.out4 + store i32 %53, i32* %.out5 + store i32 %55, i32* %.out6 + store i32 %57, i32* %.out7 + store i32 %59, i32* %.out8 + store i32 %indvar.next58, i32* %indvar.next58.out + ret i1 true + +bb15.bb15_crit_edge.exitStub: ; preds = %bb15.ce + store i32 %8, i32* %.out + store i32 %24, i32* %.out1 + store i32 %25, i32* %.out2 + store i32 %26, i32* %.out3 + store i32 %27, i32* %.out4 + store i32 %53, i32* %.out5 + store i32 %55, i32* %.out6 + store i32 %57, i32* %.out7 + store i32 %59, i32* %.out8 + store i32 %indvar.next58, i32* %indvar.next58.out + ret i1 false + +bb15.ce: ; preds = %newFuncRoot + %8 = add i32 %i.2.reg2mem.0, %ioff ; [#uses=3] + %9 = sext i32 %i.2.reg2mem.0 to i64 ; [#uses=8] + %10 = getelementptr [8 x [8 x i32]]* %m6, i64 0, i64 %9, i64 0 ; [#uses=1] + %11 = load i32* %10, align 4 ; [#uses=2] + %12 = getelementptr [8 x [8 x i32]]* %m6, i64 0, i64 %9, i64 4 ; [#uses=1] + %13 = load i32* %12, align 4 ; [#uses=2] + %14 = add i32 %13, %11 ; [#uses=2] + %15 = sub i32 %11, %13 ; [#uses=2] + %16 = getelementptr [8 x [8 x i32]]* %m6, i64 0, i64 %9, i64 2 ; [#uses=1] + %17 = load i32* %16, align 4 ; [#uses=2] + %18 = ashr i32 %17, 1 ; [#uses=1] + %19 = getelementptr [8 x [8 x i32]]* %m6, i64 0, i64 %9, i64 6 ; [#uses=1] + %20 = load i32* %19, align 4 ; [#uses=2] + %21 = sub i32 %18, %20 ; [#uses=2] + %22 = ashr i32 %20, 1 ; [#uses=1] + %23 = add i32 %22, %17 ; [#uses=2] + %24 = add i32 %23, %14 ; [#uses=4] + %25 = add i32 %21, %15 ; [#uses=4] + %26 = sub i32 %15, %21 ; [#uses=4] + %27 = sub i32 %14, %23 ; [#uses=4] + %28 = getelementptr [8 x [8 x i32]]* %m6, i64 0, i64 %9, i64 5 ; [#uses=1] + %29 = load i32* %28, align 4 ; [#uses=4] + %30 = getelementptr [8 x [8 x i32]]* %m6, i64 0, i64 %9, i64 3 ; [#uses=1] + %31 = load i32* %30, align 4 ; [#uses=4] + %32 = getelementptr [8 x [8 x i32]]* %m6, i64 0, i64 %9, i64 7 ; [#uses=1] + %33 = load i32* %32, align 4 ; [#uses=4] + %34 = ashr i32 %33, 1 ; [#uses=1] + %35 = sub i32 %29, %31 ; [#uses=1] + %36 = sub i32 %35, %33 ; [#uses=1] + %37 = sub i32 %36, %34 ; [#uses=2] + %38 = getelementptr [8 x [8 x i32]]* %m6, i64 0, i64 %9, i64 1 ; [#uses=1] + %39 = load i32* %38, align 4 ; [#uses=4] + %40 = ashr i32 %31, 1 ; [#uses=1] + %41 = add i32 %33, %39 ; [#uses=1] + %42 = sub i32 %41, %31 ; [#uses=1] + %43 = sub i32 %42, %40 ; [#uses=2] + %44 = ashr i32 %29, 1 ; [#uses=1] + %45 = sub i32 %33, %39 ; [#uses=1] + %46 = add i32 %45, %29 ; [#uses=1] + %47 = add i32 %46, %44 ; [#uses=2] + %48 = ashr i32 %39, 1 ; [#uses=1] + %49 = add i32 %29, %31 ; [#uses=1] + %50 = add i32 %49, %39 ; [#uses=1] + %51 = add i32 %50, %48 ; [#uses=2] + %52 = ashr i32 %51, 2 ; [#uses=1] + %53 = add i32 %52, %37 ; [#uses=4] + %54 = ashr i32 %37, 2 ; [#uses=1] + %55 = sub i32 %51, %54 ; [#uses=4] + %56 = ashr i32 %47, 2 ; [#uses=1] + %57 = add i32 %56, %43 ; [#uses=4] + %58 = ashr i32 %43, 2 ; [#uses=1] + %59 = sub i32 %58, %47 ; [#uses=4] + %60 = add i32 %55, %24 ; [#uses=1] + %61 = sext i32 %8 to i64 ; [#uses=8] + %62 = getelementptr %struct.ImageParameters* %img, i64 0, i32 27, i64 %0, i64 %61 ; [#uses=1] + store i32 %60, i32* %62, align 4 + %63 = add i32 %59, %25 ; [#uses=1] + %64 = getelementptr %struct.ImageParameters* %img, i64 0, i32 27, i64 %1, i64 %61 ; [#uses=1] + store i32 %63, i32* %64, align 4 + %65 = add i32 %57, %26 ; [#uses=1] + %66 = getelementptr %struct.ImageParameters* %img, i64 0, i32 27, i64 %2, i64 %61 ; [#uses=1] + store i32 %65, i32* %66, align 4 + %67 = add i32 %53, %27 ; [#uses=1] + %68 = getelementptr %struct.ImageParameters* %img, i64 0, i32 27, i64 %3, i64 %61 ; [#uses=1] + store i32 %67, i32* %68, align 4 + %69 = sub i32 %27, %53 ; [#uses=1] + %70 = getelementptr %struct.ImageParameters* %img, i64 0, i32 27, i64 %4, i64 %61 ; [#uses=1] + store i32 %69, i32* %70, align 4 + %71 = sub i32 %26, %57 ; [#uses=1] + %72 = getelementptr %struct.ImageParameters* %img, i64 0, i32 27, i64 %5, i64 %61 ; [#uses=1] + store i32 %71, i32* %72, align 4 + %73 = sub i32 %25, %59 ; [#uses=1] + %74 = getelementptr %struct.ImageParameters* %img, i64 0, i32 27, i64 %6, i64 %61 ; [#uses=1] + store i32 %73, i32* %74, align 4 + %75 = sub i32 %24, %55 ; [#uses=1] + %76 = getelementptr %struct.ImageParameters* %img, i64 0, i32 27, i64 %7, i64 %61 ; [#uses=1] + store i32 %75, i32* %76, align 4 + %indvar.next58 = add i32 %i.2.reg2mem.0, 1 ; [#uses=3] + %exitcond59 = icmp eq i32 %indvar.next58, 8 ; [#uses=1] + br i1 %exitcond59, label %codeRepl1.exitStub, label %bb15.bb15_crit_edge.exitStub +} From evan.cheng at apple.com Fri Oct 17 16:00:09 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 17 Oct 2008 21:00:09 -0000 Subject: [llvm-commits] [llvm] r57722 - in /llvm/trunk: include/llvm/Target/TargetInstrDesc.h utils/TableGen/InstrInfoEmitter.cpp utils/TableGen/InstrInfoEmitter.h Message-ID: <200810172100.m9HL09OP023142@zion.cs.uiuc.edu> Author: evancheng Date: Fri Oct 17 16:00:09 2008 New Revision: 57722 URL: http://llvm.org/viewvc/llvm-project?rev=57722&view=rev Log: Add RCBarriers to TargetInstrDesc. It's a list of register classes the given instruction can "clobber". For example, on x86 the call instruction can modify all of the XMM and fp stack registers. TableGen has been taught to generate the lists from instruction definitions. Modified: llvm/trunk/include/llvm/Target/TargetInstrDesc.h llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp llvm/trunk/utils/TableGen/InstrInfoEmitter.h Modified: llvm/trunk/include/llvm/Target/TargetInstrDesc.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetInstrDesc.h?rev=57722&r1=57721&r2=57722&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetInstrDesc.h (original) +++ llvm/trunk/include/llvm/Target/TargetInstrDesc.h Fri Oct 17 16:00:09 2008 @@ -19,6 +19,8 @@ namespace llvm { +class TargetRegisterClass; + //===----------------------------------------------------------------------===// // Machine Operand Flags and Description //===----------------------------------------------------------------------===// @@ -107,16 +109,17 @@ /// points to this struct directly to describe itself. class TargetInstrDesc { public: - unsigned short Opcode; // The opcode number. + unsigned short Opcode; // The opcode number unsigned short NumOperands; // Num of args (may be more if variable_ops) - unsigned short NumDefs; // Num of args that are definitions. + unsigned short NumDefs; // Num of args that are definitions unsigned short SchedClass; // enum identifying instr sched class - const char * Name; // Name of the instruction record in td file. - unsigned Flags; // flags identifying machine instr class + const char * Name; // Name of the instruction record in td file + unsigned Flags; // Flags identifying machine instr class unsigned TSFlags; // Target Specific Flag values const unsigned *ImplicitUses; // Registers implicitly read by this instr const unsigned *ImplicitDefs; // Registers implicitly defined by this instr - const TargetOperandInfo *OpInfo; // 'NumOperands' entries about operands. + const TargetRegisterClass **RCBarriers; // Reg classes completely "clobbered" + const TargetOperandInfo *OpInfo; // 'NumOperands' entries about operands /// getOperandConstraint - Returns the value of the specific constraint if /// it is set. Returns -1 if it is not set. @@ -202,6 +205,17 @@ return ImplicitDefs; } + /// getRegClassBarriers - Return a list of register classes that are + /// completely clobbered by this machine instruction. For example, on X86 + /// the call instructions will completely clobber all the registers in the + /// fp stack and XMM classes. + /// + /// This method returns null if the instruction doesn't completely clobber + /// any register class. + const TargetRegisterClass **getRegClassBarriers() const { + return RCBarriers; + } + /// getSchedClass - Return the scheduling class for this instruction. The /// scheduling class is an index into the InstrItineraryData table. This /// returns zero if there is no known scheduling information for the Modified: llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp?rev=57722&r1=57721&r2=57722&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp Fri Oct 17 16:00:09 2008 @@ -27,6 +27,14 @@ OS << "0 };\n"; } +static void PrintBarriers(std::vector &Barriers, + unsigned Num, std::ostream &OS) { + OS << "static const TargetRegisterClass* Barriers" << Num << "[] = { "; + for (unsigned i = 0, e = Barriers.size(); i != e; ++i) + OS << "&" << getQualifiedName(Barriers[i]) << "RegClass, "; + OS << "NULL };\n"; +} + //===----------------------------------------------------------------------===// // Instruction Itinerary Information. //===----------------------------------------------------------------------===// @@ -137,6 +145,33 @@ } } +void InstrInfoEmitter::DetectRegisterClassBarriers(std::vector &Defs, + const std::vector &RCs, + std::vector &Barriers) { + std::set DefSet; + unsigned NumDefs = Defs.size(); + for (unsigned i = 0; i < NumDefs; ++i) + DefSet.insert(Defs[i]); + + for (unsigned i = 0, e = RCs.size(); i != e; ++i) { + const CodeGenRegisterClass &RC = RCs[i]; + unsigned NumRegs = RC.Elements.size(); + if (NumRegs > NumDefs) + continue; // Can't possibly clobber this RC. + + bool Clobber = true; + for (unsigned j = 0; j < NumRegs; ++j) { + Record *Reg = RC.Elements[j]; + if (!DefSet.count(Reg)) { + Clobber = false; + break; + } + } + if (Clobber) + Barriers.push_back(RC.TheDef); + } +} + //===----------------------------------------------------------------------===// // Main Output. //===----------------------------------------------------------------------===// @@ -151,10 +186,14 @@ CodeGenTarget &Target = CDP.getTargetInfo(); const std::string &TargetName = Target.getName(); Record *InstrInfo = Target.getInstructionSet(); + const std::vector &RCs = Target.getRegisterClasses(); // Keep track of all of the def lists we have emitted already. std::map, unsigned> EmittedLists; unsigned ListNumber = 0; + std::map, unsigned> EmittedBarriers; + unsigned BarrierNumber = 0; + std::map BarriersMap; // Emit all of the instruction's implicit uses and defs. for (CodeGenTarget::inst_iterator II = Target.inst_begin(), @@ -167,6 +206,14 @@ } std::vector Defs = Inst->getValueAsListOfDefs("Defs"); if (!Defs.empty()) { + std::vector RCBarriers; + DetectRegisterClassBarriers(Defs, RCs, RCBarriers); + if (!RCBarriers.empty()) { + unsigned &IB = EmittedBarriers[RCBarriers]; + if (!IB) PrintBarriers(RCBarriers, IB = ++BarrierNumber, OS); + BarriersMap.insert(std::make_pair(Inst, IB)); + } + unsigned &IL = EmittedLists[Defs]; if (!IL) PrintDefList(Defs, IL = ++ListNumber, OS); } @@ -186,7 +233,7 @@ for (unsigned i = 0, e = NumberedInstructions.size(); i != e; ++i) emitRecord(*NumberedInstructions[i], i, InstrInfo, EmittedLists, - OperandInfoIDs, OS); + BarriersMap, OperandInfoIDs, OS); OS << "};\n"; OS << "} // End llvm namespace \n"; } @@ -194,6 +241,7 @@ void InstrInfoEmitter::emitRecord(const CodeGenInstruction &Inst, unsigned Num, Record *InstrInfo, std::map, unsigned> &EmittedLists, + std::map &BarriersMap, const OperandInfoMapTy &OpInfo, std::ostream &OS) { int MinOperands = 0; @@ -257,6 +305,12 @@ else OS << "ImplicitList" << EmittedLists[DefList] << ", "; + std::map::iterator BI = BarriersMap.find(Inst.TheDef); + if (BI == BarriersMap.end()) + OS << "NULL, "; + else + OS << "Barriers" << BI->second << ", "; + // Emit the operand info. std::vector OperandInfo = GetOperandInfo(Inst); if (OperandInfo.empty()) Modified: llvm/trunk/utils/TableGen/InstrInfoEmitter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/InstrInfoEmitter.h?rev=57722&r1=57721&r2=57722&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/InstrInfoEmitter.h (original) +++ llvm/trunk/utils/TableGen/InstrInfoEmitter.h Fri Oct 17 16:00:09 2008 @@ -44,6 +44,7 @@ void emitRecord(const CodeGenInstruction &Inst, unsigned Num, Record *InstrInfo, std::map, unsigned> &EL, + std::map &BM, const OperandInfoMapTy &OpInfo, std::ostream &OS); void emitShiftedValue(Record *R, StringInit *Val, IntInit *Shift, @@ -56,6 +57,10 @@ // Operand information. void EmitOperandInfo(std::ostream &OS, OperandInfoMapTy &OperandInfoIDs); std::vector GetOperandInfo(const CodeGenInstruction &Inst); + + void DetectRegisterClassBarriers(std::vector &Defs, + const std::vector &RCs, + std::vector &Barriers); }; } // End llvm namespace From evan.cheng at apple.com Fri Oct 17 16:02:23 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 17 Oct 2008 21:02:23 -0000 Subject: [llvm-commits] [llvm] r57723 - /llvm/trunk/lib/Target/X86/X86InstrInfo.td Message-ID: <200810172102.m9HL2NMr023253@zion.cs.uiuc.edu> Author: evancheng Date: Fri Oct 17 16:02:22 2008 New Revision: 57723 URL: http://llvm.org/viewvc/llvm-project?rev=57723&view=rev Log: Add implicit defs of XMM8 to XMM15 on 32-bit call instructions. While this is not technically true, it tells tblgen that these instructions "clobber" the entire XMM register file. Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=57723&r1=57722&r2=57723&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Fri Oct 17 16:02:22 2008 @@ -461,7 +461,8 @@ // registers are added manually. let Defs = [EAX, ECX, EDX, FP0, FP1, FP2, FP3, FP4, FP5, FP6, ST0, MM0, MM1, MM2, MM3, MM4, MM5, MM6, MM7, - XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, EFLAGS], + XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, + XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15, EFLAGS], Uses = [ESP] in { def CALLpcrel32 : Ii32<0xE8, RawFrm, (outs), (ins i32imm:$dst,variable_ops), "call\t${dst:call}", []>; From tonic at nondot.org Fri Oct 17 16:07:48 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 21:07:48 -0000 Subject: [llvm-commits] [llvm] r57725 - /llvm/branches/release_24/lib/Target/PowerPC/PPCInstrInfo.td Message-ID: <200810172107.m9HL7mZO023452@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 16:07:48 2008 New Revision: 57725 URL: http://llvm.org/viewvc/llvm-project?rev=57725&view=rev Log: Merge from mainline. Modified: llvm/branches/release_24/lib/Target/PowerPC/PPCInstrInfo.td Modified: llvm/branches/release_24/lib/Target/PowerPC/PPCInstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/Target/PowerPC/PPCInstrInfo.td?rev=57725&r1=57724&r2=57725&view=diff ============================================================================== --- llvm/branches/release_24/lib/Target/PowerPC/PPCInstrInfo.td (original) +++ llvm/branches/release_24/lib/Target/PowerPC/PPCInstrInfo.td Fri Oct 17 16:07:48 2008 @@ -180,14 +180,14 @@ }]>; def MB : SDNodeXFormgetZExtValue(), mb, me); return getI32Imm(mb); }]>; def ME : SDNodeXFormgetZExtValue(), mb, me); return getI32Imm(me); }]>; From gohman at apple.com Fri Oct 17 16:16:08 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 17 Oct 2008 21:16:08 -0000 Subject: [llvm-commits] [llvm] r57726 - in /llvm/trunk/lib/CodeGen/SelectionDAG: SelectionDAGBuild.cpp SelectionDAGBuild.h Message-ID: <200810172116.m9HLG8wG023720@zion.cs.uiuc.edu> Author: djg Date: Fri Oct 17 16:16:08 2008 New Revision: 57726 URL: http://llvm.org/viewvc/llvm-project?rev=57726&view=rev Log: Factor out the code for mapping LLVM IR condition opcodes to ISD condition opcodes into helper functions. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=57726&r1=57725&r2=57726&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Fri Oct 17 16:16:08 2008 @@ -1051,32 +1051,26 @@ } } -/// FindMergedConditions - If Cond is an expression like -void SelectionDAGLowering::FindMergedConditions(Value *Cond, - MachineBasicBlock *TBB, - MachineBasicBlock *FBB, - MachineBasicBlock *CurBB, - unsigned Opc) { - // If this node is not part of the or/and tree, emit it as a branch. - Instruction *BOp = dyn_cast(Cond); - - if (!BOp || !(isa(BOp) || isa(BOp)) || - (unsigned)BOp->getOpcode() != Opc || !BOp->hasOneUse() || - BOp->getParent() != CurBB->getBasicBlock() || - !InBlock(BOp->getOperand(0), CurBB->getBasicBlock()) || - !InBlock(BOp->getOperand(1), CurBB->getBasicBlock())) { - const BasicBlock *BB = CurBB->getBasicBlock(); - - // If the leaf of the tree is a comparison, merge the condition into - // the caseblock. - if (isa(Cond) && - // The operands of the cmp have to be in this block. We don't know - // how to export them from some other block. If this is the first block - // of the sequence, no exporting is needed. - (CurBB == CurMBB || - (isExportableFromCurrentBlock(BOp->getOperand(0), BB) && - isExportableFromCurrentBlock(BOp->getOperand(1), BB)))) { - BOp = cast(Cond); +/// EmitBranchForMergedCondition - Helper method for FindMergedConditions. +/// This function emits a branch and is used at the leaves of an OR or an +/// AND operator tree. +/// +void +SelectionDAGLowering::EmitBranchForMergedCondition(Value *Cond, + MachineBasicBlock *TBB, + MachineBasicBlock *FBB, + MachineBasicBlock *CurBB) { + const BasicBlock *BB = CurBB->getBasicBlock(); + + // If the leaf of the tree is a comparison, merge the condition into + // the caseblock. + if (CmpInst *BOp = dyn_cast(Cond)) { + // The operands of the cmp have to be in this block. We don't know + // how to export them from some other block. If this is the first block + // of the sequence, no exporting is needed. + if (CurBB == CurMBB || + (isExportableFromCurrentBlock(BOp->getOperand(0), BB) && + isExportableFromCurrentBlock(BOp->getOperand(1), BB))) { ISD::CondCode Condition; if (ICmpInst *IC = dyn_cast(Cond)) { Condition = getICmpCondCode(IC->getPredicate()); @@ -1086,21 +1080,37 @@ Condition = ISD::SETEQ; // silence warning. assert(0 && "Unknown compare instruction"); } - - CaseBlock CB(Condition, BOp->getOperand(0), + + CaseBlock CB(Condition, BOp->getOperand(0), BOp->getOperand(1), NULL, TBB, FBB, CurBB); SwitchCases.push_back(CB); return; } - - // Create a CaseBlock record representing this branch. - CaseBlock CB(ISD::SETEQ, Cond, ConstantInt::getTrue(), - NULL, TBB, FBB, CurBB); - SwitchCases.push_back(CB); + } + + // Create a CaseBlock record representing this branch. + CaseBlock CB(ISD::SETEQ, Cond, ConstantInt::getTrue(), + NULL, TBB, FBB, CurBB); + SwitchCases.push_back(CB); +} + +/// FindMergedConditions - If Cond is an expression like +void SelectionDAGLowering::FindMergedConditions(Value *Cond, + MachineBasicBlock *TBB, + MachineBasicBlock *FBB, + MachineBasicBlock *CurBB, + unsigned Opc) { + // If this node is not part of the or/and tree, emit it as a branch. + Instruction *BOp = dyn_cast(Cond); + if (!BOp || !(isa(BOp) || isa(BOp)) || + (unsigned)BOp->getOpcode() != Opc || !BOp->hasOneUse() || + BOp->getParent() != CurBB->getBasicBlock() || + !InBlock(BOp->getOperand(0), CurBB->getBasicBlock()) || + !InBlock(BOp->getOperand(1), CurBB->getBasicBlock())) { + EmitBranchForMergedCondition(Cond, TBB, FBB, CurBB); return; } - // Create TmpBB after CurBB. MachineFunction::iterator BBI = CurBB; MachineFunction &MF = DAG.getMachineFunction(); Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h?rev=57726&r1=57725&r2=57726&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h Fri Oct 17 16:16:08 2008 @@ -405,6 +405,9 @@ void FindMergedConditions(Value *Cond, MachineBasicBlock *TBB, MachineBasicBlock *FBB, MachineBasicBlock *CurBB, unsigned Opc); + void EmitBranchForMergedCondition(Value *Cond, MachineBasicBlock *TBB, + MachineBasicBlock *FBB, + MachineBasicBlock *CurBB); bool ShouldEmitAsBranches(const std::vector &Cases); bool isExportableFromCurrentBlock(Value *V, const BasicBlock *FromBB); void ExportFromCurrentBlock(Value *V); From tonic at nondot.org Fri Oct 17 16:19:33 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 21:19:33 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57727 - /llvm-gcc-4.2/branches/release_24/README.LLVM Message-ID: <200810172119.m9HLJXLO023838@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 16:19:33 2008 New Revision: 57727 URL: http://llvm.org/viewvc/llvm-project?rev=57727&view=rev Log: Set to 2.4 instead of generic. Modified: llvm-gcc-4.2/branches/release_24/README.LLVM Modified: llvm-gcc-4.2/branches/release_24/README.LLVM URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/release_24/README.LLVM?rev=57727&r1=57726&r2=57727&view=diff ============================================================================== --- llvm-gcc-4.2/branches/release_24/README.LLVM (original) +++ llvm-gcc-4.2/branches/release_24/README.LLVM Fri Oct 17 16:19:33 2008 @@ -129,9 +129,9 @@ If you want LLVM to include an identifying marker in the --version output, build llvm-gcc with LLVM_VERSION_INFO=XXX. For example, to build the LLVM - 2.3 Release front-end, use 'make LLVM_VERSION_INFO=2.3'. This will cause the + 2.4 Release front-end, use 'make LLVM_VERSION_INFO=2.3'. This will cause the front-end to print: "gcc version 4.2.1 (Based on Apple Inc. build 5555) - (LLVM build 2.3)" as the version number. + (LLVM build 2.4)" as the version number. BUILDOPTIONS=LLVM_VERSION_INFO=whatever @@ -146,7 +146,7 @@ $ mkdir obj $ mkdir install $ cd obj -$ ../llvm-gcc4-x.y.source/configure --prefix=`pwd`/../install --program-prefix=llvm- \ +$ ../llvm-gcc4.2-2.4.source/configure --prefix=`pwd`/../install --program-prefix=llvm- \ --enable-llvm=$LLVMOBJDIR --enable-languages=c,c++$EXTRALANGS $TARGETOPTIONS $ make $BUILDOPTIONS $ make install From tonic at nondot.org Fri Oct 17 16:21:09 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 21:21:09 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57728 - /llvm-gcc-4.2/branches/release_24/README.LLVM Message-ID: <200810172121.m9HLL9kC023908@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 16:21:09 2008 New Revision: 57728 URL: http://llvm.org/viewvc/llvm-project?rev=57728&view=rev Log: Fix typo Modified: llvm-gcc-4.2/branches/release_24/README.LLVM Modified: llvm-gcc-4.2/branches/release_24/README.LLVM URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/release_24/README.LLVM?rev=57728&r1=57727&r2=57728&view=diff ============================================================================== --- llvm-gcc-4.2/branches/release_24/README.LLVM (original) +++ llvm-gcc-4.2/branches/release_24/README.LLVM Fri Oct 17 16:21:09 2008 @@ -129,7 +129,7 @@ If you want LLVM to include an identifying marker in the --version output, build llvm-gcc with LLVM_VERSION_INFO=XXX. For example, to build the LLVM - 2.4 Release front-end, use 'make LLVM_VERSION_INFO=2.3'. This will cause the + 2.4 Release front-end, use 'make LLVM_VERSION_INFO=2.4'. This will cause the front-end to print: "gcc version 4.2.1 (Based on Apple Inc. build 5555) (LLVM build 2.4)" as the version number. From tonic at nondot.org Fri Oct 17 16:21:51 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 21:21:51 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57729 - /llvm-gcc-4.2/trunk/README.LLVM Message-ID: <200810172121.m9HLLp54023940@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 16:21:51 2008 New Revision: 57729 URL: http://llvm.org/viewvc/llvm-project?rev=57729&view=rev Log: Set to 4.2 in instructions. Upgrade to 2.5. Modified: llvm-gcc-4.2/trunk/README.LLVM Modified: llvm-gcc-4.2/trunk/README.LLVM URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/README.LLVM?rev=57729&r1=57728&r2=57729&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/README.LLVM (original) +++ llvm-gcc-4.2/trunk/README.LLVM Fri Oct 17 16:21:51 2008 @@ -129,9 +129,9 @@ If you want LLVM to include an identifying marker in the --version output, build llvm-gcc with LLVM_VERSION_INFO=XXX. For example, to build the LLVM - 2.3 Release front-end, use 'make LLVM_VERSION_INFO=2.3'. This will cause the + 2.5 Release front-end, use 'make LLVM_VERSION_INFO=2.5'. This will cause the front-end to print: "gcc version 4.2.1 (Based on Apple Inc. build 5555) - (LLVM build 2.3)" as the version number. + (LLVM build 2.5)" as the version number. BUILDOPTIONS=LLVM_VERSION_INFO=whatever @@ -146,7 +146,7 @@ $ mkdir obj $ mkdir install $ cd obj -$ ../llvm-gcc4-x.y.source/configure --prefix=`pwd`/../install --program-prefix=llvm- \ +$ ../llvm-gcc4.2-x.y.source/configure --prefix=`pwd`/../install --program-prefix=llvm- \ --enable-llvm=$LLVMOBJDIR --enable-languages=c,c++$EXTRALANGS $TARGETOPTIONS $ make $BUILDOPTIONS $ make install From tonic at nondot.org Fri Oct 17 16:36:30 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 17 Oct 2008 21:36:30 -0000 Subject: [llvm-commits] [llvm] r57732 - in /llvm/branches/release_24: docs/LangRef.html lib/AsmParser/LLLexer.cpp test/Assembler/vector-cmp.ll test/CodeGen/X86/2008-07-23-VSetCC.ll test/CodeGen/X86/vfcmp.ll test/Transforms/ConstProp/2008-07-07-VectorCompare.ll Message-ID: <200810172136.m9HLaUmf024781@zion.cs.uiuc.edu> Author: tbrethou Date: Fri Oct 17 16:36:29 2008 New Revision: 57732 URL: http://llvm.org/viewvc/llvm-project?rev=57732&view=rev Log: remove v[if]cmp functionality from the 2.4 release. These instructions will be removed or substantially changes in mainline after the 2.4 release and we don't want to have to support these for backwards compatibility purposes. Patch by Chris. Modified: llvm/branches/release_24/docs/LangRef.html llvm/branches/release_24/lib/AsmParser/LLLexer.cpp llvm/branches/release_24/test/Assembler/vector-cmp.ll llvm/branches/release_24/test/CodeGen/X86/2008-07-23-VSetCC.ll llvm/branches/release_24/test/CodeGen/X86/vfcmp.ll llvm/branches/release_24/test/Transforms/ConstProp/2008-07-07-VectorCompare.ll Modified: llvm/branches/release_24/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/docs/LangRef.html?rev=57732&r1=57731&r2=57732&view=diff ============================================================================== --- llvm/branches/release_24/docs/LangRef.html (original) +++ llvm/branches/release_24/docs/LangRef.html Fri Oct 17 16:36:29 2008 @@ -147,8 +147,6 @@
                                                                                1. 'icmp' Instruction
                                                                                2. 'fcmp' Instruction
                                                                                3. -
                                                                                4. 'vicmp' Instruction
                                                                                5. -
                                                                                6. 'vfcmp' Instruction
                                                                                7. 'phi' Instruction
                                                                                8. 'select' Instruction
                                                                                9. 'call' Instruction
                                                                                10. @@ -1778,12 +1776,6 @@
                                                                                  fcmp COND ( VAL1, VAL2 )
                                                                                  Performs the fcmp operation on constants.
                                                                                  -
                                                                                  vicmp COND ( VAL1, VAL2 )
                                                                                  -
                                                                                  Performs the vicmp operation on constants.
                                                                                  - -
                                                                                  vfcmp COND ( VAL1, VAL2 )
                                                                                  -
                                                                                  Performs the vfcmp operation on constants.
                                                                                  -
                                                                                  extractelement ( VAL, IDX )
                                                                                  Perform the extractelement @@ -4053,106 +4045,6 @@ -
                                                                                  -
                                                                                  Syntax:
                                                                                  -
                                                                                    <result> = vicmp <cond> <ty> <op1>, <op2>   ; yields {ty}:result
                                                                                  -
                                                                                  -
                                                                                  Overview:
                                                                                  -

                                                                                  The 'vicmp' instruction returns an integer vector value based on -element-wise comparison of its two integer vector operands.

                                                                                  -
                                                                                  Arguments:
                                                                                  -

                                                                                  The 'vicmp' instruction takes three operands. The first operand is -the condition code indicating the kind of comparison to perform. It is not -a value, just a keyword. The possible condition code are: -

                                                                                    -
                                                                                  1. eq: equal
                                                                                  2. -
                                                                                  3. ne: not equal
                                                                                  4. -
                                                                                  5. ugt: unsigned greater than
                                                                                  6. -
                                                                                  7. uge: unsigned greater or equal
                                                                                  8. -
                                                                                  9. ult: unsigned less than
                                                                                  10. -
                                                                                  11. ule: unsigned less or equal
                                                                                  12. -
                                                                                  13. sgt: signed greater than
                                                                                  14. -
                                                                                  15. sge: signed greater or equal
                                                                                  16. -
                                                                                  17. slt: signed less than
                                                                                  18. -
                                                                                  19. sle: signed less or equal
                                                                                  20. -
                                                                                  -

                                                                                  The remaining two arguments must be vector or -integer typed. They must also be identical types.

                                                                                  -
                                                                                  Semantics:
                                                                                  -

                                                                                  The 'vicmp' instruction compares op1 and op2 -according to the condition code given as cond. The comparison yields a -vector of integer result, of -identical type as the values being compared. The most significant bit in each -element is 1 if the element-wise comparison evaluates to true, and is 0 -otherwise. All other bits of the result are undefined. The condition codes -are evaluated identically to the 'icmp' -instruction. - -

                                                                                  Example:
                                                                                  -
                                                                                  -  <result> = vicmp eq <2 x i32> < i32 4, i32 0>, < i32 5, i32 0>   ; yields: result=<2 x i32> < i32 0, i32 -1 >
                                                                                  -  <result> = vicmp ult <2 x i8 > < i8 1, i8 2>, < i8 2, i8 2 >        ; yields: result=<2 x i8> < i8 -1, i8 0 >
                                                                                  -
                                                                                  -
                                                                                  - - - -
                                                                                  -
                                                                                  Syntax:
                                                                                  -
                                                                                    <result> = vfcmp <cond> <ty> <op1>, <op2>
                                                                                  -
                                                                                  Overview:
                                                                                  -

                                                                                  The 'vfcmp' instruction returns an integer vector value based on -element-wise comparison of its two floating point vector operands. The output -elements have the same width as the input elements.

                                                                                  -
                                                                                  Arguments:
                                                                                  -

                                                                                  The 'vfcmp' instruction takes three operands. The first operand is -the condition code indicating the kind of comparison to perform. It is not -a value, just a keyword. The possible condition code are: -

                                                                                    -
                                                                                  1. false: no comparison, always returns false
                                                                                  2. -
                                                                                  3. oeq: ordered and equal
                                                                                  4. -
                                                                                  5. ogt: ordered and greater than
                                                                                  6. -
                                                                                  7. oge: ordered and greater than or equal
                                                                                  8. -
                                                                                  9. olt: ordered and less than
                                                                                  10. -
                                                                                  11. ole: ordered and less than or equal
                                                                                  12. -
                                                                                  13. one: ordered and not equal
                                                                                  14. -
                                                                                  15. ord: ordered (no nans)
                                                                                  16. -
                                                                                  17. ueq: unordered or equal
                                                                                  18. -
                                                                                  19. ugt: unordered or greater than
                                                                                  20. -
                                                                                  21. uge: unordered or greater than or equal
                                                                                  22. -
                                                                                  23. ult: unordered or less than
                                                                                  24. -
                                                                                  25. ule: unordered or less than or equal
                                                                                  26. -
                                                                                  27. une: unordered or not equal
                                                                                  28. -
                                                                                  29. uno: unordered (either nans)
                                                                                  30. -
                                                                                  31. true: no comparison, always returns true
                                                                                  32. -
                                                                                  -

                                                                                  The remaining two arguments must be vector of -floating point typed. They must also be identical -types.

                                                                                  -
                                                                                  Semantics:
                                                                                  -

                                                                                  The 'vfcmp' instruction compares op1 and op2 -according to the condition code given as cond. The comparison yields a -vector of integer result, with -an identical number of elements as the values being compared, and each element -having identical with to the width of the floating point elements. The most -significant bit in each element is 1 if the element-wise comparison evaluates to -true, and is 0 otherwise. All other bits of the result are undefined. The -condition codes are evaluated identically to the -'fcmp' instruction. - -

                                                                                  Example:
                                                                                  -
                                                                                  -  <result> = vfcmp oeq <2 x float> < float 4, float 0 >, < float 5, float 0 >       ; yields: result=<2 x i32> < i32 0, i32 -1 >
                                                                                  -  <result> = vfcmp ult <2 x double> < double 1, double 2 >, < double 2, double 2>   ; yields: result=<2 x i64> < i64 -1, i64 0 >
                                                                                  -
                                                                                  -
                                                                                  - - - Modified: llvm/branches/release_24/lib/AsmParser/LLLexer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/lib/AsmParser/LLLexer.cpp?rev=57732&r1=57731&r2=57732&view=diff ============================================================================== --- llvm/branches/release_24/lib/AsmParser/LLLexer.cpp (original) +++ llvm/branches/release_24/lib/AsmParser/LLLexer.cpp Fri Oct 17 16:36:29 2008 @@ -572,8 +572,6 @@ INSTKEYWORD("xor", BinaryOpVal, Xor, XOR); INSTKEYWORD("icmp", OtherOpVal, ICmp, ICMP); INSTKEYWORD("fcmp", OtherOpVal, FCmp, FCMP); - INSTKEYWORD("vicmp", OtherOpVal, VICmp, VICMP); - INSTKEYWORD("vfcmp", OtherOpVal, VFCmp, VFCMP); INSTKEYWORD("phi", OtherOpVal, PHI, PHI_TOK); INSTKEYWORD("call", OtherOpVal, Call, CALL); Modified: llvm/branches/release_24/test/Assembler/vector-cmp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/test/Assembler/vector-cmp.ll?rev=57732&r1=57731&r2=57732&view=diff ============================================================================== --- llvm/branches/release_24/test/Assembler/vector-cmp.ll (original) +++ llvm/branches/release_24/test/Assembler/vector-cmp.ll Fri Oct 17 16:36:29 2008 @@ -1,16 +1,4 @@ -; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | grep {global.*vicmp slt} -; PR2317 +; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" target triple = "i686-apple-darwin9.2.2" -define <4 x i32> @foo(<4 x float> %a, <4 x float> %b) nounwind { -entry: - %cmp = vfcmp olt <4 x float> %a, %b ; <4 x i32> [#uses=1] - ret <4 x i32> %cmp -} - -global <4 x i32> vicmp slt ( <4 x i32> , <4 x i32> ) ; - - at B = external global i32; - -global <4 x i32> vicmp slt ( <4 x i32> , <4 x i32> ) ; Modified: llvm/branches/release_24/test/CodeGen/X86/2008-07-23-VSetCC.ll URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/test/CodeGen/X86/2008-07-23-VSetCC.ll?rev=57732&r1=57731&r2=57732&view=diff ============================================================================== --- llvm/branches/release_24/test/CodeGen/X86/2008-07-23-VSetCC.ll (original) +++ llvm/branches/release_24/test/CodeGen/X86/2008-07-23-VSetCC.ll Fri Oct 17 16:36:29 2008 @@ -1,30 +1,3 @@ ; RUN: llvm-as < %s | llc -march=x86 -mcpu=pentium -; PR2575 - -define void @entry(i32 %m_task_id, i32 %start_x, i32 %end_x) nounwind { - br i1 false, label %bb.nph, label %._crit_edge - -bb.nph: ; preds = %bb.nph, %0 - vicmp sgt <4 x i32> zeroinitializer, < i32 -128, i32 -128, i32 -128, i32 -128 > ; <<4 x i32>>:1 [#uses=1] - extractelement <4 x i32> %1, i32 3 ; :2 [#uses=1] - lshr i32 %2, 31 ; :3 [#uses=1] - trunc i32 %3 to i1 ; :4 [#uses=1] - select i1 %4, i32 -1, i32 0 ; :5 [#uses=1] - insertelement <4 x i32> zeroinitializer, i32 %5, i32 3 ; <<4 x i32>>:6 [#uses=1] - and <4 x i32> zeroinitializer, %6 ; <<4 x i32>>:7 [#uses=1] - bitcast <4 x i32> %7 to <4 x float> ; <<4 x float>>:8 [#uses=1] - mul <4 x float> zeroinitializer, %8 ; <<4 x float>>:9 [#uses=1] - bitcast <4 x float> %9 to <4 x i32> ; <<4 x i32>>:10 [#uses=1] - or <4 x i32> %10, zeroinitializer ; <<4 x i32>>:11 [#uses=1] - bitcast <4 x i32> %11 to <4 x float> ; <<4 x float>>:12 [#uses=1] - mul <4 x float> %12, < float 1.000000e+02, float 1.000000e+02, float 1.000000e+02, float 1.000000e+02 > ; <<4 x float>>:13 [#uses=1] - sub <4 x float> %13, < float 1.000000e+02, float 1.000000e+02, float 1.000000e+02, float 1.000000e+02 > ; <<4 x float>>:14 [#uses=1] - extractelement <4 x float> %14, i32 3 ; :15 [#uses=1] - call float @fmaxf( float 0.000000e+00, float %15 ) ; :16 [#uses=0] - br label %bb.nph - -._crit_edge: ; preds = %0 - ret void -} declare float @fmaxf(float, float) Modified: llvm/branches/release_24/test/CodeGen/X86/vfcmp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/test/CodeGen/X86/vfcmp.ll?rev=57732&r1=57731&r2=57732&view=diff ============================================================================== --- llvm/branches/release_24/test/CodeGen/X86/vfcmp.ll (original) +++ llvm/branches/release_24/test/CodeGen/X86/vfcmp.ll Fri Oct 17 16:36:29 2008 @@ -1,13 +1 @@ ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -; PR2620 - -define void @t(i32 %m_task_id, i32 %start_x, i32 %end_x) nounwind { - vfcmp olt <2 x double> zeroinitializer, zeroinitializer ; <<2 x i64>>:1 [#uses=1] - extractelement <2 x i64> %1, i32 1 ; :2 [#uses=1] - lshr i64 %2, 63 ; :3 [#uses=1] - trunc i64 %3 to i1 ; :4 [#uses=1] - zext i1 %4 to i8 ; :5 [#uses=1] - insertelement <2 x i8> zeroinitializer, i8 %5, i32 1 ; <<2 x i8>>:6 [#uses=1] - store <2 x i8> %6, <2 x i8>* null - ret void -} Modified: llvm/branches/release_24/test/Transforms/ConstProp/2008-07-07-VectorCompare.ll URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_24/test/Transforms/ConstProp/2008-07-07-VectorCompare.ll?rev=57732&r1=57731&r2=57732&view=diff ============================================================================== --- llvm/branches/release_24/test/Transforms/ConstProp/2008-07-07-VectorCompare.ll (original) +++ llvm/branches/release_24/test/Transforms/ConstProp/2008-07-07-VectorCompare.ll Fri Oct 17 16:36:29 2008 @@ -1,28 +1,3 @@ ; RUN: llvm-as < %s | opt -constprop -disable-output -; PR2529 -define <4 x i32> @test1(i32 %argc, i8** %argv) { -entry: - %foo = vicmp slt <4 x i32> undef, - ret <4 x i32> %foo -} -define <4 x i32> @test2(i32 %argc, i8** %argv) { -entry: - %foo = vicmp slt <4 x i32> , - ret <4 x i32> %foo -} - - -define <4 x i32> @test3() { - %foo = vfcmp ueq <4 x float> , - ret <4 x i32> %foo -} - -define <4 x i32> @test4() { - %foo = vfcmp ueq <4 x float> , - - ret <4 x i32> %foo -} From gohman at apple.com Fri Oct 17 16:38:40 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 17 Oct 2008 21:38:40 -0000 Subject: [llvm-commits] [llvm] r57733 - /llvm/trunk/lib/Target/X86/README.txt Message-ID: <200810172138.m9HLceQR024874@zion.cs.uiuc.edu> Author: djg Date: Fri Oct 17 16:38:40 2008 New Revision: 57733 URL: http://llvm.org/viewvc/llvm-project?rev=57733&view=rev Log: This is done. Modified: llvm/trunk/lib/Target/X86/README.txt Modified: llvm/trunk/lib/Target/X86/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README.txt?rev=57733&r1=57732&r2=57733&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/README.txt (original) +++ llvm/trunk/lib/Target/X86/README.txt Fri Oct 17 16:38:40 2008 @@ -369,16 +369,6 @@ //===---------------------------------------------------------------------===// -If shorter, we should use things like: -movzwl %ax, %eax -instead of: -andl $65535, %EAX - -The former can also be used when the two-addressy nature of the 'and' would -require a copy to be inserted (in X86InstrInfo::convertToThreeAddress). - -//===---------------------------------------------------------------------===// - For this: int test(int a) From gohman at apple.com Fri Oct 17 16:39:27 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 17 Oct 2008 21:39:27 -0000 Subject: [llvm-commits] [llvm] r57734 - /llvm/trunk/lib/Target/README.txt Message-ID: <200810172139.m9HLdRSX024916@zion.cs.uiuc.edu> Author: djg Date: Fri Oct 17 16:39:27 2008 New Revision: 57734 URL: http://llvm.org/viewvc/llvm-project?rev=57734&view=rev Log: This is now partly done. Modified: llvm/trunk/lib/Target/README.txt Modified: llvm/trunk/lib/Target/README.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/README.txt?rev=57734&r1=57733&r2=57734&view=diff ============================================================================== --- llvm/trunk/lib/Target/README.txt (original) +++ llvm/trunk/lib/Target/README.txt Fri Oct 17 16:39:27 2008 @@ -799,7 +799,7 @@ } } -On X86-64, we only handle f3/f4 right. On x86-32, several of these +On X86-64, we only handle f2/f3/f4 right. On x86-32, a few of these generate truly horrible code, instead of using shld and friends. On ARM, we end up with calls to L___lshrdi3/L___ashldi3 in f, which is badness. PPC64 misses f, f5 and f6. CellSPU aborts in isel. From gohman at apple.com Fri Oct 17 16:42:46 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 17 Oct 2008 21:42:46 -0000 Subject: [llvm-commits] [llvm] r57735 - /llvm/trunk/include/llvm/InstrTypes.h Message-ID: <200810172142.m9HLgkjA025019@zion.cs.uiuc.edu> Author: djg Date: Fri Oct 17 16:42:45 2008 New Revision: 57735 URL: http://llvm.org/viewvc/llvm-project?rev=57735&view=rev Log: Use the opcode predicates, instead of duplicating the code. Modified: llvm/trunk/include/llvm/InstrTypes.h Modified: llvm/trunk/include/llvm/InstrTypes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InstrTypes.h?rev=57735&r1=57734&r2=57735&view=diff ============================================================================== --- llvm/trunk/include/llvm/InstrTypes.h (original) +++ llvm/trunk/include/llvm/InstrTypes.h Fri Oct 17 16:42:45 2008 @@ -73,7 +73,7 @@ // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const TerminatorInst *) { return true; } static inline bool classof(const Instruction *I) { - return I->getOpcode() >= TermOpsBegin && I->getOpcode() < TermOpsEnd; + return I->isTerminator(); } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); @@ -237,7 +237,7 @@ // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const BinaryOperator *) { return true; } static inline bool classof(const Instruction *I) { - return I->getOpcode() >= BinaryOpsBegin && I->getOpcode() < BinaryOpsEnd; + return I->isBinaryOp(); } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); @@ -483,7 +483,7 @@ /// @brief Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const CastInst *) { return true; } static inline bool classof(const Instruction *I) { - return I->getOpcode() >= CastOpsBegin && I->getOpcode() < CastOpsEnd; + return I->isCast(); } static inline bool classof(const Value *V) { return isa(V) && classof(cast(V)); From criswell at uiuc.edu Fri Oct 17 17:04:19 2008 From: criswell at uiuc.edu (John Criswell) Date: Fri, 17 Oct 2008 22:04:19 -0000 Subject: [llvm-commits] [poolalloc] r57738 - in /poolalloc/trunk/lib/PoolAllocate: PASimple.cpp PoolAllocate.cpp Message-ID: <200810172204.m9HM4J1M025817@zion.cs.uiuc.edu> Author: criswell Date: Fri Oct 17 17:04:19 2008 New Revision: 57738 URL: http://llvm.org/viewvc/llvm-project?rev=57738&view=rev Log: When doing simple pool allocation or when doing real pool allocation for SAFECode, use Top-Down EQ Really-Cool results. Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PASimple.cpp?rev=57738&r1=57737&r2=57738&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Fri Oct 17 17:04:19 2008 @@ -73,9 +73,9 @@ void PoolAllocateSimple::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired(); - AU.addRequiredTransitive(); + AU.addRequiredTransitive(); - AU.addPreserved(); + AU.addPreserved(); AU.setPreservesAll(); } @@ -101,7 +101,7 @@ if (M.begin() == M.end()) return false; // Get the Target Data information and the Graphs - Graphs = &getAnalysis(); // folded inlined CBU graphs + Graphs = &getAnalysis(); // folded inlined CBU graphs assert (Graphs && "No ECGraphs pass available!\n"); TargetData & TD = getAnalysis(); Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=57738&r1=57737&r2=57738&view=diff ============================================================================== --- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original) +++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Fri Oct 17 17:04:19 2008 @@ -87,8 +87,13 @@ } void PoolAllocate::getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired(); - AU.addPreserved(); + if (SAFECodeEnabled) { + AU.addRequired(); + AU.addPreserved(); + } else { + AU.addRequired(); + AU.addPreserved(); + } // Preserve the pool information across passes if (SAFECodeEnabled) @@ -100,6 +105,10 @@ bool PoolAllocate::runOnModule(Module &M) { if (M.begin() == M.end()) return false; CurModule = &M; + + if (SAFECodeEnabled) + Graphs = &getAnalysis(); // folded inlined CBU graphs + else Graphs = &getAnalysis(); // folded inlined CBU graphs CurHeuristic = Heuristic::create(); From alenhar2 at cs.uiuc.edu Fri Oct 17 17:29:55 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Fri, 17 Oct 2008 22:29:55 -0000 Subject: [llvm-commits] [poolalloc] r57740 - in /poolalloc/trunk/lib/DSA: BottomUpClosure.cpp DataStructure.cpp StdLibPass.cpp Message-ID: <200810172229.m9HMTtnW026993@zion.cs.uiuc.edu> Author: alenhar2 Date: Fri Oct 17 17:29:55 2008 New Revision: 57740 URL: http://llvm.org/viewvc/llvm-project?rev=57740&view=rev Log: make poolalloc pass when it checks for call graph info on functions that previously were removed by removeIdenticalCalls. This slows down dsa some, but makes the call graph results easier to deal with. Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp poolalloc/trunk/lib/DSA/DataStructure.cpp poolalloc/trunk/lib/DSA/StdLibPass.cpp Modified: poolalloc/trunk/lib/DSA/BottomUpClosure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/BottomUpClosure.cpp?rev=57740&r1=57739&r2=57740&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/BottomUpClosure.cpp (original) +++ poolalloc/trunk/lib/DSA/BottomUpClosure.cpp Fri Oct 17 17:29:55 2008 @@ -437,12 +437,10 @@ CalledFuncs.resize(uid - CalledFuncs.begin()); } - //cerr << "at " << TheCall << " with " << CalledFuncs.size() << "\n"; - DSGraph *GI; for (std::vector::iterator ii = CalledFuncs.begin(), ee = CalledFuncs.end(); - ii != ee; ++ii) + ii != ee; ++ii) callee_add(TheCall, *ii); if (CalledFuncs.size() == 1 && (isComplete || hasDSGraph(*CalledFuncs[0]))) { Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=57740&r1=57739&r2=57740&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/DataStructure.cpp (original) +++ poolalloc/trunk/lib/DSA/DataStructure.cpp Fri Oct 17 17:29:55 2008 @@ -1058,7 +1058,7 @@ DSNode *DN = new DSNode(*SN, &Dest, true /* Null out all links */); DN->maskNodeTypes(BitsToKeep); NH = DN; - DOUT << "getClonedNH: " << SN << " becomes " << DN << "\n"; + //DOUT << "getClonedNH: " << SN << " becomes " << DN << "\n"; #if 1 #ifdef LLVA_KERNEL //Again we have created a new DSNode, we need to fill in the @@ -2001,6 +2001,9 @@ } static void removeIdenticalCalls(std::list &Calls) { + // Poolalloc doesn't like call sites to be removed if they are indirect + // disable this so all indirect call sites get call graph info + return; // Remove trivially identical function calls Calls.sort(); // Sort by callee as primary key! Modified: poolalloc/trunk/lib/DSA/StdLibPass.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/StdLibPass.cpp?rev=57740&r1=57739&r2=57740&view=diff ============================================================================== --- poolalloc/trunk/lib/DSA/StdLibPass.cpp (original) +++ poolalloc/trunk/lib/DSA/StdLibPass.cpp Fri Oct 17 17:29:55 2008 @@ -66,7 +66,12 @@ {"sprintf", {NRET_YARGS, NRET_YNARGS, NRET_NARGS, false, false, false}}, {"snprintf", {NRET_YARGS, NRET_YNARGS, NRET_NARGS, false, false, false}}, {"fprintf", {NRET_YARGS, NRET_YNARGS, NRET_NARGS, false, false, false}}, - {"puts", {NRET_NARGS, NRET_NARGS, NRET_NARGS, false, false, false}}, + {"puts", {NRET_YARGS, NRET_NARGS, NRET_NARGS, false, false, false}}, + {"putc", {NRET_NARGS, NRET_NARGS, NRET_NARGS, false, false, false}}, + {"putchar", {NRET_NARGS, NRET_NARGS, NRET_NARGS, false, false, false}}, + {"fputs", {NRET_YARGS, NRET_NYARGS, NRET_NARGS, false, false, false}}, + {"fputc", {NRET_YARGS, NRET_NYARGS, NRET_NARGS, false, false, false}}, + {"calloc", {NRET_NARGS, YRET_NARGS, YRET_NARGS, false, false, false}}, {"malloc", {NRET_NARGS, YRET_NARGS, YRET_NARGS, false, false, false}}, @@ -103,6 +108,9 @@ {"strrchr", {YRET_YARGS, NRET_NARGS, NRET_NARGS, false, true, true}}, {"wcsrchr", {YRET_YARGS, NRET_NARGS, NRET_NARGS, false, true, true}}, {"strchrhul", {YRET_YARGS, NRET_NARGS, NRET_NARGS, false, true, true}}, + {"strcat", {YRET_YARGS, YRET_YARGS, NRET_NARGS, true, true, true}}, + {"strncat", {YRET_YARGS, YRET_YARGS, NRET_NARGS, true, true, true}}, + {"fwrite", {NRET_YARGS, NRET_NYARGS, NRET_NARGS, false, false, false}}, {"fread", {NRET_NYARGS, NRET_YARGS, NRET_NARGS, false, false, false}}, From lattner at apple.com Fri Oct 17 17:55:21 2008 From: lattner at apple.com (Tanya Lattner) Date: Fri, 17 Oct 2008 15:55:21 -0700 Subject: [llvm-commits] [llvm] r57714 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfWriter.cpp test/DebugInfo/2008-10-17-C++DebugCrash.ll In-Reply-To: <200810171848.m9HImxLk017802@zion.cs.uiuc.edu> References: <200810171848.m9HImxLk017802@zion.cs.uiuc.edu> Message-ID: <27787933-D79D-4282-9D12-09E408721EE8@apple.com> Nicholas thinks this should be in 2.4. Can I get approval from a code owner please? -Tanya On Oct 17, 2008, at 11:48 AM, Bill Wendling wrote: > Author: void > Date: Fri Oct 17 13:48:57 2008 > New Revision: 57714 > > URL: http://llvm.org/viewvc/llvm-project?rev=57714&view=rev > Log: > The Dwarf writer was comparing mangled and unmangled names for C++ > code when we > have an unreachable block in a function. This was triggering the > assert. This is > a horrid hack to cover this up. > > Oh! for a good debug info architecture! > > Added: > llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll > Modified: > llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp > > Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=57714&r1=57713&r2=57714&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original) > +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Fri Oct 17 > 13:48:57 2008 > @@ -2060,8 +2060,11 @@ > return; > } > } > - > +#if 0 > + // FIXME: This is causing an abort because C++ mangled names > are compared > + // with their unmangled counterparts. See PR2885. Don't do this > assert. > assert(0 && "Couldn't find DIE for machine function!"); > +#endif > } > > /// EmitInitial - Emit initial Dwarf declarations. This is > necessary for cc > > Added: llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/2008-10-17-C%2B%2BDebugCrash.ll?rev=57714&view=auto > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll (added) > +++ llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll Fri Oct 17 > 13:48:57 2008 > @@ -0,0 +1,58 @@ > +; RUN: llvm-as < %s | llc > +; PR2885 > + > +;; NOTE: This generates bad debug info in this case! But that's > better than > +;; ICEing. > + > +; ModuleID = 'bug.bc' > +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32- > i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64- > f80:32:32" > +target triple = "i386-pc-linux-gnu" > + %llvm.dbg.anchor.type = type { i32, i32 } > + %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, > i64, i64, i32, i32 } > + %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8* } > + %llvm.dbg.subprogram.type = type { i32, { }*, { }*, i8*, i8*, i8*, > { }*, i32, { }*, i1, i1 } > + %llvm.dbg.variable.type = type { i32, { }*, i8*, { }*, i32, { }* } > + at llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type > { i32 393262, { }* bitcast (%llvm.dbg.anchor.type* > @llvm.dbg.subprograms to { }*), { }* bitcast > (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* > getelementptr ([11 x i8]* @.str3, i32 0, i32 0), i8* getelementptr > ([11 x i8]* @.str3, i32 0, i32 0), i8* null, { }* bitcast > (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 > 14, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to > { }*), i1 true, i1 true } ; <%llvm.dbg.subprogram.type*> [#uses=0] > + at llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type > { i32 393216, i32 46 } ; <%llvm.dbg.anchor.type*> [#uses=1] > + at llvm.dbg.compile_unit = internal constant > %llvm.dbg.compile_unit.type { i32 393233, { }* bitcast > (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 4, i8* > getelementptr ([7 x i8]* @.str, i32 0, i32 0), i8* getelementptr > ([16 x i8]* @.str1, i32 0, i32 0), i8* getelementptr ([52 x i8]* > @.str2, i32 0, i32 0) } ; <%llvm.dbg.compile_unit.type*> [#uses=1] > + at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type > { i32 393216, i32 17 } ; <%llvm.dbg.anchor.type*> [#uses=1] > + at .str = internal constant [7 x i8] c"die.cc\00" ; <[7 x i8]*> > [#uses=1] > + at .str1 = internal constant [16 x i8] c"/home/nicholas/\00" ; <[16 > x i8]*> [#uses=1] > + at .str2 = internal constant [52 x i8] c"4.2.1 (Based on Apple Inc. > build 5623) (LLVM build)\00" ; <[52 x i8]*> [#uses=1] > + at .str3 = internal constant [11 x i8] c"AssertFail\00" ; <[11 x > i8]*> [#uses=1] > + at llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type > { i32 393252, { }* bitcast (%llvm.dbg.compile_unit.type* > @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* > @.str4, i32 0, i32 0), { }* null, i32 0, i64 32, i64 32, i64 0, i32 > 0, i32 5 } ; <%llvm.dbg.basictype.type*> [#uses=1] > + at .str4 = internal constant [4 x i8] c"int\00" ; <[4 x i8]*> > [#uses=1] > + at llvm.dbg.subprogram5 = internal constant %llvm.dbg.subprogram.type > { i32 393262, { }* bitcast (%llvm.dbg.anchor.type* > @llvm.dbg.subprograms to { }*), { }* bitcast > (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* > getelementptr ([7 x i8]* @.str6, i32 0, i32 0), i8* getelementptr > ([7 x i8]* @.str6, i32 0, i32 0), i8* null, { }* bitcast > (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 > 19, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype7 to > { }*), i1 true, i1 true } ; <%llvm.dbg.subprogram.type*> [#uses=1] > + at .str6 = internal constant [7 x i8] c"FooOne\00" ; <[7 x i8]*> > [#uses=1] > + at llvm.dbg.basictype7 = internal constant %llvm.dbg.basictype.type > { i32 393252, { }* bitcast (%llvm.dbg.compile_unit.type* > @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* > @.str8, i32 0, i32 0), { }* null, i32 0, i64 32, i64 32, i64 0, i32 > 0, i32 5 } ; <%llvm.dbg.basictype.type*> [#uses=1] > + at .str8 = internal constant [9 x i8] c"long int\00" ; <[9 x i8]*> > [#uses=1] > + at llvm.dbg.variable = internal constant %llvm.dbg.variable.type > { i32 393473, { }* bitcast (%llvm.dbg.subprogram.type* > @llvm.dbg.subprogram5 to { }*), i8* getelementptr ([6 x i8]* @.str9, > i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* > @llvm.dbg.compile_unit to { }*), i32 19, { }* bitcast > (%llvm.dbg.basictype.type* @llvm.dbg.basictype10 to { }*) } ; < > %llvm.dbg.variable.type*> [#uses=0] > + at .str9 = internal constant [6 x i8] c"count\00" ; <[6 x i8]*> > [#uses=1] > + at llvm.dbg.basictype10 = internal constant %llvm.dbg.basictype.type > { i32 393252, { }* bitcast (%llvm.dbg.compile_unit.type* > @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* > @.str11, i32 0, i32 0), { }* null, i32 0, i64 32, i64 32, i64 0, i32 > 0, i32 7 } ; <%llvm.dbg.basictype.type*> [#uses=1] > + at .str11 = internal constant [18 x i8] c"long unsigned int\00" ; > <[18 x i8]*> [#uses=1] > + at llvm.dbg.subprogram12 = internal constant > %llvm.dbg.subprogram.type { i32 393262, { }* bitcast > (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast > (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* > getelementptr ([7 x i8]* @.str13, i32 0, i32 0), i8* getelementptr > ([7 x i8]* @.str13, i32 0, i32 0), i8* null, { }* bitcast > (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 > 24, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype7 to > { }*), i1 true, i1 true } ; <%llvm.dbg.subprogram.type*> [#uses=0] > + at .str13 = internal constant [7 x i8] c"FooTwo\00" ; <[7 x i8]*> > [#uses=1] > + at llvm.dbg.subprogram14 = internal constant > %llvm.dbg.subprogram.type { i32 393262, { }* bitcast > (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* bitcast > (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* > getelementptr ([9 x i8]* @.str15, i32 0, i32 0), i8* getelementptr > ([9 x i8]* @.str15, i32 0, i32 0), i8* getelementptr ([13 x i8]* > @.str16, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* > @llvm.dbg.compile_unit to { }*), i32 29, { }* null, i1 false, i1 > true } ; <%llvm.dbg.subprogram.type*> [#uses=0] > + at .str15 = internal constant [9 x i8] c"FooThree\00" ; <[9 x i8]*> > [#uses=1] > + at .str16 = internal constant [13 x i8] c"_Z8FooThreev\00" ; <[13 x > i8]*> [#uses=1] > + > +declare void @_Z8FooThreev() nounwind > + > +define internal i32 @_ZL10AssertFailv() nounwind { > +entry: > + unreachable > +} > + > +declare void @llvm.dbg.func.start({ }*) nounwind > + > +declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind > + > +declare void @abort() noreturn nounwind > + > +declare void @llvm.dbg.region.end({ }*) nounwind > + > +declare i32 @_ZL6FooOnem(i32) nounwind > + > +declare void @llvm.dbg.declare({ }*, { }*) nounwind > + > +declare i32 @_ZL6FooTwov() nounwind > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20081017/d2f0e6a0/attachment.html From anton at korobeynikov.info Fri Oct 17 18:06:55 2008 From: anton at korobeynikov.info (Anton Korobeynikov) Date: Sat, 18 Oct 2008 03:06:55 +0400 Subject: [llvm-commits] [llvm] r57714 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfWriter.cpp test/DebugInfo/2008-10-17-C++DebugCrash.ll In-Reply-To: <27787933-D79D-4282-9D12-09E408721EE8@apple.com> References: <200810171848.m9HImxLk017802@zion.cs.uiuc.edu> <27787933-D79D-4282-9D12-09E408721EE8@apple.com> Message-ID: Hi, > Nicholas thinks this should be in 2.4. Can I get approval from a code owner > please? I'll try to check stuff tomorrow -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University From gohman at apple.com Fri Oct 17 20:03:47 2008 From: gohman at apple.com (Dan Gohman) Date: Sat, 18 Oct 2008 01:03:47 -0000 Subject: [llvm-commits] [llvm] r57747 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll Message-ID: <200810180103.m9I13lNh032106@zion.cs.uiuc.edu> Author: djg Date: Fri Oct 17 20:03:45 2008 New Revision: 57747 URL: http://llvm.org/viewvc/llvm-project?rev=57747&view=rev Log: Revert r57699. It's causing regressions in test/CodeGen/X86/2008-09-17-inline-asm-1.ll and a few others, and it breaks the llvm-gcc build. Removed: llvm/trunk/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=57747&r1=57746&r2=57747&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Fri Oct 17 20:03:45 2008 @@ -4667,7 +4667,6 @@ OpInfo.CallOperandVal = CS.getArgument(ArgNo++); break; } - // The return value of the call is this value. As such, there is no // corresponding argument. assert(CS.getType() != Type::VoidTy && "Bad inline asm!"); @@ -4700,30 +4699,6 @@ } OpInfo.ConstraintVT = OpVT; - } - - // Second pass over the constraints: compute which constraint option to use - // and assign registers to constraints that want a specific physreg. - for (unsigned i = 0, e = ConstraintInfos.size(); i != e; ++i) { - SDISelAsmOperandInfo &OpInfo = ConstraintOperands[i]; - - // If this is an output operand with a matching input operand, look up the - // matching input. It might have a different type (e.g. the output might be - // i32 and the input i64) and we need to pick the larger width to ensure we - // reserve the right number of registers. - if (OpInfo.hasMatchingInput()) { - SDISelAsmOperandInfo &Input = ConstraintOperands[OpInfo.MatchingInput]; - if (OpInfo.ConstraintVT != Input.ConstraintVT) { - assert(OpInfo.ConstraintVT.isInteger() && - Input.ConstraintVT.isInteger() && - "Asm constraints must be the same or different sized integers"); - if (OpInfo.ConstraintVT.getSizeInBits() < - Input.ConstraintVT.getSizeInBits()) - OpInfo.ConstraintVT = Input.ConstraintVT; - else - Input.ConstraintVT = OpInfo.ConstraintVT; - } - } // Compute the constraint code and ConstraintType to use. TLI.ComputeConstraintToUse(OpInfo, OpInfo.CallOperand, hasMemory, &DAG); @@ -4973,26 +4948,24 @@ // and set it as the value of the call. if (!RetValRegs.Regs.empty()) { SDValue Val = RetValRegs.getCopyFromRegs(DAG, Chain, &Flag); - MVT ResultType = TLI.getValueType(CS.getType()); - + // If any of the results of the inline asm is a vector, it may have the // wrong width/num elts. This can happen for register classes that can // contain multiple different value types. The preg or vreg allocated may - // not have the same VT as was expected. Convert it to the right type - // with bit_convert. - // FIXME: Is this sufficient for inline asms with MRVs? - if (ResultType != Val.getValueType() && Val.getValueType().isVector()) { - Val = DAG.getNode(ISD::BIT_CONVERT, ResultType, Val); - - } else if (ResultType != Val.getValueType() && - ResultType.isInteger() && Val.getValueType().isInteger()) { - // If a result value was tied to an input value, the computed result may - // have a wider width than the expected result. Extract the relevant - // portion. - Val = DAG.getNode(ISD::TRUNCATE, ResultType, Val); + // not have the same VT as was expected. Convert it to the right type with + // bit_convert. + if (const StructType *ResSTy = dyn_cast(CS.getType())) { + for (unsigned i = 0, e = ResSTy->getNumElements(); i != e; ++i) { + if (Val.getNode()->getValueType(i).isVector()) + Val = DAG.getNode(ISD::BIT_CONVERT, + TLI.getValueType(ResSTy->getElementType(i)), Val); + } + } else { + if (Val.getValueType().isVector()) + Val = DAG.getNode(ISD::BIT_CONVERT, TLI.getValueType(CS.getType()), + Val); } - - assert(ResultType == Val.getValueType() && "Asm result value mismatch!"); + setValue(CS.getInstruction(), Val); } @@ -5246,8 +5219,7 @@ Value != NumValues; ++Value) { MVT VT = ValueVTs[Value]; const Type *ArgTy = VT.getTypeForMVT(); - SDValue Op = SDValue(Args[i].Node.getNode(), - Args[i].Node.getResNo() + Value); + SDValue Op = SDValue(Args[i].Node.getNode(), Args[i].Node.getResNo() + Value); ISD::ArgFlagsTy Flags; unsigned OriginalAlignment = getTargetData()->getABITypeAlignment(ArgTy); Removed: llvm/trunk/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll?rev=57746&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll (original) +++ llvm/trunk/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll (removed) @@ -1,11 +0,0 @@ -; RUN: llvm-as < %s | llc -; PR2356 -target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128" -target triple = "powerpc-apple-darwin9" - -define i32 @test(i64 %x, i32* %p) nounwind { -entry: - %asmtmp = call i32 asm "", "=r,0"(i64 0) nounwind ; [#uses=0] - %y = add i32 %asmtmp, 1 - ret i32 %y -} From gohman at apple.com Fri Oct 17 21:06:04 2008 From: gohman at apple.com (Dan Gohman) Date: Sat, 18 Oct 2008 02:06:04 -0000 Subject: [llvm-commits] [llvm] r57748 - in /llvm/trunk: include/llvm/CodeGen/ include/llvm/Target/ lib/CodeGen/SelectionDAG/ lib/Target/Alpha/ lib/Target/CellSPU/ lib/Target/Mips/ lib/Target/Sparc/ lib/Target/X86/ test/CodeGen/X86/ Message-ID: <200810180206.m9I266av001641@zion.cs.uiuc.edu> Author: djg Date: Fri Oct 17 21:06:02 2008 New Revision: 57748 URL: http://llvm.org/viewvc/llvm-project?rev=57748&view=rev Log: Teach DAGCombine to fold constant offsets into GlobalAddress nodes, and add a TargetLowering hook for it to use to determine when this is legal (i.e. not in PIC mode, etc.) This allows instruction selection to emit folded constant offsets in more cases, such as the included testcase, eliminating the need for explicit arithmetic instructions. This eliminates the need for the C++ code in X86ISelDAGToDAG.cpp that attempted to achieve the same effect, but wasn't as effective. Also, fix handling of offsets in GlobalAddressSDNodes in several places, including changing GlobalAddressSDNode's offset from int to int64_t. The Mips, Alpha, Sparc, and CellSPU targets appear to be unaware of GlobalAddress offsets currently, so set the hook to false on those targets. Added: llvm/trunk/test/CodeGen/X86/ga-offset.ll Modified: llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h llvm/trunk/include/llvm/CodeGen/MachineOperand.h llvm/trunk/include/llvm/CodeGen/SelectionDAG.h llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp llvm/trunk/lib/Target/Mips/MipsISelLowering.h llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp llvm/trunk/lib/Target/Sparc/SparcISelLowering.h llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.h llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Modified: llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h Fri Oct 17 21:06:02 2008 @@ -79,13 +79,14 @@ } const MachineInstrBuilder &addGlobalAddress(GlobalValue *GV, - int Offset = 0) const { + int64_t Offset = 0) const { MI->addOperand(MachineOperand::CreateGA(GV, Offset)); return *this; } - const MachineInstrBuilder &addExternalSymbol(const char *FnName) const{ - MI->addOperand(MachineOperand::CreateES(FnName, 0)); + const MachineInstrBuilder &addExternalSymbol(const char *FnName, + int64_t Offset = 0) const { + MI->addOperand(MachineOperand::CreateES(FnName, Offset)); return *this; } }; Modified: llvm/trunk/include/llvm/CodeGen/MachineOperand.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineOperand.h?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineOperand.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineOperand.h Fri Oct 17 21:06:02 2008 @@ -101,7 +101,7 @@ const char *SymbolName; // For MO_ExternalSymbol. GlobalValue *GV; // For MO_GlobalAddress. } Val; - int Offset; // An offset from the object. + int64_t Offset; // An offset from the object. } OffsetedInfo; } Contents; @@ -273,7 +273,7 @@ return Contents.OffsetedInfo.Val.GV; } - int getOffset() const { + int64_t getOffset() const { assert((isGlobal() || isSymbol() || isCPI()) && "Wrong MachineOperand accessor"); return Contents.OffsetedInfo.Offset; @@ -293,7 +293,7 @@ Contents.ImmVal = immVal; } - void setOffset(int Offset) { + void setOffset(int64_t Offset) { assert((isGlobal() || isSymbol() || isCPI()) && "Wrong MachineOperand accessor"); Contents.OffsetedInfo.Offset = Offset; @@ -382,13 +382,13 @@ Op.setIndex(Idx); return Op; } - static MachineOperand CreateGA(GlobalValue *GV, int Offset) { + static MachineOperand CreateGA(GlobalValue *GV, int64_t Offset) { MachineOperand Op(MachineOperand::MO_GlobalAddress); Op.Contents.OffsetedInfo.Val.GV = GV; Op.setOffset(Offset); return Op; } - static MachineOperand CreateES(const char *SymName, int Offset = 0) { + static MachineOperand CreateES(const char *SymName, int64_t Offset = 0) { MachineOperand Op(MachineOperand::MO_ExternalSymbol); Op.Contents.OffsetedInfo.Val.SymbolName = SymName; Op.setOffset(Offset); Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Fri Oct 17 21:06:02 2008 @@ -255,9 +255,9 @@ return getConstantFP(Val, VT, true); } SDValue getGlobalAddress(const GlobalValue *GV, MVT VT, - int offset = 0, bool isTargetGA = false); + int64_t offset = 0, bool isTargetGA = false); SDValue getTargetGlobalAddress(const GlobalValue *GV, MVT VT, - int offset = 0) { + int64_t offset = 0) { return getGlobalAddress(GV, VT, offset, true); } SDValue getFrameIndex(int FI, MVT VT, bool isTarget = false); Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Fri Oct 17 21:06:02 2008 @@ -1819,15 +1819,16 @@ class GlobalAddressSDNode : public SDNode { GlobalValue *TheGlobal; - int Offset; + int64_t Offset; virtual void ANCHOR(); // Out-of-line virtual method to give class a home. protected: friend class SelectionDAG; - GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT VT, int o = 0); + GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT VT, + int64_t o = 0); public: GlobalValue *getGlobal() const { return TheGlobal; } - int getOffset() const { return Offset; } + int64_t getOffset() const { return Offset; } static bool classof(const GlobalAddressSDNode *) { return true; } static bool classof(const SDNode *N) { Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Fri Oct 17 21:06:02 2008 @@ -653,6 +653,11 @@ virtual SDValue getPICJumpTableRelocBase(SDValue Table, SelectionDAG &DAG) const; + /// isOffsetFoldingLegal - Return true if folding a constant offset + /// with the given GlobalAddress is legal. It is frequently not legal in + /// PIC relocation models. + virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const; + //===--------------------------------------------------------------------===// // TargetLowering Optimization Methods // Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Fri Oct 17 21:06:02 2008 @@ -967,6 +967,13 @@ // fold (add x, 0) -> x if (N1C && N1C->isNullValue()) return N0; + // fold (add Sym, c) -> Sym+c + if (GlobalAddressSDNode *GA = dyn_cast(N0)) + if (!AfterLegalize && TLI.isOffsetFoldingLegal(GA) && N1C && + GA->getOpcode() == ISD::GlobalAddress) + return DAG.getGlobalAddress(GA->getGlobal(), VT, + GA->getOffset() + + (uint64_t)N1C->getSExtValue()); // fold ((c1-A)+c2) -> (c1+c2)-A if (N1C && N0.getOpcode() == ISD::SUB) if (ConstantSDNode *N0C = dyn_cast(N0.getOperand(0))) @@ -1133,6 +1140,21 @@ if (N1.getOpcode() == ISD::UNDEF) return N1; + // If the relocation model supports it, consider symbol offsets. + if (GlobalAddressSDNode *GA = dyn_cast(N0)) + if (!AfterLegalize && TLI.isOffsetFoldingLegal(GA)) { + // fold (sub Sym, c) -> Sym-c + if (N1C && GA->getOpcode() == ISD::GlobalAddress) + return DAG.getGlobalAddress(GA->getGlobal(), VT, + GA->getOffset() - + (uint64_t)N1C->getSExtValue()); + // fold (sub Sym+c1, Sym+c2) -> c1-c2 + if (GlobalAddressSDNode *GB = dyn_cast(N1)) + if (GA->getGlobal() == GB->getGlobal()) + return DAG.getConstant((uint64_t)GA->getOffset() - GB->getOffset(), + VT); + } + return SDValue(); } Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Oct 17 21:06:02 2008 @@ -959,10 +959,15 @@ } SDValue SelectionDAG::getGlobalAddress(const GlobalValue *GV, - MVT VT, int Offset, + MVT VT, int64_t Offset, bool isTargetGA) { unsigned Opc; + // Truncate (with sign-extension) the offset value to the pointer size. + unsigned BitWidth = VT.getSizeInBits(); + if (BitWidth < 64) + Offset = (Offset << (64 - BitWidth) >> (64 - BitWidth)); + const GlobalVariable *GVar = dyn_cast(GV); if (!GVar) { // If GV is an alias then use the aliasee for determining thread-localness. @@ -2017,6 +2022,7 @@ bool SelectionDAG::isVerifiedDebugInfoDesc(SDValue Op) const { GlobalAddressSDNode *GA = dyn_cast(Op); if (!GA) return false; + if (GA->getOffset() != 0) return false; GlobalVariable *GV = dyn_cast(GA->getGlobal()); if (!GV) return false; MachineModuleInfo *MMI = getMachineModuleInfo(); @@ -4726,7 +4732,7 @@ } GlobalAddressSDNode::GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, - MVT VT, int o) + MVT VT, int64_t o) : SDNode(isa(GA) && cast(GA)->isThreadLocal() ? // Thread Local Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Fri Oct 17 21:06:02 2008 @@ -656,6 +656,23 @@ return Table; } +bool +TargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const { + // Assume that everything is safe in static mode. + if (getTargetMachine().getRelocationModel() == Reloc::Static) + return true; + + // In dynamic-no-pic mode, assume that known defined values are safe. + if (getTargetMachine().getRelocationModel() == Reloc::DynamicNoPIC && + GA && + !GA->getGlobal()->isDeclaration() && + !GA->getGlobal()->mayBeOverridden()) + return true; + + // Otherwise assume nothing is safe. + return false; +} + //===----------------------------------------------------------------------===// // Optimization Methods //===----------------------------------------------------------------------===// Modified: llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp Fri Oct 17 21:06:02 2008 @@ -764,3 +764,9 @@ return sinkMBB; } + +bool +AlphaTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const { + // The Alpha target isn't yet aware of offsets. + return false; +} Modified: llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h (original) +++ llvm/trunk/lib/Target/Alpha/AlphaISelLowering.h Fri Oct 17 21:06:02 2008 @@ -95,6 +95,8 @@ MachineBasicBlock *EmitInstrWithCustomInserter(MachineInstr *MI, MachineBasicBlock *BB); + virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const; + private: // Helpers for custom lowering. void LowerVAARG(SDNode *N, SDValue &Chain, SDValue &DataPtr, Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp Fri Oct 17 21:06:02 2008 @@ -3058,3 +3058,9 @@ bool SPUTargetLowering::isLegalAddressImmediate(llvm::GlobalValue* GV) const { return false; } + +bool +SPUTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const { + // The SPU target isn't yet aware of offsets. + return false; +} Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h (original) +++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.h Fri Oct 17 21:06:02 2008 @@ -139,6 +139,8 @@ /// as the offset of the target addressing mode. virtual bool isLegalAddressImmediate(int64_t V, const Type *Ty) const; virtual bool isLegalAddressImmediate(GlobalValue *) const; + + virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const; }; } Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Fri Oct 17 21:06:02 2008 @@ -1094,3 +1094,9 @@ } return std::vector(); } + +bool +MipsTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const { + // The Mips target isn't yet aware of offsets. + return false; +} Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.h?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelLowering.h (original) +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.h Fri Oct 17 21:06:02 2008 @@ -118,6 +118,8 @@ std::vector getRegClassForInlineAsmConstraint(const std::string &Constraint, MVT VT) const; + + virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const; }; } Modified: llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Sparc/SparcISelLowering.cpp Fri Oct 17 21:06:02 2008 @@ -996,3 +996,9 @@ return std::vector(); } + +bool +SparcTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const { + // The Sparc target isn't yet aware of offsets. + return false; +} Modified: llvm/trunk/lib/Target/Sparc/SparcISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcISelLowering.h?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcISelLowering.h (original) +++ llvm/trunk/lib/Target/Sparc/SparcISelLowering.h Fri Oct 17 21:06:02 2008 @@ -70,6 +70,8 @@ std::vector getRegClassForInlineAsmConstraint(const std::string &Constraint, MVT VT) const; + + virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const; }; } // end namespace llvm Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Fri Oct 17 21:06:02 2008 @@ -759,6 +759,7 @@ /// addressing mode. bool X86DAGToDAGISel::MatchAddress(SDValue N, X86ISelAddressMode &AM, bool isRoot, unsigned Depth) { + bool is64Bit = Subtarget->is64Bit(); DOUT << "MatchAddress: "; DEBUG(AM.dump()); // Limit recursion. if (Depth > 5) @@ -768,7 +769,7 @@ if (AM.isRIPRel) { if (!AM.ES && AM.JT != -1 && N.getOpcode() == ISD::Constant) { int64_t Val = cast(N)->getSExtValue(); - if (isInt32(AM.Disp + Val)) { + if (!is64Bit || isInt32(AM.Disp + Val)) { AM.Disp += Val; return false; } @@ -783,7 +784,7 @@ default: break; case ISD::Constant: { int64_t Val = cast(N)->getSExtValue(); - if (isInt32(AM.Disp + Val)) { + if (!is64Bit || isInt32(AM.Disp + Val)) { AM.Disp += Val; return false; } @@ -791,10 +792,9 @@ } case X86ISD::Wrapper: { -DOUT << "Wrapper: 64bit " << Subtarget->is64Bit(); -DOUT << " AM "; DEBUG(AM.dump()); DOUT << "\n"; -DOUT << "AlreadySelected " << AlreadySelected << "\n"; - bool is64Bit = Subtarget->is64Bit(); + DOUT << "Wrapper: 64bit " << is64Bit; + DOUT << " AM "; DEBUG(AM.dump()); DOUT << "\n"; + DOUT << "AlreadySelected " << AlreadySelected << "\n"; // Under X86-64 non-small code model, GV (and friends) are 64-bits. // Also, base and index reg must be 0 in order to use rip as base. if (is64Bit && (TM.getCodeModel() != CodeModel::Small || @@ -808,17 +808,21 @@ if (!AlreadySelected || (AM.Base.Reg.getNode() && AM.IndexReg.getNode())) { SDValue N0 = N.getOperand(0); if (GlobalAddressSDNode *G = dyn_cast(N0)) { - GlobalValue *GV = G->getGlobal(); - AM.GV = GV; - AM.Disp += G->getOffset(); - AM.isRIPRel = TM.symbolicAddressesAreRIPRel(); - return false; + if (!is64Bit || isInt32(AM.Disp + G->getOffset())) { + GlobalValue *GV = G->getGlobal(); + AM.GV = GV; + AM.Disp += G->getOffset(); + AM.isRIPRel = TM.symbolicAddressesAreRIPRel(); + return false; + } } else if (ConstantPoolSDNode *CP = dyn_cast(N0)) { - AM.CP = CP->getConstVal(); - AM.Align = CP->getAlignment(); - AM.Disp += CP->getOffset(); - AM.isRIPRel = TM.symbolicAddressesAreRIPRel(); - return false; + if (!is64Bit || isInt32(AM.Disp + CP->getOffset())) { + AM.CP = CP->getConstVal(); + AM.Align = CP->getAlignment(); + AM.Disp += CP->getOffset(); + AM.isRIPRel = TM.symbolicAddressesAreRIPRel(); + return false; + } } else if (ExternalSymbolSDNode *S =dyn_cast(N0)) { AM.ES = S->getSymbol(); AM.isRIPRel = TM.symbolicAddressesAreRIPRel(); @@ -862,7 +866,7 @@ ConstantSDNode *AddVal = cast(ShVal.getNode()->getOperand(1)); uint64_t Disp = AM.Disp + (AddVal->getZExtValue() << Val); - if (isInt32(Disp)) + if (!is64Bit || isInt32(Disp)) AM.Disp = Disp; else AM.IndexReg = ShVal; @@ -905,7 +909,7 @@ cast(MulVal.getNode()->getOperand(1)); uint64_t Disp = AM.Disp + AddVal->getZExtValue() * CN->getZExtValue(); - if (isInt32(Disp)) + if (!is64Bit || isInt32(Disp)) AM.Disp = Disp; else Reg = N.getNode()->getOperand(0); @@ -944,7 +948,7 @@ // Address could not have picked a GV address for the displacement. AM.GV == NULL && // On x86-64, the resultant disp must fit in 32-bits. - isInt32(AM.Disp + CN->getSExtValue()) && + (!is64Bit || isInt32(AM.Disp + CN->getSExtValue())) && // Check to see if the LHS & C is zero. CurDAG->MaskedValueIsZero(N.getOperand(0), CN->getAPIntValue())) { AM.Disp += CN->getZExtValue(); @@ -1248,49 +1252,6 @@ case X86ISD::GlobalBaseReg: return getGlobalBaseReg(); - case ISD::ADD: { - // Turn ADD X, c to MOV32ri X+c. This cannot be done with tblgen'd - // code and is matched first so to prevent it from being turned into - // LEA32r X+c. - // In 64-bit small code size mode, use LEA to take advantage of - // RIP-relative addressing. - if (TM.getCodeModel() != CodeModel::Small) - break; - MVT PtrVT = TLI.getPointerTy(); - SDValue N0 = N.getOperand(0); - SDValue N1 = N.getOperand(1); - if (N.getNode()->getValueType(0) == PtrVT && - N0.getOpcode() == X86ISD::Wrapper && - N1.getOpcode() == ISD::Constant) { - unsigned Offset = (unsigned)cast(N1)->getZExtValue(); - SDValue C(0, 0); - // TODO: handle ExternalSymbolSDNode. - if (GlobalAddressSDNode *G = - dyn_cast(N0.getOperand(0))) { - C = CurDAG->getTargetGlobalAddress(G->getGlobal(), PtrVT, - G->getOffset() + Offset); - } else if (ConstantPoolSDNode *CP = - dyn_cast(N0.getOperand(0))) { - C = CurDAG->getTargetConstantPool(CP->getConstVal(), PtrVT, - CP->getAlignment(), - CP->getOffset()+Offset); - } - - if (C.getNode()) { - if (Subtarget->is64Bit()) { - SDValue Ops[] = { CurDAG->getRegister(0, PtrVT), getI8Imm(1), - CurDAG->getRegister(0, PtrVT), C }; - return CurDAG->SelectNodeTo(N.getNode(), X86::LEA64r, - MVT::i64, Ops, 4); - } else - return CurDAG->SelectNodeTo(N.getNode(), X86::MOV32ri, PtrVT, C); - } - } - - // Other cases are handled by auto-generated code. - break; - } - case X86ISD::ATOMOR64_DAG: return SelectAtomic64(Node, X86::ATOMOR6432); case X86ISD::ATOMXOR64_DAG: Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri Oct 17 21:06:02 2008 @@ -1705,7 +1705,8 @@ // non-JIT mode. if (!Subtarget->GVRequiresExtraLoad(G->getGlobal(), getTargetMachine(), true)) - Callee = DAG.getTargetGlobalAddress(G->getGlobal(), getPointerTy()); + Callee = DAG.getTargetGlobalAddress(G->getGlobal(), getPointerTy(), + G->getOffset()); } else if (ExternalSymbolSDNode *S = dyn_cast(Callee)) { Callee = DAG.getTargetExternalSymbol(S->getSymbol(), getPointerTy()); } else if (IsTailCall) { @@ -4390,12 +4391,24 @@ SDValue X86TargetLowering::LowerGlobalAddress(const GlobalValue *GV, + int64_t Offset, SelectionDAG &DAG) const { - SDValue Result = DAG.getTargetGlobalAddress(GV, getPointerTy()); + bool IsPic = getTargetMachine().getRelocationModel() == Reloc::PIC_; + bool ExtraLoadRequired = + Subtarget->GVRequiresExtraLoad(GV, getTargetMachine(), false); + + // Create the TargetGlobalAddress node, folding in the constant + // offset if it is legal. + SDValue Result; + if (!IsPic && !ExtraLoadRequired) { + Result = DAG.getTargetGlobalAddress(GV, getPointerTy(), Offset); + Offset = 0; + } else + Result = DAG.getTargetGlobalAddress(GV, getPointerTy(), 0); Result = DAG.getNode(X86ISD::Wrapper, getPointerTy(), Result); + // With PIC, the address is actually $g + Offset. - if (getTargetMachine().getRelocationModel() == Reloc::PIC_ && - !Subtarget->isPICStyleRIPRel()) { + if (IsPic && !Subtarget->isPICStyleRIPRel()) { Result = DAG.getNode(ISD::ADD, getPointerTy(), DAG.getNode(X86ISD::GlobalBaseReg, getPointerTy()), Result); @@ -4406,17 +4419,24 @@ // the GlobalAddress must be in the base or index register of the address, not // the GV offset field. Platform check is inside GVRequiresExtraLoad() call // The same applies for external symbols during PIC codegen - if (Subtarget->GVRequiresExtraLoad(GV, getTargetMachine(), false)) + if (ExtraLoadRequired) Result = DAG.getLoad(getPointerTy(), DAG.getEntryNode(), Result, PseudoSourceValue::getGOT(), 0); + // If there was a non-zero offset that we didn't fold, create an explicit + // addition for it. + if (Offset != 0) + Result = DAG.getNode(ISD::ADD, getPointerTy(), Result, + DAG.getConstant(Offset, getPointerTy())); + return Result; } SDValue X86TargetLowering::LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) { const GlobalValue *GV = cast(Op)->getGlobal(); - return LowerGlobalAddress(GV, DAG); + int64_t Offset = cast(Op)->getOffset(); + return LowerGlobalAddress(GV, Offset, DAG); } // Lower ISD::GlobalTLSAddress using the "general dynamic" model, 32 bit @@ -7006,6 +7026,7 @@ if (N->getOpcode() == X86ISD::Wrapper) { if (isa(N->getOperand(0))) { GA = cast(N->getOperand(0))->getGlobal(); + Offset = cast(N->getOperand(0))->getOffset(); return true; } } @@ -7448,7 +7469,7 @@ if (GA) { if (hasMemory) - Op = LowerGlobalAddress(GA->getGlobal(), DAG); + Op = LowerGlobalAddress(GA->getGlobal(), Offset, DAG); else Op = DAG.getTargetGlobalAddress(GA->getGlobal(), GA->getValueType(0), Offset); Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Fri Oct 17 21:06:02 2008 @@ -551,7 +551,8 @@ SDValue LowerINSERT_VECTOR_ELT_SSE4(SDValue Op, SelectionDAG &DAG); SDValue LowerSCALAR_TO_VECTOR(SDValue Op, SelectionDAG &DAG); SDValue LowerConstantPool(SDValue Op, SelectionDAG &DAG); - SDValue LowerGlobalAddress(const GlobalValue *GV, SelectionDAG &DAG) const; + SDValue LowerGlobalAddress(const GlobalValue *GV, int64_t Offset, + SelectionDAG &DAG) const; SDValue LowerGlobalAddress(SDValue Op, SelectionDAG &DAG); SDValue LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG); SDValue LowerExternalSymbol(SDValue Op, SelectionDAG &DAG); Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=57748&r1=57747&r2=57748&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original) +++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Fri Oct 17 21:06:02 2008 @@ -143,6 +143,15 @@ else setRelocationModel(Reloc::Static); } + + // ELF doesn't have a distinct dynamic-no-PIC model. Dynamic-no-PIC + // is defined as a model for code which may be used in static or + // dynamic executables but not necessarily a shared library. On ELF + // implement this by using the Static model. + if (Subtarget.isTargetELF() && + getRelocationModel() == Reloc::DynamicNoPIC) + setRelocationModel(Reloc::Static); + if (Subtarget.is64Bit()) { // No DynamicNoPIC support under X86-64. if (getRelocationModel() == Reloc::DynamicNoPIC) Added: llvm/trunk/test/CodeGen/X86/ga-offset.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/ga-offset.ll?rev=57748&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/ga-offset.ll (added) +++ llvm/trunk/test/CodeGen/X86/ga-offset.ll Fri Oct 17 21:06:02 2008 @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | llc -march=x86 > %t +; RUN: not grep lea %t +; RUN: not grep add %t +; RUN: grep mov %t | count 1 +; RUN: llvm-as < %s | llc -march=x86-64 -relocation-model=static > %t +; RUN: not grep lea %t +; RUN: not grep add %t +; RUN: grep mov %t | count 1 + +; This store should fold to a single mov instruction. + + at ptr = global i32* null + at dst = global [131072 x i32] zeroinitializer + +define void @foo() nounwind { + store i32* getelementptr ([131072 x i32]* @dst, i32 0, i32 16), i32** @ptr + ret void +} From wangmp at apple.com Fri Oct 17 21:48:13 2008 From: wangmp at apple.com (Mon P Wang) Date: Sat, 18 Oct 2008 02:48:13 -0000 Subject: [llvm-commits] [llvm] r57750 - /llvm/trunk/include/llvm/Intrinsics.td Message-ID: <200810180248.m9I2mDLO002901@zion.cs.uiuc.edu> Author: wangmp Date: Fri Oct 17 21:48:13 2008 New Revision: 57750 URL: http://llvm.org/viewvc/llvm-project?rev=57750&view=rev Log: Make llvm memory barrier available as an intrinsic Modified: llvm/trunk/include/llvm/Intrinsics.td Modified: llvm/trunk/include/llvm/Intrinsics.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Intrinsics.td?rev=57750&r1=57749&r2=57750&view=diff ============================================================================== --- llvm/trunk/include/llvm/Intrinsics.td (original) +++ llvm/trunk/include/llvm/Intrinsics.td Fri Oct 17 21:48:13 2008 @@ -282,7 +282,8 @@ //===------------------------- Atomic Intrinsics --------------------------===// // def int_memory_barrier : Intrinsic<[llvm_void_ty, llvm_i1_ty, llvm_i1_ty, - llvm_i1_ty, llvm_i1_ty, llvm_i1_ty], []>; + llvm_i1_ty, llvm_i1_ty, llvm_i1_ty], []>, + GCCBuiltin<"__builtin_llvm_memory_barrier">; def int_atomic_cmp_swap : Intrinsic<[llvm_anyint_ty, LLVMAnyPointerType>, From gohman at apple.com Fri Oct 17 22:10:33 2008 From: gohman at apple.com (Dan Gohman) Date: Sat, 18 Oct 2008 03:10:33 -0000 Subject: [llvm-commits] [test-suite] r57752 - /test-suite/trunk/MultiSource/Applications/oggenc/Makefile Message-ID: <200810180310.m9I3AXev003582@zion.cs.uiuc.edu> Author: djg Date: Fri Oct 17 22:10:31 2008 New Revision: 57752 URL: http://llvm.org/viewvc/llvm-project?rev=57752&view=rev Log: oggenc needs -fno-strict-aliasing to avoid being miscompiled by GCC. Modified: test-suite/trunk/MultiSource/Applications/oggenc/Makefile Modified: test-suite/trunk/MultiSource/Applications/oggenc/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/oggenc/Makefile?rev=57752&r1=57751&r2=57752&view=diff ============================================================================== --- test-suite/trunk/MultiSource/Applications/oggenc/Makefile (original) +++ test-suite/trunk/MultiSource/Applications/oggenc/Makefile Fri Oct 17 22:10:31 2008 @@ -1,7 +1,7 @@ LEVEL = ../../.. PROG = oggenc -CPPFLAGS = +CPPFLAGS = -fno-strict-aliasing LDFLAGS = -lm STDIN_FILENAME = $(SourceDir)/tune From gohman at apple.com Fri Oct 17 22:24:44 2008 From: gohman at apple.com (Dan Gohman) Date: Sat, 18 Oct 2008 03:24:44 -0000 Subject: [llvm-commits] [test-suite] r57753 - /test-suite/trunk/MultiSource/Benchmarks/VersaBench/dbms/Makefile Message-ID: <200810180324.m9I3OiJN004021@zion.cs.uiuc.edu> Author: djg Date: Fri Oct 17 22:24:37 2008 New Revision: 57753 URL: http://llvm.org/viewvc/llvm-project?rev=57753&view=rev Log: Add a path to the input files, to fix this test for objdir != srcdir. Modified: test-suite/trunk/MultiSource/Benchmarks/VersaBench/dbms/Makefile Modified: test-suite/trunk/MultiSource/Benchmarks/VersaBench/dbms/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/VersaBench/dbms/Makefile?rev=57753&r1=57752&r2=57753&view=diff ============================================================================== --- test-suite/trunk/MultiSource/Benchmarks/VersaBench/dbms/Makefile (original) +++ test-suite/trunk/MultiSource/Benchmarks/VersaBench/dbms/Makefile Fri Oct 17 22:24:37 2008 @@ -2,9 +2,9 @@ PROG = dbms ifdef SMALL_PROBLEM_SIZE -RUN_OPTIONS = -i dbms.train.in +RUN_OPTIONS = -i $(PROJ_SRC_DIR)/dbms.train.in else -RUN_OPTIONS = -i dbms.ref.in +RUN_OPTIONS = -i $(PROJ_SRC_DIR)/dbms.ref.in endif include $(LEVEL)/MultiSource/Makefile.multisrc From kremenek at apple.com Fri Oct 17 22:51:24 2008 From: kremenek at apple.com (Ted Kremenek) Date: Sat, 18 Oct 2008 03:51:24 -0000 Subject: [llvm-commits] [llvm] r57756 - /llvm/tags/checker/checker-110/ Message-ID: <200810180351.m9I3pOjv004924@zion.cs.uiuc.edu> Author: kremenek Date: Fri Oct 17 22:51:24 2008 New Revision: 57756 URL: http://llvm.org/viewvc/llvm-project?rev=57756&view=rev Log: Tagging checker-110. Added: llvm/tags/checker/checker-110/ - copied from r57755, llvm/trunk/ From kremenek at apple.com Fri Oct 17 22:57:00 2008 From: kremenek at apple.com (Ted Kremenek) Date: Sat, 18 Oct 2008 03:57:00 -0000 Subject: [llvm-commits] [llvm] r57758 - /llvm/tags/checker/checker-110/ Message-ID: <200810180357.m9I3v0vm005145@zion.cs.uiuc.edu> Author: kremenek Date: Fri Oct 17 22:57:00 2008 New Revision: 57758 URL: http://llvm.org/viewvc/llvm-project?rev=57758&view=rev Log: Removing checker-110. Removed: llvm/tags/checker/checker-110/ From wangmp at apple.com Fri Oct 17 23:12:40 2008 From: wangmp at apple.com (Mon Ping Wang) Date: Fri, 17 Oct 2008 21:12:40 -0700 Subject: [llvm-commits] vector widening patch Message-ID: Hi, Here is a patch for vector widen. In certain cases, it is more profitable to widen a vector from an illegal type to a legal type (e.g., v7i8 to v8i8) instead of scalarzing the vector. This patch implements that. The default implementation is to widen if there is a legal type that is wider than the illegal type and the vector has more elements. Any target can override the default logic and implement it own policy. Please let me know if you have any comments or concerns. Thanks, -- Mon Ping -------------- next part -------------- A non-text attachment was scrubbed... Name: widening.patch Type: application/octet-stream Size: 31788 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20081017/4917e294/attachment.obj From isanbard at gmail.com Fri Oct 17 23:22:19 2008 From: isanbard at gmail.com (Bill Wendling) Date: Fri, 17 Oct 2008 21:22:19 -0700 Subject: [llvm-commits] [llvm] r57714 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfWriter.cpp test/DebugInfo/2008-10-17-C++DebugCrash.ll In-Reply-To: <27787933-D79D-4282-9D12-09E408721EE8@apple.com> References: <200810171848.m9HImxLk017802@zion.cs.uiuc.edu> <27787933-D79D-4282-9D12-09E408721EE8@apple.com> Message-ID: <36B536D8-E017-4E7D-B16B-7063EA307F72@gmail.com> Notice that this change has the same behavior as a release build. -bw On Oct 17, 2008, at 3:55 PM, Tanya Lattner wrote: > Nicholas thinks this should be in 2.4. Can I get approval from a > code owner please? > > -Tanya > > On Oct 17, 2008, at 11:48 AM, Bill Wendling wrote: > >> Author: void >> Date: Fri Oct 17 13:48:57 2008 >> New Revision: 57714 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=57714&view=rev >> Log: >> The Dwarf writer was comparing mangled and unmangled names for C++ >> code when we >> have an unreachable block in a function. This was triggering the >> assert. This is >> a horrid hack to cover this up. >> >> Oh! for a good debug info architecture! >> >> Added: >> llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll >> Modified: >> llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp >> >> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=57714&r1=57713&r2=57714&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original) >> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Fri Oct 17 >> 13:48:57 2008 >> @@ -2060,8 +2060,11 @@ >> return; >> } >> } >> - >> +#if 0 >> + // FIXME: This is causing an abort because C++ mangled names >> are compared >> + // with their unmangled counterparts. See PR2885. Don't do >> this assert. >> assert(0 && "Couldn't find DIE for machine function!"); >> +#endif >> } >> >> /// EmitInitial - Emit initial Dwarf declarations. This is >> necessary for cc >> >> Added: llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/2008-10-17-C%2B%2BDebugCrash.ll?rev=57714&view=auto >> >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll (added) >> +++ llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll Fri Oct >> 17 13:48:57 2008 >> @@ -0,0 +1,58 @@ >> +; RUN: llvm-as < %s | llc >> +; PR2885 >> + >> +;; NOTE: This generates bad debug info in this case! But that's >> better than >> +;; ICEing. >> + >> +; ModuleID = 'bug.bc' >> +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16- >> i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128- >> a0:0:64-f80:32:32" >> +target triple = "i386-pc-linux-gnu" >> + %llvm.dbg.anchor.type = type { i32, i32 } >> + %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, >> i64, i64, i32, i32 } >> + %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, >> i8* } >> + %llvm.dbg.subprogram.type = type { i32, { }*, { }*, i8*, i8*, >> i8*, { }*, i32, { }*, i1, i1 } >> + %llvm.dbg.variable.type = type { i32, { }*, i8*, { }*, i32, { }* } >> + at llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type >> { i32 393262, { }* bitcast (%llvm.dbg.anchor.type* >> @llvm.dbg.subprograms to { }*), { }* bitcast >> (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* >> getelementptr ([11 x i8]* @.str3, i32 0, i32 0), i8* getelementptr >> ([11 x i8]* @.str3, i32 0, i32 0), i8* null, { }* bitcast >> (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 >> 14, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to >> { }*), i1 true, i1 true } ; <%llvm.dbg.subprogram.type*> [#uses=0] >> + at llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type >> { i32 393216, i32 46 } ; <%llvm.dbg.anchor.type*> [#uses=1] >> + at llvm.dbg.compile_unit = internal constant >> %llvm.dbg.compile_unit.type { i32 393233, { }* bitcast >> (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 4, >> i8* getelementptr ([7 x i8]* @.str, i32 0, i32 0), i8* >> getelementptr ([16 x i8]* @.str1, i32 0, i32 0), i8* getelementptr >> ([52 x i8]* @.str2, i32 0, i32 0) } ; < >> %llvm.dbg.compile_unit.type*> [#uses=1] >> + at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type >> { i32 393216, i32 17 } ; <%llvm.dbg.anchor.type*> [#uses=1] >> + at .str = internal constant [7 x i8] c"die.cc\00" ; <[7 x i8]*> >> [#uses=1] >> + at .str1 = internal constant [16 x i8] c"/home/nicholas/\00" ; <[16 >> x i8]*> [#uses=1] >> + at .str2 = internal constant [52 x i8] c"4.2.1 (Based on Apple Inc. >> build 5623) (LLVM build)\00" ; <[52 x i8]*> [#uses=1] >> + at .str3 = internal constant [11 x i8] c"AssertFail\00" ; <[11 x >> i8]*> [#uses=1] >> + at llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type >> { i32 393252, { }* bitcast (%llvm.dbg.compile_unit.type* >> @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* >> @.str4, i32 0, i32 0), { }* null, i32 0, i64 32, i64 32, i64 0, i32 >> 0, i32 5 } ; <%llvm.dbg.basictype.type*> [#uses=1] >> + at .str4 = internal constant [4 x i8] c"int\00" ; <[4 x i8]*> >> [#uses=1] >> + at llvm.dbg.subprogram5 = internal constant >> %llvm.dbg.subprogram.type { i32 393262, { }* bitcast >> (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* >> bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to >> { }*), i8* getelementptr ([7 x i8]* @.str6, i32 0, i32 0), i8* >> getelementptr ([7 x i8]* @.str6, i32 0, i32 0), i8* null, { }* >> bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to >> { }*), i32 19, { }* bitcast (%llvm.dbg.basictype.type* >> @llvm.dbg.basictype7 to { }*), i1 true, i1 true } ; < >> %llvm.dbg.subprogram.type*> [#uses=1] >> + at .str6 = internal constant [7 x i8] c"FooOne\00" ; <[7 x i8]*> >> [#uses=1] >> + at llvm.dbg.basictype7 = internal constant %llvm.dbg.basictype.type >> { i32 393252, { }* bitcast (%llvm.dbg.compile_unit.type* >> @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* >> @.str8, i32 0, i32 0), { }* null, i32 0, i64 32, i64 32, i64 0, i32 >> 0, i32 5 } ; <%llvm.dbg.basictype.type*> [#uses=1] >> + at .str8 = internal constant [9 x i8] c"long int\00" ; <[9 x i8]*> >> [#uses=1] >> + at llvm.dbg.variable = internal constant %llvm.dbg.variable.type >> { i32 393473, { }* bitcast (%llvm.dbg.subprogram.type* >> @llvm.dbg.subprogram5 to { }*), i8* getelementptr ([6 x i8]* >> @.str9, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* >> @llvm.dbg.compile_unit to { }*), i32 19, { }* bitcast >> (%llvm.dbg.basictype.type* @llvm.dbg.basictype10 to { }*) } ; < >> %llvm.dbg.variable.type*> [#uses=0] >> + at .str9 = internal constant [6 x i8] c"count\00" ; <[6 x i8]*> >> [#uses=1] >> + at llvm.dbg.basictype10 = internal constant %llvm.dbg.basictype.type >> { i32 393252, { }* bitcast (%llvm.dbg.compile_unit.type* >> @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* >> @.str11, i32 0, i32 0), { }* null, i32 0, i64 32, i64 32, i64 0, >> i32 0, i32 7 } ; <%llvm.dbg.basictype.type*> [#uses=1] >> + at .str11 = internal constant [18 x i8] c"long unsigned int\00" ; >> <[18 x i8]*> [#uses=1] >> + at llvm.dbg.subprogram12 = internal constant >> %llvm.dbg.subprogram.type { i32 393262, { }* bitcast >> (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* >> bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to >> { }*), i8* getelementptr ([7 x i8]* @.str13, i32 0, i32 0), i8* >> getelementptr ([7 x i8]* @.str13, i32 0, i32 0), i8* null, { }* >> bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to >> { }*), i32 24, { }* bitcast (%llvm.dbg.basictype.type* >> @llvm.dbg.basictype7 to { }*), i1 true, i1 true } ; < >> %llvm.dbg.subprogram.type*> [#uses=0] >> + at .str13 = internal constant [7 x i8] c"FooTwo\00" ; <[7 x i8]*> >> [#uses=1] >> + at llvm.dbg.subprogram14 = internal constant >> %llvm.dbg.subprogram.type { i32 393262, { }* bitcast >> (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* >> bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to >> { }*), i8* getelementptr ([9 x i8]* @.str15, i32 0, i32 0), i8* >> getelementptr ([9 x i8]* @.str15, i32 0, i32 0), i8* getelementptr >> ([13 x i8]* @.str16, i32 0, i32 0), { }* bitcast >> (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 >> 29, { }* null, i1 false, i1 true } ; <%llvm.dbg.subprogram.type*> >> [#uses=0] >> + at .str15 = internal constant [9 x i8] c"FooThree\00" ; <[9 x i8]*> >> [#uses=1] >> + at .str16 = internal constant [13 x i8] c"_Z8FooThreev\00" ; <[13 x >> i8]*> [#uses=1] >> + >> +declare void @_Z8FooThreev() nounwind >> + >> +define internal i32 @_ZL10AssertFailv() nounwind { >> +entry: >> + unreachable >> +} >> + >> +declare void @llvm.dbg.func.start({ }*) nounwind >> + >> +declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind >> + >> +declare void @abort() noreturn nounwind >> + >> +declare void @llvm.dbg.region.end({ }*) nounwind >> + >> +declare i32 @_ZL6FooOnem(i32) nounwind >> + >> +declare void @llvm.dbg.declare({ }*, { }*) nounwind >> + >> +declare i32 @_ZL6FooTwov() nounwind >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From kremenek at apple.com Fri Oct 17 23:27:15 2008 From: kremenek at apple.com (Ted Kremenek) Date: Sat, 18 Oct 2008 04:27:15 -0000 Subject: [llvm-commits] [llvm] r57762 - /llvm/tags/checker/checker-110/ Message-ID: <200810180427.m9I4RF9c006145@zion.cs.uiuc.edu> Author: kremenek Date: Fri Oct 17 23:27:14 2008 New Revision: 57762 URL: http://llvm.org/viewvc/llvm-project?rev=57762&view=rev Log: Tagging checker-110. Added: llvm/tags/checker/checker-110/ - copied from r57761, llvm/trunk/ From evan.cheng at apple.com Sat Oct 18 00:18:56 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 18 Oct 2008 05:18:56 -0000 Subject: [llvm-commits] [llvm] r57765 - /llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <200810180518.m9I5Iujh007695@zion.cs.uiuc.edu> Author: evancheng Date: Sat Oct 18 00:18:55 2008 New Revision: 57765 URL: http://llvm.org/viewvc/llvm-project?rev=57765&view=rev Log: When creating intervals, leave min(1, numdefs) holes after each instruction. Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=57765&r1=57764&r2=57765&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original) +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Sat Oct 18 00:18:55 2008 @@ -130,9 +130,13 @@ MIIndex += InstrSlots::NUM; FunctionSize++; - // Insert an empty slot after every instruction. - MIIndex += InstrSlots::NUM; - i2miMap_.push_back(0); + // Insert min(1, numdefs) empty slots after every instruction. + unsigned Slots = I->getDesc().getNumDefs(); + if (Slots == 0) + Slots = 1; + MIIndex += InstrSlots::NUM * Slots; + while (Slots--) + i2miMap_.push_back(0); } // Set the MBB2IdxMap entry for this MBB. @@ -732,8 +736,12 @@ handleRegisterDef(MBB, MI, MIIndex, MO, i); } } - - MIIndex += InstrSlots::NUM; + + // Skip over the empty slots after each instruction. + unsigned Slots = MI->getDesc().getNumDefs(); + if (Slots == 0) + Slots = 1; + MIIndex += InstrSlots::NUM * Slots; // Skip over empty indices. while (MIIndex / InstrSlots::NUM < i2miMap_.size() && From evan.cheng at apple.com Sat Oct 18 00:21:38 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 18 Oct 2008 05:21:38 -0000 Subject: [llvm-commits] [llvm] r57766 - /llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <200810180521.m9I5LchI007798@zion.cs.uiuc.edu> Author: evancheng Date: Sat Oct 18 00:21:37 2008 New Revision: 57766 URL: http://llvm.org/viewvc/llvm-project?rev=57766&view=rev Log: By min, I mean max. Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=57766&r1=57765&r2=57766&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original) +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Sat Oct 18 00:21:37 2008 @@ -130,7 +130,7 @@ MIIndex += InstrSlots::NUM; FunctionSize++; - // Insert min(1, numdefs) empty slots after every instruction. + // Insert max(1, numdefs) empty slots after every instruction. unsigned Slots = I->getDesc().getNumDefs(); if (Slots == 0) Slots = 1; From clattner at apple.com Sat Oct 18 01:59:10 2008 From: clattner at apple.com (Chris Lattner) Date: Fri, 17 Oct 2008 23:59:10 -0700 Subject: [llvm-commits] [llvm] r57714 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfWriter.cpp test/DebugInfo/2008-10-17-C++DebugCrash.ll In-Reply-To: <36B536D8-E017-4E7D-B16B-7063EA307F72@gmail.com> References: <200810171848.m9HImxLk017802@zion.cs.uiuc.edu> <27787933-D79D-4282-9D12-09E408721EE8@apple.com> <36B536D8-E017-4E7D-B16B-7063EA307F72@gmail.com> Message-ID: On Oct 17, 2008, at 9:22 PM, Bill Wendling wrote: > Notice that this change has the same behavior as a release build. This patch is fine. Even if it isn't right, it can't break any already-valid cases. -Chris > > > -bw > > On Oct 17, 2008, at 3:55 PM, Tanya Lattner wrote: > >> Nicholas thinks this should be in 2.4. Can I get approval from a >> code owner please? >> >> -Tanya >> >> On Oct 17, 2008, at 11:48 AM, Bill Wendling wrote: >> >>> Author: void >>> Date: Fri Oct 17 13:48:57 2008 >>> New Revision: 57714 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=57714&view=rev >>> Log: >>> The Dwarf writer was comparing mangled and unmangled names for C++ >>> code when we >>> have an unreachable block in a function. This was triggering the >>> assert. This is >>> a horrid hack to cover this up. >>> >>> Oh! for a good debug info architecture! >>> >>> Added: >>> llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll >>> Modified: >>> llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp >>> >>> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp >>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=57714&r1=57713&r2=57714&view=diff >>> >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> ==================================================================== >>> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original) >>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Fri Oct 17 >>> 13:48:57 2008 >>> @@ -2060,8 +2060,11 @@ >>> return; >>> } >>> } >>> - >>> +#if 0 >>> + // FIXME: This is causing an abort because C++ mangled names >>> are compared >>> + // with their unmangled counterparts. See PR2885. Don't do >>> this assert. >>> assert(0 && "Couldn't find DIE for machine function!"); >>> +#endif >>> } >>> >>> /// EmitInitial - Emit initial Dwarf declarations. This is >>> necessary for cc >>> >>> Added: llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll >>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/2008-10-17-C%2B%2BDebugCrash.ll?rev=57714&view=auto >>> >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> = >>> ==================================================================== >>> --- llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll (added) >>> +++ llvm/trunk/test/DebugInfo/2008-10-17-C++DebugCrash.ll Fri Oct >>> 17 13:48:57 2008 >>> @@ -0,0 +1,58 @@ >>> +; RUN: llvm-as < %s | llc >>> +; PR2885 >>> + >>> +;; NOTE: This generates bad debug info in this case! But that's >>> better than >>> +;; ICEing. >>> + >>> +; ModuleID = 'bug.bc' >>> +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16- >>> i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128- >>> a0:0:64-f80:32:32" >>> +target triple = "i386-pc-linux-gnu" >>> + %llvm.dbg.anchor.type = type { i32, i32 } >>> + %llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, >>> i64, i64, i32, i32 } >>> + %llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, >>> i8* } >>> + %llvm.dbg.subprogram.type = type { i32, { }*, { }*, i8*, i8*, >>> i8*, { }*, i32, { }*, i1, i1 } >>> + %llvm.dbg.variable.type = type { i32, { }*, i8*, { }*, i32, { }* } >>> + at llvm.dbg.subprogram = internal constant %llvm.dbg.subprogram.type >>> { i32 393262, { }* bitcast (%llvm.dbg.anchor.type* >>> @llvm.dbg.subprograms to { }*), { }* bitcast >>> (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i8* >>> getelementptr ([11 x i8]* @.str3, i32 0, i32 0), i8* getelementptr >>> ([11 x i8]* @.str3, i32 0, i32 0), i8* null, { }* bitcast >>> (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 >>> 14, { }* bitcast (%llvm.dbg.basictype.type* @llvm.dbg.basictype to >>> { }*), i1 true, i1 true } ; <%llvm.dbg.subprogram.type*> [#uses=0] >>> + at llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type >>> { i32 393216, i32 46 } ; <%llvm.dbg.anchor.type*> [#uses=1] >>> + at llvm.dbg.compile_unit = internal constant >>> %llvm.dbg.compile_unit.type { i32 393233, { }* bitcast >>> (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*), i32 4, >>> i8* getelementptr ([7 x i8]* @.str, i32 0, i32 0), i8* >>> getelementptr ([16 x i8]* @.str1, i32 0, i32 0), i8* getelementptr >>> ([52 x i8]* @.str2, i32 0, i32 0) } ; < >>> %llvm.dbg.compile_unit.type*> [#uses=1] >>> + at llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type >>> { i32 393216, i32 17 } ; <%llvm.dbg.anchor.type*> [#uses=1] >>> + at .str = internal constant [7 x i8] c"die.cc\00" ; <[7 x i8]*> >>> [#uses=1] >>> + at .str1 = internal constant [16 x i8] c"/home/nicholas/\00" ; <[16 >>> x i8]*> [#uses=1] >>> + at .str2 = internal constant [52 x i8] c"4.2.1 (Based on Apple Inc. >>> build 5623) (LLVM build)\00" ; <[52 x i8]*> [#uses=1] >>> + at .str3 = internal constant [11 x i8] c"AssertFail\00" ; <[11 x >>> i8]*> [#uses=1] >>> + at llvm.dbg.basictype = internal constant %llvm.dbg.basictype.type >>> { i32 393252, { }* bitcast (%llvm.dbg.compile_unit.type* >>> @llvm.dbg.compile_unit to { }*), i8* getelementptr ([4 x i8]* >>> @.str4, i32 0, i32 0), { }* null, i32 0, i64 32, i64 32, i64 0, i32 >>> 0, i32 5 } ; <%llvm.dbg.basictype.type*> [#uses=1] >>> + at .str4 = internal constant [4 x i8] c"int\00" ; <[4 x i8]*> >>> [#uses=1] >>> + at llvm.dbg.subprogram5 = internal constant >>> %llvm.dbg.subprogram.type { i32 393262, { }* bitcast >>> (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* >>> bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to >>> { }*), i8* getelementptr ([7 x i8]* @.str6, i32 0, i32 0), i8* >>> getelementptr ([7 x i8]* @.str6, i32 0, i32 0), i8* null, { }* >>> bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to >>> { }*), i32 19, { }* bitcast (%llvm.dbg.basictype.type* >>> @llvm.dbg.basictype7 to { }*), i1 true, i1 true } ; < >>> %llvm.dbg.subprogram.type*> [#uses=1] >>> + at .str6 = internal constant [7 x i8] c"FooOne\00" ; <[7 x i8]*> >>> [#uses=1] >>> + at llvm.dbg.basictype7 = internal constant %llvm.dbg.basictype.type >>> { i32 393252, { }* bitcast (%llvm.dbg.compile_unit.type* >>> @llvm.dbg.compile_unit to { }*), i8* getelementptr ([9 x i8]* >>> @.str8, i32 0, i32 0), { }* null, i32 0, i64 32, i64 32, i64 0, i32 >>> 0, i32 5 } ; <%llvm.dbg.basictype.type*> [#uses=1] >>> + at .str8 = internal constant [9 x i8] c"long int\00" ; <[9 x i8]*> >>> [#uses=1] >>> + at llvm.dbg.variable = internal constant %llvm.dbg.variable.type >>> { i32 393473, { }* bitcast (%llvm.dbg.subprogram.type* >>> @llvm.dbg.subprogram5 to { }*), i8* getelementptr ([6 x i8]* >>> @.str9, i32 0, i32 0), { }* bitcast (%llvm.dbg.compile_unit.type* >>> @llvm.dbg.compile_unit to { }*), i32 19, { }* bitcast >>> (%llvm.dbg.basictype.type* @llvm.dbg.basictype10 to { }*) } ; < >>> %llvm.dbg.variable.type*> [#uses=0] >>> + at .str9 = internal constant [6 x i8] c"count\00" ; <[6 x i8]*> >>> [#uses=1] >>> + at llvm.dbg.basictype10 = internal constant %llvm.dbg.basictype.type >>> { i32 393252, { }* bitcast (%llvm.dbg.compile_unit.type* >>> @llvm.dbg.compile_unit to { }*), i8* getelementptr ([18 x i8]* >>> @.str11, i32 0, i32 0), { }* null, i32 0, i64 32, i64 32, i64 0, >>> i32 0, i32 7 } ; <%llvm.dbg.basictype.type*> [#uses=1] >>> + at .str11 = internal constant [18 x i8] c"long unsigned int\00" ; >>> <[18 x i8]*> [#uses=1] >>> + at llvm.dbg.subprogram12 = internal constant >>> %llvm.dbg.subprogram.type { i32 393262, { }* bitcast >>> (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* >>> bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to >>> { }*), i8* getelementptr ([7 x i8]* @.str13, i32 0, i32 0), i8* >>> getelementptr ([7 x i8]* @.str13, i32 0, i32 0), i8* null, { }* >>> bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to >>> { }*), i32 24, { }* bitcast (%llvm.dbg.basictype.type* >>> @llvm.dbg.basictype7 to { }*), i1 true, i1 true } ; < >>> %llvm.dbg.subprogram.type*> [#uses=0] >>> + at .str13 = internal constant [7 x i8] c"FooTwo\00" ; <[7 x i8]*> >>> [#uses=1] >>> + at llvm.dbg.subprogram14 = internal constant >>> %llvm.dbg.subprogram.type { i32 393262, { }* bitcast >>> (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*), { }* >>> bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to >>> { }*), i8* getelementptr ([9 x i8]* @.str15, i32 0, i32 0), i8* >>> getelementptr ([9 x i8]* @.str15, i32 0, i32 0), i8* getelementptr >>> ([13 x i8]* @.str16, i32 0, i32 0), { }* bitcast >>> (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*), i32 >>> 29, { }* null, i1 false, i1 true } ; <%llvm.dbg.subprogram.type*> >>> [#uses=0] >>> + at .str15 = internal constant [9 x i8] c"FooThree\00" ; <[9 x i8]*> >>> [#uses=1] >>> + at .str16 = internal constant [13 x i8] c"_Z8FooThreev\00" ; <[13 x >>> i8]*> [#uses=1] >>> + >>> +declare void @_Z8FooThreev() nounwind >>> + >>> +define internal i32 @_ZL10AssertFailv() nounwind { >>> +entry: >>> + unreachable >>> +} >>> + >>> +declare void @llvm.dbg.func.start({ }*) nounwind >>> + >>> +declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind >>> + >>> +declare void @abort() noreturn nounwind >>> + >>> +declare void @llvm.dbg.region.end({ }*) nounwind >>> + >>> +declare i32 @_ZL6FooOnem(i32) nounwind >>> + >>> +declare void @llvm.dbg.declare({ }*, { }*) nounwind >>> + >>> +declare i32 @_ZL6FooTwov() nounwind >>> >>> >>> _______________________________________________ >>> llvm-commits mailing list >>> llvm-commits at cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From clattner at apple.com Sat Oct 18 02:00:00 2008 From: clattner at apple.com (Chris Lattner) Date: Sat, 18 Oct 2008 00:00:00 -0700 Subject: [llvm-commits] [llvm] r57765 - /llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp In-Reply-To: <200810180518.m9I5Iujh007695@zion.cs.uiuc.edu> References: <200810180518.m9I5Iujh007695@zion.cs.uiuc.edu> Message-ID: <60B7C920-BCC7-4CCD-AE6B-DD09FA25760D@apple.com> On Oct 17, 2008, at 10:18 PM, Evan Cheng wrote: > Author: evancheng > Date: Sat Oct 18 00:18:55 2008 > New Revision: 57765 > > URL: http://llvm.org/viewvc/llvm-project?rev=57765&view=rev > Log: > When creating intervals, leave min(1, numdefs) holes after each > instruction. Just as a sanity check: extra holes won't affect any of the spill cost heuristics, right? -Chris > > > Modified: > llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp > > Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=57765&r1=57764&r2=57765&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original) > +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Sat Oct 18 > 00:18:55 2008 > @@ -130,9 +130,13 @@ > MIIndex += InstrSlots::NUM; > FunctionSize++; > > - // Insert an empty slot after every instruction. > - MIIndex += InstrSlots::NUM; > - i2miMap_.push_back(0); > + // Insert min(1, numdefs) empty slots after every instruction. > + unsigned Slots = I->getDesc().getNumDefs(); > + if (Slots == 0) > + Slots = 1; > + MIIndex += InstrSlots::NUM * Slots; > + while (Slots--) > + i2miMap_.push_back(0); > } > > // Set the MBB2IdxMap entry for this MBB. > @@ -732,8 +736,12 @@ > handleRegisterDef(MBB, MI, MIIndex, MO, i); > } > } > - > - MIIndex += InstrSlots::NUM; > + > + // Skip over the empty slots after each instruction. > + unsigned Slots = MI->getDesc().getNumDefs(); > + if (Slots == 0) > + Slots = 1; > + MIIndex += InstrSlots::NUM * Slots; > > // Skip over empty indices. > while (MIIndex / InstrSlots::NUM < i2miMap_.size() && > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From anton at korobeynikov.info Sat Oct 18 02:41:48 2008 From: anton at korobeynikov.info (Anton Korobeynikov) Date: Sat, 18 Oct 2008 11:41:48 +0400 Subject: [llvm-commits] [llvm] r57714 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfWriter.cpp test/DebugInfo/2008-10-17-C++DebugCrash.ll In-Reply-To: References: <200810171848.m9HImxLk017802@zion.cs.uiuc.edu> <27787933-D79D-4282-9D12-09E408721EE8@apple.com> <36B536D8-E017-4E7D-B16B-7063EA307F72@gmail.com> Message-ID: > This patch is fine. Even if it isn't right, it can't break any > already-valid cases. Looks ok for me also -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University From baldrick at free.fr Sat Oct 18 02:45:36 2008 From: baldrick at free.fr (Duncan Sands) Date: Sat, 18 Oct 2008 09:45:36 +0200 Subject: [llvm-commits] vector widening patch In-Reply-To: References: Message-ID: <200810180945.37216.baldrick@free.fr> Hi, > Here is a patch for vector widen. In certain cases, it is more > profitable to widen a vector from an illegal type to a legal type > (e.g., v7i8 to v8i8) instead of scalarzing the vector. This patch > implements that. The default implementation is to widen if there is a > legal type that is wider than the illegal type and the vector has more > elements. Any target can override the default logic and implement it > own policy. Please let me know if you have any comments or concerns. how about adding Widen to LegalizeAction, to make things uniform with expand and promote. Also, I think it would be better to do this in LegalizeTypes [*] rather than in LegalizeDAG - it's the future, and it's also much cleaner. Ciao, Duncan. [*] Now that 2.4 is more or less done, I plan to push hard to finish off LegalizeTypes (which is in pretty good shape except for vector shuffle). From sanjiv.gupta at microchip.com Sat Oct 18 08:30:02 2008 From: sanjiv.gupta at microchip.com (sanjiv gupta) Date: Sat, 18 Oct 2008 19:00:02 +0530 Subject: [llvm-commits] Patch for handling multiple values in ExpandIntegerOperand Message-ID: <1224336602.3139.19.camel@idc-lt-i00171.microchip.com> Patch attached as per the discussion in this thread. http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-August/016756.html - Sanjiv -------------- next part -------------- A non-text attachment was scrubbed... Name: multiple-values.patch Type: text/x-patch Size: 859 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20081018/0deddb8e/attachment.bin From baldrick at free.fr Sat Oct 18 11:43:59 2008 From: baldrick at free.fr (Duncan Sands) Date: Sat, 18 Oct 2008 16:43:59 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r57767 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Message-ID: <200810181644.m9IGi0ut008517@zion.cs.uiuc.edu> Author: baldrick Date: Sat Oct 18 11:43:57 2008 New Revision: 57767 URL: http://llvm.org/viewvc/llvm-project?rev=57767&view=rev Log: Fix typo. Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=57767&r1=57766&r2=57767&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Sat Oct 18 11:43:57 2008 @@ -190,7 +190,7 @@ Value *Va = ValuesFromPCH->getOperand(i); if (!Va) { - // If V is empty then nsert NULL to represent empty entries. + // If V is empty then insert NULL to represent empty entries. LLVMValues.push_back(Va); continue; } From baldrick at free.fr Sat Oct 18 11:23:20 2008 From: baldrick at free.fr (Duncan Sands) Date: Sat, 18 Oct 2008 18:23:20 +0200 Subject: [llvm-commits] Patch for handling multiple values in ExpandIntegerOperand In-Reply-To: <1224336602.3139.19.camel@idc-lt-i00171.microchip.com> References: <1224336602.3139.19.camel@idc-lt-i00171.microchip.com> Message-ID: <200810181823.21150.baldrick@free.fr> Hi, - assert(Res.getValueType() == N->getValueType(0) && N->getNumValues() == 1 && - "Invalid operand expansion"); + // The result node should return same or more values as the original node. + assert (Res.getNode()->getNumValues() >= N->getNumValues()); I'd rather use ReplaceAllUsesWith and require the number of values to be the same. This is more work of course, since it means fixing up several places. Ciao, Duncan. From gohman at apple.com Sat Oct 18 11:52:01 2008 From: gohman at apple.com (Dan Gohman) Date: Sat, 18 Oct 2008 09:52:01 -0700 (PDT) Subject: [llvm-commits] vector widening patch In-Reply-To: References: Message-ID: <55300.76.220.41.203.1224348721.squirrel@webmail.apple.com> > + // Check if we can widen the vector type > + MVT WidenVT = TLI.getWidenVectorType(VT); > + if (WidenVT != MVT::Other && > + TLI.getOperationAction(Op.getNode()->getOpcode(), VT) == > + TargetLowering::Expand) { > + // Widen the type > + WidenVectorOp(Op, WidenVT); > + } else { What is the TLI.getOperationAction check checking? Isn't it sufficient to say that if you have a vector type that's not legal, and the target provides a type to widen to, that you should choose widening? > + case ISD::SELECT: > + case ISD::SELECT_CC: > + case ISD::BSWAP: > + case ISD::CTPOP: > + case ISD::CTTZ: > + case ISD::CTLZ: { > + // For now, we assume that using vectors for these operations don't make > + // much sense so we just split it. We return an empty result For bswap, ctpop, cttz, and ctlz, there exist machines that have some of these as vector instructions, so I think they should be able to be widened as well. For SELECT and SELECT_CC, if these end up being how vector selects are represented, then it definately makes sense to be able to widen them :-). > + // If it a vector of two, we will assume it doesn't make sense to widen > + if (NElts == 2) > + return MVT::Other; Shouldn't this be "<= 2"? I guess it doesn't matter immediately, because single-element vectors go down the ScalarizeVectorOp path, but these TLI query routines can sometimes be useful outside of legalize too. Also, here and in other places please add a period to the end of the sentence in the comment. > + // We assume that we have good rules to handle loading power of two loads so > + // if we break down the operations to power of 2 loads. The strategy is to > + // load the largest power of 2 that we can easily transform to a legal vector > + // and then insert into that vector, and the cast the result into the legal > + // vector that we want. This avoids unnecessary stack converts. I think the "if" in the first sentance is spurious. It looks like genWidenVectorLoads is careful to never loads any memory beyond the elements it needs. Is that true? That's important to avoid touching unnecessary cache lines or pages. And for volatile correctness :-). On the other hand, it might be nice to check the alignment and volatile flags to see if it's safe to allow a full-length legal wide vector load, which could be a lot more efficient. Worth mentioning in a comment, at least :-). > + /// isVolatile: volatile lod typo > + // It must be true that we the widen vector type is bigger than where > + // we need to store. s/ we / when / Can you add some regression tests that cover the basic vector widening functionality? Thanks, Dan From edwintorok at gmail.com Sat Oct 18 12:22:25 2008 From: edwintorok at gmail.com (=?ISO-8859-1?Q?T=F6r=F6k_Edvin?=) Date: Sat, 18 Oct 2008 20:22:25 +0300 Subject: [llvm-commits] [test-suite] r57071 [1/7] - in /test-suite/trunk/MultiSource/Applications/lua: ./ bench/ input/ test/ In-Reply-To: <570225F6-8E8C-4CC5-8D58-014A59AAE2D7@apple.com> References: <200810042058.m94KwJxP005655@zion.cs.uiuc.edu> <570225F6-8E8C-4CC5-8D58-014A59AAE2D7@apple.com> Message-ID: <4354d3270810181022n6fe9f75doe42f5a92f3d7862f@mail.gmail.com> On Fri, Oct 17, 2008 at 21:17, Tanya Lattner wrote: > Adding a new test program to llvm-test just 2 days before the branch is > probably not a good idea in the future. We experienced issues with the > gen_input script on darwin and I've gotten a report that it doesn't work > with srcDir != objDir. I'm investigating this now. Is there a PR open for this? I can help. > So in the future, it would be good to get this in at least a week before so > other platforms can test it out. Ok, sorry. Don't hold up the release because of this, since the program wasn't in llvm-2.3, its not a regression if it fails. Best regards, --Edwin From sanjiv.gupta at microchip.com Sat Oct 18 12:29:18 2008 From: sanjiv.gupta at microchip.com (sanjiv gupta) Date: Sat, 18 Oct 2008 22:59:18 +0530 Subject: [llvm-commits] Patch for handling multiple values in ExpandIntegerOperand In-Reply-To: <200810181823.21150.baldrick@free.fr> References: <1224336602.3139.19.camel@idc-lt-i00171.microchip.com> <200810181823.21150.baldrick@free.fr> Message-ID: <1224350958.3139.29.camel@idc-lt-i00171.microchip.com> On Sat, 2008-10-18 at 18:23 +0200, Duncan Sands wrote: > Hi, > > - assert(Res.getValueType() == N->getValueType(0) && N->getNumValues() == 1 && > - "Invalid operand expansion"); > + // The result node should return same or more values as the original node. > + assert (Res.getNode()->getNumValues() >= N->getNumValues()); > > I'd rather use ReplaceAllUsesWith and require the number > of values to be the same. This is more work of course, > since it means fixing up several places. > > Ciao, > > Duncan. Please refer to one of your posts to see why number of values can't be same. http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-September/016767.html - Sanjiv From edwintorok at gmail.com Sat Oct 18 12:30:37 2008 From: edwintorok at gmail.com (=?ISO-8859-1?Q?T=F6r=F6k_Edvin?=) Date: Sat, 18 Oct 2008 20:30:37 +0300 Subject: [llvm-commits] {PATCH] fix 'make check' on Solaris10 Message-ID: <4354d3270810181030l6c93a546gd800642e7d9b93ea@mail.gmail.com> Hi, On Solaris 10/x86 the default grep is not GNU grep, same for as. Attached is a patch that uses autoconf to find the correct grep and as. Without this patch on Solaris 9 tests fail: # of unexpected failures 9 # of unexpected successes 1 # of expected failures 6 With this patch: # of unexpected failures 1 # of unexpected successes 1 # of expected failures 6 [the one failing test is because LLVMHello.so is not built, it cannot find install-sh] solaris-llvm24.patch is for the release branch, its the same as solaris.patch, but on trunk valgrind got added to the Makefile, and the patch failed to apply, so I regenerated it. Is this OK for trunk? If yes, can this also be pulled into the release branch? Best regards, --Edwin -------------- next part -------------- A non-text attachment was scrubbed... Name: solaris.patch Type: text/x-diff Size: 2363 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20081018/40c3e0b2/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: solaris-llvm24.patch Type: text/x-diff Size: 2324 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20081018/40c3e0b2/attachment-0001.bin From sabre at nondot.org Sat Oct 18 13:21:33 2008 From: sabre at nondot.org (Chris Lattner) Date: Sat, 18 Oct 2008 18:21:33 -0000 Subject: [llvm-commits] [test-suite] r57768 - /test-suite/trunk/MultiSource/Applications/lua/Makefile Message-ID: <200810181821.m9IILX4H011913@zion.cs.uiuc.edu> Author: lattner Date: Sat Oct 18 13:21:31 2008 New Revision: 57768 URL: http://llvm.org/viewvc/llvm-project?rev=57768&view=rev Log: make this program work when srcdir != objdir, patch by Julien Lerouge! Fixes PR2912 Modified: test-suite/trunk/MultiSource/Applications/lua/Makefile Modified: test-suite/trunk/MultiSource/Applications/lua/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/lua/Makefile?rev=57768&r1=57767&r2=57768&view=diff ============================================================================== --- test-suite/trunk/MultiSource/Applications/lua/Makefile (original) +++ test-suite/trunk/MultiSource/Applications/lua/Makefile Sat Oct 18 13:21:31 2008 @@ -9,7 +9,7 @@ CPPFLAGS += -DLUA_USE_POSIX PROG = lua -RUN_OPTIONS = alltests.lua Author: djg Date: Sat Oct 18 13:22:42 2008 New Revision: 57770 URL: http://llvm.org/viewvc/llvm-project?rev=57770&view=rev Log: Don't truncate GlobalAddress offsets to int in debug output. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=57770&r1=57769&r2=57770&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Oct 18 13:22:42 2008 @@ -5318,7 +5318,7 @@ } } else if (const GlobalAddressSDNode *GADN = dyn_cast(this)) { - int offset = GADN->getOffset(); + int64_t offset = GADN->getOffset(); OS << '<'; WriteAsOperand(OS, GADN->getGlobal()); OS << '>'; Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp?rev=57770&r1=57769&r2=57770&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp Sat Oct 18 13:22:42 2008 @@ -127,7 +127,7 @@ } else if (const GlobalAddressSDNode *GADN = dyn_cast(Node)) { Op += ": " + GADN->getGlobal()->getName(); - if (int Offset = GADN->getOffset()) { + if (int64_t Offset = GADN->getOffset()) { if (Offset > 0) Op += "+" + itostr(Offset); else From clattner at apple.com Sat Oct 18 13:22:58 2008 From: clattner at apple.com (Chris Lattner) Date: Sat, 18 Oct 2008 11:22:58 -0700 Subject: [llvm-commits] vector widening patch In-Reply-To: <200810180945.37216.baldrick@free.fr> References: <200810180945.37216.baldrick@free.fr> Message-ID: <8E276806-EED1-45D7-81C5-F04C6755B9D7@apple.com> On Oct 18, 2008, at 12:45 AM, Duncan Sands wrote: > Hi, > >> Here is a patch for vector widen. In certain cases, it is more >> profitable to widen a vector from an illegal type to a legal type >> (e.g., v7i8 to v8i8) instead of scalarzing the vector. This patch >> implements that. The default implementation is to widen if there >> is a >> legal type that is wider than the illegal type and the vector has >> more >> elements. Any target can override the default logic and implement it >> own policy. Please let me know if you have any comments or concerns. > > how about adding Widen to LegalizeAction, to make things uniform with > expand and promote. Also, I think it would be better to do this in > LegalizeTypes [*] rather than in LegalizeDAG - it's the future, and > it's also much cleaner. Wouldn't it make sense to use 'expand' to mean "scalarize" and 'promote' to mean "widen"? -Chris From clattner at apple.com Sat Oct 18 13:25:34 2008 From: clattner at apple.com (Chris Lattner) Date: Sat, 18 Oct 2008 11:25:34 -0700 Subject: [llvm-commits] {PATCH] fix 'make check' on Solaris10 In-Reply-To: <4354d3270810181030l6c93a546gd800642e7d9b93ea@mail.gmail.com> References: <4354d3270810181030l6c93a546gd800642e7d9b93ea@mail.gmail.com> Message-ID: On Oct 18, 2008, at 10:30 AM, T?r?k Edvin wrote: > On Solaris 10/x86 the default grep is not GNU grep, same for as. > Attached is a patch that uses autoconf to find the correct grep and > as. This looks good to me, but I'm not autoconf wizard :). Eric, can you take a look? > Is this OK for trunk? If Eric approves, yes! > If yes, can this also be pulled into the release branch? Probably not, I'd rather not take the risk, sorry :( -Chris From clattner at apple.com Sat Oct 18 13:47:56 2008 From: clattner at apple.com (Chris Lattner) Date: Sat, 18 Oct 2008 11:47:56 -0700 Subject: [llvm-commits] [llvm] r57747 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll In-Reply-To: <200810180103.m9I13lNh032106@zion.cs.uiuc.edu> References: <200810180103.m9I13lNh032106@zion.cs.uiuc.edu> Message-ID: <550D84EF-82CD-41FF-8312-E3C060E5FB32@apple.com> On Oct 17, 2008, at 6:03 PM, Dan Gohman wrote: > Author: djg > Date: Fri Oct 17 20:03:45 2008 > New Revision: 57747 > > URL: http://llvm.org/viewvc/llvm-project?rev=57747&view=rev > Log: > Revert r57699. It's causing regressions in > test/CodeGen/X86/2008-09-17-inline-asm-1.ll > and a few others, and it breaks the llvm-gcc build. Urg, sorry about that. Thanks for reverting it Dan! -Chris From baldrick at free.fr Sat Oct 18 13:48:56 2008 From: baldrick at free.fr (Duncan Sands) Date: Sat, 18 Oct 2008 20:48:56 +0200 Subject: [llvm-commits] Patch for handling multiple values in ExpandIntegerOperand In-Reply-To: <1224350958.3139.29.camel@idc-lt-i00171.microchip.com> References: <1224336602.3139.19.camel@idc-lt-i00171.microchip.com> <200810181823.21150.baldrick@free.fr> <1224350958.3139.29.camel@idc-lt-i00171.microchip.com> Message-ID: <200810182048.56939.baldrick@free.fr> > Please refer to one of your posts to see why number of values can't be > same. > > http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-September/016767.html As I mentioned there, in such cases you need to use MergeValues. Take a look at X86TargetLowering::ExpandFP_TO_SINT for an example of this. Ciao, Duncan. From sabre at nondot.org Sat Oct 18 13:49:30 2008 From: sabre at nondot.org (Chris Lattner) Date: Sat, 18 Oct 2008 18:49:30 -0000 Subject: [llvm-commits] [llvm] r57771 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll Message-ID: <200810181849.m9IInUF5013159@zion.cs.uiuc.edu> Author: lattner Date: Sat Oct 18 13:49:30 2008 New Revision: 57771 URL: http://llvm.org/viewvc/llvm-project?rev=57771&view=rev Log: Reapply r57699 with a fix to not crash on asms with multiple results. Unlike the previous patch this one actually passes make check. "Fix PR2356 on PowerPC: if we have an input and output that are tied together that have different sizes (e.g. i32 and i64) make sure to reserve registers for the bigger operand." Added: llvm/trunk/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=57771&r1=57770&r2=57771&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Sat Oct 18 13:49:30 2008 @@ -4667,6 +4667,7 @@ OpInfo.CallOperandVal = CS.getArgument(ArgNo++); break; } + // The return value of the call is this value. As such, there is no // corresponding argument. assert(CS.getType() != Type::VoidTy && "Bad inline asm!"); @@ -4699,6 +4700,30 @@ } OpInfo.ConstraintVT = OpVT; + } + + // Second pass over the constraints: compute which constraint option to use + // and assign registers to constraints that want a specific physreg. + for (unsigned i = 0, e = ConstraintInfos.size(); i != e; ++i) { + SDISelAsmOperandInfo &OpInfo = ConstraintOperands[i]; + + // If this is an output operand with a matching input operand, look up the + // matching input. It might have a different type (e.g. the output might be + // i32 and the input i64) and we need to pick the larger width to ensure we + // reserve the right number of registers. + if (OpInfo.hasMatchingInput()) { + SDISelAsmOperandInfo &Input = ConstraintOperands[OpInfo.MatchingInput]; + if (OpInfo.ConstraintVT != Input.ConstraintVT) { + assert(OpInfo.ConstraintVT.isInteger() && + Input.ConstraintVT.isInteger() && + "Asm constraints must be the same or different sized integers"); + if (OpInfo.ConstraintVT.getSizeInBits() < + Input.ConstraintVT.getSizeInBits()) + OpInfo.ConstraintVT = Input.ConstraintVT; + else + Input.ConstraintVT = OpInfo.ConstraintVT; + } + } // Compute the constraint code and ConstraintType to use. TLI.ComputeConstraintToUse(OpInfo, OpInfo.CallOperand, hasMemory, &DAG); @@ -4948,22 +4973,28 @@ // and set it as the value of the call. if (!RetValRegs.Regs.empty()) { SDValue Val = RetValRegs.getCopyFromRegs(DAG, Chain, &Flag); - - // If any of the results of the inline asm is a vector, it may have the - // wrong width/num elts. This can happen for register classes that can - // contain multiple different value types. The preg or vreg allocated may - // not have the same VT as was expected. Convert it to the right type with - // bit_convert. - if (const StructType *ResSTy = dyn_cast(CS.getType())) { - for (unsigned i = 0, e = ResSTy->getNumElements(); i != e; ++i) { - if (Val.getNode()->getValueType(i).isVector()) - Val = DAG.getNode(ISD::BIT_CONVERT, - TLI.getValueType(ResSTy->getElementType(i)), Val); - } - } else { - if (Val.getValueType().isVector()) - Val = DAG.getNode(ISD::BIT_CONVERT, TLI.getValueType(CS.getType()), - Val); + + // FIXME: Why don't we do this for inline asms with MRVs? + if (CS.getType()->isSingleValueType() && CS.getType()->isSized()) { + MVT ResultType = TLI.getValueType(CS.getType()); + + // If any of the results of the inline asm is a vector, it may have the + // wrong width/num elts. This can happen for register classes that can + // contain multiple different value types. The preg or vreg allocated may + // not have the same VT as was expected. Convert it to the right type + // with bit_convert. + if (ResultType != Val.getValueType() && Val.getValueType().isVector()) { + Val = DAG.getNode(ISD::BIT_CONVERT, ResultType, Val); + + } else if (ResultType != Val.getValueType() && + ResultType.isInteger() && Val.getValueType().isInteger()) { + // If a result value was tied to an input value, the computed result may + // have a wider width than the expected result. Extract the relevant + // portion. + Val = DAG.getNode(ISD::TRUNCATE, ResultType, Val); + } + + assert(ResultType == Val.getValueType() && "Asm result value mismatch!"); } setValue(CS.getInstruction(), Val); @@ -5219,7 +5250,8 @@ Value != NumValues; ++Value) { MVT VT = ValueVTs[Value]; const Type *ArgTy = VT.getTypeForMVT(); - SDValue Op = SDValue(Args[i].Node.getNode(), Args[i].Node.getResNo() + Value); + SDValue Op = SDValue(Args[i].Node.getNode(), + Args[i].Node.getResNo() + Value); ISD::ArgFlagsTy Flags; unsigned OriginalAlignment = getTargetData()->getABITypeAlignment(ArgTy); Added: llvm/trunk/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll?rev=57771&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll (added) +++ llvm/trunk/test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll Sat Oct 18 13:49:30 2008 @@ -0,0 +1,10 @@ +; RUN: llvm-as < %s | llc +; PR2356 +target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128" +target triple = "powerpc-apple-darwin9" + +define i32 @test(i64 %x, i32* %p) nounwind { + %asmtmp = call i32 asm "", "=r,0"(i64 0) nounwind ; [#uses=0] + %y = add i32 %asmtmp, 1 + ret i32 %y +} From baldrick at free.fr Sat Oct 18 13:51:46 2008 From: baldrick at free.fr (Duncan Sands) Date: Sat, 18 Oct 2008 20:51:46 +0200 Subject: [llvm-commits] vector widening patch In-Reply-To: <8E276806-EED1-45D7-81C5-F04C6755B9D7@apple.com> References: <200810180945.37216.baldrick@free.fr> <8E276806-EED1-45D7-81C5-F04C6755B9D7@apple.com> Message-ID: <200810182051.46958.baldrick@free.fr> > > how about adding Widen to LegalizeAction, to make things uniform with > > expand and promote. Also, I think it would be better to do this in > > LegalizeTypes [*] rather than in LegalizeDAG - it's the future, and > > it's also much cleaner. > > Wouldn't it make sense to use 'expand' to mean "scalarize" and > 'promote' to mean "widen"? Yeah, LegalizeTypes already converts Expand into one of ExpandInteger, SoftenFloat, ExpandFloat, ScalarizeVector or SplitVector. It could turn Promote into either PromoteInteger (like now) or WidenVector in a similar way. No need to add it to LegalizeAction (that suggestion was a thinko on my part). Ciao, Duncan. From kremenek at apple.com Sat Oct 18 14:23:32 2008 From: kremenek at apple.com (Ted Kremenek) Date: Sat, 18 Oct 2008 19:23:32 -0000 Subject: [llvm-commits] [llvm] r57773 - /llvm/tags/checker/checker-111/ Message-ID: <200810181923.m9IJNWGI014446@zion.cs.uiuc.edu> Author: kremenek Date: Sat Oct 18 14:23:32 2008 New Revision: 57773 URL: http://llvm.org/viewvc/llvm-project?rev=57773&view=rev Log: Tagging checker-111. Added: llvm/tags/checker/checker-111/ - copied from r57772, llvm/trunk/ From evan.cheng at apple.com Sat Oct 18 15:12:21 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 18 Oct 2008 13:12:21 -0700 Subject: [llvm-commits] [llvm] r57765 - /llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp In-Reply-To: <60B7C920-BCC7-4CCD-AE6B-DD09FA25760D@apple.com> References: <200810180518.m9I5Iujh007695@zion.cs.uiuc.edu> <60B7C920-BCC7-4CCD-AE6B-DD09FA25760D@apple.com> Message-ID: <0D069F7F-5FC0-4F3D-B293-A342A47B4D05@apple.com> It shouldn't. Owen had fixed that problem. Evan On Oct 18, 2008, at 12:00 AM, Chris Lattner wrote: > > On Oct 17, 2008, at 10:18 PM, Evan Cheng wrote: > >> Author: evancheng >> Date: Sat Oct 18 00:18:55 2008 >> New Revision: 57765 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=57765&view=rev >> Log: >> When creating intervals, leave min(1, numdefs) holes after each >> instruction. > > Just as a sanity check: extra holes won't affect any of the spill > cost heuristics, right? > > -Chris > >> >> >> Modified: >> llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp >> >> Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=57765&r1=57764&r2=57765&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> === >> =================================================================== >> --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original) >> +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Sat Oct 18 >> 00:18:55 2008 >> @@ -130,9 +130,13 @@ >> MIIndex += InstrSlots::NUM; >> FunctionSize++; >> >> - // Insert an empty slot after every instruction. >> - MIIndex += InstrSlots::NUM; >> - i2miMap_.push_back(0); >> + // Insert min(1, numdefs) empty slots after every instruction. >> + unsigned Slots = I->getDesc().getNumDefs(); >> + if (Slots == 0) >> + Slots = 1; >> + MIIndex += InstrSlots::NUM * Slots; >> + while (Slots--) >> + i2miMap_.push_back(0); >> } >> >> // Set the MBB2IdxMap entry for this MBB. >> @@ -732,8 +736,12 @@ >> handleRegisterDef(MBB, MI, MIIndex, MO, i); >> } >> } >> - >> - MIIndex += InstrSlots::NUM; >> + >> + // Skip over the empty slots after each instruction. >> + unsigned Slots = MI->getDesc().getNumDefs(); >> + if (Slots == 0) >> + Slots = 1; >> + MIIndex += InstrSlots::NUM * Slots; >> >> // Skip over empty indices. >> while (MIIndex / InstrSlots::NUM < i2miMap_.size() && >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From monping at apple.com Sat Oct 18 16:53:08 2008 From: monping at apple.com (Mon Ping Wang) Date: Sat, 18 Oct 2008 14:53:08 -0700 Subject: [llvm-commits] vector widening patch In-Reply-To: <200810182051.46958.baldrick@free.fr> References: <200810180945.37216.baldrick@free.fr> <8E276806-EED1-45D7-81C5-F04C6755B9D7@apple.com> <200810182051.46958.baldrick@free.fr> Message-ID: Hi, We should avoid add this to LegalizeActions unless we feel that it is much cleaner to do so because it will require another bit that we currently don't have (we would need another word). However, since we are moving away from this, it is a moot point. At the time when I first implemented this, I remembering discussing using promote vs expand. I started with promote but moved away from at the time because we were concerned that there were instances where we would want to promote a vector, i.e., v4i8 to v4i32 and I didn't want to get the two concepts confused, e.g., we first widen a vector than promote to a large type (v3i8 to v4i8 to v4i32). This meant overloading expand even more as I rationalized that as expand is deciding to either scalarize or widen vector based on what was better to do. However, I'm coming more to a conclusion that it doesn't make that much sense to promote a vector type so I don't mind using "promote" for widening. -- Mon Ping On Oct 18, 2008, at 11:51 AM, Duncan Sands wrote: >>> how about adding Widen to LegalizeAction, to make things uniform >>> with >>> expand and promote. Also, I think it would be better to do this in >>> LegalizeTypes [*] rather than in LegalizeDAG - it's the future, and >>> it's also much cleaner. >> >> Wouldn't it make sense to use 'expand' to mean "scalarize" and >> 'promote' to mean "widen"? > > Yeah, LegalizeTypes already converts Expand into one of > ExpandInteger, SoftenFloat, ExpandFloat, ScalarizeVector > or SplitVector. It could turn Promote into either > PromoteInteger (like now) or WidenVector in a similar way. > No need to add it to LegalizeAction (that suggestion was a > thinko on my part). > > Ciao, > > Duncan. > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From alenhar2 at cs.uiuc.edu Sat Oct 18 17:01:30 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Sat, 18 Oct 2008 22:01:30 -0000 Subject: [llvm-commits] [poolalloc] r57776 - in /poolalloc/trunk/include/poolalloc_runtime: PoolAllocator.h Support/SplayTree.h test.ex Message-ID: <200810182201.m9IM1UcW020153@zion.cs.uiuc.edu> Author: alenhar2 Date: Sat Oct 18 17:01:29 2008 New Revision: 57776 URL: http://llvm.org/viewvc/llvm-project?rev=57776&view=rev Log: Bitmask allocator that uses seperate allocators from metadata v.s. data Modified: poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h poolalloc/trunk/include/poolalloc_runtime/test.ex Modified: poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h?rev=57776&r1=57775&r2=57776&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h (original) +++ poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h Sat Oct 18 17:01:29 2008 @@ -1,6 +1,9 @@ #include "poolalloc_runtime/Support/SplayTree.h" #include "llvm/ADT/hash_map.h" +#include +#include #include +#include template class PoolAllocator : SlabManager { @@ -62,9 +65,20 @@ DAlloc allocator; + struct dealloc_actor { + MallocSlabManager* m; + void operator()(void*& start, void*& end) { + m->allocator.deallocate((char*) start,((char*)end-(char*)start) + 1); + } + dealloc_actor(MallocSlabManager* _m) : m(_m) {} + }; + protected: MallocSlabManager(unsigned Osize, unsigned Alignment) : objsize(Osize) {} - + ~MallocSlabManager() { + dealloc_actor act(this); + objs.clear(act); + } void* slab_alloc(unsigned num) { void* x = allocator.allocate(num*objsize); objs.insert(x, (char*)x + num*objsize - 1); @@ -81,9 +95,6 @@ bool slab_valid(void* obj) { return objs.find(obj); } - bool slab_contains(void* obj) { - return objs.find(obj); - } bool slab_managed(void* obj) { return objs.find(obj); } @@ -92,10 +103,165 @@ } }; -template +template > class BitMaskSlabManager { - hash_map >slabmetadata; - + struct slab_metadata { + void* data; + unsigned* free_bitmask; + }; + + typedef typename SafeAllocator::template rebind >::other SAlloc; + typedef typename SafeAllocator::template rebind::other SBMAlloc; + typedef hash_map, std::equal_to, SAlloc> MapTy; + + MapTy slabmetadata; + hash_map, std::equal_to, SAlloc> mappedPages; + + SBMAlloc BMAlloc; + unsigned objsize; + slab_metadata* CurAllocSlab; + unsigned totalslots; + unsigned totalallocs; + + unsigned numObjsPerSlab() const { + return (PageManager::pageSize << PageShiftAmount) / objsize; + } + + unsigned numIntsPerSlabMeta() const { + return (numObjsPerSlab() + (sizeof(unsigned) * 8 - 1)) / (sizeof(unsigned) * 8); + } + + slab_metadata* getSlabForObj(void* obj) { + intptr_t ptr = (intptr_t)obj; + ptr &= ~(PageManager::pageSize - 1); + void* page = (void*)ptr; + page = mappedPages[page]; + typename MapTy::iterator ii = slabmetadata.find(page); + if (ii == slabmetadata.end()) return 0; + return &ii->second; + } + + unsigned getObjLoc(slab_metadata* slab, void* obj) { + return ((char*)obj - (char*)(slab->data)) / objsize; + } + + unsigned findFree(slab_metadata* slab) const { + // FIXME: free_bitmask is treated as a linear array. A bit-tree representation would be faster + + for (unsigned y = 0; y < numIntsPerSlabMeta(); ++y) { + unsigned zone = slab->free_bitmask[y]; + if (zone != ~0) + for (unsigned x = 0; x < sizeof(unsigned); ++x) + if ((zone >> (x * 8) & 0x00FF) != 0x00FF) + for (int z = 0; z < 8; ++z) + if (!(zone & 1 << (x * 8 + z))) + return y * sizeof(unsigned) + x * 8 + z; + } + return ~0; + } + + bool isFree(slab_metadata* slab, unsigned loc) const { + return !(slab->free_bitmask[loc / sizeof(unsigned)] & ( 1 << (loc % sizeof(unsigned)))); + } + + void setFree(slab_metadata* slab, unsigned loc) { + slab->free_bitmask[loc / sizeof(unsigned)] &= ~( 1 << (loc % sizeof(unsigned))); + --totalallocs; + } + + void setUsed(slab_metadata* slab, unsigned loc) { + slab->free_bitmask[loc / sizeof(unsigned)] |= ( 1 << (loc % sizeof(unsigned))); + ++totalallocs; + } + + void createOrSetNewSlab() { + if (!totalslots || ((totalallocs * 100) / totalslots > load)) { + // Create new slab + void* mem = PageManager::getPages(1 << PageShiftAmount); + slab_metadata& slab = slabmetadata[mem]; + slab.data = mem; + slab.free_bitmask = BMAlloc.allocate(numIntsPerSlabMeta()); + std::fill(slab.free_bitmask, slab.free_bitmask + numIntsPerSlabMeta(), 0); + CurAllocSlab = &slab; + totalslots += numObjsPerSlab(); + for (unsigned x = 0; x < (1 << PageShiftAmount); ++x) + mappedPages[(void*) &(((char*)mem)[x * PageManager::pageSize])] = mem; + } else { + // Find a slab with some free space + for (typename MapTy::iterator ii = slabmetadata.begin(), + ee = slabmetadata.end(); ii != ee; ++ii) + if (findFree(&ii->second)) { + CurAllocSlab = &ii->second; + break; + } + } + } + + protected: + BitMaskSlabManager(unsigned Osize, unsigned Alignment) + :objsize(Osize), CurAllocSlab(0), totalslots(0), totalallocs(0) + {} + ~BitMaskSlabManager() { + for (typename MapTy::const_iterator ii = slabmetadata.begin(), + ee = slabmetadata.end(); ii != ee; ++ii) { + PageManager::freePages(ii->second.data, 1 << PageShiftAmount); + BMAlloc.deallocate(ii->second.free_bitmask, numIntsPerSlabMeta()); + } + } + + void* slab_alloc(unsigned num) { + if (num > 1) { + assert(0 && "Only size 1 allowed"); + abort(); + } + if (!CurAllocSlab) + createOrSetNewSlab(); + unsigned loc = findFree(CurAllocSlab); + if (loc == ~0) { + CurAllocSlab = 0; + return slab_alloc(num); + } + setUsed(CurAllocSlab, loc); + return &((char*)CurAllocSlab->data)[loc * objsize]; + } + void slab_free(void* obj) { + slab_metadata* slab = getSlabForObj(obj); + if (!slab) { + assert(0 && "Freeing invalid object"); + abort(); + } + setFree(slab, getObjLoc(slab, obj)); + } + bool slab_valid(void* obj) { + slab_metadata* slab = getSlabForObj(obj); + if (!slab) return false; + return !isFree(slab, getObjLoc(slab, obj)); + } + bool slab_managed(void* obj) { + slab_metadata* slab = getSlabForObj(obj); + return slab != 0; + } + bool slab_getbounds(void* obj, void*& start, void*& end) { + slab_metadata* slab = getSlabForObj(obj); + if (!slab) return false; + unsigned loc = getObjLoc(slab, obj); + if (isFree(slab, loc)) return false; + start = &(char*)(slab->data)[loc * objsize]; + end = &(char*)(slab->data)[loc * objsize] - 1; + return true; + } +}; +class LinuxMmap { + public: + enum d {pageSize = 4096}; + static void* getPages(unsigned num) { + return mmap(0, pageSize * num, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); + } + static void freePages(void* page, unsigned num) { + munmap(page, num * pageSize); + } }; + Modified: poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h?rev=57776&r1=57775&r2=57776&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h (original) +++ poolalloc/trunk/include/poolalloc_runtime/Support/SplayTree.h Sat Oct 18 17:01:29 2008 @@ -4,6 +4,8 @@ struct range_tree_node { range_tree_node(void* s, void* e) : left(0), right(0), start(s), end(e) {} range_tree_node() : left(0), right(0), start(0), end(0) {} + template + void do_act(O& act) { act(start, end, data); } range_tree_node* left; range_tree_node* right; void* start; @@ -15,6 +17,8 @@ struct range_tree_node { range_tree_node(void* s, void* e) : left(0), right(0), start(s), end(e) {} range_tree_node() : left(0), right(0), start(0), end(0) {} + template + void do_act(O& act) { act(start, end); } range_tree_node* left; range_tree_node* right; void* start; @@ -105,6 +109,16 @@ __node_alloc.deallocate(t, 1); } + template + void __clear_internal(tree_node* t, O& act) { + if (!t) return; + __clear_internal(t->left); + __clear_internal(t->right); + t->do_act(act); + __node_alloc.destroy(t); + __node_alloc.deallocate(t, 1); + } + public: explicit RangeSplayTree(const _Alloc& a) :__node_alloc(a), Tree(0) {} @@ -162,6 +176,12 @@ Tree = 0; } + template + void __clear(O& act) { + __clear_internal(Tree, act); + Tree = 0; + } + tree_node* __find(void* key) { if (!Tree) return false; Tree = splay(Tree, key); @@ -192,7 +212,10 @@ bool count() { return Tree.__count(); } void clear() { Tree.__clear(); } - + + template + void clear(O& act) { Tree.__clear(act); } + bool find(void* key, void*& start, void*& end) { range_tree_node* t = Tree.__find(key); if (!t) return false; @@ -210,37 +233,40 @@ template > class RangeSplayMap { RangeSplayTree, Allocator> Tree; - - public: - explicit RangeSplayMap(const Allocator& A= Allocator() ) + + public: + explicit RangeSplayMap(const Allocator& A= Allocator() ) : Tree(A) {} - - bool insert(void* start, void* end, T& d) { - range_tree_node* t = Tree.__insert(start,end); - if (t == 0) return false; - t->data = d; - return true; - } - - bool remove(void* key) { - return Tree.__remove(key); - } - - bool count() { return Tree.__count(); } - - void clear() { Tree.__clear(); } - - bool find(void* key, void*& start, void*& end, T& d) { - range_tree_node* t = Tree.__find(key); - if (!t) return false; - start = t->start; - end = t->end; - d = t->data; - return true; - } - bool find(void* key) { - range_tree_node* t = Tree.__find(key); - if (!t) return false; - return true; - } + + bool insert(void* start, void* end, T& d) { + range_tree_node* t = Tree.__insert(start,end); + if (t == 0) return false; + t->data = d; + return true; + } + + bool remove(void* key) { + return Tree.__remove(key); + } + + bool count() { return Tree.__count(); } + + void clear() { Tree.__clear(); } + + template + void clear(O& act) { Tree.__clear(act); } + + bool find(void* key, void*& start, void*& end, T& d) { + range_tree_node* t = Tree.__find(key); + if (!t) return false; + start = t->start; + end = t->end; + d = t->data; + return true; + } + bool find(void* key) { + range_tree_node* t = Tree.__find(key); + if (!t) return false; + return true; + } }; Modified: poolalloc/trunk/include/poolalloc_runtime/test.ex URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/test.ex?rev=57776&r1=57775&r2=57776&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/test.ex (original) +++ poolalloc/trunk/include/poolalloc_runtime/test.ex Sat Oct 18 17:01:29 2008 @@ -2,6 +2,7 @@ #include PoolAllocator > a(10, 16); +PoolAllocator > b(8, 8); RangeSplayMap x; @@ -9,6 +10,10 @@ void* x = a.alloc(); std::cerr << a.isAllocated(x) << " " << a.isAllocated((char*)x + 5) << " " << a.isAllocated((char*)x + 10) << "\n"; a.dealloc(x); + + x = b.alloc(); + std::cerr << b.isAllocated(x) << " " << b.isAllocated((char*)x + 5) << " " << b.isAllocated((char*)x + 10) << "\n"; + b.dealloc(x); return 0; } From monping at apple.com Sat Oct 18 17:18:21 2008 From: monping at apple.com (Mon Ping Wang) Date: Sat, 18 Oct 2008 15:18:21 -0700 Subject: [llvm-commits] vector widening patch In-Reply-To: <55300.76.220.41.203.1224348721.squirrel@webmail.apple.com> References: <55300.76.220.41.203.1224348721.squirrel@webmail.apple.com> Message-ID: <4F356755-0B37-4771-8B11-9EB51D6ED0D4@apple.com> On Oct 18, 2008, at 9:52 AM, Dan Gohman wrote: >> + // Check if we can widen the vector type >> + MVT WidenVT = TLI.getWidenVectorType(VT); >> + if (WidenVT != MVT::Other && >> + TLI.getOperationAction(Op.getNode()->getOpcode(), VT) == >> + TargetLowering::Expand) { >> + // Widen the type >> + WidenVectorOp(Op, WidenVT); >> + } else { > > What is the TLI.getOperationAction check checking? Isn't it sufficient > to say that if you have a vector type that's not legal, and the target > provides a type to widen to, that you should choose widening? > What it is checking for is to see if an operation with that VT can be widen. If it is not, we have to scalarize the operation instead. I'm making the assumption that some operations don't support vector types so they should be scalarized. >> + case ISD::SELECT: >> + case ISD::SELECT_CC: >> + case ISD::BSWAP: >> + case ISD::CTPOP: >> + case ISD::CTTZ: >> + case ISD::CTLZ: { >> + // For now, we assume that using vectors for these operations >> don't > make >> + // much sense so we just split it. We return an empty result > > For bswap, ctpop, cttz, and ctlz, there exist machines that have > some of these as vector instructions, so I think they should be > able to be widened as well. > > For SELECT and SELECT_CC, if these end up being how vector selects > are represented, then it definately makes sense to be able to > widen them :-). I can see that being useful. I'll make that change. > > >> + // If it a vector of two, we will assume it doesn't make sense >> to widen >> + if (NElts == 2) >> + return MVT::Other; > > Shouldn't this be "<= 2"? I guess it doesn't matter immediately, > because single-element vectors go down the ScalarizeVectorOp path, > but these TLI query routines can sometimes be useful outside of > legalize too. > > Also, here and in other places please add a period to the end of > the sentence in the comment. > I made the poor assumption that we would never see a single element vector. I'll make that change and fix anywhere I have made that assumption. I will add a period to the end. >> + // We assume that we have good rules to handle loading power of >> two > loads so >> + // if we break down the operations to power of 2 loads. The >> strategy > is to >> + // load the largest power of 2 that we can easily transform to a > legal vector >> + // and then insert into that vector, and the cast the result >> into the > legal >> + // vector that we want. This avoids unnecessary stack converts. > > I think the "if" in the first sentance is spurious. > It is. > It looks like genWidenVectorLoads is careful to never loads any > memory beyond the elements it needs. Is that true? That's > important to avoid touching unnecessary cache lines or pages. > And for volatile correctness :-). > > On the other hand, it might be nice to check the alignment and > volatile flags to see if it's safe to allow a full-length legal > wide vector load, which could be a lot more efficient. Worth > mentioning in a comment, at least :-). > Yes, it is careful to avoid loading any element beyond the number of elements it needs to and you are right that if the item is properly aligned, we should use the wider vector load (though we can't do it in a store of course) so I should mentioned it a TODO comment. >> + /// isVolatile: volatile lod > > typo > >> + // It must be true that we the widen vector type is bigger than >> where >> + // we need to store. > > s/ we / when / > > > Can you add some regression tests that cover the basic > vector widening functionality? > Definitely! Thanks, -- Mon Ping From baldrick at free.fr Sun Oct 19 09:58:06 2008 From: baldrick at free.fr (Duncan Sands) Date: Sun, 19 Oct 2008 14:58:06 -0000 Subject: [llvm-commits] [llvm] r57782 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200810191458.m9JEw7Ii023734@zion.cs.uiuc.edu> Author: baldrick Date: Sun Oct 19 09:58:05 2008 New Revision: 57782 URL: http://llvm.org/viewvc/llvm-project?rev=57782&view=rev Log: Use a legal integer type for vector shuffle mask elements. Otherwise LegalizeTypes will, reasonably enough, legalize the mask, which may result in it no longer being a BUILD_VECTOR node (LegalizeDAG simply ignores the legality or not of vector masks). Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=57782&r1=57781&r2=57782&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sun Oct 19 09:58:05 2008 @@ -5134,24 +5134,24 @@ std::vector IdxOps; unsigned NumOps = RHS.getNumOperands(); unsigned NumElts = NumOps; - MVT EVT = RHS.getValueType().getVectorElementType(); for (unsigned i = 0; i != NumElts; ++i) { SDValue Elt = RHS.getOperand(i); if (!isa(Elt)) return SDValue(); else if (cast(Elt)->isAllOnesValue()) - IdxOps.push_back(DAG.getConstant(i, EVT)); + IdxOps.push_back(DAG.getIntPtrConstant(i)); else if (cast(Elt)->isNullValue()) - IdxOps.push_back(DAG.getConstant(NumElts, EVT)); + IdxOps.push_back(DAG.getIntPtrConstant(NumElts)); else return SDValue(); } // Let's see if the target supports this vector_shuffle. - if (!TLI.isVectorClearMaskLegal(IdxOps, EVT, DAG)) + if (!TLI.isVectorClearMaskLegal(IdxOps, TLI.getPointerTy(), DAG)) return SDValue(); // Return the new VECTOR_SHUFFLE node. + MVT EVT = RHS.getValueType().getVectorElementType(); MVT VT = MVT::getVectorVT(EVT, NumElts); std::vector Ops; LHS = DAG.getNode(ISD::BIT_CONVERT, VT, LHS); From baldrick at free.fr Sun Oct 19 10:00:25 2008 From: baldrick at free.fr (Duncan Sands) Date: Sun, 19 Oct 2008 15:00:25 -0000 Subject: [llvm-commits] [llvm] r57783 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Message-ID: <200810191500.m9JF0PjQ023825@zion.cs.uiuc.edu> Author: baldrick Date: Sun Oct 19 10:00:25 2008 New Revision: 57783 URL: http://llvm.org/viewvc/llvm-project?rev=57783&view=rev Log: Vector shuffle mask elements may be "undef". Handle this everywhere in LegalizeTypes. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp?rev=57783&r1=57782&r2=57783&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Sun Oct 19 10:00:25 2008 @@ -156,8 +156,10 @@ SDValue DAGTypeLegalizer::ScalarizeVecRes_VECTOR_SHUFFLE(SDNode *N) { // Figure out if the scalar is the LHS or RHS and return it. - SDValue EltNum = N->getOperand(2).getOperand(0); - unsigned Op = cast(EltNum)->getZExtValue() != 0; + SDValue Arg = N->getOperand(2).getOperand(0); + if (Arg.getOpcode() == ISD::UNDEF) + return DAG.getNode(ISD::UNDEF, N->getValueType(0).getVectorElementType()); + unsigned Op = !cast(Arg)->isNullValue(); return GetScalarizedVector(N->getOperand(Op)); } @@ -562,14 +564,19 @@ // buildvector of extractelement here because the input vectors will have // to be legalized, so this makes the code simpler. for (unsigned i = 0; i != LoNumElts; ++i) { - unsigned Idx = cast(Mask.getOperand(i))->getZExtValue(); - SDValue InVec = N->getOperand(0); - if (Idx >= NumElements) { - InVec = N->getOperand(1); - Idx -= NumElements; + SDValue Arg = Mask.getOperand(i); + if (Arg.getOpcode() == ISD::UNDEF) { + Ops.push_back(DAG.getNode(ISD::UNDEF, EltVT)); + } else { + unsigned Idx = cast(Mask.getOperand(i))->getZExtValue(); + SDValue InVec = N->getOperand(0); + if (Idx >= NumElements) { + InVec = N->getOperand(1); + Idx -= NumElements; + } + Ops.push_back(DAG.getNode(ISD::EXTRACT_VECTOR_ELT, EltVT, InVec, + DAG.getIntPtrConstant(Idx))); } - Ops.push_back(DAG.getNode(ISD::EXTRACT_VECTOR_ELT, EltVT, InVec, - DAG.getIntPtrConstant(Idx))); } Lo = DAG.getNode(ISD::BUILD_VECTOR, LoVT, &Ops[0], Ops.size()); Ops.clear(); @@ -763,7 +770,7 @@ return DAG.getNode(ISD::TokenFactor, MVT::Other, Lo, Hi); } -SDValue DAGTypeLegalizer::SplitVecOp_VECTOR_SHUFFLE(SDNode *N, unsigned OpNo){ +SDValue DAGTypeLegalizer::SplitVecOp_VECTOR_SHUFFLE(SDNode *N, unsigned OpNo) { assert(OpNo == 2 && "Shuffle source type differs from result type?"); SDValue Mask = N->getOperand(2); unsigned MaskLength = Mask.getValueType().getVectorNumElements(); @@ -802,9 +809,13 @@ // Success! Rebuild the vector using the legal types. SmallVector Ops(MaskLength); for (unsigned i = 0; i < MaskLength; ++i) { - uint64_t Idx = - cast(Mask.getOperand(i))->getZExtValue(); - Ops[i] = DAG.getConstant(Idx, OpVT); + SDValue Arg = Mask.getOperand(i); + if (Arg.getOpcode() == ISD::UNDEF) { + Ops[i] = DAG.getNode(ISD::UNDEF, OpVT); + } else { + uint64_t Idx = cast(Arg)->getZExtValue(); + Ops[i] = DAG.getConstant(Idx, OpVT); + } } return DAG.UpdateNodeOperands(SDValue(N,0), N->getOperand(0), N->getOperand(1), From alenhar2 at cs.uiuc.edu Sun Oct 19 10:20:13 2008 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Sun, 19 Oct 2008 15:20:13 -0000 Subject: [llvm-commits] [poolalloc] r57784 - in /poolalloc/trunk/include/poolalloc_runtime: PoolAllocator.h test.ex Message-ID: <200810191520.m9JFKDQP024466@zion.cs.uiuc.edu> Author: alenhar2 Date: Sun Oct 19 10:20:12 2008 New Revision: 57784 URL: http://llvm.org/viewvc/llvm-project?rev=57784&view=rev Log: Compound slab manager to dispatch to fixed sized allocators and variable sized allocators Modified: poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h poolalloc/trunk/include/poolalloc_runtime/test.ex Modified: poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h?rev=57784&r1=57783&r2=57784&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h (original) +++ poolalloc/trunk/include/poolalloc_runtime/PoolAllocator.h Sun Oct 19 10:20:12 2008 @@ -23,13 +23,8 @@ return p; } - // Allocate an object of size objsize - void* alloc() { - return slab_alloc(1); - } - - // Allocate an array with num objects of size objsize - void* alloc_array(unsigned num) { + // Allocate num objects of size objsize + void* alloc(unsigned num = 1) { return slab_alloc(num); } @@ -73,7 +68,7 @@ dealloc_actor(MallocSlabManager* _m) : m(_m) {} }; - protected: + public: MallocSlabManager(unsigned Osize, unsigned Alignment) : objsize(Osize) {} ~MallocSlabManager() { dealloc_actor act(this); @@ -199,7 +194,7 @@ } } - protected: + public: BitMaskSlabManager(unsigned Osize, unsigned Alignment) :objsize(Osize), CurAllocSlab(0), totalslots(0), totalallocs(0) {} @@ -254,6 +249,42 @@ } }; +template +class CompoundSlabManager { + FixedAllocator FixedAlloc; + VarAllocator VarAlloc; + unsigned objsize; + public: + CompoundSlabManager(unsigned Osize, unsigned Alignment) + :FixedAlloc(Osize, Alignment), VarAlloc(1, Alignment), objsize(Osize) + {} + void* slab_alloc(unsigned num) { + if (num == 1) + return FixedAlloc.slab_alloc(1); + else + return VarAlloc.slab_alloc(num * sizeof(objsize * num)); + } + void slab_free(void* obj) { + if (FixedAlloc.slab_managed(obj)) + FixedAlloc.slab_free(obj); + else + VarAlloc.slab_free(obj); + } + bool slab_valid(void* obj) { + return FixedAlloc.slab_valid(obj) || VarAlloc.slab_valid(obj); + } + bool slab_managed(void* obj) { + return FixedAlloc.slab_managed(obj) || VarAlloc.slab_managed(obj); + } + bool slab_getbounds(void* obj, void*& start, void*& end) { + if (FixedAlloc.slab_getbounds(obj, start, end)) + return true; + if (VarAlloc.slab_getbounds(obj, start, end)) + return true; + return false; + } +}; + class LinuxMmap { public: enum d {pageSize = 4096}; Modified: poolalloc/trunk/include/poolalloc_runtime/test.ex URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/poolalloc_runtime/test.ex?rev=57784&r1=57783&r2=57784&view=diff ============================================================================== --- poolalloc/trunk/include/poolalloc_runtime/test.ex (original) +++ poolalloc/trunk/include/poolalloc_runtime/test.ex Sun Oct 19 10:20:12 2008 @@ -4,6 +4,8 @@ PoolAllocator > a(10, 16); PoolAllocator > b(8, 8); +PoolAllocator, MallocSlabManager<> > > c(8, 8); + RangeSplayMap x; int main() { @@ -14,6 +16,15 @@ x = b.alloc(); std::cerr << b.isAllocated(x) << " " << b.isAllocated((char*)x + 5) << " " << b.isAllocated((char*)x + 10) << "\n"; b.dealloc(x); + + x = c.alloc(); + std::cerr << c.isAllocated(x) << " " << c.isAllocated((char*)x + 5) << " " << c.isAllocated((char*)x + 10) << "\n"; + void* y = c.alloc(4); + std::cerr << c.isAllocated(y) << " " << c.isAllocated((char*)y + 5) << " " << c.isAllocated((char*)y + 10) << " " << c.isAllocated((char*)y + 50) << "\n"; + c.dealloc(x); + c.dealloc(y); + + return 0; } From sanjiv.gupta at microchip.com Sun Oct 19 10:41:19 2008 From: sanjiv.gupta at microchip.com (sanjiv gupta) Date: Sun, 19 Oct 2008 21:11:19 +0530 Subject: [llvm-commits] Patch for handling multiple values in ExpandIntegerOperand In-Reply-To: <200810181823.21150.baldrick@free.fr> References: <1224336602.3139.19.camel@idc-lt-i00171.microchip.com> <200810181823.21150.baldrick@free.fr> Message-ID: <1224430879.4365.10.camel@idc-lt-i00171.microchip.com> On Sat, 2008-10-18 at 18:23 +0200, Duncan Sands wrote: > Hi, > > - assert(Res.getValueType() == N->getValueType(0) && N->getNumValues() == 1 && > - "Invalid operand expansion"); > + // The result node should return same or more values as the original node. > + assert (Res.getNode()->getNumValues() >= N->getNumValues()); > > I'd rather use ReplaceAllUsesWith and require the number > of values to be the same. This is more work of course, > since it means fixing up several places. > > Ciao, > > Duncan. That's actually same as using ReplaceNodeWith. What's the best way to find out all places that need fixing up? Should I just look into the Expand* functions in all targets and find out what needs to use MergeValues? Or should I just make this change in ExpandIntegerOperand() and let target owners take care of it. What all targets are currently using -enable-legalize-types? I guess only X86. - Sanjiv From baldrick at free.fr Sun Oct 19 10:45:36 2008 From: baldrick at free.fr (Duncan Sands) Date: Sun, 19 Oct 2008 17:45:36 +0200 Subject: [llvm-commits] Patch for handling multiple values in ExpandIntegerOperand In-Reply-To: <1224430879.4365.10.camel@idc-lt-i00171.microchip.com> References: <1224336602.3139.19.camel@idc-lt-i00171.microchip.com> <200810181823.21150.baldrick@free.fr> <1224430879.4365.10.camel@idc-lt-i00171.microchip.com> Message-ID: <200810191745.36894.baldrick@free.fr> Hi, > What's the best way to find out all places that need fixing up? I think code inspection is the only way. > Should I just look into the Expand* functions in all targets and find > out what needs to use MergeValues? Yes. I can give you a hand with this, but not this week. > Or should I just make this change in > ExpandIntegerOperand() and let target owners take care of it. What all > targets are currently using -enable-legalize-types? I guess only X86. LegalizeTypes is not for any particular target. Today it is not turned on by default, but I hope to change that by the end of the week. Ciao, Duncan. From sanjiv.gupta at microchip.com Sun Oct 19 10:54:24 2008 From: sanjiv.gupta at microchip.com (sanjiv gupta) Date: Sun, 19 Oct 2008 21:24:24 +0530 Subject: [llvm-commits] Patch for handling multiple values in ExpandIntegerOperand In-Reply-To: <200810191745.36894.baldrick@free.fr> References: <1224336602.3139.19.camel@idc-lt-i00171.microchip.com> <200810181823.21150.baldrick@free.fr> <1224430879.4365.10.camel@idc-lt-i00171.microchip.com> <200810191745.36894.baldrick@free.fr> Message-ID: <1224431664.4365.17.camel@idc-lt-i00171.microchip.com> On Sun, 2008-10-19 at 17:45 +0200, Duncan Sands wrote: > Hi, > > > What's the best way to find out all places that need fixing up? > > I think code inspection is the only way. > > > Should I just look into the Expand* functions in all targets and find > > out what needs to use MergeValues? > > Yes. I can give you a hand with this, but not this week. > That would be a great help. Meanwhile I will make a patch to take of LegalizeIntegerTypes.cpp. I think there might be other places in the same file where we need to use ReplaceNodeWith. > > Or should I just make this change in > > ExpandIntegerOperand() and let target owners take care of it. What all > > targets are currently using -enable-legalize-types? I guess only X86. > > LegalizeTypes is not for any particular target. Today it is not turned > on by default, but I hope to change that by the end of the week. > I asked this because only the targets that currently depend upon or work with -enable-legalize-types may need fixing up with MergeValues. -Sanjiv > Ciao, > > Duncan. From isanbard at gmail.com Sun Oct 19 15:34:13 2008 From: isanbard at gmail.com (Bill Wendling) Date: Sun, 19 Oct 2008 20:34:13 -0000 Subject: [llvm-commits] [llvm] r57785 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Message-ID: <200810192034.m9JKYEt1002776@zion.cs.uiuc.edu> Author: void Date: Sun Oct 19 15:34:04 2008 New Revision: 57785 URL: http://llvm.org/viewvc/llvm-project?rev=57785&view=rev Log: Fix comment. Other formatting changes. No functionality changes. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=57785&r1=57784&r2=57785&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Sun Oct 19 15:34:04 2008 @@ -2207,7 +2207,7 @@ } void SelectionDAGLowering::visitSIToFP(User &I){ - // UIToFP is never a no-op cast, no need to check + // SIToFP is never a no-op cast, no need to check SDValue N = getValue(I.getOperand(0)); MVT DestVT = TLI.getValueType(I.getType()); setValue(&I, DAG.getNode(ISD::SINT_TO_FP, DestVT, N)); @@ -3079,6 +3079,7 @@ void SelectionDAGLowering::visitLog10(CallInst &I) { SDValue result; + if (getValue(I.getOperand(1)).getValueType() == MVT::f32 && LimitFloatPrecision > 0 && LimitFloatPrecision <= 18) { SDValue Op = getValue(I.getOperand(1)); @@ -4221,13 +4222,13 @@ else if (NumZeroBits >= RegSize-9) isSExt = false, FromVT = MVT::i8; // ASSERT ZEXT 8 else if (NumSignBits > RegSize-16) - isSExt = true, FromVT = MVT::i16; // ASSERT SEXT 16 + isSExt = true, FromVT = MVT::i16; // ASSERT SEXT 16 else if (NumZeroBits >= RegSize-17) - isSExt = false, FromVT = MVT::i16; // ASSERT ZEXT 16 + isSExt = false, FromVT = MVT::i16; // ASSERT ZEXT 16 else if (NumSignBits > RegSize-32) - isSExt = true, FromVT = MVT::i32; // ASSERT SEXT 32 + isSExt = true, FromVT = MVT::i32; // ASSERT SEXT 32 else if (NumZeroBits >= RegSize-33) - isSExt = false, FromVT = MVT::i32; // ASSERT ZEXT 32 + isSExt = false, FromVT = MVT::i32; // ASSERT ZEXT 32 if (FromVT != MVT::Other) { P = DAG.getNode(isSExt ? ISD::AssertSext : ISD::AssertZext, From isanbard at gmail.com Sun Oct 19 15:51:13 2008 From: isanbard at gmail.com (Bill Wendling) Date: Sun, 19 Oct 2008 20:51:13 -0000 Subject: [llvm-commits] [llvm] r57786 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200810192051.m9JKpExj003636@zion.cs.uiuc.edu> Author: void Date: Sun Oct 19 15:51:12 2008 New Revision: 57786 URL: http://llvm.org/viewvc/llvm-project?rev=57786&view=rev Log: Set N->OperandList to 0 after deletion. Otherwise, it's possible that it will be either deleted or referenced afterwards. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=57786&r1=57785&r2=57786&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sun Oct 19 15:51:12 2008 @@ -216,7 +216,7 @@ unsigned OldG = (Operation >> 1) & 1; return ISD::CondCode((Operation & ~6) | // Keep the N, U, E bits (OldL << 1) | // New G bit - (OldG << 2)); // New L bit. + (OldG << 2)); // New L bit. } /// getSetCCInverse - Return the operation corresponding to !(X op Y), where @@ -227,8 +227,10 @@ Operation ^= 7; // Flip L, G, E bits, but not U. else Operation ^= 15; // Flip all of the condition bits. + if (Operation > ISD::SETTRUE2) - Operation &= ~8; // Don't let N and U bits get set. + Operation &= ~8; // Don't let N and U bits get set. + return ISD::CondCode(Operation); } @@ -506,7 +508,8 @@ /// encodeMemSDNodeFlags - Generic routine for computing a value for use in /// the CSE map that carries both alignment and volatility information. /// -static unsigned encodeMemSDNodeFlags(bool isVolatile, unsigned Alignment) { +static inline unsigned +encodeMemSDNodeFlags(bool isVolatile, unsigned Alignment) { return isVolatile | ((Log2_32(Alignment) + 1) << 1); } @@ -561,9 +564,10 @@ if (Operand->use_empty()) DeadNodes.push_back(Operand); } - if (N->OperandsNeedDelete) { + + if (N->OperandsNeedDelete) delete[] N->OperandList; - } + N->OperandList = 0; N->NumOperands = 0; @@ -589,12 +593,14 @@ } void SelectionDAG::DeleteNodeNotInCSEMaps(SDNode *N) { - // Drop all of the operands and decrement used node's use counts. for (SDNode::op_iterator I = N->op_begin(), E = N->op_end(); I != E; ++I) I->getVal()->removeUser(std::distance(N->op_begin(), I), N); - if (N->OperandsNeedDelete) + + if (N->OperandsNeedDelete) { delete[] N->OperandList; + N->OperandList = 0; + } assert(N != AllNodes.begin()); NodeAllocator.Deallocate(AllNodes.remove(N)); @@ -675,13 +681,13 @@ case ISD::DBG_STOPPOINT: case ISD::EH_LABEL: case ISD::DECLARE: - return 0; // Never add these nodes. + return 0; // Never add these nodes. } // Check that remaining values produced are not flags. for (unsigned i = 1, e = N->getNumValues(); i != e; ++i) if (N->getValueType(i) == MVT::Flag) - return 0; // Never CSE anything that produces a flag. + return 0; // Never CSE anything that produces a flag. SDNode *New = CSEMap.GetOrInsertNode(N); if (New != N) return New; // Node already existed. @@ -703,13 +709,13 @@ case ISD::DBG_LABEL: case ISD::DBG_STOPPOINT: case ISD::EH_LABEL: - return 0; // Never add these nodes. + return 0; // Never add these nodes. } // Check that remaining values produced are not flags. for (unsigned i = 1, e = N->getNumValues(); i != e; ++i) if (N->getValueType(i) == MVT::Flag) - return 0; // Never CSE anything that produces a flag. + return 0; // Never CSE anything that produces a flag. SDValue Ops[] = { Op }; FoldingSetNodeID ID; @@ -729,7 +735,7 @@ // Check that remaining values produced are not flags. for (unsigned i = 1, e = N->getNumValues(); i != e; ++i) if (N->getValueType(i) == MVT::Flag) - return 0; // Never CSE anything that produces a flag. + return 0; // Never CSE anything that produces a flag. SDValue Ops[] = { Op1, Op2 }; FoldingSetNodeID ID; @@ -755,13 +761,13 @@ case ISD::DBG_STOPPOINT: case ISD::EH_LABEL: case ISD::DECLARE: - return 0; // Never add these nodes. + return 0; // Never add these nodes. } // Check that remaining values produced are not flags. for (unsigned i = 1, e = N->getNumValues(); i != e; ++i) if (N->getValueType(i) == MVT::Flag) - return 0; // Never CSE anything that produces a flag. + return 0; // Never CSE anything that produces a flag. FoldingSetNodeID ID; AddNodeIDNode(ID, N->getOpcode(), N->getVTList(), Ops, NumOps); @@ -833,8 +839,12 @@ while (!AllNodes.empty()) { SDNode *N = AllNodes.remove(AllNodes.begin()); N->SetNextInBucket(0); - if (N->OperandsNeedDelete) + + if (N->OperandsNeedDelete) { delete [] N->OperandList; + N->OperandList = 0; + } + NodeAllocator.Deallocate(N); } } @@ -4208,6 +4218,7 @@ if (NumOps > N->NumOperands) { if (N->OperandsNeedDelete) delete[] N->OperandList; + if (N->isMachineOpcode()) { // We're creating a final node that will live unmorphed for the // remainder of the current SelectionDAG iteration, so we can allocate From baldrick at free.fr Sun Oct 19 22:02:53 2008 From: baldrick at free.fr (Duncan Sands) Date: Mon, 20 Oct 2008 05:02:53 +0200 Subject: [llvm-commits] [llvm] r57786 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp In-Reply-To: <200810192051.m9JKpExj003636@zion.cs.uiuc.edu> References: <200810192051.m9JKpExj003636@zion.cs.uiuc.edu> Message-ID: <200810200502.53130.baldrick@free.fr> Hi Bill, > @@ -4208,6 +4218,7 @@ > if (NumOps > N->NumOperands) { > if (N->OperandsNeedDelete) > delete[] N->OperandList; > + > if (N->isMachineOpcode()) { > // We're creating a final node that will live unmorphed for the > // remainder of the current SelectionDAG iteration, so we can allocate is it needed here too? Ciao, Duncan. From kremenek at apple.com Sun Oct 19 23:05:58 2008 From: kremenek at apple.com (Ted Kremenek) Date: Mon, 20 Oct 2008 04:05:58 -0000 Subject: [llvm-commits] [llvm] r57791 - /llvm/tags/checker/checker-113/ Message-ID: <200810200405.m9K45wKW018997@zion.cs.uiuc.edu> Author: kremenek Date: Sun Oct 19 23:05:57 2008 New Revision: 57791 URL: http://llvm.org/viewvc/llvm-project?rev=57791&view=rev Log: Tagging checker-113. Added: llvm/tags/checker/checker-113/ - copied from r57790, llvm/trunk/ From kremenek at apple.com Sun Oct 19 23:06:18 2008 From: kremenek at apple.com (Ted Kremenek) Date: Mon, 20 Oct 2008 04:06:18 -0000 Subject: [llvm-commits] [llvm] r57792 - /llvm/tags/checker/checker-113/ Message-ID: <200810200406.m9K46INs019016@zion.cs.uiuc.edu> Author: kremenek Date: Sun Oct 19 23:06:18 2008 New Revision: 57792 URL: http://llvm.org/viewvc/llvm-project?rev=57792&view=rev Log: Removing checker-113. Removed: llvm/tags/checker/checker-113/ From kremenek at apple.com Sun Oct 19 23:06:19 2008 From: kremenek at apple.com (Ted Kremenek) Date: Mon, 20 Oct 2008 04:06:19 -0000 Subject: [llvm-commits] [llvm] r57793 - /llvm/tags/checker/checker-112/ Message-ID: <200810200406.m9K46Jqk019028@zion.cs.uiuc.edu> Author: kremenek Date: Sun Oct 19 23:06:19 2008 New Revision: 57793 URL: http://llvm.org/viewvc/llvm-project?rev=57793&view=rev Log: Tagging checker-112. Added: llvm/tags/checker/checker-112/ - copied from r57791, llvm/trunk/