From reid at x10sys.com Mon Mar 26 00:25:29 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 26 Mar 2007 00:25:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703260525.l2Q5PTZq005213@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.691 -> 1.692 --- Log message: For PR1271: http://llvm.org/PR1271 : Fix SingleSource/Regression/C/2003-05-21-UnionBitFields.c by changing a getHighBitsSet call to getLowBitsSet call that was incorrectly converted from the original lshr constant expression. --- Diffs of the changes: (+1 -1) InstructionCombining.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.691 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.692 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.691 Sun Mar 25 16:11:44 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Mar 26 00:25:00 2007 @@ -5858,7 +5858,7 @@ BinaryOperator::createLShr(X, ConstantInt::get(Ty, ShiftDiff)); InsertNewInstBefore(Shift, I); - APInt Mask(APInt::getHighBitsSet(TypeBits, TypeBits - ShiftAmt2)); + APInt Mask(APInt::getLowBitsSet(TypeBits, ShiftAmt2)); return BinaryOperator::createAnd(Shift, ConstantInt::get(Mask)); } From reid at x10sys.com Mon Mar 26 00:32:38 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 26 Mar 2007 00:32:38 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/2007-03-25-BadShiftMask.ll Message-ID: <200703260532.l2Q5Wc1E005337@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/InstCombine: 2007-03-25-BadShiftMask.ll added (r1.1) --- Log message: Test case for PR1271: http://llvm.org/PR1271 involving construction of a bad mask to replace a shift instruction. --- Diffs of the changes: (+28 -0) 2007-03-25-BadShiftMask.ll | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+) Index: llvm/test/Transforms/InstCombine/2007-03-25-BadShiftMask.ll diff -c /dev/null llvm/test/Transforms/InstCombine/2007-03-25-BadShiftMask.ll:1.1 *** /dev/null Mon Mar 26 00:32:26 2007 --- llvm/test/Transforms/InstCombine/2007-03-25-BadShiftMask.ll Mon Mar 26 00:32:16 2007 *************** *** 0 **** --- 1,28 ---- + ; PR1271 + ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'br i1 %1' + %struct..0anon = type { i32, i32 } + %struct..1anon = type { double } + + define i32 @main() { + entry: + %u = alloca %struct..1anon, align 8 ; <%struct..1anon*> [#uses=4] + %tmp1 = getelementptr %struct..1anon* %u, i32 0, i32 0 ; [#uses=1] + store double 0x7FF0000000000000, double* %tmp1 + %tmp3 = getelementptr %struct..1anon* %u, i32 0, i32 0 ; [#uses=1] + %tmp34 = bitcast double* %tmp3 to %struct..0anon* ; <%struct..0anon*> [#uses=1] + %tmp5 = getelementptr %struct..0anon* %tmp34, i32 0, i32 1 ; [#uses=1] + %tmp6 = load i32* %tmp5 ; [#uses=1] + %tmp7 = shl i32 %tmp6, 1 ; [#uses=1] + %tmp8 = lshr i32 %tmp7, 21 ; [#uses=1] + %tmp89 = trunc i32 %tmp8 to i16 ; [#uses=1] + icmp ne i16 %tmp89, 2047 ; :0 [#uses=1] + zext i1 %0 to i8 ; :1 [#uses=1] + icmp ne i8 %1, 0 ; :2 [#uses=1] + br i1 %2, label %cond_true, label %cond_false + + cond_true: ; preds = %entry + ret i32 0 + + cond_false: ; preds = %entry + ret i32 1 + } From evan.cheng at apple.com Mon Mar 26 02:13:33 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 26 Mar 2007 02:13:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200703260713.l2Q7DXsa007133@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.281 -> 1.282 --- Log message: SIGN_EXTEND_INREG requires one extra operand, a ValueType node. --- Diffs of the changes: (+6 -2) DAGCombiner.cpp | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.281 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.282 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.281 Fri Mar 23 19:02:43 2007 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Mar 26 02:12:51 2007 @@ -2327,8 +2327,12 @@ CombineTo(N->getOperand(0).Val, Load); } else CombineTo(N0.Val, Load, Load.getValue(1)); - if (ShAmt) - return DAG.getNode(N->getOpcode(), VT, Load); + if (ShAmt) { + if (Opc == ISD::SIGN_EXTEND_INREG) + return DAG.getNode(Opc, VT, Load, N->getOperand(1)); + else + return DAG.getNode(Opc, VT, Load); + } return SDOperand(N, 0); // Return N so it doesn't get rechecked! } From isanbard at gmail.com Mon Mar 26 02:53:39 2007 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 26 Mar 2007 02:53:39 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/CodeGenTarget.cpp Message-ID: <200703260753.l2Q7rd3c008024@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: CodeGenTarget.cpp updated: 1.86 -> 1.87 --- Log message: Add support for the v1i64 type. This makes better code for this: #include extern __m64 C; void baz(__v2si *A, __v2si *B) { *A = C; _mm_empty(); } We get this: _baz: call "L1$pb" "L1$pb": popl %eax movl L_C$non_lazy_ptr-"L1$pb"(%eax), %eax movq (%eax), %mm0 movl 4(%esp), %eax movq %mm0, (%eax) emms ret GCC gives us this: _baz: pushl %ebx call L3 "L00000000001$pb": L3: popl %ebx subl $8, %esp movl L_C$non_lazy_ptr-"L00000000001$pb"(%ebx), %eax movl (%eax), %edx movl 4(%eax), %ecx movl 16(%esp), %eax movl %edx, (%eax) movl %ecx, 4(%eax) emms addl $8, %esp popl %ebx ret --- Diffs of the changes: (+2 -0) CodeGenTarget.cpp | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/utils/TableGen/CodeGenTarget.cpp diff -u llvm/utils/TableGen/CodeGenTarget.cpp:1.86 llvm/utils/TableGen/CodeGenTarget.cpp:1.87 --- llvm/utils/TableGen/CodeGenTarget.cpp:1.86 Mon Mar 19 01:20:37 2007 +++ llvm/utils/TableGen/CodeGenTarget.cpp Mon Mar 26 02:53:08 2007 @@ -52,6 +52,7 @@ case MVT::v8i8: return "MVT::v8i8"; case MVT::v4i16: return "MVT::v4i16"; case MVT::v2i32: return "MVT::v2i32"; + case MVT::v1i64: return "MVT::v1i64"; case MVT::v16i8: return "MVT::v16i8"; case MVT::v8i16: return "MVT::v8i16"; case MVT::v4i32: return "MVT::v4i32"; @@ -82,6 +83,7 @@ case MVT::v8i8: return "MVT::v8i8"; case MVT::v4i16: return "MVT::v4i16"; case MVT::v2i32: return "MVT::v2i32"; + case MVT::v1i64: return "MVT::v1i64"; case MVT::v16i8: return "MVT::v16i8"; case MVT::v8i16: return "MVT::v8i16"; case MVT::v4i32: return "MVT::v4i32"; From isanbard at gmail.com Mon Mar 26 02:53:39 2007 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 26 Mar 2007 02:53:39 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Intrinsics.td Message-ID: <200703260753.l2Q7rdxZ008025@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Intrinsics.td updated: 1.50 -> 1.51 --- Log message: Add support for the v1i64 type. This makes better code for this: #include extern __m64 C; void baz(__v2si *A, __v2si *B) { *A = C; _mm_empty(); } We get this: _baz: call "L1$pb" "L1$pb": popl %eax movl L_C$non_lazy_ptr-"L1$pb"(%eax), %eax movq (%eax), %mm0 movl 4(%esp), %eax movq %mm0, (%eax) emms ret GCC gives us this: _baz: pushl %ebx call L3 "L00000000001$pb": L3: popl %ebx subl $8, %esp movl L_C$non_lazy_ptr-"L00000000001$pb"(%ebx), %eax movl (%eax), %edx movl 4(%eax), %ecx movl 16(%esp), %eax movl %edx, (%eax) movl %ecx, 4(%eax) emms addl $8, %esp popl %ebx ret --- Diffs of the changes: (+1 -0) Intrinsics.td | 1 + 1 files changed, 1 insertion(+) Index: llvm/include/llvm/Intrinsics.td diff -u llvm/include/llvm/Intrinsics.td:1.50 llvm/include/llvm/Intrinsics.td:1.51 --- llvm/include/llvm/Intrinsics.td:1.50 Thu Mar 8 16:09:11 2007 +++ llvm/include/llvm/Intrinsics.td Mon Mar 26 02:53:08 2007 @@ -94,6 +94,7 @@ def llvm_v8i16_ty : LLVMVectorType; // 8 x i16 def llvm_v2i64_ty : LLVMVectorType; // 2 x i64 def llvm_v2i32_ty : LLVMVectorType; // 2 x i32 +def llvm_v1i64_ty : LLVMVectorType; // 1 x i64 def llvm_v4i32_ty : LLVMVectorType; // 4 x i32 def llvm_v4f32_ty : LLVMVectorType; // 4 x float def llvm_v2f64_ty : LLVMVectorType;// 2 x double From isanbard at gmail.com Mon Mar 26 02:53:39 2007 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 26 Mar 2007 02:53:39 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86InstrMMX.td X86RegisterInfo.td Message-ID: <200703260753.l2Q7rdog008031@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.377 -> 1.378 X86InstrMMX.td updated: 1.24 -> 1.25 X86RegisterInfo.td updated: 1.40 -> 1.41 --- Log message: Add support for the v1i64 type. This makes better code for this: #include extern __m64 C; void baz(__v2si *A, __v2si *B) { *A = C; _mm_empty(); } We get this: _baz: call "L1$pb" "L1$pb": popl %eax movl L_C$non_lazy_ptr-"L1$pb"(%eax), %eax movq (%eax), %mm0 movl 4(%esp), %eax movq %mm0, (%eax) emms ret GCC gives us this: _baz: pushl %ebx call L3 "L00000000001$pb": L3: popl %ebx subl $8, %esp movl L_C$non_lazy_ptr-"L00000000001$pb"(%ebx), %eax movl (%eax), %edx movl 4(%eax), %ecx movl 16(%esp), %eax movl %edx, (%eax) movl %ecx, 4(%eax) emms addl $8, %esp popl %ebx ret --- Diffs of the changes: (+58 -28) X86ISelLowering.cpp | 9 ++++-- X86InstrMMX.td | 75 +++++++++++++++++++++++++++++++++++----------------- X86RegisterInfo.td | 2 - 3 files changed, 58 insertions(+), 28 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.377 llvm/lib/Target/X86/X86ISelLowering.cpp:1.378 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.377 Sat Mar 24 21:14:49 2007 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Mon Mar 26 02:53:08 2007 @@ -314,6 +314,7 @@ addRegisterClass(MVT::v8i8, X86::VR64RegisterClass); addRegisterClass(MVT::v4i16, X86::VR64RegisterClass); addRegisterClass(MVT::v2i32, X86::VR64RegisterClass); + addRegisterClass(MVT::v1i64, X86::VR64RegisterClass); // FIXME: add MMX packed arithmetics @@ -347,10 +348,12 @@ setOperationAction(ISD::XOR, MVT::v2i32, Legal); setOperationAction(ISD::LOAD, MVT::v8i8, Promote); - AddPromotedToType (ISD::LOAD, MVT::v8i8, MVT::v2i32); + AddPromotedToType (ISD::LOAD, MVT::v8i8, MVT::v1i64); setOperationAction(ISD::LOAD, MVT::v4i16, Promote); - AddPromotedToType (ISD::LOAD, MVT::v4i16, MVT::v2i32); - setOperationAction(ISD::LOAD, MVT::v2i32, Legal); + AddPromotedToType (ISD::LOAD, MVT::v4i16, MVT::v1i64); + setOperationAction(ISD::LOAD, MVT::v2i32, Promote); + AddPromotedToType (ISD::LOAD, MVT::v2i32, MVT::v1i64); + setOperationAction(ISD::LOAD, MVT::v1i64, Legal); setOperationAction(ISD::BUILD_VECTOR, MVT::v8i8, Expand); setOperationAction(ISD::BUILD_VECTOR, MVT::v4i16, Expand); Index: llvm/lib/Target/X86/X86InstrMMX.td diff -u llvm/lib/Target/X86/X86InstrMMX.td:1.24 llvm/lib/Target/X86/X86InstrMMX.td:1.25 --- llvm/lib/Target/X86/X86InstrMMX.td:1.24 Fri Mar 23 17:35:46 2007 +++ llvm/lib/Target/X86/X86InstrMMX.td Mon Mar 26 02:53:08 2007 @@ -37,12 +37,13 @@ def : Pat<(v8i8 (undef)), (IMPLICIT_DEF_VR64)>; def : Pat<(v4i16 (undef)), (IMPLICIT_DEF_VR64)>; def : Pat<(v2i32 (undef)), (IMPLICIT_DEF_VR64)>; +def : Pat<(v1i64 (undef)), (IMPLICIT_DEF_VR64)>; //===----------------------------------------------------------------------===// // MMX Pattern Fragments //===----------------------------------------------------------------------===// -def loadv2i32 : PatFrag<(ops node:$ptr), (v2i32 (load node:$ptr))>; +def loadv1i64 : PatFrag<(ops node:$ptr), (v1i64 (load node:$ptr))>; def bc_v8i8 : PatFrag<(ops node:$in), (v8i8 (bitconvert node:$in))>; def bc_v4i16 : PatFrag<(ops node:$in), (v4i16 (bitconvert node:$in))>; @@ -65,7 +66,7 @@ !strconcat(OpcodeStr, " {$src2, $dst|$dst, $src2}"), [(set VR64:$dst, (OpVT (OpNode VR64:$src1, (bitconvert - (loadv2i32 addr:$src2)))))]>; + (loadv1i64 addr:$src2)))))]>; } multiclass MMXI_binop_rm_int opc, string OpcodeStr, Intrinsic IntId, @@ -78,25 +79,25 @@ def rm : MMXI; + (bitconvert (loadv1i64 addr:$src2))))]>; } - // MMXI_binop_rm_v2i32 - Simple MMX binary operator whose type is v2i32. + // MMXI_binop_rm_v1i64 - Simple MMX binary operator whose type is v1i64. // // FIXME: we could eliminate this and use MMXI_binop_rm instead if tblgen knew // to collapse (bitconvert VT to VT) into its operand. // - multiclass MMXI_binop_rm_v2i32 opc, string OpcodeStr, SDNode OpNode, + multiclass MMXI_binop_rm_v1i64 opc, string OpcodeStr, SDNode OpNode, bit Commutable = 0> { def rr : MMXI { + [(set VR64:$dst, (v1i64 (OpNode VR64:$src1, VR64:$src2)))]> { let isCommutable = Commutable; } def rm : MMXI; + (OpNode VR64:$src1,(loadv1i64 addr:$src2)))]>; } multiclass MMXI_binop_rmi_int opc, bits<8> opc2, Format ImmForm, @@ -107,7 +108,7 @@ def rm : MMXI; + (bitconvert (loadv1i64 addr:$src2))))]>; def ri : MMXIi8; def MMX_PUNPCKHWDrr : MMXI<0x69, MRMSrcReg, (ops VR64:$dst, VR64:$src1, VR64:$src2), @@ -190,38 +191,38 @@ "punpckhwd {$src2, $dst|$dst, $src2}", [(set VR64:$dst, (v4i16 (vector_shuffle VR64:$src1, - (bc_v4i16 (loadv2i32 addr:$src2)), + (bc_v4i16 (loadv1i64 addr:$src2)), MMX_UNPCKH_shuffle_mask)))]>; def MMX_PUNPCKHDQrr : MMXI<0x6A, MRMSrcReg, (ops VR64:$dst, VR64:$src1, VR64:$src2), "punpckhdq {$src2, $dst|$dst, $src2}", [(set VR64:$dst, - (v2i32 (vector_shuffle VR64:$src1, VR64:$src2, + (v1i64 (vector_shuffle VR64:$src1, VR64:$src2, MMX_UNPCKH_shuffle_mask)))]>; def MMX_PUNPCKHDQrm : MMXI<0x6A, MRMSrcMem, (ops VR64:$dst, VR64:$src1, i64mem:$src2), "punpckhdq {$src2, $dst|$dst, $src2}", [(set VR64:$dst, - (v2i32 (vector_shuffle VR64:$src1, - (loadv2i32 addr:$src2), + (v1i64 (vector_shuffle VR64:$src1, + (loadv1i64 addr:$src2), MMX_UNPCKH_shuffle_mask)))]>; } // Logical Instructions -defm MMX_PAND : MMXI_binop_rm_v2i32<0xDB, "pand", and, 1>; -defm MMX_POR : MMXI_binop_rm_v2i32<0xEB, "por" , or, 1>; -defm MMX_PXOR : MMXI_binop_rm_v2i32<0xEF, "pxor", xor, 1>; +defm MMX_PAND : MMXI_binop_rm_v1i64<0xDB, "pand", and, 1>; +defm MMX_POR : MMXI_binop_rm_v1i64<0xEB, "por" , or, 1>; +defm MMX_PXOR : MMXI_binop_rm_v1i64<0xEF, "pxor", xor, 1>; let isTwoAddress = 1 in { def MMX_PANDNrr : MMXI<0xDF, MRMSrcReg, (ops VR64:$dst, VR64:$src1, VR64:$src2), "pandn {$src2, $dst|$dst, $src2}", - [(set VR64:$dst, (v2i32 (and (vnot VR64:$src1), + [(set VR64:$dst, (v1i64 (and (vnot VR64:$src1), VR64:$src2)))]>; def MMX_PANDNrm : MMXI<0xDF, MRMSrcMem, (ops VR64:$dst, VR64:$src1, i64mem:$src2), "pandn {$src2, $dst|$dst, $src2}", - [(set VR64:$dst, (v2i32 (and (vnot VR64:$src1), + [(set VR64:$dst, (v1i64 (and (vnot VR64:$src1), (load addr:$src2))))]>; } @@ -262,10 +263,10 @@ "movq {$src, $dst|$dst, $src}", []>; def MOVQ64rm : MMXI<0x6F, MRMSrcMem, (ops VR64:$dst, i64mem:$src), "movq {$src, $dst|$dst, $src}", - [(set VR64:$dst, (loadv2i32 addr:$src))]>; + [(set VR64:$dst, (loadv1i64 addr:$src))]>; def MOVQ64mr : MMXI<0x7F, MRMDestMem, (ops i64mem:$dst, VR64:$src), "movq {$src, $dst|$dst, $src}", - [(store (v2i32 VR64:$src), addr:$dst)]>; + [(store (v1i64 VR64:$src), addr:$dst)]>; // Conversion instructions def CVTPI2PSrr : MMXI<0x2A, MRMSrcReg, (ops VR128:$dst, VR64:$src), @@ -309,6 +310,18 @@ Requires<[HasMMX]>; //===----------------------------------------------------------------------===// +// Alias Instructions +//===----------------------------------------------------------------------===// + +// Alias instructions that map zero vector to pxor. +// FIXME: remove when we can teach regalloc that xor reg, reg is ok. +let isReMaterializable = 1 in { +def MMX_V_SET0 : MMXI<0xEF, MRMInitReg, (ops VR64:$dst), + "pxor $dst, $dst", + [(set VR64:$dst, (v1i64 immAllZerosV))]>; +} + +//===----------------------------------------------------------------------===// // Non-Instruction Patterns //===----------------------------------------------------------------------===// @@ -317,21 +330,35 @@ (MOVQ64mr addr:$dst, VR64:$src)>; def : Pat<(store (v4i16 VR64:$src), addr:$dst), (MOVQ64mr addr:$dst, VR64:$src)>; +def : Pat<(store (v2i32 VR64:$src), addr:$dst), + (MOVQ64mr addr:$dst, VR64:$src)>; + +// 128-bit vector all zero's. +def : Pat<(v8i8 immAllZerosV), (MMX_V_SET0)>; +def : Pat<(v4i16 immAllZerosV), (MMX_V_SET0)>; +def : Pat<(v2i32 immAllZerosV), (MMX_V_SET0)>; +def : Pat<(v1i64 immAllZerosV), (MMX_V_SET0)>; // Bit convert. +def : Pat<(v8i8 (bitconvert (v1i64 VR64:$src))), (v8i8 VR64:$src)>; def : Pat<(v8i8 (bitconvert (v2i32 VR64:$src))), (v8i8 VR64:$src)>; def : Pat<(v8i8 (bitconvert (v4i16 VR64:$src))), (v8i8 VR64:$src)>; +def : Pat<(v4i16 (bitconvert (v1i64 VR64:$src))), (v4i16 VR64:$src)>; def : Pat<(v4i16 (bitconvert (v2i32 VR64:$src))), (v4i16 VR64:$src)>; def : Pat<(v4i16 (bitconvert (v8i8 VR64:$src))), (v4i16 VR64:$src)>; +def : Pat<(v2i32 (bitconvert (v1i64 VR64:$src))), (v2i32 VR64:$src)>; def : Pat<(v2i32 (bitconvert (v4i16 VR64:$src))), (v2i32 VR64:$src)>; def : Pat<(v2i32 (bitconvert (v8i8 VR64:$src))), (v2i32 VR64:$src)>; +def : Pat<(v1i64 (bitconvert (v2i32 VR64:$src))), (v1i64 VR64:$src)>; +def : Pat<(v1i64 (bitconvert (v4i16 VR64:$src))), (v1i64 VR64:$src)>; +def : Pat<(v1i64 (bitconvert (v8i8 VR64:$src))), (v1i64 VR64:$src)>; -// Splat v2i32 +// Splat v1i64 let AddedComplexity = 10 in { - def : Pat<(vector_shuffle (v2i32 VR64:$src), (undef), + def : Pat<(vector_shuffle (v1i64 VR64:$src), (undef), MMX_splat_mask:$sm), (MMX_PUNPCKHDQrr VR64:$src, VR64:$src)>; - def : Pat<(vector_shuffle (v2i32 VR64:$src), (undef), + def : Pat<(vector_shuffle (v1i64 VR64:$src), (undef), MMX_UNPCKH_shuffle_mask:$sm), (MMX_PUNPCKHDQrr VR64:$src, VR64:$src)>; } @@ -340,5 +367,5 @@ // Scalar to v4i16 / v8i8. The source may be a GR32, but only the lower 8 or // 16-bits matter. +def : Pat<(v8i8 (MMX_X86s2vec GR32:$src)), (MOVD64rr GR32:$src)>; def : Pat<(v4i16 (MMX_X86s2vec GR32:$src)), (MOVD64rr GR32:$src)>; -def : Pat<(v8i8 (MMX_X86s2vec GR32:$src)), (MOVD64rr GR32:$src)>; Index: llvm/lib/Target/X86/X86RegisterInfo.td diff -u llvm/lib/Target/X86/X86RegisterInfo.td:1.40 llvm/lib/Target/X86/X86RegisterInfo.td:1.41 --- llvm/lib/Target/X86/X86RegisterInfo.td:1.40 Mon Jan 22 18:57:47 2007 +++ llvm/lib/Target/X86/X86RegisterInfo.td Mon Mar 26 02:53:08 2007 @@ -441,7 +441,7 @@ } // Generic vector registers: VR64 and VR128. -def VR64 : RegisterClass<"X86", [v8i8, v4i16, v2i32], 64, +def VR64 : RegisterClass<"X86", [v8i8, v4i16, v2i32, v1i64], 64, [MM0, MM1, MM2, MM3, MM4, MM5, MM6, MM7]>; def VR128 : RegisterClass<"X86", [v16i8, v8i16, v4i32, v2i64, v4f32, v2f64],128, [XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, From isanbard at gmail.com Mon Mar 26 02:56:19 2007 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 26 Mar 2007 02:56:19 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/README-MMX.txt Message-ID: <200703260756.l2Q7uJ0v008091@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: README-MMX.txt updated: 1.1 -> 1.2 --- Log message: Updated. --- Diffs of the changes: (+0 -54) README-MMX.txt | 54 ------------------------------------------------------ 1 files changed, 54 deletions(-) Index: llvm/lib/Target/X86/README-MMX.txt diff -u llvm/lib/Target/X86/README-MMX.txt:1.1 llvm/lib/Target/X86/README-MMX.txt:1.2 --- llvm/lib/Target/X86/README-MMX.txt:1.1 Thu Mar 22 13:42:45 2007 +++ llvm/lib/Target/X86/README-MMX.txt Mon Mar 26 02:55:58 2007 @@ -3,57 +3,3 @@ //===---------------------------------------------------------------------===// //===---------------------------------------------------------------------===// - -We should compile - -#include - -extern __m64 C; - -void baz(__v2si *A, __v2si *B) -{ - *A = __builtin_ia32_psllq(*B, C); - _mm_empty(); -} - -to: - -.globl _baz -_baz: - call L3 -"L00000000001$pb": -L3: - popl %ecx - subl $12, %esp - movl 20(%esp), %eax - movq (%eax), %mm0 - movl L_C$non_lazy_ptr-"L00000000001$pb"(%ecx), %eax - movq (%eax), %mm1 - movl 16(%esp), %eax - psllq %mm1, %mm0 - movq %mm0, (%eax) - emms - addl $12, %esp - ret - -not: - -_baz: - subl $12, %esp - call "L1$pb" -"L1$pb": - popl %eax - movl L_C$non_lazy_ptr-"L1$pb"(%eax), %eax - movl (%eax), %ecx - movl %ecx, (%esp) - movl 4(%eax), %eax - movl %eax, 4(%esp) - movl 20(%esp), %eax - movq (%eax), %mm0 - movq (%esp), %mm1 - psllq %mm1, %mm0 - movl 16(%esp), %eax - movq %mm0, (%eax) - emms - addl $12, %esp - ret From isanbard at gmail.com Mon Mar 26 03:03:54 2007 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 26 Mar 2007 03:03:54 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200703260803.l2Q83s2h008242@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.378 -> 1.379 --- Log message: Promote to v1i64 type... --- Diffs of the changes: (+15 -9) X86ISelLowering.cpp | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.378 llvm/lib/Target/X86/X86ISelLowering.cpp:1.379 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.378 Mon Mar 26 02:53:08 2007 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Mon Mar 26 03:03:33 2007 @@ -330,22 +330,28 @@ setOperationAction(ISD::MUL, MVT::v4i16, Legal); setOperationAction(ISD::AND, MVT::v8i8, Promote); - AddPromotedToType (ISD::AND, MVT::v8i8, MVT::v2i32); + AddPromotedToType (ISD::AND, MVT::v8i8, MVT::v1i64); setOperationAction(ISD::AND, MVT::v4i16, Promote); - AddPromotedToType (ISD::AND, MVT::v4i16, MVT::v2i32); - setOperationAction(ISD::AND, MVT::v2i32, Legal); + AddPromotedToType (ISD::AND, MVT::v4i16, MVT::v1i64); + setOperationAction(ISD::AND, MVT::v2i32, Promote); + AddPromotedToType (ISD::AND, MVT::v2i32, MVT::v1i64); + setOperationAction(ISD::AND, MVT::v1i64, Legal); setOperationAction(ISD::OR, MVT::v8i8, Promote); - AddPromotedToType (ISD::OR, MVT::v8i8, MVT::v2i32); + AddPromotedToType (ISD::OR, MVT::v8i8, MVT::v1i64); setOperationAction(ISD::OR, MVT::v4i16, Promote); - AddPromotedToType (ISD::OR, MVT::v4i16, MVT::v2i32); - setOperationAction(ISD::OR, MVT::v2i32, Legal); + AddPromotedToType (ISD::OR, MVT::v4i16, MVT::v1i64); + setOperationAction(ISD::OR, MVT::v2i32, Promote); + AddPromotedToType (ISD::OR, MVT::v2i32, MVT::v1i64); + setOperationAction(ISD::OR, MVT::v1i64, Legal); setOperationAction(ISD::XOR, MVT::v8i8, Promote); - AddPromotedToType (ISD::XOR, MVT::v8i8, MVT::v2i32); + AddPromotedToType (ISD::XOR, MVT::v8i8, MVT::v1i64); setOperationAction(ISD::XOR, MVT::v4i16, Promote); - AddPromotedToType (ISD::XOR, MVT::v4i16, MVT::v2i32); - setOperationAction(ISD::XOR, MVT::v2i32, Legal); + AddPromotedToType (ISD::XOR, MVT::v4i16, MVT::v1i64); + setOperationAction(ISD::XOR, MVT::v2i32, Promote); + AddPromotedToType (ISD::XOR, MVT::v2i32, MVT::v1i64); + setOperationAction(ISD::XOR, MVT::v1i64, Legal); setOperationAction(ISD::LOAD, MVT::v8i8, Promote); AddPromotedToType (ISD::LOAD, MVT::v8i8, MVT::v1i64); From reid at x10sys.com Mon Mar 26 04:33:02 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 26 Mar 2007 04:33:02 -0500 Subject: [llvm-commits] CVS: llvm/docs/Passes.html Message-ID: <200703260933.l2Q9X27v010240@zion.cs.uiuc.edu> Changes in directory llvm/docs: Passes.html added (r1.1) --- Log message: For PR601: http://llvm.org/PR601 : Initial skeleton for pass documentation. --- Diffs of the changes: (+984 -0) Passes.html | 984 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 984 insertions(+) Index: llvm/docs/Passes.html diff -c /dev/null llvm/docs/Passes.html:1.1 *** /dev/null Mon Mar 26 04:32:41 2007 --- llvm/docs/Passes.html Mon Mar 26 04:32:31 2007 *************** *** 0 **** --- 1,984 ---- + + + + LLVM's Analysis and Transform Passes + + + + +
LLVM's Analysis and Transform Passes
+ +
    +
  1. Introduction
  2. +
  3. Analysis Passes +
  4. Transform Passes
  5. +
  6. Utility Passes
  7. +
+ +
+

Written by Reid Spencer

+
+ + + +
+

This document serves as a high level summary of the optimization features + that LLVM provides. Optimizations are implemented as Passes that traverse some + portion of a program to either collect information or transform the program. + THe table below divides the passes that LLVM provides into three categories. + Analysis passes compute information that other passes can use or for debugging + or program visualization purposes. Transform passes can use (or invalidate) + the analysis passes. Transform passes all mutate the program in some way. + Utility passes provides ome utility but don't otherwise fit categorization. + For example passes to extract functions to bytecode or write a module to + bytecode are neither analysis nor transform passes. +

The table below provides a quick summary of each pass and links to the more + complete pass description later in the document.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ANALYSIS PASSES
OptionNameDirectory
-aa-evalExhaustive Alias Analysis Precision Evaluator
-anders-aaAndersen's Interprocedural Alias Analysis
-basicaaBasic Alias Analysis (default AA impl)
-basiccgBasic CallGraph Construction
-basicvnBasic Value Numbering (default GVN impl)
-callgraphPrint a call graph
-callsccPrint SCCs of the Call Graph
-cfgsccPrint SCCs of each function CFG
-count-aaCount Alias Analysis Query Responses
-debug-aaAA use debugger
-domfrontierDominance Frontier Construction
-domsetDominator Set Construction
-domtreeDominator Tree Construction
-etforestET Forest Construction
-externalfnconstantsPrint external fn callsites passed constants
-globalsmodref-aaSimple mod/ref analysis for globals
-idomImmediate Dominators Construction
-instcountCounts the various types of Instructions
-intervalsInterval Partition Construction
-load-vnLoad Value Numbering
-loopsNatural Loop Construction
-no-aaNo Alias Analysis (always returns 'may' alias)
-no-profileNo Profile Information
-postdomfrontierPost-Dominance Frontier Construction
-postdomsetPost-Dominator Set Construction
-postdomtreePost-Dominator Tree Construction
-postetforestPost-ET-Forest Construction
-postidomImmediate Post-Dominators Construction
-printPrint function to stderr
-print-alias-setsAlias Set Printer
-print-callgraphPrint Call Graph to 'dot' file
-print-cfgPrint CFG of function to 'dot' file
-print-cfg-onlyPrint CFG of function to 'dot' file (with no function bodies)
-printmPrint module to stderr
-printusedtypesFind Used Types
-profile-loaderLoad profile information from llvmprof.out
-scalar-evolutionScalar Evolution Analysis
-targetdataTarget Data Layout
TRANSFORM PASSES
OptionNameDirectory
-adceAggressive Dead Code Elimination
-argpromotionPromote 'by reference' arguments to scalars
-block-placementProfile Guided Basic Block Placement
-break-crit-edgesBreak Critical Edges in CFG
-ceeCorrelated Expression Elimination
-condpropConditional Propagation
-constmergeMerge Duplicate Global Constants
-constpropSimple constant propagation
-dceDead Code Elimination
-deadargelimDead Argument Elimination
-deadtypeelimDead Type Elimination
-dieDead Instruction Elimination
-dseDead Store Elimination
-gcseGlobal Common Subexpression Elimination
-globaldceDead Global Elimination
-globaloptGlobal Variable Optimizer
-indmemremIndirect Malloc and Free Removal
-indvarsCanonicalize Induction Variables
-inlineFunction Integration/Inlining
-insert-block-profilingInsert instrumentation for block profiling
-insert-edge-profilingInsert instrumentation for edge profiling
-insert-function-profilingInsert instrumentation for function profiling
-insert-null-profiling-rsMeasure profiling framework overhead
-insert-rs-profiling-frameworkInsert random sampling instrumentation framework
-instcombineCombine redundant instructions
-internalizeInternalize Global Symbols
-ipconstpropInterprocedural constant propagation
-ipsccpInterprocedural Sparse Conditional Constant Propagation
-lcssaLoop-Closed SSA Form Pass
-licmLoop Invariant Code Motion
-loop-extractExtract loops into new functions
-loop-extract-singleExtract at most one loop into a new function
-loop-reduceLoop Strength Reduction
-loop-unrollUnroll Loops
-loop-unswitchUnswitch Loops
-loopsimplifyCanonicalize Natural Loops
-lower-packedLower Packed Operations
-lowerallocsLower allocations from instructions to calls
-lowergcLower GC intrinsics, for GCless code generators
-lowerinvokeLower Invoke and Unwind
-lowerselectLower Selects To Branches
-lowersetjmpLower Set Jump
-lowerswitchLower SwitchInst's to branches
-mem2regPromote Memory to Register
-mergereturnUnify Function Exit Nodes
-predsimplifyPredicate Simplifier
-prune-ehRemove unused exception handling info
-raiseallocsRaise allocations from calls to instructions
-reassociateReassociate Expressions
-reg2memDemote Values to Memory
-scalarreplScalar Replacement of Aggregates
-sccpSparse Conditional Constant Propagation
-simplify-libcallsSimplify well-known library calls
-simplifycfgSimplify the CFG
-stripStrip all symbols from a module
-tailcallelimTail Call Elimination
-tailduplicateTail Duplication
UTILITY PASSES
OptionNameDirectory
-deadarghaX0rDead Argument Hacking (BUGPOINT ONLY)
-extract-blocksExtract Basic Blocks From Module (BUGPOINT ONLY)
-emitbytecodeBytecode Writer
-verifyModule Verifier
+
+ + + +
+

This section describes the LLVM Analysis Passes.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

This section describes the LLVM Transform Passes.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

This section describes the LLVM Utility Passes.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+

Yet to be written.

+
+ + + +
+
+ Valid CSS! + Valid HTML 4.01! + + Reid Spencer
+ LLVM Compiler Infrastructure
+ Last modified: $Date: 2007/03/26 09:32:31 $ +
+ + + From baldrick at free.fr Mon Mar 26 05:59:30 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 26 Mar 2007 05:59:30 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/apint-not.ll apint-sub.ll Message-ID: <200703261059.l2QAxUvk011900@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/InstCombine: apint-not.ll updated: 1.1 -> 1.2 apint-sub.ll updated: 1.1 -> 1.2 --- Log message: Fix testsuite hang. --- Diffs of the changes: (+2 -2) apint-not.ll | 2 +- apint-sub.ll | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/Transforms/InstCombine/apint-not.ll diff -u llvm/test/Transforms/InstCombine/apint-not.ll:1.1 llvm/test/Transforms/InstCombine/apint-not.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-not.ll:1.1 Fri Mar 23 15:48:34 2007 +++ llvm/test/Transforms/InstCombine/apint-not.ll Mon Mar 26 05:59:13 2007 @@ -1,7 +1,7 @@ ; This test makes sure that the xor instructions are properly eliminated ; when arbitrary precision integers are used. -; RUN: llvm-as | opt -instcombine | llvm-dis | not grep xor +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep xor define i33 @test1(i33 %A) { %B = xor i33 %A, -1 Index: llvm/test/Transforms/InstCombine/apint-sub.ll diff -u llvm/test/Transforms/InstCombine/apint-sub.ll:1.1 llvm/test/Transforms/InstCombine/apint-sub.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-sub.ll:1.1 Fri Mar 23 15:48:34 2007 +++ llvm/test/Transforms/InstCombine/apint-sub.ll Mon Mar 26 05:59:13 2007 @@ -2,7 +2,7 @@ ; even with arbitrary precision integers. ; -; RUN: llvm-as | opt -instcombine | llvm-dis | \ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \ ; RUN: grep -v 'sub i19 %Cok, %Bok' | not grep sub define i23 @test1(i23 %A) { From baldrick at free.fr Mon Mar 26 08:30:32 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 26 Mar 2007 15:30:32 +0200 Subject: [llvm-commits] [125160] Better support for variable size struct fields. In-Reply-To: <200703251043.57275.baldrick@free.fr> References: <20070319205502.57CDCA51EA27@src> <8BFB05D2-DEF4-494C-B502-B372286DB87D@apple.com> <200703251043.57275.baldrick@free.fr> Message-ID: <200703261530.33349.baldrick@free.fr> On Sunday 25 March 2007 10:43:57 Duncan Sands wrote: > > Is this already fixed? Here is my proposed fix. The problem was due to zero-sized bitfields, such as struct Z { int :0; } z; Historically, no field was created for such a bitfield, and getLLVMFieldFor would return ~0U, i.e no field found. In my patch "Better support for variable size struct fields" I added an assertion that checks that getLLVMFieldFor always finds a field, and of course it fires in this case. How to solve this? There are basically two choices: (1) accept that sometimes there is no field, and return ~0U; (2) make sure that a field always exists. I chose (2) because it is more uniform, and means that the rest of llvm-gcc doesn't need to know about special cases of gcc fields that don't map to an LLVM field. [You could object that in C it is not possible to access such a field, so the rest of the llvm-gcc code would not need to worry about seeing a ~0U index; however we are not dealing with C, we are dealing with gimple and many languages, and it is not clear to me that such a field can never be referred to]. With this patch a gcc field is mapped to an LLVM field if and only if it has a constant offset from the start of the struct. While writing it I discovered some other related fun ways to crash the compiler, so the patch fixes them too (this explains the large number of attached testcases). There are basically three changes: (1) use DECL_SIZE to determine if a field has zero size, not TYPE_SIZE. Using TYPE_SIZE here was almost certainly a bug (DECL_SIZE is used everywhere else, and is what the gcc documentation says you should use), though it could be a subtlety. As a result of this change, a zero-width bitfield is now considered to be a zero size field, which wasn't the case before. (2) if a zero-width field doesn't live inside an existing field, output a zero width struct for it. This has to be done, since such a bitfield could be the only field, and at least one field is needed. Thus the above example maps to { {} }. This part of the patch also fixes a long-standing bug in which a bitfield following a zero-sized struct in a packed struct would cause an assert failure. (3) fix getLLVMFieldFor so it can handle the following possibilities: (a) a zero-sized field follows padding (this means that CurFieldNo may need to be advanced over the padding); (b) a zero-sized field lives inside a non-zero sized field. Bootstraps and passes "make check". Doesn't cause any build failures in the full testsuite (the run-time failures I'm seeing seem to be due to the current InstCombine issues). Best wishes, Duncan. -------------- next part -------------- A non-text attachment was scrubbed... Name: 2007-03-26-MultipleZeroWidthBitfields.c Type: text/x-csrc Size: 60 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070326/cdef912c/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 2007-03-26-ZeroWidthBitfield.c Type: text/x-csrc Size: 52 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070326/cdef912c/attachment-0001.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 2007-03-26-ZeroWidthBitfieldAfterPadding.c Type: text/x-csrc Size: 68 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070326/cdef912c/attachment-0002.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 2007-03-26-SandwichedZeroWidthBitfield.c Type: text/x-csrc Size: 93 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070326/cdef912c/attachment-0003.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 2007-03-26-BitfieldAfterZeroWidth.c Type: text/x-csrc Size: 107 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070326/cdef912c/attachment-0004.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: zero_width.diff Type: text/x-diff Size: 4281 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070326/cdef912c/attachment-0005.bin From lauro.venancio at gmail.com Mon Mar 26 11:15:55 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Mon, 26 Mar 2007 11:15:55 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Applications/minisat/Main.cpp Message-ID: <200703261615.l2QGFtc0018481@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Applications/minisat: Main.cpp updated: 1.2 -> 1.3 --- Log message: Fix compilation on arm-linux. --- Diffs of the changes: (+1 -1) Main.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/MultiSource/Applications/minisat/Main.cpp diff -u llvm-test/MultiSource/Applications/minisat/Main.cpp:1.2 llvm-test/MultiSource/Applications/minisat/Main.cpp:1.3 --- llvm-test/MultiSource/Applications/minisat/Main.cpp:1.2 Thu Feb 8 02:40:59 2007 +++ llvm-test/MultiSource/Applications/minisat/Main.cpp Mon Mar 26 11:15:37 2007 @@ -286,7 +286,7 @@ reportf("This is MiniSat 2.0 beta\n"); -#if defined(__linux__) +#if defined(__linux__) && defined(_FPU_EXTENDED) && defined(_FPU_DOUBLE) fpu_control_t oldcw, newcw; _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw); reportf("WARNING: for repeatability, setting FPU to use double precision\n"); From reid at x10sys.com Mon Mar 26 12:19:15 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 26 Mar 2007 12:19:15 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703261719.l2QHJFvk019626@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.692 -> 1.693 --- Log message: Get the number of bits to set in a mask correct for a shl/lshr transform. --- Diffs of the changes: (+1 -1) InstructionCombining.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.692 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.693 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.692 Mon Mar 26 00:25:00 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Mar 26 12:18:58 2007 @@ -5858,7 +5858,7 @@ BinaryOperator::createLShr(X, ConstantInt::get(Ty, ShiftDiff)); InsertNewInstBefore(Shift, I); - APInt Mask(APInt::getLowBitsSet(TypeBits, ShiftAmt2)); + APInt Mask(APInt::getLowBitsSet(TypeBits, TypeBits - ShiftAmt2)); return BinaryOperator::createAnd(Shift, ConstantInt::get(Mask)); } From reid at x10sys.com Mon Mar 26 12:44:19 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 26 Mar 2007 12:44:19 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703261744.l2QHiJSL020200@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.693 -> 1.694 --- Log message: Get better debug output by having modified instructions print both the original and new instruction. A slight performance hit with ostringstream but it is only for debug. Also, clean up an uninitialized variable warning noticed in a release build. --- Diffs of the changes: (+10 -2) InstructionCombining.cpp | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.693 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.694 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.693 Mon Mar 26 12:18:58 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Mar 26 12:44:01 2007 @@ -57,6 +57,9 @@ #include "llvm/ADT/STLExtras.h" #include #include +#ifndef NDEBUG +#include +#endif using namespace llvm; using namespace llvm::PatternMatch; @@ -3134,7 +3137,7 @@ // Otherwise, if Mask is 0+1+0+, and if B is known to have the low 0+ // part, we don't need any explicit masks to take them out of A. If that // is all N is, ignore it. - unsigned MB, ME; + unsigned MB = 0, ME = 0; if (isRunOfOnes(Mask, MB, ME)) { // begin/end bit of run, inclusive uint32_t BitWidth = cast(RHS->getType())->getBitWidth(); APInt Mask(APInt::getAllOnesValue(BitWidth)); @@ -9445,6 +9448,10 @@ } // Now that we have an instruction, try combining it to simplify it... +#ifndef NDEBUG + std::string OrigI; +#endif + DEBUG(std::ostringstream SS; I->print(SS); OrigI = SS.str();); if (Instruction *Result = visit(*I)) { ++NumCombined; // Should we replace the old instruction with a new one? @@ -9483,7 +9490,8 @@ // Erase the old instruction. InstParent->getInstList().erase(I); } else { - DOUT << "IC: MOD = " << *I; + DOUT << "IC: Mod = " << OrigI + << " New = " << *I; // If the instruction was modified, it's possible that it is now dead. // if so, remove it. From reid at x10sys.com Mon Mar 26 13:04:56 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 26 Mar 2007 13:04:56 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/2007-03-25-BadShiftMask.ll Message-ID: <200703261804.l2QI4uvW020547@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/InstCombine: 2007-03-25-BadShiftMask.ll updated: 1.1 -> 1.2 --- Log message: Fix this test case to match output after a bug was fixed. --- Diffs of the changes: (+2 -1) 2007-03-25-BadShiftMask.ll | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/test/Transforms/InstCombine/2007-03-25-BadShiftMask.ll diff -u llvm/test/Transforms/InstCombine/2007-03-25-BadShiftMask.ll:1.1 llvm/test/Transforms/InstCombine/2007-03-25-BadShiftMask.ll:1.2 --- llvm/test/Transforms/InstCombine/2007-03-25-BadShiftMask.ll:1.1 Mon Mar 26 00:32:16 2007 +++ llvm/test/Transforms/InstCombine/2007-03-25-BadShiftMask.ll Mon Mar 26 13:04:38 2007 @@ -1,5 +1,6 @@ ; PR1271 -; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'br i1 %1' +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \ +; RUN: grep 'icmp eq i32 .tmp.*, 2146435072' %struct..0anon = type { i32, i32 } %struct..1anon = type { double } From clattner at apple.com Mon Mar 26 13:29:32 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 26 Mar 2007 11:29:32 -0700 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp In-Reply-To: <200703261744.l2QHiJSL020200@zion.cs.uiuc.edu> References: <200703261744.l2QHiJSL020200@zion.cs.uiuc.edu> Message-ID: > @@ -57,6 +57,9 @@ > #include "llvm/ADT/STLExtras.h" > #include > #include > +#ifndef NDEBUG > +#include > +#endif Please don't conditionally #include files. Thanks for the patch, making instcombine's debug output nicer would be very helpful, -chris > using namespace llvm; > using namespace llvm::PatternMatch; > > @@ -3134,7 +3137,7 @@ > // Otherwise, if Mask is 0+1+0+, and if B is known to have > the low 0+ > // part, we don't need any explicit masks to take them out > of A. If that > // is all N is, ignore it. > - unsigned MB, ME; > + unsigned MB = 0, ME = 0; > if (isRunOfOnes(Mask, MB, ME)) { // begin/end bit of run, > inclusive > uint32_t BitWidth = cast(RHS->getType())- > >getBitWidth(); > APInt Mask(APInt::getAllOnesValue(BitWidth)); > @@ -9445,6 +9448,10 @@ > } > > // Now that we have an instruction, try combining it to > simplify it... > +#ifndef NDEBUG > + std::string OrigI; > +#endif > + DEBUG(std::ostringstream SS; I->print(SS); OrigI = SS.str();); > if (Instruction *Result = visit(*I)) { > ++NumCombined; > // Should we replace the old instruction with a new one? > @@ -9483,7 +9490,8 @@ > // Erase the old instruction. > InstParent->getInstList().erase(I); > } else { > - DOUT << "IC: MOD = " << *I; > + DOUT << "IC: Mod = " << OrigI > + << " New = " << *I; > > // If the instruction was modified, it's possible that it > is now dead. > // if so, remove it. > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From reid at x10sys.com Mon Mar 26 13:33:44 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 26 Mar 2007 18:33:44 +0000 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp In-Reply-To: References: <200703261744.l2QHiJSL020200@zion.cs.uiuc.edu> Message-ID: <1174934024.6076.216.camel@bashful.x10sys.com> On Mon, 2007-03-26 at 11:29 -0700, Chris Lattner wrote: > > @@ -57,6 +57,9 @@ > > #include "llvm/ADT/STLExtras.h" > > #include > > #include > > +#ifndef NDEBUG > > +#include > > +#endif > > Please don't conditionally #include files. Why? You would get sstream #included in a release build when it isn't used in a release build. Seems pointless to me. > > Thanks for the patch, making instcombine's debug output nicer would > be very helpful, Yup .. helped verify that the test case I had yesterday was wrong (after the fix). Reid. > > -chris > > > using namespace llvm; > > using namespace llvm::PatternMatch; > > > > @@ -3134,7 +3137,7 @@ > > // Otherwise, if Mask is 0+1+0+, and if B is known to have > > the low 0+ > > // part, we don't need any explicit masks to take them out > > of A. If that > > // is all N is, ignore it. > > - unsigned MB, ME; > > + unsigned MB = 0, ME = 0; > > if (isRunOfOnes(Mask, MB, ME)) { // begin/end bit of run, > > inclusive > > uint32_t BitWidth = cast(RHS->getType())- > > >getBitWidth(); > > APInt Mask(APInt::getAllOnesValue(BitWidth)); > > @@ -9445,6 +9448,10 @@ > > } > > > > // Now that we have an instruction, try combining it to > > simplify it... > > +#ifndef NDEBUG > > + std::string OrigI; > > +#endif > > + DEBUG(std::ostringstream SS; I->print(SS); OrigI = SS.str();); > > if (Instruction *Result = visit(*I)) { > > ++NumCombined; > > // Should we replace the old instruction with a new one? > > @@ -9483,7 +9490,8 @@ > > // Erase the old instruction. > > InstParent->getInstList().erase(I); > > } else { > > - DOUT << "IC: MOD = " << *I; > > + DOUT << "IC: Mod = " << OrigI > > + << " New = " << *I; > > > > // If the instruction was modified, it's possible that it > > is now dead. > > // if so, remove it. > > > > > > > > _______________________________________________ > > 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 -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070326/50e30b92/attachment.bin From sabre at nondot.org Mon Mar 26 13:47:00 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 26 Mar 2007 13:47:00 -0500 Subject: [llvm-commits] CVS: llvm-www/ProjectsWithLLVM/index.html Message-ID: <200703261847.l2QIl0Qo021538@zion.cs.uiuc.edu> Changes in directory llvm-www/ProjectsWithLLVM: index.html updated: 1.32 -> 1.33 --- Log message: add fernando's project --- Diffs of the changes: (+49 -0) index.html | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 49 insertions(+) Index: llvm-www/ProjectsWithLLVM/index.html diff -u llvm-www/ProjectsWithLLVM/index.html:1.32 llvm-www/ProjectsWithLLVM/index.html:1.33 --- llvm-www/ProjectsWithLLVM/index.html:1.32 Sun Feb 4 23:47:58 2007 +++ llvm-www/ProjectsWithLLVM/index.html Mon Mar 26 13:46:43 2007 @@ -35,6 +35,7 @@ + + + +
+By Fernando Pereira, UCLA. +
+ +
+

+The register allocation problem has an exact polynomial solution when restricted +to programs in the Single Static Assignment (SSA) form. +Although striking, this major theoretical accomplishment has yet to be endorsed empirically. +This project consists in the implementation of a complete +SSA-based register allocator using the +LLVM compiler framework. +We have implemented a static transformation of the target program that simplifies the +implementation of the register allocator and improves the quality of the code that +it generates. +We also describe novel techniques to perform register coalescing and +SSA-elimination. +In order to validate our allocation technique, we extensively compare different +flavors of our method against a modern and heavily tuned extension of +the linear-scan register allocator described +here. +The proposed algorithm consistently produces faster code when the target +architecture provides a small number of registers. +For instance, we have achieved an average speed-up of 9.2% when limiting the +number of registers to four general purpose and three reserved register. +By augmenting the algorithm with an aggressive coalescing technique, we have + +been able to raise the speed improvement up to 13.0%. +

+ +

+This project was supported by the google's +Summer of Code +initiative. Fernando Pereira is funded by +CAPES +under process number 218603-9. +

+ +

+Project page. +

+ +
From isanbard at gmail.com Mon Mar 26 13:58:33 2007 From: isanbard at gmail.com (Bill) Date: Mon, 26 Mar 2007 11:58:33 -0700 Subject: [llvm-commits] CVS: llvm-www/ProjectsWithLLVM/index.html In-Reply-To: <200703261847.l2QIl0Qo021538@zion.cs.uiuc.edu> References: <200703261847.l2QIl0Qo021538@zion.cs.uiuc.edu> Message-ID: <16e5fdf90703261158s3d6d8f12wfae59140fff993a2@mail.gmail.com> On 3/26/07, Chris Lattner wrote: > +Project page. > Relative URL alert! -bw From clattner at apple.com Mon Mar 26 14:03:46 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 26 Mar 2007 12:03:46 -0700 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp In-Reply-To: <1174934024.6076.216.camel@bashful.x10sys.com> References: <200703261744.l2QHiJSL020200@zion.cs.uiuc.edu> <1174934024.6076.216.camel@bashful.x10sys.com> Message-ID: On Mar 26, 2007, at 11:33 AM, Reid Spencer wrote: > On Mon, 2007-03-26 at 11:29 -0700, Chris Lattner wrote: >>> @@ -57,6 +57,9 @@ >>> #include "llvm/ADT/STLExtras.h" >>> #include >>> #include >>> +#ifndef NDEBUG >>> +#include >>> +#endif >> >> Please don't conditionally #include files. > > Why? You would get sstream #included in a release build when it isn't > used in a release build. Seems pointless to me. Because someone will later add code to instcombine that uses sstream that isn't itself guarded by the NDEBUG ifdef. Suddenly the release builds start failing. -Chris From sabre at nondot.org Mon Mar 26 14:05:54 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 26 Mar 2007 14:05:54 -0500 Subject: [llvm-commits] CVS: llvm-www/ProjectsWithLLVM/index.html Message-ID: <200703261905.l2QJ5s67022027@zion.cs.uiuc.edu> Changes in directory llvm-www/ProjectsWithLLVM: index.html updated: 1.33 -> 1.34 --- Log message: Fix URL, thanks to Bill for noticing this! --- Diffs of the changes: (+1 -1) index.html | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/ProjectsWithLLVM/index.html diff -u llvm-www/ProjectsWithLLVM/index.html:1.33 llvm-www/ProjectsWithLLVM/index.html:1.34 --- llvm-www/ProjectsWithLLVM/index.html:1.33 Mon Mar 26 13:46:43 2007 +++ llvm-www/ProjectsWithLLVM/index.html Mon Mar 26 14:05:37 2007 @@ -99,7 +99,7 @@

-Project page. +Project page.

From reid at x10sys.com Mon Mar 26 15:09:19 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 26 Mar 2007 15:09:19 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/ConstantFold.cpp Message-ID: <200703262009.l2QK9J6J023216@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: ConstantFold.cpp updated: 1.149 -> 1.150 --- Log message: Add a comment to explain a folding transform. --- Diffs of the changes: (+1 -0) ConstantFold.cpp | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/VMCore/ConstantFold.cpp diff -u llvm/lib/VMCore/ConstantFold.cpp:1.149 llvm/lib/VMCore/ConstantFold.cpp:1.150 --- llvm/lib/VMCore/ConstantFold.cpp:1.149 Sun Mar 25 00:47:04 2007 +++ llvm/lib/VMCore/ConstantFold.cpp Mon Mar 26 15:09:02 2007 @@ -554,6 +554,7 @@ if (C2->isNullValue()) return const_cast(C1); // X ^ 0 == X break; case Instruction::AShr: + // ashr (zext C to Ty), C2 -> lshr (zext C, CSA), C2 if (CE1->getOpcode() == Instruction::ZExt) // Top bits known zero. return ConstantExpr::getLShr(const_cast(C1), const_cast(C2)); From sabre at nondot.org Mon Mar 26 15:41:07 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 26 Mar 2007 15:41:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703262041.l2QKf7r0023931@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.694 -> 1.695 --- Log message: eliminate use of std::set --- Diffs of the changes: (+4 -6) InstructionCombining.cpp | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.694 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.695 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.694 Mon Mar 26 12:44:01 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Mar 26 15:40:50 2007 @@ -56,10 +56,7 @@ #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" #include -#include -#ifndef NDEBUG #include -#endif using namespace llvm; using namespace llvm::PatternMatch; @@ -7808,12 +7805,13 @@ /// DeadPHICycle - Return true if this PHI node is only used by a PHI node cycle /// that is dead. -static bool DeadPHICycle(PHINode *PN, std::set &PotentiallyDeadPHIs) { +static bool DeadPHICycle(PHINode *PN, + SmallPtrSet &PotentiallyDeadPHIs) { if (PN->use_empty()) return true; if (!PN->hasOneUse()) return false; // Remember this node, and if we find the cycle, return. - if (!PotentiallyDeadPHIs.insert(PN).second) + if (!PotentiallyDeadPHIs.insert(PN)) return true; if (PHINode *PU = dyn_cast(PN->use_back())) @@ -7844,7 +7842,7 @@ if (PN.hasOneUse()) { Instruction *PHIUser = cast(PN.use_back()); if (PHINode *PU = dyn_cast(PHIUser)) { - std::set PotentiallyDeadPHIs; + SmallPtrSet PotentiallyDeadPHIs; PotentiallyDeadPHIs.insert(&PN); if (DeadPHICycle(PU, PotentiallyDeadPHIs)) return ReplaceInstUsesWith(PN, UndefValue::get(PN.getType())); From dalej at apple.com Mon Mar 26 17:24:14 2007 From: dalej at apple.com (Dale Johannesen) Date: Mon, 26 Mar 2007 17:24:14 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/RegisterScavenging.h Message-ID: <200703262224.l2QMOECT026101@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: RegisterScavenging.h updated: 1.11 -> 1.12 --- Log message: Fix reversed logic in getRegsUsed. Rename RegStates to RegsAvailable to hopefully forestall similar errors. --- Diffs of the changes: (+8 -8) RegisterScavenging.h | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) Index: llvm/include/llvm/CodeGen/RegisterScavenging.h diff -u llvm/include/llvm/CodeGen/RegisterScavenging.h:1.11 llvm/include/llvm/CodeGen/RegisterScavenging.h:1.12 --- llvm/include/llvm/CodeGen/RegisterScavenging.h:1.11 Tue Mar 20 16:35:06 2007 +++ llvm/include/llvm/CodeGen/RegisterScavenging.h Mon Mar 26 17:23:54 2007 @@ -47,10 +47,10 @@ /// const TargetRegisterClass *ScavengedRC; - /// RegStates - The current state of all the physical registers immediately + /// RegsAvailable - The current state of all the physical registers immediately /// before MBBI. One bit per physical register. If bit is set that means it's /// available, unset means the register is currently being used. - BitVector RegStates; + BitVector RegsAvailable; public: RegScavenger() @@ -88,18 +88,18 @@ /// isUsed / isUsed - Test if a register is currently being used. /// - bool isUsed(unsigned Reg) const { return !RegStates[Reg]; } - bool isUnused(unsigned Reg) const { return RegStates[Reg]; } + bool isUsed(unsigned Reg) const { return !RegsAvailable[Reg]; } + bool isUnused(unsigned Reg) const { return RegsAvailable[Reg]; } /// getRegsUsed - return all registers currently in use in used. void getRegsUsed(BitVector &used, bool includeReserved); /// setUsed / setUnused - Mark the state of one or a number of registers. /// - void setUsed(unsigned Reg) { RegStates.reset(Reg); } - void setUsed(BitVector Regs) { RegStates &= ~Regs; } - void setUnused(unsigned Reg) { RegStates.set(Reg); } - void setUnused(BitVector Regs) { RegStates |= Regs; } + void setUsed(unsigned Reg) { RegsAvailable.reset(Reg); } + void setUsed(BitVector Regs) { RegsAvailable &= ~Regs; } + void setUnused(unsigned Reg) { RegsAvailable.set(Reg); } + void setUnused(BitVector Regs) { RegsAvailable |= Regs; } /// FindUnusedReg - Find a unused register of the specified register class /// from the specified set of registers. It return 0 is none is found. From dalej at apple.com Mon Mar 26 17:24:13 2007 From: dalej at apple.com (Dale Johannesen) Date: Mon, 26 Mar 2007 17:24:13 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegisterScavenging.cpp Message-ID: <200703262224.l2QMODB2026096@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: RegisterScavenging.cpp updated: 1.13 -> 1.14 --- Log message: Fix reversed logic in getRegsUsed. Rename RegStates to RegsAvailable to hopefully forestall similar errors. --- Diffs of the changes: (+15 -15) RegisterScavenging.cpp | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) Index: llvm/lib/CodeGen/RegisterScavenging.cpp diff -u llvm/lib/CodeGen/RegisterScavenging.cpp:1.13 llvm/lib/CodeGen/RegisterScavenging.cpp:1.14 --- llvm/lib/CodeGen/RegisterScavenging.cpp:1.13 Tue Mar 20 16:35:06 2007 +++ llvm/lib/CodeGen/RegisterScavenging.cpp Mon Mar 26 17:23:54 2007 @@ -36,7 +36,7 @@ if (!MBB) { NumPhysRegs = RegInfo->getNumRegs(); - RegStates.resize(NumPhysRegs); + RegsAvailable.resize(NumPhysRegs); // Create reserved registers bitvector. ReservedRegs = RegInfo->getReservedRegs(MF); @@ -54,10 +54,10 @@ ScavengedRC = NULL; // All registers started out unused. - RegStates.set(); + RegsAvailable.set(); // Reserved registers are always used. - RegStates ^= ReservedRegs; + RegsAvailable ^= ReservedRegs; // Live-in registers are in use. if (!MBB->livein_empty()) @@ -182,9 +182,9 @@ void RegScavenger::getRegsUsed(BitVector &used, bool includeReserved) { if (includeReserved) - used = RegStates; + used = ~RegsAvailable; else - used = RegStates & ~ReservedRegs; + used = ~RegsAvailable & ~ReservedRegs; } /// CreateRegClassMask - Set the bits that represent the registers in the @@ -198,32 +198,32 @@ unsigned RegScavenger::FindUnusedReg(const TargetRegisterClass *RegClass, const BitVector &Candidates) const { // Mask off the registers which are not in the TargetRegisterClass. - BitVector RegStatesCopy(NumPhysRegs, false); - CreateRegClassMask(RegClass, RegStatesCopy); - RegStatesCopy &= RegStates; + BitVector RegsAvailableCopy(NumPhysRegs, false); + CreateRegClassMask(RegClass, RegsAvailableCopy); + RegsAvailableCopy &= RegsAvailable; // Restrict the search to candidates. - RegStatesCopy &= Candidates; + RegsAvailableCopy &= Candidates; // Returns the first unused (bit is set) register, or 0 is none is found. - int Reg = RegStatesCopy.find_first(); + int Reg = RegsAvailableCopy.find_first(); return (Reg == -1) ? 0 : Reg; } unsigned RegScavenger::FindUnusedReg(const TargetRegisterClass *RegClass, bool ExCalleeSaved) const { // Mask off the registers which are not in the TargetRegisterClass. - BitVector RegStatesCopy(NumPhysRegs, false); - CreateRegClassMask(RegClass, RegStatesCopy); - RegStatesCopy &= RegStates; + BitVector RegsAvailableCopy(NumPhysRegs, false); + CreateRegClassMask(RegClass, RegsAvailableCopy); + RegsAvailableCopy &= RegsAvailable; // If looking for a non-callee-saved register, mask off all the callee-saved // registers. if (ExCalleeSaved) - RegStatesCopy &= ~CalleeSavedRegs; + RegsAvailableCopy &= ~CalleeSavedRegs; // Returns the first unused (bit is set) register, or 0 is none is found. - int Reg = RegStatesCopy.find_first(); + int Reg = RegsAvailableCopy.find_first(); return (Reg == -1) ? 0 : Reg; } From evan.cheng at apple.com Mon Mar 26 17:38:04 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 26 Mar 2007 17:38:04 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineInstr.h Message-ID: <200703262238.l2QMc4iu026470@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineInstr.h updated: 1.214 -> 1.215 --- Log message: Change findRegisterUseOperand() to return operand index instead. --- Diffs of the changes: (+3 -3) MachineInstr.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/include/llvm/CodeGen/MachineInstr.h diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.214 llvm/include/llvm/CodeGen/MachineInstr.h:1.215 --- llvm/include/llvm/CodeGen/MachineInstr.h:1.214 Tue Feb 27 15:06:57 2007 +++ llvm/include/llvm/CodeGen/MachineInstr.h Mon Mar 26 17:37:45 2007 @@ -390,10 +390,10 @@ delete removeFromParent(); } - /// findRegisterUseOperand() - Returns the MachineOperand that is a use of - /// the specific register or NULL if it is not found. It further tightening + /// findRegisterUseOperand() - Returns the operand index that is a use of + /// the specific register or -1 if it is not found. It further tightening /// the search criteria to a use that kills the register if isKill is true. - MachineOperand *findRegisterUseOperand(unsigned Reg, bool isKill = false); + int findRegisterUseOperand(unsigned Reg, bool isKill = false); /// findRegisterDefOperand() - Returns the MachineOperand that is a def of /// the specific register or NULL if it is not found. From evan.cheng at apple.com Mon Mar 26 17:38:05 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 26 Mar 2007 17:38:05 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/MachineInstr.cpp Message-ID: <200703262238.l2QMc5ak026475@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: MachineInstr.cpp updated: 1.145 -> 1.146 --- Log message: Change findRegisterUseOperand() to return operand index instead. --- Diffs of the changes: (+4 -4) MachineInstr.cpp | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/lib/CodeGen/MachineInstr.cpp diff -u llvm/lib/CodeGen/MachineInstr.cpp:1.145 llvm/lib/CodeGen/MachineInstr.cpp:1.146 --- llvm/lib/CodeGen/MachineInstr.cpp:1.145 Thu Feb 22 19:04:26 2007 +++ llvm/lib/CodeGen/MachineInstr.cpp Mon Mar 26 17:37:45 2007 @@ -170,16 +170,16 @@ } /// findRegisterUseOperand() - Returns the MachineOperand that is a use of -/// the specific register or NULL if it is not found. It further tightening +/// the specific register or -1 if it is not found. It further tightening /// the search criteria to a use that kills the register if isKill is true. -MachineOperand *MachineInstr::findRegisterUseOperand(unsigned Reg, bool isKill){ +int MachineInstr::findRegisterUseOperand(unsigned Reg, bool isKill){ for (unsigned i = 0, e = getNumOperands(); i != e; ++i) { MachineOperand &MO = getOperand(i); if (MO.isReg() && MO.isUse() && MO.getReg() == Reg) if (!isKill || MO.isKill()) - return &MO; + return i; } - return NULL; + return -1; } /// findRegisterDefOperand() - Returns the MachineOperand that is a def of From reid at x10sys.com Mon Mar 26 17:38:18 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 26 Mar 2007 17:38:18 -0500 Subject: [llvm-commits] CVS: llvm/tools/llc/llc.cpp Message-ID: <200703262238.l2QMcIkm026487@zion.cs.uiuc.edu> Changes in directory llvm/tools/llc: llc.cpp updated: 1.144 -> 1.145 --- Log message: For PR1277: http://llvm.org/PR1277 : Implement error handling for bytecode parsing. Patch by Scott Michel. --- Diffs of the changes: (+4 -1) llc.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/tools/llc/llc.cpp diff -u llvm/tools/llc/llc.cpp:1.144 llvm/tools/llc/llc.cpp:1.145 --- llvm/tools/llc/llc.cpp:1.144 Wed Feb 7 19:41:07 2007 +++ llvm/tools/llc/llc.cpp Mon Mar 26 17:38:01 2007 @@ -177,10 +177,13 @@ sys::PrintStackTraceOnErrorSignal(); // Load the module to be compiled... + std::string errmsg; std::auto_ptr M(ParseBytecodeFile(InputFilename, - Compressor::decompressToNewBuffer)); + Compressor::decompressToNewBuffer, + &errmsg)); if (M.get() == 0) { std::cerr << argv[0] << ": bytecode didn't read correctly.\n"; + std::cerr << "Reason: " << errmsg << "\n"; return 1; } Module &mod = *M.get(); From evan.cheng at apple.com Mon Mar 26 17:40:59 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 26 Mar 2007 17:40:59 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/VirtRegMap.cpp LiveIntervalAnalysis.cpp Message-ID: <200703262240.l2QMexEt026629@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: VirtRegMap.cpp updated: 1.105 -> 1.106 LiveIntervalAnalysis.cpp updated: 1.227 -> 1.228 --- Log message: Fix for PR1266: http://llvm.org/PR1266 . Don't mark a two address operand IsKill. --- Diffs of the changes: (+33 -22) LiveIntervalAnalysis.cpp | 6 ++--- VirtRegMap.cpp | 49 ++++++++++++++++++++++++++++------------------- 2 files changed, 33 insertions(+), 22 deletions(-) Index: llvm/lib/CodeGen/VirtRegMap.cpp diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.105 llvm/lib/CodeGen/VirtRegMap.cpp:1.106 --- llvm/lib/CodeGen/VirtRegMap.cpp:1.105 Tue Mar 20 03:13:50 2007 +++ llvm/lib/CodeGen/VirtRegMap.cpp Mon Mar 26 17:40:42 2007 @@ -754,10 +754,11 @@ // necessary. bool WasKill = false; if (SSMI) { - MachineOperand *MOK = SSMI->findRegisterUseOperand(PhysReg, true); - if (MOK) { - WasKill = MOK->isKill(); - MOK->unsetIsKill(); + int UIdx = SSMI->findRegisterUseOperand(PhysReg, true); + if (UIdx != -1) { + MachineOperand &MOK = SSMI->getOperand(UIdx); + WasKill = MOK.isKill(); + MOK.unsetIsKill(); } } if (ti == -1) { @@ -840,17 +841,20 @@ // necessary. bool WasKill = false; if (SSMI) { - MachineOperand *MOK = SSMI->findRegisterUseOperand(PhysReg, true); - if (MOK) { - WasKill = MOK->isKill(); - MOK->unsetIsKill(); + int UIdx = SSMI->findRegisterUseOperand(PhysReg, true); + if (UIdx != -1) { + MachineOperand &MOK = SSMI->getOperand(UIdx); + WasKill = MOK.isKill(); + MOK.unsetIsKill(); } } MachineInstr *CopyMI = prior(MII); if (WasKill) { // Transfer kill to the next use. - MachineOperand *MOU = CopyMI->findRegisterUseOperand(PhysReg); - MOU->setIsKill(); + int UIdx = CopyMI->findRegisterUseOperand(PhysReg); + assert(UIdx != -1); + MachineOperand &MOU = CopyMI->getOperand(UIdx); + MOU.setIsKill(); } Spills.addLastUse(PhysReg, CopyMI); @@ -945,18 +949,25 @@ // extended. Remove its kill. bool WasKill = false; if (SSMI) { - MachineOperand *MOK = SSMI->findRegisterUseOperand(InReg, true); - if (MOK) { - WasKill = MOK->isKill(); - MOK->unsetIsKill(); + int UIdx = SSMI->findRegisterUseOperand(InReg, true); + if (UIdx != -1) { + MachineOperand &MOK = SSMI->getOperand(UIdx); + WasKill = MOK.isKill(); + MOK.unsetIsKill(); } } if (NextMII != MBB.end()) { - // If NextMII uses InReg (must be the copy?), mark it killed. - MachineOperand *MOU = NextMII->findRegisterUseOperand(InReg); - if (MOU) { - if (WasKill) - MOU->setIsKill(); + // If NextMII uses InReg and the use is not a two address + // operand, mark it killed. + int UIdx = NextMII->findRegisterUseOperand(InReg); + if (UIdx != -1) { + MachineOperand &MOU = NextMII->getOperand(UIdx); + if (WasKill) { + const TargetInstrDescriptor *NTID = + NextMII->getInstrDescriptor(); + if (NTID->getOperandConstraint(UIdx, TOI::TIED_TO) == -1) + MOU.setIsKill(); + } Spills.addLastUse(InReg, &(*NextMII)); } } Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.227 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.228 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.227 Wed Mar 21 20:26:05 2007 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Mon Mar 26 17:40:42 2007 @@ -854,9 +854,9 @@ // If the source instruction was killing the source register before the // merge, unset the isKill marker given the live range has been extended. - MachineOperand *MOK = ValLREndInst->findRegisterUseOperand(IntB.reg, true); - if (MOK) - MOK->unsetIsKill(); + int UIdx = ValLREndInst->findRegisterUseOperand(IntB.reg, true); + if (UIdx != -1) + ValLREndInst->getOperand(UIdx).unsetIsKill(); // Finally, delete the copy instruction. RemoveMachineInstrFromMaps(CopyMI); From evan.cheng at apple.com Mon Mar 26 17:42:05 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 26 Mar 2007 17:42:05 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrInfo.cpp ARMLoadStoreOptimizer.cpp Message-ID: <200703262242.l2QMg57G026672@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrInfo.cpp updated: 1.17 -> 1.18 ARMLoadStoreOptimizer.cpp updated: 1.6 -> 1.7 --- Log message: findRegisterUseOperand() changed. --- Diffs of the changes: (+3 -3) ARMInstrInfo.cpp | 4 ++-- ARMLoadStoreOptimizer.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Target/ARM/ARMInstrInfo.cpp diff -u llvm/lib/Target/ARM/ARMInstrInfo.cpp:1.17 llvm/lib/Target/ARM/ARMInstrInfo.cpp:1.18 --- llvm/lib/Target/ARM/ARMInstrInfo.cpp:1.17 Mon Mar 19 02:48:02 2007 +++ llvm/lib/Target/ARM/ARMInstrInfo.cpp Mon Mar 26 17:41:48 2007 @@ -278,8 +278,8 @@ for (unsigned j = 0; j < 2; ++j) { // Look at the two new MI's in reverse order. MachineInstr *NewMI = NewMIs[j]; - MachineOperand *NMO = NewMI->findRegisterUseOperand(Reg); - if (!NMO) + int NIdx = NewMI->findRegisterUseOperand(Reg); + if (NIdx != -1) continue; LV.addVirtualRegisterKilled(Reg, NewMI); if (VI.removeKill(MI)) Index: llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp diff -u llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp:1.6 llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp:1.7 --- llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp:1.6 Wed Mar 7 20:55:08 2007 +++ llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp Mon Mar 26 17:41:48 2007 @@ -221,7 +221,7 @@ } } - bool BaseKill = Loc->findRegisterUseOperand(Base, true) != NULL; + bool BaseKill = Loc->findRegisterUseOperand(Base, true) != -1; if (mergeOps(MBB, ++Loc, SOffset, Base, BaseKill, Opcode,Scratch,Regs, TII)) { Merges.push_back(prior(Loc)); for (unsigned i = SIndex, e = MemOps.size(); i != e; ++i) { From evan.cheng at apple.com Mon Mar 26 17:58:52 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 26 Mar 2007 17:58:52 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/2007-03-26-RegScavengerAssert.ll Message-ID: <200703262258.l2QMwqXt027038@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: 2007-03-26-RegScavengerAssert.ll added (r1.1) --- Log message: Test case for PR1266: http://llvm.org/PR1266 . --- Diffs of the changes: (+948 -0) 2007-03-26-RegScavengerAssert.ll | 948 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 948 insertions(+) Index: llvm/test/CodeGen/ARM/2007-03-26-RegScavengerAssert.ll diff -c /dev/null llvm/test/CodeGen/ARM/2007-03-26-RegScavengerAssert.ll:1.1 *** /dev/null Mon Mar 26 17:58:45 2007 --- llvm/test/CodeGen/ARM/2007-03-26-RegScavengerAssert.ll Mon Mar 26 17:58:35 2007 *************** *** 0 **** --- 1,948 ---- + ; RUN: llvm-as < %s | llc -march=arm + ; PR1266 + + target datalayout = "e-p:32:32:32-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" + target triple = "arm-linux-gnueabi" + %struct.CUMULATIVE_ARGS = type { i32, i32, i32, i32, i32, i32 } + %struct.FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct.FILE*, i32, i32, i32, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i32, [52 x i8] } + %struct.VEC_edge = type { i32, i32, [1 x %struct.edge_def*] } + %struct.VEC_tree = type { i32, i32, [1 x %struct.tree_node*] } + %struct._IO_marker = type { %struct._IO_marker*, %struct.FILE*, i32 } + %struct._obstack_chunk = type { i8*, %struct._obstack_chunk*, [4 x i8] } + %struct.addr_diff_vec_flags = type { i8, i8, i8, i8 } + %struct.arm_stack_offsets = type { i32, i32, i32, i32, i32 } + %struct.attribute_spec = type { i8*, i32, i32, i8, i8, i8, %struct.tree_node* (%struct.tree_node**, %struct.tree_node*, %struct.tree_node*, i32, i8*)* } + %struct.basic_block_def = type { %struct.rtx_def*, %struct.rtx_def*, %struct.tree_node*, %struct.VEC_edge*, %struct.VEC_edge*, %struct.bitmap_head_def*, %struct.bitmap_head_def*, i8*, %struct.loop*, [2 x %struct.et_node*], %struct.basic_block_def*, %struct.basic_block_def*, %struct.reorder_block_def*, %struct.bb_ann_d*, i64, i32, i32, i32, i32 } + %struct.bb_ann_d = type { %struct.tree_node*, i8, %struct.edge_prediction* } + %struct.bitmap_element_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, i32, [4 x i32] } + %struct.bitmap_head_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, i32, %struct.bitmap_obstack* } + %struct.bitmap_obstack = type { %struct.bitmap_element_def*, %struct.bitmap_head_def*, %struct.obstack } + %struct.cgraph_edge = type { %struct.cgraph_node*, %struct.cgraph_node*, %struct.cgraph_edge*, %struct.cgraph_edge*, %struct.cgraph_edge*, %struct.cgraph_edge*, %struct.tree_node*, i8*, i8* } + %struct.cgraph_global_info = type { %struct.cgraph_node*, i32, i8 } + %struct.cgraph_local_info = type { i32, i8, i8, i8, i8, i8, i8, i8 } + %struct.cgraph_node = type { %struct.tree_node*, %struct.cgraph_edge*, %struct.cgraph_edge*, %struct.cgraph_node*, %struct.cgraph_node*, %struct.cgraph_node*, %struct.cgraph_node*, %struct.cgraph_node*, %struct.cgraph_node*, %struct.cgraph_node*, i8*, %struct.cgraph_local_info, %struct.cgraph_global_info, %struct.cgraph_rtl_info, i32, i8, i8, i8, i8, i8 } + %struct.cgraph_rtl_info = type { i32, i8, i8 } + %struct.cl_perfunc_opts = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32 } + %struct.cselib_val_struct = type opaque + %struct.dataflow_d = type { %struct.varray_head_tag*, [2 x %struct.tree_node*] } + %struct.def_operand_ptr = type { %struct.tree_node** } + %struct.def_optype_d = type { i32, [1 x %struct.def_operand_ptr] } + %struct.diagnostic_context = type { %struct.pretty_printer*, [8 x i32], i8, i8, i8, void (%struct.diagnostic_context*, %struct.diagnostic_info*)*, void (%struct.diagnostic_context*, %struct.diagnostic_info*)*, void (i8*, i8**)*, %struct.tree_node*, i32, i32 } + %struct.diagnostic_info = type { %struct.text_info, %struct.location_t, i32 } + %struct.die_struct = type opaque + %struct.edge_def = type { %struct.basic_block_def*, %struct.basic_block_def*, %struct.edge_def_insns, i8*, %struct.location_t*, i32, i32, i64, i32 } + %struct.edge_def_insns = type { %struct.rtx_def* } + %struct.edge_prediction = type { %struct.edge_prediction*, %struct.edge_def*, i32, i32 } + %struct.eh_status = type opaque + %struct.elt_list = type opaque + %struct.elt_t = type { %struct.tree_node*, %struct.tree_node* } + %struct.emit_status = type { i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack*, i32, %struct.location_t, i32, i8*, %struct.rtx_def** } + %struct.et_node = type opaque + %struct.expr_status = type { i32, i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def* } + %struct.function = type { %struct.eh_status*, %struct.expr_status*, %struct.emit_status*, %struct.varasm_status*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.function*, i32, i32, i32, i32, %struct.rtx_def*, %struct.CUMULATIVE_ARGS, %struct.rtx_def*, %struct.rtx_def*, %struct.initial_value_struct*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, i8, i32, i64, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, %struct.varray_head_tag*, %struct.temp_slot*, i32, %struct.var_refs_queue*, i32, i32, %struct.rtvec_def*, %struct.tree_node*, i32, i32, i32, %struct.machine_function*, i32, i32, i8, i8, %struct.language_function*, %struct.rtx_def*, i32, i32, i32, i32, %struct.location_t, %struct.varray_head_tag*, %struct.tree_node*, i8, i8, i8 } + %struct.ggc_root_tab = type { i8*, i32, i32, void (i8*)*, void (i8*)* } + %struct.gimplify_ctx = type { %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.varray_head_tag*, %struct.htab*, i32, i8, i8 } + %struct.gimplify_init_ctor_preeval_data = type { %struct.tree_node*, i32 } + %struct.ht_identifier = type { i8*, i32, i32 } + %struct.htab = type { i32 (i8*)*, i32 (i8*, i8*)*, void (i8*)*, i8**, i32, i32, i32, i32, i32, i8* (i32, i32)*, void (i8*)*, i8*, i8* (i8*, i32, i32)*, void (i8*, i8*)*, i32 } + %struct.initial_value_struct = type opaque + %struct.lang_decl = type opaque + %struct.lang_hooks = type { i8*, i32, i32 (i32)*, i32 (i32, i8**)*, void (%struct.diagnostic_context*)*, i32 (i32, i8*, i32)*, i8 (i8*, i32) zext *, i8 (i8**) zext *, i8 () zext *, void ()*, void ()*, void (i32)*, void ()*, i64 (%struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*)*, %struct.rtx_def* (%struct.tree_node*, %struct.rtx_def*, i32, i32, %struct.rtx_def**)*, i32 (%struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*)*, i32 (%struct.rtx_def*, %struct.tree_node*)*, void (%struct.tree_node*)*, i8 (%struct.tree_node*) zext *, %struct.tree_node* (%struct.tree_node*)*, void (%struct.tree_node*)*, void (%struct.tree_node*)*, i8 () zext *, i8, i8, void ()*, void (%struct.FILE*, %struct.tree_node*, i32)*, void (%struct.FILE*, %struct.tree_node*, i32)*, void (%struct.FILE*, %struct.tree_node*, i32)*, void (%struct.FILE*, %struct.tree_node*, i32)*, i8* (%struct.tree_node*, i32)*, i32 (%struct.tree_node*, %struct.tree_node*)*, %struct.tree_node* (%struct.tre! e_node*)*, void (%struct.diagnostic_context*, i8*)*, %struct.tree_node* (%struct.tree_node*)*, i64 (i64)*, %struct.attribute_spec*, %struct.attribute_spec*, %struct.attribute_spec*, i32 (%struct.tree_node*)*, %struct.lang_hooks_for_functions, %struct.lang_hooks_for_tree_inlining, %struct.lang_hooks_for_callgraph, %struct.lang_hooks_for_tree_dump, %struct.lang_hooks_for_decls, %struct.lang_hooks_for_types, i32 (%struct.tree_node**, %struct.tree_node**, %struct.tree_node**)*, %struct.tree_node* (%struct.tree_node*, %struct.tree_node*)*, %struct.tree_node* (i8*, %struct.tree_node*, i32, i32, i8*, %struct.tree_node*)* } + %struct.lang_hooks_for_callgraph = type { %struct.tree_node* (%struct.tree_node**, i32*, %struct.tree_node*)*, void (%struct.tree_node*)* } + %struct.lang_hooks_for_decls = type { i32 ()*, void (%struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*)*, %struct.tree_node* ()*, i8 (%struct.tree_node*) zext *, void ()*, void (%struct.tree_node*)*, i8 (%struct.tree_node*) zext *, i8* (%struct.tree_node*)* } + %struct.lang_hooks_for_functions = type { void (%struct.function*)*, void (%struct.function*)*, void (%struct.function*)*, void (%struct.function*)*, i8 (%struct.tree_node*) zext * } + %struct.lang_hooks_for_tree_dump = type { i8 (i8*, %struct.tree_node*) zext *, i32 (%struct.tree_node*)* } + %struct.lang_hooks_for_tree_inlining = type { %struct.tree_node* (%struct.tree_node**, i32*, %struct.tree_node* (%struct.tree_node**, i32*, i8*)*, i8*, %struct.pointer_set_t*)*, i32 (%struct.tree_node**)*, i32 (%struct.tree_node*)*, %struct.tree_node* (i8*, %struct.tree_node*)*, i32 (%struct.tree_node*, %struct.tree_node*)*, i32 (%struct.tree_node*)*, i8 (%struct.tree_node*, %struct.tree_node*) zext *, i32 (%struct.tree_node*)*, void (%struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i32)* } + %struct.lang_hooks_for_types = type { %struct.tree_node* (i32)*, %struct.tree_node* (i32, i32)*, %struct.tree_node* (i32, i32)*, %struct.tree_node* (%struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*)*, %struct.tree_node* (i32, %struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*)*, void (%struct.tree_node*, i8*)*, void (%struct.tree_node*, %struct.tree_node*)*, %struct.tree_node* (%struct.tree_node*)*, i8 } + %struct.lang_type = type opaque + %struct.language_function = type opaque + %struct.location_t = type { i8*, i32 } + %struct.loop = type opaque + %struct.machine_function = type { %struct.rtx_def*, i32, i32, i32, %struct.arm_stack_offsets, i32, i32, i32, [14 x %struct.rtx_def*] } + %struct.mem_attrs = type { i64, %struct.tree_node*, %struct.rtx_def*, %struct.rtx_def*, i32 } + %struct.obstack = type { i32, %struct._obstack_chunk*, i8*, i8*, i8*, i32, i32, %struct._obstack_chunk* (i8*, i32)*, void (i8*, %struct._obstack_chunk*)*, i8*, i8 } + %struct.output_buffer = type { %struct.obstack, %struct.FILE*, i32, [128 x i8] } + %struct.phi_arg_d = type { %struct.tree_node*, i8 } + %struct.pointer_set_t = type opaque + %struct.pretty_printer = type { %struct.output_buffer*, i8*, i32, i32, i32, i32, i32, i8 (%struct.pretty_printer*, %struct.text_info*) zext *, i8, i8 } + %struct.ptr_info_def = type { i8, %struct.bitmap_head_def*, %struct.tree_node* } + %struct.real_value = type { i8, [3 x i8], [5 x i32] } + %struct.reg_attrs = type { %struct.tree_node*, i64 } + %struct.reg_info_def = type opaque + %struct.reorder_block_def = type { %struct.rtx_def*, %struct.rtx_def*, %struct.basic_block_def*, %struct.basic_block_def*, %struct.basic_block_def*, i32, i32, i32 } + %struct.rtunion = type { i32 } + %struct.rtvec_def = type { i32, [1 x %struct.rtx_def*] } + %struct.rtx_def = type { i16, i8, i8, %struct.u } + %struct.sequence_stack = type { %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack* } + %struct.stmt_ann_d = type { %struct.tree_ann_common_d, i8, %struct.basic_block_def*, %struct.stmt_operands_d, %struct.dataflow_d*, %struct.bitmap_head_def*, i32 } + %struct.stmt_operands_d = type { %struct.def_optype_d*, %struct.def_optype_d*, %struct.v_may_def_optype_d*, %struct.vuse_optype_d*, %struct.v_may_def_optype_d* } + %struct.temp_slot = type opaque + %struct.text_info = type { i8*, i8**, i32 } + %struct.tree_ann_common_d = type { i32, i8*, %struct.tree_node* } + %struct.tree_ann_d = type { %struct.stmt_ann_d } + %struct.tree_binfo = type { %struct.tree_common, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.VEC_tree*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.VEC_tree } + %struct.tree_block = type { %struct.tree_common, i8, [3 x i8], %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node* } + %struct.tree_common = type { %struct.tree_node*, %struct.tree_node*, %struct.tree_ann_d*, i8, i8, i8, i8, i8 } + %struct.tree_complex = type { %struct.tree_common, %struct.tree_node*, %struct.tree_node* } + %struct.tree_decl = type { %struct.tree_common, %struct.location_t, i32, %struct.tree_node*, i8, i8, i8, i8, i8, i8, i8, i8, i32, %struct.tree_decl_u1, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, i32, %struct.tree_decl_u2, %struct.tree_node*, %struct.tree_node*, i64, %struct.lang_decl* } + %struct.tree_decl_u1 = type { i64 } + %struct.tree_decl_u1_a = type { i32 } + %struct.tree_decl_u2 = type { %struct.function* } + %struct.tree_exp = type { %struct.tree_common, %struct.location_t*, i32, %struct.tree_node*, [1 x %struct.tree_node*] } + %struct.tree_identifier = type { %struct.tree_common, %struct.ht_identifier } + %struct.tree_int_cst = type { %struct.tree_common, %struct.tree_int_cst_lowhi } + %struct.tree_int_cst_lowhi = type { i64, i64 } + %struct.tree_list = type { %struct.tree_common, %struct.tree_node*, %struct.tree_node* } + %struct.tree_node = type { %struct.tree_decl } + %struct.tree_phi_node = type { %struct.tree_common, %struct.tree_node*, i32, i32, i32, %struct.basic_block_def*, %struct.dataflow_d*, [1 x %struct.phi_arg_d] } + %struct.tree_real_cst = type { %struct.tree_common, %struct.real_value* } + %struct.tree_ssa_name = type { %struct.tree_common, %struct.tree_node*, i32, %struct.ptr_info_def*, %struct.tree_node*, i8* } + %struct.tree_statement_list = type { %struct.tree_common, %struct.tree_statement_list_node*, %struct.tree_statement_list_node* } + %struct.tree_statement_list_node = type { %struct.tree_statement_list_node*, %struct.tree_statement_list_node*, %struct.tree_node* } + %struct.tree_stmt_iterator = type { %struct.tree_statement_list_node*, %struct.tree_node* } + %struct.tree_string = type { %struct.tree_common, i32, [1 x i8] } + %struct.tree_type = type { %struct.tree_common, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i32, i16, i8, i8, i32, %struct.tree_node*, %struct.tree_node*, %struct.rtunion, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i64, %struct.lang_type* } + %struct.tree_type_symtab = type { i32 } + %struct.tree_value_handle = type { %struct.tree_common, %struct.value_set*, i32 } + %struct.tree_vec = type { %struct.tree_common, i32, [1 x %struct.tree_node*] } + %struct.tree_vector = type { %struct.tree_common, %struct.tree_node* } + %struct.u = type { [1 x i64] } + %struct.use_operand_ptr = type { %struct.tree_node** } + %struct.use_optype_d = type { i32, [1 x %struct.def_operand_ptr] } + %struct.v_def_use_operand_type_t = type { %struct.tree_node*, %struct.tree_node* } + %struct.v_may_def_optype_d = type { i32, [1 x %struct.elt_t] } + %struct.v_must_def_optype_d = type { i32, [1 x %struct.elt_t] } + %struct.value_set = type opaque + %struct.var_ann_d = type { %struct.tree_ann_common_d, i8, i8, %struct.tree_node*, %struct.varray_head_tag*, i32, i32, i32, %struct.tree_node*, %struct.tree_node* } + %struct.var_refs_queue = type { %struct.rtx_def*, i32, i32, %struct.var_refs_queue* } + %struct.varasm_status = type opaque + %struct.varray_data = type { [1 x i64] } + %struct.varray_head_tag = type { i32, i32, i32, i8*, %struct.u } + %struct.vuse_optype_d = type { i32, [1 x %struct.tree_node*] } + @gt_pch_rs_gt_gimplify_h = external global [2 x %struct.ggc_root_tab] ; <[2 x %struct.ggc_root_tab]*> [#uses=0] + @tmp_var_id_num = external global i32 ; [#uses=0] + @gt_ggc_r_gt_gimplify_h = external global [1 x %struct.ggc_root_tab] ; <[1 x %struct.ggc_root_tab]*> [#uses=0] + @__FUNCTION__.19956 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] + @str = external global [42 x i8] ; <[42 x i8]*> [#uses=1] + @__FUNCTION__.19974 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] + @gimplify_ctxp = external global %struct.gimplify_ctx* ; <%struct.gimplify_ctx**> [#uses=0] + @cl_pf_opts = external global %struct.cl_perfunc_opts ; <%struct.cl_perfunc_opts*> [#uses=0] + @__FUNCTION__.20030 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] + @__FUNCTION__.20099 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] + @global_trees = external global [47 x %struct.tree_node*] ; <[47 x %struct.tree_node*]*> [#uses=0] + @tree_code_type = external global [0 x i32] ; <[0 x i32]*> [#uses=2] + @current_function_decl = external global %struct.tree_node* ; <%struct.tree_node**> [#uses=0] + @str1 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] + @str2 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] + @__FUNCTION__.20151 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] + @__FUNCTION__.20221 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] + @tree_code_length = external global [0 x i8] ; <[0 x i8]*> [#uses=0] + @__FUNCTION__.20435 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] + @__FUNCTION__.20496 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] + @cfun = external global %struct.function* ; <%struct.function**> [#uses=0] + @__FUNCTION__.20194 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] + @__FUNCTION__.19987 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] + @__FUNCTION__.20532 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] + @__FUNCTION__.20583 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] + @__FUNCTION__.20606 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] + @__FUNCTION__.20644 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] + @__FUNCTION__.20681 = external global [13 x i8] ; <[13 x i8]*> [#uses=0] + @__FUNCTION__.20700 = external global [13 x i8] ; <[13 x i8]*> [#uses=0] + @__FUNCTION__.21426 = external global [20 x i8] ; <[20 x i8]*> [#uses=0] + @__FUNCTION__.21471 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] + @__FUNCTION__.21962 = external global [27 x i8] ; <[27 x i8]*> [#uses=0] + @__FUNCTION__.22992 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] + @__FUNCTION__.23735 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] + @lang_hooks = external global %struct.lang_hooks ; <%struct.lang_hooks*> [#uses=0] + @__FUNCTION__.27383 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] + @__FUNCTION__.20776 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] + @__FUNCTION__.10672 = external global [9 x i8] ; <[9 x i8]*> [#uses=0] + @str3 = external global [47 x i8] ; <[47 x i8]*> [#uses=0] + @str4 = external global [7 x i8] ; <[7 x i8]*> [#uses=0] + @__FUNCTION__.20065 = external global [25 x i8] ; <[25 x i8]*> [#uses=0] + @__FUNCTION__.23256 = external global [16 x i8] ; <[16 x i8]*> [#uses=0] + @__FUNCTION__.23393 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] + @__FUNCTION__.20043 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] + @__FUNCTION__.20729 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] + @__FUNCTION__.20563 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] + @__FUNCTION__.10663 = external global [10 x i8] ; <[10 x i8]*> [#uses=0] + @__FUNCTION__.20367 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] + @__FUNCTION__.20342 = external global [15 x i8] ; <[15 x i8]*> [#uses=0] + @input_location = external global %struct.location_t ; <%struct.location_t*> [#uses=0] + @__FUNCTION__.24510 = external global [27 x i8] ; <[27 x i8]*> [#uses=0] + @__FUNCTION__.25097 = external global [25 x i8] ; <[25 x i8]*> [#uses=0] + @__FUNCTION__.24705 = external global [26 x i8] ; <[26 x i8]*> [#uses=0] + @str5 = external global [2 x i8] ; <[2 x i8]*> [#uses=0] + @__FUNCTION__.25136 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] + @__FUNCTION__.24450 = external global [31 x i8] ; <[31 x i8]*> [#uses=0] + @implicit_built_in_decls = external global [471 x %struct.tree_node*] ; <[471 x %struct.tree_node*]*> [#uses=0] + @__FUNCTION__.24398 = external global [31 x i8] ; <[31 x i8]*> [#uses=0] + @__FUNCTION__.26156 = external global [14 x i8] ; <[14 x i8]*> [#uses=1] + @unknown_location = external global %struct.location_t ; <%struct.location_t*> [#uses=0] + @__FUNCTION__.23038 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] + @str6 = external global [43 x i8] ; <[43 x i8]*> [#uses=0] + @__FUNCTION__.25476 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] + @__FUNCTION__.22136 = external global [20 x i8] ; <[20 x i8]*> [#uses=1] + @__FUNCTION__.21997 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] + @__FUNCTION__.21247 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] + @built_in_decls = external global [471 x %struct.tree_node*] ; <[471 x %struct.tree_node*]*> [#uses=0] + @__FUNCTION__.21924 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] + @__FUNCTION__.21861 = external global [25 x i8] ; <[25 x i8]*> [#uses=0] + @global_dc = external global %struct.diagnostic_context* ; <%struct.diagnostic_context**> [#uses=0] + @__FUNCTION__.25246 = external global [32 x i8] ; <[32 x i8]*> [#uses=0] + @str7 = external global [4 x i8] ; <[4 x i8]*> [#uses=0] + @stderr = external global %struct.FILE* ; <%struct.FILE**> [#uses=0] + @str8 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] + @str9 = external global [22 x i8] ; <[22 x i8]*> [#uses=0] + @__FUNCTION__.27653 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] + @__FUNCTION__.27322 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] + @__FUNCTION__.27139 = external global [20 x i8] ; <[20 x i8]*> [#uses=0] + @__FUNCTION__.22462 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] + @str10 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] + @__FUNCTION__.25389 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] + @__FUNCTION__.25650 = external global [18 x i8] ; <[18 x i8]*> [#uses=0] + @str11 = external global [32 x i8] ; <[32 x i8]*> [#uses=0] + @str12 = external global [3 x i8] ; <[3 x i8]*> [#uses=0] + @str13 = external global [44 x i8] ; <[44 x i8]*> [#uses=0] + @__FUNCTION__.27444 = external global [14 x i8] ; <[14 x i8]*> [#uses=0] + @timevar_enable = external global i8 ; [#uses=0] + @__FUNCTION__.27533 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] + @flag_instrument_function_entry_exit = external global i32 ; [#uses=0] + @__FUNCTION__.25331 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] + @__FUNCTION__.20965 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] + @str14 = external global [12 x i8] ; <[12 x i8]*> [#uses=0] + @__FUNCTION__.26053 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] + @__FUNCTION__.26004 = external global [20 x i8] ; <[20 x i8]*> [#uses=0] + @str15 = external global [8 x i8] ; <[8 x i8]*> [#uses=0] + @__FUNCTION__.21584 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] + @str16 = external global [12 x i8] ; <[12 x i8]*> [#uses=0] + @__FUNCTION__.25903 = external global [28 x i8] ; <[28 x i8]*> [#uses=0] + @__FUNCTION__.22930 = external global [23 x i8] ; <[23 x i8]*> [#uses=0] + @__FUNCTION__.23832 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] + @str17 = external global [6 x i8] ; <[6 x i8]*> [#uses=0] + @__FUNCTION__.24620 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] + @__FUNCTION__.24582 = external global [30 x i8] ; <[30 x i8]*> [#uses=0] + @__FUNCTION__.21382 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] + @__FUNCTION__.21117 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] + + implementation ; Functions: + + declare void @push_gimplify_context() + + declare i32 @gimple_tree_hash(i8*) + + declare i32 @iterative_hash_expr(%struct.tree_node*, i32) + + declare i32 @gimple_tree_eq(i8*, i8*) + + declare i32 @operand_equal_p(%struct.tree_node*, %struct.tree_node*, i32) + + declare void @fancy_abort(i8*, i32, i8*) + + declare i8* @xcalloc(i32, i32) + + declare %struct.htab* @htab_create(i32, i32 (i8*)*, i32 (i8*, i8*)*, void (i8*)*) + + declare void @free(i8*) + + declare void @gimple_push_bind_expr(%struct.tree_node*) + + declare void @gimple_pop_bind_expr() + + declare %struct.tree_node* @gimple_current_bind_expr() + + declare fastcc void @gimple_push_condition() + + declare %struct.tree_node* @create_artificial_label() + + declare %struct.tree_node* @build_decl_stat(i32, %struct.tree_node*, %struct.tree_node*) + + declare void @tree_class_check_failed(%struct.tree_node*, i32, i8*, i32, i8*) + + declare %struct.tree_node* @create_tmp_var_name(i8*) + + declare i32 @strlen(i8*) + + declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) + + declare i32 @sprintf(i8*, i8*, ...) + + declare %struct.tree_node* @get_identifier(i8*) + + declare %struct.tree_node* @create_tmp_var_raw(%struct.tree_node*, i8*) + + declare %struct.tree_node* @build_qualified_type(%struct.tree_node*, i32) + + declare i8* @get_name(%struct.tree_node*) + + declare void @tree_operand_check_failed(i32, i32, i8*, i32, i8*) + + declare void @tree_check_failed(%struct.tree_node*, i8*, i32, i8*, ...) + + declare void @declare_tmp_vars(%struct.tree_node*, %struct.tree_node*) + + declare %struct.tree_node* @nreverse(%struct.tree_node*) + + declare void @gimple_add_tmp_var(%struct.tree_node*) + + declare void @record_vars(%struct.tree_node*) + + declare %struct.tree_node* @create_tmp_var(%struct.tree_node*, i8*) + + declare void @pop_gimplify_context(%struct.tree_node*) + + declare void @htab_delete(%struct.htab*) + + declare fastcc void @annotate_one_with_locus(%struct.tree_node*, i32, i32) + + declare void @annotate_with_locus(%struct.tree_node*, i32, i32) + + declare %struct.tree_node* @mostly_copy_tree_r(%struct.tree_node**, i32*, i8*) + + declare %struct.tree_node* @copy_tree_r(%struct.tree_node**, i32*, i8*) + + declare %struct.tree_node* @mark_decls_volatile_r(%struct.tree_node**, i32*, i8*) + + declare %struct.tree_node* @copy_if_shared_r(%struct.tree_node**, i32*, i8*) + + declare %struct.tree_node* @walk_tree(%struct.tree_node**, %struct.tree_node* (%struct.tree_node**, i32*, i8*)*, i8*, %struct.pointer_set_t*) + + declare %struct.tree_node* @unmark_visited_r(%struct.tree_node**, i32*, i8*) + + declare fastcc void @unshare_body(%struct.tree_node**, %struct.tree_node*) + + declare %struct.cgraph_node* @cgraph_node(%struct.tree_node*) + + declare fastcc void @unvisit_body(%struct.tree_node**, %struct.tree_node*) + + declare void @unshare_all_trees(%struct.tree_node*) + + declare %struct.tree_node* @unshare_expr(%struct.tree_node*) + + declare %struct.tree_node* @build_and_jump(%struct.tree_node**) + + declare %struct.tree_node* @build1_stat(i32, %struct.tree_node*, %struct.tree_node*) + + declare i32 @compare_case_labels(i8*, i8*) + + declare i32 @tree_int_cst_compare(%struct.tree_node*, %struct.tree_node*) + + declare void @sort_case_labels(%struct.tree_node*) + + declare void @tree_vec_elt_check_failed(i32, i32, i8*, i32, i8*) + + declare void @qsort(i8*, i32, i32, i32 (i8*, i8*)*) + + declare %struct.tree_node* @force_labels_r(%struct.tree_node**, i32*, i8*) + + declare fastcc void @canonicalize_component_ref(%struct.tree_node**) + + declare %struct.tree_node* @get_unwidened(%struct.tree_node*, %struct.tree_node*) + + declare fastcc void @maybe_with_size_expr(%struct.tree_node**) + + declare %struct.tree_node* @substitute_placeholder_in_expr(%struct.tree_node*, %struct.tree_node*) + + declare %struct.tree_node* @build2_stat(i32, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*) + + declare fastcc %struct.tree_node* @gimple_boolify(%struct.tree_node*) + + declare %struct.tree_node* @convert(%struct.tree_node*, %struct.tree_node*) + + declare %struct.tree_node* @gimplify_init_ctor_preeval_1(%struct.tree_node**, i32*, i8*) + + declare i64 @get_alias_set(%struct.tree_node*) + + declare i32 @alias_sets_conflict_p(i64, i64) + + declare fastcc i8 @cpt_same_type(%struct.tree_node*, %struct.tree_node*) zext + + declare %struct.tree_node* @check_pointer_types_r(%struct.tree_node**, i32*, i8*) + + declare %struct.tree_node* @voidify_wrapper_expr(%struct.tree_node*, %struct.tree_node*) + + declare i32 @integer_zerop(%struct.tree_node*) + + declare fastcc void @append_to_statement_list_1(%struct.tree_node*, %struct.tree_node**) + + declare %struct.tree_node* @alloc_stmt_list() + + declare void @tsi_link_after(%struct.tree_stmt_iterator*, %struct.tree_node*, i32) + + declare void @append_to_statement_list_force(%struct.tree_node*, %struct.tree_node**) + + declare void @append_to_statement_list(%struct.tree_node*, %struct.tree_node**) + + declare fastcc %struct.tree_node* @shortcut_cond_r(%struct.tree_node*, %struct.tree_node**, %struct.tree_node**) + + declare %struct.tree_node* @build3_stat(i32, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*) + + declare fastcc %struct.tree_node* @shortcut_cond_expr(%struct.tree_node*) + + declare %struct.tree_node* @expr_last(%struct.tree_node*) + + declare i8 @block_may_fallthru(%struct.tree_node*) zext + + declare fastcc void @gimple_pop_condition(%struct.tree_node**) + + declare %struct.tree_node* @gimple_build_eh_filter(%struct.tree_node*, %struct.tree_node*, %struct.tree_node*) + + declare void @annotate_all_with_locus(%struct.tree_node**, i32, i32) + + declare fastcc %struct.tree_node* @internal_get_tmp_var(%struct.tree_node*, %struct.tree_node**, %struct.tree_node**, i8 zext ) + + define i32 @gimplify_expr(%struct.tree_node** %expr_p, %struct.tree_node** %pre_p, %struct.tree_node** %post_p, i8 (%struct.tree_node*) zext * %gimple_test_f, i32 %fallback) { + entry: + %internal_post = alloca %struct.tree_node*, align 4 ; <%struct.tree_node**> [#uses=2] + %pre_p_addr.0 = select i1 false, %struct.tree_node** null, %struct.tree_node** %pre_p ; <%struct.tree_node**> [#uses=7] + %post_p_addr.0 = select i1 false, %struct.tree_node** %internal_post, %struct.tree_node** %post_p ; <%struct.tree_node**> [#uses=7] + br i1 false, label %bb277, label %bb191 + + bb191: ; preds = %entry + ret i32 0 + + bb277: ; preds = %entry + %tmp283 = call i32 null( %struct.tree_node** %expr_p, %struct.tree_node** %pre_p_addr.0, %struct.tree_node** %post_p_addr.0 ) ; [#uses=1] + switch i32 %tmp283, label %bb7478 [ + i32 0, label %cond_next289 + i32 -1, label %cond_next298 + ] + + cond_next289: ; preds = %bb277 + ret i32 0 + + cond_next298: ; preds = %bb277 + switch i32 0, label %bb7444 [ + i32 24, label %bb7463 + i32 25, label %bb7463 + i32 26, label %bb7463 + i32 27, label %bb7463 + i32 28, label %bb7463 + i32 33, label %bb4503 + i32 39, label %bb397 + i32 40, label %bb5650 + i32 41, label %bb4339 + i32 42, label %bb4350 + i32 43, label %bb4350 + i32 44, label %bb319 + i32 45, label %bb397 + i32 46, label %bb6124 + i32 47, label %bb7463 + i32 49, label %bb5524 + i32 50, label %bb1283 + i32 51, label %bb1289 + i32 52, label %bb1289 + i32 53, label %bb5969 + i32 54, label %bb408 + i32 56, label %bb5079 + i32 57, label %bb428 + i32 59, label %bb5965 + i32 74, label %bb4275 + i32 75, label %bb4275 + i32 76, label %bb4275 + i32 77, label %bb4275 + i32 91, label %bb1296 + i32 92, label %bb1296 + i32 96, label %bb1322 + i32 112, label %bb2548 + i32 113, label %bb2548 + i32 115, label %bb397 + i32 116, label %bb5645 + i32 117, label %bb1504 + i32 121, label %bb397 + i32 122, label %bb397 + i32 123, label %bb313 + i32 124, label %bb313 + i32 125, label %bb313 + i32 126, label %bb313 + i32 127, label %bb2141 + i32 128, label %cond_next5873 + i32 129, label %cond_next5873 + i32 130, label %bb4536 + i32 131, label %bb5300 + i32 132, label %bb5170 + i32 133, label %bb5519 + i32 134, label %bb5091 + i32 135, label %bb5083 + i32 136, label %bb5087 + i32 137, label %bb5382 + i32 139, label %bb7463 + i32 140, label %bb7463 + i32 142, label %bb5974 + i32 143, label %bb6049 + i32 147, label %bb6296 + i32 151, label %cond_next6474 + ] + + bb313: ; preds = %cond_next298, %cond_next298, %cond_next298, %cond_next298 + ret i32 0 + + bb319: ; preds = %cond_next298 + ret i32 0 + + bb397: ; preds = %cond_next298, %cond_next298, %cond_next298, %cond_next298, %cond_next298 + ret i32 0 + + bb408: ; preds = %cond_next298 + %tmp413 = call fastcc i32 @gimplify_cond_expr( %struct.tree_node** %expr_p, %struct.tree_node** %pre_p_addr.0, %struct.tree_node** %post_p_addr.0, %struct.tree_node* null, i32 %fallback ) ; [#uses=0] + ret i32 0 + + bb428: ; preds = %cond_next298 + ret i32 0 + + bb1283: ; preds = %cond_next298 + ret i32 0 + + bb1289: ; preds = %cond_next298, %cond_next298 + ret i32 0 + + bb1296: ; preds = %cond_next298, %cond_next298 + ret i32 0 + + bb1322: ; preds = %cond_next298 + ret i32 0 + + bb1504: ; preds = %cond_next298 + ret i32 0 + + bb2141: ; preds = %cond_next298 + ret i32 0 + + bb2548: ; preds = %cond_next298, %cond_next298 + %tmp2554 = load %struct.tree_node** %expr_p ; <%struct.tree_node*> [#uses=2] + %tmp2562 = and i32 0, 255 ; [#uses=1] + %tmp2569 = add i8 0, -4 ; [#uses=1] + icmp ugt i8 %tmp2569, 5 ; :0 [#uses=2] + %tmp2587 = load i8* null ; [#uses=1] + icmp eq i8 %tmp2587, 0 ; :1 [#uses=2] + %tmp2607 = load %struct.tree_node** null ; <%struct.tree_node*> [#uses=2] + br i1 false, label %bb2754, label %cond_next2617 + + cond_next2617: ; preds = %bb2548 + ret i32 0 + + bb2754: ; preds = %bb2548 + br i1 %0, label %cond_true2780, label %cond_next2783 + + cond_true2780: ; preds = %bb2754 + call void @tree_class_check_failed( %struct.tree_node* %tmp2554, i32 9, i8* getelementptr ([42 x i8]* @str, i32 0, i32 0), i32 1415, i8* getelementptr ([20 x i8]* @__FUNCTION__.22136, i32 0, i32 0) ) + unreachable + + cond_next2783: ; preds = %bb2754 + %tmp2825 = and i32 0, 255 ; [#uses=1] + %tmp2829 = load i32* null ; [#uses=1] + %tmp28292830 = trunc i32 %tmp2829 to i8 ; [#uses=1] + %tmp2832 = add i8 %tmp28292830, -4 ; [#uses=1] + icmp ugt i8 %tmp2832, 5 ; :2 [#uses=1] + icmp eq i8 0, 0 ; :3 [#uses=1] + %tmp28652866 = bitcast %struct.tree_node* %tmp2607 to %struct.tree_exp* ; <%struct.tree_exp*> [#uses=1] + %tmp2868 = getelementptr %struct.tree_exp* %tmp28652866, i32 0, i32 4, i32 0 ; <%struct.tree_node**> [#uses=1] + %tmp2870 = load %struct.tree_node** %tmp2868 ; <%struct.tree_node*> [#uses=1] + br i1 %1, label %cond_true2915, label %cond_next2927 + + cond_true2915: ; preds = %cond_next2783 + unreachable + + cond_next2927: ; preds = %cond_next2783 + %tmp2938 = load %struct.tree_node** null ; <%struct.tree_node*> [#uses=1] + %tmp2944 = load i32* null ; [#uses=1] + %tmp2946 = and i32 %tmp2944, 255 ; [#uses=1] + %tmp2949 = getelementptr [0 x i32]* @tree_code_type, i32 0, i32 %tmp2946 ; [#uses=1] + %tmp2950 = load i32* %tmp2949 ; [#uses=1] + icmp eq i32 %tmp2950, 2 ; :4 [#uses=1] + br i1 %4, label %cond_next2954, label %cond_true2951 + + cond_true2951: ; preds = %cond_next2927 + call void @tree_class_check_failed( %struct.tree_node* %tmp2938, i32 2, i8* getelementptr ([42 x i8]* @str, i32 0, i32 0), i32 1415, i8* getelementptr ([20 x i8]* @__FUNCTION__.22136, i32 0, i32 0) ) + unreachable + + cond_next2954: ; preds = %cond_next2927 + br i1 %0, label %cond_true2991, label %cond_next2994 + + cond_true2991: ; preds = %cond_next2954 + unreachable + + cond_next2994: ; preds = %cond_next2954 + br i1 %1, label %cond_true3009, label %cond_next3021 + + cond_true3009: ; preds = %cond_next2994 + call void @tree_operand_check_failed( i32 0, i32 %tmp2562, i8* getelementptr ([42 x i8]* @str, i32 0, i32 0), i32 1415, i8* getelementptr ([20 x i8]* @__FUNCTION__.22136, i32 0, i32 0) ) + unreachable + + cond_next3021: ; preds = %cond_next2994 + br i1 %2, label %cond_true3044, label %cond_next3047 + + cond_true3044: ; preds = %cond_next3021 + call void @tree_class_check_failed( %struct.tree_node* %tmp2607, i32 9, i8* getelementptr ([42 x i8]* @str, i32 0, i32 0), i32 1415, i8* getelementptr ([20 x i8]* @__FUNCTION__.22136, i32 0, i32 0) ) + unreachable + + cond_next3047: ; preds = %cond_next3021 + br i1 %3, label %cond_true3062, label %cond_next3074 + + cond_true3062: ; preds = %cond_next3047 + call void @tree_operand_check_failed( i32 0, i32 %tmp2825, i8* getelementptr ([42 x i8]* @str, i32 0, i32 0), i32 1415, i8* getelementptr ([20 x i8]* @__FUNCTION__.22136, i32 0, i32 0) ) + unreachable + + cond_next3074: ; preds = %cond_next3047 + %tmp3084 = getelementptr %struct.tree_node* %tmp2870, i32 0, i32 0, i32 0, i32 1 ; <%struct.tree_node**> [#uses=1] + %tmp3085 = load %struct.tree_node** %tmp3084 ; <%struct.tree_node*> [#uses=1] + %tmp31043105 = bitcast %struct.tree_node* %tmp3085 to %struct.tree_type* ; <%struct.tree_type*> [#uses=1] + %tmp3106 = getelementptr %struct.tree_type* %tmp31043105, i32 0, i32 6 ; [#uses=1] + %tmp31063107 = bitcast i16* %tmp3106 to i32* ; [#uses=1] + %tmp3108 = load i32* %tmp31063107 ; [#uses=1] + xor i32 %tmp3108, 0 ; :5 [#uses=1] + %tmp81008368 = and i32 %5, 65024 ; [#uses=1] + icmp eq i32 %tmp81008368, 0 ; :6 [#uses=1] + br i1 %6, label %cond_next3113, label %bb3351 + + cond_next3113: ; preds = %cond_next3074 + ret i32 0 + + bb3351: ; preds = %cond_next3074 + %tmp3354 = call i8 @tree_ssa_useless_type_conversion( %struct.tree_node* %tmp2554 ) zext ; [#uses=1] + icmp eq i8 %tmp3354, 0 ; :7 [#uses=1] + %tmp3424 = load i32* null ; [#uses=1] + br i1 %7, label %cond_next3417, label %cond_true3356 + + cond_true3356: ; preds = %bb3351 + ret i32 0 + + cond_next3417: ; preds = %bb3351 + br i1 false, label %cond_true3429, label %cond_next4266 + + cond_true3429: ; preds = %cond_next3417 + %tmp3443 = and i32 %tmp3424, 255 ; [#uses=0] + ret i32 0 + + cond_next4266: ; preds = %cond_next3417 + %tmp4268 = load %struct.tree_node** %expr_p ; <%struct.tree_node*> [#uses=1] + icmp eq %struct.tree_node* %tmp4268, null ; :8 [#uses=1] + br i1 %8, label %bb4275, label %bb7463 + + bb4275: ; preds = %cond_next4266, %cond_next298, %cond_next298, %cond_next298, %cond_next298 + %tmp4289 = and i32 0, 255 ; [#uses=2] + %tmp4292 = getelementptr [0 x i32]* @tree_code_type, i32 0, i32 %tmp4289 ; [#uses=1] + %tmp4293 = load i32* %tmp4292 ; [#uses=1] + %tmp42934294 = trunc i32 %tmp4293 to i8 ; [#uses=1] + %tmp4296 = add i8 %tmp42934294, -4 ; [#uses=1] + icmp ugt i8 %tmp4296, 5 ; :9 [#uses=1] + br i1 %9, label %cond_true4297, label %cond_next4300 + + cond_true4297: ; preds = %bb4275 + unreachable + + cond_next4300: ; preds = %bb4275 + %tmp4314 = load i8* null ; [#uses=1] + icmp eq i8 %tmp4314, 0 ; :10 [#uses=1] + br i1 %10, label %cond_true4315, label %cond_next4327 + + cond_true4315: ; preds = %cond_next4300 + call void @tree_operand_check_failed( i32 0, i32 %tmp4289, i8* getelementptr ([42 x i8]* @str, i32 0, i32 0), i32 3997, i8* getelementptr ([14 x i8]* @__FUNCTION__.26156, i32 0, i32 0) ) + unreachable + + cond_next4327: ; preds = %cond_next4300 + %tmp4336 = call i32 @gimplify_expr( %struct.tree_node** null, %struct.tree_node** %pre_p_addr.0, %struct.tree_node** %post_p_addr.0, i8 (%struct.tree_node*) zext * @is_gimple_val, i32 1 ) ; [#uses=0] + ret i32 0 + + bb4339: ; preds = %cond_next298 + ret i32 0 + + bb4350: ; preds = %cond_next298, %cond_next298 + ret i32 0 + + bb4503: ; preds = %cond_next298 + ret i32 0 + + bb4536: ; preds = %cond_next298 + ret i32 0 + + bb5079: ; preds = %cond_next298 + ret i32 0 + + bb5083: ; preds = %cond_next298 + ret i32 0 + + bb5087: ; preds = %cond_next298 + ret i32 0 + + bb5091: ; preds = %cond_next298 + ret i32 0 + + bb5170: ; preds = %cond_next298 + ret i32 0 + + bb5300: ; preds = %cond_next298 + ret i32 0 + + bb5382: ; preds = %cond_next298 + ret i32 0 + + bb5519: ; preds = %cond_next298 + ret i32 0 + + bb5524: ; preds = %cond_next298 + ret i32 0 + + bb5645: ; preds = %cond_next298 + ret i32 0 + + bb5650: ; preds = %cond_next298 + ret i32 0 + + cond_next5873: ; preds = %cond_next298, %cond_next298 + ret i32 0 + + bb5965: ; preds = %cond_next298 + %tmp5968 = call fastcc i32 @gimplify_cleanup_point_expr( %struct.tree_node** %expr_p, %struct.tree_node** %pre_p_addr.0 ) ; [#uses=0] + ret i32 0 + + bb5969: ; preds = %cond_next298 + %tmp5973 = call fastcc i32 @gimplify_target_expr( %struct.tree_node** %expr_p, %struct.tree_node** %pre_p_addr.0, %struct.tree_node** %post_p_addr.0 ) ; [#uses=0] + ret i32 0 + + bb5974: ; preds = %cond_next298 + ret i32 0 + + bb6049: ; preds = %cond_next298 + ret i32 0 + + bb6124: ; preds = %cond_next298 + ret i32 0 + + bb6296: ; preds = %cond_next298 + ret i32 0 + + cond_next6474: ; preds = %cond_next298 + icmp eq %struct.tree_node** %internal_post, %post_p_addr.0 ; :11 [#uses=1] + %iftmp.381.0 = select i1 %11, %struct.tree_node** null, %struct.tree_node** %post_p_addr.0 ; <%struct.tree_node**> [#uses=1] + %tmp6490 = call i32 @gimplify_expr( %struct.tree_node** null, %struct.tree_node** %pre_p_addr.0, %struct.tree_node** %iftmp.381.0, i8 (%struct.tree_node*) zext * %gimple_test_f, i32 %fallback ) ; [#uses=0] + %tmp6551 = call i32 @gimplify_expr( %struct.tree_node** null, %struct.tree_node** %pre_p_addr.0, %struct.tree_node** %post_p_addr.0, i8 (%struct.tree_node*) zext * @is_gimple_val, i32 1 ) ; [#uses=0] + ret i32 0 + + bb7444: ; preds = %cond_next298 + ret i32 0 + + bb7463: ; preds = %cond_next4266, %cond_next298, %cond_next298, %cond_next298, %cond_next298, %cond_next298, %cond_next298, %cond_next298, %cond_next298 + ret i32 0 + + bb7478: ; preds = %bb277 + ret i32 0 + } + + declare i8 @is_gimple_formal_tmp_rhs(%struct.tree_node*) zext + + declare void @gimplify_and_add(%struct.tree_node*, %struct.tree_node**) + + declare %struct.tree_node* @get_initialized_tmp_var(%struct.tree_node*, %struct.tree_node**, %struct.tree_node**) + + declare %struct.tree_node* @get_formal_tmp_var(%struct.tree_node*, %struct.tree_node**) + + declare fastcc void @gimplify_init_ctor_preeval(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, %struct.gimplify_init_ctor_preeval_data*) + + declare i8 @type_contains_placeholder_p(%struct.tree_node*) zext + + declare i8 @is_gimple_mem_rhs(%struct.tree_node*) zext + + declare fastcc i32 @gimplify_modify_expr_rhs(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, %struct.tree_node**, %struct.tree_node**, i8 zext ) + + declare %struct.tree_node* @fold_indirect_ref(%struct.tree_node*) + + declare fastcc i32 @gimplify_compound_expr(%struct.tree_node**, %struct.tree_node**, i8 zext ) + + declare i8 @is_gimple_lvalue(%struct.tree_node*) zext + + declare void @categorize_ctor_elements(%struct.tree_node*, i64*, i64*, i64*, i8*) + + declare void @lhd_set_decl_assembler_name(%struct.tree_node*) + + declare i64 @int_size_in_bytes(%struct.tree_node*) + + declare i32 @can_move_by_pieces(i64, i32) + + declare i64 @count_type_elements(%struct.tree_node*) + + declare void @gimplify_stmt(%struct.tree_node**) + + declare %struct.tree_node* @get_base_address(%struct.tree_node*) + + declare fastcc void @gimplify_init_ctor_eval(%struct.tree_node*, %struct.tree_node*, %struct.tree_node**, i8 zext ) + + declare %struct.tree_node* @build_complex(%struct.tree_node*, %struct.tree_node*, %struct.tree_node*) + + declare i8 (%struct.tree_node*) zext * @rhs_predicate_for(%struct.tree_node*) + + declare %struct.tree_node* @build_vector(%struct.tree_node*, %struct.tree_node*) + + declare i8 @is_gimple_val(%struct.tree_node*) zext + + declare i8 @is_gimple_reg_type(%struct.tree_node*) zext + + declare fastcc i32 @gimplify_cond_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, %struct.tree_node*, i32) + + declare fastcc i32 @gimplify_modify_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, i8 zext ) + + declare %struct.tree_node* @tree_cons_stat(%struct.tree_node*, %struct.tree_node*, %struct.tree_node*) + + declare %struct.tree_node* @build_fold_addr_expr(%struct.tree_node*) + + declare %struct.tree_node* @build_function_call_expr(%struct.tree_node*, %struct.tree_node*) + + declare i8 @is_gimple_addressable(%struct.tree_node*) zext + + declare i8 @is_gimple_reg(%struct.tree_node*) zext + + declare %struct.tree_node* @make_ssa_name(%struct.tree_node*, %struct.tree_node*) + + declare i8 @tree_ssa_useless_type_conversion(%struct.tree_node*) zext + + declare fastcc i32 @gimplify_self_mod_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, i8 zext ) + + declare fastcc i32 @gimplify_compound_lval(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**, i32) + + declare %struct.tree_node* @get_callee_fndecl(%struct.tree_node*) + + declare %struct.tree_node* @fold_builtin(%struct.tree_node*, i8 zext ) + + declare void @error(i8*, ...) + + declare %struct.tree_node* @build_empty_stmt() + + declare i8 @fold_builtin_next_arg(%struct.tree_node*) zext + + declare fastcc i32 @gimplify_arg(%struct.tree_node**, %struct.tree_node**) + + declare i8 @is_gimple_call_addr(%struct.tree_node*) zext + + declare i32 @call_expr_flags(%struct.tree_node*) + + declare void @recalculate_side_effects(%struct.tree_node*) + + declare %struct.tree_node* @fold_convert(%struct.tree_node*, %struct.tree_node*) + + declare void @recompute_tree_invarant_for_addr_expr(%struct.tree_node*) + + declare i32 @gimplify_va_arg_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**) + + declare %struct.tree_node* @size_int_kind(i64, i32) + + declare %struct.tree_node* @size_binop(i32, %struct.tree_node*, %struct.tree_node*) + + declare %struct.tree_node* @build4_stat(i32, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*) + + declare void @gimplify_type_sizes(%struct.tree_node*, %struct.tree_node**) + + declare void @gimplify_one_sizepos(%struct.tree_node**, %struct.tree_node**) + + declare %struct.tree_node* @build_pointer_type(%struct.tree_node*) + + declare %struct.tree_node* @build_fold_indirect_ref(%struct.tree_node*) + + declare fastcc i32 @gimplify_bind_expr(%struct.tree_node**, %struct.tree_node*, %struct.tree_node**) + + declare fastcc void @gimplify_loop_expr(%struct.tree_node**, %struct.tree_node**) + + declare fastcc i32 @gimplify_switch_expr(%struct.tree_node**, %struct.tree_node**) + + declare %struct.tree_node* @decl_function_context(%struct.tree_node*) + + declare %struct.varray_head_tag* @varray_grow(%struct.varray_head_tag*, i32) + + declare fastcc void @gimplify_return_expr(%struct.tree_node*, %struct.tree_node**) + + declare fastcc i32 @gimplify_save_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**) + + declare fastcc i32 @gimplify_asm_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**) + + declare void @gimplify_to_stmt_list(%struct.tree_node**) + + declare fastcc i32 @gimplify_cleanup_point_expr(%struct.tree_node**, %struct.tree_node**) + + declare fastcc i32 @gimplify_target_expr(%struct.tree_node**, %struct.tree_node**, %struct.tree_node**) + + declare void @tsi_delink(%struct.tree_stmt_iterator*) + + declare void @tsi_link_before(%struct.tree_stmt_iterator*, %struct.tree_node*, i32) + + declare i8 @is_gimple_stmt(%struct.tree_node*) zext + + declare void @print_generic_expr(%struct.FILE*, %struct.tree_node*, i32) + + declare void @debug_tree(%struct.tree_node*) + + declare void @internal_error(i8*, ...) + + declare %struct.tree_node* @force_gimple_operand(%struct.tree_node*, %struct.tree_node**, i8 zext , %struct.tree_node*) + + declare i8 @is_gimple_reg_rhs(%struct.tree_node*) zext + + declare void @add_referenced_tmp_var(%struct.tree_node*) + + declare i8 @contains_placeholder_p(%struct.tree_node*) zext + + declare %struct.varray_head_tag* @varray_init(i32, i32, i8*) + + declare i32 @handled_component_p(%struct.tree_node*) + + declare void @varray_check_failed(%struct.varray_head_tag*, i32, i8*, i32, i8*) + + declare %struct.tree_node* @array_ref_low_bound(%struct.tree_node*) + + declare i8 @is_gimple_min_invariant(%struct.tree_node*) zext + + declare i8 @is_gimple_formal_tmp_reg(%struct.tree_node*) zext + + declare %struct.tree_node* @array_ref_element_size(%struct.tree_node*) + + declare %struct.tree_node* @component_ref_field_offset(%struct.tree_node*) + + declare i8 @is_gimple_min_lval(%struct.tree_node*) zext + + declare void @varray_underflow(%struct.varray_head_tag*, i8*, i32, i8*) + + declare i32 @list_length(%struct.tree_node*) + + declare i8 @parse_output_constraint(i8**, i32, i32, i32, i8*, i8*, i8*) zext + + declare i8* @xstrdup(i8*) + + declare %struct.tree_node* @build_string(i32, i8*) + + declare i8* @strchr(i8*, i32) + + declare %struct.tree_node* @build_tree_list_stat(%struct.tree_node*, %struct.tree_node*) + + declare %struct.tree_node* @chainon(%struct.tree_node*, %struct.tree_node*) + + declare i8 @parse_input_constraint(i8**, i32, i32, i32, i32, i8**, i8*, i8*) zext + + declare i8 @is_gimple_asm_val(%struct.tree_node*) zext + + declare void @gimplify_body(%struct.tree_node**, %struct.tree_node*, i8 zext ) + + declare void @timevar_push_1(i32) + + declare %struct.tree_node* @gimplify_parameters() + + declare %struct.tree_node* @expr_only(%struct.tree_node*) + + declare void @timevar_pop_1(i32) + + declare void @gimplify_function_tree(%struct.tree_node*) + + declare void @allocate_struct_function(%struct.tree_node*) + + declare %struct.tree_node* @make_tree_vec_stat(i32) + + declare %struct.tree_node* @tsi_split_statement_list_after(%struct.tree_stmt_iterator*) + + declare i8 @is_gimple_condexpr(%struct.tree_node*) zext + + declare %struct.tree_node* @invert_truthvalue(%struct.tree_node*) + + declare i8 @initializer_zerop(%struct.tree_node*) zext + + declare i32 @simple_cst_equal(%struct.tree_node*, %struct.tree_node*) + + declare i32 @aggregate_value_p(%struct.tree_node*, %struct.tree_node*) + + declare i32 @fwrite(i8*, i32, i32, %struct.FILE*) From dpatel at apple.com Mon Mar 26 18:17:36 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 26 Mar 2007 18:17:36 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Dominators.cpp Message-ID: <200703262317.l2QNHaiV027379@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Dominators.cpp updated: 1.80 -> 1.81 --- Log message: Use std::vector instead of std::vector to reduce malloc/free traffic. --- Diffs of the changes: (+4 -7) Dominators.cpp | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) Index: llvm/lib/VMCore/Dominators.cpp diff -u llvm/lib/VMCore/Dominators.cpp:1.80 llvm/lib/VMCore/Dominators.cpp:1.81 --- llvm/lib/VMCore/Dominators.cpp:1.80 Tue Mar 20 16:25:31 2007 +++ llvm/lib/VMCore/Dominators.cpp Mon Mar 26 18:17:19 2007 @@ -455,13 +455,12 @@ BasicBlock *BB = Node->getBlock(); DomSetType *Result = NULL; - std::vector workList; + std::vector workList; std::set visited; - DFCalculateWorkObject *W = new DFCalculateWorkObject(BB, NULL, Node, NULL); - workList.push_back(W); + workList.push_back(DFCalculateWorkObject(BB, NULL, Node, NULL)); do { - DFCalculateWorkObject *currentW = workList.back(); + DFCalculateWorkObject *currentW = &workList.back(); assert (currentW && "Missing work object."); BasicBlock *currentBB = currentW->currentBB; @@ -494,9 +493,7 @@ DominatorTree::Node *IDominee = *NI; BasicBlock *childBB = IDominee->getBlock(); if (visited.count(childBB) == 0) { - DFCalculateWorkObject *newW = - new DFCalculateWorkObject(childBB, currentBB, IDominee, currentNode); - workList.push_back(newW); + workList.push_back(DFCalculateWorkObject(childBB, currentBB, IDominee, currentNode)); visitChild = true; } } From dpatel at apple.com Mon Mar 26 18:18:45 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 26 Mar 2007 18:18:45 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Dominators.cpp Message-ID: <200703262318.l2QNIjRw027416@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Dominators.cpp updated: 1.81 -> 1.82 --- Log message: It is not possible to determie dominance between two PHI nodes based on their ordering. --- Diffs of the changes: (+6 -0) Dominators.cpp | 6 ++++++ 1 files changed, 6 insertions(+) Index: llvm/lib/VMCore/Dominators.cpp diff -u llvm/lib/VMCore/Dominators.cpp:1.81 llvm/lib/VMCore/Dominators.cpp:1.82 --- llvm/lib/VMCore/Dominators.cpp:1.81 Mon Mar 26 18:17:19 2007 +++ llvm/lib/VMCore/Dominators.cpp Mon Mar 26 18:18:28 2007 @@ -19,6 +19,7 @@ #include "llvm/Assembly/Writer.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/SetOperations.h" +#include "llvm/Instructions.h" #include using namespace llvm; @@ -265,6 +266,11 @@ BasicBlock *BBA = A->getParent(), *BBB = B->getParent(); if (BBA != BBB) return dominates(BBA, BBB); + // It is not possible to determie dominance between two PHI nodes + // based on their ordering. + if (isa(A) && isa(B)) + return false; + // Loop through the basic block until we find A or B. BasicBlock::iterator I = BBA->begin(); for (; &*I != A && &*I != B; ++I) /*empty*/; From dpatel at apple.com Mon Mar 26 18:19:46 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 26 Mar 2007 18:19:46 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Message-ID: <200703262319.l2QNJkU6027447@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: PromoteMemoryToRegister.cpp updated: 1.95 -> 1.96 --- Log message: Reduce malloc/free traffic. --- Diffs of the changes: (+8 -12) PromoteMemoryToRegister.cpp | 20 ++++++++------------ 1 files changed, 8 insertions(+), 12 deletions(-) Index: llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp diff -u llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:1.95 llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:1.96 --- llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:1.95 Fri Mar 9 17:41:03 2007 +++ llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Mon Mar 26 18:19:29 2007 @@ -77,7 +77,7 @@ class VISIBILITY_HIDDEN RenamePassData { public: RenamePassData(BasicBlock *B, BasicBlock *P, - std::vector V) : BB(B), Pred(P), Values(V) {} + const std::vector &V) : BB(B), Pred(P), Values(V) {} BasicBlock *BB; BasicBlock *Pred; std::vector Values; @@ -123,7 +123,7 @@ DenseMap BBNumbers; /// RenamePassWorkList - Worklist used by RenamePass() - std::vector RenamePassWorkList; + std::vector RenamePassWorkList; public: PromoteMem2Reg(const std::vector &A, @@ -407,13 +407,12 @@ // and inserting the phi nodes we marked as necessary // RenamePassWorkList.clear(); - RenamePassData *RPD = new RenamePassData(F.begin(), 0, Values); - RenamePassWorkList.push_back(RPD); + RenamePassWorkList.push_back(RenamePassData(F.begin(), 0, Values)); while(!RenamePassWorkList.empty()) { - RenamePassData *RPD = RenamePassWorkList.back(); RenamePassWorkList.pop_back(); + RenamePassData RPD = RenamePassWorkList.back(); + RenamePassWorkList.pop_back(); // RenamePass may add new worklist entries. - RenamePass(RPD->BB, RPD->Pred, RPD->Values); - delete RPD; + RenamePass(RPD.BB, RPD.Pred, RPD.Values); } // The renamer uses the Visited set to avoid infinite loops. Clear it now. @@ -794,11 +793,8 @@ // Recurse to our successors. TerminatorInst *TI = BB->getTerminator(); - for (unsigned i = 0; i != TI->getNumSuccessors(); i++) { - RenamePassData *RPD = new RenamePassData(TI->getSuccessor(i), BB, - IncomingVals); - RenamePassWorkList.push_back(RPD); - } + for (unsigned i = 0; i != TI->getNumSuccessors(); i++) + RenamePassWorkList.push_back(RenamePassData(TI->getSuccessor(i), BB, IncomingVals)); } /// PromoteMemToReg - Promote the specified list of alloca instructions into From reid at x10sys.com Mon Mar 26 18:46:08 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 26 Mar 2007 18:46:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703262346.l2QNk8Ca027986@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.695 -> 1.696 --- Log message: For PR1271: http://llvm.org/PR1271 : Fix another incorrectly converted shift mask. --- Diffs of the changes: (+1 -1) InstructionCombining.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.695 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.696 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.695 Mon Mar 26 15:40:50 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Mar 26 18:45:51 2007 @@ -5887,7 +5887,7 @@ BinaryOperator::createShl(X, ConstantInt::get(Ty, ShiftDiff)); InsertNewInstBefore(Shift, I); - APInt Mask(APInt::getHighBitsSet(TypeBits, TypeBits - ShiftAmt2)); + APInt Mask(APInt::getLowBitsSet(TypeBits, TypeBits - ShiftAmt2)); return BinaryOperator::createAnd(Shift, ConstantInt::get(Mask)); } From reid at x10sys.com Mon Mar 26 18:49:10 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 26 Mar 2007 18:49:10 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/2007-03-26-BadShiftMask.ll Message-ID: <200703262349.l2QNnAS7028154@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/InstCombine: 2007-03-26-BadShiftMask.ll added (r1.1) --- Log message: Another test case for PR1271: http://llvm.org/PR1271 where bad shift masks were generated. --- Diffs of the changes: (+35 -0) 2007-03-26-BadShiftMask.ll | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+) Index: llvm/test/Transforms/InstCombine/2007-03-26-BadShiftMask.ll diff -c /dev/null llvm/test/Transforms/InstCombine/2007-03-26-BadShiftMask.ll:1.1 *** /dev/null Mon Mar 26 18:49:03 2007 --- llvm/test/Transforms/InstCombine/2007-03-26-BadShiftMask.ll Mon Mar 26 18:48:52 2007 *************** *** 0 **** --- 1,35 ---- + ; PR1271 + ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \ + ; RUN: grep 'ashr i32 %.mp137, 2' + 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" + target triple = "i686-pc-linux-gnu" + + implementation ; Functions: + + define i1 @test(i32* %tmp141, i32* %tmp145, + i32 %b8, i32 %iftmp.430.0, i32* %tmp134.out, i32* %tmp137.out) + { + newFuncRoot: + %tmp133 = and i32 %b8, 1 ; [#uses=1] + %tmp134 = shl i32 %tmp133, 3 ; [#uses=3] + %tmp136 = ashr i32 %b8, 1 ; [#uses=1] + %tmp137 = shl i32 %tmp136, 3 ; [#uses=3] + %tmp139 = ashr i32 %tmp134, 2 ; [#uses=1] + store i32 %tmp139, i32* %tmp141 + %tmp143 = ashr i32 %tmp137, 2 ; [#uses=1] + store i32 %tmp143, i32* %tmp145 + icmp eq i32 %iftmp.430.0, 0 ; :0 [#uses=1] + zext i1 %0 to i8 ; :1 [#uses=1] + icmp ne i8 %1, 0 ; :2 [#uses=1] + br i1 %2, label %cond_true147.exitStub, label %cond_false252.exitStub + + cond_true147.exitStub: ; preds = %newFuncRoot + store i32 %tmp134, i32* %tmp134.out + store i32 %tmp137, i32* %tmp137.out + ret i1 true + + cond_false252.exitStub: ; preds = %newFuncRoot + store i32 %tmp134, i32* %tmp134.out + store i32 %tmp137, i32* %tmp137.out + ret i1 false + } From reid at x10sys.com Mon Mar 26 18:58:43 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 26 Mar 2007 18:58:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703262358.l2QNwhGW028373@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.696 -> 1.697 --- Log message: Implement some minor review feedback. --- Diffs of the changes: (+3 -3) InstructionCombining.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.696 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.697 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.696 Mon Mar 26 18:45:51 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Mar 26 18:58:26 2007 @@ -2455,7 +2455,7 @@ // Check to see if this is an unsigned division with an exact power of 2, // if so, convert to a right shift. if (ConstantInt *C = dyn_cast(Op1)) { - if (!C->isZero() && C->getValue().isPowerOf2()) // Don't break X / 0 + if (C->getValue().isPowerOf2()) // 0 not included in isPowerOf2 return BinaryOperator::createLShr(Op0, ConstantInt::get(Op0->getType(), C->getValue().logBase2())); } @@ -3149,7 +3149,7 @@ // If the AndRHS is a power of two minus one (0+1+), and N&Mask == 0 if ((Mask->getValue().countLeadingZeros() + Mask->getValue().countPopulation()) == Mask->getValue().getBitWidth() - && And(N, Mask)->isNullValue()) + && And(N, Mask)->isZero()) break; return 0; } @@ -3180,7 +3180,7 @@ APInt KnownZero(BitWidth, 0), KnownOne(BitWidth, 0); if (SimplifyDemandedBits(&I, APInt::getAllOnesValue(BitWidth), KnownZero, KnownOne)) - return &I; + return &I; } else { if (ConstantVector *CP = dyn_cast(Op1)) { if (CP->isAllOnesValue()) From dpatel at apple.com Mon Mar 26 19:16:28 2007 From: dpatel at apple.com (Devang Patel) Date: Mon, 26 Mar 2007 19:16:28 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Dominators.cpp Message-ID: <200703270016.l2R0GSAb028843@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Dominators.cpp updated: 1.82 -> 1.83 --- Log message: Spell check. --- Diffs of the changes: (+1 -1) Dominators.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/VMCore/Dominators.cpp diff -u llvm/lib/VMCore/Dominators.cpp:1.82 llvm/lib/VMCore/Dominators.cpp:1.83 --- llvm/lib/VMCore/Dominators.cpp:1.82 Mon Mar 26 18:18:28 2007 +++ llvm/lib/VMCore/Dominators.cpp Mon Mar 26 19:16:08 2007 @@ -266,7 +266,7 @@ BasicBlock *BBA = A->getParent(), *BBB = B->getParent(); if (BBA != BBB) return dominates(BBA, BBB); - // It is not possible to determie dominance between two PHI nodes + // It is not possible to determine dominance between two PHI nodes // based on their ordering. if (isa(A) && isa(B)) return false; From evan.cheng at apple.com Mon Mar 26 19:48:46 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 26 Mar 2007 19:48:46 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/VirtRegMap.cpp Message-ID: <200703270048.l2R0mkk5029670@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: VirtRegMap.cpp updated: 1.106 -> 1.107 --- Log message: Don't call getOperandConstraint() if operand index is greater than TID->numOperands. --- Diffs of the changes: (+2 -1) VirtRegMap.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/VirtRegMap.cpp diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.106 llvm/lib/CodeGen/VirtRegMap.cpp:1.107 --- llvm/lib/CodeGen/VirtRegMap.cpp:1.106 Mon Mar 26 17:40:42 2007 +++ llvm/lib/CodeGen/VirtRegMap.cpp Mon Mar 26 19:48:28 2007 @@ -965,7 +965,8 @@ if (WasKill) { const TargetInstrDescriptor *NTID = NextMII->getInstrDescriptor(); - if (NTID->getOperandConstraint(UIdx, TOI::TIED_TO) == -1) + if (UIdx >= NTID->numOperands || + NTID->getOperandConstraint(UIdx, TOI::TIED_TO) == -1) MOU.setIsKill(); } Spills.addLastUse(InReg, &(*NextMII)); From evan.cheng at apple.com Mon Mar 26 19:53:53 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 26 Mar 2007 19:53:53 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200703270053.l2R0rrWn029771@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.394 -> 1.395 --- Log message: SDISel does not preserve all, it changes CFG and other info. --- Diffs of the changes: (+0 -1) SelectionDAGISel.cpp | 1 - 1 files changed, 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.394 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.395 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.394 Sun Mar 25 10:07:15 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Mar 26 19:53:36 2007 @@ -3776,7 +3776,6 @@ // updates dom and loop info. AU.addRequired(); AU.addRequired(); - AU.setPreservesAll(); } From reid at x10sys.com Mon Mar 26 21:49:48 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 26 Mar 2007 21:49:48 -0500 Subject: [llvm-commits] CVS: llvm/docs/Passes.html Message-ID: <200703270249.l2R2nmRv032021@zion.cs.uiuc.edu> Changes in directory llvm/docs: Passes.html updated: 1.1 -> 1.2 --- Log message: For PR601: http://llvm.org/PR601 : Add a little flesh to the document skeleton. --- Diffs of the changes: (+49 -7) Passes.html | 56 +++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 49 insertions(+), 7 deletions(-) Index: llvm/docs/Passes.html diff -u llvm/docs/Passes.html:1.1 llvm/docs/Passes.html:1.2 --- llvm/docs/Passes.html:1.1 Mon Mar 26 04:32:31 2007 +++ llvm/docs/Passes.html Mon Mar 26 21:49:31 2007 @@ -477,7 +477,10 @@ Aggressive Dead Code Elimination
-

Yet to be written.

+

ADCE aggressively tries to eliminate code. This pass is similar to + DCE but it assumes that values are dead until proven + otherwise. This is similar to SCCP, except applied to + the liveness of values.

@@ -493,7 +496,21 @@ Profile Guided Basic Block Placement
-

Yet to be written.

+

This pass implements a very simple profile guided basic block placement + algorithm. The idea is to put frequently executed blocks together at the + start of the function, and hopefully increase the number of fall-through + conditional branches. If there is no profile information for a particular + function, this pass basically orders blocks in depth-first order.

+

The algorithm implemented here is basically "Algo1" from "Profile Guided + Code Positioning" by Pettis and Hansen, except that it uses basic block + counts instead of edge counts. This could be improved in many ways, but is + very simple for now.

+

Basically we "place" the entry block, then loop over all successors in a + DFO, placing the most frequently executed successor until we run out of + blocks. Did we mention that this was extremely simplistic? This is + also much slower than it could be. When it becomes important, this pass + will be rewritten to use a better algorithm, and then we can worry about + efficiency.

@@ -509,7 +526,23 @@ Correlated Expression Elimination
-

Yet to be written.

+

Correlated Expression Elimination propagates information from conditional + branches to blocks dominated by destinations of the branch. It propagates + information from the condition check itself into the body of the branch, + allowing transformations like these for example: +

+    if (i == 7)
+      ... 4*i;  // constant propagation
+
+    M = i+1; N = j+1;
+    if (i == j)
+      X = M-N;  // = M-M == 0;
+   

+ +

This is called Correlated Expression Elimination because we eliminate or + simplify expressions that are correlated with the direction of a branch. In + this way we use static information to give us some information about the + dynamic value of a variable.

@@ -517,7 +550,8 @@ Conditional Propagation
-

Yet to be written.

+

This pass propagates information about conditional expressions through the + program, allowing it to eliminate conditional branches in some cases.

@@ -530,10 +564,18 @@
-

Yet to be written.

+

This file implements constant propagation and merging. It looks for + instructions involving only constant operands and replaces them with a + constant value instead of an instruction. For example: +

add i32 1, 2

+ becomes +
i32 3

+

NOTE: this pass has a habit of making definitions be dead. It is a good + idea to to run a DIE (Dead Instruction Elimination) pass + sometime after running this pass.

@@ -977,7 +1019,7 @@ Reid Spencer
LLVM Compiler Infrastructure
- Last modified: $Date: 2007/03/26 09:32:31 $ + Last modified: $Date: 2007/03/27 02:49:31 $ From reid at x10sys.com Tue Mar 27 01:06:32 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 01:06:32 -0500 Subject: [llvm-commits] CVS: llvm/docs/Makefile Message-ID: <200703270606.l2R66Wda005804@zion.cs.uiuc.edu> Changes in directory llvm/docs: Makefile updated: 1.13 -> 1.14 --- Log message: For PR1276: http://llvm.org/PR1276 : Allow doxygen documentation to be rebuilt manually with "make regendoc" separately from "make install". Patch by Scott Michel. --- Diffs of the changes: (+4 -2) Makefile | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/docs/Makefile diff -u llvm/docs/Makefile:1.13 llvm/docs/Makefile:1.14 --- llvm/docs/Makefile:1.13 Sat Mar 3 18:45:50 2007 +++ llvm/docs/Makefile Tue Mar 27 01:06:15 2007 @@ -67,14 +67,16 @@ $(FIND) . -type f -exec \ $(DataInstall) {} $(PROJ_docsdir)/html/doxygen \; -doxygen: $(PROJ_OBJ_DIR)/doxygen.tar.gz +doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz -$(PROJ_OBJ_DIR)/doxygen.tar.gz: $(DOXYFILES) $(PROJ_OBJ_DIR)/doxygen.cfg +regendoc: $(Echo) Building doxygen documentation $(Verb) if test -e $(PROJ_OBJ_DIR)/doxygen ; then \ $(RM) -rf $(PROJ_OBJ_DIR)/doxygen ; \ fi $(Verb) $(DOXYGEN) $(PROJ_OBJ_DIR)/doxygen.cfg + +$(PROJ_OBJ_DIR)/doxygen.tar.gz: $(DOXYFILES) $(PROJ_OBJ_DIR)/doxygen.cfg $(Echo) Packaging doxygen documentation $(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/doxygen.tar $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/doxygen.tar doxygen From asl at math.spbu.ru Tue Mar 27 06:29:29 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 27 Mar 2007 06:29:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200703271129.l2RBTToP012207@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.395 -> 1.396 --- Log message: Split big monster into small helpers. No functionality change. --- Diffs of the changes: (+285 -190) SelectionDAGISel.cpp | 475 ++++++++++++++++++++++++++++++--------------------- 1 files changed, 285 insertions(+), 190 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.395 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.396 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.395 Mon Mar 26 19:53:36 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Mar 27 06:29:11 2007 @@ -384,6 +384,8 @@ /// processed at this point in the binary search tree. CaseRange Range; }; + + typedef std::vector CaseRecVector; /// The comparison function for sorting Case values. struct CaseCmp { @@ -496,7 +498,23 @@ void visitSwitch(SwitchInst &I); void visitUnreachable(UnreachableInst &I) { /* noop */ } - // Helper for visitSwitch + // Helpers for visitSwitch + void handleSmallSwitchRange(CaseRec& CR, + CaseRecVector& WorkList, + Value* SV, + MachineBasicBlock* Default); + void handleJTSwitchCase(CaseRec& CR, + CaseRecVector& WorkList, + Value* SV, + MachineBasicBlock* Default); + void handleBTSplitSwitchCase(CaseRec& CR, + CaseRecVector& WorkList, + Value* SV, + MachineBasicBlock* Default); + void handleBTSmallSwitchCase(CaseRec& CR, + CaseRecVector& WorkList, + Value* SV, + MachineBasicBlock* Default); void visitSwitchCase(SelectionDAGISel::CaseBlock &CB); void visitJumpTable(SelectionDAGISel::JumpTable &JT); void visitJumpTableHeader(SelectionDAGISel::JumpTable &JT, @@ -1208,6 +1226,265 @@ void SelectionDAGLowering::visitUnwind(UnwindInst &I) { } +/// handleSmaaSwitchCaseRange - Emit a series of specific tests (suitable for +/// small case ranges). +void SelectionDAGLowering::handleSmallSwitchRange(CaseRec& CR, + CaseRecVector& WorkList, + Value* SV, + MachineBasicBlock* Default) { + // Get the MachineFunction which holds the current MBB. This is used when + // inserting any additional MBBs necessary to represent the switch. + MachineFunction *CurMF = CurMBB->getParent(); + + // Figure out which block is immediately after the current one. + MachineBasicBlock *NextBlock = 0; + MachineFunction::iterator BBI = CR.CaseBB; + + Case& BackCase = *(CR.Range.second-1); + + if (++BBI != CurMBB->getParent()->end()) + NextBlock = BBI; + + // TODO: If any two of the cases has the same destination, and if one value + // is the same as the other, but has one bit unset that the other has set, + // use bit manipulation to do two compares at once. For example: + // "if (X == 6 || X == 4)" -> "if ((X|2) == 6)" + + // Rearrange the case blocks so that the last one falls through if possible. + if (NextBlock && Default != NextBlock && BackCase.second != NextBlock) { + // The last case block won't fall through into 'NextBlock' if we emit the + // branches in this order. See if rearranging a case value would help. + for (CaseItr I = CR.Range.first, E = CR.Range.second-1; I != E; ++I) { + if (I->second == NextBlock) { + std::swap(*I, BackCase); + break; + } + } + } + + // Create a CaseBlock record representing a conditional branch to + // the Case's target mbb if the value being switched on SV is equal + // to C. + MachineBasicBlock *CurBlock = CR.CaseBB; + for (CaseItr I = CR.Range.first, E = CR.Range.second; I != E; ++I) { + MachineBasicBlock *FallThrough; + if (I != E-1) { + FallThrough = new MachineBasicBlock(CurBlock->getBasicBlock()); + CurMF->getBasicBlockList().insert(BBI, FallThrough); + } else { + // If the last case doesn't match, go to the default block. + FallThrough = Default; + } + + SelectionDAGISel::CaseBlock CB(ISD::SETEQ, SV, I->first, + I->second, FallThrough, CurBlock); + + // If emitting the first comparison, just call visitSwitchCase to emit the + // code into the current block. Otherwise, push the CaseBlock onto the + // vector to be later processed by SDISel, and insert the node's MBB + // before the next MBB. + if (CurBlock == CurMBB) + visitSwitchCase(CB); + else + SwitchCases.push_back(CB); + + CurBlock = FallThrough; + } +} + +/// handleJTSwitchCase - Emit jumptable for current switch case range +void SelectionDAGLowering::handleJTSwitchCase(CaseRec& CR, + CaseRecVector& WorkList, + Value* SV, + MachineBasicBlock* Default) { + // Get the MachineFunction which holds the current MBB. This is used when + // inserting any additional MBBs necessary to represent the switch. + MachineFunction *CurMF = CurMBB->getParent(); + + // Figure out which block is immediately after the current one. + MachineBasicBlock *NextBlock = 0; + MachineFunction::iterator BBI = CR.CaseBB; + + if (++BBI != CurMBB->getParent()->end()) + NextBlock = BBI; + + Case& FrontCase = *CR.Range.first; + Case& BackCase = *(CR.Range.second-1); + const BasicBlock *LLVMBB = CR.CaseBB->getBasicBlock(); + + uint64_t First = cast(FrontCase.first)->getSExtValue(); + uint64_t Last = cast(BackCase.first)->getSExtValue(); + + // Create a new basic block to hold the code for loading the address + // of the jump table, and jumping to it. Update successor information; + // we will either branch to the default case for the switch, or the jump + // table. + MachineBasicBlock *JumpTableBB = new MachineBasicBlock(LLVMBB); + CurMF->getBasicBlockList().insert(BBI, JumpTableBB); + CR.CaseBB->addSuccessor(Default); + CR.CaseBB->addSuccessor(JumpTableBB); + + // Build a vector of destination BBs, corresponding to each target + // of the jump table. If the value of the jump table slot corresponds to + // a case statement, push the case's BB onto the vector, otherwise, push + // the default BB. + std::vector DestBBs; + int64_t TEI = First; + for (CaseItr I = CR.Range.first, E = CR.Range.second; I != E; ++TEI) + if (cast(I->first)->getSExtValue() == TEI) { + DestBBs.push_back(I->second); + ++I; + } else { + DestBBs.push_back(Default); + } + + // Update successor info. Add one edge to each unique successor. + // Vector bool would be better, but vector is really slow. + std::vector SuccsHandled; + SuccsHandled.resize(CR.CaseBB->getParent()->getNumBlockIDs()); + + for (std::vector::iterator I = DestBBs.begin(), + E = DestBBs.end(); I != E; ++I) { + if (!SuccsHandled[(*I)->getNumber()]) { + SuccsHandled[(*I)->getNumber()] = true; + JumpTableBB->addSuccessor(*I); + } + } + + // Create a jump table index for this jump table, or return an existing + // one. + unsigned JTI = CurMF->getJumpTableInfo()->getJumpTableIndex(DestBBs); + + // Set the jump table information so that we can codegen it as a second + // MachineBasicBlock + SelectionDAGISel::JumpTable JT(-1UL, JTI, JumpTableBB, Default); + SelectionDAGISel::JumpTableHeader JTH(First, Last, SV, CR.CaseBB, + (CR.CaseBB == CurMBB)); + if (CR.CaseBB == CurMBB) + visitJumpTableHeader(JT, JTH); + + JTCases.push_back(SelectionDAGISel::JumpTableBlock(JTH, JT)); +} + +/// handleBTSmallSwitchCase - handle leaf in the binary comparison tree. Just +/// emit test. +void SelectionDAGLowering::handleBTSmallSwitchCase(CaseRec& CR, + CaseRecVector& WorkList, + Value* SV, + MachineBasicBlock* Default) { + Case& FrontCase = *CR.Range.first; + + // Create a CaseBlock record representing a conditional branch to + // the Case's target mbb if the value being switched on SV is equal + // to C. Otherwise, branch to default. + Constant *C = FrontCase.first; + MachineBasicBlock *Target = FrontCase.second; + SelectionDAGISel::CaseBlock CB(ISD::SETEQ, SV, C, Target, Default, + CR.CaseBB); + + // If the MBB representing the leaf node is the current MBB, then just + // call visitSwitchCase to emit the code into the current block. + // Otherwise, push the CaseBlock onto the vector to be later processed + // by SDISel, and insert the node's MBB before the next MBB. + if (CR.CaseBB == CurMBB) + visitSwitchCase(CB); + else + SwitchCases.push_back(CB); +} + +/// handleBTSplitSwitchCase - emit comparison and split binary search tree into +/// 2 subtrees. +void SelectionDAGLowering::handleBTSplitSwitchCase(CaseRec& CR, + CaseRecVector& WorkList, + Value* SV, + MachineBasicBlock* Default) { + // Get the MachineFunction which holds the current MBB. This is used when + // inserting any additional MBBs necessary to represent the switch. + MachineFunction *CurMF = CurMBB->getParent(); + + // Figure out which block is immediately after the current one. + MachineBasicBlock *NextBlock = 0; + MachineFunction::iterator BBI = CR.CaseBB; + + if (++BBI != CurMBB->getParent()->end()) + NextBlock = BBI; + + Case& FrontCase = *CR.Range.first; + Case& BackCase = *(CR.Range.second-1); + const BasicBlock *LLVMBB = CR.CaseBB->getBasicBlock(); + + // Size is the number of Cases represented by this range. + unsigned Size = CR.Range.second - CR.Range.first; + + uint64_t First = cast(FrontCase.first)->getSExtValue(); + uint64_t Last = cast(BackCase.first)->getSExtValue(); + double Density = 0; + CaseItr Pivot; + + // Select optimal pivot, maximizing sum density of LHS and RHS. This will + // (heuristically) allow us to emit JumpTable's later. + unsigned LSize = 1; + unsigned RSize = Size-1; + for (CaseItr I = CR.Range.first, J=I+1, E = CR.Range.second; + J!=E; ++I, ++J, ++LSize, --RSize) { + uint64_t LEnd = cast(I->first)->getSExtValue(); + uint64_t RBegin = cast(J->first)->getSExtValue(); + double LDensity = (double)LSize / (double)((LEnd - First) + 1ULL); + double RDensity = (double)RSize / (double)((Last - RBegin) + 1ULL); + if (Density < (LDensity + RDensity)) { + Pivot = J; + Density = LDensity + RDensity; + } + } + + CaseRange LHSR(CR.Range.first, Pivot); + CaseRange RHSR(Pivot, CR.Range.second); + Constant *C = Pivot->first; + MachineBasicBlock *FalseBB = 0, *TrueBB = 0; + + // We know that we branch to the LHS if the Value being switched on is + // less than the Pivot value, C. We use this to optimize our binary + // tree a bit, by recognizing that if SV is greater than or equal to the + // LHS's Case Value, and that Case Value is exactly one less than the + // Pivot's Value, then we can branch directly to the LHS's Target, + // rather than creating a leaf node for it. + if ((LHSR.second - LHSR.first) == 1 && + LHSR.first->first == CR.GE && + cast(C)->getZExtValue() == + (cast(CR.GE)->getZExtValue() + 1ULL)) { + TrueBB = LHSR.first->second; + } else { + TrueBB = new MachineBasicBlock(LLVMBB); + CurMF->getBasicBlockList().insert(BBI, TrueBB); + WorkList.push_back(CaseRec(TrueBB, C, CR.GE, LHSR)); + } + + // Similar to the optimization above, if the Value being switched on is + // known to be less than the Constant CR.LT, and the current Case Value + // is CR.LT - 1, then we can branch directly to the target block for + // the current Case Value, rather than emitting a RHS leaf node for it. + if ((RHSR.second - RHSR.first) == 1 && CR.LT && + cast(RHSR.first->first)->getZExtValue() == + (cast(CR.LT)->getZExtValue() - 1ULL)) { + FalseBB = RHSR.first->second; + } else { + FalseBB = new MachineBasicBlock(LLVMBB); + CurMF->getBasicBlockList().insert(BBI, FalseBB); + WorkList.push_back(CaseRec(FalseBB,CR.LT,C,RHSR)); + } + + // Create a CaseBlock record representing a conditional branch to + // the LHS node if the value being switched on SV is less than C. + // Otherwise, branch to LHS. + SelectionDAGISel::CaseBlock CB(ISD::SETLT, SV, C, TrueBB, FalseBB, + CR.CaseBB); + + if (CR.CaseBB == CurMBB) + visitSwitchCase(CB); + else + SwitchCases.push_back(CB); +} + void SelectionDAGLowering::visitSwitch(SwitchInst &I) { // Figure out which block is immediately after the current one. MachineBasicBlock *NextBlock = 0; @@ -1245,13 +1522,8 @@ // search tree. Value *SV = I.getOperand(0); - // Get the MachineFunction which holds the current MBB. This is used during - // emission of jump tables, and when inserting any additional MBBs necessary - // to represent the switch. - MachineFunction *CurMF = CurMBB->getParent(); - // Push the initial CaseRec onto the worklist - std::vector WorkList; + CaseRecVector WorkList; WorkList.push_back(CaseRec(CurMBB,0,0,CaseRange(Cases.begin(),Cases.end()))); while (!WorkList.empty()) { @@ -1260,7 +1532,6 @@ WorkList.pop_back(); Case& FrontCase = *CR.Range.first; Case& BackCase = *(CR.Range.second-1); - const BasicBlock *LLVMBB = CR.CaseBB->getBasicBlock(); // Figure out which block is immediately after the current one. NextBlock = 0; @@ -1275,52 +1546,7 @@ // If the range has few cases (two or less) emit a series of specific // tests. if (Size < 3) { - // TODO: If any two of the cases has the same destination, and if one value - // is the same as the other, but has one bit unset that the other has set, - // use bit manipulation to do two compares at once. For example: - // "if (X == 6 || X == 4)" -> "if ((X|2) == 6)" - - // Rearrange the case blocks so that the last one falls through if possible. - if (NextBlock && Default != NextBlock && BackCase.second != NextBlock) { - // The last case block won't fall through into 'NextBlock' if we emit the - // branches in this order. See if rearranging a case value would help. - for (CaseItr I = CR.Range.first, E = CR.Range.second-1; I != E; ++I) { - if (I->second == NextBlock) { - std::swap(*I, BackCase); - break; - } - } - } - - // Create a CaseBlock record representing a conditional branch to - // the Case's target mbb if the value being switched on SV is equal - // to C. - MachineBasicBlock *CurBlock = CR.CaseBB; - for (CaseItr I = CR.Range.first, E = CR.Range.second; I != E; ++I) { - MachineBasicBlock *FallThrough; - if (I != E-1) { - FallThrough = new MachineBasicBlock(CurBlock->getBasicBlock()); - CurMF->getBasicBlockList().insert(BBI, FallThrough); - } else { - // If the last case doesn't match, go to the default block. - FallThrough = Default; - } - - SelectionDAGISel::CaseBlock CB(ISD::SETEQ, SV, I->first, - I->second, FallThrough, CurBlock); - - // If emitting the first comparison, just call visitSwitchCase to emit the - // code into the current block. Otherwise, push the CaseBlock onto the - // vector to be later processed by SDISel, and insert the node's MBB - // before the next MBB. - if (CurBlock == CurMBB) - visitSwitchCase(CB); - else - SwitchCases.push_back(CB); - - CurBlock = FallThrough; - } - + handleSmallSwitchRange(CR, WorkList, SV, Default); continue; } @@ -1336,56 +1562,7 @@ double Density = (double)Size / (double)((Last - First) + 1ULL); if (Density >= 0.3125) { - // Create a new basic block to hold the code for loading the address - // of the jump table, and jumping to it. Update successor information; - // we will either branch to the default case for the switch, or the jump - // table. - MachineBasicBlock *JumpTableBB = new MachineBasicBlock(LLVMBB); - CurMF->getBasicBlockList().insert(BBI, JumpTableBB); - CR.CaseBB->addSuccessor(Default); - CR.CaseBB->addSuccessor(JumpTableBB); - - // Build a vector of destination BBs, corresponding to each target - // of the jump table. If the value of the jump table slot corresponds to - // a case statement, push the case's BB onto the vector, otherwise, push - // the default BB. - std::vector DestBBs; - int64_t TEI = First; - for (CaseItr I = CR.Range.first, E = CR.Range.second; I != E; ++TEI) - if (cast(I->first)->getSExtValue() == TEI) { - DestBBs.push_back(I->second); - ++I; - } else { - DestBBs.push_back(Default); - } - - // Update successor info. Add one edge to each unique successor. - // Vector bool would be better, but vector is really slow. - std::vector SuccsHandled; - SuccsHandled.resize(CR.CaseBB->getParent()->getNumBlockIDs()); - - for (std::vector::iterator I = DestBBs.begin(), - E = DestBBs.end(); I != E; ++I) { - if (!SuccsHandled[(*I)->getNumber()]) { - SuccsHandled[(*I)->getNumber()] = true; - JumpTableBB->addSuccessor(*I); - } - } - - // Create a jump table index for this jump table, or return an existing - // one. - unsigned JTI = CurMF->getJumpTableInfo()->getJumpTableIndex(DestBBs); - - // Set the jump table information so that we can codegen it as a second - // MachineBasicBlock - SelectionDAGISel::JumpTable JT(-1UL, JTI, JumpTableBB, Default); - SelectionDAGISel::JumpTableHeader JTH(First, Last, SV, CR.CaseBB, - (CR.CaseBB == CurMBB)); - if (CR.CaseBB == CurMBB) - visitJumpTableHeader(JT, JTH); - - JTCases.push_back(SelectionDAGISel::JumpTableBlock(JTH, JT)); - + handleJTSwitchCase(CR, WorkList, SV, Default); continue; } } @@ -1393,93 +1570,11 @@ // Emit binary tree. If Size is 1, then we are processing a leaf of the // binary search tree. Otherwise, we need to pick a pivot, and push left // and right ranges onto the worklist. - - if (Size == 1) { - // Create a CaseBlock record representing a conditional branch to - // the Case's target mbb if the value being switched on SV is equal - // to C. Otherwise, branch to default. - Constant *C = FrontCase.first; - MachineBasicBlock *Target = FrontCase.second; - SelectionDAGISel::CaseBlock CB(ISD::SETEQ, SV, C, Target, Default, - CR.CaseBB); - - // If the MBB representing the leaf node is the current MBB, then just - // call visitSwitchCase to emit the code into the current block. - // Otherwise, push the CaseBlock onto the vector to be later processed - // by SDISel, and insert the node's MBB before the next MBB. - if (CR.CaseBB == CurMBB) - visitSwitchCase(CB); - else - SwitchCases.push_back(CB); - } else { - uint64_t First = cast(FrontCase.first)->getSExtValue(); - uint64_t Last = cast(BackCase.first)->getSExtValue(); - double Density = 0; - CaseItr Pivot; - - // Select optimal pivot, maximizing sum density of LHS and RHS. This will - // (heuristically) allow us to emit JumpTable's later. - unsigned LSize = 1; - unsigned RSize = Size-1; - for (CaseItr I = CR.Range.first, J=I+1, E = CR.Range.second; - J!=E; ++I, ++J, ++LSize, --RSize) { - uint64_t LEnd = cast(I->first)->getSExtValue(); - uint64_t RBegin = cast(J->first)->getSExtValue(); - double LDensity = (double)LSize / (double)((LEnd - First) + 1ULL); - double RDensity = (double)RSize / (double)((Last - RBegin) + 1ULL); - if (Density < (LDensity + RDensity)) { - Pivot = J; - Density = LDensity + RDensity; - } - } - - CaseRange LHSR(CR.Range.first, Pivot); - CaseRange RHSR(Pivot, CR.Range.second); - Constant *C = Pivot->first; - MachineBasicBlock *FalseBB = 0, *TrueBB = 0; - - // We know that we branch to the LHS if the Value being switched on is - // less than the Pivot value, C. We use this to optimize our binary - // tree a bit, by recognizing that if SV is greater than or equal to the - // LHS's Case Value, and that Case Value is exactly one less than the - // Pivot's Value, then we can branch directly to the LHS's Target, - // rather than creating a leaf node for it. - if ((LHSR.second - LHSR.first) == 1 && - LHSR.first->first == CR.GE && - cast(C)->getZExtValue() == - (cast(CR.GE)->getZExtValue() + 1ULL)) { - TrueBB = LHSR.first->second; - } else { - TrueBB = new MachineBasicBlock(LLVMBB); - CurMF->getBasicBlockList().insert(BBI, TrueBB); - WorkList.push_back(CaseRec(TrueBB, C, CR.GE, LHSR)); - } - - // Similar to the optimization above, if the Value being switched on is - // known to be less than the Constant CR.LT, and the current Case Value - // is CR.LT - 1, then we can branch directly to the target block for - // the current Case Value, rather than emitting a RHS leaf node for it. - if ((RHSR.second - RHSR.first) == 1 && CR.LT && - cast(RHSR.first->first)->getZExtValue() == - (cast(CR.LT)->getZExtValue() - 1ULL)) { - FalseBB = RHSR.first->second; - } else { - FalseBB = new MachineBasicBlock(LLVMBB); - CurMF->getBasicBlockList().insert(BBI, FalseBB); - WorkList.push_back(CaseRec(FalseBB,CR.LT,C,RHSR)); - } - - // Create a CaseBlock record representing a conditional branch to - // the LHS node if the value being switched on SV is less than C. - // Otherwise, branch to LHS. - SelectionDAGISel::CaseBlock CB(ISD::SETLT, SV, C, TrueBB, FalseBB, - CR.CaseBB); - if (CR.CaseBB == CurMBB) - visitSwitchCase(CB); - else - SwitchCases.push_back(CB); - } + if (Size == 1) + handleBTSmallSwitchCase(CR, WorkList, SV, Default); + else + handleBTSplitSwitchCase(CR, WorkList, SV, Default); } } From asl at math.spbu.ru Tue Mar 27 07:06:05 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 27 Mar 2007 07:06:05 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200703271206.l2RC65oH012757@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.396 -> 1.397 --- Log message: Remove dead code --- Diffs of the changes: (+46 -82) SelectionDAGISel.cpp | 128 ++++++++++++++++++--------------------------------- 1 files changed, 46 insertions(+), 82 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.396 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.397 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.396 Tue Mar 27 06:29:11 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Mar 27 07:05:48 2007 @@ -499,19 +499,15 @@ void visitUnreachable(UnreachableInst &I) { /* noop */ } // Helpers for visitSwitch - void handleSmallSwitchRange(CaseRec& CR, + bool handleSmallSwitchRange(CaseRec& CR, CaseRecVector& WorkList, Value* SV, MachineBasicBlock* Default); - void handleJTSwitchCase(CaseRec& CR, + bool handleJTSwitchCase(CaseRec& CR, CaseRecVector& WorkList, Value* SV, MachineBasicBlock* Default); - void handleBTSplitSwitchCase(CaseRec& CR, - CaseRecVector& WorkList, - Value* SV, - MachineBasicBlock* Default); - void handleBTSmallSwitchCase(CaseRec& CR, + bool handleBTSplitSwitchCase(CaseRec& CR, CaseRecVector& WorkList, Value* SV, MachineBasicBlock* Default); @@ -1228,10 +1224,17 @@ /// handleSmaaSwitchCaseRange - Emit a series of specific tests (suitable for /// small case ranges). -void SelectionDAGLowering::handleSmallSwitchRange(CaseRec& CR, +bool SelectionDAGLowering::handleSmallSwitchRange(CaseRec& CR, CaseRecVector& WorkList, Value* SV, MachineBasicBlock* Default) { + Case& BackCase = *(CR.Range.second-1); + + // Size is the number of Cases represented by this range. + unsigned Size = CR.Range.second - CR.Range.first; + if (Size >=3) + return false; + // Get the MachineFunction which holds the current MBB. This is used when // inserting any additional MBBs necessary to represent the switch. MachineFunction *CurMF = CurMBB->getParent(); @@ -1240,8 +1243,6 @@ MachineBasicBlock *NextBlock = 0; MachineFunction::iterator BBI = CR.CaseBB; - Case& BackCase = *(CR.Range.second-1); - if (++BBI != CurMBB->getParent()->end()) NextBlock = BBI; @@ -1290,16 +1291,36 @@ CurBlock = FallThrough; } + + return true; } /// handleJTSwitchCase - Emit jumptable for current switch case range -void SelectionDAGLowering::handleJTSwitchCase(CaseRec& CR, +bool SelectionDAGLowering::handleJTSwitchCase(CaseRec& CR, CaseRecVector& WorkList, Value* SV, MachineBasicBlock* Default) { + Case& FrontCase = *CR.Range.first; + Case& BackCase = *(CR.Range.second-1); + + // Size is the number of Cases represented by this range. + unsigned Size = CR.Range.second - CR.Range.first; + + uint64_t First = cast(FrontCase.first)->getSExtValue(); + uint64_t Last = cast(BackCase.first)->getSExtValue(); + + if ((!TLI.isOperationLegal(ISD::BR_JT, MVT::Other) && + !TLI.isOperationLegal(ISD::BRIND, MVT::Other)) || + Size <= 5) + return false; + + double Density = (double)Size / (double)((Last - First) + 1ULL); + if (Density < 0.3125) + return false; + // Get the MachineFunction which holds the current MBB. This is used when // inserting any additional MBBs necessary to represent the switch. - MachineFunction *CurMF = CurMBB->getParent(); + MachineFunction *CurMF = CurMBB->getParent(); // Figure out which block is immediately after the current one. MachineBasicBlock *NextBlock = 0; @@ -1308,13 +1329,8 @@ if (++BBI != CurMBB->getParent()->end()) NextBlock = BBI; - Case& FrontCase = *CR.Range.first; - Case& BackCase = *(CR.Range.second-1); const BasicBlock *LLVMBB = CR.CaseBB->getBasicBlock(); - uint64_t First = cast(FrontCase.first)->getSExtValue(); - uint64_t Last = cast(BackCase.first)->getSExtValue(); - // Create a new basic block to hold the code for loading the address // of the jump table, and jumping to it. Update successor information; // we will either branch to the default case for the switch, or the jump @@ -1364,37 +1380,13 @@ visitJumpTableHeader(JT, JTH); JTCases.push_back(SelectionDAGISel::JumpTableBlock(JTH, JT)); -} -/// handleBTSmallSwitchCase - handle leaf in the binary comparison tree. Just -/// emit test. -void SelectionDAGLowering::handleBTSmallSwitchCase(CaseRec& CR, - CaseRecVector& WorkList, - Value* SV, - MachineBasicBlock* Default) { - Case& FrontCase = *CR.Range.first; - - // Create a CaseBlock record representing a conditional branch to - // the Case's target mbb if the value being switched on SV is equal - // to C. Otherwise, branch to default. - Constant *C = FrontCase.first; - MachineBasicBlock *Target = FrontCase.second; - SelectionDAGISel::CaseBlock CB(ISD::SETEQ, SV, C, Target, Default, - CR.CaseBB); - - // If the MBB representing the leaf node is the current MBB, then just - // call visitSwitchCase to emit the code into the current block. - // Otherwise, push the CaseBlock onto the vector to be later processed - // by SDISel, and insert the node's MBB before the next MBB. - if (CR.CaseBB == CurMBB) - visitSwitchCase(CB); - else - SwitchCases.push_back(CB); + return true; } /// handleBTSplitSwitchCase - emit comparison and split binary search tree into /// 2 subtrees. -void SelectionDAGLowering::handleBTSplitSwitchCase(CaseRec& CR, +bool SelectionDAGLowering::handleBTSplitSwitchCase(CaseRec& CR, CaseRecVector& WorkList, Value* SV, MachineBasicBlock* Default) { @@ -1483,6 +1475,8 @@ visitSwitchCase(CB); else SwitchCases.push_back(CB); + + return true; } void SelectionDAGLowering::visitSwitch(SwitchInst &I) { @@ -1530,51 +1524,21 @@ // Grab a record representing a case range to process off the worklist CaseRec CR = WorkList.back(); WorkList.pop_back(); - Case& FrontCase = *CR.Range.first; - Case& BackCase = *(CR.Range.second-1); - - // Figure out which block is immediately after the current one. - NextBlock = 0; - BBI = CR.CaseBB; - - if (++BBI != CurMBB->getParent()->end()) - NextBlock = BBI; - - // Size is the number of Cases represented by this range. - unsigned Size = CR.Range.second - CR.Range.first; // If the range has few cases (two or less) emit a series of specific // tests. - if (Size < 3) { - handleSmallSwitchRange(CR, WorkList, SV, Default); - continue; - } - + if (handleSmallSwitchRange(CR, WorkList, SV, Default)) + continue; + // If the switch has more than 5 blocks, and at least 31.25% dense, and the // target supports indirect branches, then emit a jump table rather than // lowering the switch to a binary tree of conditional branches. - - if ((TLI.isOperationLegal(ISD::BR_JT, MVT::Other) || - TLI.isOperationLegal(ISD::BRIND, MVT::Other)) && - Size > 5) { - uint64_t First = cast(FrontCase.first)->getSExtValue(); - uint64_t Last = cast(BackCase.first)->getSExtValue(); - double Density = (double)Size / (double)((Last - First) + 1ULL); - - if (Density >= 0.3125) { - handleJTSwitchCase(CR, WorkList, SV, Default); - continue; - } - } - - // Emit binary tree. If Size is 1, then we are processing a leaf of the - // binary search tree. Otherwise, we need to pick a pivot, and push left - // and right ranges onto the worklist. - - if (Size == 1) - handleBTSmallSwitchCase(CR, WorkList, SV, Default); - else - handleBTSplitSwitchCase(CR, WorkList, SV, Default); + if (handleJTSwitchCase(CR, WorkList, SV, Default)) + continue; + + // Emit binary tree. We need to pick a pivot, and push left and right ranges + // onto the worklist. Leafs are handled via handleSmallSwitchRange() call. + handleBTSplitSwitchCase(CR, WorkList, SV, Default); } } From lauro.venancio at gmail.com Tue Mar 27 11:19:53 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Tue, 27 Mar 2007 11:19:53 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelLowering.cpp ARMInstrInfo.td ARMInstrThumb.td Message-ID: <200703271619.l2RGJrwn028588@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMISelLowering.cpp updated: 1.30 -> 1.31 ARMInstrInfo.td updated: 1.93 -> 1.94 ARMInstrThumb.td updated: 1.18 -> 1.19 --- Log message: bugfix: sometimes the spiller puts a load between the "mov lr, pc" and "bx" of a CALL_NOLINK. --- Diffs of the changes: (+11 -11) ARMISelLowering.cpp | 6 +++--- ARMInstrInfo.td | 8 +++++--- ARMInstrThumb.td | 8 +++----- 3 files changed, 11 insertions(+), 11 deletions(-) Index: llvm/lib/Target/ARM/ARMISelLowering.cpp diff -u llvm/lib/Target/ARM/ARMISelLowering.cpp:1.30 llvm/lib/Target/ARM/ARMISelLowering.cpp:1.31 --- llvm/lib/Target/ARM/ARMISelLowering.cpp:1.30 Sat Mar 24 21:14:49 2007 +++ llvm/lib/Target/ARM/ARMISelLowering.cpp Tue Mar 27 11:19:21 2007 @@ -555,10 +555,10 @@ CallOpc = (isDirect || Subtarget->hasV5TOps()) ? ARMISD::CALL : ARMISD::CALL_NOLINK; } - if (CallOpc == ARMISD::CALL_NOLINK) { - // On CALL_NOLINK we must move PC to LR + if (CallOpc == ARMISD::CALL_NOLINK && !Subtarget->isThumb()) { + // implicit def LR - LR mustn't be allocated as GRP:$dst of CALL_NOLINK Chain = DAG.getCopyToReg(Chain, ARM::LR, - DAG.getRegister(ARM::PC, MVT::i32), InFlag); + DAG.getNode(ISD::UNDEF, MVT::i32), InFlag); InFlag = Chain.getValue(1); } Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.93 llvm/lib/Target/ARM/ARMInstrInfo.td:1.94 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.93 Tue Mar 20 12:57:23 2007 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Tue Mar 27 11:19:21 2007 @@ -370,6 +370,8 @@ : I; class AI4 pattern> : I; +class AIx2 pattern> + : I; class AI1x2 pattern> : I; @@ -546,9 +548,9 @@ [(ARMcall GPR:$dst)]>, Requires<[IsARM, HasV5T]>; let Uses = [LR] in { // ARMv4T - def BX : AI<(ops GPR:$dst, variable_ops), - "bx $dst", - [(ARMcall_nolink GPR:$dst)]>; + def BX : AIx2<(ops GPR:$dst, variable_ops), + "mov lr, pc\n\tbx $dst", + [(ARMcall_nolink GPR:$dst)]>; } } Index: llvm/lib/Target/ARM/ARMInstrThumb.td diff -u llvm/lib/Target/ARM/ARMInstrThumb.td:1.18 llvm/lib/Target/ARM/ARMInstrThumb.td:1.19 --- llvm/lib/Target/ARM/ARMInstrThumb.td:1.18 Tue Mar 20 12:57:23 2007 +++ llvm/lib/Target/ARM/ARMInstrThumb.td Tue Mar 27 11:19:21 2007 @@ -189,12 +189,10 @@ def tBLXr : TI<(ops GPR:$dst, variable_ops), "blx $dst", [(ARMtcall GPR:$dst)]>, Requires<[HasV5T]>; - let Uses = [LR] in { - // ARMv4T - def tBX : TI<(ops GPR:$dst, variable_ops), - "bx $dst", + // ARMv4T + def tBX : TIx2<(ops GPR:$dst, variable_ops), + "cpy lr, pc\n\tbx $dst", [(ARMcall_nolink GPR:$dst)]>; - } } let isBranch = 1, isTerminator = 1, isBarrier = 1 in { From lauro.venancio at gmail.com Tue Mar 27 11:33:25 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Tue, 27 Mar 2007 11:33:25 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelLowering.cpp Message-ID: <200703271633.l2RGXPnj014880@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPCISelLowering.cpp updated: 1.263 -> 1.264 --- Log message: "The C standards do say that "char" may either be a "signed char" or "unsigned char" and it is up to the compilers implementation or the platform which is followed." http://www.arm.linux.org.uk/docs/faqs/signedchar.php --- Diffs of the changes: (+1 -1) PPCISelLowering.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.263 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.264 --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.263 Sat Mar 24 21:14:49 2007 +++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Tue Mar 27 11:33:08 2007 @@ -2219,7 +2219,7 @@ // Check to see if this is a wide variety of vsplti*, binop self cases. unsigned SplatBitSize = SplatSize*8; - static const char SplatCsts[] = { + static const signed char SplatCsts[] = { -1, 1, -2, 2, -3, 3, -4, 4, -5, 5, -6, 6, -7, 7, -8, 8, -9, 9, -10, 10, -11, 11, -12, 12, -13, 13, 14, -14, 15, -15, -16 }; From evan.cheng at apple.com Tue Mar 27 11:45:06 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 27 Mar 2007 11:45:06 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703271645.l2RGj6ue015412@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.697 -> 1.698 --- Log message: Unbreaks non-debug builds. --- Diffs of the changes: (+2 -0) InstructionCombining.cpp | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.697 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.698 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.697 Mon Mar 26 18:58:26 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Tue Mar 27 11:44:48 2007 @@ -9488,8 +9488,10 @@ // Erase the old instruction. InstParent->getInstList().erase(I); } else { +#ifndef NDEBUG DOUT << "IC: Mod = " << OrigI << " New = " << *I; +#endif // If the instruction was modified, it's possible that it is now dead. // if so, remove it. From dpatel at apple.com Tue Mar 27 15:12:25 2007 From: dpatel at apple.com (dpatel at apple.com) Date: Tue, 27 Mar 2007 13:12:25 -0700 (PDT) Subject: [llvm-commits] [125417] The address of a VIEW_CONVERT_EXPR is the address of its Message-ID: <20070327201225.5311FB9D4866@src> Revision: 125417 Author: dpatel Date: 2007-03-27 13:12:24 -0700 (Tue, 27 Mar 2007) Log Message: ----------- The address of a VIEW_CONVERT_EXPR is the address of its operand, but the type is the type of the expression. The current code gets the address right but the type wrong. Patch by Duncan Sands. Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-convert.cpp apple-local/branches/llvm/gcc/llvm-internal.h Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-03-27 19:54:13 UTC (rev 125416) +++ apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-03-27 20:12:24 UTC (rev 125417) @@ -850,14 +850,17 @@ case BIT_FIELD_REF: return EmitLV_BIT_FIELD_REF(exp); case REALPART_EXPR: return EmitLV_XXXXPART_EXPR(exp, 0); case IMAGPART_EXPR: return EmitLV_XXXXPART_EXPR(exp, 1); + // Constants. case LABEL_DECL: return TreeConstantToLLVM::EmitLV_LABEL_DECL(exp); case STRING_CST: return LValue(TreeConstantToLLVM::EmitLV_STRING_CST(exp)); + // Type Conversion. + case VIEW_CONVERT_EXPR: return EmitLV_VIEW_CONVERT_EXPR(exp); + // Trivial Cases. - case VIEW_CONVERT_EXPR: case WITH_SIZE_EXPR: - // The address of a these is the address of their operand. + // The address is the address of the operand. return EmitLV(TREE_OPERAND(exp, 0)); case INDIRECT_REF: // The lvalue is just the address. @@ -4850,6 +4853,15 @@ "tmp", CurBB)); } +LValue TreeToLLVM::EmitLV_VIEW_CONVERT_EXPR(tree exp) { + // The address is the address of the operand. + LValue LV = EmitLV(TREE_OPERAND(exp, 0)); + // The type is the type of the expression. + const Type *Ty = ConvertType(TREE_TYPE(exp)); + LV.Ptr = BitCastToType(LV.Ptr, PointerType::get(Ty)); + return LV; +} + //===----------------------------------------------------------------------===// // ... Constant Expressions ... //===----------------------------------------------------------------------===// Modified: apple-local/branches/llvm/gcc/llvm-internal.h =================================================================== --- apple-local/branches/llvm/gcc/llvm-internal.h 2007-03-27 19:54:13 UTC (rev 125416) +++ apple-local/branches/llvm/gcc/llvm-internal.h 2007-03-27 20:12:24 UTC (rev 125417) @@ -521,6 +521,7 @@ LValue EmitLV_COMPONENT_REF(tree_node *exp); LValue EmitLV_BIT_FIELD_REF(tree_node *exp); LValue EmitLV_XXXXPART_EXPR(tree_node *exp, unsigned Idx); + LValue EmitLV_VIEW_CONVERT_EXPR(tree_node *exp); // Constant Expressions. Value *EmitINTEGER_CST(tree_node *exp); From isanbard at gmail.com Tue Mar 27 15:21:59 2007 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 27 Mar 2007 15:21:59 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/IntrinsicsX86.td Message-ID: <200703272021.l2RKLxhv013399@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: IntrinsicsX86.td updated: 1.39 -> 1.40 --- Log message: Add support for integer comparison builtins. --- Diffs of the changes: (+23 -0) IntrinsicsX86.td | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+) Index: llvm/include/llvm/IntrinsicsX86.td diff -u llvm/include/llvm/IntrinsicsX86.td:1.39 llvm/include/llvm/IntrinsicsX86.td:1.40 --- llvm/include/llvm/IntrinsicsX86.td:1.39 Fri Mar 23 17:42:04 2007 +++ llvm/include/llvm/IntrinsicsX86.td Tue Mar 27 15:21:31 2007 @@ -629,3 +629,26 @@ Intrinsic<[llvm_v8i8_ty, llvm_v4i16_ty, llvm_v4i16_ty], [IntrNoMem]>; } + +// Integer comparison ops +let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + def int_x86_mmx_pcmpeq_b : GCCBuiltin<"__builtin_ia32_pcmpeqb">, + Intrinsic<[llvm_v8i8_ty, llvm_v8i8_ty, + llvm_v8i8_ty], [IntrNoMem]>; + def int_x86_mmx_pcmpeq_w : GCCBuiltin<"__builtin_ia32_pcmpeqw">, + Intrinsic<[llvm_v4i16_ty, llvm_v4i16_ty, + llvm_v4i16_ty], [IntrNoMem]>; + def int_x86_mmx_pcmpeq_d : GCCBuiltin<"__builtin_ia32_pcmpeqd">, + Intrinsic<[llvm_v2i32_ty, llvm_v2i32_ty, + llvm_v2i32_ty], [IntrNoMem]>; + + def int_x86_mmx_pcmpgt_b : GCCBuiltin<"__builtin_ia32_pcmpgtb">, + Intrinsic<[llvm_v8i8_ty, llvm_v8i8_ty, + llvm_v8i8_ty], [IntrNoMem]>; + def int_x86_mmx_pcmpgt_w : GCCBuiltin<"__builtin_ia32_pcmpgtw">, + Intrinsic<[llvm_v4i16_ty, llvm_v4i16_ty, + llvm_v4i16_ty], [IntrNoMem]>; + def int_x86_mmx_pcmpgt_d : GCCBuiltin<"__builtin_ia32_pcmpgtd">, + Intrinsic<[llvm_v2i32_ty, llvm_v2i32_ty, + llvm_v2i32_ty], [IntrNoMem]>; +} From isanbard at gmail.com Tue Mar 27 15:22:57 2007 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 27 Mar 2007 15:22:57 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86InstrMMX.td Message-ID: <200703272022.l2RKMv1U013427@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.379 -> 1.380 X86InstrMMX.td updated: 1.25 -> 1.26 --- Log message: Fix so that pandn is emitted instead of an xor/and combo. Add integer comparison operators. --- Diffs of the changes: (+55 -13) X86ISelLowering.cpp | 8 ++++-- X86InstrMMX.td | 60 +++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 55 insertions(+), 13 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.379 llvm/lib/Target/X86/X86ISelLowering.cpp:1.380 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.379 Mon Mar 26 03:03:33 2007 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Tue Mar 27 15:22:40 2007 @@ -361,13 +361,15 @@ AddPromotedToType (ISD::LOAD, MVT::v2i32, MVT::v1i64); setOperationAction(ISD::LOAD, MVT::v1i64, Legal); - setOperationAction(ISD::BUILD_VECTOR, MVT::v8i8, Expand); - setOperationAction(ISD::BUILD_VECTOR, MVT::v4i16, Expand); - setOperationAction(ISD::BUILD_VECTOR, MVT::v2i32, Expand); + setOperationAction(ISD::BUILD_VECTOR, MVT::v8i8, Custom); + setOperationAction(ISD::BUILD_VECTOR, MVT::v4i16, Custom); + setOperationAction(ISD::BUILD_VECTOR, MVT::v2i32, Custom); + setOperationAction(ISD::BUILD_VECTOR, MVT::v1i64, Custom); setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v8i8, Custom); setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v4i16, Custom); setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v2i32, Custom); + setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v1i64, Custom); } if (Subtarget->hasSSE1()) { Index: llvm/lib/Target/X86/X86InstrMMX.td diff -u llvm/lib/Target/X86/X86InstrMMX.td:1.25 llvm/lib/Target/X86/X86InstrMMX.td:1.26 --- llvm/lib/Target/X86/X86InstrMMX.td:1.25 Mon Mar 26 02:53:08 2007 +++ llvm/lib/Target/X86/X86InstrMMX.td Tue Mar 27 15:22:40 2007 @@ -43,11 +43,12 @@ // MMX Pattern Fragments //===----------------------------------------------------------------------===// -def loadv1i64 : PatFrag<(ops node:$ptr), (v1i64 (load node:$ptr))>; +def load_mmx : PatFrag<(ops node:$ptr), (v1i64 (load node:$ptr))>; def bc_v8i8 : PatFrag<(ops node:$in), (v8i8 (bitconvert node:$in))>; def bc_v4i16 : PatFrag<(ops node:$in), (v4i16 (bitconvert node:$in))>; def bc_v2i32 : PatFrag<(ops node:$in), (v2i32 (bitconvert node:$in))>; +def bc_v1i64 : PatFrag<(ops node:$in), (v1i64 (bitconvert node:$in))>; //===----------------------------------------------------------------------===// // MMX Multiclasses @@ -66,7 +67,7 @@ !strconcat(OpcodeStr, " {$src2, $dst|$dst, $src2}"), [(set VR64:$dst, (OpVT (OpNode VR64:$src1, (bitconvert - (loadv1i64 addr:$src2)))))]>; + (load_mmx addr:$src2)))))]>; } multiclass MMXI_binop_rm_int opc, string OpcodeStr, Intrinsic IntId, @@ -79,7 +80,7 @@ def rm : MMXI; + (bitconvert (load_mmx addr:$src2))))]>; } // MMXI_binop_rm_v1i64 - Simple MMX binary operator whose type is v1i64. @@ -97,7 +98,7 @@ def rm : MMXI; + (OpNode VR64:$src1,(load_mmx addr:$src2)))]>; } multiclass MMXI_binop_rmi_int opc, bits<8> opc2, Format ImmForm, @@ -108,7 +109,7 @@ def rm : MMXI; + (bitconvert (load_mmx addr:$src2))))]>; def ri : MMXIi8; def MMX_PUNPCKHWDrr : MMXI<0x69, MRMSrcReg, (ops VR64:$dst, VR64:$src1, VR64:$src2), @@ -191,7 +192,7 @@ "punpckhwd {$src2, $dst|$dst, $src2}", [(set VR64:$dst, (v4i16 (vector_shuffle VR64:$src1, - (bc_v4i16 (loadv1i64 addr:$src2)), + (bc_v4i16 (load_mmx addr:$src2)), MMX_UNPCKH_shuffle_mask)))]>; def MMX_PUNPCKHDQrr : MMXI<0x6A, MRMSrcReg, (ops VR64:$dst, VR64:$src1, VR64:$src2), @@ -204,7 +205,7 @@ "punpckhdq {$src2, $dst|$dst, $src2}", [(set VR64:$dst, (v1i64 (vector_shuffle VR64:$src1, - (loadv1i64 addr:$src2), + (load_mmx addr:$src2), MMX_UNPCKH_shuffle_mask)))]>; } @@ -251,6 +252,15 @@ defm MMX_PACKSSDW : MMXI_binop_rm_int<0x6B, "packssdw", int_x86_mmx_packssdw>; defm MMX_PACKUSWB : MMXI_binop_rm_int<0x67, "packuswb", int_x86_mmx_packuswb>; +// Integer comparison +defm MMX_PCMPEQB : MMXI_binop_rm_int<0x74, "pcmpeqb", int_x86_mmx_pcmpeq_b>; +defm MMX_PCMPEQW : MMXI_binop_rm_int<0x75, "pcmpeqw", int_x86_mmx_pcmpeq_w>; +defm MMX_PCMPEQD : MMXI_binop_rm_int<0x76, "pcmpeqd", int_x86_mmx_pcmpeq_d>; + +defm MMX_PCMPGTB : MMXI_binop_rm_int<0x64, "pcmpgtb", int_x86_mmx_pcmpgt_b>; +defm MMX_PCMPGTW : MMXI_binop_rm_int<0x65, "pcmpgtw", int_x86_mmx_pcmpgt_w>; +defm MMX_PCMPGTD : MMXI_binop_rm_int<0x66, "pcmpgtd", int_x86_mmx_pcmpgt_d>; + // Move Instructions def MOVD64rr : MMXI<0x6E, MRMSrcReg, (ops VR64:$dst, GR32:$src), "movd {$src, $dst|$dst, $src}", []>; @@ -263,7 +273,7 @@ "movq {$src, $dst|$dst, $src}", []>; def MOVQ64rm : MMXI<0x6F, MRMSrcMem, (ops VR64:$dst, i64mem:$src), "movq {$src, $dst|$dst, $src}", - [(set VR64:$dst, (loadv1i64 addr:$src))]>; + [(set VR64:$dst, (load_mmx addr:$src))]>; def MOVQ64mr : MMXI<0x7F, MRMDestMem, (ops i64mem:$dst, VR64:$src), "movq {$src, $dst|$dst, $src}", [(store (v1i64 VR64:$src), addr:$dst)]>; @@ -319,6 +329,9 @@ def MMX_V_SET0 : MMXI<0xEF, MRMInitReg, (ops VR64:$dst), "pxor $dst, $dst", [(set VR64:$dst, (v1i64 immAllZerosV))]>; +def MMX_V_SETALLONES : MMXI<0x76, MRMInitReg, (ops VR64:$dst), + "pcmpeqd $dst, $dst", + [(set VR64:$dst, (v1i64 immAllOnesV))]>; } //===----------------------------------------------------------------------===// @@ -333,12 +346,18 @@ def : Pat<(store (v2i32 VR64:$src), addr:$dst), (MOVQ64mr addr:$dst, VR64:$src)>; -// 128-bit vector all zero's. +// 64-bit vector all zero's. def : Pat<(v8i8 immAllZerosV), (MMX_V_SET0)>; def : Pat<(v4i16 immAllZerosV), (MMX_V_SET0)>; def : Pat<(v2i32 immAllZerosV), (MMX_V_SET0)>; def : Pat<(v1i64 immAllZerosV), (MMX_V_SET0)>; +// 64-bit vector all one's. +def : Pat<(v8i8 immAllOnesV), (MMX_V_SETALLONES)>; +def : Pat<(v4i16 immAllOnesV), (MMX_V_SETALLONES)>; +def : Pat<(v2i32 immAllOnesV), (MMX_V_SETALLONES)>; +def : Pat<(v1i64 immAllOnesV), (MMX_V_SETALLONES)>; + // Bit convert. def : Pat<(v8i8 (bitconvert (v1i64 VR64:$src))), (v8i8 VR64:$src)>; def : Pat<(v8i8 (bitconvert (v2i32 VR64:$src))), (v8i8 VR64:$src)>; @@ -369,3 +388,24 @@ // 16-bits matter. def : Pat<(v8i8 (MMX_X86s2vec GR32:$src)), (MOVD64rr GR32:$src)>; def : Pat<(v4i16 (MMX_X86s2vec GR32:$src)), (MOVD64rr GR32:$src)>; + +// Some special case pandn patterns. +def : Pat<(v1i64 (and (xor VR64:$src1, (bc_v1i64 (v2i32 immAllOnesV))), + VR64:$src2)), + (MMX_PANDNrr VR64:$src1, VR64:$src2)>; +def : Pat<(v1i64 (and (xor VR64:$src1, (bc_v1i64 (v4i16 immAllOnesV))), + VR64:$src2)), + (MMX_PANDNrr VR64:$src1, VR64:$src2)>; +def : Pat<(v1i64 (and (xor VR64:$src1, (bc_v1i64 (v8i8 immAllOnesV))), + VR64:$src2)), + (MMX_PANDNrr VR64:$src1, VR64:$src2)>; + +def : Pat<(v1i64 (and (xor VR64:$src1, (bc_v1i64 (v2i32 immAllOnesV))), + (load addr:$src2))), + (MMX_PANDNrm VR64:$src1, addr:$src2)>; +def : Pat<(v1i64 (and (xor VR64:$src1, (bc_v1i64 (v4i16 immAllOnesV))), + (load addr:$src2))), + (MMX_PANDNrm VR64:$src1, addr:$src2)>; +def : Pat<(v1i64 (and (xor VR64:$src1, (bc_v1i64 (v8i8 immAllOnesV))), + (load addr:$src2))), + (MMX_PANDNrm VR64:$src1, addr:$src2)>; From isanbard at gmail.com Tue Mar 27 15:24:13 2007 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 27 Mar 2007 15:24:13 -0500 Subject: [llvm-commits] CVS: llvm/utils/emacs/tablegen-mode.el Message-ID: <200703272024.l2RKOD6W013464@zion.cs.uiuc.edu> Changes in directory llvm/utils/emacs: tablegen-mode.el updated: 1.2 -> 1.3 --- Log message: Add better support for keywords. --- Diffs of the changes: (+40 -21) tablegen-mode.el | 61 ++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 40 insertions(+), 21 deletions(-) Index: llvm/utils/emacs/tablegen-mode.el diff -u llvm/utils/emacs/tablegen-mode.el:1.2 llvm/utils/emacs/tablegen-mode.el:1.3 --- llvm/utils/emacs/tablegen-mode.el:1.2 Mon Mar 13 23:54:52 2006 +++ llvm/utils/emacs/tablegen-mode.el Tue Mar 27 15:23:56 2007 @@ -1,32 +1,51 @@ ;; Maintainer: The LLVM team, http://llvm.org/ ;; Description: Major mode for TableGen description files (part of LLVM project) -;; Updated: 2003-08-11 +;; Updated: 2007-03-26 + +(require 'comint) +(require 'custom) +(require 'ansi-color) ;; Create mode-specific tables. (defvar tablegen-mode-syntax-table nil "Syntax table used while in TableGen mode.") +(defvar td-decorators-face 'td-decorators-face + "Face method decorators.") +(make-face 'td-decorators-face) + (defvar tablegen-font-lock-keywords - (list - ;; Comments - '("\/\/.*" . font-lock-comment-face) - ;; Strings - '("\"[^\"]+\"" . font-lock-string-face) - ;; Hex constants - '("0x[0-9A-Fa-f]+" . font-lock-preprocessor-face) - ;; Binary constants - '("0b[01]+" . font-lock-preprocessor-face) - ;; Integer literals - '("[-]?[0-9]+" . font-lock-preprocessor-face) - ;; Floating point constants - '("[-+]?[0-9]+\.[0-9]*\([eE][-+]?[0-9]+\)?" . font-lock-preprocessor-face) - ;; Keywords - '("include\\|def\\|let\\|in\\|code\\|dag\\|field" . font-lock-keyword-face) - ;; Types - '("class\\|int\\|string\\|list\\|bits?" . font-lock-type-face) - ) - "Syntax highlighting for TableGen" - ) + (let ((kw (mapconcat 'identity + '("class" "def" "defm" "field" "in" "include" + "let" "multiclass") + "\\|")) + (type-kw (mapconcat 'identity + '("bit" "bits" "code" "dag" "int" "list" "string") + "\\|")) + ) + (list + ;; Comments + '("\/\/" . font-lock-comment-face) + ;; Strings + '("\"[^\"]+\"" . font-lock-string-face) + ;; Hex constants + '("0x[0-9A-Fa-f]+" . font-lock-preprocessor-face) + ;; Binary constants + '("0b[01]+" . font-lock-preprocessor-face) + ;; Integer literals + '("[-]?[0-9]+" . font-lock-preprocessor-face) + ;; Floating point constants + '("[-+]?[0-9]+\.[0-9]*\([eE][-+]?[0-9]+\)?" . font-lock-preprocessor-face) + + '("^[ \t]*\\(@.+\\)" 1 'td-decorators-face) + ;; Keywords + (cons (concat "\\<\\(" kw "\\)\\>[ \n\t(]") 1) + + ;; Type keywords + (cons (concat "\\<\\(" type-kw "\\)[ \n\t(]") 1) + )) + "Additional expressions to highlight in TableGen mode.") +(put 'tablegen-mode 'font-lock-defaults '(tablegen-font-lock-keywords)) ;; ---------------------- Syntax table --------------------------- ;; Shamelessly ripped from jasmin.el From baldrick at free.fr Tue Mar 27 15:27:42 2007 From: baldrick at free.fr (Duncan Sands) Date: Tue, 27 Mar 2007 15:27:42 -0500 Subject: [llvm-commits] CVS: llvm/test/AdaFrontend/vce_lv.adb Message-ID: <200703272027.l2RKRgJ1013534@zion.cs.uiuc.edu> Changes in directory llvm/test/AdaFrontend: vce_lv.adb added (r1.1) --- Log message: Test that a VIEW_CONVERT_EXPR used as an lvalue has the right type. --- Diffs of the changes: (+9 -0) vce_lv.adb | 9 +++++++++ 1 files changed, 9 insertions(+) Index: llvm/test/AdaFrontend/vce_lv.adb diff -c /dev/null llvm/test/AdaFrontend/vce_lv.adb:1.1 *** /dev/null Tue Mar 27 15:27:35 2007 --- llvm/test/AdaFrontend/vce_lv.adb Tue Mar 27 15:27:25 2007 *************** *** 0 **** --- 1,9 ---- + -- RUN: %llvmgcc -c %s -o /dev/null + procedure VCE_LV is + type P is access String ; + type T is new P (5 .. 7); + subtype U is String (5 .. 7); + X : T := new U'(others => 'A'); + begin + null; + end; From dpatel at apple.com Tue Mar 27 15:51:03 2007 From: dpatel at apple.com (Devang Patel) Date: Tue, 27 Mar 2007 15:51:03 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Dominators.cpp Message-ID: <200703272051.l2RKp35L014101@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Dominators.cpp updated: 1.83 -> 1.84 --- Log message: Use SmallPtrSet. --- Diffs of the changes: (+2 -1) Dominators.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/VMCore/Dominators.cpp diff -u llvm/lib/VMCore/Dominators.cpp:1.83 llvm/lib/VMCore/Dominators.cpp:1.84 --- llvm/lib/VMCore/Dominators.cpp:1.83 Mon Mar 26 19:16:08 2007 +++ llvm/lib/VMCore/Dominators.cpp Tue Mar 27 15:50:46 2007 @@ -19,6 +19,7 @@ #include "llvm/Assembly/Writer.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/SetOperations.h" +#include "llvm/ADT/SmallPtrSet.h" #include "llvm/Instructions.h" #include using namespace llvm; @@ -462,7 +463,7 @@ DomSetType *Result = NULL; std::vector workList; - std::set visited; + SmallPtrSet visited; workList.push_back(DFCalculateWorkObject(BB, NULL, Node, NULL)); do { From clattner at apple.com Tue Mar 27 15:56:19 2007 From: clattner at apple.com (Chris Lattner) Date: Tue, 27 Mar 2007 13:56:19 -0700 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86InstrMMX.td In-Reply-To: <200703272022.l2RKMv1U013427@zion.cs.uiuc.edu> References: <200703272022.l2RKMv1U013427@zion.cs.uiuc.edu> Message-ID: <8DBA794F-3410-4DEE-BDAC-7D5C11612E9F@apple.com> On Mar 27, 2007, at 1:22 PM, Bill Wendling wrote: > +// Some special case pandn patterns. > +def : Pat<(v1i64 (and (xor VR64:$src1, (bc_v1i64 (v2i32 > immAllOnesV))), > + VR64:$src2)), > + (MMX_PANDNrr VR64:$src1, VR64:$src2)>; > +def : Pat<(v1i64 (and (xor VR64:$src1, (bc_v1i64 (v4i16 > immAllOnesV))), > + VR64:$src2)), > + (MMX_PANDNrr VR64:$src1, VR64:$src2)>; > +def : Pat<(v1i64 (and (xor VR64:$src1, (bc_v1i64 (v8i8 > immAllOnesV))), > + VR64:$src2)), > + (MMX_PANDNrr VR64:$src1, VR64:$src2)>; > + > +def : Pat<(v1i64 (and (xor VR64:$src1, (bc_v1i64 (v2i32 > immAllOnesV))), > + (load addr:$src2))), > + (MMX_PANDNrm VR64:$src1, addr:$src2)>; > +def : Pat<(v1i64 (and (xor VR64:$src1, (bc_v1i64 (v4i16 > immAllOnesV))), > + (load addr:$src2))), > + (MMX_PANDNrm VR64:$src1, addr:$src2)>; > +def : Pat<(v1i64 (and (xor VR64:$src1, (bc_v1i64 (v8i8 > immAllOnesV))), > + (load addr:$src2))), > + (MMX_PANDNrm VR64:$src1, addr:$src2)>; These shouldn't be needed. Please get legalize to promote "build_vector" to a single vector type like it does for loads. This would eliminate the need for these patterns. -chris From isanbard at gmail.com Tue Mar 27 16:20:53 2007 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 27 Mar 2007 16:20:53 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrMMX.td Message-ID: <200703272120.l2RLKrPp014854@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86InstrMMX.td updated: 1.26 -> 1.27 --- Log message: Add the "unpack low packed data" instructions. This should be the last of the MMX instructions that are needed... --- Diffs of the changes: (+130 -73) X86InstrMMX.td | 203 ++++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 130 insertions(+), 73 deletions(-) Index: llvm/lib/Target/X86/X86InstrMMX.td diff -u llvm/lib/Target/X86/X86InstrMMX.td:1.26 llvm/lib/Target/X86/X86InstrMMX.td:1.27 --- llvm/lib/Target/X86/X86InstrMMX.td:1.26 Tue Mar 27 15:22:40 2007 +++ llvm/lib/Target/X86/X86InstrMMX.td Tue Mar 27 16:20:36 2007 @@ -2,8 +2,8 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by the Evan Cheng and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. +// This file was developed by the Evan Cheng and is distributed under the +// University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // @@ -128,6 +128,8 @@ //===----------------------------------------------------------------------===// // Arithmetic Instructions + +// -- Addition defm MMX_PADDB : MMXI_binop_rm<0xFC, "paddb", add, v8i8, 1>; defm MMX_PADDW : MMXI_binop_rm<0xFD, "paddw", add, v4i16, 1>; defm MMX_PADDD : MMXI_binop_rm<0xFE, "paddd", add, v2i32, 1>; @@ -138,6 +140,7 @@ defm MMX_PADDUSB : MMXI_binop_rm_int<0xDC, "paddusb", int_x86_mmx_paddus_b, 1>; defm MMX_PADDUSW : MMXI_binop_rm_int<0xDD, "paddusw", int_x86_mmx_paddus_w, 1>; +// -- Subtraction defm MMX_PSUBB : MMXI_binop_rm<0xF8, "psubb", sub, v8i8>; defm MMX_PSUBW : MMXI_binop_rm<0xF9, "psubw", sub, v4i16>; defm MMX_PSUBD : MMXI_binop_rm<0xFA, "psubd", sub, v2i32>; @@ -148,66 +151,12 @@ defm MMX_PSUBUSB : MMXI_binop_rm_int<0xD8, "psubusb", int_x86_mmx_psubus_b>; defm MMX_PSUBUSW : MMXI_binop_rm_int<0xD9, "psubusw", int_x86_mmx_psubus_w>; +// -- Multiplication defm MMX_PMULLW : MMXI_binop_rm<0xD5, "pmullw", mul, v4i16, 1>; - defm MMX_PMULHW : MMXI_binop_rm_int<0xE5, "pmulhw" , int_x86_mmx_pmulh_w , 1>; -defm MMX_PMADDWD : MMXI_binop_rm_int<0xF5, "pmaddwd", int_x86_mmx_pmadd_wd, 1>; - -// MMX_SHUFFLE_get_shuf_imm xform function: convert vector_shuffle mask to -// MMX_PSHUF*, MMX_SHUFP* etc. imm. -def MMX_SHUFFLE_get_shuf_imm : SDNodeXForm; - -def MMX_splat_mask : PatLeaf<(build_vector), [{ - return X86::isSplatMask(N); -}], MMX_SHUFFLE_get_shuf_imm>; - -def MMX_UNPCKH_shuffle_mask : PatLeaf<(build_vector), [{ - return X86::isUNPCKHMask(N); -}]>; -let isTwoAddress = 1 in { -def MMX_PUNPCKHBWrr : MMXI<0x68, MRMSrcReg, - (ops VR64:$dst, VR64:$src1, VR64:$src2), - "punpckhbw {$src2, $dst|$dst, $src2}", - [(set VR64:$dst, - (v8i8 (vector_shuffle VR64:$src1, VR64:$src2, - MMX_UNPCKH_shuffle_mask)))]>; -def MMX_PUNPCKHBWrm : MMXI<0x68, MRMSrcMem, - (ops VR64:$dst, VR64:$src1, i64mem:$src2), - "punpckhbw {$src2, $dst|$dst, $src2}", - [(set VR64:$dst, - (v8i8 (vector_shuffle VR64:$src1, - (bc_v8i8 (load_mmx addr:$src2)), - MMX_UNPCKH_shuffle_mask)))]>; -def MMX_PUNPCKHWDrr : MMXI<0x69, MRMSrcReg, - (ops VR64:$dst, VR64:$src1, VR64:$src2), - "punpckhwd {$src2, $dst|$dst, $src2}", - [(set VR64:$dst, - (v4i16 (vector_shuffle VR64:$src1, VR64:$src2, - MMX_UNPCKH_shuffle_mask)))]>; -def MMX_PUNPCKHWDrm : MMXI<0x69, MRMSrcMem, - (ops VR64:$dst, VR64:$src1, i64mem:$src2), - "punpckhwd {$src2, $dst|$dst, $src2}", - [(set VR64:$dst, - (v4i16 (vector_shuffle VR64:$src1, - (bc_v4i16 (load_mmx addr:$src2)), - MMX_UNPCKH_shuffle_mask)))]>; -def MMX_PUNPCKHDQrr : MMXI<0x6A, MRMSrcReg, - (ops VR64:$dst, VR64:$src1, VR64:$src2), - "punpckhdq {$src2, $dst|$dst, $src2}", - [(set VR64:$dst, - (v1i64 (vector_shuffle VR64:$src1, VR64:$src2, - MMX_UNPCKH_shuffle_mask)))]>; -def MMX_PUNPCKHDQrm : MMXI<0x6A, MRMSrcMem, - (ops VR64:$dst, VR64:$src1, i64mem:$src2), - "punpckhdq {$src2, $dst|$dst, $src2}", - [(set VR64:$dst, - (v1i64 (vector_shuffle VR64:$src1, - (load_mmx addr:$src2), - MMX_UNPCKH_shuffle_mask)))]>; -} +// -- Multiply and Add +defm MMX_PMADDWD : MMXI_binop_rm_int<0xF5, "pmaddwd", int_x86_mmx_pmadd_wd, 1>; // Logical Instructions defm MMX_PAND : MMXI_binop_rm_v1i64<0xDB, "pand", and, 1>; @@ -247,12 +196,7 @@ defm MMX_PSRAD : MMXI_binop_rmi_int<0xE2, 0x72, MRM4r, "psrad", int_x86_mmx_psra_d>; -// Pack instructions -defm MMX_PACKSSWB : MMXI_binop_rm_int<0x63, "packsswb", int_x86_mmx_packsswb>; -defm MMX_PACKSSDW : MMXI_binop_rm_int<0x6B, "packssdw", int_x86_mmx_packssdw>; -defm MMX_PACKUSWB : MMXI_binop_rm_int<0x67, "packuswb", int_x86_mmx_packuswb>; - -// Integer comparison +// Comparison Instructions defm MMX_PCMPEQB : MMXI_binop_rm_int<0x74, "pcmpeqb", int_x86_mmx_pcmpeq_b>; defm MMX_PCMPEQW : MMXI_binop_rm_int<0x75, "pcmpeqw", int_x86_mmx_pcmpeq_w>; defm MMX_PCMPEQD : MMXI_binop_rm_int<0x76, "pcmpeqd", int_x86_mmx_pcmpeq_d>; @@ -261,7 +205,110 @@ defm MMX_PCMPGTW : MMXI_binop_rm_int<0x65, "pcmpgtw", int_x86_mmx_pcmpgt_w>; defm MMX_PCMPGTD : MMXI_binop_rm_int<0x66, "pcmpgtd", int_x86_mmx_pcmpgt_d>; -// Move Instructions +// Conversion Instructions +def MMX_UNPCKH_shuffle_mask : PatLeaf<(build_vector), [{ + return X86::isUNPCKHMask(N); +}]>; + +def MMX_UNPCKL_shuffle_mask : PatLeaf<(build_vector), [{ + return X86::isUNPCKLMask(N); +}]>; + +// -- Unpack Instructions +let isTwoAddress = 1 in { + // Unpack High Packed Data Instructions + def MMX_PUNPCKHBWrr : MMXI<0x68, MRMSrcReg, + (ops VR64:$dst, VR64:$src1, VR64:$src2), + "punpckhbw {$src2, $dst|$dst, $src2}", + [(set VR64:$dst, + (v8i8 (vector_shuffle VR64:$src1, VR64:$src2, + MMX_UNPCKH_shuffle_mask)))]>; + def MMX_PUNPCKHBWrm : MMXI<0x68, MRMSrcMem, + (ops VR64:$dst, VR64:$src1, i64mem:$src2), + "punpckhbw {$src2, $dst|$dst, $src2}", + [(set VR64:$dst, + (v8i8 (vector_shuffle VR64:$src1, + (bc_v8i8 (load_mmx addr:$src2)), + MMX_UNPCKH_shuffle_mask)))]>; + + def MMX_PUNPCKHWDrr : MMXI<0x69, MRMSrcReg, + (ops VR64:$dst, VR64:$src1, VR64:$src2), + "punpckhwd {$src2, $dst|$dst, $src2}", + [(set VR64:$dst, + (v4i16 (vector_shuffle VR64:$src1, VR64:$src2, + MMX_UNPCKH_shuffle_mask)))]>; + def MMX_PUNPCKHWDrm : MMXI<0x69, MRMSrcMem, + (ops VR64:$dst, VR64:$src1, i64mem:$src2), + "punpckhwd {$src2, $dst|$dst, $src2}", + [(set VR64:$dst, + (v4i16 (vector_shuffle VR64:$src1, + (bc_v4i16 (load_mmx addr:$src2)), + MMX_UNPCKH_shuffle_mask)))]>; + + def MMX_PUNPCKHDQrr : MMXI<0x6A, MRMSrcReg, + (ops VR64:$dst, VR64:$src1, VR64:$src2), + "punpckhdq {$src2, $dst|$dst, $src2}", + [(set VR64:$dst, + (v2i32 (vector_shuffle VR64:$src1, VR64:$src2, + MMX_UNPCKH_shuffle_mask)))]>; + def MMX_PUNPCKHDQrm : MMXI<0x6A, MRMSrcMem, + (ops VR64:$dst, VR64:$src1, i64mem:$src2), + "punpckhdq {$src2, $dst|$dst, $src2}", + [(set VR64:$dst, + (v2i32 (vector_shuffle VR64:$src1, + (bc_v2i32 (load_mmx addr:$src2)), + MMX_UNPCKH_shuffle_mask)))]>; + + // Unpack Low Packed Data Instructions + def MMX_PUNPCKLBWrr : MMXI<0x60, MRMSrcReg, + (ops VR64:$dst, VR64:$src1, VR64:$src2), + "punpcklbw {$src2, $dst|$dst, $src2}", + [(set VR64:$dst, + (v8i8 (vector_shuffle VR64:$src1, VR64:$src2, + MMX_UNPCKL_shuffle_mask)))]>; + def MMX_PUNPCKLBWrm : MMXI<0x60, MRMSrcMem, + (ops VR64:$dst, VR64:$src1, i64mem:$src2), + "punpcklbw {$src2, $dst|$dst, $src2}", + [(set VR64:$dst, + (v8i8 (vector_shuffle VR64:$src1, + (bc_v8i8 (load_mmx addr:$src2)), + MMX_UNPCKL_shuffle_mask)))]>; + + def MMX_PUNPCKLWDrr : MMXI<0x61, MRMSrcReg, + (ops VR64:$dst, VR64:$src1, VR64:$src2), + "punpcklwd {$src2, $dst|$dst, $src2}", + [(set VR64:$dst, + (v4i16 (vector_shuffle VR64:$src1, VR64:$src2, + MMX_UNPCKL_shuffle_mask)))]>; + def MMX_PUNPCKLWDrm : MMXI<0x61, MRMSrcMem, + (ops VR64:$dst, VR64:$src1, i64mem:$src2), + "punpcklwd {$src2, $dst|$dst, $src2}", + [(set VR64:$dst, + (v4i16 (vector_shuffle VR64:$src1, + (bc_v4i16 (load_mmx addr:$src2)), + MMX_UNPCKL_shuffle_mask)))]>; + + def MMX_PUNPCKLDQrr : MMXI<0x62, MRMSrcReg, + (ops VR64:$dst, VR64:$src1, VR64:$src2), + "punpckldq {$src2, $dst|$dst, $src2}", + [(set VR64:$dst, + (v2i32 (vector_shuffle VR64:$src1, VR64:$src2, + MMX_UNPCKL_shuffle_mask)))]>; + def MMX_PUNPCKLDQrm : MMXI<0x62, MRMSrcMem, + (ops VR64:$dst, VR64:$src1, i64mem:$src2), + "punpckldq {$src2, $dst|$dst, $src2}", + [(set VR64:$dst, + (v2i32 (vector_shuffle VR64:$src1, + (bc_v2i32 (load_mmx addr:$src2)), + MMX_UNPCKL_shuffle_mask)))]>; +} + +// -- Pack Instructions +defm MMX_PACKSSWB : MMXI_binop_rm_int<0x63, "packsswb", int_x86_mmx_packsswb>; +defm MMX_PACKSSDW : MMXI_binop_rm_int<0x6B, "packssdw", int_x86_mmx_packssdw>; +defm MMX_PACKUSWB : MMXI_binop_rm_int<0x67, "packuswb", int_x86_mmx_packuswb>; + +// Data Transfer Instructions def MOVD64rr : MMXI<0x6E, MRMSrcReg, (ops VR64:$dst, GR32:$src), "movd {$src, $dst|$dst, $src}", []>; def MOVD64rm : MMXI<0x6E, MRMSrcMem, (ops VR64:$dst, i32mem:$src), @@ -326,12 +373,12 @@ // Alias instructions that map zero vector to pxor. // FIXME: remove when we can teach regalloc that xor reg, reg is ok. let isReMaterializable = 1 in { -def MMX_V_SET0 : MMXI<0xEF, MRMInitReg, (ops VR64:$dst), - "pxor $dst, $dst", - [(set VR64:$dst, (v1i64 immAllZerosV))]>; -def MMX_V_SETALLONES : MMXI<0x76, MRMInitReg, (ops VR64:$dst), - "pcmpeqd $dst, $dst", - [(set VR64:$dst, (v1i64 immAllOnesV))]>; + def MMX_V_SET0 : MMXI<0xEF, MRMInitReg, (ops VR64:$dst), + "pxor $dst, $dst", + [(set VR64:$dst, (v1i64 immAllZerosV))]>; + def MMX_V_SETALLONES : MMXI<0x76, MRMInitReg, (ops VR64:$dst), + "pcmpeqd $dst, $dst", + [(set VR64:$dst, (v1i64 immAllOnesV))]>; } //===----------------------------------------------------------------------===// @@ -373,6 +420,16 @@ def : Pat<(v1i64 (bitconvert (v8i8 VR64:$src))), (v1i64 VR64:$src)>; // Splat v1i64 +// MMX_SHUFFLE_get_shuf_imm xform function: convert vector_shuffle mask to +// MMX_PSHUF*, MMX_SHUFP* etc. imm. +def MMX_SHUFFLE_get_shuf_imm : SDNodeXForm; + +def MMX_splat_mask : PatLeaf<(build_vector), [{ + return X86::isSplatMask(N); +}], MMX_SHUFFLE_get_shuf_imm>; + let AddedComplexity = 10 in { def : Pat<(vector_shuffle (v1i64 VR64:$src), (undef), MMX_splat_mask:$sm), @@ -389,7 +446,7 @@ def : Pat<(v8i8 (MMX_X86s2vec GR32:$src)), (MOVD64rr GR32:$src)>; def : Pat<(v4i16 (MMX_X86s2vec GR32:$src)), (MOVD64rr GR32:$src)>; -// Some special case pandn patterns. +// Some special case PANDN patterns. def : Pat<(v1i64 (and (xor VR64:$src1, (bc_v1i64 (v2i32 immAllOnesV))), VR64:$src2)), (MMX_PANDNrr VR64:$src1, VR64:$src2)>; From tonic at nondot.org Tue Mar 27 18:19:59 2007 From: tonic at nondot.org (Tanya Lattner) Date: Tue, 27 Mar 2007 18:19:59 -0500 Subject: [llvm-commits] CVS: llvm/docs/Makefile Message-ID: <200703272319.l2RNJxgH012714@zion.cs.uiuc.edu> Changes in directory llvm/docs: Makefile updated: 1.14 -> 1.15 --- Log message: Fixing doxygen.cfg target. I'm not a makefile expert, so hopefully this correct.Tested doxygen generation on zion. --- Diffs of the changes: (+1 -1) Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/docs/Makefile diff -u llvm/docs/Makefile:1.14 llvm/docs/Makefile:1.15 --- llvm/docs/Makefile:1.14 Tue Mar 27 01:06:15 2007 +++ llvm/docs/Makefile Tue Mar 27 18:19:39 2007 @@ -18,7 +18,7 @@ PACKAGE_VERSION = $(shell grep AC_INIT ../autoconf/configure.ac | sed -e 's/[^,]*,[[][[]//' -e 's/]],.*//') $(warning VERSION=$(VERSION)) -doxygen.cfg: doxygen.cfg.in +$(PROJ_OBJ_DIR)/doxygen.cfg: doxygen.cfg.in cat $< | sed \ -e 's/@abs_top_srcdir@/../g' \ -e 's/@DOT@/dot/g' \ From sabre at nondot.org Tue Mar 27 19:03:27 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 27 Mar 2007 19:03:27 -0500 Subject: [llvm-commits] CVS: llvm/test/C++Frontend/2007-03-27-FunctionVarRename.cpp Message-ID: <200703280003.l2S03RZA016193@zion.cs.uiuc.edu> Changes in directory llvm/test/C++Frontend: 2007-03-27-FunctionVarRename.cpp added (r1.1) --- Log message: new testcase --- Diffs of the changes: (+17 -0) 2007-03-27-FunctionVarRename.cpp | 17 +++++++++++++++++ 1 files changed, 17 insertions(+) Index: llvm/test/C++Frontend/2007-03-27-FunctionVarRename.cpp diff -c /dev/null llvm/test/C++Frontend/2007-03-27-FunctionVarRename.cpp:1.1 *** /dev/null Tue Mar 27 19:03:20 2007 --- llvm/test/C++Frontend/2007-03-27-FunctionVarRename.cpp Tue Mar 27 19:03:10 2007 *************** *** 0 **** --- 1,17 ---- + // RUN: %llvmgxx %s -emit-llvm -S -o - | not grep 'eprintf1' && + // RUN: %llvmgxx %s -emit-llvm -S -o - | not grep 'eprintf' + + // Only one eprintf should exist in the output + + extern "C" + void __eprintf(); + + void foo() { + + __eprintf(); + } + + void *bar() { + extern void *__eprintf; + return &__eprintf; + } From clattner at apple.com Tue Mar 27 19:04:40 2007 From: clattner at apple.com (clattner at apple.com) Date: Tue, 27 Mar 2007 17:04:40 -0700 (PDT) Subject: [llvm-commits] [125424] Fix C++Frontend/2007-03-27-FunctionVarRename.cpp Message-ID: <20070328000440.5F483BAC6636@src> Revision: 125424 Author: clattner Date: 2007-03-27 17:04:40 -0700 (Tue, 27 Mar 2007) Log Message: ----------- Fix C++Frontend/2007-03-27-FunctionVarRename.cpp Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-backend.cpp apple-local/branches/llvm/gcc/llvm-convert.cpp apple-local/branches/llvm/gcc/llvm-internal.h Modified: apple-local/branches/llvm/gcc/llvm-backend.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-backend.cpp 2007-03-27 23:55:33 UTC (rev 125423) +++ apple-local/branches/llvm/gcc/llvm-backend.cpp 2007-03-28 00:04:40 UTC (rev 125424) @@ -789,11 +789,12 @@ // If we have "extern void foo", make the global have type {} instead of // type void. - if (Ty == Type::VoidTy) Ty = StructType::get(std::vector(), - false); + if (Ty == Type::VoidTy) + Ty = StructType::get(std::vector(), false); + if (Name[0] == 0) { // Global has no name. GV = new GlobalVariable(Ty, false, GlobalValue::ExternalLinkage, 0, - Name, TheModule); + "", TheModule); // Check for external weak linkage if (DECL_EXTERNAL(decl) && DECL_WEAK(decl)) @@ -826,6 +827,28 @@ // Handle visibility style if (TREE_PUBLIC(decl) && DECL_VISIBILITY(decl) == VISIBILITY_HIDDEN) GV->setVisibility(Function::HiddenVisibility); + + // If GV got renamed, then there is already an object with this name in + // the symbol table. If this happens, the old one must be a forward + // decl, just replace it with a cast of the new one. + if (GV->getName() != Name) { + Function *F = TheModule->getFunction(Name); + assert(F && F->isDeclaration() && "A function turned into a global?"); + + // Replace any uses of "F" with uses of GV. + Value *FInNewType = ConstantExpr::getBitCast(GV, F->getType()); + F->replaceAllUsesWith(FInNewType); + + // Update the decl that points to F. + changeLLVMValue(F, FInNewType); + + // F is now dead, nuke it. + F->eraseFromParent(); + + // Now we can give GV the proper name. + GV->setName(Name); + } + } else { GV = GVE; // Global already created, reuse it. } Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-03-27 23:55:33 UTC (rev 125423) +++ apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-03-28 00:04:40 UTC (rev 125424) @@ -133,6 +133,29 @@ return LLVMValues[Index - 1]; } +/// changeLLVMValue - If Old exists in the LLVMValues map, rewrite it to New. +/// At this point we know that New is not in the map. +void changeLLVMValue(Value *Old, Value *New) { + assert(!LLVMValuesMap.count(New) && "New cannot be in the map!"); + + // Find Old in the table. + LLVMValuesMapTy::iterator I = LLVMValuesMap.find(Old); + if (I == LLVMValuesMap.end()) return; + + unsigned Idx = I->second-1; + assert(Idx < LLVMValues.size() && "Out of range index!"); + assert(LLVMValues[Idx] == Old && "Inconsistent LLVMValues mapping!"); + + LLVMValues[Idx] = New; + + // Remove the old value from the value map. + LLVMValuesMap.erase(I); + + // Insert the new value into the value map. We know that it can't already + // exist in the mapping. + LLVMValuesMap[New] = Idx+1; +} + // Read LLVM Types string table void readLLVMValuesStringTable() { Modified: apple-local/branches/llvm/gcc/llvm-internal.h =================================================================== --- apple-local/branches/llvm/gcc/llvm-internal.h 2007-03-27 23:55:33 UTC (rev 125423) +++ apple-local/branches/llvm/gcc/llvm-internal.h 2007-03-28 00:04:40 UTC (rev 125424) @@ -87,11 +87,12 @@ /// AttributeUsedGlobals - The list of globals that are marked attribute(used). extern std::vector AttributeUsedGlobals; -extern void readLLVMTypesStringTable(); -extern void writeLLVMTypesStringTable(); -extern void readLLVMValuesStringTable(); -extern void writeLLVMValuesStringTable(); -extern void clearTargetBuiltinCache(); +void changeLLVMValue(Value *Old, Value *New); +void readLLVMTypesStringTable(); +void writeLLVMTypesStringTable(); +void readLLVMValuesStringTable(); +void writeLLVMValuesStringTable(); +void clearTargetBuiltinCache(); struct StructTypeConversionInfo; From isanbard at gmail.com Tue Mar 27 19:57:29 2007 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 27 Mar 2007 19:57:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86InstrMMX.td Message-ID: <200703280057.l2S0vTF5017276@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.380 -> 1.381 X86InstrMMX.td updated: 1.27 -> 1.28 --- Log message: Unbreak mmx arithmetic. It was barfing trying to do v8i8 arithmetic. --- Diffs of the changes: (+78 -3) X86ISelLowering.cpp | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++-- X86InstrMMX.td | 2 - 2 files changed, 78 insertions(+), 3 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.380 llvm/lib/Target/X86/X86ISelLowering.cpp:1.381 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.380 Tue Mar 27 15:22:40 2007 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Tue Mar 27 19:57:11 2007 @@ -370,6 +370,9 @@ setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v4i16, Custom); setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v2i32, Custom); setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v1i64, Custom); + + setOperationAction(ISD::SCALAR_TO_VECTOR, MVT::v8i8, Custom); + setOperationAction(ISD::SCALAR_TO_VECTOR, MVT::v4i16, Custom); } if (Subtarget->hasSSE1()) { @@ -2283,6 +2286,78 @@ return DAG.getNode(ISD::VECTOR_SHUFFLE, VT, V1, V2, Mask); } +/// LowerBuildVectorv8i8 - Custom lower build_vector of v8i8. +/// +static SDOperand LowerBuildVectorv8i8(SDOperand Op, unsigned NonZeros, + unsigned NumNonZero, unsigned NumZero, + SelectionDAG &DAG, TargetLowering &TLI) { + if (NumNonZero > 8) + return SDOperand(); + + SDOperand V(0, 0); + bool First = true; + for (unsigned i = 0; i < 8; ++i) { + bool ThisIsNonZero = (NonZeros & (1 << i)) != 0; + if (ThisIsNonZero && First) { + if (NumZero) + V = getZeroVector(MVT::v4i16, DAG); + else + V = DAG.getNode(ISD::UNDEF, MVT::v4i16); + First = false; + } + + if ((i & 1) != 0) { + SDOperand ThisElt(0, 0), LastElt(0, 0); + bool LastIsNonZero = (NonZeros & (1 << (i-1))) != 0; + if (LastIsNonZero) { + LastElt = DAG.getNode(ISD::ZERO_EXTEND, MVT::i16, Op.getOperand(i-1)); + } + if (ThisIsNonZero) { + ThisElt = DAG.getNode(ISD::ZERO_EXTEND, MVT::i16, Op.getOperand(i)); + ThisElt = DAG.getNode(ISD::SHL, MVT::i16, + ThisElt, DAG.getConstant(8, MVT::i8)); + if (LastIsNonZero) + ThisElt = DAG.getNode(ISD::OR, MVT::i16, ThisElt, LastElt); + } else + ThisElt = LastElt; + + if (ThisElt.Val) + V = DAG.getNode(ISD::INSERT_VECTOR_ELT, MVT::v4i16, V, ThisElt, + DAG.getConstant(i/2, TLI.getPointerTy())); + } + } + + return DAG.getNode(ISD::BIT_CONVERT, MVT::v8i8, V); +} + +/// LowerBuildVectorv4i16 - Custom lower build_vector of v4i16. +/// +static SDOperand LowerBuildVectorv4i16(SDOperand Op, unsigned NonZeros, + unsigned NumNonZero, unsigned NumZero, + SelectionDAG &DAG, TargetLowering &TLI) { + if (NumNonZero > 4) + return SDOperand(); + + SDOperand V(0, 0); + bool First = true; + for (unsigned i = 0; i < 4; ++i) { + bool isNonZero = (NonZeros & (1 << i)) != 0; + if (isNonZero) { + if (First) { + if (NumZero) + V = getZeroVector(MVT::v4i16, DAG); + else + V = DAG.getNode(ISD::UNDEF, MVT::v4i16); + First = false; + } + V = DAG.getNode(ISD::INSERT_VECTOR_ELT, MVT::v4i16, V, Op.getOperand(i), + DAG.getConstant(i, TLI.getPointerTy())); + } + } + + return V; +} + /// LowerBuildVectorv16i8 - Custom lower build_vector of v16i8. /// static SDOperand LowerBuildVectorv16i8(SDOperand Op, unsigned NonZeros, @@ -2426,13 +2501,13 @@ return SDOperand(); // If element VT is < 32 bits, convert it to inserts into a zero vector. - if (EVTBits == 8) { + if (EVTBits == 8 && NumElems == 16) { SDOperand V = LowerBuildVectorv16i8(Op, NonZeros,NumNonZero,NumZero, DAG, *this); if (V.Val) return V; } - if (EVTBits == 16) { + if (EVTBits == 16 && NumElems == 8) { SDOperand V = LowerBuildVectorv8i16(Op, NonZeros,NumNonZero,NumZero, DAG, *this); if (V.Val) return V; Index: llvm/lib/Target/X86/X86InstrMMX.td diff -u llvm/lib/Target/X86/X86InstrMMX.td:1.27 llvm/lib/Target/X86/X86InstrMMX.td:1.28 --- llvm/lib/Target/X86/X86InstrMMX.td:1.27 Tue Mar 27 16:20:36 2007 +++ llvm/lib/Target/X86/X86InstrMMX.td Tue Mar 27 19:57:11 2007 @@ -2,7 +2,7 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by the Evan Cheng and is distributed under the +// This file was developed by Evan Cheng and is distributed under the // University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// From sabre at nondot.org Tue Mar 27 19:58:57 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 27 Mar 2007 19:58:57 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.cpp Message-ID: <200703280058.l2S0wvJo017347@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86InstrInfo.cpp updated: 1.79 -> 1.80 --- Log message: Fix a problem building llvm-gcc on amd64-unknown-freebsd6.2, due to the system assembler not groking legal instructions like "leal (,%esi,8), %ecx". --- Diffs of the changes: (+3 -1) X86InstrInfo.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86InstrInfo.cpp diff -u llvm/lib/Target/X86/X86InstrInfo.cpp:1.79 llvm/lib/Target/X86/X86InstrInfo.cpp:1.80 --- llvm/lib/Target/X86/X86InstrInfo.cpp:1.79 Tue Mar 20 01:08:29 2007 +++ llvm/lib/Target/X86/X86InstrInfo.cpp Tue Mar 27 19:58:40 2007 @@ -158,7 +158,9 @@ unsigned ShAmt = MI->getOperand(2).getImm(); if (ShAmt == 0 || ShAmt >= 4) return 0; - NewMI = BuildMI(get(X86::LEA32r), Dest) + unsigned Opc = TM.getSubtarget().is64Bit() ? + X86::LEA64_32r : X86::LEA32r; + NewMI = BuildMI(get(Opc), Dest) .addReg(0).addImm(1 << ShAmt).addReg(Src).addImm(0); break; } From clattner at apple.com Tue Mar 27 20:02:19 2007 From: clattner at apple.com (Chris Lattner) Date: Tue, 27 Mar 2007 18:02:19 -0700 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86InstrMMX.td In-Reply-To: <200703280057.l2S0vTF5017276@zion.cs.uiuc.edu> References: <200703280057.l2S0vTF5017276@zion.cs.uiuc.edu> Message-ID: <6B765B7A-186C-49D1-BE36-578DD6888F70@apple.com> On Mar 27, 2007, at 5:57 PM, Bill Wendling wrote: > -// This file was developed by the Evan Cheng and is distributed > under the > +// This file was developed by Evan Cheng and is distributed under the Why are you dissing on the evan? -Chris From isanbard at gmail.com Tue Mar 27 20:03:11 2007 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 27 Mar 2007 20:03:11 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp Message-ID: <200703280103.l2S13BQO017436@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.381 -> 1.382 --- Log message: Remove cruft I put in there... --- Diffs of the changes: (+0 -72) X86ISelLowering.cpp | 72 ---------------------------------------------------- 1 files changed, 72 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.381 llvm/lib/Target/X86/X86ISelLowering.cpp:1.382 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.381 Tue Mar 27 19:57:11 2007 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Tue Mar 27 20:02:54 2007 @@ -2286,78 +2286,6 @@ return DAG.getNode(ISD::VECTOR_SHUFFLE, VT, V1, V2, Mask); } -/// LowerBuildVectorv8i8 - Custom lower build_vector of v8i8. -/// -static SDOperand LowerBuildVectorv8i8(SDOperand Op, unsigned NonZeros, - unsigned NumNonZero, unsigned NumZero, - SelectionDAG &DAG, TargetLowering &TLI) { - if (NumNonZero > 8) - return SDOperand(); - - SDOperand V(0, 0); - bool First = true; - for (unsigned i = 0; i < 8; ++i) { - bool ThisIsNonZero = (NonZeros & (1 << i)) != 0; - if (ThisIsNonZero && First) { - if (NumZero) - V = getZeroVector(MVT::v4i16, DAG); - else - V = DAG.getNode(ISD::UNDEF, MVT::v4i16); - First = false; - } - - if ((i & 1) != 0) { - SDOperand ThisElt(0, 0), LastElt(0, 0); - bool LastIsNonZero = (NonZeros & (1 << (i-1))) != 0; - if (LastIsNonZero) { - LastElt = DAG.getNode(ISD::ZERO_EXTEND, MVT::i16, Op.getOperand(i-1)); - } - if (ThisIsNonZero) { - ThisElt = DAG.getNode(ISD::ZERO_EXTEND, MVT::i16, Op.getOperand(i)); - ThisElt = DAG.getNode(ISD::SHL, MVT::i16, - ThisElt, DAG.getConstant(8, MVT::i8)); - if (LastIsNonZero) - ThisElt = DAG.getNode(ISD::OR, MVT::i16, ThisElt, LastElt); - } else - ThisElt = LastElt; - - if (ThisElt.Val) - V = DAG.getNode(ISD::INSERT_VECTOR_ELT, MVT::v4i16, V, ThisElt, - DAG.getConstant(i/2, TLI.getPointerTy())); - } - } - - return DAG.getNode(ISD::BIT_CONVERT, MVT::v8i8, V); -} - -/// LowerBuildVectorv4i16 - Custom lower build_vector of v4i16. -/// -static SDOperand LowerBuildVectorv4i16(SDOperand Op, unsigned NonZeros, - unsigned NumNonZero, unsigned NumZero, - SelectionDAG &DAG, TargetLowering &TLI) { - if (NumNonZero > 4) - return SDOperand(); - - SDOperand V(0, 0); - bool First = true; - for (unsigned i = 0; i < 4; ++i) { - bool isNonZero = (NonZeros & (1 << i)) != 0; - if (isNonZero) { - if (First) { - if (NumZero) - V = getZeroVector(MVT::v4i16, DAG); - else - V = DAG.getNode(ISD::UNDEF, MVT::v4i16); - First = false; - } - V = DAG.getNode(ISD::INSERT_VECTOR_ELT, MVT::v4i16, V, Op.getOperand(i), - DAG.getConstant(i, TLI.getPointerTy())); - } - } - - return V; -} - /// LowerBuildVectorv16i8 - Custom lower build_vector of v16i8. /// static SDOperand LowerBuildVectorv16i8(SDOperand Op, unsigned NonZeros, From jeffc at jolt-lang.org Tue Mar 27 20:04:18 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Tue, 27 Mar 2007 18:04:18 -0700 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.cpp In-Reply-To: <200703280058.l2S0wvJo017347@zion.cs.uiuc.edu> References: <200703280058.l2S0wvJo017347@zion.cs.uiuc.edu> Message-ID: <4609BF12.9080902@jolt-lang.org> FWIW, the system assembler is GNU assembler 2.15. Chris Lattner wrote: > Changes in directory llvm/lib/Target/X86: > > X86InstrInfo.cpp updated: 1.79 -> 1.80 > --- > Log message: > > Fix a problem building llvm-gcc on amd64-unknown-freebsd6.2, due to the > system assembler not groking legal instructions like "leal (,%esi,8), %ecx". > > > --- > Diffs of the changes: (+3 -1) > > X86InstrInfo.cpp | 4 +++- > 1 files changed, 3 insertions(+), 1 deletion(-) > > > Index: llvm/lib/Target/X86/X86InstrInfo.cpp > diff -u llvm/lib/Target/X86/X86InstrInfo.cpp:1.79 llvm/lib/Target/X86/X86InstrInfo.cpp:1.80 > --- llvm/lib/Target/X86/X86InstrInfo.cpp:1.79 Tue Mar 20 01:08:29 2007 > +++ llvm/lib/Target/X86/X86InstrInfo.cpp Tue Mar 27 19:58:40 2007 > @@ -158,7 +158,9 @@ > unsigned ShAmt = MI->getOperand(2).getImm(); > if (ShAmt == 0 || ShAmt >= 4) return 0; > > - NewMI = BuildMI(get(X86::LEA32r), Dest) > + unsigned Opc = TM.getSubtarget().is64Bit() ? > + X86::LEA64_32r : X86::LEA32r; > + NewMI = BuildMI(get(Opc), Dest) > .addReg(0).addImm(1 << ShAmt).addReg(Src).addImm(0); > break; > } > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > > > From isanbard at gmail.com Tue Mar 27 20:10:03 2007 From: isanbard at gmail.com (Bill) Date: Tue, 27 Mar 2007 18:10:03 -0700 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp X86InstrMMX.td In-Reply-To: <6B765B7A-186C-49D1-BE36-578DD6888F70@apple.com> References: <200703280057.l2S0vTF5017276@zion.cs.uiuc.edu> <6B765B7A-186C-49D1-BE36-578DD6888F70@apple.com> Message-ID: <16e5fdf90703271810y87c5ec7m131e7e588b7edadb@mail.gmail.com> On 3/27/07, Chris Lattner wrote: > > On Mar 27, 2007, at 5:57 PM, Bill Wendling wrote: > > > -// This file was developed by the Evan Cheng and is distributed > > under the > > +// This file was developed by Evan Cheng and is distributed under the > > Why are you dissing on the evan? > Because he's too busy to notice. :-) -bw From sabre at nondot.org Tue Mar 27 20:27:29 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 27 Mar 2007 20:27:29 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/SPARC/basictest.ll Message-ID: <200703280127.l2S1RTmb017850@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/SPARC: basictest.ll updated: 1.2 -> 1.3 --- Log message: upgrade a random test --- Diffs of the changes: (+4 -4) basictest.ll | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/test/CodeGen/SPARC/basictest.ll diff -u llvm/test/CodeGen/SPARC/basictest.ll:1.2 llvm/test/CodeGen/SPARC/basictest.ll:1.3 --- llvm/test/CodeGen/SPARC/basictest.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/SPARC/basictest.ll Tue Mar 27 20:27:12 2007 @@ -1,6 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=sparc +; RUN: llvm-as < %s | llc -march=sparc -int %test(int %X) { - %tmp.1 = add int %X, 1 ; [#uses=1] - ret int %tmp.1 +define i32 @test(i32 %X) { + %tmp.1 = add i32 %X, 1 + ret i32 %tmp.1 } From evan.cheng at apple.com Tue Mar 27 20:30:55 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 27 Mar 2007 20:30:55 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <200703280130.l2S1UtsB017918@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.228 -> 1.229 --- Log message: Fix for PR1279: http://llvm.org/PR1279 . Dead def has a live interval of length 1. Copy coalescing should not violate that. --- Diffs of the changes: (+5 -3) LiveIntervalAnalysis.cpp | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.228 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.229 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.228 Mon Mar 26 17:40:42 2007 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Mar 27 20:30:37 2007 @@ -935,9 +935,9 @@ // The instruction which defines the src is only truly dead if there are // no intermediate uses and there isn't a use beyond the copy. // FIXME: find the last use, mark is kill and shorten the live range. - if (SrcEnd > getDefIndex(CopyIdx)) + if (SrcEnd > getDefIndex(CopyIdx)) { isDead = false; - else { + } else { MachineOperand *MOU; MachineInstr *LastUse= lastRegisterUse(repSrcReg, SrcStart, CopyIdx, MOU); if (LastUse) { @@ -947,7 +947,9 @@ isShorten = true; RemoveStart = getDefIndex(getInstructionIndex(LastUse)); RemoveEnd = SrcEnd; - } + } else if (RemoveStart > 0) + // A dead def should have a single cycle interval. + ++RemoveStart; } } From sabre at nondot.org Tue Mar 27 20:31:50 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 27 Mar 2007 20:31:50 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/ScalarRepl/memset-aggregate.ll Message-ID: <200703280131.l2S1Vova017961@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/ScalarRepl: memset-aggregate.ll updated: 1.2 -> 1.3 --- Log message: new testcase --- Diffs of the changes: (+1 -1) memset-aggregate.ll | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Transforms/ScalarRepl/memset-aggregate.ll diff -u llvm/test/Transforms/ScalarRepl/memset-aggregate.ll:1.2 llvm/test/Transforms/ScalarRepl/memset-aggregate.ll:1.3 --- llvm/test/Transforms/ScalarRepl/memset-aggregate.ll:1.2 Sun Mar 18 19:15:43 2007 +++ llvm/test/Transforms/ScalarRepl/memset-aggregate.ll Tue Mar 27 20:31:33 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep 'ret i32 16843009' +; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep 'ret i32 16843009' && ; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | not grep alloca ; PR1226 From evan.cheng at apple.com Tue Mar 27 20:33:14 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 27 Mar 2007 20:33:14 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/2007-03-27-RegScavengerAssert.ll Message-ID: <200703280133.l2S1XEYp018008@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: 2007-03-27-RegScavengerAssert.ll added (r1.1) --- Log message: Added a test case for PR1279: http://llvm.org/PR1279 . --- Diffs of the changes: (+37 -0) 2007-03-27-RegScavengerAssert.ll | 37 +++++++++++++++++++++++++++++++++++++ 1 files changed, 37 insertions(+) Index: llvm/test/CodeGen/ARM/2007-03-27-RegScavengerAssert.ll diff -c /dev/null llvm/test/CodeGen/ARM/2007-03-27-RegScavengerAssert.ll:1.1 *** /dev/null Tue Mar 27 20:33:07 2007 --- llvm/test/CodeGen/ARM/2007-03-27-RegScavengerAssert.ll Tue Mar 27 20:32:57 2007 *************** *** 0 **** --- 1,37 ---- + ; RUN: llvm-as < %s | llc -march=arm -mtriple=arm-linux-gnueabi + ; PR1279 + + %struct.rtx_def = type { i16, i8, i8, %struct.u } + %struct.u = type { [1 x i64] } + + implementation ; Functions: + + define fastcc void @find_reloads_address(%struct.rtx_def** %loc) { + entry: + %ad_addr = alloca %struct.rtx_def* ; <%struct.rtx_def**> [#uses=2] + br i1 false, label %cond_next416, label %cond_true340 + + cond_true340: ; preds = %entry + ret void + + cond_next416: ; preds = %entry + %tmp1085 = load %struct.rtx_def** %ad_addr ; <%struct.rtx_def*> [#uses=1] + br i1 false, label %bb1084, label %cond_true418 + + cond_true418: ; preds = %cond_next416 + ret void + + bb1084: ; preds = %cond_next416 + br i1 false, label %cond_true1092, label %cond_next1102 + + cond_true1092: ; preds = %bb1084 + %tmp1094 = getelementptr %struct.rtx_def* %tmp1085, i32 0, i32 3 ; <%struct.u*> [#uses=1] + %tmp10981099 = bitcast %struct.u* %tmp1094 to %struct.rtx_def** ; <%struct.rtx_def**> [#uses=2] + %tmp1101 = load %struct.rtx_def** %tmp10981099 ; <%struct.rtx_def*> [#uses=1] + store %struct.rtx_def* %tmp1101, %struct.rtx_def** %ad_addr + br label %cond_next1102 + + cond_next1102: ; preds = %cond_true1092, %bb1084 + %loc_addr.0 = phi %struct.rtx_def** [ %tmp10981099, %cond_true1092 ], [ %loc, %bb1084 ] ; <%struct.rtx_def**> [#uses=0] + ret void + } From reid at x10sys.com Tue Mar 27 20:35:45 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 20:35:45 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/apint-add1.ll apint-add2.ll Message-ID: <200703280135.l2S1ZjtA018176@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/InstCombine: apint-add1.ll updated: 1.1 -> 1.2 apint-add2.ll updated: 1.1 -> 1.2 --- Log message: For PR1280: http://llvm.org/PR1280 : Remove test cases for and/xor/add -> trunc/sext that use bit widths that the targets cannot code gen. --- Diffs of the changes: (+0 -24) apint-add1.ll | 16 ---------------- apint-add2.ll | 8 -------- 2 files changed, 24 deletions(-) Index: llvm/test/Transforms/InstCombine/apint-add1.ll diff -u llvm/test/Transforms/InstCombine/apint-add1.ll:1.1 llvm/test/Transforms/InstCombine/apint-add1.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-add1.ll:1.1 Fri Mar 23 15:48:33 2007 +++ llvm/test/Transforms/InstCombine/apint-add1.ll Tue Mar 27 20:35:28 2007 @@ -28,22 +28,6 @@ ret i15 %tmp.4 } -define i12 @test4(i12 %x) { - ;; If we have ADD(XOR(AND(X, 0xFF), 0xF..F80), 0x80), it's a sext. - %X = and i12 %x, 63 - %tmp.2 = xor i12 %X, 4064 ; 0xFE0 - %tmp.4 = add i12 %tmp.2, 32 ; 0x020 - ret i12 %tmp.4 -} - -define i49 @test5(i49 %x) { - ;; If we have ADD(XOR(AND(X, 0xFF), 0x80), 0xF..F80), it's a sext. - %X = and i49 %x, 16777215 ; 0x0000000ffffff - %tmp.2 = xor i49 %X, 8388608 ; 0x0000000800000 - %tmp.4 = add i49 %tmp.2, -8388608 ; 0x1FFFFFF800000 - ret i49 %tmp.4 -} - define i49 @test6(i49 %x) { ;; (x & 254)+1 -> (x & 254)|1 %tmp.2 = and i49 %x, 562949953421310 Index: llvm/test/Transforms/InstCombine/apint-add2.ll diff -u llvm/test/Transforms/InstCombine/apint-add2.ll:1.1 llvm/test/Transforms/InstCombine/apint-add2.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-add2.ll:1.1 Fri Mar 23 15:48:33 2007 +++ llvm/test/Transforms/InstCombine/apint-add2.ll Tue Mar 27 20:35:28 2007 @@ -40,14 +40,6 @@ ret i128 %tmp.4 } -define i99 @test5(i99 %x) { - ;; If we have ADD(XOR(AND(X, 0xFF), 0x80), 0xF..F80), it's a sext. - %X = and i99 %x, 562949953421311 - %tmp.2 = xor i99 %X, 281474976710656 - %tmp.4 = add i99 %tmp.2, -281474976710656 - ret i99 %tmp.4 -} - define i77 @test6(i77 %x) { ;; (x & 254)+1 -> (x & 254)|1 %tmp.2 = and i77 %x, 562949953421310 From reid at x10sys.com Tue Mar 27 20:36:33 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 20:36:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703280136.l2S1aX8j018246@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.698 -> 1.699 --- Log message: For PR1280: http://llvm.org/PR1280 : When converting an add/xor/and triplet into a trunc/sext, only do so if the intermediate integer type is a bitwidth that the targets can handle. --- Diffs of the changes: (+13 -3) InstructionCombining.cpp | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.698 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.699 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.698 Tue Mar 27 11:44:48 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Tue Mar 27 20:36:16 2007 @@ -1940,11 +1940,21 @@ CFF80Val = APIntOps::ashr(CFF80Val, Size); } while (Size >= 1); - if (Size) { - const Type *MiddleType = IntegerType::get(Size); + // FIXME: This shouldn't be necessary. When the backends can handle types + // with funny bit widths then this whole cascade of if statements should + // be removed. It is just here to get the size of the "middle" type back + // up to something that the back ends can handle. + const Type *MiddleType = 0; + switch (Size) { + default: break; + case 32: MiddleType = Type::Int32Ty; break; + case 16: MiddleType = Type::Int16Ty; break; + case 8: MiddleType = Type::Int8Ty; break; + } + if (MiddleType) { Instruction *NewTrunc = new TruncInst(XorLHS, MiddleType, "sext"); InsertNewInstBefore(NewTrunc, I); - return new SExtInst(NewTrunc, I.getType()); + return new SExtInst(NewTrunc, I.getType(), I.getName()); } } } From reid at x10sys.com Tue Mar 27 20:43:56 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 20:43:56 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/2007-03-27-PR1280.ll Message-ID: <200703280143.l2S1huQB018511@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/InstCombine: 2007-03-27-PR1280.ll added (r1.1) --- Log message: new test case for PR1280: http://llvm.org/PR1280 --- Diffs of the changes: (+15 -0) 2007-03-27-PR1280.ll | 15 +++++++++++++++ 1 files changed, 15 insertions(+) Index: llvm/test/Transforms/InstCombine/2007-03-27-PR1280.ll diff -c /dev/null llvm/test/Transforms/InstCombine/2007-03-27-PR1280.ll:1.1 *** /dev/null Tue Mar 27 20:43:45 2007 --- llvm/test/Transforms/InstCombine/2007-03-27-PR1280.ll Tue Mar 27 20:43:35 2007 *************** *** 0 **** --- 1,15 ---- + ; PR1280 - we should be able to reduce this function to a trunc/sext but it + ; would involve using a bit width (24) that doesn't match a size that + ; the back end can handle. This test makes sure that such a transform + ; is not done. It should be removed when code gen supports "funny" + ; bit widths. + + ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep 'add i49.*-8388608' + + define i49 @test5(i49 %x) { + ;; If we have ADD(XOR(AND(X, 0xFF), 0x80), 0xF..F80), it's a sext. + %X = and i49 %x, 16777215 ; 0x0000000ffffff + %tmp.2 = xor i49 %X, 8388608 ; 0x0000000800000 + %tmp.4 = add i49 %tmp.2, -8388608 ; 0x1FFFFFF800000 + ret i49 %tmp.4 + } From sabre at nondot.org Tue Mar 27 20:44:01 2007 From: sabre at nondot.org (Chris Lattner) Date: Tue, 27 Mar 2007 20:44:01 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/2002-05-14-SubFailure.ll Message-ID: <200703280144.l2S1i1TX018525@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/InstCombine: 2002-05-14-SubFailure.ll updated: 1.6 -> 1.7 --- Log message: don't use 'not' when we can use a positive test --- Diffs of the changes: (+6 -8) 2002-05-14-SubFailure.ll | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) Index: llvm/test/Transforms/InstCombine/2002-05-14-SubFailure.ll diff -u llvm/test/Transforms/InstCombine/2002-05-14-SubFailure.ll:1.6 llvm/test/Transforms/InstCombine/2002-05-14-SubFailure.ll:1.7 --- llvm/test/Transforms/InstCombine/2002-05-14-SubFailure.ll:1.6 Fri Dec 1 22:23:09 2006 +++ llvm/test/Transforms/InstCombine/2002-05-14-SubFailure.ll Tue Mar 27 20:43:43 2007 @@ -1,12 +1,10 @@ ; Instcombine was missing a test that caused it to make illegal transformations ; sometimes. In this case, it transforms the sub into an add: -; RUN: echo foo -; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep add +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep sub ; - - -int "test"(int %i, int %j) { - %A = mul int %i, %j - %B = sub int 2, %A - ret int %B +define i32 @test(i32 %i, i32 %j) { + %A = mul i32 %i, %j + %B = sub i32 2, %A + ret i32 %B } + From evan.cheng at apple.com Tue Mar 27 20:49:56 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 27 Mar 2007 20:49:56 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200703280149.l2S1nu7G018789@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.397 -> 1.398 --- Log message: GEP index sinking fixes: 1) Take address scale into consideration. e.g. i32* -> scale 4. 2) Examine all the users of GEP. 3) Generalize to inter-block GEP's (no longer uses loopinfo). 4) Don't do xform if GEP has other variable index(es). --- Diffs of the changes: (+34 -39) SelectionDAGISel.cpp | 73 +++++++++++++++++++++++---------------------------- 1 files changed, 34 insertions(+), 39 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.397 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.398 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.397 Tue Mar 27 07:05:48 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Mar 27 20:49:39 2007 @@ -13,7 +13,6 @@ #define DEBUG_TYPE "isel" #include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/Analysis/LoopInfo.h" #include "llvm/CodeGen/SelectionDAGISel.h" #include "llvm/CodeGen/ScheduleDAG.h" #include "llvm/CallingConv.h" @@ -3834,7 +3833,6 @@ // FIXME: we only modify the CFG to split critical edges. This // updates dom and loop info. AU.addRequired(); - AU.addRequired(); } @@ -4091,25 +4089,14 @@ return true; } -/// isLoopInvariantInst - Returns true if all operands of the instruction are -/// loop invariants in the specified loop. -static bool isLoopInvariantInst(Instruction *I, Loop *L) { - // The instruction is loop invariant if all of its operands are loop-invariant - for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) - if (!L->isLoopInvariant(I->getOperand(i))) - return false; - return true; -} - /// SinkInvariantGEPIndex - If a GEP instruction has a variable index that has /// been hoisted out of the loop by LICM pass, sink it back into the use BB /// if it can be determined that the index computation can be folded into the /// addressing mode of the load / store uses. -static bool SinkInvariantGEPIndex(BinaryOperator *BinOp, LoopInfo *loopInfo, - const TargetLowering &TLI) { - // Only look at Add / Sub for now. - if (BinOp->getOpcode() != Instruction::Add && - BinOp->getOpcode() != Instruction::Sub) +static bool SinkInvariantGEPIndex(BinaryOperator *BinOp, + const TargetLowering &TLI) { + // Only look at Add. + if (BinOp->getOpcode() != Instruction::Add) return false; // DestBBs - These are the blocks where a copy of BinOp will be inserted. @@ -4118,32 +4105,43 @@ bool MadeChange = false; for (Value::use_iterator UI = BinOp->use_begin(), E = BinOp->use_end(); UI != E; ++UI) { - Instruction *User = cast(*UI); + Instruction *GEPI = cast(*UI); // Only look for GEP use in another block. - if (User->getParent() == DefBB) continue; + if (GEPI->getParent() == DefBB) continue; - if (isa(User)) { - BasicBlock *UserBB = User->getParent(); - Loop *L = loopInfo->getLoopFor(UserBB); + if (isa(GEPI)) { + // If the GEP has another variable index, abondon. + bool hasVariableIndex = false; + for (GetElementPtrInst::op_iterator OI = GEPI->op_begin()+1, + OE = GEPI->op_end(); OI != OE; ++OI) + if (*OI != BinOp && !isa(*OI)) { + hasVariableIndex = true; + break; + } + if (hasVariableIndex) + break; - // Only sink if expression is a loop invariant in the use BB. - if (L && isLoopInvariantInst(BinOp, L) && !User->use_empty()) { + BasicBlock *GEPIBB = GEPI->getParent(); + for (Value::use_iterator UUI = GEPI->use_begin(), UE = GEPI->use_end(); + UUI != UE; ++UUI) { + Instruction *GEPIUser = cast(*UUI); const Type *UseTy = NULL; - // FIXME: We are assuming all the uses of the GEP will have the - // same type. - Instruction *GEPUser = cast(*User->use_begin()); - if (LoadInst *Load = dyn_cast(GEPUser)) + if (LoadInst *Load = dyn_cast(GEPIUser)) UseTy = Load->getType(); - else if (StoreInst *Store = dyn_cast(GEPUser)) + else if (StoreInst *Store = dyn_cast(GEPIUser)) UseTy = Store->getOperand(0)->getType(); // Check if it is possible to fold the expression to address mode. - if (UseTy && - TLI.isLegalAddressExpression(BinOp->getOpcode(), - BinOp->getOperand(0), - BinOp->getOperand(1), UseTy)) { - DestBBs.insert(UserBB); - MadeChange = true; + if (UseTy && isa(BinOp->getOperand(1))) { + uint64_t Scale = TLI.getTargetData()->getTypeSize(UseTy); + int64_t Cst = cast(BinOp->getOperand(1))->getSExtValue(); + // e.g. load (gep i32 * %P, (X+42)) => load (%P + X*4 + 168). + if (TLI.isLegalAddressImmediate(Cst*Scale, UseTy) && + TLI.isLegalAddressScale(Scale, UseTy)) { + DestBBs.insert(GEPIBB); + MadeChange = true; + break; + } } } } @@ -4248,9 +4246,6 @@ RegMap = MF.getSSARegMap(); DOUT << "\n\n\n=== " << Fn.getName() << "\n"; - LoopInfo *loopInfo = &getAnalysis(); - - // First, split all critical edges. // // In this pass we also look for GEP and cast instructions that are used // across basic blocks and rewrite them to improve basic-block-at-a-time @@ -4319,7 +4314,7 @@ if (SrcVT == DstVT) MadeChange |= OptimizeNoopCopyExpression(CI); } else if (BinaryOperator *BinOp = dyn_cast(I)) { - MadeChange |= SinkInvariantGEPIndex(BinOp, loopInfo, TLI); + MadeChange |= SinkInvariantGEPIndex(BinOp, TLI); } } } From evan.cheng at apple.com Tue Mar 27 20:51:24 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 27 Mar 2007 20:51:24 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Message-ID: <200703280151.l2S1pOpA018843@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: TargetLowering.cpp updated: 1.102 -> 1.103 --- Log message: Remove isLegalAddressImmediate. --- Diffs of the changes: (+0 -8) TargetLowering.cpp | 8 -------- 1 files changed, 8 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp diff -u llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.102 llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.103 --- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.102 Sat Mar 24 23:35:41 2007 +++ llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Tue Mar 27 20:51:02 2007 @@ -1940,14 +1940,6 @@ // Loop Strength Reduction hooks //===----------------------------------------------------------------------===// -/// isLegalAddressExpression - Return true if the binary expression made up of -/// specified opcode, operands, and type can be folded into target addressing -/// mode for load / store of the given type. -bool TargetLowering::isLegalAddressExpression(unsigned Opc, Value *Op0, - Value *Op1, const Type *Ty) const { - return false; -} - /// isLegalAddressImmediate - Return true if the integer value can be used as /// the offset of the target addressing mode for load / store of the given /// type. From evan.cheng at apple.com Tue Mar 27 20:51:23 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 27 Mar 2007 20:51:23 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetLowering.h Message-ID: <200703280151.l2S1pNaX018838@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetLowering.h updated: 1.116 -> 1.117 --- Log message: Remove isLegalAddressImmediate. --- Diffs of the changes: (+0 -6) TargetLowering.h | 6 ------ 1 files changed, 6 deletions(-) Index: llvm/include/llvm/Target/TargetLowering.h diff -u llvm/include/llvm/Target/TargetLowering.h:1.116 llvm/include/llvm/Target/TargetLowering.h:1.117 --- llvm/include/llvm/Target/TargetLowering.h:1.116 Sat Mar 24 21:14:49 2007 +++ llvm/include/llvm/Target/TargetLowering.h Tue Mar 27 20:51:02 2007 @@ -856,12 +856,6 @@ // Loop Strength Reduction hooks // - /// isLegalAddressExpression - Return true if the binary expression made up of - /// specified opcode, operands, and type can be folded into target addressing - /// mode for load / store of the given type. - virtual bool isLegalAddressExpression(unsigned Opc, Value *Op0, Value *Op1, - const Type *Ty) const; - /// isLegalAddressImmediate - Return true if the integer value can be used as /// the offset of the target addressing mode for load / store of the given /// type. From evan.cheng at apple.com Tue Mar 27 20:52:48 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 27 Mar 2007 20:52:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelLowering.h Message-ID: <200703280152.l2S1qmcu018886@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMISelLowering.h updated: 1.8 -> 1.9 --- Log message: Remove isLegalAddressImmediate. --- Diffs of the changes: (+0 -6) ARMISelLowering.h | 6 ------ 1 files changed, 6 deletions(-) Index: llvm/lib/Target/ARM/ARMISelLowering.h diff -u llvm/lib/Target/ARM/ARMISelLowering.h:1.8 llvm/lib/Target/ARM/ARMISelLowering.h:1.9 --- llvm/lib/Target/ARM/ARMISelLowering.h:1.8 Sat Mar 24 21:14:49 2007 +++ llvm/lib/Target/ARM/ARMISelLowering.h Tue Mar 27 20:52:29 2007 @@ -80,12 +80,6 @@ virtual MachineBasicBlock *InsertAtEndOfBasicBlock(MachineInstr *MI, MachineBasicBlock *MBB); - /// isLegalAddressExpression - Return true if the binary expression made up - /// of specified opcode, operands, and type can be folded into target - /// addressing mode for load / store of the given type. - virtual bool isLegalAddressExpression(unsigned Opc, Value *Op0, Value *Op1, - const Type *Ty) const; - /// isLegalAddressImmediate - Return true if the integer value can be used /// as the offset of the target addressing mode for load / store of the /// given type. From reid at x10sys.com Tue Mar 27 20:52:57 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 20:52:57 -0500 Subject: [llvm-commits] CVS: llvm/test/Integer/a1.ll.out a15.ll.out a17.ll.out a31.ll.out a33.ll.out a63.ll.out a7.ll.out a9.ll.out Message-ID: <200703280152.l2S1qva6018912@zion.cs.uiuc.edu> Changes in directory llvm/test/Integer: a1.ll.out updated: 1.6 -> 1.7 a15.ll.out updated: 1.7 -> 1.8 a17.ll.out updated: 1.7 -> 1.8 a31.ll.out updated: 1.7 -> 1.8 a33.ll.out updated: 1.7 -> 1.8 a63.ll.out updated: 1.7 -> 1.8 a7.ll.out updated: 1.8 -> 1.9 a9.ll.out updated: 1.7 -> 1.8 --- Log message: implementation keyword is going .. going .. gone. --- Diffs of the changes: (+0 -16) a1.ll.out | 2 -- a15.ll.out | 2 -- a17.ll.out | 2 -- a31.ll.out | 2 -- a33.ll.out | 2 -- a63.ll.out | 2 -- a7.ll.out | 2 -- a9.ll.out | 2 -- 8 files changed, 16 deletions(-) Index: llvm/test/Integer/a1.ll.out diff -u llvm/test/Integer/a1.ll.out:1.6 llvm/test/Integer/a1.ll.out:1.7 --- llvm/test/Integer/a1.ll.out:1.6 Sat Mar 24 16:55:26 2007 +++ llvm/test/Integer/a1.ll.out Tue Mar 27 20:52:40 2007 @@ -17,5 +17,3 @@ @s = constant i1 srem (i1 true, i1 true) ; [#uses=0] @t = constant i1 false ; [#uses=0] @u = constant i1 srem (i1 true, i1 true) ; [#uses=0] - -implementation ; Functions: Index: llvm/test/Integer/a15.ll.out diff -u llvm/test/Integer/a15.ll.out:1.7 llvm/test/Integer/a15.ll.out:1.8 --- llvm/test/Integer/a15.ll.out:1.7 Sat Mar 24 17:34:10 2007 +++ llvm/test/Integer/a15.ll.out Tue Mar 27 20:52:40 2007 @@ -18,5 +18,3 @@ @o = constant i15 0 ; [#uses=0] @p = constant i15 -1 ; [#uses=0] @v = constant i15 -1 ; [#uses=0] - -implementation ; Functions: Index: llvm/test/Integer/a17.ll.out diff -u llvm/test/Integer/a17.ll.out:1.7 llvm/test/Integer/a17.ll.out:1.8 --- llvm/test/Integer/a17.ll.out:1.7 Sat Mar 24 17:34:10 2007 +++ llvm/test/Integer/a17.ll.out Tue Mar 27 20:52:40 2007 @@ -17,5 +17,3 @@ @o = constant i17 0 ; [#uses=0] @p = constant i17 -1 ; [#uses=0] @v = constant i17 -1 ; [#uses=0] - -implementation ; Functions: Index: llvm/test/Integer/a31.ll.out diff -u llvm/test/Integer/a31.ll.out:1.7 llvm/test/Integer/a31.ll.out:1.8 --- llvm/test/Integer/a31.ll.out:1.7 Sat Mar 24 17:34:10 2007 +++ llvm/test/Integer/a31.ll.out Tue Mar 27 20:52:40 2007 @@ -17,5 +17,3 @@ @o = constant i31 0 ; [#uses=0] @p = constant i31 -1 ; [#uses=0] @u = constant i31 -3 ; [#uses=0] - -implementation ; Functions: Index: llvm/test/Integer/a33.ll.out diff -u llvm/test/Integer/a33.ll.out:1.7 llvm/test/Integer/a33.ll.out:1.8 --- llvm/test/Integer/a33.ll.out:1.7 Sat Mar 24 17:34:10 2007 +++ llvm/test/Integer/a33.ll.out Tue Mar 27 20:52:40 2007 @@ -17,5 +17,3 @@ @o = constant i33 0 ; [#uses=0] @p = constant i33 -1 ; [#uses=0] @u = constant i33 -1 ; [#uses=0] - -implementation ; Functions: Index: llvm/test/Integer/a63.ll.out diff -u llvm/test/Integer/a63.ll.out:1.7 llvm/test/Integer/a63.ll.out:1.8 --- llvm/test/Integer/a63.ll.out:1.7 Sat Mar 24 17:34:10 2007 +++ llvm/test/Integer/a63.ll.out Tue Mar 27 20:52:40 2007 @@ -17,5 +17,3 @@ @t = constant i63 0 ; [#uses=0] @o = constant i63 0 ; [#uses=0] @p = constant i63 -1 ; [#uses=0] - -implementation ; Functions: Index: llvm/test/Integer/a7.ll.out diff -u llvm/test/Integer/a7.ll.out:1.8 llvm/test/Integer/a7.ll.out:1.9 --- llvm/test/Integer/a7.ll.out:1.8 Sat Mar 24 17:34:10 2007 +++ llvm/test/Integer/a7.ll.out Tue Mar 27 20:52:40 2007 @@ -22,5 +22,3 @@ @y = constant i7 0 ; [#uses=0] @o = constant i7 0 ; [#uses=0] @p = constant i7 -1 ; [#uses=0] - -implementation ; Functions: Index: llvm/test/Integer/a9.ll.out diff -u llvm/test/Integer/a9.ll.out:1.7 llvm/test/Integer/a9.ll.out:1.8 --- llvm/test/Integer/a9.ll.out:1.7 Sat Mar 24 17:34:10 2007 +++ llvm/test/Integer/a9.ll.out Tue Mar 27 20:52:40 2007 @@ -16,5 +16,3 @@ @t = constant i9 1 ; [#uses=0] @o = constant i9 0 ; [#uses=0] @p = constant i9 -1 ; [#uses=0] - -implementation ; Functions: From reid at x10sys.com Tue Mar 27 20:53:38 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 20:53:38 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Message-ID: <200703280153.l2S1rcsN018935@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.265 -> 1.266 --- Log message: No need to generate the implementation keyword any more. Its frivolous. --- Diffs of the changes: (+0 -2) AsmWriter.cpp | 2 -- 1 files changed, 2 deletions(-) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.265 llvm/lib/VMCore/AsmWriter.cpp:1.266 --- llvm/lib/VMCore/AsmWriter.cpp:1.265 Thu Mar 22 11:38:57 2007 +++ llvm/lib/VMCore/AsmWriter.cpp Tue Mar 27 20:53:20 2007 @@ -842,8 +842,6 @@ I != E; ++I) printGlobal(I); - Out << "\nimplementation ; Functions:\n"; - // Output all of the functions. for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I) printFunction(I); From evan.cheng at apple.com Tue Mar 27 20:54:12 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 27 Mar 2007 20:54:12 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelLowering.cpp Message-ID: <200703280154.l2S1sCAJ018955@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMISelLowering.cpp updated: 1.31 -> 1.32 --- Log message: Remove isLegalAddressImmediate. --- Diffs of the changes: (+0 -14) ARMISelLowering.cpp | 14 -------------- 1 files changed, 14 deletions(-) Index: llvm/lib/Target/ARM/ARMISelLowering.cpp diff -u llvm/lib/Target/ARM/ARMISelLowering.cpp:1.31 llvm/lib/Target/ARM/ARMISelLowering.cpp:1.32 --- llvm/lib/Target/ARM/ARMISelLowering.cpp:1.31 Tue Mar 27 11:19:21 2007 +++ llvm/lib/Target/ARM/ARMISelLowering.cpp Tue Mar 27 20:53:55 2007 @@ -1281,20 +1281,6 @@ // ARM Optimization Hooks //===----------------------------------------------------------------------===// -/// isLegalAddressExpression - Return true if the binary expression made up of -/// specified opcode, operands, and type can be folded into target addressing -/// mode for load / store of the given type. -bool ARMTargetLowering::isLegalAddressExpression(unsigned Opc, Value *Op0, - Value *Op1, const Type *Ty) const { - if (ConstantInt *Op1C = dyn_cast(Op1)) { - if (Opc == Instruction::Add) - return isLegalAddressImmediate(Op1C->getSExtValue(), Ty); - if (Opc == Instruction::Sub) - return isLegalAddressImmediate(-Op1C->getSExtValue(), Ty); - } - return false; -} - /// isLegalAddressImmediate - Return true if the integer value can be used /// as the offset of the target addressing mode for load / store of the /// given type. From evan.cheng at apple.com Tue Mar 27 20:56:09 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 27 Mar 2007 20:56:09 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200703280156.l2S1u93J018995@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.398 -> 1.399 --- Log message: Scale 1 is always ok. --- Diffs of the changes: (+1 -1) SelectionDAGISel.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.398 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.399 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.398 Tue Mar 27 20:49:39 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Mar 27 20:55:52 2007 @@ -4137,7 +4137,7 @@ int64_t Cst = cast(BinOp->getOperand(1))->getSExtValue(); // e.g. load (gep i32 * %P, (X+42)) => load (%P + X*4 + 168). if (TLI.isLegalAddressImmediate(Cst*Scale, UseTy) && - TLI.isLegalAddressScale(Scale, UseTy)) { + (Scale == 1 || TLI.isLegalAddressScale(Scale, UseTy))) { DestBBs.insert(GEPIBB); MadeChange = true; break; From zhousheng00 at gmail.com Tue Mar 27 21:19:21 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Tue, 27 Mar 2007 21:19:21 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703280219.l2S2JLu5019504@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.699 -> 1.700 --- Log message: Clean up codes in ComputeMaskedBits(): 1. Line out nested use of zext/trunc. 2. Make more use of getHighBitsSet/getLowBitsSet. 3. Use APInt[] != 0 instead of "(APInt & SignBit) != 0". --- Diffs of the changes: (+27 -29) InstructionCombining.cpp | 56 ++++++++++++++++++++++------------------------- 1 files changed, 27 insertions(+), 29 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.699 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.700 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.699 Tue Mar 27 20:36:16 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Tue Mar 27 21:19:03 2007 @@ -600,11 +600,10 @@ assert(V && "No Value?"); assert(Depth <= 6 && "Limit Search Depth"); uint32_t BitWidth = Mask.getBitWidth(); - const IntegerType *VTy = cast(V->getType()); - assert(VTy->getBitWidth() == BitWidth && + assert(cast(V->getType())->getBitWidth() == BitWidth && KnownZero.getBitWidth() == BitWidth && KnownOne.getBitWidth() == BitWidth && - "VTy, Mask, KnownOne and KnownZero should have same BitWidth"); + "V, Mask, KnownOne and KnownZero should have same BitWidth"); if (ConstantInt *CI = dyn_cast(V)) { // We know all of the bits for a constant! KnownOne = CI->getValue() & Mask; @@ -685,8 +684,11 @@ // All these have integer operands uint32_t SrcBitWidth = cast(I->getOperand(0)->getType())->getBitWidth(); - ComputeMaskedBits(I->getOperand(0), APInt(Mask).zext(SrcBitWidth), - KnownZero.zext(SrcBitWidth), KnownOne.zext(SrcBitWidth), Depth+1); + APInt MaskIn(Mask); + MaskIn.zext(SrcBitWidth); + KnownZero.zext(SrcBitWidth); + KnownOne.zext(SrcBitWidth); + ComputeMaskedBits(I->getOperand(0), MaskIn, KnownZero, KnownOne, Depth+1); KnownZero.trunc(BitWidth); KnownOne.trunc(BitWidth); return; @@ -703,43 +705,40 @@ // Compute the bits in the result that are not present in the input. const IntegerType *SrcTy = cast(I->getOperand(0)->getType()); uint32_t SrcBitWidth = SrcTy->getBitWidth(); - APInt NewBits(APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth)); - ComputeMaskedBits(I->getOperand(0), APInt(Mask).trunc(SrcBitWidth), - KnownZero.trunc(SrcBitWidth), KnownOne.trunc(SrcBitWidth), Depth+1); + APInt MaskIn(Mask); + MaskIn.trunc(SrcBitWidth); + KnownZero.trunc(SrcBitWidth); + KnownOne.trunc(SrcBitWidth); + ComputeMaskedBits(I->getOperand(0), MaskIn, KnownZero, KnownOne, Depth+1); assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"); // The top bits are known to be zero. KnownZero.zext(BitWidth); KnownOne.zext(BitWidth); - KnownZero |= NewBits; + KnownZero |= APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth); return; } case Instruction::SExt: { // Compute the bits in the result that are not present in the input. const IntegerType *SrcTy = cast(I->getOperand(0)->getType()); uint32_t SrcBitWidth = SrcTy->getBitWidth(); - APInt NewBits(APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth)); - ComputeMaskedBits(I->getOperand(0), APInt(Mask).trunc(SrcBitWidth), - KnownZero.trunc(SrcBitWidth), KnownOne.trunc(SrcBitWidth), Depth+1); + APInt MaskIn(Mask); + MaskIn.trunc(SrcBitWidth); + KnownZero.trunc(SrcBitWidth); + KnownOne.trunc(SrcBitWidth); + ComputeMaskedBits(I->getOperand(0), MaskIn, KnownZero, KnownOne, Depth+1); assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"); KnownZero.zext(BitWidth); KnownOne.zext(BitWidth); // If the sign bit of the input is known set or clear, then we know the // top bits of the result. - APInt InSignBit(APInt::getSignBit(SrcTy->getBitWidth())); - InSignBit.zext(BitWidth); - if ((KnownZero & InSignBit) != 0) { // Input sign bit known zero + APInt NewBits(APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth)); + if (KnownZero[SrcBitWidth-1]) // Input sign bit known zero KnownZero |= NewBits; - KnownOne &= ~NewBits; - } else if ((KnownOne & InSignBit) != 0) { // Input sign bit known set + else if (KnownOne[SrcBitWidth-1]) // Input sign bit known set KnownOne |= NewBits; - KnownZero &= ~NewBits; - } else { // Input sign bit unknown - KnownZero &= ~NewBits; - KnownOne &= ~NewBits; - } return; } case Instruction::Shl: @@ -760,7 +759,6 @@ if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { // Compute the new bits that are at the top now. uint64_t ShiftAmt = SA->getZExtValue(); - APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt)); // Unsigned shift right. APInt Mask2(Mask.shl(ShiftAmt)); @@ -768,16 +766,16 @@ assert((KnownZero & KnownOne) == 0&&"Bits known to be one AND zero?"); KnownZero = APIntOps::lshr(KnownZero, ShiftAmt); KnownOne = APIntOps::lshr(KnownOne, ShiftAmt); - KnownZero |= HighBits; // high bits known zero. + // high bits known zero. + KnownZero |= APInt::getHighBitsSet(BitWidth, ShiftAmt); return; } break; case Instruction::AShr: - // (ushr X, C1) & C2 == 0 iff (-1 >> C1) & C2 == 0 + // (ashr X, C1) & C2 == 0 iff (-1 >> C1) & C2 == 0 if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { // Compute the new bits that are at the top now. uint64_t ShiftAmt = SA->getZExtValue(); - APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt)); // Signed shift right. APInt Mask2(Mask.shl(ShiftAmt)); @@ -789,11 +787,11 @@ // Handle the sign bits and adjust to where it is now in the mask. APInt SignBit(APInt::getSignBit(BitWidth).lshr(ShiftAmt)); - if ((KnownZero & SignBit) != 0) { // New bits are known zero. + APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt)); + if (KnownZero[BitWidth-ShiftAmt-1]) // New bits are known zero. KnownZero |= HighBits; - } else if ((KnownOne & SignBit) != 0) { // New bits are known one. + else if (KnownOne[BitWidth-ShiftAmt-1]) // New bits are known one. KnownOne |= HighBits; - } return; } break; From reid at x10sys.com Tue Mar 27 21:26:21 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:26:21 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200703280226.l2S2QLJf020434@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.2 -> 1.3 --- Log message: Fix two typos. --- Diffs of the changes: (+3 -3) DevMtgMay2007.html | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.2 llvm-www/DevMtgMay2007.html:1.3 --- llvm-www/DevMtgMay2007.html:1.2 Fri Mar 23 20:15:13 2007 +++ llvm-www/DevMtgMay2007.html Tue Mar 27 21:26:04 2007 @@ -28,7 +28,7 @@

The closest airport is San Jose International Airport (SJC; 10 miles away). There is also San Francisco Internation Airport (SFO; 43 miles away) or Oakland (OAK; 49 miles away). IMHO, I would choose SJC, then SFO, and lastly - OAK, depending upont he prices.

+ OAK, depending upon the prices.

@@ -40,7 +40,7 @@

Bill Wendling reports:

The Cypress Hotel is very close to the Apple campus. It's pretty swank, so I'm not sure how - pricey itis.
+ pricey it is.

Tanya Lattner reports:

I have stayed at both the Cupertino Inn and Hilton Garden Inn. @@ -57,6 +57,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
Last modified: $Date: 2007/03/24 01:15:13 $ +
Last modified: $Date: 2007/03/28 02:26:04 $ From reid at x10sys.com Tue Mar 27 21:35:10 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:35:10 -0500 Subject: [llvm-commits] CVS: llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx Message-ID: <200703280235.l2S2ZA7G020673@zion.cs.uiuc.edu> Changes in directory llvm/test/Assembler: 2003-12-30-TypeMapInvalidMemory.llx updated: 1.6 -> 1.7 --- Log message: The implementation keyword was replaced with checkpoint. --- Diffs of the changes: (+1 -1) 2003-12-30-TypeMapInvalidMemory.llx | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx diff -u llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx:1.6 llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx:1.7 --- llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx:1.6 Tue Mar 20 12:27:19 2007 +++ llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx Tue Mar 27 21:34:53 2007 @@ -53,4 +53,4 @@ i32, i32, i32, i32, i32, i32, i32, i32, i32 }*)** null } -implementation +checkpoint From reid at x10sys.com Tue Mar 27 21:37:57 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:37:57 -0500 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/Lexer.cpp.cvs Lexer.l.cvs llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y.cvs Message-ID: <200703280237.l2S2bvjM020838@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Lexer.cpp.cvs updated: 1.34 -> 1.35 Lexer.l.cvs updated: 1.28 -> 1.29 llvmAsmParser.cpp.cvs updated: 1.77 -> 1.78 llvmAsmParser.h.cvs updated: 1.60 -> 1.61 llvmAsmParser.y.cvs updated: 1.78 -> 1.79 --- Log message: Regenerate. --- Diffs of the changes: (+446 -449) Lexer.cpp.cvs | 817 ++++++++++++++++++++++++-------------------------- Lexer.l.cvs | 2 llvmAsmParser.cpp.cvs | 68 ++-- llvmAsmParser.h.cvs | 4 llvmAsmParser.y.cvs | 4 5 files changed, 446 insertions(+), 449 deletions(-) Index: llvm/lib/AsmParser/Lexer.cpp.cvs diff -u llvm/lib/AsmParser/Lexer.cpp.cvs:1.34 llvm/lib/AsmParser/Lexer.cpp.cvs:1.35 --- llvm/lib/AsmParser/Lexer.cpp.cvs:1.34 Wed Mar 21 21:14:08 2007 +++ llvm/lib/AsmParser/Lexer.cpp.cvs Tue Mar 27 21:37:40 2007 @@ -20,7 +20,7 @@ /* A lexical scanner generated by flex*/ /* Scanner skeleton version: - * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.34 2007/03/22 02:14:08 reid Exp $ + * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.35 2007/03/28 02:37:40 reid Exp $ */ #define FLEX_SCANNER @@ -343,11 +343,11 @@ 98, 108, 26, 27, 97, 110, 105, 103, 6, 28, 95, 32, 9, 18, 10, 101, 11, 45, 44, 102, - 30, 13, 15, 14, 29, 35, 17, 111, 117, 119, - 120, 40, 118, 19, 41, 20 + 30, 13, 15, 14, 19, 29, 35, 17, 111, 117, + 119, 120, 40, 118, 41, 20 } ; -static yyconst short int yy_accept[553] = +static yyconst short int yy_accept[549] = { 0, 1, 1, 1, 2, 4, 7, 9, 11, 13, 15, 17, 19, 21, 24, 27, 30, 32, 34, 36, 38, @@ -356,8 +356,8 @@ 77, 77, 78, 79, 80, 80, 81, 81, 82, 83, 83, 84, 84, 85, 86, 86, 86, 86, 86, 86, 86, 86, 87, 87, 88, 88, 88, 88, 88, 88, - 88, 89, 89, 89, 89, 89, 89, 89, 89, 89, - 89, 89, 90, 90, 90, 90, 90, 90, 90, 90, + 88, 88, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 91, 91, 91, 91, 91, 91, 91, 91, 92, 92, 92, 92, 92, 92, 92, 92, 92, @@ -366,7 +366,7 @@ 93, 93, 93, 94, 95, 96, 97, 98, 98, 99, 99, 100, 101, 102, 102, 102, 103, 103, 103, 104, 104, 104, 104, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 106, 106, 106, 106, 106, 106, 106, 106, + 105, 105, 105, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 107, 107, 107, 107, 108, 109, 110, 111, 112, 113, 113, 114, 115, @@ -378,38 +378,37 @@ 129, 129, 130, 130, 130, 131, 132, 132, 132, 132, 133, 133, 133, 133, 134, 134, 134, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, - 135, 136, 137, 137, 137, 137, 137, 138, 139, 139, - 139, 139, 140, 140, 140, 140, 140, 140, 140, 140, + 135, 135, 136, 137, 137, 137, 137, 137, 138, 139, + 139, 139, 139, 140, 140, 140, 140, 140, 140, 140, 140, 141, 142, 142, 142, 142, 142, 143, 143, 143, 144, 145, 145, 145, 146, 146, 146, 146, 147, 148, 148, 148, 149, 149, 149, 150, 150, 151, 152, 152, 152, 152, 152, 153, 153, 154, 154, 155, 155, 155, 156, 157, 158, 158, 158, 159, 159, 159, 159, 159, - 159, 159, 159, 159, 159, 159, 159, 159, 160, 160, - 161, 162, 162, 162, 162, 162, 162, 162, 162, 163, + 159, 159, 159, 159, 159, 159, 159, 159, 159, 160, + 160, 161, 162, 162, 162, 162, 162, 162, 162, 163, 163, 163, 163, 163, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 164, 165, 165, 165, 165, 166, 166, 167, 167, 167, 167, 167, 167, 167, - 167, 168, 168, 168, 169, 169, 169, 169, 170, 170, + 167, 168, 168, 168, 168, 169, 169, 169, 169, 170, - 170, 170, 171, 171, 171, 172, 173, 174, 174, 174, - 175, 176, 176, 176, 176, 176, 177, 177, 178, 179, + 170, 170, 170, 171, 171, 171, 172, 173, 174, 174, + 174, 175, 176, 176, 176, 176, 177, 177, 178, 179, 179, 179, 180, 180, 180, 181, 181, 181, 182, 183, 184, 185, 186, 186, 187, 188, 188, 188, 188, 188, - 188, 189, 189, 189, 190, 191, 191, 191, 191, 191, - 191, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 188, 189, 189, 189, 189, 190, 191, 191, 191, 191, + 191, 191, 192, 192, 192, 192, 192, 192, 192, 192, 192, 193, 193, 193, 193, 193, 193, 193, 193, 193, - 194, 194, 194, 194, 194, 195, 195, 195, 195, 195, + 193, 194, 194, 194, 194, 194, 195, 195, 195, 195, 196, 197, 198, 199, 200, 201, 201, 201, 201, 202, - 202, 202, 202, 203, 203, 204, 205, 205, 205, 205, + 202, 202, 202, 203, 203, 203, 204, 205, 205, 205, - 205, 205, 205, 205, 205, 205, 205, 205, 206, 206, - 206, 206, 206, 206, 206, 207, 207, 207, 207, 207, - 208, 208, 208, 208, 208, 208, 209, 209, 209, 209, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 210, - 210, 211, 212, 212, 213, 213, 214, 215, 216, 216, - 217, 217 + 205, 205, 205, 205, 205, 205, 205, 205, 206, 207, + 207, 207, 207, 207, 207, 208, 208, 208, 208, 208, + 209, 209, 209, 209, 209, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 211, 212, 213, + 213, 214, 214, 215, 216, 216, 217, 217 } ; static yyconst int yy_ec[256] = @@ -453,258 +452,258 @@ 4, 4, 4, 4 } ; -static yyconst short int yy_base[560] = +static yyconst short int yy_base[556] = { 0, - 0, 0, 1199, 1200, 1200, 1200, 1194, 1183, 35, 39, + 0, 0, 1193, 1194, 1194, 1194, 1188, 1177, 35, 39, 43, 49, 55, 61, 0, 72, 64, 67, 66, 86, - 76, 106, 91, 65, 133, 121, 117, 99, 152, 95, - 78, 179, 137, 211, 139, 90, 148, 93, 1192, 1200, - 1181, 1200, 0, 49, 185, 217, 116, 238, 254, 259, - 0, 1190, 0, 200, 125, 149, 146, 153, 177, 63, - 154, 1179, 160, 161, 208, 185, 264, 171, 113, 210, - 1178, 222, 260, 228, 186, 261, 271, 110, 273, 274, - 230, 223, 277, 278, 279, 282, 286, 285, 205, 290, - 287, 292, 1177, 288, 299, 300, 307, 309, 312, 314, - - 316, 318, 323, 311, 324, 326, 328, 327, 330, 329, - 339, 347, 341, 343, 334, 354, 1176, 358, 342, 359, - 361, 364, 365, 367, 371, 369, 370, 378, 395, 386, - 385, 387, 1175, 0, 406, 1174, 421, 439, 0, 1183, - 1200, 0, 1172, 232, 408, 1171, 396, 400, 1170, 397, - 426, 412, 1169, 414, 424, 440, 413, 430, 441, 442, - 443, 1168, 445, 448, 449, 454, 451, 453, 458, 460, - 466, 462, 461, 469, 464, 465, 470, 475, 487, 488, - 489, 490, 491, 492, 493, 494, 1167, 496, 495, 501, - 1166, 1165, 1164, 1163, 1162, 1161, 502, 1160, 1159, 498, - - 1158, 528, 503, 504, 508, 516, 1157, 1156, 1155, 510, - 520, 533, 1154, 1153, 541, 542, 1152, 543, 544, 545, - 546, 551, 549, 547, 1151, 1150, 1149, 553, 1148, 1147, - 568, 1146, 1145, 570, 548, 554, 550, 574, 575, 576, - 577, 1144, 579, 563, 1200, 596, 611, 615, 619, 624, - 584, 588, 585, 1143, 625, 626, 1142, 589, 627, 628, - 629, 630, 631, 633, 636, 634, 637, 640, 639, 647, - 1141, 1140, 638, 641, 652, 642, 1139, 1138, 654, 657, - 656, 1137, 658, 660, 664, 669, 671, 586, 673, 674, - 1136, 1135, 676, 678, 679, 680, 1134, 681, 682, 0, - - 1133, 683, 684, 1132, 685, 688, 699, 1131, 1130, 702, - 700, 1129, 704, 705, 1128, 709, 1127, 1126, 711, 713, - 719, 715, 1125, 716, 1124, 718, 1123, 720, 723, 1122, - 730, 1121, 730, 590, 1120, 732, 739, 734, 735, 744, - 746, 745, 748, 749, 750, 753, 751, 1119, 754, 1118, - 1117, 758, 761, 763, 757, 764, 765, 770, 1116, 773, - 774, 776, 778, 1115, 777, 782, 779, 784, 785, 791, - 786, 793, 794, 798, 802, 803, 1114, 804, 805, 806, - 1113, 807, 1112, 811, 815, 808, 821, 822, 810, 825, - 1111, 826, 830, 1110, 831, 832, 836, 1109, 833, 838, - - 839, 1108, 842, 841, 1107, 1106, 1105, 837, 850, 1104, - 1103, 852, 853, 860, 844, 1102, 851, 1101, 1100, 855, - 864, 1099, 869, 870, 1098, 871, 872, 1097, 1096, 1095, - 1094, 1093, 873, 1092, 1091, 874, 875, 876, 878, 879, - 1090, 880, 884, 1089, 1088, 889, 891, 893, 894, 895, - 1087, 896, 899, 900, 902, 901, 909, 907, 912, 908, - 1076, 914, 924, 922, 926, 915, 927, 929, 930, 1066, - 931, 933, 937, 938, 1065, 943, 944, 941, 945, 1064, - 1063, 1062, 1059, 1058, 1057, 950, 946, 951, 1056, 963, - 964, 952, 1054, 949, 1053, 1052, 968, 967, 969, 972, - - 975, 976, 979, 980, 981, 982, 983, 1047, 985, 988, - 986, 990, 991, 994, 1046, 997, 995, 999, 1004, 947, - 1002, 1008, 1009, 1010, 1016, 687, 1013, 1017, 1019, 1021, - 1022, 1024, 1026, 1027, 1030, 1034, 1031, 1036, 555, 1037, - 515, 512, 1040, 463, 1041, 399, 366, 247, 1045, 243, - 1200, 1081, 1083, 212, 1088, 1091, 167, 1095, 108 + 76, 106, 91, 95, 133, 121, 117, 100, 152, 75, + 93, 179, 137, 211, 139, 98, 46, 124, 1186, 1194, + 1175, 1194, 0, 150, 185, 217, 116, 238, 254, 259, + 0, 1184, 0, 200, 154, 153, 176, 118, 160, 78, + 178, 1173, 47, 157, 161, 208, 186, 264, 228, 194, + 200, 1172, 222, 260, 230, 218, 261, 271, 231, 273, + 274, 277, 291, 279, 278, 113, 187, 239, 285, 292, + 294, 299, 1171, 305, 306, 307, 309, 310, 311, 312, + + 314, 317, 313, 316, 324, 325, 329, 326, 338, 332, + 343, 348, 342, 344, 346, 355, 1170, 359, 362, 364, + 347, 365, 366, 370, 376, 371, 150, 383, 387, 374, + 379, 388, 1169, 0, 408, 1168, 423, 441, 0, 1177, + 1194, 0, 1166, 396, 392, 1165, 414, 391, 1164, 415, + 409, 426, 1163, 428, 443, 402, 444, 430, 431, 432, + 447, 449, 1162, 453, 451, 454, 459, 455, 458, 460, + 465, 466, 462, 470, 471, 469, 482, 485, 486, 490, + 491, 493, 494, 497, 498, 499, 1161, 502, 500, 504, + 1160, 1159, 1158, 1157, 1156, 1155, 505, 1154, 1153, 506, + + 1152, 535, 511, 516, 507, 523, 1151, 1150, 1149, 525, + 548, 535, 1148, 1147, 549, 528, 1146, 527, 513, 552, + 555, 553, 557, 556, 1145, 1144, 1143, 559, 1142, 1141, + 560, 1140, 1139, 562, 565, 568, 467, 574, 515, 561, + 581, 1138, 569, 577, 1194, 593, 611, 597, 615, 620, + 580, 621, 584, 1137, 606, 622, 1136, 623, 625, 626, + 627, 630, 631, 632, 634, 635, 637, 639, 641, 644, + 640, 1135, 1134, 642, 645, 651, 655, 1133, 1132, 656, + 657, 658, 1131, 587, 659, 660, 664, 670, 671, 665, + 1130, 1129, 667, 673, 675, 677, 1128, 678, 679, 0, + + 1127, 688, 692, 1126, 690, 695, 696, 1125, 1124, 706, + 709, 1123, 708, 694, 1122, 711, 1121, 1120, 712, 713, + 691, 714, 1119, 693, 1118, 720, 1117, 722, 721, 1116, + 729, 1115, 730, 729, 1114, 731, 737, 734, 740, 741, + 739, 743, 748, 749, 750, 752, 756, 751, 1113, 758, + 1112, 1111, 763, 764, 765, 771, 760, 767, 1110, 768, + 772, 773, 779, 1109, 780, 786, 787, 775, 782, 791, + 788, 784, 795, 799, 805, 804, 1108, 807, 806, 808, + 1107, 809, 1106, 813, 814, 810, 811, 826, 812, 817, + 1105, 827, 828, 831, 1104, 833, 834, 837, 1103, 838, + + 839, 840, 1102, 843, 842, 1101, 1100, 1099, 845, 854, + 1098, 1097, 846, 862, 855, 1096, 857, 1095, 1094, 860, + 867, 1093, 869, 870, 1092, 864, 872, 1091, 1090, 1089, + 1088, 1087, 873, 1086, 1085, 875, 876, 880, 878, 877, + 1084, 884, 881, 890, 1083, 1082, 893, 894, 896, 897, + 900, 1071, 901, 902, 903, 904, 907, 906, 912, 908, + 1061, 914, 920, 922, 925, 927, 929, 931, 933, 934, + 1060, 936, 938, 939, 943, 1057, 941, 942, 944, 1056, + 1055, 1054, 1053, 1052, 1051, 946, 950, 959, 1050, 964, + 965, 967, 1048, 949, 968, 1045, 1042, 969, 970, 974, + + 976, 977, 978, 979, 982, 983, 984, 1041, 1037, 986, + 987, 989, 996, 991, 948, 997, 994, 1000, 1003, 947, + 1008, 1005, 1012, 1013, 844, 1011, 1014, 1017, 1020, 1021, + 1023, 1024, 1025, 1026, 1028, 1035, 600, 522, 468, 1036, + 400, 1039, 349, 282, 1040, 243, 1194, 1076, 1078, 250, + 1083, 1086, 200, 1090, 58 } ; -static yyconst short int yy_def[560] = +static yyconst short int yy_def[556] = { 0, - 551, 1, 551, 551, 551, 551, 552, 553, 554, 551, - 553, 553, 553, 553, 555, 556, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 552, 551, - 553, 551, 557, 551, 551, 553, 553, 553, 553, 553, - 555, 558, 559, 551, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 25, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 551, 557, 551, 553, 553, 553, 50, 558, - 551, 559, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - - 553, 50, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 551, 551, 551, 551, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 202, - - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 551, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, - 0, 551, 551, 551, 551, 551, 551, 551, 551 + 547, 1, 547, 547, 547, 547, 548, 549, 550, 547, + 549, 549, 549, 549, 551, 552, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 548, 547, + 549, 547, 553, 547, 547, 549, 549, 549, 549, 549, + 551, 554, 555, 547, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 547, 553, 547, 549, 549, 549, 50, 554, + 547, 555, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + + 549, 50, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 547, 547, 547, 547, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 202, + + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 547, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 549, 549, 549, 549, + 549, 549, 549, 549, 549, 549, 0, 547, 547, 547, + 547, 547, 547, 547, 547 } ; -static yyconst short int yy_nxt[1245] = +static yyconst short int yy_nxt[1239] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 4, 15, 16, 8, 8, 8, 17, 18, 19, 20, 21, 22, 23, 24, 25, 8, 26, 27, 28, 29, 30, 8, 31, 32, 33, 34, 35, 36, 37, 8, 38, 44, 44, 44, 44, 45, 45, - 45, 45, 46, 46, 46, 46, 42, 47, 44, 44, - 44, 44, 42, 48, 49, 49, 49, 49, 42, 48, - 49, 49, 49, 49, 42, 52, 42, 42, 42, 42, - 42, 54, 54, 54, 54, 63, 55, 64, 150, 42, - 60, 42, 81, 56, 61, 57, 50, 58, 65, 42, - - 59, 104, 62, 42, 42, 66, 42, 70, 42, 67, - 71, 142, 42, 129, 79, 68, 132, 72, 69, 42, - 80, 102, 93, 42, 136, 73, 42, 74, 75, 42, - 42, 94, 103, 171, 42, 76, 90, 95, 42, 77, - 86, 78, 82, 82, 82, 82, 42, 143, 87, 91, - 42, 161, 42, 88, 83, 92, 116, 89, 127, 42, - 130, 42, 42, 84, 85, 42, 42, 42, 146, 117, - 134, 128, 118, 42, 42, 96, 144, 97, 145, 119, - 131, 98, 153, 99, 42, 100, 147, 101, 105, 152, - 42, 151, 42, 135, 45, 45, 45, 45, 42, 42, - - 160, 106, 107, 148, 108, 109, 110, 149, 111, 54, - 54, 54, 54, 167, 112, 43, 113, 114, 42, 115, - 105, 42, 156, 42, 42, 48, 46, 46, 46, 46, - 42, 184, 162, 120, 121, 42, 122, 154, 123, 155, - 124, 42, 125, 42, 41, 42, 126, 137, 137, 137, - 137, 42, 174, 41, 41, 138, 42, 251, 166, 163, - 42, 138, 48, 49, 49, 49, 49, 42, 139, 139, + 45, 45, 46, 46, 46, 46, 42, 47, 130, 42, + 42, 142, 42, 48, 49, 49, 49, 49, 42, 48, + 49, 49, 49, 49, 42, 52, 152, 42, 131, 42, + 42, 54, 54, 54, 54, 63, 55, 64, 42, 42, + 60, 42, 65, 56, 61, 57, 50, 58, 66, 42, + + 59, 102, 62, 150, 42, 67, 42, 71, 42, 68, + 72, 42, 103, 42, 80, 69, 104, 73, 70, 42, + 81, 129, 82, 93, 136, 74, 42, 75, 76, 42, + 42, 42, 94, 181, 42, 77, 90, 42, 95, 78, + 86, 79, 83, 83, 83, 83, 42, 132, 87, 91, + 42, 147, 42, 88, 84, 92, 116, 89, 127, 44, + 44, 44, 44, 42, 85, 42, 42, 42, 237, 117, + 42, 128, 118, 42, 42, 96, 143, 97, 153, 119, + 144, 98, 145, 99, 154, 100, 148, 101, 105, 42, + 149, 42, 42, 135, 45, 45, 45, 45, 146, 42, + + 42, 106, 107, 134, 108, 109, 110, 42, 111, 54, + 54, 54, 54, 42, 112, 151, 113, 114, 182, 115, + 105, 42, 163, 157, 42, 48, 46, 46, 46, 46, + 42, 42, 162, 120, 121, 42, 122, 155, 123, 156, + 124, 42, 125, 42, 42, 168, 126, 137, 137, 137, + 137, 42, 42, 43, 172, 138, 42, 161, 183, 164, + 167, 138, 48, 49, 49, 49, 49, 42, 139, 139, 139, 139, 42, 42, 42, 139, 139, 42, 139, 139, - 139, 139, 139, 139, 42, 157, 42, 42, 158, 164, - 42, 42, 42, 168, 169, 42, 165, 159, 42, 42, + 139, 139, 139, 139, 42, 158, 42, 42, 159, 165, + 42, 42, 42, 169, 170, 42, 166, 160, 42, 175, - 42, 42, 181, 42, 183, 42, 173, 175, 170, 186, - 172, 176, 42, 42, 177, 178, 179, 182, 180, 185, - 42, 187, 42, 188, 42, 42, 189, 42, 190, 42, - 192, 42, 194, 197, 191, 196, 42, 42, 198, 42, - 42, 42, 42, 42, 193, 199, 195, 42, 201, 204, - 207, 211, 42, 203, 42, 42, 42, 205, 200, 209, - 42, 218, 213, 217, 208, 202, 212, 42, 210, 206, - 215, 42, 42, 216, 42, 223, 214, 42, 42, 42, - 42, 219, 42, 42, 42, 221, 224, 226, 237, 220, - 229, 42, 236, 231, 232, 225, 222, 241, 42, 42, - - 42, 227, 228, 233, 230, 238, 234, 239, 42, 42, - 42, 235, 42, 42, 240, 246, 246, 246, 246, 253, - 242, 42, 243, 247, 255, 42, 42, 42, 244, 247, - 137, 137, 137, 137, 42, 254, 258, 42, 138, 42, - 252, 257, 261, 42, 138, 248, 249, 256, 250, 250, - 250, 250, 42, 42, 42, 42, 42, 262, 42, 260, - 259, 42, 42, 266, 42, 264, 42, 42, 267, 265, - 263, 42, 273, 42, 42, 42, 42, 42, 42, 42, - 268, 280, 42, 42, 269, 279, 270, 271, 42, 277, - 272, 281, 275, 284, 283, 276, 278, 282, 285, 274, - - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 286, 42, 289, 291, 42, 42, 42, 42, 290, 295, - 288, 42, 293, 42, 287, 42, 296, 292, 42, 42, - 297, 303, 294, 42, 305, 299, 298, 300, 300, 300, - 300, 302, 301, 306, 300, 300, 42, 300, 300, 300, - 300, 300, 300, 304, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 307, 42, 42, 42, 324, - 313, 308, 317, 312, 315, 322, 42, 310, 309, 314, - 311, 42, 316, 42, 323, 319, 318, 42, 42, 42, - 42, 320, 42, 321, 326, 328, 325, 42, 42, 42, - - 330, 42, 42, 42, 327, 246, 246, 246, 246, 333, - 337, 329, 392, 247, 363, 332, 334, 248, 248, 247, - 331, 331, 331, 331, 331, 331, 331, 331, 250, 250, - 250, 250, 42, 250, 250, 250, 250, 42, 42, 42, - 42, 42, 42, 42, 42, 336, 42, 42, 340, 42, - 42, 42, 42, 42, 42, 42, 335, 339, 342, 347, - 42, 341, 348, 345, 338, 42, 344, 42, 349, 42, - 42, 42, 346, 42, 343, 350, 356, 42, 351, 357, - 354, 358, 42, 355, 42, 359, 42, 42, 352, 42, - 353, 42, 42, 42, 42, 42, 42, 42, 42, 360, - - 42, 42, 364, 362, 361, 373, 365, 367, 366, 374, - 372, 375, 42, 42, 371, 42, 368, 42, 42, 370, - 369, 378, 42, 376, 42, 377, 42, 379, 42, 42, - 381, 42, 42, 42, 380, 382, 42, 383, 384, 331, - 331, 331, 331, 42, 388, 42, 385, 42, 42, 391, - 390, 386, 42, 395, 396, 387, 389, 42, 42, 42, - 394, 42, 42, 42, 42, 399, 42, 42, 393, 398, - 42, 42, 404, 402, 42, 405, 42, 42, 42, 397, - 409, 400, 401, 42, 403, 406, 42, 42, 407, 42, - 42, 42, 42, 410, 408, 42, 411, 42, 42, 42, - - 412, 416, 419, 418, 42, 414, 42, 42, 417, 415, - 413, 42, 421, 423, 422, 42, 42, 42, 42, 42, - 42, 42, 420, 42, 42, 424, 427, 426, 42, 431, - 429, 425, 433, 435, 42, 42, 428, 434, 42, 42, - 432, 437, 430, 42, 42, 42, 42, 438, 436, 42, - 42, 42, 42, 440, 42, 42, 439, 42, 451, 444, - 448, 449, 442, 42, 42, 42, 42, 441, 42, 445, - 446, 447, 457, 42, 443, 453, 454, 42, 450, 455, - 452, 456, 42, 42, 42, 42, 42, 42, 42, 42, - 458, 42, 42, 42, 462, 459, 463, 42, 467, 464, - - 460, 461, 42, 465, 42, 468, 42, 42, 42, 42, - 469, 466, 42, 42, 42, 42, 471, 470, 476, 477, - 42, 42, 42, 475, 472, 42, 473, 42, 42, 479, - 478, 480, 482, 474, 484, 42, 481, 42, 483, 42, - 42, 488, 42, 42, 42, 485, 42, 487, 491, 489, - 42, 42, 490, 486, 42, 493, 42, 42, 42, 42, - 42, 497, 42, 42, 42, 42, 492, 503, 501, 494, - 495, 504, 498, 502, 496, 499, 42, 42, 500, 507, - 42, 42, 42, 506, 505, 42, 508, 509, 42, 42, - 510, 512, 42, 42, 42, 42, 42, 514, 42, 42, - - 517, 42, 519, 42, 42, 513, 511, 42, 42, 516, - 42, 518, 42, 520, 524, 42, 515, 42, 521, 522, - 526, 42, 42, 42, 527, 530, 42, 523, 528, 42, - 42, 525, 42, 529, 42, 42, 532, 42, 536, 42, - 42, 533, 535, 42, 42, 531, 537, 42, 534, 42, - 42, 543, 538, 42, 42, 544, 540, 539, 42, 42, - 42, 548, 542, 541, 549, 42, 42, 42, 547, 42, - 42, 42, 42, 546, 545, 42, 42, 42, 42, 42, - 550, 39, 39, 39, 39, 39, 41, 41, 51, 42, - 51, 51, 51, 53, 53, 140, 140, 140, 140, 140, + 83, 83, 83, 83, 42, 42, 174, 42, 171, 176, + 173, 184, 42, 177, 178, 179, 186, 180, 42, 42, + 42, 185, 42, 42, 42, 42, 42, 42, 187, 42, + 42, 197, 192, 194, 196, 190, 198, 42, 42, 42, + 188, 191, 42, 189, 199, 42, 193, 195, 200, 207, + 204, 42, 203, 201, 211, 42, 42, 42, 205, 42, + 42, 42, 42, 208, 217, 202, 213, 209, 42, 212, + 206, 215, 42, 218, 216, 42, 210, 42, 42, 42, + 214, 225, 219, 42, 42, 241, 221, 42, 226, 42, + 220, 224, 42, 229, 236, 223, 42, 222, 231, 232, + + 42, 42, 227, 228, 42, 42, 240, 230, 233, 42, + 238, 234, 239, 42, 242, 42, 235, 246, 246, 246, + 246, 251, 42, 243, 252, 247, 254, 42, 42, 244, + 256, 247, 137, 137, 137, 137, 42, 253, 260, 42, + 138, 42, 255, 42, 42, 42, 138, 248, 249, 258, + 250, 250, 250, 250, 42, 257, 42, 42, 263, 262, + 42, 264, 42, 261, 42, 259, 42, 42, 42, 267, + 265, 42, 42, 42, 266, 42, 268, 274, 42, 42, + 42, 42, 42, 42, 42, 280, 324, 270, 269, 278, + 281, 271, 272, 282, 273, 42, 279, 276, 42, 42, + + 277, 275, 283, 42, 42, 284, 42, 42, 285, 286, + 42, 42, 42, 42, 289, 42, 291, 42, 42, 42, + 42, 290, 288, 287, 42, 295, 42, 293, 42, 42, + 303, 296, 292, 297, 326, 42, 42, 294, 42, 298, + 42, 42, 312, 299, 300, 300, 300, 300, 42, 305, + 301, 300, 300, 302, 300, 300, 300, 300, 300, 300, + 304, 42, 42, 310, 311, 42, 42, 307, 42, 42, + 42, 306, 42, 42, 42, 42, 315, 313, 42, 308, + 317, 42, 42, 320, 316, 321, 309, 42, 314, 327, + 42, 319, 322, 42, 42, 318, 325, 42, 323, 328, + + 42, 329, 246, 246, 246, 246, 331, 331, 331, 331, + 247, 332, 359, 42, 330, 334, 247, 248, 248, 42, + 331, 331, 331, 331, 250, 250, 250, 250, 42, 250, + 250, 250, 250, 42, 42, 42, 42, 335, 42, 42, + 42, 336, 333, 42, 42, 42, 338, 42, 42, 341, + 42, 337, 42, 42, 42, 42, 340, 42, 42, 343, + 348, 350, 342, 339, 42, 345, 346, 349, 42, 42, + 42, 42, 42, 42, 347, 344, 357, 42, 42, 351, + 42, 358, 352, 42, 42, 356, 42, 353, 42, 354, + 42, 42, 42, 355, 360, 361, 362, 365, 363, 366, + + 364, 42, 367, 42, 42, 42, 42, 42, 42, 42, + 384, 371, 368, 373, 374, 372, 370, 369, 375, 42, + 376, 42, 42, 380, 42, 42, 42, 42, 386, 377, + 378, 379, 381, 42, 42, 42, 382, 383, 331, 331, + 331, 331, 42, 42, 42, 385, 388, 42, 390, 391, + 42, 392, 42, 42, 42, 395, 42, 387, 389, 396, + 397, 42, 42, 42, 42, 42, 399, 393, 400, 42, + 394, 42, 405, 42, 398, 403, 42, 42, 42, 406, + 42, 42, 401, 402, 42, 42, 42, 404, 42, 411, + 407, 408, 42, 42, 410, 42, 409, 42, 412, 42, + + 42, 42, 416, 414, 42, 413, 415, 418, 42, 421, + 419, 417, 42, 420, 422, 423, 424, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 426, 427, + 42, 431, 425, 429, 433, 435, 434, 428, 436, 42, + 42, 42, 432, 430, 42, 437, 42, 42, 439, 438, + 42, 42, 42, 42, 440, 42, 42, 42, 42, 42, + 445, 449, 450, 442, 443, 441, 452, 42, 42, 454, + 42, 447, 448, 42, 446, 42, 444, 42, 457, 451, + 42, 455, 42, 42, 453, 42, 42, 462, 42, 42, + 42, 42, 456, 42, 42, 458, 463, 42, 459, 464, + + 460, 461, 467, 42, 465, 468, 42, 42, 469, 42, + 42, 470, 466, 42, 42, 42, 42, 42, 471, 42, + 42, 42, 472, 477, 478, 42, 476, 42, 473, 474, + 482, 479, 480, 42, 484, 42, 475, 483, 42, 481, + 42, 488, 42, 487, 42, 485, 42, 42, 489, 42, + 491, 42, 42, 486, 42, 42, 42, 42, 493, 42, + 42, 42, 42, 42, 490, 494, 498, 501, 492, 502, + 499, 503, 42, 500, 495, 496, 497, 42, 42, 504, + 42, 42, 42, 42, 506, 505, 508, 42, 510, 42, + 42, 42, 42, 511, 507, 42, 42, 42, 514, 42, + + 42, 517, 42, 519, 42, 509, 513, 42, 516, 42, + 42, 512, 518, 42, 520, 515, 42, 521, 42, 523, + 525, 42, 522, 526, 42, 42, 42, 42, 524, 527, + 42, 529, 528, 42, 42, 534, 42, 42, 42, 42, + 533, 42, 530, 531, 535, 532, 540, 541, 42, 42, + 42, 536, 42, 42, 42, 42, 537, 544, 42, 539, + 538, 42, 545, 42, 42, 42, 42, 42, 42, 42, + 42, 542, 543, 42, 42, 546, 39, 39, 39, 39, + 39, 41, 41, 51, 42, 51, 51, 51, 53, 53, + 140, 140, 140, 140, 140, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, @@ -714,155 +713,153 @@ 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 141, 42, 245, 42, - 42, 42, 42, 141, 42, 133, 42, 40, 551, 3, + 141, 42, 245, 42, 42, 42, 42, 141, 42, 133, + 42, 40, 547, 3, 547, 547, 547, 547, 547, 547, - 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, - 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, - 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, - 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, - 551, 551, 551, 551 + 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, + 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, + 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, + 547, 547, 547, 547, 547, 547, 547, 547 } ; -static yyconst short int yy_chk[1245] = +static yyconst short int yy_chk[1239] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 10, 10, - 10, 10, 11, 11, 11, 11, 11, 12, 44, 44, - 44, 44, 12, 13, 13, 13, 13, 13, 13, 14, - 14, 14, 14, 14, 14, 16, 60, 17, 24, 19, - 18, 16, 16, 16, 16, 19, 17, 19, 60, 21, - 18, 31, 24, 17, 18, 17, 13, 17, 19, 20, - - 17, 31, 18, 36, 23, 20, 38, 21, 30, 20, - 21, 559, 28, 36, 23, 20, 38, 21, 20, 22, - 23, 30, 28, 78, 47, 22, 69, 22, 22, 47, - 27, 28, 30, 78, 26, 22, 27, 28, 55, 22, - 26, 22, 25, 25, 25, 25, 25, 55, 26, 27, - 33, 69, 35, 26, 25, 27, 33, 26, 35, 57, - 37, 37, 56, 25, 25, 29, 58, 61, 57, 33, - 557, 35, 33, 63, 64, 29, 56, 29, 56, 33, - 37, 29, 64, 29, 68, 29, 58, 29, 32, 63, - 59, 61, 32, 45, 45, 45, 45, 45, 66, 75, - - 68, 32, 32, 59, 32, 32, 32, 59, 32, 54, - 54, 54, 54, 75, 32, 554, 32, 32, 89, 32, - 34, 65, 66, 70, 34, 46, 46, 46, 46, 46, - 46, 89, 70, 34, 34, 72, 34, 65, 34, 65, - 34, 74, 34, 81, 82, 144, 34, 48, 48, 48, - 48, 48, 81, 82, 82, 48, 550, 144, 74, 72, - 548, 48, 49, 49, 49, 49, 49, 49, 50, 50, - 50, 50, 50, 73, 76, 50, 50, 67, 50, 50, - 50, 50, 50, 50, 77, 67, 79, 80, 67, 73, - 83, 84, 85, 76, 77, 86, 73, 67, 88, 87, - - 91, 94, 86, 90, 88, 92, 80, 83, 77, 91, - 79, 84, 95, 96, 85, 85, 85, 87, 85, 90, - 97, 92, 98, 94, 104, 99, 94, 100, 95, 101, - 97, 102, 98, 100, 96, 99, 103, 105, 101, 106, - 108, 107, 110, 109, 97, 102, 98, 115, 104, 107, - 108, 110, 111, 106, 113, 119, 114, 107, 103, 109, - 112, 115, 111, 114, 108, 105, 110, 116, 109, 107, - 112, 118, 120, 113, 121, 119, 111, 122, 123, 547, - 124, 116, 126, 127, 125, 118, 120, 122, 127, 116, - 124, 128, 126, 125, 125, 121, 118, 130, 131, 130, - - 132, 122, 123, 125, 124, 128, 125, 128, 129, 147, - 150, 125, 546, 148, 129, 135, 135, 135, 135, 147, - 131, 145, 132, 135, 150, 152, 157, 154, 132, 135, - 137, 137, 137, 137, 137, 148, 154, 155, 137, 151, - 145, 152, 157, 158, 137, 138, 138, 151, 138, 138, - 138, 138, 138, 156, 159, 160, 161, 158, 163, 156, - 155, 164, 165, 161, 167, 160, 168, 166, 163, 160, - 159, 169, 168, 170, 173, 172, 544, 175, 176, 171, - 163, 173, 174, 177, 164, 172, 165, 166, 178, 171, - 167, 174, 170, 177, 176, 170, 171, 175, 178, 169, - - 179, 180, 181, 182, 183, 184, 185, 186, 189, 188, - 179, 200, 181, 183, 190, 197, 203, 204, 182, 188, - 180, 205, 185, 210, 179, 542, 189, 184, 541, 206, - 190, 205, 186, 211, 210, 200, 197, 202, 202, 202, - 202, 204, 203, 211, 202, 202, 212, 202, 202, 202, - 202, 202, 202, 206, 215, 216, 218, 219, 220, 221, - 224, 235, 223, 237, 222, 212, 228, 236, 539, 237, - 220, 215, 223, 219, 222, 235, 244, 216, 215, 221, - 218, 231, 222, 234, 236, 228, 224, 238, 239, 240, - 241, 231, 243, 234, 239, 241, 238, 251, 253, 288, - - 244, 252, 258, 334, 240, 246, 246, 246, 246, 252, - 258, 243, 334, 246, 288, 251, 253, 247, 247, 246, - 247, 247, 247, 247, 248, 248, 248, 248, 249, 249, - 249, 249, 249, 250, 250, 250, 250, 250, 255, 256, - 259, 260, 261, 262, 263, 256, 264, 266, 261, 265, - 267, 273, 269, 268, 274, 276, 255, 260, 263, 268, - 270, 262, 269, 266, 259, 275, 265, 279, 270, 281, - 280, 283, 267, 284, 264, 273, 280, 285, 274, 281, - 276, 283, 286, 279, 287, 284, 289, 290, 275, 293, - 275, 294, 295, 296, 298, 299, 302, 303, 305, 285, - - 526, 306, 289, 287, 286, 303, 290, 294, 293, 305, - 302, 306, 307, 311, 299, 310, 295, 313, 314, 298, - 296, 311, 316, 307, 319, 310, 320, 313, 322, 324, - 316, 326, 321, 328, 314, 319, 329, 320, 321, 331, - 331, 331, 331, 333, 328, 336, 322, 338, 339, 333, - 329, 324, 337, 338, 339, 326, 328, 340, 342, 341, - 337, 343, 344, 345, 347, 342, 346, 349, 336, 341, - 355, 352, 347, 345, 353, 349, 354, 356, 357, 340, - 355, 343, 344, 358, 346, 352, 360, 361, 353, 362, - 365, 363, 367, 356, 354, 366, 357, 368, 369, 371, - - 358, 363, 367, 366, 370, 361, 372, 373, 365, 362, - 360, 374, 369, 371, 370, 375, 376, 378, 379, 380, - 382, 386, 368, 389, 384, 372, 375, 374, 385, 380, - 378, 373, 384, 386, 387, 388, 376, 385, 390, 392, - 382, 388, 379, 393, 395, 396, 399, 389, 387, 397, - 408, 400, 401, 392, 404, 403, 390, 415, 408, 397, - 403, 403, 395, 409, 417, 412, 413, 393, 420, 399, - 400, 401, 417, 414, 396, 412, 413, 421, 404, 414, - 409, 415, 423, 424, 426, 427, 433, 436, 437, 438, - 420, 439, 440, 442, 426, 421, 427, 443, 438, 433, - - 423, 424, 446, 436, 447, 439, 448, 449, 450, 452, - 440, 437, 453, 454, 456, 455, 443, 442, 450, 452, - 458, 460, 457, 449, 446, 459, 447, 462, 466, 454, - 453, 455, 457, 448, 459, 464, 456, 463, 458, 465, - 467, 464, 468, 469, 471, 460, 472, 463, 467, 465, - 473, 474, 466, 462, 478, 469, 476, 477, 479, 487, - 520, 474, 494, 486, 488, 492, 468, 487, 479, 471, - 472, 488, 476, 486, 473, 477, 490, 491, 478, 492, - 498, 497, 499, 491, 490, 500, 494, 497, 501, 502, - 498, 500, 503, 504, 505, 506, 507, 502, 509, 511, - - 505, 510, 507, 512, 513, 501, 499, 514, 517, 504, - 516, 506, 518, 509, 513, 521, 503, 519, 510, 511, - 516, 522, 523, 524, 517, 521, 527, 512, 518, 525, - 528, 514, 529, 519, 530, 531, 523, 532, 528, 533, - 534, 524, 527, 535, 537, 522, 529, 536, 525, 538, - 540, 535, 530, 543, 545, 536, 532, 531, 549, 515, - 508, 543, 534, 533, 545, 496, 495, 493, 540, 489, - 485, 484, 483, 538, 537, 482, 481, 480, 475, 470, - 549, 552, 552, 552, 552, 552, 553, 553, 555, 461, - 555, 555, 555, 556, 556, 558, 558, 558, 558, 558, - - 451, 445, 444, 441, 435, 434, 432, 431, 430, 429, - 428, 425, 422, 419, 418, 416, 411, 410, 407, 406, - 405, 402, 398, 394, 391, 383, 381, 377, 364, 359, - 351, 350, 348, 335, 332, 330, 327, 325, 323, 318, - 317, 315, 312, 309, 308, 304, 301, 297, 292, 291, - 282, 278, 277, 272, 271, 257, 254, 242, 233, 232, - 230, 229, 227, 226, 225, 217, 214, 213, 209, 208, - 207, 201, 199, 198, 196, 195, 194, 193, 192, 191, - 187, 162, 153, 149, 146, 143, 140, 136, 133, 117, - 93, 71, 62, 52, 41, 39, 8, 7, 3, 551, - - 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, - 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, - 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, - 551, 551, 551, 551, 551, 551, 551, 551, 551, 551, - 551, 551, 551, 551 + 10, 10, 11, 11, 11, 11, 11, 12, 37, 37, + 63, 555, 12, 13, 13, 13, 13, 13, 13, 14, + 14, 14, 14, 14, 14, 16, 63, 17, 37, 19, + 18, 16, 16, 16, 16, 19, 17, 19, 30, 21, + 18, 60, 19, 17, 18, 17, 13, 17, 19, 20, + + 17, 30, 18, 60, 23, 20, 31, 21, 24, 20, + 21, 36, 30, 28, 23, 20, 31, 21, 20, 22, + 23, 36, 24, 28, 47, 22, 86, 22, 22, 47, + 27, 58, 28, 86, 26, 22, 27, 38, 28, 22, + 26, 22, 25, 25, 25, 25, 25, 38, 26, 27, + 33, 58, 35, 26, 25, 27, 33, 26, 35, 44, + 44, 44, 44, 127, 25, 29, 56, 55, 127, 33, + 64, 35, 33, 59, 65, 29, 55, 29, 64, 33, + 56, 29, 56, 29, 65, 29, 59, 29, 32, 57, + 59, 61, 32, 45, 45, 45, 45, 45, 57, 67, + + 87, 32, 32, 553, 32, 32, 32, 70, 32, 54, + 54, 54, 54, 71, 32, 61, 32, 32, 87, 32, + 34, 66, 71, 67, 34, 46, 46, 46, 46, 46, + 46, 76, 70, 34, 34, 73, 34, 66, 34, 66, + 34, 69, 34, 75, 79, 76, 34, 48, 48, 48, + 48, 48, 88, 550, 79, 48, 546, 69, 88, 73, + 75, 48, 49, 49, 49, 49, 49, 49, 50, 50, + 50, 50, 50, 74, 77, 50, 50, 68, 50, 50, + 50, 50, 50, 50, 78, 68, 80, 81, 68, 74, + 82, 85, 84, 77, 78, 544, 74, 68, 89, 82, + + 83, 83, 83, 83, 83, 90, 81, 91, 78, 84, + 80, 89, 92, 85, 85, 85, 91, 85, 94, 95, + 96, 90, 97, 98, 99, 100, 103, 101, 92, 104, + 102, 100, 97, 98, 99, 95, 101, 105, 106, 108, + 94, 96, 107, 94, 102, 110, 97, 98, 103, 108, + 107, 109, 106, 104, 110, 113, 111, 114, 107, 115, + 121, 112, 543, 108, 114, 105, 111, 109, 116, 110, + 107, 112, 118, 115, 113, 119, 109, 120, 122, 123, + 111, 121, 116, 124, 126, 130, 118, 130, 122, 125, + 116, 120, 131, 124, 126, 119, 128, 118, 125, 125, + + 129, 132, 122, 123, 148, 145, 129, 124, 125, 144, + 128, 125, 128, 541, 131, 156, 125, 135, 135, 135, + 135, 144, 151, 132, 145, 135, 148, 147, 150, 132, + 151, 135, 137, 137, 137, 137, 137, 147, 156, 152, + 137, 154, 150, 158, 159, 160, 137, 138, 138, 154, + 138, 138, 138, 138, 138, 152, 155, 157, 159, 158, + 161, 160, 162, 157, 165, 155, 164, 166, 168, 162, + 161, 169, 167, 170, 161, 173, 164, 169, 171, 172, + 237, 539, 176, 174, 175, 173, 237, 165, 164, 172, + 174, 166, 167, 175, 168, 177, 172, 171, 178, 179, + + 171, 170, 176, 180, 181, 177, 182, 183, 178, 179, + 184, 185, 186, 189, 181, 188, 183, 190, 197, 200, + 205, 182, 180, 179, 203, 188, 219, 185, 239, 204, + 205, 189, 184, 190, 239, 538, 206, 186, 210, 197, + 218, 216, 219, 200, 202, 202, 202, 202, 212, 210, + 203, 202, 202, 204, 202, 202, 202, 202, 202, 202, + 206, 211, 215, 216, 218, 220, 222, 212, 221, 224, + 223, 211, 228, 231, 240, 234, 222, 220, 235, 215, + 223, 236, 243, 231, 222, 234, 215, 238, 221, 240, + 244, 228, 235, 251, 241, 224, 238, 253, 236, 241, + + 284, 243, 246, 246, 246, 246, 248, 248, 248, 248, + 246, 251, 284, 537, 244, 253, 246, 247, 247, 255, + 247, 247, 247, 247, 249, 249, 249, 249, 249, 250, + 250, 250, 250, 250, 252, 256, 258, 255, 259, 260, + 261, 256, 252, 262, 263, 264, 259, 265, 266, 262, + 267, 258, 268, 271, 269, 274, 261, 270, 275, 264, + 269, 271, 263, 260, 276, 266, 267, 270, 277, 280, + 281, 282, 285, 286, 268, 265, 281, 287, 290, 274, + 293, 282, 275, 288, 289, 280, 294, 276, 295, 276, + 296, 298, 299, 277, 285, 286, 287, 290, 288, 293, + + 289, 302, 294, 305, 321, 303, 324, 314, 306, 307, + 321, 299, 295, 303, 305, 302, 298, 296, 306, 310, + 307, 313, 311, 314, 316, 319, 320, 322, 324, 310, + 311, 313, 316, 326, 329, 328, 319, 320, 331, 331, + 331, 331, 334, 333, 336, 322, 328, 338, 329, 333, + 337, 334, 341, 339, 340, 338, 342, 326, 328, 339, + 340, 343, 344, 345, 348, 346, 342, 336, 343, 347, + 337, 350, 348, 357, 341, 346, 353, 354, 355, 350, + 358, 360, 344, 345, 356, 361, 362, 347, 368, 357, + 353, 354, 363, 365, 356, 369, 355, 372, 358, 366, + + 367, 371, 363, 361, 370, 360, 362, 366, 373, 369, + 367, 365, 374, 368, 370, 371, 372, 376, 375, 379, + 378, 380, 382, 386, 387, 389, 384, 385, 374, 375, + 390, 380, 373, 378, 384, 386, 385, 376, 387, 388, + 392, 393, 382, 379, 394, 388, 396, 397, 390, 389, + 398, 400, 401, 402, 392, 405, 404, 525, 409, 413, + 398, 404, 404, 394, 396, 393, 409, 410, 415, 413, + 417, 401, 402, 420, 400, 414, 397, 426, 417, 405, + 421, 414, 423, 424, 410, 427, 433, 426, 436, 437, + 440, 439, 415, 438, 443, 420, 427, 442, 421, 433, + + 423, 424, 438, 444, 436, 439, 447, 448, 440, 449, + 450, 442, 437, 451, 453, 454, 455, 456, 443, 458, + 457, 460, 444, 451, 453, 459, 450, 462, 447, 448, + 457, 454, 455, 463, 459, 464, 449, 458, 465, 456, + 466, 464, 467, 463, 468, 460, 469, 470, 465, 472, + 467, 473, 474, 462, 477, 478, 475, 479, 469, 486, + 520, 515, 494, 487, 466, 470, 475, 479, 468, 486, + 477, 487, 488, 478, 472, 473, 474, 490, 491, 488, + 492, 495, 498, 499, 491, 490, 494, 500, 498, 501, + 502, 503, 504, 499, 492, 505, 506, 507, 502, 510, + + 511, 505, 512, 507, 514, 495, 501, 517, 504, 513, + 516, 500, 506, 518, 510, 503, 519, 511, 522, 513, + 516, 521, 512, 517, 526, 523, 524, 527, 514, 518, + 528, 521, 519, 529, 530, 527, 531, 532, 533, 534, + 526, 535, 522, 523, 528, 524, 533, 534, 536, 540, + 509, 529, 542, 545, 508, 497, 530, 540, 496, 532, + 531, 493, 542, 489, 485, 484, 483, 482, 481, 480, + 476, 535, 536, 471, 461, 545, 548, 548, 548, 548, + 548, 549, 549, 551, 452, 551, 551, 551, 552, 552, + 554, 554, 554, 554, 554, 446, 445, 441, 435, 434, + + 432, 431, 430, 429, 428, 425, 422, 419, 418, 416, + 412, 411, 408, 407, 406, 403, 399, 395, 391, 383, + 381, 377, 364, 359, 352, 351, 349, 335, 332, 330, + 327, 325, 323, 318, 317, 315, 312, 309, 308, 304, + 301, 297, 292, 291, 283, 279, 278, 273, 272, 257, + 254, 242, 233, 232, 230, 229, 227, 226, 225, 217, + 214, 213, 209, 208, 207, 201, 199, 198, 196, 195, + 194, 193, 192, 191, 187, 163, 153, 149, 146, 143, + 140, 136, 133, 117, 93, 72, 62, 52, 41, 39, + 8, 7, 3, 547, 547, 547, 547, 547, 547, 547, + + 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, + 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, + 547, 547, 547, 547, 547, 547, 547, 547, 547, 547, + 547, 547, 547, 547, 547, 547, 547, 547 } ; static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; @@ -1027,7 +1024,7 @@ /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing * it to deal with 64 bit numbers. */ -#line 1031 "Lexer.cpp" +#line 1028 "Lexer.cpp" /* Macros after this point can all be overridden by user definitions in * section 1. @@ -1181,7 +1178,7 @@ #line 190 "/proj/llvm/llvm-1/lib/AsmParser/Lexer.l" -#line 1185 "Lexer.cpp" +#line 1182 "Lexer.cpp" if ( yy_init ) { @@ -1229,14 +1226,14 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 552 ) + if ( yy_current_state >= 548 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; *yy_state_ptr++ = yy_current_state; ++yy_cp; } - while ( yy_current_state != 551 ); + while ( yy_current_state != 547 ); yy_find_action: yy_current_state = *--yy_state_ptr; @@ -1365,7 +1362,7 @@ case 19: YY_RULE_SETUP #line 211 "/proj/llvm/llvm-1/lib/AsmParser/Lexer.l" -{ return IMPLEMENTATION; } +{ return CHECKPOINT; } YY_BREAK case 20: YY_RULE_SETUP @@ -2052,7 +2049,7 @@ #line 443 "/proj/llvm/llvm-1/lib/AsmParser/Lexer.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 2056 "Lexer.cpp" +#line 2053 "Lexer.cpp" case YY_END_OF_BUFFER: { @@ -2339,7 +2336,7 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 552 ) + if ( yy_current_state >= 548 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2369,11 +2366,11 @@ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 552 ) + if ( yy_current_state >= 548 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 551); + yy_is_jam = (yy_current_state == 547); if ( ! yy_is_jam ) *yy_state_ptr++ = yy_current_state; Index: llvm/lib/AsmParser/Lexer.l.cvs diff -u llvm/lib/AsmParser/Lexer.l.cvs:1.28 llvm/lib/AsmParser/Lexer.l.cvs:1.29 --- llvm/lib/AsmParser/Lexer.l.cvs:1.28 Wed Mar 21 21:14:08 2007 +++ llvm/lib/AsmParser/Lexer.l.cvs Tue Mar 27 21:37:40 2007 @@ -208,7 +208,7 @@ hidden { return HIDDEN; } extern_weak { return EXTERN_WEAK; } external { return EXTERNAL; } -implementation { return IMPLEMENTATION; } +checkpoint { return CHECKPOINT; } zeroinitializer { return ZEROINITIALIZER; } \.\.\. { return DOTDOTDOT; } undef { return UNDEF; } Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.77 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.78 --- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.77 Wed Mar 21 21:14:08 2007 +++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Tue Mar 27 21:37:40 2007 @@ -82,7 +82,7 @@ LABELSTR = 273, STRINGCONSTANT = 274, ATSTRINGCONSTANT = 275, - IMPLEMENTATION = 276, + CHECKPOINT = 276, ZEROINITIALIZER = 277, TRUETOK = 278, FALSETOK = 279, @@ -217,7 +217,7 @@ #define LABELSTR 273 #define STRINGCONSTANT 274 #define ATSTRINGCONSTANT 275 -#define IMPLEMENTATION 276 +#define CHECKPOINT 276 #define ZEROINITIALIZER 277 #define TRUETOK 278 #define FALSETOK 279 @@ -1729,38 +1729,38 @@ "$end", "error", "$undefined", "ESINT64VAL", "EUINT64VAL", "ESAPINTVAL", "EUAPINTVAL", "LOCALVAL_ID", "GLOBALVAL_ID", "FPVAL", "VOID", "INTTYPE", "FLOAT", "DOUBLE", "LABEL", "TYPE", "LOCALVAR", "GLOBALVAR", "LABELSTR", - "STRINGCONSTANT", "ATSTRINGCONSTANT", "IMPLEMENTATION", - "ZEROINITIALIZER", "TRUETOK", "FALSETOK", "BEGINTOK", "ENDTOK", - "DECLARE", "DEFINE", "GLOBAL", "CONSTANT", "SECTION", "VOLATILE", "TO", - "DOTDOTDOT", "NULL_TOK", "UNDEF", "INTERNAL", "LINKONCE", "WEAK", - "APPENDING", "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "OPAQUE", - "EXTERNAL", "TARGET", "TRIPLE", "ALIGN", "DEPLIBS", "CALL", "TAIL", - "ASM_TOK", "MODULE", "SIDEEFFECT", "CC_TOK", "CCC_TOK", "FASTCC_TOK", - "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT", - "RET", "BR", "SWITCH", "INVOKE", "UNWIND", "UNREACHABLE", "ADD", "SUB", - "MUL", "UDIV", "SDIV", "FDIV", "UREM", "SREM", "FREM", "AND", "OR", - "XOR", "SHL", "LSHR", "ASHR", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT", - "SLE", "SGE", "ULT", "UGT", "ULE", "UGE", "OEQ", "ONE", "OLT", "OGT", - "OLE", "OGE", "ORD", "UNO", "UEQ", "UNE", "MALLOC", "ALLOCA", "FREE", - "LOAD", "STORE", "GETELEMENTPTR", "TRUNC", "ZEXT", "SEXT", "FPTRUNC", - "FPEXT", "BITCAST", "UITOFP", "SITOFP", "FPTOUI", "FPTOSI", "INTTOPTR", - "PTRTOINT", "PHI_TOK", "SELECT", "VAARG", "EXTRACTELEMENT", - "INSERTELEMENT", "SHUFFLEVECTOR", "NORETURN", "INREG", "SRET", - "NOUNWIND", "DEFAULT", "HIDDEN", "'='", "','", "'*'", "'\\\\'", "'('", - "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'", "'c'", "$accept", - "ArithmeticOps", "LogicalOps", "CastOps", "IPredicates", "FPredicates", - "IntType", "FPType", "LocalName", "OptLocalName", "OptLocalAssign", - "GlobalName", "OptGlobalAssign", "GVInternalLinkage", - "GVExternalLinkage", "GVVisibilityStyle", "FunctionDeclareLinkage", - "FunctionDefineLinkage", "OptCallingConv", "ParamAttr", "OptParamAttrs", - "FuncAttr", "OptFuncAttrs", "OptAlign", "OptCAlign", "SectionString", - "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "PrimType", - "Types", "ArgType", "ResultTypes", "ArgTypeList", "ArgTypeListI", - "TypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType", - "Module", "DefinitionList", "Definition", "@1", "@2", "@3", "@4", "@5", - "AsmBlock", "TargetDefinition", "LibrariesDefinition", "LibList", - "ArgListH", "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader", - "END", "Function", "FunctionProto", "OptSideEffect", "ConstValueRef", + "STRINGCONSTANT", "ATSTRINGCONSTANT", "CHECKPOINT", "ZEROINITIALIZER", + "TRUETOK", "FALSETOK", "BEGINTOK", "ENDTOK", "DECLARE", "DEFINE", + "GLOBAL", "CONSTANT", "SECTION", "VOLATILE", "TO", "DOTDOTDOT", + "NULL_TOK", "UNDEF", "INTERNAL", "LINKONCE", "WEAK", "APPENDING", + "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "OPAQUE", "EXTERNAL", "TARGET", + "TRIPLE", "ALIGN", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE", + "SIDEEFFECT", "CC_TOK", "CCC_TOK", "FASTCC_TOK", "COLDCC_TOK", + "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT", "RET", "BR", + "SWITCH", "INVOKE", "UNWIND", "UNREACHABLE", "ADD", "SUB", "MUL", "UDIV", + "SDIV", "FDIV", "UREM", "SREM", "FREM", "AND", "OR", "XOR", "SHL", + "LSHR", "ASHR", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT", "SLE", "SGE", + "ULT", "UGT", "ULE", "UGE", "OEQ", "ONE", "OLT", "OGT", "OLE", "OGE", + "ORD", "UNO", "UEQ", "UNE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE", + "GETELEMENTPTR", "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT", "BITCAST", + "UITOFP", "SITOFP", "FPTOUI", "FPTOSI", "INTTOPTR", "PTRTOINT", + "PHI_TOK", "SELECT", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", + "SHUFFLEVECTOR", "NORETURN", "INREG", "SRET", "NOUNWIND", "DEFAULT", + "HIDDEN", "'='", "','", "'*'", "'\\\\'", "'('", "')'", "'['", "'x'", + "']'", "'<'", "'>'", "'{'", "'}'", "'c'", "$accept", "ArithmeticOps", + "LogicalOps", "CastOps", "IPredicates", "FPredicates", "IntType", + "FPType", "LocalName", "OptLocalName", "OptLocalAssign", "GlobalName", + "OptGlobalAssign", "GVInternalLinkage", "GVExternalLinkage", + "GVVisibilityStyle", "FunctionDeclareLinkage", "FunctionDefineLinkage", + "OptCallingConv", "ParamAttr", "OptParamAttrs", "FuncAttr", + "OptFuncAttrs", "OptAlign", "OptCAlign", "SectionString", "OptSection", + "GlobalVarAttributes", "GlobalVarAttribute", "PrimType", "Types", + "ArgType", "ResultTypes", "ArgTypeList", "ArgTypeListI", "TypeListI", + "ConstVal", "ConstExpr", "ConstVector", "GlobalType", "Module", + "DefinitionList", "Definition", "@1", "@2", "@3", "@4", "@5", "AsmBlock", + "TargetDefinition", "LibrariesDefinition", "LibList", "ArgListH", + "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader", "END", + "Function", "FunctionProto", "OptSideEffect", "ConstValueRef", "SymbolicValueRef", "ValueRef", "ResolvedVal", "BasicBlockList", "BasicBlock", "InstructionList", "BBTerminatorInst", "JumpTable", "Inst", "PHIList", "ValueRefList", "IndexList", "OptTailCall", "InstVal", Index: llvm/lib/AsmParser/llvmAsmParser.h.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.60 llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.61 --- llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.60 Wed Mar 21 21:14:08 2007 +++ llvm/lib/AsmParser/llvmAsmParser.h.cvs Tue Mar 27 21:37:40 2007 @@ -47,7 +47,7 @@ LABELSTR = 273, STRINGCONSTANT = 274, ATSTRINGCONSTANT = 275, - IMPLEMENTATION = 276, + CHECKPOINT = 276, ZEROINITIALIZER = 277, TRUETOK = 278, FALSETOK = 279, @@ -182,7 +182,7 @@ #define LABELSTR 273 #define STRINGCONSTANT 274 #define ATSTRINGCONSTANT 275 -#define IMPLEMENTATION 276 +#define CHECKPOINT 276 #define ZEROINITIALIZER 277 #define TRUETOK 278 #define FALSETOK 279 Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.78 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.79 --- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.78 Wed Mar 21 21:14:08 2007 +++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Tue Mar 27 21:37:40 2007 @@ -1039,7 +1039,7 @@ %type OptAlign OptCAlign %type OptSection SectionString -%token IMPLEMENTATION ZEROINITIALIZER TRUETOK FALSETOK BEGINTOK ENDTOK +%token CHECKPOINT ZEROINITIALIZER TRUETOK FALSETOK BEGINTOK ENDTOK %token DECLARE DEFINE GLOBAL CONSTANT SECTION VOLATILE %token TO DOTDOTDOT NULL_TOK UNDEF INTERNAL LINKONCE WEAK APPENDING %token DLLIMPORT DLLEXPORT EXTERN_WEAK @@ -1942,7 +1942,7 @@ | MODULE ASM_TOK AsmBlock { CHECK_FOR_ERROR } - | IMPLEMENTATION { + | CHECKPOINT { // Emit an error if there are any unresolved types left. if (!CurModule.LateResolveTypes.empty()) { const ValID &DID = CurModule.LateResolveTypes.begin()->first; From reid at x10sys.com Tue Mar 27 21:39:25 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:25 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll 2007-03-16-InlineAsm.ll 2007-03-24-InlineAsmVectorOp.ll shift-codegen.ll test-hidden.ll x86-64-arg.ll x86-64-shortint.ll Message-ID: <200703280239.l2S2dPRs021045@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: 2007-01-13-StackPtrIndex.ll updated: 1.4 -> 1.5 2007-03-16-InlineAsm.ll updated: 1.1 -> 1.2 2007-03-24-InlineAsmVectorOp.ll updated: 1.1 -> 1.2 shift-codegen.ll updated: 1.1 -> 1.2 test-hidden.ll updated: 1.3 -> 1.4 x86-64-arg.ll updated: 1.1 -> 1.2 x86-64-shortint.ll updated: 1.1 -> 1.2 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -7) 2007-01-13-StackPtrIndex.ll | 1 - 2007-03-16-InlineAsm.ll | 1 - 2007-03-24-InlineAsmVectorOp.ll | 1 - shift-codegen.ll | 1 - test-hidden.ll | 1 - x86-64-arg.ll | 1 - x86-64-shortint.ll | 1 - 7 files changed, 7 deletions(-) Index: llvm/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll diff -u llvm/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll:1.4 llvm/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll:1.5 --- llvm/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll:1.4 Thu Feb 1 20:16:22 2007 +++ llvm/test/CodeGen/X86/2007-01-13-StackPtrIndex.ll Tue Mar 27 21:38:26 2007 @@ -5,7 +5,6 @@ target datalayout = "e-p:64:64" @i6000 = global [128 x i64] zeroinitializer, align 16 -implementation define void @foo(i32* %a0, i32* %a1, i32* %a2, i32* %a3, i32* %a4, i32* %a5) { b: Index: llvm/test/CodeGen/X86/2007-03-16-InlineAsm.ll diff -u llvm/test/CodeGen/X86/2007-03-16-InlineAsm.ll:1.1 llvm/test/CodeGen/X86/2007-03-16-InlineAsm.ll:1.2 --- llvm/test/CodeGen/X86/2007-03-16-InlineAsm.ll:1.1 Fri Mar 16 19:14:52 2007 +++ llvm/test/CodeGen/X86/2007-03-16-InlineAsm.ll Tue Mar 27 21:38:26 2007 @@ -1,7 +1,6 @@ ; RUN: llvm-as < %s | llc -march=x86 ; ModuleID = 'a.bc' -implementation ; Functions: define i32 @foo(i32 %A, i32 %B) { entry: Index: llvm/test/CodeGen/X86/2007-03-24-InlineAsmVectorOp.ll diff -u llvm/test/CodeGen/X86/2007-03-24-InlineAsmVectorOp.ll:1.1 llvm/test/CodeGen/X86/2007-03-24-InlineAsmVectorOp.ll:1.2 --- llvm/test/CodeGen/X86/2007-03-24-InlineAsmVectorOp.ll:1.1 Sun Mar 25 00:00:23 2007 +++ llvm/test/CodeGen/X86/2007-03-24-InlineAsmVectorOp.ll Tue Mar 27 21:38:26 2007 @@ -2,7 +2,6 @@ target datalayout = "e-p:32:32" target triple = "i686-apple-darwin9" -implementation ; Functions: define void @acoshf() { %tmp19 = tail call <2 x double> asm sideeffect "pcmpeqd $0, $0 \0A\09 cmpltsd $0, $0", "=x,0,~{dirflag},~{fpsr},~{flags}"( <2 x double> zeroinitializer ) ; <<2 x double>> [#uses=0] Index: llvm/test/CodeGen/X86/shift-codegen.ll diff -u llvm/test/CodeGen/X86/shift-codegen.ll:1.1 llvm/test/CodeGen/X86/shift-codegen.ll:1.2 --- llvm/test/CodeGen/X86/shift-codegen.ll:1.1 Tue Mar 20 01:01:41 2007 +++ llvm/test/CodeGen/X86/shift-codegen.ll Tue Mar 27 21:38:26 2007 @@ -6,7 +6,6 @@ @Y = weak global i32 0 ; [#uses=1] @X = weak global i32 0 ; [#uses=2] -implementation ; Functions: define void @fn1() { entry: Index: llvm/test/CodeGen/X86/test-hidden.ll diff -u llvm/test/CodeGen/X86/test-hidden.ll:1.3 llvm/test/CodeGen/X86/test-hidden.ll:1.4 --- llvm/test/CodeGen/X86/test-hidden.ll:1.3 Fri Jan 26 02:25:06 2007 +++ llvm/test/CodeGen/X86/test-hidden.ll Tue Mar 27 21:38:26 2007 @@ -6,7 +6,6 @@ @a = hidden global i32 0 @b = external global i32 -implementation ; Functions: define weak hidden void @_ZN6Person13privateMethodEv(%struct.Person* %this) { ret void Index: llvm/test/CodeGen/X86/x86-64-arg.ll diff -u llvm/test/CodeGen/X86/x86-64-arg.ll:1.1 llvm/test/CodeGen/X86/x86-64-arg.ll:1.2 --- llvm/test/CodeGen/X86/x86-64-arg.ll:1.1 Sun Feb 25 21:16:20 2007 +++ llvm/test/CodeGen/X86/x86-64-arg.ll Tue Mar 27 21:38:26 2007 @@ -6,7 +6,6 @@ target datalayout = "e-p:64:64" target triple = "x86_64-apple-darwin8" -implementation ; Functions: define i32 @test(i16 sext %X) { entry: Index: llvm/test/CodeGen/X86/x86-64-shortint.ll diff -u llvm/test/CodeGen/X86/x86-64-shortint.ll:1.1 llvm/test/CodeGen/X86/x86-64-shortint.ll:1.2 --- llvm/test/CodeGen/X86/x86-64-shortint.ll:1.1 Sun Feb 25 17:08:29 2007 +++ llvm/test/CodeGen/X86/x86-64-shortint.ll Tue Mar 27 21:38:26 2007 @@ -3,7 +3,6 @@ target datalayout = "e-p:64:64" target triple = "x86_64-apple-darwin8" -implementation ; Functions: define void @bar(i16 zext %A) { tail call void @foo( i16 %A sext ) From reid at x10sys.com Tue Mar 27 21:39:25 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:25 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll Message-ID: <200703280239.l2S2dPue021013@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/ADCE: 2002-01-31-UseStuckAround.ll updated: 1.4 -> 1.5 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -2) 2002-01-31-UseStuckAround.ll | 2 -- 1 files changed, 2 deletions(-) Index: llvm/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll diff -u llvm/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll:1.4 llvm/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll:1.5 --- llvm/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll:1.4 Mon Mar 19 13:27:35 2007 +++ llvm/test/Transforms/ADCE/2002-01-31-UseStuckAround.ll Tue Mar 27 21:38:26 2007 @@ -1,7 +1,5 @@ ; RUN: llvm-as %s -o - | opt -adce -implementation - define i32 @"main"(i32 %argc) begin br label %2 From reid at x10sys.com Tue Mar 27 21:39:26 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:26 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Alpha/add.ll i32_sub_1.ll zapnot.ll Message-ID: <200703280239.l2S2dQsB021106@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Alpha: add.ll updated: 1.7 -> 1.8 i32_sub_1.ll updated: 1.5 -> 1.6 zapnot.ll updated: 1.5 -> 1.6 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -3) add.ll | 1 - i32_sub_1.ll | 1 - zapnot.ll | 1 - 3 files changed, 3 deletions(-) Index: llvm/test/CodeGen/Alpha/add.ll diff -u llvm/test/CodeGen/Alpha/add.ll:1.7 llvm/test/CodeGen/Alpha/add.ll:1.8 --- llvm/test/CodeGen/Alpha/add.ll:1.7 Thu Feb 1 20:16:22 2007 +++ llvm/test/CodeGen/Alpha/add.ll Tue Mar 27 21:38:26 2007 @@ -17,7 +17,6 @@ ; RUN: grep 's4subq' %t.s | wc -l | grep 2 && ; RUN: grep 's8subq' %t.s | wc -l | grep 2 -implementation ; Functions: define i32 @al(i32 sext %x.s, i32 sext %y.s) sext { entry: Index: llvm/test/CodeGen/Alpha/i32_sub_1.ll diff -u llvm/test/CodeGen/Alpha/i32_sub_1.ll:1.5 llvm/test/CodeGen/Alpha/i32_sub_1.ll:1.6 --- llvm/test/CodeGen/Alpha/i32_sub_1.ll:1.5 Fri Jan 26 02:25:06 2007 +++ llvm/test/CodeGen/Alpha/i32_sub_1.ll Tue Mar 27 21:38:26 2007 @@ -1,7 +1,6 @@ ; Make sure this testcase codegens to the ctpop instruction ; RUN: llvm-as < %s | llc -march=alpha | grep -i 'subl $16,1,$0' -implementation ; Functions: define i32 @foo(i32 sext %x) sext { entry: Index: llvm/test/CodeGen/Alpha/zapnot.ll diff -u llvm/test/CodeGen/Alpha/zapnot.ll:1.5 llvm/test/CodeGen/Alpha/zapnot.ll:1.6 --- llvm/test/CodeGen/Alpha/zapnot.ll:1.5 Fri Jan 26 02:25:06 2007 +++ llvm/test/CodeGen/Alpha/zapnot.ll Tue Mar 27 21:38:26 2007 @@ -1,7 +1,6 @@ ; Make sure this testcase codegens to the bic instruction ; RUN: llvm-as < %s | llc -march=alpha | grep 'zapnot' -implementation ; Functions: define i16 @foo(i64 %y) zext { entry: From reid at x10sys.com Tue Mar 27 21:39:26 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:26 -0500 Subject: [llvm-commits] CVS: llvm/test/Integer/BitArith.ll BitBit.ll BitCast.ll BitIcmp.ll BitMem.ll BitMisc.ll BitPacked.ll basictest_bt.ll cfgstructures_bt.ll constexpr_bt.ll constpointer_bt.ll forwardreftest_bt.ll globalvars_bt.ll indirectcall2_bt.ll indirectcall_bt.ll opaquetypes_bt.ll packed_bt.ll packed_struct_bt.ll paramattrs_bt.ll prototype_bt.ll recursivetype_bt.ll simplecalltest_bt.ll small_bt.ll testalloca_bt.ll testarith_bt.ll testconstants_bt.ll testicmp_bt.ll testlogical_bt.ll testlogical_new_bt.ll testmemory_bt.ll testswitch_bt.ll testvarargs_bt.ll undefined_bt.ll unreachable_bt.ll varargs_bt.ll varargs_new_bt.ll Message-ID: <200703280239.l2S2dQpq021097@zion.cs.uiuc.edu> Changes in directory llvm/test/Integer: BitArith.ll updated: 1.2 -> 1.3 BitBit.ll updated: 1.4 -> 1.5 BitCast.ll updated: 1.2 -> 1.3 BitIcmp.ll updated: 1.2 -> 1.3 BitMem.ll updated: 1.2 -> 1.3 BitMisc.ll updated: 1.2 -> 1.3 BitPacked.ll updated: 1.2 -> 1.3 basictest_bt.ll updated: 1.3 -> 1.4 cfgstructures_bt.ll updated: 1.2 -> 1.3 constexpr_bt.ll updated: 1.4 -> 1.5 constpointer_bt.ll updated: 1.3 -> 1.4 forwardreftest_bt.ll updated: 1.2 -> 1.3 globalvars_bt.ll updated: 1.3 -> 1.4 indirectcall2_bt.ll updated: 1.2 -> 1.3 indirectcall_bt.ll updated: 1.4 -> 1.5 opaquetypes_bt.ll updated: 1.1 -> 1.2 packed_bt.ll updated: 1.2 -> 1.3 packed_struct_bt.ll updated: 1.2 -> 1.3 paramattrs_bt.ll updated: 1.3 -> 1.4 prototype_bt.ll updated: 1.2 -> 1.3 recursivetype_bt.ll updated: 1.4 -> 1.5 simplecalltest_bt.ll updated: 1.2 -> 1.3 small_bt.ll updated: 1.2 -> 1.3 testalloca_bt.ll updated: 1.3 -> 1.4 testarith_bt.ll updated: 1.4 -> 1.5 testconstants_bt.ll updated: 1.2 -> 1.3 testicmp_bt.ll updated: 1.2 -> 1.3 testlogical_bt.ll updated: 1.2 -> 1.3 testlogical_new_bt.ll updated: 1.3 -> 1.4 testmemory_bt.ll updated: 1.3 -> 1.4 testswitch_bt.ll updated: 1.2 -> 1.3 testvarargs_bt.ll updated: 1.3 -> 1.4 undefined_bt.ll updated: 1.3 -> 1.4 unreachable_bt.ll updated: 1.2 -> 1.3 varargs_bt.ll updated: 1.2 -> 1.3 varargs_new_bt.ll updated: 1.2 -> 1.3 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -36) BitArith.ll | 1 - BitBit.ll | 1 - BitCast.ll | 1 - BitIcmp.ll | 1 - BitMem.ll | 1 - BitMisc.ll | 1 - BitPacked.ll | 1 - basictest_bt.ll | 1 - cfgstructures_bt.ll | 1 - constexpr_bt.ll | 1 - constpointer_bt.ll | 1 - forwardreftest_bt.ll | 1 - globalvars_bt.ll | 1 - indirectcall2_bt.ll | 1 - indirectcall_bt.ll | 1 - opaquetypes_bt.ll | 1 - packed_bt.ll | 1 - packed_struct_bt.ll | 1 - paramattrs_bt.ll | 1 - prototype_bt.ll | 1 - recursivetype_bt.ll | 1 - simplecalltest_bt.ll | 1 - small_bt.ll | 1 - testalloca_bt.ll | 1 - testarith_bt.ll | 1 - testconstants_bt.ll | 1 - testicmp_bt.ll | 1 - testlogical_bt.ll | 1 - testlogical_new_bt.ll | 1 - testmemory_bt.ll | 1 - testswitch_bt.ll | 1 - testvarargs_bt.ll | 1 - undefined_bt.ll | 1 - unreachable_bt.ll | 1 - varargs_bt.ll | 1 - varargs_new_bt.ll | 1 - 36 files changed, 36 deletions(-) Index: llvm/test/Integer/BitArith.ll diff -u llvm/test/Integer/BitArith.ll:1.2 llvm/test/Integer/BitArith.ll:1.3 --- llvm/test/Integer/BitArith.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/BitArith.ll Tue Mar 27 21:38:26 2007 @@ -5,7 +5,6 @@ declare void @"foo"(i31 %i, i63 %j, i10 %k) -implementation ; foo test basic arith operations define void @"foo"(i31 %i, i63 %j, i10 %k) Index: llvm/test/Integer/BitBit.ll diff -u llvm/test/Integer/BitBit.ll:1.4 llvm/test/Integer/BitBit.ll:1.5 --- llvm/test/Integer/BitBit.ll:1.4 Sat Feb 3 20:11:13 2007 +++ llvm/test/Integer/BitBit.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ declare void @"foo"(i31 %i, i33 %j) -implementation ; foo test basic bitwise operations define void @"foo"(i31 %i, i33 %j) Index: llvm/test/Integer/BitCast.ll diff -u llvm/test/Integer/BitCast.ll:1.2 llvm/test/Integer/BitCast.ll:1.3 --- llvm/test/Integer/BitCast.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/BitCast.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ declare void @"foo"(i31 %i, i1280 %j, i1 %k, float %f) -implementation ; foo test basic arith operations define void @"foo"(i31 %i, i1280 %j, i1 %k, float %f) Index: llvm/test/Integer/BitIcmp.ll diff -u llvm/test/Integer/BitIcmp.ll:1.2 llvm/test/Integer/BitIcmp.ll:1.3 --- llvm/test/Integer/BitIcmp.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/BitIcmp.ll Tue Mar 27 21:38:26 2007 @@ -2,7 +2,6 @@ ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll -implementation define i55 @"simpleIcmp"(i55 %i0, i55 %j0) begin Index: llvm/test/Integer/BitMem.ll diff -u llvm/test/Integer/BitMem.ll:1.2 llvm/test/Integer/BitMem.ll:1.3 --- llvm/test/Integer/BitMem.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/BitMem.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ declare void @"foo"() -implementation ; foo test basic arith operations define void @"foo"() { Index: llvm/test/Integer/BitMisc.ll diff -u llvm/test/Integer/BitMisc.ll:1.2 llvm/test/Integer/BitMisc.ll:1.3 --- llvm/test/Integer/BitMisc.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/BitMisc.ll Tue Mar 27 21:38:26 2007 @@ -14,7 +14,6 @@ @ZeroInit = global { [100 x i19 ], [40 x float ] } { [100 x i19] zeroinitializer, [40 x float] zeroinitializer } -implementation define i19 @"foo"(i19 %blah) begin Index: llvm/test/Integer/BitPacked.ll diff -u llvm/test/Integer/BitPacked.ll:1.2 llvm/test/Integer/BitPacked.ll:1.3 --- llvm/test/Integer/BitPacked.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/BitPacked.ll Tue Mar 27 21:38:26 2007 @@ -5,7 +5,6 @@ @foo1 = external global <4 x float>; @foo2 = external global <2 x i10>; -implementation ; Functions: define void @main() { Index: llvm/test/Integer/basictest_bt.ll diff -u llvm/test/Integer/basictest_bt.ll:1.3 llvm/test/Integer/basictest_bt.ll:1.4 --- llvm/test/Integer/basictest_bt.ll:1.3 Mon Mar 19 13:27:35 2007 +++ llvm/test/Integer/basictest_bt.ll Tue Mar 27 21:38:26 2007 @@ -2,7 +2,6 @@ ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll -implementation ; Functions: ; Test "stripped" format where nothing is symbolic... this is how the bytecode ; format looks anyways (except for negative vs positive offsets)... Index: llvm/test/Integer/cfgstructures_bt.ll diff -u llvm/test/Integer/cfgstructures_bt.ll:1.2 llvm/test/Integer/cfgstructures_bt.ll:1.3 --- llvm/test/Integer/cfgstructures_bt.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/cfgstructures_bt.ll Tue Mar 27 21:38:26 2007 @@ -2,7 +2,6 @@ ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll -implementation ;; This is an irreducible flow graph Index: llvm/test/Integer/constexpr_bt.ll diff -u llvm/test/Integer/constexpr_bt.ll:1.4 llvm/test/Integer/constexpr_bt.ll:1.5 --- llvm/test/Integer/constexpr_bt.ll:1.4 Mon Mar 19 13:27:35 2007 +++ llvm/test/Integer/constexpr_bt.ll Tue Mar 27 21:38:26 2007 @@ -81,5 +81,4 @@ ;;--------------------------------------------------- -implementation Index: llvm/test/Integer/constpointer_bt.ll diff -u llvm/test/Integer/constpointer_bt.ll:1.3 llvm/test/Integer/constpointer_bt.ll:1.4 --- llvm/test/Integer/constpointer_bt.ll:1.3 Mon Mar 19 13:27:35 2007 +++ llvm/test/Integer/constpointer_bt.ll Tue Mar 27 21:38:26 2007 @@ -29,5 +29,4 @@ @somestr = constant [11x i8] c"hello world" @sptr2 = global [11x i8]* @somestr -implementation Index: llvm/test/Integer/forwardreftest_bt.ll diff -u llvm/test/Integer/forwardreftest_bt.ll:1.2 llvm/test/Integer/forwardreftest_bt.ll:1.3 --- llvm/test/Integer/forwardreftest_bt.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/forwardreftest_bt.ll Tue Mar 27 21:38:26 2007 @@ -9,7 +9,6 @@ type i55(i55(i55)*) %thisfuncty = type i55 (i55) * -implementation declare void @F(%thisfuncty, %thisfuncty, %thisfuncty) Index: llvm/test/Integer/globalvars_bt.ll diff -u llvm/test/Integer/globalvars_bt.ll:1.3 llvm/test/Integer/globalvars_bt.ll:1.4 --- llvm/test/Integer/globalvars_bt.ll:1.3 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/globalvars_bt.ll Tue Mar 27 21:38:26 2007 @@ -15,7 +15,6 @@ @ZeroInit = global { [100 x i27 ], [40 x float ] } { [100 x i27] zeroinitializer, [40 x float] zeroinitializer } -implementation define i27 @"foo"(i27 %blah) begin Index: llvm/test/Integer/indirectcall2_bt.ll diff -u llvm/test/Integer/indirectcall2_bt.ll:1.2 llvm/test/Integer/indirectcall2_bt.ll:1.3 --- llvm/test/Integer/indirectcall2_bt.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/indirectcall2_bt.ll Tue Mar 27 21:38:26 2007 @@ -2,7 +2,6 @@ ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll -implementation define i63 @"test"(i63 %X) begin Index: llvm/test/Integer/indirectcall_bt.ll diff -u llvm/test/Integer/indirectcall_bt.ll:1.4 llvm/test/Integer/indirectcall_bt.ll:1.5 --- llvm/test/Integer/indirectcall_bt.ll:1.4 Mon Mar 19 13:27:35 2007 +++ llvm/test/Integer/indirectcall_bt.ll Tue Mar 27 21:38:26 2007 @@ -2,7 +2,6 @@ ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll -implementation declare i32 @"atoi"(i8 *) Index: llvm/test/Integer/opaquetypes_bt.ll diff -u llvm/test/Integer/opaquetypes_bt.ll:1.1 llvm/test/Integer/opaquetypes_bt.ll:1.2 --- llvm/test/Integer/opaquetypes_bt.ll:1.1 Tue Jan 16 12:08:22 2007 +++ llvm/test/Integer/opaquetypes_bt.ll Tue Mar 27 21:38:26 2007 @@ -55,7 +55,6 @@ %Y1 = type { { \3 * }, \2 * } %Z1 = type { { \3 * }, [12x\3] *, { { { \5 * } } } } -implementation Index: llvm/test/Integer/packed_bt.ll diff -u llvm/test/Integer/packed_bt.ll:1.2 llvm/test/Integer/packed_bt.ll:1.3 --- llvm/test/Integer/packed_bt.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/packed_bt.ll Tue Mar 27 21:38:26 2007 @@ -5,7 +5,6 @@ @foo1 = external global <4 x float>; @foo2 = external global <2 x i10>; -implementation ; Functions: define void @main() { Index: llvm/test/Integer/packed_struct_bt.ll diff -u llvm/test/Integer/packed_struct_bt.ll:1.2 llvm/test/Integer/packed_struct_bt.ll:1.3 --- llvm/test/Integer/packed_struct_bt.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/packed_struct_bt.ll Tue Mar 27 21:38:26 2007 @@ -12,7 +12,6 @@ @E1 = global <{i8, i35, i35}> <{i8 1, i35 2, i35 3}> @E2 = global {i8, i35, i35} {i8 4, i35 5, i35 6} -implementation ; Functions: define i35 @main() { Index: llvm/test/Integer/paramattrs_bt.ll diff -u llvm/test/Integer/paramattrs_bt.ll:1.3 llvm/test/Integer/paramattrs_bt.ll:1.4 --- llvm/test/Integer/paramattrs_bt.ll:1.3 Tue Jan 30 10:16:01 2007 +++ llvm/test/Integer/paramattrs_bt.ll Tue Mar 27 21:38:26 2007 @@ -8,7 +8,6 @@ declare i16 @"test"(i16 sext %arg) sext declare i8 @"test2" (i16 zext %a2) zext -implementation define i33 @main(i33 %argc, i8 **%argv) { %val = trunc i33 %argc to i16 Index: llvm/test/Integer/prototype_bt.ll diff -u llvm/test/Integer/prototype_bt.ll:1.2 llvm/test/Integer/prototype_bt.ll:1.3 --- llvm/test/Integer/prototype_bt.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/prototype_bt.ll Tue Mar 27 21:38:26 2007 @@ -2,7 +2,6 @@ ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll -implementation declare i31 @"bar"(i31 %in) Index: llvm/test/Integer/recursivetype_bt.ll diff -u llvm/test/Integer/recursivetype_bt.ll:1.4 llvm/test/Integer/recursivetype_bt.ll:1.5 --- llvm/test/Integer/recursivetype_bt.ll:1.4 Tue Jan 30 10:16:01 2007 +++ llvm/test/Integer/recursivetype_bt.ll Tue Mar 27 21:38:26 2007 @@ -43,7 +43,6 @@ declare i8 *@"malloc"(i32) ;;********************** -implementation ;;********************** define void @"InsertIntoListTail"(%list** %L, i36 %Data) Index: llvm/test/Integer/simplecalltest_bt.ll diff -u llvm/test/Integer/simplecalltest_bt.ll:1.2 llvm/test/Integer/simplecalltest_bt.ll:1.3 --- llvm/test/Integer/simplecalltest_bt.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/simplecalltest_bt.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ %FunTy = type i31(i31) -implementation define void @"invoke"(%FunTy *%x) begin Index: llvm/test/Integer/small_bt.ll diff -u llvm/test/Integer/small_bt.ll:1.2 llvm/test/Integer/small_bt.ll:1.3 --- llvm/test/Integer/small_bt.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/small_bt.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ %x = type i19 -implementation define i19 @"foo"(i19 %in) begin Index: llvm/test/Integer/testalloca_bt.ll diff -u llvm/test/Integer/testalloca_bt.ll:1.3 llvm/test/Integer/testalloca_bt.ll:1.4 --- llvm/test/Integer/testalloca_bt.ll:1.3 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/testalloca_bt.ll Tue Mar 27 21:38:26 2007 @@ -6,7 +6,6 @@ %inners = type {float, {i8 } } %struct = type { i33 , {float, {i8 } } , i64 } -implementation define i33 @testfunction(i33 %i0, i33 %j0) begin Index: llvm/test/Integer/testarith_bt.ll diff -u llvm/test/Integer/testarith_bt.ll:1.4 llvm/test/Integer/testarith_bt.ll:1.5 --- llvm/test/Integer/testarith_bt.ll:1.4 Thu Feb 1 20:16:22 2007 +++ llvm/test/Integer/testarith_bt.ll Tue Mar 27 21:38:26 2007 @@ -2,7 +2,6 @@ ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll -implementation define i31 @"simpleArith"(i31 %i0, i31 %j0) begin Index: llvm/test/Integer/testconstants_bt.ll diff -u llvm/test/Integer/testconstants_bt.ll:1.2 llvm/test/Integer/testconstants_bt.ll:1.3 --- llvm/test/Integer/testconstants_bt.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/testconstants_bt.ll Tue Mar 27 21:38:26 2007 @@ -6,7 +6,6 @@ @array = constant [2 x i55] [ i55 12, i55 52 ] constant { i55, i55 } { i55 4, i55 3 } -implementation define [2 x i55]* @testfunction(i55 %i0, i55 %j0) begin Index: llvm/test/Integer/testicmp_bt.ll diff -u llvm/test/Integer/testicmp_bt.ll:1.2 llvm/test/Integer/testicmp_bt.ll:1.3 --- llvm/test/Integer/testicmp_bt.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/testicmp_bt.ll Tue Mar 27 21:38:26 2007 @@ -2,7 +2,6 @@ ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll -implementation define i31 @"simpleIcmp"(i31 %i0, i31 %j0) begin Index: llvm/test/Integer/testlogical_bt.ll diff -u llvm/test/Integer/testlogical_bt.ll:1.2 llvm/test/Integer/testlogical_bt.ll:1.3 --- llvm/test/Integer/testlogical_bt.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/testlogical_bt.ll Tue Mar 27 21:38:26 2007 @@ -2,7 +2,6 @@ ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll -implementation define i31 @"simpleAdd"(i31 %i0, i31 %j0) begin Index: llvm/test/Integer/testlogical_new_bt.ll diff -u llvm/test/Integer/testlogical_new_bt.ll:1.3 llvm/test/Integer/testlogical_new_bt.ll:1.4 --- llvm/test/Integer/testlogical_new_bt.ll:1.3 Thu Feb 1 20:16:22 2007 +++ llvm/test/Integer/testlogical_new_bt.ll Tue Mar 27 21:38:26 2007 @@ -2,7 +2,6 @@ ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll -implementation define i31 @"simpleAdd"(i31 %i0, i31 %j0) begin Index: llvm/test/Integer/testmemory_bt.ll diff -u llvm/test/Integer/testmemory_bt.ll:1.3 llvm/test/Integer/testmemory_bt.ll:1.4 --- llvm/test/Integer/testmemory_bt.ll:1.3 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/testmemory_bt.ll Tue Mar 27 21:38:26 2007 @@ -6,7 +6,6 @@ %struct = type { i31 , {float, {i9 } } , i64 } %complexty = type {i31, {[4 x i9 *], float}, double} -implementation define i31 @"main"() begin Index: llvm/test/Integer/testswitch_bt.ll diff -u llvm/test/Integer/testswitch_bt.ll:1.2 llvm/test/Integer/testswitch_bt.ll:1.3 --- llvm/test/Integer/testswitch_bt.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/testswitch_bt.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ %i35 = type i35 -implementation define i35 @"squared"(%i35 %i0) begin Index: llvm/test/Integer/testvarargs_bt.ll diff -u llvm/test/Integer/testvarargs_bt.ll:1.3 llvm/test/Integer/testvarargs_bt.ll:1.4 --- llvm/test/Integer/testvarargs_bt.ll:1.3 Mon Mar 19 13:27:35 2007 +++ llvm/test/Integer/testvarargs_bt.ll Tue Mar 27 21:38:26 2007 @@ -2,7 +2,6 @@ ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll ; RUN: diff %t1.ll %t2.ll -implementation declare i31 @"printf"(i8*, ...) ;; Prototype for: i32 __builtin_printf(const char*, ...) Index: llvm/test/Integer/undefined_bt.ll diff -u llvm/test/Integer/undefined_bt.ll:1.3 llvm/test/Integer/undefined_bt.ll:1.4 --- llvm/test/Integer/undefined_bt.ll:1.3 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/undefined_bt.ll Tue Mar 27 21:38:26 2007 @@ -5,7 +5,6 @@ @X = global i31 undef -implementation declare i32 @"atoi"(i8 *) Index: llvm/test/Integer/unreachable_bt.ll diff -u llvm/test/Integer/unreachable_bt.ll:1.2 llvm/test/Integer/unreachable_bt.ll:1.3 --- llvm/test/Integer/unreachable_bt.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/unreachable_bt.ll Tue Mar 27 21:38:26 2007 @@ -3,7 +3,6 @@ ; RUN: diff %t1.ll %t2.ll -implementation declare void @bar() Index: llvm/test/Integer/varargs_bt.ll diff -u llvm/test/Integer/varargs_bt.ll:1.2 llvm/test/Integer/varargs_bt.ll:1.3 --- llvm/test/Integer/varargs_bt.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/varargs_bt.ll Tue Mar 27 21:38:26 2007 @@ -5,7 +5,6 @@ ; Demonstrate all of the variable argument handling intrinsic functions plus ; the va_arg instruction. -implementation declare void @llvm.va_start(i8** %ap) declare void @llvm.va_copy(i8** %aq, i8** %ap) declare void @llvm.va_end(i8** %ap) Index: llvm/test/Integer/varargs_new_bt.ll diff -u llvm/test/Integer/varargs_new_bt.ll:1.2 llvm/test/Integer/varargs_new_bt.ll:1.3 --- llvm/test/Integer/varargs_new_bt.ll:1.2 Fri Jan 26 02:25:06 2007 +++ llvm/test/Integer/varargs_new_bt.ll Tue Mar 27 21:38:26 2007 @@ -5,7 +5,6 @@ ; Demonstrate all of the variable argument handling intrinsic functions plus ; the va_arg instruction. -implementation ; Functions: declare void @llvm.va_start(i8**) declare void @llvm.va_copy(i8**, i8*) declare void @llvm.va_end(i8**) From reid at x10sys.com Tue Mar 27 21:39:27 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:27 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/CBackend/2007-01-08-ParamAttr-ICmp.ll 2007-02-05-memset.ll Message-ID: <200703280239.l2S2dR7H021115@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/CBackend: 2007-01-08-ParamAttr-ICmp.ll updated: 1.4 -> 1.5 2007-02-05-memset.ll updated: 1.1 -> 1.2 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -2) 2007-01-08-ParamAttr-ICmp.ll | 1 - 2007-02-05-memset.ll | 1 - 2 files changed, 2 deletions(-) Index: llvm/test/CodeGen/CBackend/2007-01-08-ParamAttr-ICmp.ll diff -u llvm/test/CodeGen/CBackend/2007-01-08-ParamAttr-ICmp.ll:1.4 llvm/test/CodeGen/CBackend/2007-01-08-ParamAttr-ICmp.ll:1.5 --- llvm/test/CodeGen/CBackend/2007-01-08-ParamAttr-ICmp.ll:1.4 Fri Feb 23 16:45:08 2007 +++ llvm/test/CodeGen/CBackend/2007-01-08-ParamAttr-ICmp.ll Tue Mar 27 21:38:26 2007 @@ -6,7 +6,6 @@ target triple = "i686-apple-darwin8" %struct.Connector = type { i16, i16, i8, i8, %struct.Connector*, i8* } -implementation ; Functions: define i1 @prune_match_entry_2E_ce(%struct.Connector* %a, i16 %b.0.0.val) { newFuncRoot: Index: llvm/test/CodeGen/CBackend/2007-02-05-memset.ll diff -u llvm/test/CodeGen/CBackend/2007-02-05-memset.ll:1.1 llvm/test/CodeGen/CBackend/2007-02-05-memset.ll:1.2 --- llvm/test/CodeGen/CBackend/2007-02-05-memset.ll:1.1 Tue Feb 6 00:07:34 2007 +++ llvm/test/CodeGen/CBackend/2007-02-05-memset.ll Tue Mar 27 21:38:26 2007 @@ -3,7 +3,6 @@ target datalayout = "e-p:64:64" target triple = "x86_64-apple-darwin8" -implementation ; Functions: declare void @llvm.memset.i64(i8*, i8, i64, i32) From reid at x10sys.com Tue Mar 27 21:39:27 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:27 -0500 Subject: [llvm-commits] CVS: llvm/test/Analysis/Dominators/2007-01-14-BreakCritEdges.ll Message-ID: <200703280239.l2S2dR1D021120@zion.cs.uiuc.edu> Changes in directory llvm/test/Analysis/Dominators: 2007-01-14-BreakCritEdges.ll updated: 1.2 -> 1.3 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -1) 2007-01-14-BreakCritEdges.ll | 1 - 1 files changed, 1 deletion(-) Index: llvm/test/Analysis/Dominators/2007-01-14-BreakCritEdges.ll diff -u llvm/test/Analysis/Dominators/2007-01-14-BreakCritEdges.ll:1.2 llvm/test/Analysis/Dominators/2007-01-14-BreakCritEdges.ll:1.3 --- llvm/test/Analysis/Dominators/2007-01-14-BreakCritEdges.ll:1.2 Fri Jan 26 02:25:05 2007 +++ llvm/test/Analysis/Dominators/2007-01-14-BreakCritEdges.ll Tue Mar 27 21:38:26 2007 @@ -12,7 +12,6 @@ %struct.vorbis_dsp_state = type { i32, %struct.vorbis_info*, float**, float**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i8* } %struct.vorbis_info = type { i32, i32, i32, i32, i32, i32, i32, i8* } -implementation ; Functions: define void @ov_read() { entry: From reid at x10sys.com Tue Mar 27 21:39:28 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:28 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/2007-03-06-AddR7.ll 2007-03-21-JoinIntervalsCrash.ll 2007-03-26-RegScavengerAssert.ll 2007-03-27-RegScavengerAssert.ll call_nolink.ll Message-ID: <200703280239.l2S2dS2U021165@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: 2007-03-06-AddR7.ll updated: 1.1 -> 1.2 2007-03-21-JoinIntervalsCrash.ll updated: 1.1 -> 1.2 2007-03-26-RegScavengerAssert.ll updated: 1.1 -> 1.2 2007-03-27-RegScavengerAssert.ll updated: 1.1 -> 1.2 call_nolink.ll updated: 1.1 -> 1.2 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -6) 2007-03-06-AddR7.ll | 1 - 2007-03-21-JoinIntervalsCrash.ll | 1 - 2007-03-26-RegScavengerAssert.ll | 1 - 2007-03-27-RegScavengerAssert.ll | 2 -- call_nolink.ll | 1 - 5 files changed, 6 deletions(-) Index: llvm/test/CodeGen/ARM/2007-03-06-AddR7.ll diff -u llvm/test/CodeGen/ARM/2007-03-06-AddR7.ll:1.1 llvm/test/CodeGen/ARM/2007-03-06-AddR7.ll:1.2 --- llvm/test/CodeGen/ARM/2007-03-06-AddR7.ll:1.1 Tue Mar 6 18:13:48 2007 +++ llvm/test/CodeGen/ARM/2007-03-06-AddR7.ll Tue Mar 27 21:38:26 2007 @@ -25,7 +25,6 @@ @s.10319 = external global %struct.aa_ss* ; <%struct.aa_ss**> [#uses=2] @str15 = external constant [24 x i8] ; <[24 x i8]*> [#uses=1] -implementation ; Functions: define i8 @test(%struct.__fooY* %calendar, double* %atp, i8* %componentDesc, ...) zext { entry: Index: llvm/test/CodeGen/ARM/2007-03-21-JoinIntervalsCrash.ll diff -u llvm/test/CodeGen/ARM/2007-03-21-JoinIntervalsCrash.ll:1.1 llvm/test/CodeGen/ARM/2007-03-21-JoinIntervalsCrash.ll:1.2 --- llvm/test/CodeGen/ARM/2007-03-21-JoinIntervalsCrash.ll:1.1 Wed Mar 21 20:52:57 2007 +++ llvm/test/CodeGen/ARM/2007-03-21-JoinIntervalsCrash.ll Tue Mar 27 21:38:26 2007 @@ -33,7 +33,6 @@ %struct.varray_head_tag = type opaque %union.tree_ann_d = type opaque -implementation ; Functions: define void @declspecs_add_type(i32 %spec.1) { entry: Index: llvm/test/CodeGen/ARM/2007-03-26-RegScavengerAssert.ll diff -u llvm/test/CodeGen/ARM/2007-03-26-RegScavengerAssert.ll:1.1 llvm/test/CodeGen/ARM/2007-03-26-RegScavengerAssert.ll:1.2 --- llvm/test/CodeGen/ARM/2007-03-26-RegScavengerAssert.ll:1.1 Mon Mar 26 17:58:35 2007 +++ llvm/test/CodeGen/ARM/2007-03-26-RegScavengerAssert.ll Tue Mar 27 21:38:26 2007 @@ -225,7 +225,6 @@ @__FUNCTION__.21382 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] @__FUNCTION__.21117 = external global [21 x i8] ; <[21 x i8]*> [#uses=0] -implementation ; Functions: declare void @push_gimplify_context() Index: llvm/test/CodeGen/ARM/2007-03-27-RegScavengerAssert.ll diff -u llvm/test/CodeGen/ARM/2007-03-27-RegScavengerAssert.ll:1.1 llvm/test/CodeGen/ARM/2007-03-27-RegScavengerAssert.ll:1.2 --- llvm/test/CodeGen/ARM/2007-03-27-RegScavengerAssert.ll:1.1 Tue Mar 27 20:32:57 2007 +++ llvm/test/CodeGen/ARM/2007-03-27-RegScavengerAssert.ll Tue Mar 27 21:38:26 2007 @@ -4,8 +4,6 @@ %struct.rtx_def = type { i16, i8, i8, %struct.u } %struct.u = type { [1 x i64] } -implementation ; Functions: - define fastcc void @find_reloads_address(%struct.rtx_def** %loc) { entry: %ad_addr = alloca %struct.rtx_def* ; <%struct.rtx_def**> [#uses=2] Index: llvm/test/CodeGen/ARM/call_nolink.ll diff -u llvm/test/CodeGen/ARM/call_nolink.ll:1.1 llvm/test/CodeGen/ARM/call_nolink.ll:1.2 --- llvm/test/CodeGen/ARM/call_nolink.ll:1.1 Tue Mar 20 12:57:23 2007 +++ llvm/test/CodeGen/ARM/call_nolink.ll Tue Mar 27 21:38:26 2007 @@ -8,7 +8,6 @@ @numi = external global i32 ; [#uses=1] @counter = external global [2 x i32] ; <[2 x i32]*> [#uses=1] -implementation ; Functions: define void @main_bb_2E_i_bb205_2E_i_2E_i_bb115_2E_i_2E_i() { newFuncRoot: From reid at x10sys.com Tue Mar 27 21:39:28 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:28 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Generic/2007-02-16-BranchFold.ll switch-lower.ll Message-ID: <200703280239.l2S2dSXD021128@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Generic: 2007-02-16-BranchFold.ll updated: 1.2 -> 1.3 switch-lower.ll updated: 1.1 -> 1.2 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -2) 2007-02-16-BranchFold.ll | 1 - switch-lower.ll | 1 - 2 files changed, 2 deletions(-) Index: llvm/test/CodeGen/Generic/2007-02-16-BranchFold.ll diff -u llvm/test/CodeGen/Generic/2007-02-16-BranchFold.ll:1.2 llvm/test/CodeGen/Generic/2007-02-16-BranchFold.ll:1.3 --- llvm/test/CodeGen/Generic/2007-02-16-BranchFold.ll:1.2 Fri Feb 16 19:12:15 2007 +++ llvm/test/CodeGen/Generic/2007-02-16-BranchFold.ll Tue Mar 27 21:38:26 2007 @@ -25,7 +25,6 @@ @outfile = external global %struct.FILE* ; <%struct.FILE**> [#uses=1] @str1 = external global [11 x i8] ; <[11 x i8]*> [#uses=1] -implementation ; Functions: declare i32 @fprintf(%struct.FILE*, i8*, ...) Index: llvm/test/CodeGen/Generic/switch-lower.ll diff -u llvm/test/CodeGen/Generic/switch-lower.ll:1.1 llvm/test/CodeGen/Generic/switch-lower.ll:1.2 --- llvm/test/CodeGen/Generic/switch-lower.ll:1.1 Mon Feb 12 19:05:10 2007 +++ llvm/test/CodeGen/Generic/switch-lower.ll Tue Mar 27 21:38:26 2007 @@ -1,7 +1,6 @@ ; RUN: llvm-as < %s | llc ; PR1197 -implementation ; Functions: define void @exp_attr__expand_n_attribute_reference() { entry: From reid at x10sys.com Tue Mar 27 21:39:28 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:28 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/2007-02-23-PhiFoldInfLoop.ll 2007-03-26-BadShiftMask.ll apint-add1.ll apint-add2.ll apint-and1.ll apint-and2.ll apint-call-cast-target.ll apint-div1.ll apint-div2.ll apint-mul1.ll apint-mul2.ll apint-or1.ll apint-or2.ll apint-rem1.ll apint-rem2.ll apint-select.ll apint-xor1.ll apint-xor2.ll vec_shuffle.ll Message-ID: <200703280239.l2S2dSCj021185@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/InstCombine: 2007-02-23-PhiFoldInfLoop.ll updated: 1.1 -> 1.2 2007-03-26-BadShiftMask.ll updated: 1.1 -> 1.2 apint-add1.ll updated: 1.2 -> 1.3 apint-add2.ll updated: 1.2 -> 1.3 apint-and1.ll updated: 1.1 -> 1.2 apint-and2.ll updated: 1.1 -> 1.2 apint-call-cast-target.ll updated: 1.1 -> 1.2 apint-div1.ll updated: 1.1 -> 1.2 apint-div2.ll updated: 1.1 -> 1.2 apint-mul1.ll updated: 1.1 -> 1.2 apint-mul2.ll updated: 1.1 -> 1.2 apint-or1.ll updated: 1.1 -> 1.2 apint-or2.ll updated: 1.1 -> 1.2 apint-rem1.ll updated: 1.1 -> 1.2 apint-rem2.ll updated: 1.1 -> 1.2 apint-select.ll updated: 1.1 -> 1.2 apint-xor1.ll updated: 1.1 -> 1.2 apint-xor2.ll updated: 1.1 -> 1.2 vec_shuffle.ll updated: 1.9 -> 1.10 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -20) 2007-02-23-PhiFoldInfLoop.ll | 1 - 2007-03-26-BadShiftMask.ll | 1 - apint-add1.ll | 1 - apint-add2.ll | 1 - apint-and1.ll | 2 -- apint-and2.ll | 1 - apint-call-cast-target.ll | 1 - apint-div1.ll | 1 - apint-div2.ll | 1 - apint-mul1.ll | 1 - apint-mul2.ll | 1 - apint-or1.ll | 1 - apint-or2.ll | 1 - apint-rem1.ll | 1 - apint-rem2.ll | 1 - apint-select.ll | 1 - apint-xor1.ll | 1 - apint-xor2.ll | 1 - vec_shuffle.ll | 1 - 19 files changed, 20 deletions(-) Index: llvm/test/Transforms/InstCombine/2007-02-23-PhiFoldInfLoop.ll diff -u llvm/test/Transforms/InstCombine/2007-02-23-PhiFoldInfLoop.ll:1.1 llvm/test/Transforms/InstCombine/2007-02-23-PhiFoldInfLoop.ll:1.2 --- llvm/test/Transforms/InstCombine/2007-02-23-PhiFoldInfLoop.ll:1.1 Fri Feb 23 19:03:11 2007 +++ llvm/test/Transforms/InstCombine/2007-02-23-PhiFoldInfLoop.ll Tue Mar 27 21:38:26 2007 @@ -5,7 +5,6 @@ target triple = "i686-pc-linux-gnu" %struct.termbox = type { %struct.termbox*, i32, i32, i32, i32, i32 } -implementation ; Functions: define void @ggenorien() { entry: Index: llvm/test/Transforms/InstCombine/2007-03-26-BadShiftMask.ll diff -u llvm/test/Transforms/InstCombine/2007-03-26-BadShiftMask.ll:1.1 llvm/test/Transforms/InstCombine/2007-03-26-BadShiftMask.ll:1.2 --- llvm/test/Transforms/InstCombine/2007-03-26-BadShiftMask.ll:1.1 Mon Mar 26 18:48:52 2007 +++ llvm/test/Transforms/InstCombine/2007-03-26-BadShiftMask.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ 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" target triple = "i686-pc-linux-gnu" -implementation ; Functions: define i1 @test(i32* %tmp141, i32* %tmp145, i32 %b8, i32 %iftmp.430.0, i32* %tmp134.out, i32* %tmp137.out) Index: llvm/test/Transforms/InstCombine/apint-add1.ll diff -u llvm/test/Transforms/InstCombine/apint-add1.ll:1.2 llvm/test/Transforms/InstCombine/apint-add1.ll:1.3 --- llvm/test/Transforms/InstCombine/apint-add1.ll:1.2 Tue Mar 27 20:35:28 2007 +++ llvm/test/Transforms/InstCombine/apint-add1.ll Tue Mar 27 21:38:26 2007 @@ -5,7 +5,6 @@ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \ ; RUN: grep -v OK | not grep add -implementation define i1 @test1(i1 %x) { %tmp.2 = xor i1 %x, 1 Index: llvm/test/Transforms/InstCombine/apint-add2.ll diff -u llvm/test/Transforms/InstCombine/apint-add2.ll:1.2 llvm/test/Transforms/InstCombine/apint-add2.ll:1.3 --- llvm/test/Transforms/InstCombine/apint-add2.ll:1.2 Tue Mar 27 20:35:28 2007 +++ llvm/test/Transforms/InstCombine/apint-add2.ll Tue Mar 27 21:38:26 2007 @@ -5,7 +5,6 @@ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \ ; RUN: grep -v OK | not grep add -implementation define i111 @test1(i111 %x) { %tmp.2 = shl i111 1, 110 Index: llvm/test/Transforms/InstCombine/apint-and1.ll diff -u llvm/test/Transforms/InstCombine/apint-and1.ll:1.1 llvm/test/Transforms/InstCombine/apint-and1.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-and1.ll:1.1 Fri Mar 23 15:48:33 2007 +++ llvm/test/Transforms/InstCombine/apint-and1.ll Tue Mar 27 21:38:26 2007 @@ -4,8 +4,6 @@ ; RUN: llvm-as < %s | opt -instcombine -disable-output && ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'and ' -implementation - define i39 @test0(i39 %A) { %B = and i39 %A, 0 ; zero result ret i39 %B Index: llvm/test/Transforms/InstCombine/apint-and2.ll diff -u llvm/test/Transforms/InstCombine/apint-and2.ll:1.1 llvm/test/Transforms/InstCombine/apint-and2.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-and2.ll:1.1 Fri Mar 23 15:48:33 2007 +++ llvm/test/Transforms/InstCombine/apint-and2.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ ; RUN: llvm-as < %s | opt -instcombine -disable-output && ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'and ' -implementation define i999 @test0(i999 %A) { %B = and i999 %A, 0 ; zero result Index: llvm/test/Transforms/InstCombine/apint-call-cast-target.ll diff -u llvm/test/Transforms/InstCombine/apint-call-cast-target.ll:1.1 llvm/test/Transforms/InstCombine/apint-call-cast-target.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-call-cast-target.ll:1.1 Fri Mar 23 15:48:33 2007 +++ llvm/test/Transforms/InstCombine/apint-call-cast-target.ll Tue Mar 27 21:38:26 2007 @@ -3,7 +3,6 @@ target datalayout = "e-p:32:32" target triple = "i686-pc-linux-gnu" -implementation ; Functions: define i32 @main() { entry: Index: llvm/test/Transforms/InstCombine/apint-div1.ll diff -u llvm/test/Transforms/InstCombine/apint-div1.ll:1.1 llvm/test/Transforms/InstCombine/apint-div1.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-div1.ll:1.1 Fri Mar 23 15:48:34 2007 +++ llvm/test/Transforms/InstCombine/apint-div1.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep div -implementation define i33 @test1(i33 %X) { %Y = udiv i33 %X, 4096 Index: llvm/test/Transforms/InstCombine/apint-div2.ll diff -u llvm/test/Transforms/InstCombine/apint-div2.ll:1.1 llvm/test/Transforms/InstCombine/apint-div2.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-div2.ll:1.1 Fri Mar 23 15:48:34 2007 +++ llvm/test/Transforms/InstCombine/apint-div2.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep div -implementation define i333 @test1(i333 %X) { %Y = udiv i333 %X, 70368744177664 Index: llvm/test/Transforms/InstCombine/apint-mul1.ll diff -u llvm/test/Transforms/InstCombine/apint-mul1.ll:1.1 llvm/test/Transforms/InstCombine/apint-mul1.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-mul1.ll:1.1 Fri Mar 23 15:48:34 2007 +++ llvm/test/Transforms/InstCombine/apint-mul1.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep mul -implementation define i17 @test1(i17 %X) { %Y = mul i17 %X, 1024 Index: llvm/test/Transforms/InstCombine/apint-mul2.ll diff -u llvm/test/Transforms/InstCombine/apint-mul2.ll:1.1 llvm/test/Transforms/InstCombine/apint-mul2.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-mul2.ll:1.1 Fri Mar 23 15:48:34 2007 +++ llvm/test/Transforms/InstCombine/apint-mul2.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep mul -implementation define i177 @test1(i177 %X) { %C = shl i177 1, 155 Index: llvm/test/Transforms/InstCombine/apint-or1.ll diff -u llvm/test/Transforms/InstCombine/apint-or1.ll:1.1 llvm/test/Transforms/InstCombine/apint-or1.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-or1.ll:1.1 Fri Mar 23 15:48:34 2007 +++ llvm/test/Transforms/InstCombine/apint-or1.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep or -implementation define i7 @test0(i7 %X) { %Y = or i7 %X, 0 Index: llvm/test/Transforms/InstCombine/apint-or2.ll diff -u llvm/test/Transforms/InstCombine/apint-or2.ll:1.1 llvm/test/Transforms/InstCombine/apint-or2.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-or2.ll:1.1 Fri Mar 23 15:48:34 2007 +++ llvm/test/Transforms/InstCombine/apint-or2.ll Tue Mar 27 21:38:26 2007 @@ -5,7 +5,6 @@ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis > /tmp/or2.rel && ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep or -implementation define i777 @test0(i777 %X) { %Y = or i777 %X, 0 Index: llvm/test/Transforms/InstCombine/apint-rem1.ll diff -u llvm/test/Transforms/InstCombine/apint-rem1.ll:1.1 llvm/test/Transforms/InstCombine/apint-rem1.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-rem1.ll:1.1 Fri Mar 23 15:48:34 2007 +++ llvm/test/Transforms/InstCombine/apint-rem1.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ ; RUN: llvm-as < %s | opt -instcombine -disable-output && ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep rem -implementation define i33 @test1(i33 %A) { %B = urem i33 %A, 4096 Index: llvm/test/Transforms/InstCombine/apint-rem2.ll diff -u llvm/test/Transforms/InstCombine/apint-rem2.ll:1.1 llvm/test/Transforms/InstCombine/apint-rem2.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-rem2.ll:1.1 Fri Mar 23 15:48:34 2007 +++ llvm/test/Transforms/InstCombine/apint-rem2.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ ; RUN: llvm-as < %s | opt -instcombine -disable-output && ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep rem -implementation define i333 @test1(i333 %A) { %B = urem i333 %A, 70368744177664 Index: llvm/test/Transforms/InstCombine/apint-select.ll diff -u llvm/test/Transforms/InstCombine/apint-select.ll:1.1 llvm/test/Transforms/InstCombine/apint-select.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-select.ll:1.1 Fri Mar 23 15:48:34 2007 +++ llvm/test/Transforms/InstCombine/apint-select.ll Tue Mar 27 21:38:26 2007 @@ -3,7 +3,6 @@ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep select && ; RUN: llvm-as < %s | opt -instcombine -disable-output -implementation define i41 @test1(i1 %C) { %V = select i1 %C, i41 1, i41 0 ; V = C Index: llvm/test/Transforms/InstCombine/apint-xor1.ll diff -u llvm/test/Transforms/InstCombine/apint-xor1.ll:1.1 llvm/test/Transforms/InstCombine/apint-xor1.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-xor1.ll:1.1 Fri Mar 23 15:48:34 2007 +++ llvm/test/Transforms/InstCombine/apint-xor1.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ ; RUN: llvm-as < %s | opt -instcombine -disable-output && ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'xor ' -implementation define i47 @test1(i47 %A, i47 %B) { ;; (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0 Index: llvm/test/Transforms/InstCombine/apint-xor2.ll diff -u llvm/test/Transforms/InstCombine/apint-xor2.ll:1.1 llvm/test/Transforms/InstCombine/apint-xor2.ll:1.2 --- llvm/test/Transforms/InstCombine/apint-xor2.ll:1.1 Fri Mar 23 15:48:34 2007 +++ llvm/test/Transforms/InstCombine/apint-xor2.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ ; RUN: llvm-as < %s | opt -instcombine -disable-output && ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'xor ' -implementation define i447 @test1(i447 %A, i447 %B) { ;; (A & C1)^(B & C2) -> (A & C1)|(B & C2) iff C1&C2 == 0 Index: llvm/test/Transforms/InstCombine/vec_shuffle.ll diff -u llvm/test/Transforms/InstCombine/vec_shuffle.ll:1.9 llvm/test/Transforms/InstCombine/vec_shuffle.ll:1.10 --- llvm/test/Transforms/InstCombine/vec_shuffle.ll:1.9 Tue Jan 30 10:16:01 2007 +++ llvm/test/Transforms/InstCombine/vec_shuffle.ll Tue Mar 27 21:38:26 2007 @@ -3,7 +3,6 @@ %T = type <4 x float> -implementation define %T @test1(%T %v1) { %v2 = shufflevector %T %v1, %T undef, <4 x i32> From reid at x10sys.com Tue Mar 27 21:39:29 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:29 -0500 Subject: [llvm-commits] CVS: llvm/test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll Message-ID: <200703280239.l2S2dT6d021208@zion.cs.uiuc.edu> Changes in directory llvm/test/Analysis/BasicAA: 2007-01-13-BasePointerBadNoAlias.ll updated: 1.2 -> 1.3 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -1) 2007-01-13-BasePointerBadNoAlias.ll | 1 - 1 files changed, 1 deletion(-) Index: llvm/test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll diff -u llvm/test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll:1.2 llvm/test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll:1.3 --- llvm/test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll:1.2 Fri Jan 26 02:25:05 2007 +++ llvm/test/Analysis/BasicAA/2007-01-13-BasePointerBadNoAlias.ll Tue Mar 27 21:38:26 2007 @@ -17,7 +17,6 @@ %struct.head_type = type { [2 x %struct.LIST], %struct.FIRST_UNION, %struct.SECOND_UNION, %struct.THIRD_UNION, %struct.FOURTH_UNION, %struct.rec*, { %struct.rec* }, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, %struct.rec*, i32 } %struct.rec = type { %struct.head_type } -implementation ; Functions: define i32 @test(%struct.closure_type* %tmp18169) { %tmp18174 = getelementptr %struct.closure_type* %tmp18169, i32 0, i32 4, i32 0, i32 0 ; [#uses=2] From reid at x10sys.com Tue Mar 27 21:39:28 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:28 -0500 Subject: [llvm-commits] CVS: llvm/test/Feature/packed_cmp.ll packed_struct.ll Message-ID: <200703280239.l2S2dSsH021170@zion.cs.uiuc.edu> Changes in directory llvm/test/Feature: packed_cmp.ll updated: 1.2 -> 1.3 packed_struct.ll updated: 1.5 -> 1.6 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -2) packed_cmp.ll | 1 - packed_struct.ll | 1 - 2 files changed, 2 deletions(-) Index: llvm/test/Feature/packed_cmp.ll diff -u llvm/test/Feature/packed_cmp.ll:1.2 llvm/test/Feature/packed_cmp.ll:1.3 --- llvm/test/Feature/packed_cmp.ll:1.2 Wed Jan 3 21:06:23 2007 +++ llvm/test/Feature/packed_cmp.ll Tue Mar 27 21:38:26 2007 @@ -13,7 +13,6 @@ %fvec1 = constant %fvec_type %fvec2 = constant %fvec_type -implementation ; Functions: define bool %ivectest1() { %v1 = load %ivec_type* getelementptr(%ivec_type* %ivec1, i32 0) Index: llvm/test/Feature/packed_struct.ll diff -u llvm/test/Feature/packed_struct.ll:1.5 llvm/test/Feature/packed_struct.ll:1.6 --- llvm/test/Feature/packed_struct.ll:1.5 Fri Jan 26 02:25:06 2007 +++ llvm/test/Feature/packed_struct.ll Tue Mar 27 21:38:26 2007 @@ -12,7 +12,6 @@ @E1 = global <{i8, i32, i32}> <{i8 1, i32 2, i32 3}> @E2 = global {i8, i32, i32} {i8 4, i32 5, i32 6} -implementation ; Functions: define i32 @main() { From reid at x10sys.com Tue Mar 27 21:39:28 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:28 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/IndVarsSimplify/2007-01-06-TripCount.ll Message-ID: <200703280239.l2S2dSM1021191@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/IndVarsSimplify: 2007-01-06-TripCount.ll updated: 1.5 -> 1.6 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -1) 2007-01-06-TripCount.ll | 1 - 1 files changed, 1 deletion(-) Index: llvm/test/Transforms/IndVarsSimplify/2007-01-06-TripCount.ll diff -u llvm/test/Transforms/IndVarsSimplify/2007-01-06-TripCount.ll:1.5 llvm/test/Transforms/IndVarsSimplify/2007-01-06-TripCount.ll:1.6 --- llvm/test/Transforms/IndVarsSimplify/2007-01-06-TripCount.ll:1.5 Tue Jan 30 10:16:01 2007 +++ llvm/test/Transforms/IndVarsSimplify/2007-01-06-TripCount.ll Tue Mar 27 21:38:26 2007 @@ -7,7 +7,6 @@ @foo = internal constant [5 x i8] c"\00abc\00" ; <[5 x i8]*> [#uses=1] @str = internal constant [4 x i8] c"%d\0A\00" ; <[4 x i8]*> [#uses=1] -implementation ; Functions: define i32 @test(i32 %J) { entry: From reid at x10sys.com Tue Mar 27 21:39:29 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:29 -0500 Subject: [llvm-commits] CVS: llvm/test/Analysis/ScalarEvolution/trip-count.ll Message-ID: <200703280239.l2S2dTR9021213@zion.cs.uiuc.edu> Changes in directory llvm/test/Analysis/ScalarEvolution: trip-count.ll updated: 1.3 -> 1.4 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -1) trip-count.ll | 1 - 1 files changed, 1 deletion(-) Index: llvm/test/Analysis/ScalarEvolution/trip-count.ll diff -u llvm/test/Analysis/ScalarEvolution/trip-count.ll:1.3 llvm/test/Analysis/ScalarEvolution/trip-count.ll:1.4 --- llvm/test/Analysis/ScalarEvolution/trip-count.ll:1.3 Tue Jan 30 10:16:01 2007 +++ llvm/test/Analysis/ScalarEvolution/trip-count.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ @A = weak global [1000 x i32] zeroinitializer, align 32 -implementation ; Functions: define void @test(i32 %N) { entry: From reid at x10sys.com Tue Mar 27 21:39:29 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:29 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll 2007-02-16-InlineAsmNConstraint.ll 2007-02-23-lr-saved-twice.ll Message-ID: <200703280239.l2S2dTV2021202@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/PowerPC: 2007-01-31-InlineAsmAddrMode.ll updated: 1.1 -> 1.2 2007-02-16-InlineAsmNConstraint.ll updated: 1.1 -> 1.2 2007-02-23-lr-saved-twice.ll updated: 1.1 -> 1.2 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -3) 2007-01-31-InlineAsmAddrMode.ll | 1 - 2007-02-16-InlineAsmNConstraint.ll | 1 - 2007-02-23-lr-saved-twice.ll | 1 - 3 files changed, 3 deletions(-) Index: llvm/test/CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll diff -u llvm/test/CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll:1.1 llvm/test/CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll:1.2 --- llvm/test/CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll:1.1 Wed Jan 31 18:38:56 2007 +++ llvm/test/CodeGen/PowerPC/2007-01-31-InlineAsmAddrMode.ll Tue Mar 27 21:38:26 2007 @@ -6,7 +6,6 @@ %struct.A = type { i32, i32 } -implementation ; Functions: define void @test1() { entry: Index: llvm/test/CodeGen/PowerPC/2007-02-16-InlineAsmNConstraint.ll diff -u llvm/test/CodeGen/PowerPC/2007-02-16-InlineAsmNConstraint.ll:1.1 llvm/test/CodeGen/PowerPC/2007-02-16-InlineAsmNConstraint.ll:1.2 --- llvm/test/CodeGen/PowerPC/2007-02-16-InlineAsmNConstraint.ll:1.1 Fri Feb 16 23:59:01 2007 +++ llvm/test/CodeGen/PowerPC/2007-02-16-InlineAsmNConstraint.ll Tue Mar 27 21:38:26 2007 @@ -3,7 +3,6 @@ target datalayout = "E-p:32:32" target triple = "powerpc-apple-darwin8.8.0" -implementation ; Functions: define void @blargh() { entry: Index: llvm/test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll diff -u llvm/test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll:1.1 llvm/test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll:1.2 --- llvm/test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll:1.1 Fri Feb 23 16:12:08 2007 +++ llvm/test/CodeGen/PowerPC/2007-02-23-lr-saved-twice.ll Tue Mar 27 21:38:26 2007 @@ -4,7 +4,6 @@ target triple = "powerpc-apple-darwin8" @str = internal constant [18 x i8] c"hello world!, %d\0A\00" ; <[18 x i8]*> [#uses=1] -implementation ; Functions: define i32 @main() { entry: From reid at x10sys.com Tue Mar 27 21:39:29 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:29 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/ScalarRepl/2007-03-19-CanonicalizeMemcpy.ll memset-aggregate-byte-leader.ll memset-aggregate.ll Message-ID: <200703280239.l2S2dThp021229@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/ScalarRepl: 2007-03-19-CanonicalizeMemcpy.ll updated: 1.1 -> 1.2 memset-aggregate-byte-leader.ll updated: 1.2 -> 1.3 memset-aggregate.ll updated: 1.3 -> 1.4 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -3) 2007-03-19-CanonicalizeMemcpy.ll | 1 - memset-aggregate-byte-leader.ll | 1 - memset-aggregate.ll | 1 - 3 files changed, 3 deletions(-) Index: llvm/test/Transforms/ScalarRepl/2007-03-19-CanonicalizeMemcpy.ll diff -u llvm/test/Transforms/ScalarRepl/2007-03-19-CanonicalizeMemcpy.ll:1.1 llvm/test/Transforms/ScalarRepl/2007-03-19-CanonicalizeMemcpy.ll:1.2 --- llvm/test/Transforms/ScalarRepl/2007-03-19-CanonicalizeMemcpy.ll:1.1 Mon Mar 19 13:25:48 2007 +++ llvm/test/Transforms/ScalarRepl/2007-03-19-CanonicalizeMemcpy.ll Tue Mar 27 21:38:26 2007 @@ -15,7 +15,6 @@ %struct.aal_state_t = type { %struct.CGPoint, %struct.CGPoint, %struct.CGPoint, i32, float, float, float, float, %struct.CGPoint, %struct.CGPoint, float, float, float, float, i32, i32, i32, i32, float, float, i8*, i32, i32, %struct.aal_edge_pool_t*, %struct.aal_edge_pool_t*, i8*, %struct.aal_callback_t*, i32, %struct.aal_span_t*, %struct.aal_span_t*, %struct.aal_span_t*, %struct.aal_span_pool_t*, i8, float, i8, i32 } %struct.anon = type { %struct.aal_spanarray_t } -implementation ; Functions: declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) Index: llvm/test/Transforms/ScalarRepl/memset-aggregate-byte-leader.ll diff -u llvm/test/Transforms/ScalarRepl/memset-aggregate-byte-leader.ll:1.2 llvm/test/Transforms/ScalarRepl/memset-aggregate-byte-leader.ll:1.3 --- llvm/test/Transforms/ScalarRepl/memset-aggregate-byte-leader.ll:1.2 Sun Mar 18 19:17:19 2007 +++ llvm/test/Transforms/ScalarRepl/memset-aggregate-byte-leader.ll Tue Mar 27 21:38:26 2007 @@ -5,7 +5,6 @@ target triple = "powerpc-apple-darwin8.8.0" %struct.foo = type { i8, i8 } -implementation ; Functions: define i32 @test1(%struct.foo* %P) { entry: Index: llvm/test/Transforms/ScalarRepl/memset-aggregate.ll diff -u llvm/test/Transforms/ScalarRepl/memset-aggregate.ll:1.3 llvm/test/Transforms/ScalarRepl/memset-aggregate.ll:1.4 --- llvm/test/Transforms/ScalarRepl/memset-aggregate.ll:1.3 Tue Mar 27 20:31:33 2007 +++ llvm/test/Transforms/ScalarRepl/memset-aggregate.ll Tue Mar 27 21:38:26 2007 @@ -7,7 +7,6 @@ %struct.bar = type { %struct.foo, i64, double } %struct.foo = type { i32, i32 } -implementation ; Functions: define i32 @test1(%struct.foo* %P) { entry: From reid at x10sys.com Tue Mar 27 21:39:29 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:39:29 -0500 Subject: [llvm-commits] CVS: llvm/test/Assembler/2002-05-02-ParseError.ll 2007-01-02-Undefined-Arg-Type.ll Message-ID: <200703280239.l2S2dTXq021218@zion.cs.uiuc.edu> Changes in directory llvm/test/Assembler: 2002-05-02-ParseError.ll updated: 1.9 -> 1.10 2007-01-02-Undefined-Arg-Type.ll updated: 1.3 -> 1.4 --- Log message: Remove use of implementation keyword. --- Diffs of the changes: (+0 -2) 2002-05-02-ParseError.ll | 1 - 2007-01-02-Undefined-Arg-Type.ll | 1 - 2 files changed, 2 deletions(-) Index: llvm/test/Assembler/2002-05-02-ParseError.ll diff -u llvm/test/Assembler/2002-05-02-ParseError.ll:1.9 llvm/test/Assembler/2002-05-02-ParseError.ll:1.10 --- llvm/test/Assembler/2002-05-02-ParseError.ll:1.9 Fri Jan 26 02:25:05 2007 +++ llvm/test/Assembler/2002-05-02-ParseError.ll Tue Mar 27 21:38:26 2007 @@ -1,6 +1,5 @@ ; RUN: llvm-as %s -o /dev/null -f -; This should parse correctly without an 'implementation', but our current YACC ; based parser doesn't have the required 2 token lookahead... %T = type i32 * Index: llvm/test/Assembler/2007-01-02-Undefined-Arg-Type.ll diff -u llvm/test/Assembler/2007-01-02-Undefined-Arg-Type.ll:1.3 llvm/test/Assembler/2007-01-02-Undefined-Arg-Type.ll:1.4 --- llvm/test/Assembler/2007-01-02-Undefined-Arg-Type.ll:1.3 Fri Jan 26 02:25:05 2007 +++ llvm/test/Assembler/2007-01-02-Undefined-Arg-Type.ll Tue Mar 27 21:38:26 2007 @@ -3,7 +3,6 @@ ; %typedef.bc_struct = type opaque -implementation ; Functions: define i1 @someFunc(i32* %tmp.71.reload, %typedef.bc_struct* %n1) { ret i1 true From reid at x10sys.com Tue Mar 27 21:46:47 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 21:46:47 -0500 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html Message-ID: <200703280246.l2S2kl4P021565@zion.cs.uiuc.edu> Changes in directory llvm/docs: LangRef.html updated: 1.216 -> 1.217 --- Log message: Undocument the implementation keyword Docuemnt the checkpoint keyword --- Diffs of the changes: (+12 -13) LangRef.html | 25 ++++++++++++------------- 1 files changed, 12 insertions(+), 13 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.216 llvm/docs/LangRef.html:1.217 --- llvm/docs/LangRef.html:1.216 Sat Mar 24 17:40:44 2007 +++ llvm/docs/LangRef.html Tue Mar 27 21:46:29 2007 @@ -27,6 +27,7 @@
  • Parameter Attributes
  • Module-Level Inline Assembly
  • Data Layout
  • +
  • Check Points
  • Type System @@ -371,9 +372,6 @@ ; External declaration of the puts function declare i32 %puts(i8 *) ; i32(i8 *)* -; Global variable / Function body section separator -implementation - ; Definition of main function define i32 %main() { ; i32()* ; Convert [13x i8 ]* to i8 *... @@ -397,13 +395,6 @@ array of char, and a pointer to a function), and have one of the following linkage types.

    -

    Due to a limitation in the current LLVM assembly parser (it is limited by -one-token lookahead), modules are split into two pieces by the "implementation" -keyword. Global variable prototypes and definitions must occur before the -keyword, and function definitions must occur after it. Function prototypes may -occur either before or after it. In the future, the implementation keyword may -become a noop, if the parser gets smarter.

    -
  • @@ -856,6 +847,16 @@ terms of 64 <2 x double>, for example. + + +
    +

    At the top level, the keyword checkpoint may be used to force the + assembler to check point the types and values it has defined so far. Any + unresolved types or references will generate error messages. This is useful + as an assertion point or for debugging.

    +
    @@ -2719,8 +2720,6 @@ %RT = type { i8 , [10 x [20 x i32]], i8 } %ST = type { i32, double, %RT } - implementation - define i32* %foo(%ST* %s) { entry: %reg = getelementptr %ST* %s, i32 1, i32 2, i32 1, i32 5, i32 13 @@ -4612,7 +4611,7 @@ Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2007/03/24 22:40:44 $ + Last modified: $Date: 2007/03/28 02:46:29 $ From zhousheng00 at gmail.com Tue Mar 27 22:02:39 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Tue, 27 Mar 2007 22:02:39 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703280302.l2S32d9A021849@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.700 -> 1.701 --- Log message: Remove unused APInt variable. --- Diffs of the changes: (+0 -3) InstructionCombining.cpp | 3 --- 1 files changed, 3 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.700 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.701 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.700 Tue Mar 27 21:19:03 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Tue Mar 27 22:02:21 2007 @@ -784,9 +784,6 @@ KnownZero = APIntOps::lshr(KnownZero, ShiftAmt); KnownOne = APIntOps::lshr(KnownOne, ShiftAmt); - // Handle the sign bits and adjust to where it is now in the mask. - APInt SignBit(APInt::getSignBit(BitWidth).lshr(ShiftAmt)); - APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt)); if (KnownZero[BitWidth-ShiftAmt-1]) // New bits are known zero. KnownZero |= HighBits; From clattner at apple.com Tue Mar 27 22:17:38 2007 From: clattner at apple.com (Chris Lattner) Date: Tue, 27 Mar 2007 20:17:38 -0700 Subject: [llvm-commits] CVS: llvm/test/Assembler/2002-05-02-ParseError.ll 2007-01-02-Undefined-Arg-Type.ll In-Reply-To: <200703280239.l2S2dTXq021218@zion.cs.uiuc.edu> References: <200703280239.l2S2dTXq021218@zion.cs.uiuc.edu> Message-ID: > Index: llvm/test/Assembler/2002-05-02-ParseError.ll > diff -u llvm/test/Assembler/2002-05-02-ParseError.ll:1.9 llvm/test/ > Assembler/2002-05-02-ParseError.ll:1.10 > --- llvm/test/Assembler/2002-05-02-ParseError.ll:1.9 Fri Jan 26 > 02:25:05 2007 > +++ llvm/test/Assembler/2002-05-02-ParseError.ll Tue Mar 27 > 21:38:26 2007 > @@ -1,6 +1,5 @@ > ; RUN: llvm-as %s -o /dev/null -f > > -; This should parse correctly without an 'implementation', but our > current YACC > ; based parser doesn't have the required 2 token lookahead... > > %T = type i32 * ?? -Chris From reid at x10sys.com Tue Mar 27 22:23:39 2007 From: reid at x10sys.com (Reid Spencer) Date: Tue, 27 Mar 2007 22:23:39 -0500 Subject: [llvm-commits] CVS: llvm/test/Assembler/2002-05-02-ParseError.ll Message-ID: <200703280323.l2S3NdpA022292@zion.cs.uiuc.edu> Changes in directory llvm/test/Assembler: 2002-05-02-ParseError.ll updated: 1.10 -> 1.11 --- Log message: Delete the remanant of an obsolete comment. --- Diffs of the changes: (+0 -2) 2002-05-02-ParseError.ll | 2 -- 1 files changed, 2 deletions(-) Index: llvm/test/Assembler/2002-05-02-ParseError.ll diff -u llvm/test/Assembler/2002-05-02-ParseError.ll:1.10 llvm/test/Assembler/2002-05-02-ParseError.ll:1.11 --- llvm/test/Assembler/2002-05-02-ParseError.ll:1.10 Tue Mar 27 21:38:26 2007 +++ llvm/test/Assembler/2002-05-02-ParseError.ll Tue Mar 27 22:23:22 2007 @@ -1,7 +1,5 @@ ; RUN: llvm-as %s -o /dev/null -f -; based parser doesn't have the required 2 token lookahead... - %T = type i32 * define %T @test() { From jeffc at jolt-lang.org Tue Mar 27 23:45:19 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Tue, 27 Mar 2007 23:45:19 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-config/llvm-config.in.in Message-ID: <200703280445.l2S4jJYY023984@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-config: llvm-config.in.in updated: 1.24 -> 1.25 --- Log message: Fix problem with llvm-config that prevented JIT from being used on x86_64 systems. --- Diffs of the changes: (+4 -0) llvm-config.in.in | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/tools/llvm-config/llvm-config.in.in diff -u llvm/tools/llvm-config/llvm-config.in.in:1.24 llvm/tools/llvm-config/llvm-config.in.in:1.25 --- llvm/tools/llvm-config/llvm-config.in.in:1.24 Fri Jan 5 20:48:03 2007 +++ llvm/tools/llvm-config/llvm-config.in.in Tue Mar 27 23:45:02 2007 @@ -44,6 +44,10 @@ my @TARGETS_BUILT = map { lc($_) } qw{@TARGETS_TO_BUILD@}; #---- end autoconf values ---- +# Must pretend x86_64 architecture is really x86, otherwise the native backend +# won't get linked in. +$ARCH = "x86" if $ARCH eq "x86_64"; + #---- begin Makefile values ---- my $CFLAGS = q{@LLVM_CFLAGS@}; my $CXXFLAGS = q{@LLVM_CXXFLAGS@}; From jeffc at jolt-lang.org Tue Mar 27 23:46:48 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Tue, 27 Mar 2007 23:46:48 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/Benchmarks/Shootout/ackermann.c Message-ID: <200703280446.l2S4kmWN024023@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/Benchmarks/Shootout: ackermann.c updated: 1.4 -> 1.5 --- Log message: User-supplied prototype for printf *very* non-portable. --- Diffs of the changes: (+3 -3) ackermann.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm-test/SingleSource/Benchmarks/Shootout/ackermann.c diff -u llvm-test/SingleSource/Benchmarks/Shootout/ackermann.c:1.4 llvm-test/SingleSource/Benchmarks/Shootout/ackermann.c:1.5 --- llvm-test/SingleSource/Benchmarks/Shootout/ackermann.c:1.4 Mon Sep 20 13:55:11 2004 +++ llvm-test/SingleSource/Benchmarks/Shootout/ackermann.c Tue Mar 27 23:46:30 2007 @@ -1,10 +1,10 @@ /* -*- mode: c -*- - * $Id: ackermann.c,v 1.4 2004/09/20 18:55:11 gaeke Exp $ + * $Id: ackermann.c,v 1.5 2007/03/28 04:46:30 jeffc Exp $ * http://www.bagley.org/~doug/shootout/ */ -int printf(const char *, int, int); -int atoi(const char *); +#include +#include int Ack(int M, int N) { From rspencer at reidspencer.com Wed Mar 28 00:13:18 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Tue, 27 Mar 2007 22:13:18 -0700 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp In-Reply-To: <200703280219.l2S2JLu5019504@zion.cs.uiuc.edu> References: <200703280219.l2S2JLu5019504@zion.cs.uiuc.edu> Message-ID: <1175058798.16887.11.camel@bashful.x10sys.com> Sheng, Some important feedback .. Reid. On Tue, 2007-03-27 at 21:19 -0500, Zhou Sheng wrote: > > Changes in directory llvm/lib/Transforms/Scalar: > > InstructionCombining.cpp updated: 1.699 -> 1.700 > --- > Log message: > > Clean up codes in ComputeMaskedBits(): > 1. Line out nested use of zext/trunc. > 2. Make more use of getHighBitsSet/getLowBitsSet. > 3. Use APInt[] != 0 instead of "(APInt & SignBit) != 0". > > > --- > Diffs of the changes: (+27 -29) > > InstructionCombining.cpp | 56 ++++++++++++++++++++++------------------------- > 1 files changed, 27 insertions(+), 29 deletions(-) > > > Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp > diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.699 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.700 > --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.699 Tue Mar 27 20:36:16 2007 > +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Tue Mar 27 21:19:03 2007 > @@ -600,11 +600,10 @@ > assert(V && "No Value?"); > assert(Depth <= 6 && "Limit Search Depth"); > uint32_t BitWidth = Mask.getBitWidth(); > - const IntegerType *VTy = cast(V->getType()); > - assert(VTy->getBitWidth() == BitWidth && > + assert(cast(V->getType())->getBitWidth() == BitWidth && > KnownZero.getBitWidth() == BitWidth && > KnownOne.getBitWidth() == BitWidth && > - "VTy, Mask, KnownOne and KnownZero should have same BitWidth"); > + "V, Mask, KnownOne and KnownZero should have same BitWidth"); > if (ConstantInt *CI = dyn_cast(V)) { > // We know all of the bits for a constant! > KnownOne = CI->getValue() & Mask; > @@ -685,8 +684,11 @@ > // All these have integer operands > uint32_t SrcBitWidth = > cast(I->getOperand(0)->getType())->getBitWidth(); > - ComputeMaskedBits(I->getOperand(0), APInt(Mask).zext(SrcBitWidth), > - KnownZero.zext(SrcBitWidth), KnownOne.zext(SrcBitWidth), Depth+1); > + APInt MaskIn(Mask); > + MaskIn.zext(SrcBitWidth); > + KnownZero.zext(SrcBitWidth); > + KnownOne.zext(SrcBitWidth); > + ComputeMaskedBits(I->getOperand(0), MaskIn, KnownZero, KnownOne, Depth+1); > KnownZero.trunc(BitWidth); > KnownOne.trunc(BitWidth); > return; > @@ -703,43 +705,40 @@ > // Compute the bits in the result that are not present in the input. > const IntegerType *SrcTy = cast(I->getOperand(0)->getType()); > uint32_t SrcBitWidth = SrcTy->getBitWidth(); > - APInt NewBits(APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth)); > > - ComputeMaskedBits(I->getOperand(0), APInt(Mask).trunc(SrcBitWidth), > - KnownZero.trunc(SrcBitWidth), KnownOne.trunc(SrcBitWidth), Depth+1); > + APInt MaskIn(Mask); > + MaskIn.trunc(SrcBitWidth); > + KnownZero.trunc(SrcBitWidth); > + KnownOne.trunc(SrcBitWidth); > + ComputeMaskedBits(I->getOperand(0), MaskIn, KnownZero, KnownOne, Depth+1); > assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"); > // The top bits are known to be zero. > KnownZero.zext(BitWidth); > KnownOne.zext(BitWidth); > - KnownZero |= NewBits; > + KnownZero |= APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth); > return; > } > case Instruction::SExt: { > // Compute the bits in the result that are not present in the input. > const IntegerType *SrcTy = cast(I->getOperand(0)->getType()); > uint32_t SrcBitWidth = SrcTy->getBitWidth(); > - APInt NewBits(APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth)); > > - ComputeMaskedBits(I->getOperand(0), APInt(Mask).trunc(SrcBitWidth), > - KnownZero.trunc(SrcBitWidth), KnownOne.trunc(SrcBitWidth), Depth+1); > + APInt MaskIn(Mask); > + MaskIn.trunc(SrcBitWidth); > + KnownZero.trunc(SrcBitWidth); > + KnownOne.trunc(SrcBitWidth); > + ComputeMaskedBits(I->getOperand(0), MaskIn, KnownZero, KnownOne, Depth+1); > assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"); > KnownZero.zext(BitWidth); > KnownOne.zext(BitWidth); > > // If the sign bit of the input is known set or clear, then we know the > // top bits of the result. > - APInt InSignBit(APInt::getSignBit(SrcTy->getBitWidth())); > - InSignBit.zext(BitWidth); > - if ((KnownZero & InSignBit) != 0) { // Input sign bit known zero > + APInt NewBits(APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth)); > + if (KnownZero[SrcBitWidth-1]) // Input sign bit known zero This doesn't look correct nor efficient to me. It should be testing for only the sign bit. YOu need an & not an |. You're trying to determine if the sign bit of the SrcTy is set in KnownZero, right? So, why not: if (KnownZero.get(SrcBitWidth-1)) ? > KnownZero |= NewBits; > - KnownOne &= ~NewBits; > - } else if ((KnownOne & InSignBit) != 0) { // Input sign bit known set > + else if (KnownOne[SrcBitWidth-1]) // Input sign bit known set Same issue as above. > KnownOne |= NewBits; > - KnownZero &= ~NewBits; > - } else { // Input sign bit unknown > - KnownZero &= ~NewBits; > - KnownOne &= ~NewBits; > - } Why did you delete this? What if the sign bit is unknown? (neither known one nor known zero). Please revert. > return; > } > case Instruction::Shl: > @@ -760,7 +759,6 @@ > if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { > // Compute the new bits that are at the top now. > uint64_t ShiftAmt = SA->getZExtValue(); > - APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt)); > > // Unsigned shift right. > APInt Mask2(Mask.shl(ShiftAmt)); > @@ -768,16 +766,16 @@ > assert((KnownZero & KnownOne) == 0&&"Bits known to be one AND zero?"); > KnownZero = APIntOps::lshr(KnownZero, ShiftAmt); > KnownOne = APIntOps::lshr(KnownOne, ShiftAmt); > - KnownZero |= HighBits; // high bits known zero. > + // high bits known zero. > + KnownZero |= APInt::getHighBitsSet(BitWidth, ShiftAmt); > return; > } > break; > case Instruction::AShr: > - // (ushr X, C1) & C2 == 0 iff (-1 >> C1) & C2 == 0 > + // (ashr X, C1) & C2 == 0 iff (-1 >> C1) & C2 == 0 > if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { > // Compute the new bits that are at the top now. > uint64_t ShiftAmt = SA->getZExtValue(); > - APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt)); > > // Signed shift right. > APInt Mask2(Mask.shl(ShiftAmt)); > @@ -789,11 +787,11 @@ > // Handle the sign bits and adjust to where it is now in the mask. > APInt SignBit(APInt::getSignBit(BitWidth).lshr(ShiftAmt)); > > - if ((KnownZero & SignBit) != 0) { // New bits are known zero. > + APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt)); > + if (KnownZero[BitWidth-ShiftAmt-1]) // New bits are known zero. > KnownZero |= HighBits; > - } else if ((KnownOne & SignBit) != 0) { // New bits are known one. > + else if (KnownOne[BitWidth-ShiftAmt-1]) // New bits are known one. > KnownOne |= HighBits; > - } > return; > } > break; > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From zhousheng00 at gmail.com Wed Mar 28 00:16:14 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Wed, 28 Mar 2007 00:16:14 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703280516.l2S5GEvp024686@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.701 -> 1.702 --- Log message: Use UnknownBIts[BitWidth-1] instead of UnknownBIts & SignBits. --- Diffs of the changes: (+1 -1) InstructionCombining.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.701 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.702 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.701 Tue Mar 27 22:02:21 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Mar 28 00:15:57 2007 @@ -851,7 +851,7 @@ Min = KnownOne; Max = KnownOne|UnknownBits; - if ((SignBit & UnknownBits) != 0) { // Sign bit is unknown + if (UnknownBits[BitWidth-1]) { // Sign bit is unknown Min |= SignBit; Max &= ~SignBit; } From rspencer at reidspencer.com Wed Mar 28 00:17:26 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Tue, 27 Mar 2007 22:17:26 -0700 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp In-Reply-To: <1175058798.16887.11.camel@bashful.x10sys.com> References: <200703280219.l2S2JLu5019504@zion.cs.uiuc.edu> <1175058798.16887.11.camel@bashful.x10sys.com> Message-ID: <1175059046.16887.16.camel@bashful.x10sys.com> Sheng, A correction to my last email .. On Tue, 2007-03-27 at 22:13 -0700, Reid Spencer wrote: > > // If the sign bit of the input is known set or clear, then we know the > > // top bits of the result. > > - APInt InSignBit(APInt::getSignBit(SrcTy->getBitWidth())); > > - InSignBit.zext(BitWidth); > > - if ((KnownZero & InSignBit) != 0) { // Input sign bit known zero > > + APInt NewBits(APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth)); > > + if (KnownZero[SrcBitWidth-1]) // Input sign bit known zero > > This doesn't look correct nor efficient to me. It should be testing for > only the sign bit. YOu need an & not an |. You're trying to determine > if the sign bit of the SrcTy is set in KnownZero, right? So, why not: > > if (KnownZero.get(SrcBitWidth-1)) > > ? My eyes are tired tonight. I didn't see the [...] and thought the [ was | so please disregard. This looks okay. > > > KnownZero |= NewBits; > > - KnownOne &= ~NewBits; > > - } else if ((KnownOne & InSignBit) != 0) { // Input sign bit known set > > + else if (KnownOne[SrcBitWidth-1]) // Input sign bit known set > > Same issue as above. > > > KnownOne |= NewBits; > > - KnownZero &= ~NewBits; > > - } else { // Input sign bit unknown > > - KnownZero &= ~NewBits; > > - KnownOne &= ~NewBits; > > - } > > Why did you delete this? What if the sign bit is unknown? (neither known > one nor known zero). Please revert. This however is still a problem. It is quite possible for KnownZero[X] and KnownOne[X] to both be false. Reid. > > > return; > > } > > case Instruction::Shl: > > @@ -760,7 +759,6 @@ > > if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { > > // Compute the new bits that are at the top now. > > uint64_t ShiftAmt = SA->getZExtValue(); > > - APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt)); > > > > // Unsigned shift right. > > APInt Mask2(Mask.shl(ShiftAmt)); > > @@ -768,16 +766,16 @@ > > assert((KnownZero & KnownOne) == 0&&"Bits known to be one AND zero?"); > > KnownZero = APIntOps::lshr(KnownZero, ShiftAmt); > > KnownOne = APIntOps::lshr(KnownOne, ShiftAmt); > > - KnownZero |= HighBits; // high bits known zero. > > + // high bits known zero. > > + KnownZero |= APInt::getHighBitsSet(BitWidth, ShiftAmt); > > return; > > } > > break; > > case Instruction::AShr: > > - // (ushr X, C1) & C2 == 0 iff (-1 >> C1) & C2 == 0 > > + // (ashr X, C1) & C2 == 0 iff (-1 >> C1) & C2 == 0 > > if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { > > // Compute the new bits that are at the top now. > > uint64_t ShiftAmt = SA->getZExtValue(); > > - APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt)); > > > > // Signed shift right. > > APInt Mask2(Mask.shl(ShiftAmt)); > > @@ -789,11 +787,11 @@ > > // Handle the sign bits and adjust to where it is now in the mask. > > APInt SignBit(APInt::getSignBit(BitWidth).lshr(ShiftAmt)); > > > > - if ((KnownZero & SignBit) != 0) { // New bits are known zero. > > + APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt)); > > + if (KnownZero[BitWidth-ShiftAmt-1]) // New bits are known zero. > > KnownZero |= HighBits; > > - } else if ((KnownOne & SignBit) != 0) { // New bits are known one. > > + else if (KnownOne[BitWidth-ShiftAmt-1]) // New bits are known one. > > KnownOne |= HighBits; > > - } > > return; > > } > > break; > > > > > > > > _______________________________________________ > > llvm-commits mailing list > > llvm-commits at cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From zhousheng00 at gmail.com Wed Mar 28 01:23:01 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Wed, 28 Mar 2007 14:23:01 +0800 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp In-Reply-To: <1175059046.16887.16.camel@bashful.x10sys.com> References: <200703280219.l2S2JLu5019504@zion.cs.uiuc.edu> <1175058798.16887.11.camel@bashful.x10sys.com> <1175059046.16887.16.camel@bashful.x10sys.com> Message-ID: <1175062981.2589.15.camel@panda.autoesl-bj.intranet> ? 2007-03-27?? 22:17 -0700?Reid Spencer??? > Sheng, > > A correction to my last email .. > > On Tue, 2007-03-27 at 22:13 -0700, Reid Spencer wrote: > > > // If the sign bit of the input is known set or clear, then we know the > > > // top bits of the result. > > > - APInt InSignBit(APInt::getSignBit(SrcTy->getBitWidth())); > > > - InSignBit.zext(BitWidth); > > > - if ((KnownZero & InSignBit) != 0) { // Input sign bit known zero > > > + APInt NewBits(APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth)); > > > + if (KnownZero[SrcBitWidth-1]) // Input sign bit known zero > > > > This doesn't look correct nor efficient to me. It should be testing for > > only the sign bit. YOu need an & not an |. You're trying to determine > > if the sign bit of the SrcTy is set in KnownZero, right? So, why not: > > > > if (KnownZero.get(SrcBitWidth-1)) > > > > ? > > My eyes are tired tonight. I didn't see the [...] and thought the [ was > | so please disregard. This looks okay. > > > > > > KnownZero |= NewBits; > > > - KnownOne &= ~NewBits; > > > - } else if ((KnownOne & InSignBit) != 0) { // Input sign bit known set > > > + else if (KnownOne[SrcBitWidth-1]) // Input sign bit known set > > > > Same issue as above. > > > > > KnownOne |= NewBits; > > > - KnownZero &= ~NewBits; > > > - } else { // Input sign bit unknown > > > - KnownZero &= ~NewBits; > > > - KnownOne &= ~NewBits; > > > - } > > > > Why did you delete this? What if the sign bit is unknown? (neither known > > one nor known zero). Please revert. > > This however is still a problem. It is quite possible for KnownZero[X] > and KnownOne[X] to both be false. I looked into the context, the *else* case is possible, but, as the NewBits are : APInt NewBits(APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth)); So ~NewBits should be a Mask of SrcBitWidth, and as KnownZero, KnownOne are just zexted from SrcBitWidth to BitWidth, so, the &= operation will be useless. > > Reid. > > > > > return; > > > } > > > case Instruction::Shl: > > > @@ -760,7 +759,6 @@ > > > if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { > > > // Compute the new bits that are at the top now. > > > uint64_t ShiftAmt = SA->getZExtValue(); > > > - APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt)); > > > > > > // Unsigned shift right. > > > APInt Mask2(Mask.shl(ShiftAmt)); > > > @@ -768,16 +766,16 @@ > > > assert((KnownZero & KnownOne) == 0&&"Bits known to be one AND zero?"); > > > KnownZero = APIntOps::lshr(KnownZero, ShiftAmt); > > > KnownOne = APIntOps::lshr(KnownOne, ShiftAmt); > > > - KnownZero |= HighBits; // high bits known zero. > > > + // high bits known zero. > > > + KnownZero |= APInt::getHighBitsSet(BitWidth, ShiftAmt); > > > return; > > > } > > > break; > > > case Instruction::AShr: > > > - // (ushr X, C1) & C2 == 0 iff (-1 >> C1) & C2 == 0 > > > + // (ashr X, C1) & C2 == 0 iff (-1 >> C1) & C2 == 0 > > > if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { > > > // Compute the new bits that are at the top now. > > > uint64_t ShiftAmt = SA->getZExtValue(); > > > - APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt)); > > > > > > // Signed shift right. > > > APInt Mask2(Mask.shl(ShiftAmt)); > > > @@ -789,11 +787,11 @@ > > > // Handle the sign bits and adjust to where it is now in the mask. > > > APInt SignBit(APInt::getSignBit(BitWidth).lshr(ShiftAmt)); > > > > > > - if ((KnownZero & SignBit) != 0) { // New bits are known zero. > > > + APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt)); > > > + if (KnownZero[BitWidth-ShiftAmt-1]) // New bits are known zero. > > > KnownZero |= HighBits; > > > - } else if ((KnownOne & SignBit) != 0) { // New bits are known one. > > > + else if (KnownOne[BitWidth-ShiftAmt-1]) // New bits are known one. > > > KnownOne |= HighBits; > > > - } > > > return; > > > } > > > break; > > > > > > > > > > > > _______________________________________________ > > > 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 Wed Mar 28 03:27:09 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 28 Mar 2007 03:27:09 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <200703280827.l2S8R9AO027759@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.229 -> 1.230 --- Log message: Move rematerialization out of beta. --- Diffs of the changes: (+1 -7) LiveIntervalAnalysis.cpp | 8 +------- 1 files changed, 1 insertion(+), 7 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.229 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.230 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.229 Tue Mar 27 20:30:37 2007 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Wed Mar 28 03:26:40 2007 @@ -50,11 +50,6 @@ EnableJoining("join-liveintervals", cl::desc("Coallesce copies (default=true)"), cl::init(true)); - - static cl::opt - EnableReMat("enable-rematerialization", - cl::desc("Perform trivial re-materialization"), - cl::init(false)); } void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const { @@ -436,8 +431,7 @@ // time we see a vreg. if (interval.empty()) { // Remember if the definition can be rematerialized. - if (EnableReMat && - vi.DefInst && tii_->isReMaterializable(vi.DefInst->getOpcode())) + if (vi.DefInst && tii_->isReMaterializable(vi.DefInst->getOpcode())) interval.remat = vi.DefInst; // Get the Idx of the defining instructions. From evan.cheng at apple.com Wed Mar 28 03:30:27 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 28 Mar 2007 03:30:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/README.txt Message-ID: <200703280830.l2S8URs0027894@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: README.txt updated: 1.1 -> 1.2 --- Log message: Notes on re-materialization. --- Diffs of the changes: (+40 -0) README.txt | 40 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 40 insertions(+) Index: llvm/lib/CodeGen/README.txt diff -u llvm/lib/CodeGen/README.txt:1.1 llvm/lib/CodeGen/README.txt:1.2 --- llvm/lib/CodeGen/README.txt:1.1 Tue Mar 20 17:22:38 2007 +++ llvm/lib/CodeGen/README.txt Wed Mar 28 03:30:04 2007 @@ -1,3 +1,5 @@ +//===---------------------------------------------------------------------===// + Common register allocation / spilling problem: mul lr, r4, lr @@ -25,3 +27,41 @@ mla r4, r3, lr, r4 It also increase the likelyhood the store may become dead. + +//===---------------------------------------------------------------------===// + +I think we should have a "hasSideEffects" flag (which is automatically set for +stuff that "isLoad" "isCall" etc), and the remat pass should eventually be able +to remat any instruction that has no side effects, if it can handle it and if +profitable. + +For now, I'd suggest having the remat stuff work like this: + +1. I need to spill/reload this thing. +2. Check to see if it has side effects. +3. Check to see if it is simple enough: e.g. it only has one register +destination and no register input. +4. If so, clone the instruction, do the xform, etc. + +Advantages of this are: + +1. the .td file describes the behavior of the instructions, not the way the + algorithm should work. +2. as remat gets smarter in the future, we shouldn't have to be changing the .td + files. +3. it is easier to explain what the flag means in the .td file, because you + don't have to pull in the explanation of how the current remat algo works. + +Some potential added complexities: + +1. Some instructions have to be glued to it's predecessor or successor. All of + the PC relative instructions and condition code setting instruction. We could + mark them as hasSideEffects, but that's not quite right. PC relative loads + from constantpools can be remat'ed, for example. But it requires more than + just cloning the instruction. Some instructions can be remat'ed but it + expands to more than one instruction. But allocator will have to make a + decision. + +4. As stated in 3, not as simple as cloning in some cases. The target will have + to decide how to remat it. For example, an ARM 2-piece constant generation + instruction is remat'ed as a load from constantpool. From evan.cheng at apple.com Wed Mar 28 03:31:38 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 28 Mar 2007 03:31:38 -0500 Subject: [llvm-commits] CVS: llvm-test/Makefile.programs Message-ID: <200703280831.l2S8Vc6j027972@zion.cs.uiuc.edu> Changes in directory llvm-test: Makefile.programs updated: 1.263 -> 1.264 --- Log message: X86 llcbeta back to -enable-tail-merge. --- Diffs of the changes: (+1 -2) Makefile.programs | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) Index: llvm-test/Makefile.programs diff -u llvm-test/Makefile.programs:1.263 llvm-test/Makefile.programs:1.264 --- llvm-test/Makefile.programs:1.263 Tue Mar 20 19:19:32 2007 +++ llvm-test/Makefile.programs Wed Mar 28 03:31:17 2007 @@ -223,8 +223,7 @@ LLCBETAOPTION := -sched=simple endif ifeq ($(ARCH),x86) -LLCBETAOPTION := -enable-rematerialization -# -enable-tail-merge +LLCBETAOPTION := -enable-tail-merge #-regalloc=local -fast endif ifeq ($(ARCH),Sparc) From zhousheng00 at gmail.com Wed Mar 28 04:19:18 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Wed, 28 Mar 2007 04:19:18 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703280919.l2S9JIUx000566@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.702 -> 1.703 --- Log message: 1. Make more use of getLowBitsSet/getHighBitsSet. 2. Make the APInt value do the zext/trunc stuff instead of using ConstantExpr::getZExt(). --- Diffs of the changes: (+3 -5) InstructionCombining.cpp | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.702 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.703 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.702 Wed Mar 28 00:15:57 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Mar 28 04:19:01 2007 @@ -6304,8 +6304,7 @@ case Instruction::ZExt: { // We need to emit an AND to clear the high bits. assert(SrcBitSize < DestBitSize && "Not a zext?"); - Constant *C = ConstantInt::get(APInt::getAllOnesValue(SrcBitSize)); - C = ConstantExpr::getZExt(C, DestTy); + Constant *C = ConstantInt::get(APInt::getLowBitsSet(DestBitSize, SrcBitSize)); return BinaryOperator::createAnd(Res, C); } case Instruction::SExt: @@ -6487,8 +6486,7 @@ unsigned ShAmt = ShAmtV->getZExtValue(); // Get a mask for the bits shifting in. - APInt Mask(APInt::getAllOnesValue(SrcBitWidth).lshr( - SrcBitWidth-ShAmt).shl(DestBitWidth)); + APInt Mask(APInt::getLowBitsSet(SrcBitWidth, ShAmt).shl(DestBitWidth)); Value* SrcIOp0 = SrcI->getOperand(0); if (SrcI->hasOneUse() && MaskedValueIsZero(SrcIOp0, Mask)) { if (ShAmt >= DestBitWidth) // All zeros. @@ -6547,7 +6545,7 @@ // If we're actually extending zero bits and the trunc is a no-op if (MidSize < DstSize && SrcSize == DstSize) { // Replace both of the casts with an And of the type mask. - APInt AndValue(APInt::getAllOnesValue(MidSize).zext(SrcSize)); + APInt AndValue(APInt::getLowBitsSet(SrcSize, MidSize)); Constant *AndConst = ConstantInt::get(AndValue); Instruction *And = BinaryOperator::createAnd(CSrc->getOperand(0), AndConst); From rspencer at reidspencer.com Wed Mar 28 09:11:02 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Wed, 28 Mar 2007 07:11:02 -0700 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp In-Reply-To: <1175062981.2589.15.camel@panda.autoesl-bj.intranet> References: <200703280219.l2S2JLu5019504@zion.cs.uiuc.edu> <1175058798.16887.11.camel@bashful.x10sys.com> <1175059046.16887.16.camel@bashful.x10sys.com> <1175062981.2589.15.camel@panda.autoesl-bj.intranet> Message-ID: <1175091062.16887.23.camel@bashful.x10sys.com> On Wed, 2007-03-28 at 14:23 +0800, Zhou Sheng wrote: > ? 2007-03-27?? 22:17 -0700?Reid Spencer??? > > > > KnownOne |= NewBits; > > > > - KnownZero &= ~NewBits; > > > > - } else { // Input sign bit unknown > > > > - KnownZero &= ~NewBits; > > > > - KnownOne &= ~NewBits; > > > > - } > > > > > > Why did you delete this? What if the sign bit is unknown? (neither known > > > one nor known zero). Please revert. > > > > This however is still a problem. It is quite possible for KnownZero[X] > > and KnownOne[X] to both be false. > I looked into the context, the *else* case is possible, but, as the > NewBits are : > > APInt NewBits(APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth)); > > So ~NewBits should be a Mask of SrcBitWidth, and as KnownZero, KnownOne > are just zexted from SrcBitWidth to BitWidth, so, the &= operation will > be useless. I see. I didn't have the full context on the trunc/zext. However, now what you can do is move the construction of NewBits into each of the two cases. This will avoid constructing it in the event that the sign bit is not sent in either KnownZero nor KnownOne. Thanks Sheng, Reid. From dpatel at apple.com Wed Mar 28 09:58:00 2007 From: dpatel at apple.com (Devang Patel) Date: Wed, 28 Mar 2007 09:58:00 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Dominators.cpp Message-ID: <200703281458.l2SEw0uu006672@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Dominators.cpp updated: 1.84 -> 1.85 --- Log message: It is not possible to determine dominance between two PHI nodes based on their ordering. This is applicable to ETForest::dominates() also. --- Diffs of the changes: (+5 -0) Dominators.cpp | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/lib/VMCore/Dominators.cpp diff -u llvm/lib/VMCore/Dominators.cpp:1.84 llvm/lib/VMCore/Dominators.cpp:1.85 --- llvm/lib/VMCore/Dominators.cpp:1.84 Tue Mar 27 15:50:46 2007 +++ llvm/lib/VMCore/Dominators.cpp Wed Mar 28 09:57:43 2007 @@ -952,6 +952,11 @@ BasicBlock::iterator I = BBA->begin(); for (; &*I != A && &*I != B; ++I) /*empty*/; + // It is not possible to determine dominance between two PHI nodes + // based on their ordering. + if (isa(A) && isa(B)) + return false; + if(!IsPostDominators) { // A dominates B if it is found first in the basic block. return &*I == A; From zhousheng00 at gmail.com Wed Mar 28 10:02:37 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Wed, 28 Mar 2007 10:02:37 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703281502.l2SF2bmm006781@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.703 -> 1.704 --- Log message: 1. Make more use of getLowBitsSet/getHighBitsSet. 2. Use APInt[] instead of "X & SignBit". 3. Clean up some codes. 4. Make the expression like "ShiftAmt = ShiftAmtC->getZExtValue()" safe. --- Diffs of the changes: (+16 -13) InstructionCombining.cpp | 29 ++++++++++++++++------------- 1 files changed, 16 insertions(+), 13 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.703 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.704 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.703 Wed Mar 28 04:19:01 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Mar 28 10:02:20 2007 @@ -1313,7 +1313,7 @@ RHSKnownOne <<= ShiftAmt; // low bits known zero. if (ShiftAmt) - RHSKnownZero |= APInt::getAllOnesValue(ShiftAmt).zextOrCopy(BitWidth); + RHSKnownZero |= APInt::getLowBitsSet(BitWidth, ShiftAmt); } break; case Instruction::LShr: @@ -5608,7 +5608,7 @@ // shl uint X, 32 = 0 and shr ubyte Y, 9 = 0, ... just don't eliminate shr // of a signed value. // - if (Op1->getZExtValue() >= TypeBits) { // shift amount always <= 32 bits + if (Op1->getValue().getActiveBits() > 64 || Op1->getZExtValue() >= TypeBits) { if (I.getOpcode() != Instruction::AShr) return ReplaceInstUsesWith(I, Constant::getNullValue(Op0->getType())); else { @@ -5751,8 +5751,7 @@ // operation. // if (isValid && !isLeftShift && I.getOpcode() == Instruction::AShr) { - isValid = ((Op0C->getValue() & APInt::getSignBit(TypeBits)) != 0) == - highBitSet; + isValid = Op0C->getValue()[TypeBits-1] == highBitSet; } if (isValid) { @@ -5777,9 +5776,10 @@ if (ShiftOp && isa(ShiftOp->getOperand(1))) { ConstantInt *ShiftAmt1C = cast(ShiftOp->getOperand(1)); - // These shift amounts are always <= 32 bits. - unsigned ShiftAmt1 = (unsigned)ShiftAmt1C->getZExtValue(); - unsigned ShiftAmt2 = (unsigned)Op1->getZExtValue(); + uint32_t ShiftAmt1 = ShiftAmt1C->getValue().getActiveBits() > 64 ? + TypeBits : (uint32_t)ShiftAmt1C->getZExtValue(); + uint32_t ShiftAmt2 = Op1->getValue().getActiveBits() > 64 ? + TypeBits : (uint32_t)Op1->getZExtValue(); assert(ShiftAmt2 != 0 && "Should have been simplified earlier"); if (ShiftAmt1 == 0) return 0; // Will be simplified in the future. Value *X = ShiftOp->getOperand(0); @@ -5805,7 +5805,7 @@ BinaryOperator::createAShr(X, ConstantInt::get(Ty, AmtSum)); InsertNewInstBefore(Shift, I); - APInt Mask(Ty->getMask().lshr(ShiftAmt2)); + APInt Mask(APInt::getLowBitsSet(TypeBits, TypeBits - ShiftAmt2)); return BinaryOperator::createAnd(Shift, ConstantInt::get(Mask)); } @@ -5828,11 +5828,14 @@ // generators. const Type *SExtType = 0; switch (Ty->getBitWidth() - ShiftAmt1) { - case 1 : SExtType = Type::Int1Ty; break; - case 8 : SExtType = Type::Int8Ty; break; - case 16 : SExtType = Type::Int16Ty; break; - case 32 : SExtType = Type::Int32Ty; break; - case 64 : SExtType = Type::Int64Ty; break; + case 1 : + case 8 : + case 16 : + case 32 : + case 64 : + case 128: + SExtType = IntegerType::get(Ty->getBitWidth() - ShiftAmt1); + break; default: break; } if (SExtType) { From djg at cray.com Wed Mar 28 10:53:15 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 28 Mar 2007 10:53:15 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.cpp In-Reply-To: <200703280058.l2S0wvJo017347@zion.cs.uiuc.edu> Message-ID: <20070328155314.GB23467@gold.us.cray.com> Chris Lattner wrote: > Fix a problem building llvm-gcc on amd64-unknown-freebsd6.2, due to the > system assembler not groking legal instructions like "leal (,%esi,8), %ecx". I was just about to report this. Thanks! BTW, I believe this also fixes the fifth entry in llvm/lib/Target/X86/README-X86-64.txt Dan -- Dan Gohman, Cray Inc. From baldrick at free.fr Wed Mar 28 11:23:36 2007 From: baldrick at free.fr (Duncan Sands) Date: Wed, 28 Mar 2007 18:23:36 +0200 Subject: [llvm-commits] llvm-gcc: correct handling of arrays of var-sized elements Message-ID: <200703281823.37085.baldrick@free.fr> In gcc, the length of an array may only be known at runtime, for example "char X[n];" is legal; the same goes for array types: the length of the array type may depend on the value of a variable. This is a gcc C extension, so somewhat rare, but is widely used in languages like Ada. You can construct pointers to such types and arrays where the element type is such a variable-sized array. This is one way of getting an array where the element type does not have a fixed size; the other way is to use a variable-sized struct as the element type. Currently such arrays are handled wrong: loads and stores to elements (via ARRAY_REF) access the wrong memory location. The reason for this is simple enough: the gcc element type (EType) and the corresponding LLVM type (ETypeLLVM) have different sizes. This means that LLVM arrays of the LLVM element type lay their components out in memory differently to the gcc array. For example, suppose the element type EType is "char [n]", a length n string, and the array type AType is an array of three ETypes, which I'll write as "(char [n])[3]". Right now these get converted as follows: GCC LLVM char[n] i8 (char [n])[3] [3 x i8] GCC memory layout element: 0 0 0 1 1 1 2 2 byte: 0 1 ... n-1 n n+1 ... 2n-1 2n .. 3n-1 LLVM memory layout element: 0 1 2 byte: 0 1 2 Referencing element 1 accesses 1 byte from the start when it should be accessing the n'th byte from the start. The testcase shows an example of the bogus results this can give (2007-03-27-ArrayCompatible.c). The conversion to an LLVM array is clearly bogus. There is an analogous problem with pointers: using GetElementPtr to do pointer offsets is only valid if the LLVM type is the same size as the GCC type, since otherwise the pointer will be advanced by the wrong amount. The patch introduces utility functions isSequentialCompatible and isArrayCompatible that apply to a gcc array (or pointer type). If isSequentialCompatible returns true, then elements of the gcc type are laid out in memory the same as the corresponding LLVM elements. Thus GetElementPtr can be used to access them. If isArrayCompatible returns true, then the gcc array corresponds to an LLVM array, laying out its components the same way. isSequentialCompatible relies on the following invariant: if the size of a gcc type is a constant, then the corresponding LLVM type has the same size [1]. I've added an assertion in llvm-types to check that this is true. isSequentialCompatible simply returns whether the gcc element type has constant size [1]. Thus isSequentialCompatible returns true for a variable length array with a constant size element type. isArrayCompatible returns true if the array has a constant length and the element type has constant size [2]. The patch then fixes up a bunch of array code to use these. It also modifies pointer code to use isSequentialCompatible, but these modifications are minor since the pointer code already got it right. For example, both isSequentialCompatible and isArrayCompatible return false for the array type example described above. The conversions are now: GCC LLVM char[n] i8 (char [n])[3] i8 and the LLVM memory layout is done using pointer arithmetic. The patch also introduces two generally useful methods requested by Chris: isInt64 and getInt64. These tell you whether a gcc constant fits into 64 bits, and gets the constant for you (aborting if it doesn't fit). They are analogous to host_integerp and tree_low_cst, only using 64 bit integers rather than HOST_WIDE_INT. They are used for example to tell whether the size in bits of the gcc type is small enough (< 2^64) to correspond to an LLVM type [3]. The main difference with getINTEGER_CSTVal is that getInt64 refuses to return constants that overflowed or are simply too big for 64 bits. I corrected a number of other small problems while I was there: - I unified the pointer and array cases in TreeToLLVM::EmitLV_ARRAY_REF. The pointer code did a better job than the array code and the array code benefits from this: indexing into a variable length array with a constant size element type (i.e. when isSequentialCompatible is true) now uses a GetElementPtr rather than 'orrible pointer arithmetic. This produces vastly better code when, for example, accessing elements of an array like "int X[n]". There's a testcase for this (2007-03-27-VarLengthArray.c). - The size passed to an AllocaInst might not be an Int32. Probably impossible to hit in practice. - If the index type in TreeConstantToLLVM::EmitLV_ARRAY_REF was an unsigned 32 bit integer, you could get wrong code on a 64 bit machine. Wildly unlikely it could ever be hit. Bootstraps, causes no testsuite failures (including multisource) and indeed on my system causes 2003-05-22-VarSizeArray.c to pass rather than crash the gcc 4.1 compiler (CBE) because the improved array indexing causes the testcase to be simplified down to one line: ret i32 0. Enjoy! Duncan. [1] To be exact, the invariant is: if the size of the gcc type in bits is a non-negative constant smaller than 2^64 then the LLVM type has the same size in bits. [2] It also returns true if the array has no length and the element type has constant size, like "int X[];". In order to preserve the invariant described in [1], it has to return true if the gcc array type has constant size, which means that variable length arrays with an element type of zero size and zero length arrays with a variable size element type are both accepted; they have size zero and so does the corresponding LLVM array. [3] It is easy to create huge types, for example an array of 2^64 arrays of length 2^64. This will not map to an LLVM type. It is huge objects that are hard to create. -------------- next part -------------- A non-text attachment was scrubbed... Name: array_of_var.diff Type: text/x-diff Size: 19303 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070328/47e15ee2/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 2007-03-27-ArrayCompatible.c Type: text/x-csrc Size: 162 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070328/47e15ee2/attachment-0001.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: 2007-03-27-VarLengthArray.c Type: text/x-csrc Size: 136 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070328/47e15ee2/attachment-0002.bin From reid at x10sys.com Wed Mar 28 11:30:37 2007 From: reid at x10sys.com (Reid Spencer) Date: Wed, 28 Mar 2007 11:30:37 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/sign.c Message-ID: <200703281630.l2SGUbXp008176@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Integer: sign.c updated: 1.2 -> 1.3 --- Log message: Add some comments. --- Diffs of the changes: (+4 -4) sign.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm-test/SingleSource/UnitTests/Integer/sign.c diff -u llvm-test/SingleSource/UnitTests/Integer/sign.c:1.2 llvm-test/SingleSource/UnitTests/Integer/sign.c:1.3 --- llvm-test/SingleSource/UnitTests/Integer/sign.c:1.2 Sat Feb 10 08:40:07 2007 +++ llvm-test/SingleSource/UnitTests/Integer/sign.c Wed Mar 28 11:30:20 2007 @@ -39,12 +39,12 @@ ux = num; // = 1 printf("x = %d, ux = %u, y=%d, uy = %u\n", x, ux, y, uy); - z = x * y; // 0x1000001 * (-1) - uz = ux * uy; + z = x * y; // 0x1000001 * -1 + uz = ux * uy; // 1 * -1 printf("z=%d, uz=%u\n", z, uz); - z = x % 314; - uz = ux % 314; + z = x % 314; // 0x1000001 % 314 + uz = ux % 314; // 1 % 314 == 1 printf("z=%d, uz=%u\n", z, uz); z = x / 314; From reid at x10sys.com Wed Mar 28 11:31:21 2007 From: reid at x10sys.com (Reid Spencer) Date: Wed, 28 Mar 2007 11:31:21 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/Makefile Message-ID: <200703281631.l2SGVLbk008205@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Integer: Makefile updated: 1.6 -> 1.7 --- Log message: No point running CBE here, it can't handle the integer types. --- Diffs of the changes: (+1 -0) Makefile | 1 + 1 files changed, 1 insertion(+) Index: llvm-test/SingleSource/UnitTests/Integer/Makefile diff -u llvm-test/SingleSource/UnitTests/Integer/Makefile:1.6 llvm-test/SingleSource/UnitTests/Integer/Makefile:1.7 --- llvm-test/SingleSource/UnitTests/Integer/Makefile:1.6 Mon Feb 5 20:54:07 2007 +++ llvm-test/SingleSource/UnitTests/Integer/Makefile Wed Mar 28 11:31:04 2007 @@ -19,6 +19,7 @@ # LLC-BETA, and JIT test cases. This leaves the CBE which can # handle the arbitrary precision integers. +DISABLE_CBE := 1 DISABLE_LLC := 1 DISABLE_JIT := 1 ENABLE_LLI := 1 From reid at x10sys.com Wed Mar 28 11:32:07 2007 From: reid at x10sys.com (Reid Spencer) Date: Wed, 28 Mar 2007 11:32:07 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.cpp bit_concat_cpp.reference_output bit_select_cpp.cpp bit_select_cpp.reference_output part_select_cpp.cpp part_select_cpp.reference_output Message-ID: <200703281632.l2SGW7Fd008241@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Integer: bit_concat_cpp.cpp added (r1.1) bit_concat_cpp.reference_output added (r1.1) bit_select_cpp.cpp added (r1.1) bit_select_cpp.reference_output added (r1.1) part_select_cpp.cpp added (r1.1) part_select_cpp.reference_output added (r1.1) --- Log message: Add new test cases for C++ form of bit builtins --- Diffs of the changes: (+333 -0) bit_concat_cpp.cpp | 62 ++++++++++++++++++++ bit_concat_cpp.reference_output | 119 +++++++++++++++++++++++++++++++++++++++ bit_select_cpp.cpp | 45 ++++++++++++++ bit_select_cpp.reference_output | 2 part_select_cpp.cpp | 57 ++++++++++++++++++ part_select_cpp.reference_output | 48 +++++++++++++++ 6 files changed, 333 insertions(+) Index: llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.cpp diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.cpp:1.1 *** /dev/null Wed Mar 28 11:32:00 2007 --- llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.cpp Wed Mar 28 11:31:50 2007 *************** *** 0 **** --- 1,62 ---- + //===--- part_select.c --- Test The bit_select builtin --------------------===// + // + // This file was developed by Reid Spencer and is distributed under the + // University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This test case tests the __builtin_part_select builtin function llvm-gcc. + // bit_select selects one bit out of a larger + // + //===----------------------------------------------------------------------===// + + #include + #include + + typedef unsigned int __attribute__((bitwidth(17))) BitType1; + typedef unsigned int __attribute__((bitwidth(19))) BitType2; + typedef unsigned long long __attribute__((bitwidth(36))) ConcatType; + int numbits1 = 17; + int numbits2 = 19; + + void printBits(ConcatType val, int numbits ) { + int j; + for (j = numbits; j > 0; --j) { + if (__builtin_bit_select(val, j)) + printf("1"); + else + printf("0"); + } + } + + int main(int argc, char** argv) + { + BitType1 X = 0; + BitType2 Y = 0; + ConcatType Z = 0; + int i, j; + int count = (argc > 1 ? atoi(argv[1]) % 128 : 128); + + srand(count); + + for (i = 0; i < count; i++) { + Y = X = 0; + for (j = 0; j < numbits1; j++) { + X += (rand() % 2 == 0 ? 0 : 1); + X <<= 1; + } + for (j = 0; j < numbits2; j++) { + Y += (rand() % 2 == 0 ? 0 : 1); + Y <<= 1; + } + Z = __builtin_bit_concat(X, Y); + printf("bit_concat("); + printBits(X, numbits1); + printf(","); + printBits(Y, numbits2); + printf(") = "); + printBits(Z, numbits1 + numbits2); + printf("\n"); + } + return 0; + } Index: llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.reference_output diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.reference_output:1.1 *** /dev/null Wed Mar 28 11:32:07 2007 --- llvm-test/SingleSource/UnitTests/Integer/bit_concat_cpp.reference_output Wed Mar 28 11:31:50 2007 *************** *** 0 **** --- 1,119 ---- + bit_concat(00111100000001110,0010011010011011100) = 001111000000011100010011010011011100 + bit_concat(01011110001011010,0000001001101010000) = 010111100010110100000001001101010000 + bit_concat(01001100001011000,0101011010000011010) = 010011000010110000101011010000011010 + bit_concat(00000100110101110,0100100011111011011) = 000001001101011100100100011111011011 + bit_concat(01110100110111110,0100100001100001010) = 011101001101111100100100001100001010 + bit_concat(01000010101001000,0000111111111110111) = 010000101010010000000111111111110111 + bit_concat(01111011100100110,0010101010110011100) = 011110111001001100010101010110011100 + bit_concat(00010000001001001,0010001000110010000) = 000100000010010010010001000110010000 + bit_concat(00100011011111010,0001001100100000101) = 001000110111110100001001100100000101 + bit_concat(01010100111100110,0011011011100011010) = 010101001111001100011011011100011010 + bit_concat(01000110110000101,0111101101000001000) = 010001101100001010111101101000001000 + bit_concat(00011011111011110,0010111101101101100) = 000110111110111100010111101101101100 + bit_concat(01010110001001111,0001111000000001010) = 010101100010011110001111000000001010 + bit_concat(00000111000110001,0010010000101101111) = 000001110001100010010010000101101111 + bit_concat(00010000000100100,0000001111010110001) = 000100000001001000000001111010110001 + bit_concat(01111101011001101,0100101101001100010) = 011111010110011010100101101001100010 + bit_concat(00111101010001000,0001101011111101000) = 001111010100010000001101011111101000 + bit_concat(00001001101011000,0111100010110110111) = 000010011010110000111100010110110111 + bit_concat(01011011111011100,0000011100101110100) = 010110111110111000000011100101110100 + bit_concat(01110011101111110,0011101010111100011) = 011100111011111100011101010111100011 + bit_concat(00000011110111000,0100011100101010110) = 000000111101110000100011100101010110 + bit_concat(00001001101111001,0100110101110101100) = 000010011011110010100110101110101100 + bit_concat(00111110010100101,0100011111000000001) = 001111100101001010100011111000000001 + bit_concat(01010000011010000,0111111100100111101) = 010100000110100000111111100100111101 + bit_concat(00101000000100011,0100110101011111010) = 001010000001000110100110101011111010 + bit_concat(01011100111010011,0100001110001010000) = 010111001110100110100001110001010000 + bit_concat(01000101000101001,0100000101001000000) = 010001010001010010100000101001000000 + bit_concat(01111111011111111,0101000000000101011) = 011111110111111110101000000000101011 + bit_concat(00001001110010000,0001010100001100011) = 000010011100100000001010100001100011 + bit_concat(01010111110100001,0001001100101100110) = 010101111101000010001001100101100110 + bit_concat(00011010010100110,0010010100111001010) = 000110100101001100010010100111001010 + bit_concat(00001001010011011,0111100000100000010) = 000010010100110110111100000100000010 + bit_concat(01110000101011100,0010101101110101110) = 011100001010111000010101101110101110 + bit_concat(01001100000101000,0111100100111101100) = 010011000001010000111100100111101100 + bit_concat(00110100001000111,0110101111001001110) = 001101000010001110110101111001001110 + bit_concat(01011100011111010,0011111000011001000) = 010111000111110100011111000011001000 + bit_concat(00001011100101100,0110110110010010110) = 000010111001011000110110110010010110 + bit_concat(01101111001111010,0110011001110101000) = 011011110011110100110011001110101000 + bit_concat(01000111010100000,0100011101001100100) = 010001110101000000100011101001100100 + bit_concat(01110000000001000,0110011101011000010) = 011100000000010000110011101011000010 + bit_concat(01001000100100010,0000100000001000001) = 010010001001000100000100000001000001 + bit_concat(00111011010010001,0011011110110011010) = 001110110100100010011011110110011010 + bit_concat(00101001011011101,0000010011110110110) = 001010010110111010000010011110110110 + bit_concat(00111010111001001,0010010001111101000) = 001110101110010010010010001111101000 + bit_concat(01010110011101101,0000010100000000010) = 010101100111011010000010100000000010 + bit_concat(00101001111110110,0110010010011111000) = 001010011111101100110010010011111000 + bit_concat(00111000011011111,0111101010110110001) = 001110000110111110111101010110110001 + bit_concat(01110100011101010,0011100101000111111) = 011101000111010100011100101000111111 + bit_concat(01100110010000111,0010110100011010110) = 011001100100001110010110100011010110 + bit_concat(00100110101101001,0101111010000010110) = 001001101011010010101111010000010110 + bit_concat(00001011110001110,0001101100100000001) = 000010111100011100001101100100000001 + bit_concat(01100100010010001,0000000001101011111) = 011001000100100010000000001101011111 + bit_concat(01001000001001011,0100011010111010001) = 010010000010010110100011010111010001 + bit_concat(00011111010100100,0100111000100011000) = 000111110101001000100111000100011000 + bit_concat(01110010001010110,0000011100000001111) = 011100100010101100000011100000001111 + bit_concat(00011100111111001,0101100100001110111) = 000111001111110010101100100001110111 + bit_concat(01100011111010101,0000000001010101001) = 011000111110101010000000001010101001 + bit_concat(01111010100001101,0011111001101100011) = 011110101000011010011111001101100011 + bit_concat(01111001111001001,0110000111110101011) = 011110011110010010110000111110101011 + bit_concat(01010001101010110,0011101111100000000) = 010100011010101100011101111100000000 + bit_concat(00100001001001110,0011101000010010010) = 001000010010011100011101000010010010 + bit_concat(00110010111110101,0010011000000000110) = 001100101111101010010011000000000110 + bit_concat(01010111101111011,0010110110110111101) = 010101111011110110010110110110111101 + bit_concat(01001111110011010,0111000011101001000) = 010011111100110100111000011101001000 + bit_concat(01101010110101011,0111001001100101100) = 011010101101010110111001001100101100 + bit_concat(01100111010010100,0100011011001011111) = 011001110100101000100011011001011111 + bit_concat(00011110100101011,0000100001100100111) = 000111101001010110000100001100100111 + bit_concat(00111111010000011,0100110101000101100) = 001111110100000110100110101000101100 + bit_concat(01110010011011010,0010110110000001011) = 011100100110110100010110110000001011 + bit_concat(00001100000000001,0000010111010011000) = 000011000000000010000010111010011000 + bit_concat(00101101101001001,0101010010110000101) = 001011011010010010101010010110000101 + bit_concat(01011111010011001,0010011010100001111) = 010111110100110010010011010100001111 + bit_concat(00011010110011011,0100110110101011000) = 000110101100110110100110110101011000 + bit_concat(01100111011000001,0000011110000011111) = 011001110110000010000011110000011111 + bit_concat(00111011011101111,0000000011101011111) = 001110110111011110000000011101011111 + bit_concat(00010000101111111,0011101011000100110) = 000100001011111110011101011000100110 + bit_concat(00110001010110100,0000101111110000110) = 001100010101101000000101111110000110 + bit_concat(01111010001011100,0111000000110111100) = 011110100010111000111000000110111100 + bit_concat(01111001111100010,0101010011100011101) = 011110011111000100101010011100011101 + bit_concat(00001110111111101,0110000001011100101) = 000011101111111010110000001011100101 + bit_concat(01110100010101000,0001100111101001011) = 011101000101010000001100111101001011 + bit_concat(01111001100100010,0010100001100110001) = 011110011001000100010100001100110001 + bit_concat(00000011110100001,0000111000011111110) = 000000111101000010000111000011111110 + bit_concat(01110100000101100,0101000110011010101) = 011101000001011000101000110011010101 + bit_concat(00110000100110000,0110111000110000110) = 001100001001100000110111000110000110 + bit_concat(00000001001000101,0101110111100100100) = 000000010010001010101110111100100100 + bit_concat(00100111101111100,0101011011100100111) = 001001111011111000101011011100100111 + bit_concat(00010100010111101,0001110100011111110) = 000101000101111010001110100011111110 + bit_concat(01011000011111110,0101100110001000011) = 010110000111111100101100110001000011 + bit_concat(01010100001000011,0001011110101111101) = 010101000010000110001011110101111101 + bit_concat(00100001010010010,0011011000110010011) = 001000010100100100011011000110010011 + bit_concat(01010010111111100,0100111110111000011) = 010100101111111000100111110111000011 + bit_concat(00101010100101100,0110111011100010110) = 001010101001011000110111011100010110 + bit_concat(00001101010101001,0111101100011001010) = 000011010101010010111101100011001010 + bit_concat(01000010110010001,0101100001110001001) = 010000101100100010101100001110001001 + bit_concat(01011000000101010,0001110110011110111) = 010110000001010100001110110011110111 + bit_concat(01101101001001010,0111011100101100001) = 011011010010010100111011100101100001 + bit_concat(00100011110110010,0011001011000000101) = 001000111101100100011001011000000101 + bit_concat(01001010011001110,0101001001110001000) = 010010100110011100101001001110001000 + bit_concat(01110010010011001,0001110111111111001) = 011100100100110010001110111111111001 + bit_concat(00011010110010000,0110001101001011000) = 000110101100100000110001101001011000 + bit_concat(01010110100111101,0111010011110011000) = 010101101001111010111010011110011000 + bit_concat(00010001011111001,0011011010111111101) = 000100010111110010011011010111111101 + bit_concat(00000011101000010,0000111010100001001) = 000000111010000100000111010100001001 + bit_concat(00010100101110111,0010100101001111101) = 000101001011101110010100101001111101 + bit_concat(00100101110001100,0111001110111001000) = 001001011100011000111001110111001000 + bit_concat(00100000111100010,0010101011111100100) = 001000001111000100010101011111100100 + bit_concat(00001111110100101,0110011101111101000) = 000011111101001010110011101111101000 + bit_concat(01111101011110110,0110010000101000111) = 011111010111101100110010000101000111 + bit_concat(01011100111110101,0010001101000111000) = 010111001111101010010001101000111000 + bit_concat(00010001011111000,0111011010110001011) = 000100010111110000111011010110001011 + bit_concat(00011001111100110,0101110011100000010) = 000110011111001100101110011100000010 + bit_concat(00101011000011001,0111001001101111010) = 001010110000110010111001001101111010 + bit_concat(00101100100011101,0101111000101100001) = 001011001000111010101111000101100001 + bit_concat(00100101110001010,0101111101101001101) = 001001011100010100101111101101001101 + bit_concat(01110101000101111,0101010010100101000) = 011101010001011110101010010100101000 + bit_concat(00110100100011001,0010010100000010101) = 001101001000110010010010100000010101 + bit_concat(01101100000011111,0100110011010101100) = 011011000000111110100110011010101100 + exit 0 Index: llvm-test/SingleSource/UnitTests/Integer/bit_select_cpp.cpp diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/bit_select_cpp.cpp:1.1 *** /dev/null Wed Mar 28 11:32:07 2007 --- llvm-test/SingleSource/UnitTests/Integer/bit_select_cpp.cpp Wed Mar 28 11:31:50 2007 *************** *** 0 **** --- 1,45 ---- + //===--- bit_select.c --- Test The bit_select builtin ---------------------===// + // + // This file was developed by Reid Spencer and is distributed under the + // University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This test case tests the __builtin_bit_select builtin function llvm-gcc. + // bit_select selects one bit out of a larger + // + //===----------------------------------------------------------------------===// + + #include + + #ifdef ENABLE_LARGE_INTEGERS + typedef int __attribute__((bitwidth(250))) BitType; + const BitType X = 0xAAAAAAAAAAAAAAAAULL; + int numbits = 250; + #else + typedef int __attribute__((bitwidth(47))) BitType; + const BitType X = 0xAAAAAAAAAAAAULL; + int numbits = 47; + #endif + + int main(int argc, char** argv) + { + + #ifdef ENABLE_LARGE_INTEGERS + BitType Y = X * X; + #else + BitType Y = X; + #endif + + BitType i; + + for (i = numbits-1; i >= 0; --i) { + if (__builtin_bit_select(Y, i)) + printf("1"); + else + printf("0"); + } + + printf("\n"); + return 0; + } Index: llvm-test/SingleSource/UnitTests/Integer/bit_select_cpp.reference_output diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/bit_select_cpp.reference_output:1.1 *** /dev/null Wed Mar 28 11:32:07 2007 --- llvm-test/SingleSource/UnitTests/Integer/bit_select_cpp.reference_output Wed Mar 28 11:31:50 2007 *************** *** 0 **** --- 1,2 ---- + 01010101010101010101010101010101010101010101010 + exit 0 Index: llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.cpp diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.cpp:1.1 *** /dev/null Wed Mar 28 11:32:07 2007 --- llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.cpp Wed Mar 28 11:31:50 2007 *************** *** 0 **** --- 1,57 ---- + //===--- part_select.c --- Test The bit_select builtin --------------------===// + // + // This file was developed by Reid Spencer and is distributed under the + // University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This test case tests the __builtin_part_select builtin function llvm-gcc. + // bit_select selects one bit out of a larger + // + //===----------------------------------------------------------------------===// + + #include + #include + #include + + #ifdef ENABLE_LARGE_INTEGERS + typedef unsigned __attribute__((bitwidth(256))) BitType; + const BitType X = 0xFEDCBA9876543210ULL; + unsigned numbits = 256; + #else + typedef unsigned __attribute__((bitwidth(47))) BitType; + const BitType X = 0xFEDCBA9876543210ULL; + unsigned numbits = 47; + #endif + + int main(int argc, char** argv) + { + + #ifdef ENABLE_LARGE_INTEGERS + BitType Y = X * X; + #else + BitType Y = X; + #endif + + srand(0); + + unsigned i, j; + + for (i = 0; i < numbits; ++i) { + BitType left = rand() % numbits; + BitType right = i; + printf("part_select(Y, %3u, %3u) = ", (unsigned)left, (unsigned)right); + BitType Z = __builtin_bit_part_select(Y, left, right); + for (j = numbits; j > 0; --j) { + if (__builtin_bit_select(Z, j-1)) + printf("1"); + else + printf("0"); + } + uint64_t val = Z; + printf(" (%lx)", val); + printf("\n"); + } + + return 0; + } Index: llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.reference_output diff -c /dev/null llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.reference_output:1.1 *** /dev/null Wed Mar 28 11:32:07 2007 --- llvm-test/SingleSource/UnitTests/Integer/part_select_cpp.reference_output Wed Mar 28 11:31:50 2007 *************** *** 0 **** --- 1,48 ---- + part_select(Y, 38, 0) = 00000000001100001110110010101000011001000010000 (76543210) + part_select(Y, 4, 1) = 00000000000000000000000000000000000000000001000 (8) + part_select(Y, 18, 2) = 00000000000000000000000000000010000110010000100 (10c84) + part_select(Y, 23, 3) = 00000000000000000000000000010101000011001000010 (a8642) + part_select(Y, 17, 4) = 00000000000000000000000000000000000001100100001 (321) + part_select(Y, 26, 5) = 00000000000000000000000001100101010000110010000 (32a190) + part_select(Y, 16, 6) = 00000000000000000000000000000000000000011001000 (c8) + part_select(Y, 3, 7) = 00000000000000000000000000000000000000000001000 (8) + part_select(Y, 28, 8) = 00000000000000000000000000101100101010000110010 (165432) + part_select(Y, 28, 9) = 00000000000000000000000000010110010101000011001 (b2a19) + part_select(Y, 10, 10) = 00000000000000000000000000000000000000000000000 (0) + part_select(Y, 17, 11) = 00000000000000000000000000000000000000000000110 (6) + part_select(Y, 44, 12) = 00000000000000110101001100001110110010101000011 (a9876543) + part_select(Y, 28, 13) = 00000000000000000000000000000001011001010100001 (b2a1) + part_select(Y, 2, 14) = 00000000000000000000000000000000000010000100110 (426) + part_select(Y, 20, 15) = 00000000000000000000000000000000000000000101000 (28) + part_select(Y, 22, 16) = 00000000000000000000000000000000000000001010100 (54) + part_select(Y, 21, 17) = 00000000000000000000000000000000000000000001010 (a) + part_select(Y, 18, 18) = 00000000000000000000000000000000000000000000001 (1) + part_select(Y, 36, 19) = 00000000000000000000000000000110000111011001010 (30eca) + part_select(Y, 34, 20) = 00000000000000000000000000000000000011101100101 (765) + part_select(Y, 37, 21) = 00000000000000000000000000000001100001110110010 (c3b2) + part_select(Y, 18, 22) = 00000000000000000000000000000000000000000010101 (15) + part_select(Y, 38, 23) = 00000000000000000000000000000000011000011101100 (30ec) + part_select(Y, 20, 24) = 00000000000000000000000000000000000000000010100 (14) + part_select(Y, 1, 25) = 00000000000000000000000001000010011000010101001 (2130a9) + part_select(Y, 31, 26) = 00000000000000000000000000000000000000000011101 (1d) + part_select(Y, 17, 27) = 00000000000000000000000000000000000001010100110 (2a6) + part_select(Y, 20, 28) = 00000000000000000000000000000000000000101001101 (14d) + part_select(Y, 6, 29) = 00000000000000000000000000100110000101010011011 (130a9b) + part_select(Y, 27, 30) = 00000000000000000000000000000000000000000000111 (7) + part_select(Y, 37, 31) = 00000000000000000000000000000000000000000110000 (30) + part_select(Y, 11, 32) = 00000000000000000000000000110000101010011011100 (1854dc) + part_select(Y, 24, 33) = 00000000000000000000000000000000000000110111000 (1b8) + part_select(Y, 39, 34) = 00000000000000000000000000000000000000000100110 (26) + part_select(Y, 7, 35) = 00000000000000000000100110000101010011011100001 (4c2a6e1) + part_select(Y, 3, 36) = 00000000000000100001001100001010100110111000011 (9854dc3) + part_select(Y, 9, 37) = 00000000000000000010011000010101001101110000110 (130a9b86) + part_select(Y, 36, 38) = 00000000000000000000000000000000000000000000100 (4) + part_select(Y, 31, 39) = 00000000000000000000000000000000000000000011001 (19) + part_select(Y, 16, 40) = 00000000000000000000000010101001101110000110010 (54dc32) + part_select(Y, 46, 41) = 00000000000000000000000000000000000000000011101 (1d) + part_select(Y, 27, 42) = 00000000000000000000000000000000111000011001010 (70ca) + part_select(Y, 13, 43) = 00000000000000001000010101001101110000110010101 (42a6e195) + part_select(Y, 6, 44) = 00000000000100110000101010011011100001100101011 (854dc32b) + part_select(Y, 9, 45) = 00000000001001100001010100110111000011001010111 (a9b8657) + part_select(Y, 13, 46) = 00000000000001000010101001101110000110010101110 (15370cae) + exit 0 From llvm at cs.uiuc.edu Wed Mar 28 11:34:16 2007 From: llvm at cs.uiuc.edu (LLVM) Date: Wed, 28 Mar 2007 11:34:16 -0500 Subject: [llvm-commits] CVS: llvm-test/SingleSource/UnitTests/Integer/APInt/.cvsignore Makefile arith.cpp bigint.cpp bitlogic.cpp convert.cpp gptest.cpp sign.cpp to_string.cpp Message-ID: <200703281634.l2SGYGw0008297@zion.cs.uiuc.edu> Changes in directory llvm-test/SingleSource/UnitTests/Integer/APInt: .cvsignore (r1.1) removed Makefile (r1.4) removed arith.cpp (r1.12) removed bigint.cpp (r1.3) removed bitlogic.cpp (r1.2) removed convert.cpp (r1.1) removed gptest.cpp (r1.11) removed sign.cpp (r1.3) removed to_string.cpp (r1.1) removed --- Log message: APInt is working satisfactorily, no need to keep these tests. --- Diffs of the changes: (+0 -0) 0 files changed From llvm at cs.uiuc.edu Wed Mar 28 11:59:36 2007 From: llvm at cs.uiuc.edu (LLVM) Date: Wed, 28 Mar 2007 11:59:36 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/CellSPU/ Message-ID: <200703281659.l2SGxaRs009032@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CellSPU: --- Log message: Directory /var/cvs/llvm/llvm/lib/Target/CellSPU added to the repository --- Diffs of the changes: (+0 -0) 0 files changed From scottm at aero.org Wed Mar 28 12:05:01 2007 From: scottm at aero.org (Scott Michel) Date: Wed, 28 Mar 2007 12:05:01 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/CellSPU/README.txt Message-ID: <200703281705.l2SH511n009196@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CellSPU: README.txt added (r1.1) --- Log message: First test check-in. --- Diffs of the changes: (+10 -0) README.txt | 10 ++++++++++ 1 files changed, 10 insertions(+) Index: llvm/lib/Target/CellSPU/README.txt diff -c /dev/null llvm/lib/Target/CellSPU/README.txt:1.1 *** /dev/null Wed Mar 28 12:04:53 2007 --- llvm/lib/Target/CellSPU/README.txt Wed Mar 28 12:04:43 2007 *************** *** 0 **** --- 1,10 ---- + //===- README.txt - Notes for improving CellSPU-specific code gen ---------===// + + TODO: + * Check in the actual code. + + ===-------------------------------------------------------------------------=== + + Note: The CellSPU work is work-in-progress and "alpha" quality code. No code + has been officially checked into the llvm repo, but this will happen Real Soon, + Real Soon Now. From sabre at nondot.org Wed Mar 28 12:27:09 2007 From: sabre at nondot.org (Chris Lattner) Date: Wed, 28 Mar 2007 12:27:09 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/README-X86-64.txt Message-ID: <200703281727.l2SHR96v009556@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: README-X86-64.txt updated: 1.3 -> 1.4 --- Log message: Dan pointed out that this is done, remove it! --- Diffs of the changes: (+0 -21) README-X86-64.txt | 21 --------------------- 1 files changed, 21 deletions(-) Index: llvm/lib/Target/X86/README-X86-64.txt diff -u llvm/lib/Target/X86/README-X86-64.txt:1.3 llvm/lib/Target/X86/README-X86-64.txt:1.4 --- llvm/lib/Target/X86/README-X86-64.txt:1.3 Tue Dec 5 13:50:18 2006 +++ llvm/lib/Target/X86/README-X86-64.txt Wed Mar 28 12:26:52 2007 @@ -30,27 +30,6 @@ //===---------------------------------------------------------------------===// -For this: - -int test(int a) -{ - return a * 3; -} - -We generates - leal (%edi,%edi,2), %eax - -We should be generating - leal (%rdi,%rdi,2), %eax - -instead. The later form does not require an address-size prefix 67H. - -It's probably ok to simply emit the corresponding 64-bit super class registers -in this case? - - -//===---------------------------------------------------------------------===// - AMD64 Optimization Manual 8.2 has some nice information about optimizing integer multiplication by a constant. How much of it applies to Intel's X86-64 implementation? There are definite trade-offs to consider: latency vs. register From zhousheng00 at gmail.com Wed Mar 28 12:38:38 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Wed, 28 Mar 2007 12:38:38 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703281738.l2SHcce6009773@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.704 -> 1.705 --- Log message: Avoid unnecessary APInt construction. --- Diffs of the changes: (+2 -3) InstructionCombining.cpp | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.704 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.705 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.704 Wed Mar 28 10:02:20 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Mar 28 12:38:21 2007 @@ -734,11 +734,10 @@ // If the sign bit of the input is known set or clear, then we know the // top bits of the result. - APInt NewBits(APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth)); if (KnownZero[SrcBitWidth-1]) // Input sign bit known zero - KnownZero |= NewBits; + KnownZero |= APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth); else if (KnownOne[SrcBitWidth-1]) // Input sign bit known set - KnownOne |= NewBits; + KnownOne |= APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth); return; } case Instruction::Shl: From sabre at nondot.org Wed Mar 28 13:03:31 2007 From: sabre at nondot.org (Chris Lattner) Date: Wed, 28 Mar 2007 13:03:31 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/lea-3.ll mul-shift-reassoc.ll Message-ID: <200703281803.l2SI3VgE010220@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: lea-3.ll added (r1.1) mul-shift-reassoc.ll updated: 1.2 -> 1.3 --- Log message: new testcase --- Diffs of the changes: (+8 -1) lea-3.ll | 7 +++++++ mul-shift-reassoc.ll | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) Index: llvm/test/CodeGen/X86/lea-3.ll diff -c /dev/null llvm/test/CodeGen/X86/lea-3.ll:1.1 *** /dev/null Wed Mar 28 13:03:24 2007 --- llvm/test/CodeGen/X86/lea-3.ll Wed Mar 28 13:03:14 2007 *************** *** 0 **** --- 1,7 ---- + ; RUN: llvm-as < %s | llc -march=x86-64 | grep 'leal (%rdi,%rdi,2), %eax' + + define i32 @test(i32 %a) { + %tmp2 = mul i32 %a, 3 ; [#uses=1] + ret i32 %tmp2 + } + Index: llvm/test/CodeGen/X86/mul-shift-reassoc.ll diff -u llvm/test/CodeGen/X86/mul-shift-reassoc.ll:1.2 llvm/test/CodeGen/X86/mul-shift-reassoc.ll:1.3 --- llvm/test/CodeGen/X86/mul-shift-reassoc.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/mul-shift-reassoc.ll Wed Mar 28 13:03:14 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep lea +; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep lea && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | not grep add int %test(int %X, int %Y) { From sabre at nondot.org Wed Mar 28 13:11:35 2007 From: sabre at nondot.org (Chris Lattner) Date: Wed, 28 Mar 2007 13:11:35 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/lea-3.ll Message-ID: <200703281811.l2SIBZ6m010462@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: lea-3.ll updated: 1.1 -> 1.2 --- Log message: new testcases --- Diffs of the changes: (+14 -1) lea-3.ll | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletion(-) Index: llvm/test/CodeGen/X86/lea-3.ll diff -u llvm/test/CodeGen/X86/lea-3.ll:1.1 llvm/test/CodeGen/X86/lea-3.ll:1.2 --- llvm/test/CodeGen/X86/lea-3.ll:1.1 Wed Mar 28 13:03:14 2007 +++ llvm/test/CodeGen/X86/lea-3.ll Wed Mar 28 13:11:17 2007 @@ -1,7 +1,20 @@ -; RUN: llvm-as < %s | llc -march=x86-64 | grep 'leal (%rdi,%rdi,2), %eax' +; RUN: llvm-as < %s | llc -march=x86-64 | grep 'leal (%rdi,%rdi,2), %eax' && define i32 @test(i32 %a) { %tmp2 = mul i32 %a, 3 ; [#uses=1] ret i32 %tmp2 } +; RUN: llvm-as < %s | llc -march=x86-64 | grep 'leaq (,%rdi,4), %rax' +define i64 @test2(i64 %a) { + %tmp2 = shl i64 %a, 2 + %tmp3 = or i64 %tmp2, %a + ret i64 %tmp3 +} + +;; TODO! LEA instead of shift + copy. +define i64 @test3(i64 %a) { + %tmp2 = shl i64 %a, 3 + ret i64 %tmp2 +} + From sabre at nondot.org Wed Mar 28 13:12:48 2007 From: sabre at nondot.org (Chris Lattner) Date: Wed, 28 Mar 2007 13:12:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.cpp Message-ID: <200703281812.l2SICmC1010518@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86InstrInfo.cpp updated: 1.80 -> 1.81 --- Log message: Compile CodeGen/X86/lea-3.ll:test2 to: _test3: leaq (,%rdi,4), %rax orq %rdi, %rax ret instead of: _test2: movq %rdi, %rax shlq $2, %rax orq %rdi, %rax ret --- Diffs of the changes: (+13 -0) X86InstrInfo.cpp | 13 +++++++++++++ 1 files changed, 13 insertions(+) Index: llvm/lib/Target/X86/X86InstrInfo.cpp diff -u llvm/lib/Target/X86/X86InstrInfo.cpp:1.80 llvm/lib/Target/X86/X86InstrInfo.cpp:1.81 --- llvm/lib/Target/X86/X86InstrInfo.cpp:1.80 Tue Mar 27 19:58:40 2007 +++ llvm/lib/Target/X86/X86InstrInfo.cpp Wed Mar 28 13:12:31 2007 @@ -149,6 +149,19 @@ NewMI = BuildMI(get(X86::PSHUFDri), A).addReg(B).addImm(M); break; } + case X86::SHL64ri: { + assert(MI->getNumOperands() == 3 && "Unknown shift instruction!"); + // NOTE: LEA doesn't produce flags like shift does, but LLVM never uses + // the flags produced by a shift yet, so this is safe. + unsigned Dest = MI->getOperand(0).getReg(); + unsigned Src = MI->getOperand(1).getReg(); + unsigned ShAmt = MI->getOperand(2).getImm(); + if (ShAmt == 0 || ShAmt >= 4) return 0; + + NewMI = BuildMI(get(X86::LEA64r), Dest) + .addReg(0).addImm(1 << ShAmt).addReg(Src).addImm(0); + break; + } case X86::SHL32ri: { assert(MI->getNumOperands() == 3 && "Unknown shift instruction!"); // NOTE: LEA doesn't produce flags like shift does, but LLVM never uses From sabre at nondot.org Wed Mar 28 13:17:36 2007 From: sabre at nondot.org (Chris Lattner) Date: Wed, 28 Mar 2007 13:17:36 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/README.txt Message-ID: <200703281817.l2SIHawU010628@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: README.txt updated: 1.159 -> 1.160 --- Log message: add a note --- Diffs of the changes: (+8 -0) README.txt | 8 ++++++++ 1 files changed, 8 insertions(+) Index: llvm/lib/Target/X86/README.txt diff -u llvm/lib/Target/X86/README.txt:1.159 llvm/lib/Target/X86/README.txt:1.160 --- llvm/lib/Target/X86/README.txt:1.159 Wed Mar 21 16:16:39 2007 +++ llvm/lib/Target/X86/README.txt Wed Mar 28 13:17:19 2007 @@ -23,6 +23,14 @@ //===---------------------------------------------------------------------===// +CodeGen/X86/lea-3.ll:test3 should be a single LEA, not a shift/move. The X86 +backend knows how to three-addressify this shift, but it appears the register +allocator isn't even asking it to do so in this case. We should investigate +why this isn't happening, it could have significant impact on other important +cases for X86 as well. + +//===---------------------------------------------------------------------===// + This should be one DIV/IDIV instruction, not a libcall: unsigned test(unsigned long long X, unsigned Y) { From sabre at nondot.org Wed Mar 28 13:28:14 2007 From: sabre at nondot.org (Chris Lattner) Date: Wed, 28 Mar 2007 13:28:14 -0500 Subject: [llvm-commits] CVS: llvm/docs/ProgrammersManual.html Message-ID: <200703281828.l2SISEPF010824@zion.cs.uiuc.edu> Changes in directory llvm/docs: ProgrammersManual.html updated: 1.129 -> 1.130 --- Log message: Stop using the foo HTML tag :) --- Diffs of the changes: (+3 -3) ProgrammersManual.html | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/docs/ProgrammersManual.html diff -u llvm/docs/ProgrammersManual.html:1.129 llvm/docs/ProgrammersManual.html:1.130 --- llvm/docs/ProgrammersManual.html:1.129 Thu Mar 1 19:31:31 2007 +++ llvm/docs/ProgrammersManual.html Wed Mar 28 13:27:57 2007 @@ -803,7 +803,7 @@
     for ( ... ) {
    -   std::vector V;
    +   std::vector<foo> V;
        use V;
     }
     
    @@ -813,7 +813,7 @@
    -std::vector V;
    +std::vector<foo> V;
     for ( ... ) {
        use V;
        V.clear();
    @@ -3060,7 +3060,7 @@
       Dinakar Dhurjati and
       Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2007/03/02 01:31:31 $ + Last modified: $Date: 2007/03/28 18:27:57 $ From asl at math.spbu.ru Wed Mar 28 13:36:50 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Wed, 28 Mar 2007 13:36:50 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200703281836.l2SIaoie010976@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.146 -> 1.147 --- Log message: Don't allow MatchAddress recurse too much. This trims exponential behaviour in some cases. --- Diffs of the changes: (+14 -6) X86ISelDAGToDAG.cpp | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.146 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.147 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.146 Tue Mar 20 01:08:29 2007 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Mar 28 13:36:33 2007 @@ -140,7 +140,8 @@ private: SDNode *Select(SDOperand N); - bool MatchAddress(SDOperand N, X86ISelAddressMode &AM, bool isRoot = true); + bool MatchAddress(SDOperand N, X86ISelAddressMode &AM, + bool isRoot = true,unsigned Depth = 0); bool SelectAddr(SDOperand Op, SDOperand N, SDOperand &Base, SDOperand &Scale, SDOperand &Index, SDOperand &Disp); bool SelectLEAAddr(SDOperand Op, SDOperand N, SDOperand &Base, @@ -561,7 +562,14 @@ /// returning true if it cannot be done. This just pattern matches for the /// addressing mode bool X86DAGToDAGISel::MatchAddress(SDOperand N, X86ISelAddressMode &AM, - bool isRoot) { + bool isRoot, unsigned Depth) { + if (Depth > 5) { + // Default, generate it as a register. + AM.BaseType = X86ISelAddressMode::RegBase; + AM.Base.Reg = N; + return false; + } + // RIP relative addressing: %rip + 32-bit displacement! if (AM.isRIPRel) { if (!AM.ES && AM.JT != -1 && N.getOpcode() == ISD::Constant) { @@ -711,12 +719,12 @@ case ISD::ADD: if (!Available) { X86ISelAddressMode Backup = AM; - if (!MatchAddress(N.Val->getOperand(0), AM, false) && - !MatchAddress(N.Val->getOperand(1), AM, false)) + if (!MatchAddress(N.Val->getOperand(0), AM, false, Depth+1) && + !MatchAddress(N.Val->getOperand(1), AM, false, Depth+1)) return false; AM = Backup; - if (!MatchAddress(N.Val->getOperand(1), AM, false) && - !MatchAddress(N.Val->getOperand(0), AM, false)) + if (!MatchAddress(N.Val->getOperand(1), AM, false, Depth+1) && + !MatchAddress(N.Val->getOperand(0), AM, false, Depth+1)) return false; AM = Backup; } From asl at math.spbu.ru Wed Mar 28 13:38:51 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Wed, 28 Mar 2007 13:38:51 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200703281838.l2SIcpNH011025@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.147 -> 1.148 --- Log message: Oops :) --- Diffs of the changes: (+1 -1) X86ISelDAGToDAG.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.147 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.148 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.147 Wed Mar 28 13:36:33 2007 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Mar 28 13:38:33 2007 @@ -141,7 +141,7 @@ SDNode *Select(SDOperand N); bool MatchAddress(SDOperand N, X86ISelAddressMode &AM, - bool isRoot = true,unsigned Depth = 0); + bool isRoot = true, unsigned Depth = 0); bool SelectAddr(SDOperand Op, SDOperand N, SDOperand &Base, SDOperand &Scale, SDOperand &Index, SDOperand &Disp); bool SelectLEAAddr(SDOperand Op, SDOperand N, SDOperand &Base, From isanbard at gmail.com Wed Mar 28 14:07:51 2007 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 28 Mar 2007 14:07:51 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/README-SSE.txt Message-ID: <200703281907.l2SJ7pnj011632@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: README-SSE.txt updated: 1.16 -> 1.17 --- Log message: Made this into a bug report: PR1286: http://llvm.org/PR1286 --- Diffs of the changes: (+0 -40) README-SSE.txt | 40 ---------------------------------------- 1 files changed, 40 deletions(-) Index: llvm/lib/Target/X86/README-SSE.txt diff -u llvm/lib/Target/X86/README-SSE.txt:1.16 llvm/lib/Target/X86/README-SSE.txt:1.17 --- llvm/lib/Target/X86/README-SSE.txt:1.16 Thu Mar 22 13:42:45 2007 +++ llvm/lib/Target/X86/README-SSE.txt Wed Mar 28 14:07:34 2007 @@ -572,43 +572,3 @@ ret //===---------------------------------------------------------------------===// - -We should compile this: - -#include - -void foo(__m128i *A, __m128i *B) { - *A = _mm_sll_epi16 (*A, *B); -} - -to: - -_foo: - subl $12, %esp - movl 16(%esp), %edx - movl 20(%esp), %eax - movdqa (%edx), %xmm1 - movdqa (%eax), %xmm0 - psllw %xmm0, %xmm1 - movdqa %xmm1, (%edx) - addl $12, %esp - ret - -not: - -_foo: - movl 8(%esp), %eax - movdqa (%eax), %xmm0 - #IMPLICIT_DEF %eax - pinsrw $2, %eax, %xmm0 - xorl %ecx, %ecx - pinsrw $3, %ecx, %xmm0 - pinsrw $4, %eax, %xmm0 - pinsrw $5, %ecx, %xmm0 - pinsrw $6, %eax, %xmm0 - pinsrw $7, %ecx, %xmm0 - movl 4(%esp), %eax - movdqa (%eax), %xmm1 - psllw %xmm0, %xmm1 - movdqa %xmm1, (%eax) - ret From jeffc at jolt-lang.org Wed Mar 28 15:28:08 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Wed, 28 Mar 2007 15:28:08 -0500 Subject: [llvm-commits] CVS: llvm/docs/GettingStartedVS.html Message-ID: <200703282028.l2SKS8qN013065@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStartedVS.html updated: 1.8 -> 1.9 --- Log message: Update to current situation. --- Diffs of the changes: (+13 -3) GettingStartedVS.html | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) Index: llvm/docs/GettingStartedVS.html diff -u llvm/docs/GettingStartedVS.html:1.8 llvm/docs/GettingStartedVS.html:1.9 --- llvm/docs/GettingStartedVS.html:1.8 Fri Feb 9 09:59:08 2007 +++ llvm/docs/GettingStartedVS.html Wed Mar 28 15:27:51 2007 @@ -258,7 +258,7 @@
  • Next, compile the C file into a LLVM bytecode file:

    -

    % llvm-gcc hello.c -emit-llvm -o hello.bc

    +

    % llvm-gcc -c hello.c -emit-llvm -o hello.bc

    This will create the result file hello.bc which is the LLVM bytecode that corresponds the the compiled program and the library @@ -267,12 +267,17 @@ optimize or analyze it further with the opt tool, etc.

    Note: while you cannot do this step on Windows, you can do it on a - Unix system and transfer hello.bc to Windows.

  • + Unix system and transfer hello.bc to Windows. Important: + transfer as a binary file!

  • Run the program using the just-in-time compiler:

    % lli hello.bc

  • +

    Note: this will only work for trivial C programs. Non-trivial programs + (and any C++ program) will have dependencies on the GCC runtime that + won't be satisfied by the Microsoft runtime libraries.

    +
  • Use the llvm-dis utility to take a look at the LLVM assembly code:

    @@ -286,6 +291,11 @@

    % cl hello.cbe.c

  • +

    Note: this will only work for trivial C programs. Non-trivial programs + (and any C++ program) will have dependencies on the GCC runtime that + won't be satisfied by the Microsoft runtime libraries. Currently, it + doesn't even work for trivial C programs such as the one above.

    +
  • Execute the native code program:

    % hello.cbe.exe

  • @@ -342,7 +352,7 @@ Jeff Cohen
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2007/02/09 15:59:08 $ + Last modified: $Date: 2007/03/28 20:27:51 $ From jeffc at jolt-lang.org Wed Mar 28 18:08:54 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Wed, 28 Mar 2007 18:08:54 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/CBackend.cpp Message-ID: <200703282308.l2SN8s2x016073@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: CBackend.cpp updated: 1.329 -> 1.330 --- Log message: Fix C Backend to generate code that works with Microsoft C for the benefit of front ends that do not depend on the GCC runtime (someday...). --- Diffs of the changes: (+4 -1) CBackend.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/lib/Target/CBackend/CBackend.cpp diff -u llvm/lib/Target/CBackend/CBackend.cpp:1.329 llvm/lib/Target/CBackend/CBackend.cpp:1.330 --- llvm/lib/Target/CBackend/CBackend.cpp:1.329 Sat Mar 3 10:33:33 2007 +++ llvm/lib/Target/CBackend/CBackend.cpp Wed Mar 28 18:08:37 2007 @@ -1293,7 +1293,10 @@ << "#define alloca(x) __builtin_alloca(x)\n" << "#elif defined(__FreeBSD__) || defined(__OpenBSD__)\n" << "#define alloca(x) __builtin_alloca(x)\n" - << "#elif !defined(_MSC_VER)\n" + << "#elif defined(_MSC_VER)\n" + << "#define inline\n" + << "#define alloca(x) _alloca(x)\n" + << "#else\n" << "#include \n" << "#endif\n\n"; From jeffc at jolt-lang.org Wed Mar 28 19:24:57 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Wed, 28 Mar 2007 19:24:57 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Applications/SPASS/stringsx.h dfgparser.c flags.c options.c strings.c symbol.h top.c strings.h Message-ID: <200703290024.l2T0OvoV017399@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Applications/SPASS: stringsx.h added (r1.1) dfgparser.c updated: 1.1 -> 1.2 flags.c updated: 1.1 -> 1.2 options.c updated: 1.1 -> 1.2 strings.c updated: 1.1 -> 1.2 symbol.h updated: 1.1 -> 1.2 top.c updated: 1.1 -> 1.2 strings.h (r1.1) removed --- Log message: The header file strings.h was overriding the POSIX-defined header file strings.h supplied by FreeBSD. Fixed by renaming it. --- Diffs of the changes: (+108 -20) dfgparser.c | 2 - flags.c | 8 ++--- options.c | 6 ++-- strings.c | 8 ++--- stringsx.h | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ symbol.h | 8 ++--- top.c | 8 ++--- 7 files changed, 108 insertions(+), 20 deletions(-) Index: llvm-test/MultiSource/Applications/SPASS/stringsx.h diff -c /dev/null llvm-test/MultiSource/Applications/SPASS/stringsx.h:1.1 *** /dev/null Wed Mar 28 19:24:50 2007 --- llvm-test/MultiSource/Applications/SPASS/stringsx.h Wed Mar 28 19:24:40 2007 *************** *** 0 **** --- 1,88 ---- + /**************************************************************/ + /* ********************************************************** */ + /* * * */ + /* * STRING HANDLING * */ + /* * * */ + /* * $Module: STRINGS * */ + /* * * */ + /* * Copyright (C) 1999, 2000, 2001 MPI fuer Informatik * */ + /* * * */ + /* * This program is free software; you can redistribute * */ + /* * it and/or modify it under the terms of the GNU * */ + /* * General Public License as published by the Free * */ + /* * Software Foundation; either version 2 of the License, * */ + /* * or (at your option) any later version. * */ + /* * * */ + /* * This program is distributed in the hope that it will * */ + /* * be useful, but WITHOUT ANY WARRANTY; without even * */ + /* * the implied warranty of MERCHANTABILITY or FITNESS * */ + /* * FOR A PARTICULAR PURPOSE. See the GNU General Public * */ + /* * License for more details. * */ + /* * * */ + /* * You should have received a copy of the GNU General * */ + /* * Public License along with this program; if not, write * */ + /* * to the Free Software Foundation, Inc., 59 Temple * */ + /* * Place, Suite 330, Boston, MA 02111-1307 USA * */ + /* * * */ + /* * * */ + /* $Revision: 1.1 $ * */ + /* $State: Exp $ * */ + /* $Date: 2007/03/29 00:24:40 $ * */ + /* $Author: jeffc $ * */ + /* * * */ + /* * Contact: * */ + /* * Christoph Weidenbach * */ + /* * MPI fuer Informatik * */ + /* * Stuhlsatzenhausweg 85 * */ + /* * 66123 Saarbruecken * */ + /* * Email: weidenb at mpi-sb.mpg.de * */ + /* * Germany * */ + /* * * */ + /* ********************************************************** */ + /**************************************************************/ + + + /* $RCSfile: stringsx.h,v $ */ + + #ifndef _STRINGS_ + #define _STRINGS_ + + /**************************************************************/ + /* Includes */ + /**************************************************************/ + + #include + #include "memory.h" + + + /**************************************************************/ + /* Functions */ + /**************************************************************/ + + #ifdef __cplusplus + extern "C" { + #endif + + static __inline__ BOOL string_Equal(const char* S1, const char* S2) + { + return strcmp(S1, S2) == 0; + } + + + BOOL string_StringIsNumber(const char*); + char* string_StringCopy(const char*); + void string_StringFree(char*); + char* string_IntToString(int); + BOOL string_StringToInt(const char*, BOOL, int*); + char* string_Conc(const char*, const char*); + char* string_Nconc(char*, char*); + char* string_EmptyString(void); + char* string_Prefix(const char*, int); + char* string_Suffix(const char*, int); + char** string_Tokens(char*, int*); + + #ifdef __cplusplus + } + #endif + + #endif Index: llvm-test/MultiSource/Applications/SPASS/dfgparser.c diff -u llvm-test/MultiSource/Applications/SPASS/dfgparser.c:1.1 llvm-test/MultiSource/Applications/SPASS/dfgparser.c:1.2 --- llvm-test/MultiSource/Applications/SPASS/dfgparser.c:1.1 Sun Apr 24 23:10:28 2005 +++ llvm-test/MultiSource/Applications/SPASS/dfgparser.c Wed Mar 28 19:24:40 2007 @@ -196,7 +196,7 @@ #include "symbol.h" #include "term.h" #include "foldfg.h" -#include "strings.h" +#include "stringsx.h" /* Used for the texts from description section. */ typedef struct { Index: llvm-test/MultiSource/Applications/SPASS/flags.c diff -u llvm-test/MultiSource/Applications/SPASS/flags.c:1.1 llvm-test/MultiSource/Applications/SPASS/flags.c:1.2 --- llvm-test/MultiSource/Applications/SPASS/flags.c:1.1 Sun Apr 24 23:10:28 2005 +++ llvm-test/MultiSource/Applications/SPASS/flags.c Wed Mar 28 19:24:40 2007 @@ -26,10 +26,10 @@ /* * Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * * */ /* * * */ -/* $Revision: 1.1 $ * */ +/* $Revision: 1.2 $ * */ /* $State: Exp $ * */ -/* $Date: 2005/04/25 04:10:28 $ * */ -/* $Author: duraid $ * */ +/* $Date: 2007/03/29 00:24:40 $ * */ +/* $Author: jeffc $ * */ /* * * */ /* * Contact: * */ /* * Christoph Weidenbach * */ @@ -50,7 +50,7 @@ #include "flags.h" #include "misc.h" -#include "strings.h" +#include "stringsx.h" /**************************************************************/ /* Global Declarations */ Index: llvm-test/MultiSource/Applications/SPASS/options.c diff -u llvm-test/MultiSource/Applications/SPASS/options.c:1.1 llvm-test/MultiSource/Applications/SPASS/options.c:1.2 --- llvm-test/MultiSource/Applications/SPASS/options.c:1.1 Sun Apr 24 23:10:28 2005 +++ llvm-test/MultiSource/Applications/SPASS/options.c Wed Mar 28 19:24:40 2007 @@ -25,9 +25,9 @@ /* * to the Free Software Foundation, Inc., 59 Temple * */ /* * Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * * */ -/* $Revision: 1.1 $ * */ +/* $Revision: 1.2 $ * */ /* $State: Exp $ * */ -/* $Date: 2005/04/25 04:10:28 $ * */ +/* $Date: 2007/03/29 00:24:40 $ * */ /* * * */ /* * Contact: * */ /* * Christoph Weidenbach * */ @@ -100,7 +100,7 @@ ************************************************************************/ #include "options.h" -#include "strings.h" +#include "stringsx.h" /**************************************************************/ /* Local variables and types */ Index: llvm-test/MultiSource/Applications/SPASS/strings.c diff -u llvm-test/MultiSource/Applications/SPASS/strings.c:1.1 llvm-test/MultiSource/Applications/SPASS/strings.c:1.2 --- llvm-test/MultiSource/Applications/SPASS/strings.c:1.1 Sun Apr 24 23:10:28 2005 +++ llvm-test/MultiSource/Applications/SPASS/strings.c Wed Mar 28 19:24:40 2007 @@ -25,10 +25,10 @@ /* * Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * * */ /* * * */ -/* $Revision: 1.1 $ * */ +/* $Revision: 1.2 $ * */ /* $State: Exp $ * */ -/* $Date: 2005/04/25 04:10:28 $ * */ -/* $Author: duraid $ * */ +/* $Date: 2007/03/29 00:24:40 $ * */ +/* $Author: jeffc $ * */ /* * * */ /* * Contact: * */ /* * Christoph Weidenbach * */ @@ -49,7 +49,7 @@ /**************************************************************/ #include -#include "strings.h" +#include "stringsx.h" #include "list.h" /**************************************************************/ Index: llvm-test/MultiSource/Applications/SPASS/symbol.h diff -u llvm-test/MultiSource/Applications/SPASS/symbol.h:1.1 llvm-test/MultiSource/Applications/SPASS/symbol.h:1.2 --- llvm-test/MultiSource/Applications/SPASS/symbol.h:1.1 Sun Apr 24 23:10:28 2005 +++ llvm-test/MultiSource/Applications/SPASS/symbol.h Wed Mar 28 19:24:40 2007 @@ -26,10 +26,10 @@ /* * Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * * */ /* * * */ -/* $Revision: 1.1 $ * */ +/* $Revision: 1.2 $ * */ /* $State: Exp $ * */ -/* $Date: 2005/04/25 04:10:28 $ * */ -/* $Author: duraid $ * */ +/* $Date: 2007/03/29 00:24:40 $ * */ +/* $Author: jeffc $ * */ /* * * */ /* * Contact: * */ /* * Christoph Weidenbach * */ @@ -54,7 +54,7 @@ /**************************************************************/ #include "list.h" -#include "strings.h" +#include "stringsx.h" /**************************************************************/ /* Data Structures and Constants */ Index: llvm-test/MultiSource/Applications/SPASS/top.c diff -u llvm-test/MultiSource/Applications/SPASS/top.c:1.1 llvm-test/MultiSource/Applications/SPASS/top.c:1.2 --- llvm-test/MultiSource/Applications/SPASS/top.c:1.1 Sun Apr 24 23:10:28 2005 +++ llvm-test/MultiSource/Applications/SPASS/top.c Wed Mar 28 19:24:40 2007 @@ -26,10 +26,10 @@ /* * Place, Suite 330, Boston, MA 02111-1307 USA * */ /* * * */ /* * * */ -/* $Revision: 1.1 $ * */ +/* $Revision: 1.2 $ * */ /* $State: Exp $ * */ -/* $Date: 2005/04/25 04:10:28 $ * */ -/* $Author: duraid $ * */ +/* $Date: 2007/03/29 00:24:40 $ * */ +/* $Author: jeffc $ * */ /* * * */ /* * Contact: * */ /* * Christoph Weidenbach * */ @@ -62,7 +62,7 @@ #include "rules-red.h" #include "analyze.h" #include "clock.h" -#include "strings.h" +#include "stringsx.h" #include "options.h" #include "context.h" #include "cnf.h" From zhousheng00 at gmail.com Wed Mar 28 20:57:39 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Wed, 28 Mar 2007 20:57:39 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703290157.l2T1vdHL018933@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.705 -> 1.706 --- Log message: 1. Make the APInt variable do the binary operation stuff if possible instead of using ConstantExpr::getXX. 2. Use constant reference to APInt if possible instead of expensive APInt copy. --- Diffs of the changes: (+5 -3) InstructionCombining.cpp | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.705 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.706 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.705 Wed Mar 28 12:38:21 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Mar 28 20:57:21 2007 @@ -540,8 +540,10 @@ if (I->getOpcode() == Instruction::Shl) if ((CST = dyn_cast(I->getOperand(1)))) { // The multiplier is really 1 << CST. - Constant *One = ConstantInt::get(V->getType(), 1); - CST = cast(ConstantExpr::getShl(One, CST)); + uint32_t BitWidth = cast(V->getType())->getBitWidth(); + uint32_t CSTVal = CST->getValue().getActiveBits() > 64 ? + BitWidth : CST->getZExtValue(); + CST = ConstantInt::get(APInt(BitWidth, 1).shl(CSTVal)); return I->getOperand(0); } } @@ -2264,7 +2266,7 @@ if (CI->isAllOnesValue()) // X * -1 == 0 - X return BinaryOperator::createNeg(Op0, I.getName()); - APInt Val(cast(CI)->getValue()); + const APInt& Val = cast(CI)->getValue(); if (Val.isPowerOf2()) { // Replace X*(2^C) with X << C return BinaryOperator::createShl(Op0, ConstantInt::get(Op0->getType(), Val.logBase2())); From zhousheng00 at gmail.com Wed Mar 28 21:26:47 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Wed, 28 Mar 2007 21:26:47 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703290226.l2T2QlRm019396@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.706 -> 1.707 --- Log message: Clean up codes in InstCombiner::SimplifyDemandedBits(): 1. Line out nested call of APInt::zext/trunc. 2. Make more use of APInt::getHighBitsSet/getLowBitsSet. 3. Use APInt[] operator instead of expression like "APIntVal & SignBit". --- Diffs of the changes: (+35 -32) InstructionCombining.cpp | 67 ++++++++++++++++++++++++----------------------- 1 files changed, 35 insertions(+), 32 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.706 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.707 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.706 Wed Mar 28 20:57:21 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Mar 28 21:26:30 2007 @@ -1106,8 +1106,11 @@ case Instruction::Trunc: { uint32_t truncBf = cast(I->getOperand(0)->getType())->getBitWidth(); - if (SimplifyDemandedBits(I->getOperand(0), DemandedMask.zext(truncBf), - RHSKnownZero.zext(truncBf), RHSKnownOne.zext(truncBf), Depth+1)) + DemandedMask.zext(truncBf); + RHSKnownZero.zext(truncBf); + RHSKnownOne.zext(truncBf); + if (SimplifyDemandedBits(I->getOperand(0), DemandedMask, + RHSKnownZero, RHSKnownOne, Depth+1)) return true; DemandedMask.trunc(BitWidth); RHSKnownZero.trunc(BitWidth); @@ -1130,12 +1133,14 @@ // Compute the bits in the result that are not present in the input. const IntegerType *SrcTy = cast(I->getOperand(0)->getType()); uint32_t SrcBitWidth = SrcTy->getBitWidth(); - APInt NewBits(APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth)); DemandedMask &= SrcTy->getMask().zext(BitWidth); uint32_t zextBf = SrcTy->getBitWidth(); - if (SimplifyDemandedBits(I->getOperand(0), DemandedMask.trunc(zextBf), - RHSKnownZero.trunc(zextBf), RHSKnownOne.trunc(zextBf), Depth+1)) + DemandedMask.trunc(zextBf); + RHSKnownZero.trunc(zextBf); + RHSKnownOne.trunc(zextBf); + if (SimplifyDemandedBits(I->getOperand(0), DemandedMask, + RHSKnownZero, RHSKnownOne, Depth+1)) return true; DemandedMask.zext(BitWidth); RHSKnownZero.zext(BitWidth); @@ -1143,29 +1148,32 @@ assert((RHSKnownZero & RHSKnownOne) == 0 && "Bits known to be one AND zero?"); // The top bits are known to be zero. - RHSKnownZero |= NewBits; + RHSKnownZero |= APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth); break; } case Instruction::SExt: { // Compute the bits in the result that are not present in the input. const IntegerType *SrcTy = cast(I->getOperand(0)->getType()); uint32_t SrcBitWidth = SrcTy->getBitWidth(); - APInt NewBits(APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth)); // Get the sign bit for the source type - APInt InSignBit(APInt::getSignBit(SrcTy->getPrimitiveSizeInBits())); + APInt InSignBit(APInt::getSignBit(SrcBitWidth)); InSignBit.zext(BitWidth); APInt InputDemandedBits = DemandedMask & - SrcTy->getMask().zext(BitWidth); + APInt::getLowBitsSet(BitWidth, SrcBitWidth); + APInt NewBits(APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth)); // If any of the sign extended bits are demanded, we know that the sign // bit is demanded. if ((NewBits & DemandedMask) != 0) InputDemandedBits |= InSignBit; uint32_t sextBf = SrcTy->getBitWidth(); - if (SimplifyDemandedBits(I->getOperand(0), InputDemandedBits.trunc(sextBf), - RHSKnownZero.trunc(sextBf), RHSKnownOne.trunc(sextBf), Depth+1)) + InputDemandedBits.trunc(sextBf); + RHSKnownZero.trunc(sextBf); + RHSKnownOne.trunc(sextBf); + if (SimplifyDemandedBits(I->getOperand(0), InputDemandedBits, + RHSKnownZero, RHSKnownOne, Depth+1)) return true; InputDemandedBits.zext(BitWidth); RHSKnownZero.zext(BitWidth); @@ -1178,12 +1186,12 @@ // If the input sign bit is known zero, or if the NewBits are not demanded // convert this into a zero extension. - if ((RHSKnownZero & InSignBit) != 0 || (NewBits & ~DemandedMask) == NewBits) + if (RHSKnownZero[SrcBitWidth-1] || (NewBits & ~DemandedMask) == NewBits) { // Convert to ZExt cast CastInst *NewCast = new ZExtInst(I->getOperand(0), VTy, I->getName(), I); return UpdateValueUsesWith(I, NewCast); - } else if ((RHSKnownOne & InSignBit) != 0) { // Input sign bit known set + } else if (RHSKnownOne[SrcBitWidth-1]) { // Input sign bit known set RHSKnownOne |= NewBits; RHSKnownZero &= ~NewBits; } else { // Input sign bit unknown @@ -1208,7 +1216,7 @@ // If the top bit of the output is demanded, demand everything from the // input. Otherwise, we demand all the input bits except NLZ top bits. - APInt InDemandedBits(APInt::getAllOnesValue(BitWidth).lshr(NLZ)); + APInt InDemandedBits(APInt::getLowBitsSet(BitWidth, BitWidth - NLZ)); // Find information about known zero/one bits in the input. if (SimplifyDemandedBits(I->getOperand(0), InDemandedBits, @@ -1272,10 +1280,10 @@ } else { // If the high-bits of this ADD are not demanded, then it does not demand // the high bits of its LHS or RHS. - if ((DemandedMask & APInt::getSignBit(BitWidth)) == 0) { + if (DemandedMask[BitWidth-1] == 0) { // Right fill the mask of bits for this ADD to demand the most // significant bit and all those below it. - APInt DemandedFromOps = APInt::getAllOnesValue(BitWidth).lshr(NLZ); + APInt DemandedFromOps(APInt::getLowBitsSet(BitWidth, BitWidth-NLZ)); if (SimplifyDemandedBits(I->getOperand(0), DemandedFromOps, LHSKnownZero, LHSKnownOne, Depth+1)) return true; @@ -1289,11 +1297,11 @@ case Instruction::Sub: // If the high-bits of this SUB are not demanded, then it does not demand // the high bits of its LHS or RHS. - if ((DemandedMask & APInt::getSignBit(BitWidth)) == 0) { + if (DemandedMask[BitWidth-1] == 0) { // Right fill the mask of bits for this SUB to demand the most // significant bit and all those below it. unsigned NLZ = DemandedMask.countLeadingZeros(); - APInt DemandedFromOps(APInt::getAllOnesValue(BitWidth).lshr(NLZ)); + APInt DemandedFromOps(APInt::getLowBitsSet(BitWidth, BitWidth-NLZ)); if (SimplifyDemandedBits(I->getOperand(0), DemandedFromOps, LHSKnownZero, LHSKnownOne, Depth+1)) return true; @@ -1305,7 +1313,8 @@ case Instruction::Shl: if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { uint64_t ShiftAmt = SA->getZExtValue(); - if (SimplifyDemandedBits(I->getOperand(0), DemandedMask.lshr(ShiftAmt), + APInt DemandedMaskIn(DemandedMask.lshr(ShiftAmt)); + if (SimplifyDemandedBits(I->getOperand(0), DemandedMaskIn, RHSKnownZero, RHSKnownOne, Depth+1)) return true; assert((RHSKnownZero & RHSKnownOne) == 0 && @@ -1322,22 +1331,18 @@ if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { unsigned ShiftAmt = SA->getZExtValue(); - APInt TypeMask(APInt::getAllOnesValue(BitWidth)); // Unsigned shift right. - if (SimplifyDemandedBits(I->getOperand(0), - (DemandedMask.shl(ShiftAmt)) & TypeMask, + APInt DemandedMaskIn(DemandedMask.shl(ShiftAmt)); + if (SimplifyDemandedBits(I->getOperand(0), DemandedMaskIn, RHSKnownZero, RHSKnownOne, Depth+1)) return true; assert((RHSKnownZero & RHSKnownOne) == 0 && "Bits known to be one AND zero?"); - RHSKnownZero &= TypeMask; - RHSKnownOne &= TypeMask; RHSKnownZero = APIntOps::lshr(RHSKnownZero, ShiftAmt); RHSKnownOne = APIntOps::lshr(RHSKnownOne, ShiftAmt); if (ShiftAmt) { // Compute the new bits that are at the top now. - APInt HighBits(APInt::getAllOnesValue(BitWidth).shl( - BitWidth - ShiftAmt)); + APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt)); RHSKnownZero |= HighBits; // high bits known zero. } } @@ -1358,18 +1363,16 @@ if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { unsigned ShiftAmt = SA->getZExtValue(); - APInt TypeMask(APInt::getAllOnesValue(BitWidth)); // Signed shift right. + APInt DemandedMaskIn(DemandedMask.shl(ShiftAmt)); if (SimplifyDemandedBits(I->getOperand(0), - (DemandedMask.shl(ShiftAmt)) & TypeMask, + DemandedMaskIn, RHSKnownZero, RHSKnownOne, Depth+1)) return true; assert((RHSKnownZero & RHSKnownOne) == 0 && "Bits known to be one AND zero?"); // Compute the new bits that are at the top now. - APInt HighBits(APInt::getAllOnesValue(BitWidth).shl(BitWidth - ShiftAmt)); - RHSKnownZero &= TypeMask; - RHSKnownOne &= TypeMask; + APInt HighBits(APInt::getHighBitsSet(BitWidth, ShiftAmt)); RHSKnownZero = APIntOps::lshr(RHSKnownZero, ShiftAmt); RHSKnownOne = APIntOps::lshr(RHSKnownOne, ShiftAmt); @@ -1380,7 +1383,7 @@ // If the input sign bit is known to be zero, or if none of the top bits // are demanded, turn this into an unsigned shift right. - if ((RHSKnownZero & SignBit) != 0 || + if (RHSKnownZero[BitWidth-ShiftAmt-1] || (HighBits & ~DemandedMask) == HighBits) { // Perform the logical shift right. Value *NewVal = BinaryOperator::createLShr( From evan.cheng at apple.com Wed Mar 28 21:49:13 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 28 Mar 2007 21:49:13 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/README.txt Message-ID: <200703290249.l2T2nDke019747@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: README.txt updated: 1.2 -> 1.3 --- Log message: New entries. --- Diffs of the changes: (+21 -0) README.txt | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+) Index: llvm/lib/CodeGen/README.txt diff -u llvm/lib/CodeGen/README.txt:1.2 llvm/lib/CodeGen/README.txt:1.3 --- llvm/lib/CodeGen/README.txt:1.2 Wed Mar 28 03:30:04 2007 +++ llvm/lib/CodeGen/README.txt Wed Mar 28 21:48:56 2007 @@ -65,3 +65,24 @@ 4. As stated in 3, not as simple as cloning in some cases. The target will have to decide how to remat it. For example, an ARM 2-piece constant generation instruction is remat'ed as a load from constantpool. + +//===---------------------------------------------------------------------===// + +bb27 ... + ... + %reg1037 = ADDri %reg1039, 1 + %reg1038 = ADDrs %reg1032, %reg1039, %NOREG, 10 + Successors according to CFG: 0x8b03bf0 (#5) + +bb76 (0x8b03bf0, LLVM BB @0x8b032d0, ID#5): + Predecessors according to CFG: 0x8b0c5f0 (#3) 0x8b0a7c0 (#4) + %reg1039 = PHI %reg1070, mbb, %reg1037, mbb + +Note ADDri is not a two-address instruction. However, its result %reg1037 is an +operand of the PHI node in bb76 and its operand %reg1039 is the result of the +PHI node. We should treat it as a two-address code and make sure the ADDri is +scheduled after any node that reads %reg1039. + +//===---------------------------------------------------------------------===// + +Re-Materialize load from frame index. From sabre at nondot.org Wed Mar 28 22:14:30 2007 From: sabre at nondot.org (Chris Lattner) Date: Wed, 28 Mar 2007 22:14:30 -0500 Subject: [llvm-commits] CVS: llvm-www/pubs/2007-06-10-PLDI-DSA.pdf Message-ID: <200703290314.l2T3EUOs020207@zion.cs.uiuc.edu> Changes in directory llvm-www/pubs: 2007-06-10-PLDI-DSA.pdf added (r1.1) --- Log message: new paper --- Diffs of the changes: (+0 -0) 2007-06-10-PLDI-DSA.pdf | 0 1 files changed Index: llvm-www/pubs/2007-06-10-PLDI-DSA.pdf From sabre at nondot.org Wed Mar 28 22:26:14 2007 From: sabre at nondot.org (Chris Lattner) Date: Wed, 28 Mar 2007 22:26:14 -0500 Subject: [llvm-commits] CVS: llvm-www/pubs/2007-06-10-PLDI-DSA.html Message-ID: <200703290326.l2T3QErO020727@zion.cs.uiuc.edu> Changes in directory llvm-www/pubs: 2007-06-10-PLDI-DSA.html added (r1.1) --- Log message: new paper --- Diffs of the changes: (+92 -0) 2007-06-10-PLDI-DSA.html | 92 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 92 insertions(+) Index: llvm-www/pubs/2007-06-10-PLDI-DSA.html diff -c /dev/null llvm-www/pubs/2007-06-10-PLDI-DSA.html:1.1 *** /dev/null Wed Mar 28 22:26:07 2007 --- llvm-www/pubs/2007-06-10-PLDI-DSA.html Wed Mar 28 22:25:57 2007 *************** *** 0 **** --- 1,92 ---- + + + + + + Making Context-Sensitive Points-to Analysis with Heap Cloning + Practical For The Real World + + + +
    + Making Context-Sensitive Points-to Analysis with Heap Cloning + Practical For The Real World +
    +
    + Chris Lattner, + Andrew Lenharth, and + Vikram Adve +
    + +

    Abstract:

    +
    + Context-sensitive pointer analysis algorithms with full "heap + cloning" are powerful but are widely considered to be too expensive + to include in production compilers. This paper shows, for the first + time, that a context-sensitive, field-sensitive algorithm with full + heap cloning (by acyclic call paths) can indeed be both scalable and + extremely fast in practice. Overall, the algorithm is able to analyze + programs in the range of 100K-200K lines of C code in 1-3 seconds, + takes less than 5% of the time it takes for GCC to compile the code + (which includes no whole-program + analysis), and scales well across five orders of magnitude of code + size. It is also able to analyze the Linux kernel (about 355K lines + of code) in 3.1 seconds. The paper describes the major algorithmic + and engineering design choices that are required to achieve these + results, including (a) using flow-insensitive and unification-based + analysis, which are essential to avoid exponential behavior in + practice; + (b) sacrificing context-sensitivity within strongly connected components + of the call graph; and + (c) carefully eliminating several kinds of O(N2) behaviors (largely + without affecting precision). + The techniques used for (b) and (c) eliminated several major bottlenecks + to scalability, and both are generalizable to + other context-sensitive algorithms. We show that the engineering + choices collectively reduce analysis time by factors of up to 3x-21x + in our ten largest programs, and that the savings grow strongly + with program size. + Finally, we briefly summarize results demonstrating the precision of the + analysis. +
    + +

    Published:

    +
    + "Making Context-Sensitive Points-to Analysis with Heap Cloning + Practical For The Real World"
    + Chris Lattner, Andrew Lenharth, and Vikram Adve.
    + Proc. of the 2007 ACM SIGPLAN Conference on Programming Language + Design and Implementation (PLDI'07), San Diego, CA, Jun, 2007. +
    + +

    Download:

    +

    Paper:

    + + +

    Slides:

    +

    not yet

    + +

    BibTeX Entry:

    +
    +   @InProceedings{DSA:PLDI07,
    +     author    = {Chris Lattner and Vikram Adve},
    +     title     = "{Making Context-Sensitive Points-to Analysis with Heap Cloning Practical For The Real World}",
    +     booktitle = "{Proceedings of the 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'07)}",
    +     address   = {San Diego, California},
    +     month     = {June},
    +     year      = {2007}
    +   }
    + 
    + + +
    + Valid CSS! + Valid HTML 4.01! + + + From sabre at nondot.org Wed Mar 28 22:28:10 2007 From: sabre at nondot.org (Chris Lattner) Date: Wed, 28 Mar 2007 22:28:10 -0500 Subject: [llvm-commits] CVS: llvm-www/pubs/index.html Message-ID: <200703290328.l2T3SAjp020799@zion.cs.uiuc.edu> Changes in directory llvm-www/pubs: index.html updated: 1.45 -> 1.46 --- Log message: link to new paper --- Diffs of the changes: (+10 -1) index.html | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletion(-) Index: llvm-www/pubs/index.html diff -u llvm-www/pubs/index.html:1.45 llvm-www/pubs/index.html:1.46 --- llvm-www/pubs/index.html:1.45 Tue Mar 13 08:15:19 2007 +++ llvm-www/pubs/index.html Wed Mar 28 22:27:53 2007 @@ -3,7 +3,16 @@
      -
    1. "The LLVM Compiler System"
      Chris Lattner
      2007 Bossa Conference on Open Source, Mobile Internet and Multimedia, Recife, Brazil, March 2007.
    2. +
    3. "Making Context-Sensitive Points-to + Analysis with Heap Cloning Practical For The Real World"
      + Chris Lattner, Andrew Lenharth, and Vikram Adve.
      + Proc. of the 2007 ACM SIGPLAN Conference on Programming Language + Design and Implementation (PLDI'07), San Diego, CA, Jun, 2007.
    4. + +
    5. "The LLVM Compiler System"
      + Chris Lattner
      + 2007 Bossa Conference on Open Source, Mobile Internet and Multimedia, + Recife, Brazil, March 2007.
    6. "A Virtual Instruction Set Interface for Operating System Kernels"
      John Criswell, Brent Monroe, and Vikram Adve.
      Workshop on the Interaction between Operating Systems and Computer Architecture (WIOSCA '06), Boston, Massachusetts, 2006.
    7. From zhousheng00 at gmail.com Wed Mar 28 23:46:12 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Wed, 28 Mar 2007 23:46:12 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703290446.l2T4kCTi021960@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.707 -> 1.708 --- Log message: Clean up some codes in InstCombiner::SimplifyDemandedBits(). --- Diffs of the changes: (+6 -12) InstructionCombining.cpp | 18 ++++++------------ 1 files changed, 6 insertions(+), 12 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.707 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.708 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.707 Wed Mar 28 21:26:30 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Mar 28 23:45:55 2007 @@ -1135,10 +1135,9 @@ uint32_t SrcBitWidth = SrcTy->getBitWidth(); DemandedMask &= SrcTy->getMask().zext(BitWidth); - uint32_t zextBf = SrcTy->getBitWidth(); - DemandedMask.trunc(zextBf); - RHSKnownZero.trunc(zextBf); - RHSKnownOne.trunc(zextBf); + DemandedMask.trunc(SrcBitWidth); + RHSKnownZero.trunc(SrcBitWidth); + RHSKnownOne.trunc(SrcBitWidth); if (SimplifyDemandedBits(I->getOperand(0), DemandedMask, RHSKnownZero, RHSKnownOne, Depth+1)) return true; @@ -1168,10 +1167,9 @@ if ((NewBits & DemandedMask) != 0) InputDemandedBits |= InSignBit; - uint32_t sextBf = SrcTy->getBitWidth(); - InputDemandedBits.trunc(sextBf); - RHSKnownZero.trunc(sextBf); - RHSKnownOne.trunc(sextBf); + InputDemandedBits.trunc(SrcBitWidth); + RHSKnownZero.trunc(SrcBitWidth); + RHSKnownOne.trunc(SrcBitWidth); if (SimplifyDemandedBits(I->getOperand(0), InputDemandedBits, RHSKnownZero, RHSKnownOne, Depth+1)) return true; @@ -1193,10 +1191,6 @@ return UpdateValueUsesWith(I, NewCast); } else if (RHSKnownOne[SrcBitWidth-1]) { // Input sign bit known set RHSKnownOne |= NewBits; - RHSKnownZero &= ~NewBits; - } else { // Input sign bit unknown - RHSKnownZero &= ~NewBits; - RHSKnownOne &= ~NewBits; } break; } From jeffc at jolt-lang.org Thu Mar 29 01:21:24 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 01:21:24 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Applications/JM/ldecod/image.c Message-ID: <200703290621.l2T6LO7D023510@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Applications/JM/ldecod: image.c updated: 1.4 -> 1.5 --- Log message: Fix for BSD systems (JIT still fails though). --- Diffs of the changes: (+21 -2) image.c | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) Index: llvm-test/MultiSource/Applications/JM/ldecod/image.c diff -u llvm-test/MultiSource/Applications/JM/ldecod/image.c:1.4 llvm-test/MultiSource/Applications/JM/ldecod/image.c:1.5 --- llvm-test/MultiSource/Applications/JM/ldecod/image.c:1.4 Thu Feb 8 16:38:32 2007 +++ llvm-test/MultiSource/Applications/JM/ldecod/image.c Thu Mar 29 01:21:07 2007 @@ -63,6 +63,10 @@ #include "vlc.h" +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) +#include +#endif + #include "erc_api.h" extern objectBuffer_t *erc_object_list; extern ercVariables_t *erc_errorVar; @@ -82,6 +86,21 @@ OldSliceParams old_slice; +void ftime_hack(struct timeb *tp) +{ +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) + struct timeval tv; + struct timezone tz; + gettimeofday(&tv, &tz); + tp->time = tv.tv_sec; + tp->millitm = tv.tv_usec / 1000; + tp->timezone = tz.tz_minuteswest; + tp->dstflag = tz.tz_dsttime; +#else + ftime(tp); +#endif +} + void MbAffPostProc() { imgpel temp[16][32]; @@ -1289,7 +1308,7 @@ #ifdef WIN32 _ftime (&(img->tstruct_start)); // start time ms #else - ftime (&(img->tstruct_start)); // start time ms + ftime_hack (&(img->tstruct_start)); // start time ms #endif time( &(img->ltime_start)); // start time s } @@ -1513,7 +1532,7 @@ #ifdef WIN32 _ftime (&(img->tstruct_end)); // start time ms #else - ftime (&(img->tstruct_end)); // start time ms + ftime_hack (&(img->tstruct_end)); // start time ms #endif time( &(img->ltime_end)); // start time s From evan.cheng at apple.com Thu Mar 29 02:49:57 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 29 Mar 2007 02:49:57 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMAsmPrinter.cpp Message-ID: <200703290749.l2T7nvmm001461@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMAsmPrinter.cpp updated: 1.62 -> 1.63 --- Log message: Add support for hidden visibility to darwin/arm. --- Diffs of the changes: (+4 -0) ARMAsmPrinter.cpp | 4 ++++ 1 files changed, 4 insertions(+) Index: llvm/lib/Target/ARM/ARMAsmPrinter.cpp diff -u llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.62 llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.63 --- llvm/lib/Target/ARM/ARMAsmPrinter.cpp:1.62 Tue Mar 20 03:11:30 2007 +++ llvm/lib/Target/ARM/ARMAsmPrinter.cpp Thu Mar 29 02:49:34 2007 @@ -205,6 +205,10 @@ break; } + if (F->hasHiddenVisibility()) + if (const char *Directive = TAI->getHiddenDirective()) + O << Directive << CurrentFnName << "\n"; + if (AFI->isThumbFunction()) { EmitAlignment(1, F); O << "\t.code\t16\n"; From evan.cheng at apple.com Thu Mar 29 02:57:04 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 29 Mar 2007 02:57:04 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200703290757.l2T7v4Zh001581@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGCombiner.cpp updated: 1.282 -> 1.283 --- Log message: Disable load width reduction xform of variant (zext (truncate load x)) for big endian targets until llvm-gcc build issue has been resolved. --- Diffs of the changes: (+3 -1) DAGCombiner.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.282 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.283 --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.282 Mon Mar 26 02:12:51 2007 +++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Mar 29 02:56:46 2007 @@ -2110,7 +2110,9 @@ // fold (zext (truncate (load x))) -> (zext (smaller load x)) // fold (zext (truncate (srl (load x), c))) -> (zext (small load (x+c/n))) - if (N0.getOpcode() == ISD::TRUNCATE) { + // FIXME: Temporarily disable this for big endian machines until llvm-gcc + // build issue has been resolved. + if (TLI.isLittleEndian() && N0.getOpcode() == ISD::TRUNCATE) { SDOperand NarrowLoad = ReduceLoadWidth(N0.Val); if (NarrowLoad.Val) { if (NarrowLoad.Val != N0.Val) From zhousheng00 at gmail.com Thu Mar 29 03:15:29 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Thu, 29 Mar 2007 03:15:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703290815.l2T8FTJq001912@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.708 -> 1.709 --- Log message: 1. Make more use of APInt::getHighBitsSet/getLowBitsSet. 2. Let APInt variable do the binary operation stuff instead of using ConstantExpr::getXXX. --- Diffs of the changes: (+26 -22) InstructionCombining.cpp | 48 +++++++++++++++++++++++++---------------------- 1 files changed, 26 insertions(+), 22 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.708 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.709 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.708 Wed Mar 28 23:45:55 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Mar 29 03:15:12 2007 @@ -1921,9 +1921,8 @@ if ((RHSVal == CFF80Val && XorRHS->getValue() == C0080Val) || (RHSVal == C0080Val && XorRHS->getValue() == CFF80Val)) { // This is a sign extend if the top bits are known zero. - APInt Mask(APInt::getAllOnesValue(TySizeBits)); - Mask <<= Size; - if (!MaskedValueIsZero(XorLHS, Mask)) + if (!MaskedValueIsZero(XorLHS, + APInt::getHighBitsSet(TySizeBits, TySizeBits - Size))) Size = 0; // Not a sign ext, but can't be any others either. break; } @@ -2984,11 +2983,14 @@ // We know that the AND will not produce any of the bits shifted in, so if // the anded constant includes them, clear them now! // - Constant *AllOne = ConstantInt::getAllOnesValue(AndRHS->getType()); - Constant *ShlMask = ConstantExpr::getShl(AllOne, OpRHS); - Constant *CI = ConstantExpr::getAnd(AndRHS, ShlMask); + uint32_t BitWidth = AndRHS->getType()->getBitWidth(); + uint32_t OpRHSVal = OpRHS->getValue().getActiveBits() > 64 ? + BitWidth : OpRHS->getZExtValue(); + APInt ShlMask(APInt::getHighBitsSet(BitWidth, BitWidth-OpRHSVal)); + ConstantInt *CI = ConstantInt::get(AndRHS->getValue() & ShlMask); - if (CI == ShlMask) { // Masking out bits that the shift already masks + if (CI->getValue() == ShlMask) { + // Masking out bits that the shift already masks return ReplaceInstUsesWith(TheAnd, Op); // No need for the and. } else if (CI != AndRHS) { // Reducing bits set in and. TheAnd.setOperand(1, CI); @@ -3002,11 +3004,14 @@ // the anded constant includes them, clear them now! This only applies to // unsigned shifts, because a signed shr may bring in set bits! // - Constant *AllOne = ConstantInt::getAllOnesValue(AndRHS->getType()); - Constant *ShrMask = ConstantExpr::getLShr(AllOne, OpRHS); - Constant *CI = ConstantExpr::getAnd(AndRHS, ShrMask); + uint32_t BitWidth = AndRHS->getType()->getBitWidth(); + uint32_t OpRHSVal = OpRHS->getValue().getActiveBits() > 64 ? + BitWidth : OpRHS->getZExtValue(); + APInt ShrMask(APInt::getLowBitsSet(BitWidth, BitWidth - OpRHSVal)); + ConstantInt *CI = ConstantInt::get(AndRHS->getValue() & ShrMask); - if (CI == ShrMask) { // Masking out bits that the shift already masks. + if (CI->getValue() == ShrMask) { + // Masking out bits that the shift already masks. return ReplaceInstUsesWith(TheAnd, Op); } else if (CI != AndRHS) { TheAnd.setOperand(1, CI); // Reduce bits set in and cst. @@ -3019,9 +3024,11 @@ // See if this is shifting in some sign extension, then masking it out // with an and. if (Op->hasOneUse()) { - Constant *AllOne = ConstantInt::getAllOnesValue(AndRHS->getType()); - Constant *ShrMask = ConstantExpr::getLShr(AllOne, OpRHS); - Constant *C = ConstantExpr::getAnd(AndRHS, ShrMask); + uint32_t BitWidth = AndRHS->getType()->getBitWidth(); + uint32_t OpRHSVal = OpRHS->getValue().getActiveBits() > 64 ? + BitWidth : OpRHS->getZExtValue(); + APInt ShrMask(APInt::getLowBitsSet(BitWidth, BitWidth - OpRHSVal)); + Constant *C = ConstantInt::get(AndRHS->getValue() & ShrMask); if (C == AndRHS) { // Masking out bits shifted in. // (Val ashr C1) & C2 -> (Val lshr C1) & C2 // Make the argument unsigned. @@ -3140,8 +3147,7 @@ unsigned MB = 0, ME = 0; if (isRunOfOnes(Mask, MB, ME)) { // begin/end bit of run, inclusive uint32_t BitWidth = cast(RHS->getType())->getBitWidth(); - APInt Mask(APInt::getAllOnesValue(BitWidth)); - Mask = Mask.lshr(BitWidth-MB+1); + APInt Mask(APInt::getLowBitsSet(BitWidth, MB-1)); if (MaskedValueIsZero(RHS, Mask)) break; } @@ -4786,11 +4792,9 @@ int ShAmtVal = Ty->getPrimitiveSizeInBits()-ShAmt->getZExtValue(); if (ShAmtVal < 0) ShAmtVal = 0; // Out of range shift. - Constant *OShAmt = ConstantInt::get(AndTy, ShAmtVal); - Constant *ShVal = - ConstantExpr::getShl(ConstantInt::getAllOnesValue(AndTy), - OShAmt); - if (ConstantExpr::getAnd(ShVal, AndCST)->isNullValue()) + uint32_t BitWidth = AndTy->getPrimitiveSizeInBits(); + if ((APInt::getHighBitsSet(BitWidth, BitWidth-ShAmtVal) & + AndCST->getValue()) == 0) CanFold = true; } @@ -4925,7 +4929,7 @@ unsigned ShAmtVal = (unsigned)ShAmt->getZExtValue(); // Otherwise strength reduce the shift into an and. - APInt Val(APInt::getAllOnesValue(TypeBits).shl(ShAmtVal)); + APInt Val(APInt::getHighBitsSet(TypeBits, TypeBits - ShAmtVal)); Constant *Mask = ConstantInt::get(Val); Instruction *AndI = From reid at x10sys.com Thu Mar 29 10:38:14 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 10:38:14 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200703291538.l2TFcE4M011140@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.266 -> 1.267 --- Log message: For PR1283: http://llvm.org/PR1283 : Change the llvm-gcc sanity check to look for "target datalayout" instead of "implementation". The implementation keyword is no longer generated by llvm or llvm-gcc. --- Diffs of the changes: (+2 -1) configure.ac | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.266 llvm/autoconf/configure.ac:1.267 --- llvm/autoconf/configure.ac:1.266 Wed Mar 21 16:38:25 2007 +++ llvm/autoconf/configure.ac Thu Mar 29 10:37:57 2007 @@ -757,7 +757,8 @@ [llvm_cv_llvmgcc_sanity="no" if test -x "$LLVMGCC" ; then cp /dev/null conftest.c - "$LLVMGCC" -emit-llvm -S -o - conftest.c | grep implementation > /dev/null 2>&1 + "$LLVMGCC" -emit-llvm -S -o - conftest.c | \ + grep 'target datalayout =' > /dev/null 2>&1 if test $? -eq 0 ; then llvm_cv_llvmgcc_sanity="yes" fi From reid at x10sys.com Thu Mar 29 10:38:50 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 10:38:50 -0500 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200703291538.l2TFco8Y011164@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.271 -> 1.272 --- Log message: Regenerate for PR1283: http://llvm.org/PR1283 fix. --- Diffs of the changes: (+2 -1) configure | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/configure diff -u llvm/configure:1.271 llvm/configure:1.272 --- llvm/configure:1.271 Wed Mar 21 16:38:25 2007 +++ llvm/configure Thu Mar 29 10:38:33 2007 @@ -33440,7 +33440,8 @@ llvm_cv_llvmgcc_sanity="no" if test -x "$LLVMGCC" ; then cp /dev/null conftest.c - "$LLVMGCC" -emit-llvm -S -o - conftest.c | grep implementation > /dev/null 2>&1 + "$LLVMGCC" -emit-llvm -S -o - conftest.c | \ + grep 'target datalayout =' > /dev/null 2>&1 if test $? -eq 0 ; then llvm_cv_llvmgcc_sanity="yes" fi From jeffc at jolt-lang.org Thu Mar 29 11:27:45 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 11:27:45 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Applications/JM/ldecod/image.c Message-ID: <200703291627.l2TGRjGJ011992@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Applications/JM/ldecod: image.c updated: 1.5 -> 1.6 --- Log message: Improve BSD ftime hack and apply it to another test. --- Diffs of the changes: (+12 -17) image.c | 29 ++++++++++++----------------- 1 files changed, 12 insertions(+), 17 deletions(-) Index: llvm-test/MultiSource/Applications/JM/ldecod/image.c diff -u llvm-test/MultiSource/Applications/JM/ldecod/image.c:1.5 llvm-test/MultiSource/Applications/JM/ldecod/image.c:1.6 --- llvm-test/MultiSource/Applications/JM/ldecod/image.c:1.5 Thu Mar 29 01:21:07 2007 +++ llvm-test/MultiSource/Applications/JM/ldecod/image.c Thu Mar 29 11:27:28 2007 @@ -65,6 +65,16 @@ #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) #include +int ftime(struct timeb *tp) +{ + struct timeval tv; + struct timezone tz; + gettimeofday(&tv, &tz); + tp->time = tv.tv_sec; + tp->millitm = tv.tv_usec / 1000; + tp->timezone = tz.tz_minuteswest; + tp->dstflag = tz.tz_dsttime; +} #endif #include "erc_api.h" @@ -86,21 +96,6 @@ OldSliceParams old_slice; -void ftime_hack(struct timeb *tp) -{ -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) - struct timeval tv; - struct timezone tz; - gettimeofday(&tv, &tz); - tp->time = tv.tv_sec; - tp->millitm = tv.tv_usec / 1000; - tp->timezone = tz.tz_minuteswest; - tp->dstflag = tz.tz_dsttime; -#else - ftime(tp); -#endif -} - void MbAffPostProc() { imgpel temp[16][32]; @@ -1308,7 +1303,7 @@ #ifdef WIN32 _ftime (&(img->tstruct_start)); // start time ms #else - ftime_hack (&(img->tstruct_start)); // start time ms + ftime (&(img->tstruct_start)); // start time ms #endif time( &(img->ltime_start)); // start time s } @@ -1532,7 +1527,7 @@ #ifdef WIN32 _ftime (&(img->tstruct_end)); // start time ms #else - ftime_hack (&(img->tstruct_end)); // start time ms + ftime (&(img->tstruct_end)); // start time ms #endif time( &(img->ltime_end)); // start time s From jeffc at jolt-lang.org Thu Mar 29 11:27:47 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 11:27:47 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Applications/JM/lencod/image.c Message-ID: <200703291627.l2TGRlIb011998@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Applications/JM/lencod: image.c updated: 1.4 -> 1.5 --- Log message: Improve BSD ftime hack and apply it to another test. --- Diffs of the changes: (+14 -0) image.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+) Index: llvm-test/MultiSource/Applications/JM/lencod/image.c diff -u llvm-test/MultiSource/Applications/JM/lencod/image.c:1.4 llvm-test/MultiSource/Applications/JM/lencod/image.c:1.5 --- llvm-test/MultiSource/Applications/JM/lencod/image.c:1.4 Thu Feb 8 17:05:31 2007 +++ llvm-test/MultiSource/Applications/JM/lencod/image.c Thu Mar 29 11:27:28 2007 @@ -51,6 +51,20 @@ #include "output.h" #include "cabac.h" +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) +#include +int ftime(struct timeb *tp) +{ + struct timeval tv; + struct timezone tz; + gettimeofday(&tv, &tz); + tp->time = tv.tv_sec; + tp->millitm = tv.tv_usec / 1000; + tp->timezone = tz.tz_minuteswest; + tp->dstflag = tz.tz_dsttime; +} +#endif + extern pic_parameter_set_rbsp_t *PicParSet[MAXPPS]; void code_a_picture(Picture *pic); From jeffc at jolt-lang.org Thu Mar 29 11:31:02 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 11:31:02 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Applications/hexxagon/hexxagonmove.cpp Message-ID: <200703291631.l2TGV2IS012077@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Applications/hexxagon: hexxagonmove.cpp updated: 1.4 -> 1.5 --- Log message: Correct OpenBSD oversight. --- Diffs of the changes: (+1 -1) hexxagonmove.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/MultiSource/Applications/hexxagon/hexxagonmove.cpp diff -u llvm-test/MultiSource/Applications/hexxagon/hexxagonmove.cpp:1.4 llvm-test/MultiSource/Applications/hexxagon/hexxagonmove.cpp:1.5 --- llvm-test/MultiSource/Applications/hexxagon/hexxagonmove.cpp:1.4 Mon Apr 17 12:55:40 2006 +++ llvm-test/MultiSource/Applications/hexxagon/hexxagonmove.cpp Thu Mar 29 11:30:45 2007 @@ -87,7 +87,7 @@ int getTime() { -#if defined(__FreeBSD__) || defined(__APPLE__) +#if defined(__FreeBSD__) || defined(__OpenBSD__ )|| defined(__APPLE__) struct timeval tv; gettimeofday(&tv, NULL); From jeffc at jolt-lang.org Thu Mar 29 11:36:40 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 11:36:40 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/MiBench/automotive-susan/susan.c Message-ID: <200703291636.l2TGaeEJ012209@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/automotive-susan: susan.c updated: 1.1 -> 1.2 --- Log message: Fix for other BSDs. --- Diffs of the changes: (+1 -1) susan.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/MultiSource/Benchmarks/MiBench/automotive-susan/susan.c diff -u llvm-test/MultiSource/Benchmarks/MiBench/automotive-susan/susan.c:1.1 llvm-test/MultiSource/Benchmarks/MiBench/automotive-susan/susan.c:1.2 --- llvm-test/MultiSource/Benchmarks/MiBench/automotive-susan/susan.c:1.1 Tue Jan 9 17:44:34 2007 +++ llvm-test/MultiSource/Benchmarks/MiBench/automotive-susan/susan.c Thu Mar 29 11:36:22 2007 @@ -302,7 +302,7 @@ #include #include #include /* may want to remove this line */ -#ifndef __APPLE__ +#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) #include /* may want to remove this line */ #endif #define exit_error(IFB,IFC) { fprintf(stderr,IFB,IFC); exit(0); } From reid at x10sys.com Thu Mar 29 11:43:41 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 11:43:41 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Unix/Path.inc Message-ID: <200703291643.l2TGhf5h012418@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Unix: Path.inc updated: 1.58 -> 1.59 --- Log message: For PR789: http://llvm.org/PR789 : * Add a method: bool isAbsolute() const, which determines if the path name is absolute or not. * Implement caching of file status information in the Path object. Allow it to be updated forcefully or lazily re-fetched from the cached value. --- Diffs of the changes: (+22 -12) Path.inc | 34 ++++++++++++++++++++++------------ 1 files changed, 22 insertions(+), 12 deletions(-) Index: llvm/lib/System/Unix/Path.inc diff -u llvm/lib/System/Unix/Path.inc:1.58 llvm/lib/System/Unix/Path.inc:1.59 --- llvm/lib/System/Unix/Path.inc:1.58 Wed Aug 23 15:34:57 2006 +++ llvm/lib/System/Unix/Path.inc Thu Mar 29 11:43:20 2007 @@ -79,6 +79,12 @@ return i >= len; } +bool +Path::isAbsolute() const { + if (path.empty()) + return false; + return path[0] == '/'; +} Path Path::GetRootDirectory() { Path result; @@ -357,18 +363,22 @@ } bool -Path::getFileStatus(FileStatus &info, std::string *ErrStr) const { - struct stat buf; - if (0 != stat(path.c_str(), &buf)) - return MakeErrMsg(ErrStr, - path + ": can't get status of file '" + path + "'"); - info.fileSize = buf.st_size; - info.modTime.fromEpochTime(buf.st_mtime); - info.mode = buf.st_mode; - info.user = buf.st_uid; - info.group = buf.st_gid; - info.isDir = S_ISDIR(buf.st_mode); - info.isFile = S_ISREG(buf.st_mode); +Path::getFileStatus(FileStatus &info, bool update, std::string *ErrStr) const { + if (status == 0 || update) { + struct stat buf; + if (0 != stat(path.c_str(), &buf)) + return MakeErrMsg(ErrStr, path + ": can't get status of file"); + if (status == 0) + status = new FileStatus; + status->fileSize = buf.st_size; + status->modTime.fromEpochTime(buf.st_mtime); + status->mode = buf.st_mode; + status->user = buf.st_uid; + status->group = buf.st_gid; + status->isDir = S_ISDIR(buf.st_mode); + status->isFile = S_ISREG(buf.st_mode); + } + info = *status; return false; } From reid at x10sys.com Thu Mar 29 11:43:42 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 11:43:42 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Win32/Path.inc Message-ID: <200703291643.l2TGhgsl012426@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Win32: Path.inc updated: 1.59 -> 1.60 --- Log message: For PR789: http://llvm.org/PR789 : * Add a method: bool isAbsolute() const, which determines if the path name is absolute or not. * Implement caching of file status information in the Path object. Allow it to be updated forcefully or lazily re-fetched from the cached value. --- Diffs of the changes: (+29 -16) Path.inc | 45 +++++++++++++++++++++++++++++---------------- 1 files changed, 29 insertions(+), 16 deletions(-) Index: llvm/lib/System/Win32/Path.inc diff -u llvm/lib/System/Win32/Path.inc:1.59 llvm/lib/System/Win32/Path.inc:1.60 --- llvm/lib/System/Win32/Path.inc:1.59 Sun Nov 5 13:31:28 2006 +++ llvm/lib/System/Win32/Path.inc Thu Mar 29 11:43:20 2007 @@ -105,6 +105,13 @@ return true; } +bool +Path::isAbsolute() const { + if (path.length() < 3) + return false; + return path[0] == 'C' && path[1] == ':' && path[2] == '\\'; +} + static Path *TempDirectory = NULL; Path @@ -294,24 +301,30 @@ } bool -Path::getFileStatus(FileStatus &info, std::string *ErrStr) const { - WIN32_FILE_ATTRIBUTE_DATA fi; - if (!GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi)) - return MakeErrMsg(ErrStr, "getStatusInfo():" + std::string(path) + - ": Can't get status: "); - - info.fileSize = fi.nFileSizeHigh; - info.fileSize <<= sizeof(fi.nFileSizeHigh)*8; - info.fileSize += fi.nFileSizeLow; - - info.mode = fi.dwFileAttributes & FILE_ATTRIBUTE_READONLY ? 0555 : 0777; - info.user = 9999; // Not applicable to Windows, so... - info.group = 9999; // Not applicable to Windows, so... +Path::getFileStatus(FileStatus &info, bool update, std::string *ErrStr) const { + if (status == 0 || update) { + WIN32_FILE_ATTRIBUTE_DATA fi; + if (!GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi)) + return MakeErrMsg(ErrStr, "getStatusInfo():" + std::string(path) + + ": Can't get status: "); + + if (status == 0) + status = new FileStatus; + + status->fileSize = fi.nFileSizeHigh; + status->fileSize <<= sizeof(fi.nFileSizeHigh)*8; + status->fileSize += fi.nFileSizeLow; + + status->mode = fi.dwFileAttributes & FILE_ATTRIBUTE_READONLY ? 0555 : 0777; + status->user = 9999; // Not applicable to Windows, so... + status->group = 9999; // Not applicable to Windows, so... - __int64 ft = *reinterpret_cast<__int64*>(&fi.ftLastWriteTime); - info.modTime.fromWin32Time(ft); + __int64 ft = *reinterpret_cast<__int64*>(&fi.ftLastWriteTime); + status->modTime.fromWin32Time(ft); - info.isDir = fi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY; + status->isDir = fi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY; + } + info = *status; return false; } From reid at x10sys.com Thu Mar 29 11:43:42 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 11:43:42 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/System/Path.h Message-ID: <200703291643.l2TGhgsJ012431@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/System: Path.h updated: 1.43 -> 1.44 --- Log message: For PR789: http://llvm.org/PR789 : * Add a method: bool isAbsolute() const, which determines if the path name is absolute or not. * Implement caching of file status information in the Path object. Allow it to be updated forcefully or lazily re-fetched from the cached value. --- Diffs of the changes: (+14 -4) Path.h | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) Index: llvm/include/llvm/System/Path.h diff -u llvm/include/llvm/System/Path.h:1.43 llvm/include/llvm/System/Path.h:1.44 --- llvm/include/llvm/System/Path.h:1.43 Sun Nov 5 13:31:28 2006 +++ llvm/include/llvm/System/Path.h Thu Mar 29 11:43:20 2007 @@ -123,7 +123,7 @@ /// Find the path to a library using its short name. Use the system /// dependent library paths to locate the library. /// @brief Find a library. - static Path FindLibrary(std::string& short_name); + static Path FindLibrary(std::string& short_name); /// Construct a path to the default LLVM configuration directory. The /// implementation must ensure that this is a well-known (same on many @@ -162,14 +162,14 @@ /// provided so that they can be used to indicate null or error results in /// other lib/System functionality. /// @brief Construct an empty (and invalid) path. - Path() : path() {} + Path() : path(), status(0) {} /// This constructor will accept a std::string as a path. No checking is /// done on this path to determine if it is valid. To determine validity /// of the path, use the isValid method. /// @param p The path to assign. /// @brief Construct a Path from a string. - explicit Path(const std::string& p) : path(p) {} + explicit Path(const std::string& p) : path(p), status(0) {} /// @} /// @name Operators @@ -265,6 +265,11 @@ /// @brief Determines if the path references the root directory. bool isRootDirectory() const; + /// This function determines if the path name is absolute, as opposed to + /// relative. + /// @breif Determine if the path is absolute. + bool isAbsolute() const; + /// This function opens the file associated with the path name provided by /// the Path object and reads its magic number. If the magic number at the /// start of the file matches \p magic, true is returned. In all other @@ -352,7 +357,11 @@ /// of the file system. This returns false on success, or true on error /// and fills in the specified error string if specified. /// @brief Get file status. - bool getFileStatus(FileStatus &Status, std::string *Error = 0) const; + bool getFileStatus( + FileStatus &Status, ///< The resulting file status + bool forceUpdate = false, ///< Force an update from the file system + std::string *Error = 0 ///< Optional place to return an error msg. + ) const; /// @} /// @name Path Mutators @@ -511,6 +520,7 @@ /// @{ private: mutable std::string path; ///< Storage for the path name. + mutable FileStatus *status; ///< Status information. /// @} }; From jeffc at jolt-lang.org Thu Mar 29 11:44:52 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 11:44:52 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/MiBench/consumer-jpeg/Makefile Message-ID: <200703291644.l2TGiqeo012479@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/consumer-jpeg: Makefile updated: 1.1 -> 1.2 --- Log message: Fix for src != obj --- Diffs of the changes: (+1 -1) Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/MultiSource/Benchmarks/MiBench/consumer-jpeg/Makefile diff -u llvm-test/MultiSource/Benchmarks/MiBench/consumer-jpeg/Makefile:1.1 llvm-test/MultiSource/Benchmarks/MiBench/consumer-jpeg/Makefile:1.2 --- llvm-test/MultiSource/Benchmarks/MiBench/consumer-jpeg/Makefile:1.1 Tue Jan 9 17:44:34 2007 +++ llvm-test/MultiSource/Benchmarks/MiBench/consumer-jpeg/Makefile Thu Mar 29 11:44:34 2007 @@ -2,5 +2,5 @@ PROG = consumer-jpeg LDFLAGS = -lm -RUN_OPTIONS = -dct int -ppm -outfile output_large_decode.ppm input_large.jpg +RUN_OPTIONS = -dct int -ppm -outfile output_large_decode.ppm $(PROJ_SRC_DIR)/input_large.jpg include $(LEVEL)/MultiSource/Makefile.multisrc From reid at x10sys.com Thu Mar 29 11:48:38 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 11:48:38 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/FileUtilities.cpp Message-ID: <200703291648.l2TGmcOG012631@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: FileUtilities.cpp updated: 1.53 -> 1.54 --- Log message: For PR789: http://llvm.org/PR789 : Updates for change in interface of getFileStatus method of sys::Path class. --- Diffs of the changes: (+2 -2) FileUtilities.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Support/FileUtilities.cpp diff -u llvm/lib/Support/FileUtilities.cpp:1.53 llvm/lib/Support/FileUtilities.cpp:1.54 --- llvm/lib/Support/FileUtilities.cpp:1.53 Sat Nov 25 02:38:44 2006 +++ llvm/lib/Support/FileUtilities.cpp Thu Mar 29 11:48:16 2007 @@ -153,9 +153,9 @@ double AbsTol, double RelTol, std::string *Error) { sys::FileStatus FileAStat, FileBStat; - if (FileA.getFileStatus(FileAStat, Error)) + if (FileA.getFileStatus(FileAStat, false, Error)) return 2; - if (FileB.getFileStatus(FileBStat, Error)) + if (FileB.getFileStatus(FileBStat, false, Error)) return 2; // Check for zero length files because some systems croak when you try to From reid at x10sys.com Thu Mar 29 11:48:38 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 11:48:38 -0500 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Archive/Archive.cpp ArchiveWriter.cpp Message-ID: <200703291648.l2TGmc1c012626@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Archive: Archive.cpp updated: 1.17 -> 1.18 ArchiveWriter.cpp updated: 1.34 -> 1.35 --- Log message: For PR789: http://llvm.org/PR789 : Updates for change in interface of getFileStatus method of sys::Path class. --- Diffs of the changes: (+2 -2) Archive.cpp | 2 +- ArchiveWriter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Bytecode/Archive/Archive.cpp diff -u llvm/lib/Bytecode/Archive/Archive.cpp:1.17 llvm/lib/Bytecode/Archive/Archive.cpp:1.18 --- llvm/lib/Bytecode/Archive/Archive.cpp:1.17 Wed Feb 7 17:53:17 2007 +++ llvm/lib/Bytecode/Archive/Archive.cpp Thu Mar 29 11:48:16 2007 @@ -116,7 +116,7 @@ path.getMagicNumber(magic,4); signature = magic.c_str(); std::string err; - if (path.getFileStatus(info, ErrMsg)) + if (path.getFileStatus(info, false, ErrMsg)) return true; } Index: llvm/lib/Bytecode/Archive/ArchiveWriter.cpp diff -u llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.34 llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.35 --- llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.34 Wed Feb 7 15:41:01 2007 +++ llvm/lib/Bytecode/Archive/ArchiveWriter.cpp Thu Mar 29 11:48:16 2007 @@ -163,7 +163,7 @@ mbr->data = 0; mbr->path = filePath; - if (mbr->path.getFileStatus(mbr->info, ErrMsg)) + if (mbr->path.getFileStatus(mbr->info, false, ErrMsg)) return true; unsigned flags = 0; From reid at x10sys.com Thu Mar 29 11:51:06 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 11:51:06 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/System/Path.h Message-ID: <200703291651.l2TGp6AI012726@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/System: Path.h updated: 1.44 -> 1.45 --- Log message: Don't forget to delete the FileStatus structure on destruction of Path. --- Diffs of the changes: (+1 -0) Path.h | 1 + 1 files changed, 1 insertion(+) Index: llvm/include/llvm/System/Path.h diff -u llvm/include/llvm/System/Path.h:1.44 llvm/include/llvm/System/Path.h:1.45 --- llvm/include/llvm/System/Path.h:1.44 Thu Mar 29 11:43:20 2007 +++ llvm/include/llvm/System/Path.h Thu Mar 29 11:50:49 2007 @@ -163,6 +163,7 @@ /// other lib/System functionality. /// @brief Construct an empty (and invalid) path. Path() : path(), status(0) {} + ~Path() { delete status; } /// This constructor will accept a std::string as a path. No checking is /// done on this path to determine if it is valid. To determine validity From jeffc at jolt-lang.org Thu Mar 29 11:54:11 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 11:54:11 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/Makefile lame.c Message-ID: <200703291654.l2TGsBLR012825@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame: Makefile updated: 1.1 -> 1.2 lame.c updated: 1.1 -> 1.2 --- Log message: Fix for src != obj Don't include header files from within a function. --- Diffs of the changes: (+4 -4) Makefile | 2 +- lame.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) Index: llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/Makefile diff -u llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/Makefile:1.1 llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/Makefile:1.2 --- llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/Makefile:1.1 Tue Jan 9 17:44:34 2007 +++ llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/Makefile Thu Mar 29 11:53:54 2007 @@ -3,5 +3,5 @@ PROG = consumer-lame CPPFLAGS = -DHAVEMPGLIB -DLAMEPARSE -DNDEBUG -D__NO_MATH_INLINES -O -DLAMESNDFILE LDFLAGS = -lm -RUN_OPTIONS = -S large.wav output_large.mp3 +RUN_OPTIONS = -S large.wav $(PROJ_SRC_DIR)/output_large.mp3 include $(LEVEL)/MultiSource/Makefile.multisrc Index: llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/lame.c diff -u llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/lame.c:1.1 llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/lame.c:1.2 --- llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/lame.c:1.1 Tue Jan 9 17:44:35 2007 +++ llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/lame.c Thu Mar 29 11:53:54 2007 @@ -1187,6 +1187,9 @@ } +#ifdef __FreeBSD__ +# include +#endif /* initialize mp3 encoder */ @@ -1196,8 +1199,6 @@ /* * Disable floating point exepctions */ -#ifdef __FreeBSD__ -# include { /* seet floating point mask to the Linux default */ fp_except_t mask; @@ -1206,7 +1207,6 @@ fpsetmask(mask & ~(FP_X_INV|FP_X_DZ)); /* fprintf(stderr,"FreeBSD mask is 0x%x\n",mask); */ } -#endif #if defined(__riscos__) && !defined(ABORTFP) /* Disable FPE's under RISC OS */ /* if bit is set, we disable trapping that error! */ From reid at x10sys.com Thu Mar 29 12:00:51 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 12:00:51 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Unix/Path.inc Message-ID: <200703291700.l2TH0p0W013051@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Unix: Path.inc updated: 1.59 -> 1.60 --- Log message: Add a uniqueID field to the FileStatus structure for Paths. This will map to the inode number on Unix and something far less unique on Windows. The windows case needs to be improved. --- Diffs of the changes: (+1 -0) Path.inc | 1 + 1 files changed, 1 insertion(+) Index: llvm/lib/System/Unix/Path.inc diff -u llvm/lib/System/Unix/Path.inc:1.59 llvm/lib/System/Unix/Path.inc:1.60 --- llvm/lib/System/Unix/Path.inc:1.59 Thu Mar 29 11:43:20 2007 +++ llvm/lib/System/Unix/Path.inc Thu Mar 29 12:00:31 2007 @@ -375,6 +375,7 @@ status->mode = buf.st_mode; status->user = buf.st_uid; status->group = buf.st_gid; + status->uniqueID = uint64_t(buf.st_ino); status->isDir = S_ISDIR(buf.st_mode); status->isFile = S_ISREG(buf.st_mode); } From reid at x10sys.com Thu Mar 29 12:00:53 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 12:00:53 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/System/Path.h Message-ID: <200703291700.l2TH0rXh013059@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/System: Path.h updated: 1.45 -> 1.46 --- Log message: Add a uniqueID field to the FileStatus structure for Paths. This will map to the inode number on Unix and something far less unique on Windows. The windows case needs to be improved. --- Diffs of the changes: (+3 -1) Path.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/include/llvm/System/Path.h diff -u llvm/include/llvm/System/Path.h:1.45 llvm/include/llvm/System/Path.h:1.46 --- llvm/include/llvm/System/Path.h:1.45 Thu Mar 29 11:50:49 2007 +++ llvm/include/llvm/System/Path.h Thu Mar 29 12:00:31 2007 @@ -40,17 +40,19 @@ uint32_t mode; ///< Mode of the file, if applicable uint32_t user; ///< User ID of owner, if applicable uint32_t group; ///< Group ID of owner, if applicable + uint64_t uniqueID; ///< A number to uniquely ID this file bool isDir : 1; ///< True if this is a directory. bool isFile : 1; ///< True if this is a file. FileStatus() : fileSize(0), modTime(0,0), mode(0777), user(999), - group(999), isDir(false) { } + group(999), uniqueID(0), isDir(false), isFile(false) { } TimeValue getTimestamp() const { return modTime; } uint64_t getSize() const { return fileSize; } uint32_t getMode() const { return mode; } uint32_t getUser() const { return user; } uint32_t getGroup() const { return group; } + uint32_t getUniqueID() const { return uniqueID; } }; /// This class provides an abstraction for the path to a file or directory From reid at x10sys.com Thu Mar 29 12:00:53 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 12:00:53 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Win32/Path.inc Message-ID: <200703291700.l2TH0rxs013064@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Win32: Path.inc updated: 1.60 -> 1.61 --- Log message: Add a uniqueID field to the FileStatus structure for Paths. This will map to the inode number on Unix and something far less unique on Windows. The windows case needs to be improved. --- Diffs of the changes: (+7 -0) Path.inc | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/lib/System/Win32/Path.inc diff -u llvm/lib/System/Win32/Path.inc:1.60 llvm/lib/System/Win32/Path.inc:1.61 --- llvm/lib/System/Win32/Path.inc:1.60 Thu Mar 29 11:43:20 2007 +++ llvm/lib/System/Win32/Path.inc Thu Mar 29 12:00:31 2007 @@ -319,6 +319,13 @@ status->user = 9999; // Not applicable to Windows, so... status->group = 9999; // Not applicable to Windows, so... + // FIXME: this is only unique if the file is accessed by the same file path. + // How do we do this for C:\dir\file and ..\dir\file ? Unix has inode + // numbers, but the concept doesn't exist in Windows. + status->uniqueID = 0; + for (unsigned i = 0; i < path.length(); ++i) + status->uniqueID += path[i]; + __int64 ft = *reinterpret_cast<__int64*>(&fi.ftLastWriteTime); status->modTime.fromWin32Time(ft); From jeffc at jolt-lang.org Thu Mar 29 12:01:09 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 12:01:09 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/Makefile config.h Message-ID: <200703291701.l2TH19xs013083@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/office-ispell: Makefile updated: 1.1 -> 1.2 config.h updated: 1.1 -> 1.2 --- Log message: Fix for src != obj. Don't use obsolete header file. --- Diffs of the changes: (+7 -3) Makefile | 2 +- config.h | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) Index: llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/Makefile diff -u llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/Makefile:1.1 llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/Makefile:1.2 --- llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/Makefile:1.1 Tue Jan 9 17:57:18 2007 +++ llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/Makefile Thu Mar 29 12:00:52 2007 @@ -3,6 +3,6 @@ PROG = office-ispell CPPFLAGS = -Dconst= LDFLAGS = -lm -RUN_OPTIONS = -a -d americanmed+ < large.txt +RUN_OPTIONS = -a -d americanmed+ < $(PROJ_SRC_DIR)/large.txt include $(LEVEL)/MultiSource/Makefile.multisrc Index: llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/config.h diff -u llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/config.h:1.1 llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/config.h:1.2 --- llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/config.h:1.1 Tue Jan 9 17:57:18 2007 +++ llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/config.h Thu Mar 29 12:00:52 2007 @@ -52,9 +52,13 @@ */ /* - * $Id: config.h,v 1.1 2007/01/09 23:57:18 lattner Exp $ + * $Id: config.h,v 1.2 2007/03/29 17:00:52 jeffc Exp $ * * $Log: config.h,v $ + * Revision 1.2 2007/03/29 17:00:52 jeffc + * Fix for src != obj. + * Don't use obsolete header file. + * * Revision 1.1 2007/01/09 23:57:18 lattner * initial recheckin of mibench * @@ -114,7 +118,7 @@ #include #include #ifndef USG -#include +#include #endif /* USG */ /* From jeffc at jolt-lang.org Thu Mar 29 12:03:03 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 12:03:03 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/MiBench/telecomm-CRC32/Makefile Message-ID: <200703291703.l2TH33hO013155@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/telecomm-CRC32: Makefile updated: 1.1 -> 1.2 --- Log message: Fix for src != obj. --- Diffs of the changes: (+1 -1) Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/MultiSource/Benchmarks/MiBench/telecomm-CRC32/Makefile diff -u llvm-test/MultiSource/Benchmarks/MiBench/telecomm-CRC32/Makefile:1.1 llvm-test/MultiSource/Benchmarks/MiBench/telecomm-CRC32/Makefile:1.2 --- llvm-test/MultiSource/Benchmarks/MiBench/telecomm-CRC32/Makefile:1.1 Tue Jan 9 18:01:14 2007 +++ llvm-test/MultiSource/Benchmarks/MiBench/telecomm-CRC32/Makefile Thu Mar 29 12:02:46 2007 @@ -2,6 +2,6 @@ PROG = telecomm-CRC32 LDFLAGS = -lm -RUN_OPTIONS = large.pcm +RUN_OPTIONS = $(PROJ_SRC_DIR)/large.pcm include $(LEVEL)/MultiSource/Makefile.multisrc From jeffc at jolt-lang.org Thu Mar 29 12:27:55 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 12:27:55 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Win32/Path.inc Message-ID: <200703291727.l2THRtlx013677@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Win32: Path.inc updated: 1.61 -> 1.62 --- Log message: Determine absolute paths the correct way :) --- Diffs of the changes: (+9 -3) Path.inc | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) Index: llvm/lib/System/Win32/Path.inc diff -u llvm/lib/System/Win32/Path.inc:1.61 llvm/lib/System/Win32/Path.inc:1.62 --- llvm/lib/System/Win32/Path.inc:1.61 Thu Mar 29 12:00:31 2007 +++ llvm/lib/System/Win32/Path.inc Thu Mar 29 12:27:38 2007 @@ -107,9 +107,15 @@ bool Path::isAbsolute() const { - if (path.length() < 3) - return false; - return path[0] == 'C' && path[1] == ':' && path[2] == '\\'; + switch (path.length()) { + case 0: + return false; + case 1: + case 2: + return path[0] == '/'; + default: + return path[0] == '/' || (path[1] == ':' && path[2] == '/'); + } } static Path *TempDirectory = NULL; From jeffc at jolt-lang.org Thu Mar 29 12:28:48 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 12:28:48 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/System/Path.h Message-ID: <200703291728.l2THSmmN013705@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/System: Path.h updated: 1.46 -> 1.47 --- Log message: uniqueID is a uint64_t (caught by VC++) --- Diffs of the changes: (+1 -1) Path.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/System/Path.h diff -u llvm/include/llvm/System/Path.h:1.46 llvm/include/llvm/System/Path.h:1.47 --- llvm/include/llvm/System/Path.h:1.46 Thu Mar 29 12:00:31 2007 +++ llvm/include/llvm/System/Path.h Thu Mar 29 12:28:31 2007 @@ -52,7 +52,7 @@ uint32_t getMode() const { return mode; } uint32_t getUser() const { return user; } uint32_t getGroup() const { return group; } - uint32_t getUniqueID() const { return uniqueID; } + uint64_t getUniqueID() const { return uniqueID; } }; /// This class provides an abstraction for the path to a file or directory From jeffc at jolt-lang.org Thu Mar 29 12:30:16 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 12:30:16 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-ar/llvm-ar.cpp Message-ID: <200703291730.l2THUGoK013753@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-ar: llvm-ar.cpp updated: 1.40 -> 1.41 --- Log message: getFileStatus has a new parameter (caught by VC++). --- Diffs of the changes: (+2 -2) llvm-ar.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/tools/llvm-ar/llvm-ar.cpp diff -u llvm/tools/llvm-ar/llvm-ar.cpp:1.40 llvm/tools/llvm-ar/llvm-ar.cpp:1.41 --- llvm/tools/llvm-ar/llvm-ar.cpp:1.40 Tue Dec 5 19:18:00 2006 +++ llvm/tools/llvm-ar/llvm-ar.cpp Thu Mar 29 12:29:59 2007 @@ -310,7 +310,7 @@ throw std::string("File does not exist: ") + Members[i]; sys::FileStatus si; std::string Err; - if (aPath.getFileStatus(si, &Err)) + if (aPath.getFileStatus(si, false, &Err)) throw Err; if (si.isDir) { std::set dirpaths; @@ -646,7 +646,7 @@ if (found != remaining.end()) { sys::FileStatus si; std::string Err; - if (found->getFileStatus(si, &Err)) + if (found->getFileStatus(si, false, &Err)) return true; if (si.isDir) { if (OnlyUpdate) { From jeffc at jolt-lang.org Thu Mar 29 12:42:38 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 12:42:38 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/CBackend.cpp Message-ID: <200703291742.l2THgcB8013958@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: CBackend.cpp updated: 1.330 -> 1.331 --- Log message: MS C does have inlining after all, just uses _inline instead of inline. --- Diffs of the changes: (+1 -1) CBackend.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/CBackend/CBackend.cpp diff -u llvm/lib/Target/CBackend/CBackend.cpp:1.330 llvm/lib/Target/CBackend/CBackend.cpp:1.331 --- llvm/lib/Target/CBackend/CBackend.cpp:1.330 Wed Mar 28 18:08:37 2007 +++ llvm/lib/Target/CBackend/CBackend.cpp Thu Mar 29 12:42:21 2007 @@ -1294,7 +1294,7 @@ << "#elif defined(__FreeBSD__) || defined(__OpenBSD__)\n" << "#define alloca(x) __builtin_alloca(x)\n" << "#elif defined(_MSC_VER)\n" - << "#define inline\n" + << "#define inline _inline\n" << "#define alloca(x) _alloca(x)\n" << "#else\n" << "#include \n" From clattner at apple.com Thu Mar 29 12:43:39 2007 From: clattner at apple.com (Chris Lattner) Date: Thu, 29 Mar 2007 10:43:39 -0700 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/Makefile lame.c In-Reply-To: <200703291654.l2TGsBLR012825@zion.cs.uiuc.edu> References: <200703291654.l2TGsBLR012825@zion.cs.uiuc.edu> Message-ID: <937A6339-7FE4-408A-A55F-12A2FD0FEDA0@apple.com> On Mar 29, 2007, at 9:54 AM, Jeff Cohen wrote: > Don't include header files from within a function. Aww, you're no fun. :) Thanks for all the fixes Jeff! -Chris From jeffc at jolt-lang.org Thu Mar 29 12:44:54 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 12:44:54 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/MiBench/telecomm-adpcm/Makefile Message-ID: <200703291744.l2THisVG014017@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/telecomm-adpcm: Makefile updated: 1.1 -> 1.2 --- Log message: Fix for src != obj. --- Diffs of the changes: (+1 -1) Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/MultiSource/Benchmarks/MiBench/telecomm-adpcm/Makefile diff -u llvm-test/MultiSource/Benchmarks/MiBench/telecomm-adpcm/Makefile:1.1 llvm-test/MultiSource/Benchmarks/MiBench/telecomm-adpcm/Makefile:1.2 --- llvm-test/MultiSource/Benchmarks/MiBench/telecomm-adpcm/Makefile:1.1 Tue Jan 9 17:57:19 2007 +++ llvm-test/MultiSource/Benchmarks/MiBench/telecomm-adpcm/Makefile Thu Mar 29 12:44:34 2007 @@ -2,6 +2,6 @@ PROG = telecomm-adpcm LDFLAGS = -lm -RUN_OPTIONS = < large.adpcm +RUN_OPTIONS = < $(PROJ_SRC_DIR)/large.adpcm include $(LEVEL)/MultiSource/Makefile.multisrc From jeffc at jolt-lang.org Thu Mar 29 12:46:49 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 12:46:49 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/MiBench/telecomm-gsm/Makefile Message-ID: <200703291746.l2THknhu014056@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/telecomm-gsm: Makefile updated: 1.2 -> 1.3 --- Log message: Fix for src != obj. --- Diffs of the changes: (+1 -1) Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/MultiSource/Benchmarks/MiBench/telecomm-gsm/Makefile diff -u llvm-test/MultiSource/Benchmarks/MiBench/telecomm-gsm/Makefile:1.2 llvm-test/MultiSource/Benchmarks/MiBench/telecomm-gsm/Makefile:1.3 --- llvm-test/MultiSource/Benchmarks/MiBench/telecomm-gsm/Makefile:1.2 Thu Jan 11 18:42:50 2007 +++ llvm-test/MultiSource/Benchmarks/MiBench/telecomm-gsm/Makefile Thu Mar 29 12:46:32 2007 @@ -3,5 +3,5 @@ PROG = telecomm-gsm CPPFLAGS = -DSTUPID_COMPILER -DNeedFunctionPrototypes=1 -DSASR LDFLAGS = -lm -RUN_OPTIONS = -fps -c large.au +RUN_OPTIONS = -fps -c $(PROJ_SRC_DIR)/large.au include $(LEVEL)/MultiSource/Makefile.multisrc From jeffc at jolt-lang.org Thu Mar 29 12:53:07 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Thu, 29 Mar 2007 12:53:07 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Applications/JM/ldecod/Makefile Message-ID: <200703291753.l2THr7Bw014165@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Applications/JM/ldecod: Makefile updated: 1.7 -> 1.8 --- Log message: Don't put program output back in src tree. --- Diffs of the changes: (+1 -1) Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/MultiSource/Applications/JM/ldecod/Makefile diff -u llvm-test/MultiSource/Applications/JM/ldecod/Makefile:1.7 llvm-test/MultiSource/Applications/JM/ldecod/Makefile:1.8 --- llvm-test/MultiSource/Applications/JM/ldecod/Makefile:1.7 Thu Feb 8 16:42:38 2007 +++ llvm-test/MultiSource/Applications/JM/ldecod/Makefile Thu Mar 29 12:52:50 2007 @@ -3,6 +3,6 @@ CPPFLAGS = -D __USE_LARGEFILE64 -D _FILE_OFFSET_BITS=64 LDFLAGS = -lm $(TOOLLINKOPTS) -RUN_OPTIONS = -i $(PROJ_SRC_DIR)/data/test.264 -o $(PROJ_SRC_DIR)/data/test_dec.yuv -r $(PROJ_SRC_DIR)/data/test_rec.yuv +RUN_OPTIONS = -i $(PROJ_SRC_DIR)/data/test.264 -o test_dec.yuv -r $(PROJ_SRC_DIR)/data/test_rec.yuv include ../../../Makefile.multisrc From sabre at nondot.org Thu Mar 29 13:14:17 2007 From: sabre at nondot.org (Chris Lattner) Date: Thu, 29 Mar 2007 13:14:17 -0500 Subject: [llvm-commits] CVS: llvm/Makefile Message-ID: <200703291814.l2TIEHhu014618@zion.cs.uiuc.edu> Changes in directory llvm: Makefile updated: 1.70 -> 1.71 --- Log message: don't build runtime for now, ever --- Diffs of the changes: (+5 -3) Makefile | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) Index: llvm/Makefile diff -u llvm/Makefile:1.70 llvm/Makefile:1.71 --- llvm/Makefile:1.70 Wed Feb 21 00:23:20 2007 +++ llvm/Makefile Thu Mar 29 13:14:00 2007 @@ -25,10 +25,12 @@ include $(LEVEL)/Makefile.config -# llvm-gcc4 doesn't need runtime libs. -ifeq ($(LLVMGCC_MAJVERS),4) +# llvm-gcc4 doesn't need runtime libs. llvm-gcc4 is the only supported one. +# FIXME: Remove runtime entirely once we have an understanding of where +# libprofile etc should go. +#ifeq ($(LLVMGCC_MAJVERS),4) DIRS := $(filter-out runtime, $(DIRS)) -endif +#endif ifeq ($(MAKECMDGOALS),libs-only) DIRS := $(filter-out tools runtime docs, $(DIRS)) From sabre at nondot.org Thu Mar 29 13:30:43 2007 From: sabre at nondot.org (Chris Lattner) Date: Thu, 29 Mar 2007 13:30:43 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/ModuleProvider.h Message-ID: <200703291830.l2TIUh53014956@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: ModuleProvider.h updated: 1.13 -> 1.14 --- Log message: add a hook to demat functions. --- Diffs of the changes: (+7 -0) ModuleProvider.h | 7 +++++++ 1 files changed, 7 insertions(+) Index: llvm/include/llvm/ModuleProvider.h diff -u llvm/include/llvm/ModuleProvider.h:1.13 llvm/include/llvm/ModuleProvider.h:1.14 --- llvm/include/llvm/ModuleProvider.h:1.13 Thu Jul 6 19:01:01 2006 +++ llvm/include/llvm/ModuleProvider.h Thu Mar 29 13:30:26 2007 @@ -43,6 +43,13 @@ /// virtual bool materializeFunction(Function *F, std::string *ErrInfo = 0) = 0; + /// dematerializeFunction - If the given function is read in, and if the + /// module provider supports it, release the memory for the function, and set + /// it up to be materialized lazily. If the provider doesn't support this + /// capability, this method is a noop. + /// + virtual void dematerializeFunction(Function *F) {} + /// materializeModule - make sure the entire Module has been completely read. /// On error, return null and fill in the error string if specified. /// From reid at x10sys.com Thu Mar 29 13:49:45 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 13:49:45 -0500 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y Lexer.l Message-ID: <200703291849.l2TInjP1015250@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.y updated: 1.333 -> 1.334 Lexer.l updated: 1.102 -> 1.103 --- Log message: Give users a grace period on the implementation keyword. This *will* get removed in a few days. --- Diffs of the changes: (+3 -3) Lexer.l | 2 +- llvmAsmParser.y | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.333 llvm/lib/AsmParser/llvmAsmParser.y:1.334 --- llvm/lib/AsmParser/llvmAsmParser.y:1.333 Tue Mar 27 21:36:42 2007 +++ llvm/lib/AsmParser/llvmAsmParser.y Thu Mar 29 13:49:28 2007 @@ -1039,7 +1039,7 @@ %type OptAlign OptCAlign %type OptSection SectionString -%token CHECKPOINT ZEROINITIALIZER TRUETOK FALSETOK BEGINTOK ENDTOK +%token IMPLEMENTATION ZEROINITIALIZER TRUETOK FALSETOK BEGINTOK ENDTOK %token DECLARE DEFINE GLOBAL CONSTANT SECTION VOLATILE %token TO DOTDOTDOT NULL_TOK UNDEF INTERNAL LINKONCE WEAK APPENDING %token DLLIMPORT DLLEXPORT EXTERN_WEAK @@ -1942,7 +1942,7 @@ | MODULE ASM_TOK AsmBlock { CHECK_FOR_ERROR } - | CHECKPOINT { + | IMPLEMENTATION { // Emit an error if there are any unresolved types left. if (!CurModule.LateResolveTypes.empty()) { const ValID &DID = CurModule.LateResolveTypes.begin()->first; Index: llvm/lib/AsmParser/Lexer.l diff -u llvm/lib/AsmParser/Lexer.l:1.102 llvm/lib/AsmParser/Lexer.l:1.103 --- llvm/lib/AsmParser/Lexer.l:1.102 Tue Mar 27 21:36:42 2007 +++ llvm/lib/AsmParser/Lexer.l Thu Mar 29 13:49:28 2007 @@ -208,7 +208,7 @@ hidden { return HIDDEN; } extern_weak { return EXTERN_WEAK; } external { return EXTERNAL; } -checkpoint { return CHECKPOINT; } +implementation { return IMPLEMENTATION; } zeroinitializer { return ZEROINITIALIZER; } \.\.\. { return DOTDOTDOT; } undef { return UNDEF; } From reid at x10sys.com Thu Mar 29 13:57:15 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 13:57:15 -0500 Subject: [llvm-commits] CVS: llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx Message-ID: <200703291857.l2TIvFkL015465@zion.cs.uiuc.edu> Changes in directory llvm/test/Assembler: 2003-12-30-TypeMapInvalidMemory.llx updated: 1.7 -> 1.8 --- Log message: checkpoint -> implementation. This really needs to just drop the need for a keyword by having the assembler check for incomplete types and values upon end-of-file. --- Diffs of the changes: (+1 -1) 2003-12-30-TypeMapInvalidMemory.llx | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx diff -u llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx:1.7 llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx:1.8 --- llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx:1.7 Tue Mar 27 21:34:53 2007 +++ llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx Thu Mar 29 13:56:58 2007 @@ -53,4 +53,4 @@ i32, i32, i32, i32, i32, i32, i32, i32, i32 }*)** null } -checkpoint +implementation From sabre at nondot.org Thu Mar 29 13:58:25 2007 From: sabre at nondot.org (Chris Lattner) Date: Thu, 29 Mar 2007 13:58:25 -0500 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Reader.h Message-ID: <200703291858.l2TIwPHl015533@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.243 -> 1.244 Reader.h updated: 1.50 -> 1.51 --- Log message: the bytecode reader supports dematerializeFunction --- Diffs of the changes: (+22 -7) Reader.cpp | 3 --- Reader.h | 26 ++++++++++++++++++++++---- 2 files changed, 22 insertions(+), 7 deletions(-) Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.243 llvm/lib/Bytecode/Reader/Reader.cpp:1.244 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.243 Thu Mar 1 14:25:31 2007 +++ llvm/lib/Bytecode/Reader/Reader.cpp Thu Mar 29 13:58:08 2007 @@ -1636,8 +1636,6 @@ BlockEnd = Fi->second.EndBuf; assert(Fi->first == Func && "Found wrong function?"); - LazyFunctionLoadMap.erase(Fi); - this->ParseFunctionBody(Func); return false; } @@ -1668,7 +1666,6 @@ ParseFunctionBody(Func); ++Fi; } - LazyFunctionLoadMap.clear(); return false; } Index: llvm/lib/Bytecode/Reader/Reader.h diff -u llvm/lib/Bytecode/Reader/Reader.h:1.50 llvm/lib/Bytecode/Reader/Reader.h:1.51 --- llvm/lib/Bytecode/Reader/Reader.h:1.50 Tue Feb 13 01:28:20 2007 +++ llvm/lib/Bytecode/Reader/Reader.h Thu Mar 29 13:58:08 2007 @@ -154,20 +154,38 @@ bool ParseAllFunctionBodies(std::string* ErrMsg); /// @brief Parse the next function of specific type - bool ParseFunction(Function* Func, std::string* ErrMsg) ; + bool ParseFunction(Function* Func, std::string* ErrMsg); /// This method is abstract in the parent ModuleProvider class. Its /// implementation is identical to the ParseFunction method. /// @see ParseFunction /// @brief Make a specific function materialize. virtual bool materializeFunction(Function *F, std::string *ErrMsg = 0) { - LazyFunctionMap::iterator Fi = LazyFunctionLoadMap.find(F); - if (Fi == LazyFunctionLoadMap.end()) - return false; + // If it already is material, ignore the request. + if (!F->hasNotBeenReadFromBytecode()) return false; + + assert(LazyFunctionLoadMap.count(F) && + "not materialized but I don't know about it?"); if (ParseFunction(F,ErrMsg)) return true; return false; } + + /// dematerializeFunction - If the given function is read in, and if the + /// module provider supports it, release the memory for the function, and set + /// it up to be materialized lazily. If the provider doesn't support this + /// capability, this method is a noop. + /// + virtual void dematerializeFunction(Function *F) { + // If the function is not materialized, or if it is a prototype, ignore. + if (F->hasNotBeenReadFromBytecode() || + F->isDeclaration()) + return; + + // Just forget the function body, we can remat it later. + F->deleteBody(); + F->setLinkage(GlobalValue::GhostLinkage); + } /// This method is abstract in the parent ModuleProvider class. Its /// implementation is identical to ParseAllFunctionBodies. From reid at x10sys.com Thu Mar 29 14:06:30 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 14:06:30 -0500 Subject: [llvm-commits] CVS: llvm-stacker/lib/compiler/Makefile Message-ID: <200703291906.l2TJ6U58015777@zion.cs.uiuc.edu> Changes in directory llvm-stacker/lib/compiler: Makefile updated: 1.11 -> 1.12 --- Log message: For PR789: http://llvm.org/PR789 : Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. --- Diffs of the changes: (+1 -0) Makefile | 1 + 1 files changed, 1 insertion(+) Index: llvm-stacker/lib/compiler/Makefile diff -u llvm-stacker/lib/compiler/Makefile:1.11 llvm-stacker/lib/compiler/Makefile:1.12 --- llvm-stacker/lib/compiler/Makefile:1.11 Sun Feb 4 16:25:16 2007 +++ llvm-stacker/lib/compiler/Makefile Thu Mar 29 14:05:44 2007 @@ -14,6 +14,7 @@ REQUIRES_EH := 1 include $(LEVEL)/Makefile.common +include $(LLVMMAKE)/archive ifdef PARSE_DEBUG INCLUDES += -DPARSE_DEBUG From reid at x10sys.com Thu Mar 29 14:06:31 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 14:06:31 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Win32/Path.inc Signals.inc Message-ID: <200703291906.l2TJ6V39015789@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Win32: Path.inc updated: 1.62 -> 1.63 Signals.inc updated: 1.22 -> 1.23 --- Log message: For PR789: http://llvm.org/PR789 : Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. --- Diffs of the changes: (+18 -16) Path.inc | 28 ++++++++++++++-------------- Signals.inc | 6 ++++-- 2 files changed, 18 insertions(+), 16 deletions(-) Index: llvm/lib/System/Win32/Path.inc diff -u llvm/lib/System/Win32/Path.inc:1.62 llvm/lib/System/Win32/Path.inc:1.63 --- llvm/lib/System/Win32/Path.inc:1.62 Thu Mar 29 12:27:38 2007 +++ llvm/lib/System/Win32/Path.inc Thu Mar 29 14:05:44 2007 @@ -306,13 +306,15 @@ return path.substr(pos+1); } -bool -Path::getFileStatus(FileStatus &info, bool update, std::string *ErrStr) const { +const FileStatus * +Path::getFileStatus(bool update, std::string *ErrStr) const { if (status == 0 || update) { WIN32_FILE_ATTRIBUTE_DATA fi; - if (!GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi)) - return MakeErrMsg(ErrStr, "getStatusInfo():" + std::string(path) + + if (!GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi)) { + MakeErrMsg(ErrStr, "getStatusInfo():" + std::string(path) + ": Can't get status: "); + return 0; + } if (status == 0) status = new FileStatus; @@ -337,8 +339,7 @@ status->isDir = fi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY; } - info = *status; - return false; + return status; } bool Path::makeReadableOnDisk(std::string* ErrMsg) { @@ -369,11 +370,10 @@ bool Path::getDirectoryContents(std::set& result, std::string* ErrMsg) const { - FileStatus Status; - if (getFileStatus(Status, ErrMsg)) + const FileStatus *Status = getFileStatus(false, ErrMsg); + if (!Status) return true; - - if (!Status.isDir) { + if (!Status->isDir) { MakeErrMsg(ErrMsg, path + ": not a directory"); return true; } @@ -567,11 +567,11 @@ bool Path::eraseFromDisk(bool remove_contents, std::string *ErrStr) const { - FileStatus Status; - if (getFileStatus(Status, ErrStr)) + const FileStatus *Status = getFileStatus(false, ErrStr); + if (!Status) return false; - if (Status.isFile) { + if (Status->isFile) { DWORD attr = GetFileAttributes(path.c_str()); // If it doesn't exist, we're done. @@ -588,7 +588,7 @@ if (!DeleteFile(path.c_str())) return MakeErrMsg(ErrStr, path + ": Can't destroy file: "); return false; - } else if (Status.isDir) { + } else if (Status->isDir) { // If it doesn't exist, we're done. if (!exists()) return false; Index: llvm/lib/System/Win32/Signals.inc diff -u llvm/lib/System/Win32/Signals.inc:1.22 llvm/lib/System/Win32/Signals.inc:1.23 --- llvm/lib/System/Win32/Signals.inc:1.22 Fri Aug 25 16:37:17 2006 +++ llvm/lib/System/Win32/Signals.inc Thu Mar 29 14:05:44 2007 @@ -101,8 +101,10 @@ // RemoveDirectoryOnSignal - The public API bool sys::RemoveDirectoryOnSignal(const sys::Path& path, std::string* ErrMsg) { // Not a directory? - sys::FileStatus Status; - if (path.getFileStatus(Status) || !Status.isDir) { + const sys::FileStatus *Status = path.getFileStatus(false, ErrMsg); + if (!Status) + return true; + if (!Status->isDir) { if (ErrMsg) *ErrMsg = path.toString() + " is not a directory"; return true; From reid at x10sys.com Thu Mar 29 14:06:31 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 14:06:31 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-ar/llvm-ar.cpp Message-ID: <200703291906.l2TJ6VY8015782@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-ar: llvm-ar.cpp updated: 1.41 -> 1.42 --- Log message: For PR789: http://llvm.org/PR789 : Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. --- Diffs of the changes: (+16 -16) llvm-ar.cpp | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) Index: llvm/tools/llvm-ar/llvm-ar.cpp diff -u llvm/tools/llvm-ar/llvm-ar.cpp:1.41 llvm/tools/llvm-ar/llvm-ar.cpp:1.42 --- llvm/tools/llvm-ar/llvm-ar.cpp:1.41 Thu Mar 29 12:29:59 2007 +++ llvm/tools/llvm-ar/llvm-ar.cpp Thu Mar 29 14:05:44 2007 @@ -281,16 +281,16 @@ for (std::set::iterator I = content.begin(), E = content.end(); I != E; ++I) { // Make sure it exists and is a directory - sys::FileStatus Status; - if (I->getFileStatus(Status)) { - if (Status.isDir) { - std::set moreResults; - if (recurseDirectories(*I, moreResults, ErrMsg)) - return true; - result.insert(moreResults.begin(), moreResults.end()); - } else { + const sys::FileStatus *Status = I->getFileStatus(false, ErrMsg); + if (!Status) + return true; + if (Status->isDir) { + std::set moreResults; + if (recurseDirectories(*I, moreResults, ErrMsg)) + return true; + result.insert(moreResults.begin(), moreResults.end()); + } else { result.insert(*I); - } } } } @@ -308,11 +308,11 @@ if (checkExistence) { if (!aPath.exists()) throw std::string("File does not exist: ") + Members[i]; - sys::FileStatus si; std::string Err; - if (aPath.getFileStatus(si, false, &Err)) + const sys::FileStatus *si = aPath.getFileStatus(false, &Err); + if (!si) throw Err; - if (si.isDir) { + if (si->isDir) { std::set dirpaths; if (recurseDirectories(aPath, dirpaths, ErrMsg)) return true; @@ -644,14 +644,14 @@ } if (found != remaining.end()) { - sys::FileStatus si; std::string Err; - if (found->getFileStatus(si, false, &Err)) + const sys::FileStatus *si = found->getFileStatus(false, &Err); + if (!si) return true; - if (si.isDir) { + if (si->isDir) { if (OnlyUpdate) { // Replace the item only if it is newer. - if (si.modTime > I->getModTime()) + if (si->modTime > I->getModTime()) if (I->replaceWith(*found, ErrMsg)) return true; } else { From reid at x10sys.com Thu Mar 29 14:06:31 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 14:06:31 -0500 Subject: [llvm-commits] CVS: llvm-stacker/Makefile.common.in Message-ID: <200703291906.l2TJ6Vpk015787@zion.cs.uiuc.edu> Changes in directory llvm-stacker: Makefile.common.in updated: 1.3 -> 1.4 --- Log message: For PR789: http://llvm.org/PR789 : Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. --- Diffs of the changes: (+1 -1) Makefile.common.in | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-stacker/Makefile.common.in diff -u llvm-stacker/Makefile.common.in:1.3 llvm-stacker/Makefile.common.in:1.4 --- llvm-stacker/Makefile.common.in:1.3 Sun Feb 4 16:25:16 2007 +++ llvm-stacker/Makefile.common.in Thu Mar 29 14:05:44 2007 @@ -26,4 +26,4 @@ PROJ_INSTALL_ROOT := @prefix@ # Include LLVM's Master Makefile. -include $(LLVM_OBJ_ROOT)/Makefile.common +include $(LLVM_OBJ_ROOT)/Makefile.config From reid at x10sys.com Thu Mar 29 14:06:32 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 14:06:32 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/FileUtilities.cpp Message-ID: <200703291906.l2TJ6VqC015799@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: FileUtilities.cpp updated: 1.54 -> 1.55 --- Log message: For PR789: http://llvm.org/PR789 : Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. --- Diffs of the changes: (+6 -5) FileUtilities.cpp | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) Index: llvm/lib/Support/FileUtilities.cpp diff -u llvm/lib/Support/FileUtilities.cpp:1.54 llvm/lib/Support/FileUtilities.cpp:1.55 --- llvm/lib/Support/FileUtilities.cpp:1.54 Thu Mar 29 11:48:16 2007 +++ llvm/lib/Support/FileUtilities.cpp Thu Mar 29 14:05:44 2007 @@ -152,16 +152,17 @@ const sys::Path &FileB, double AbsTol, double RelTol, std::string *Error) { - sys::FileStatus FileAStat, FileBStat; - if (FileA.getFileStatus(FileAStat, false, Error)) + const sys::FileStatus *FileAStat = FileA.getFileStatus(false, Error); + if (!FileAStat) return 2; - if (FileB.getFileStatus(FileBStat, false, Error)) + const sys::FileStatus *FileBStat = FileB.getFileStatus(false, Error); + if (!FileBStat) return 2; // Check for zero length files because some systems croak when you try to // mmap an empty file. - size_t A_size = FileAStat.getSize(); - size_t B_size = FileBStat.getSize(); + size_t A_size = FileAStat->getSize(); + size_t B_size = FileBStat->getSize(); // If they are both zero sized then they're the same if (A_size == 0 && B_size == 0) From reid at x10sys.com Thu Mar 29 14:06:33 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 14:06:33 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-db/Commands.cpp Message-ID: <200703291906.l2TJ6XpT015804@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-db: Commands.cpp updated: 1.10 -> 1.11 --- Log message: For PR789: http://llvm.org/PR789 : Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. --- Diffs of the changes: (+3 -3) Commands.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/tools/llvm-db/Commands.cpp diff -u llvm/tools/llvm-db/Commands.cpp:1.10 llvm/tools/llvm-db/Commands.cpp:1.11 --- llvm/tools/llvm-db/Commands.cpp:1.10 Fri Jul 28 17:03:44 2006 +++ llvm/tools/llvm-db/Commands.cpp Thu Mar 29 14:05:44 2007 @@ -50,11 +50,11 @@ // If the program has been modified, reload it! sys::Path Program(Dbg.getProgramPath()); - sys::FileStatus Status; std::string Err; - if (Program.getFileStatus(Status, &Err)) + const sys::FileStatus *Status = Program.getFileStatus(false, &Err); + if (!Status) throw Err; - if (TheProgramInfo->getProgramTimeStamp() != Status.getTimestamp()) { + if (TheProgramInfo->getProgramTimeStamp() != Status->getTimestamp()) { std::cout << "'" << Program << "' has changed; re-reading program.\n"; // Unload an existing program. This kills the program if necessary. From reid at x10sys.com Thu Mar 29 14:06:33 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 14:06:33 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.config.in Makefile.rules Message-ID: <200703291906.l2TJ6X34015811@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.config.in updated: 1.74 -> 1.75 Makefile.rules updated: 1.428 -> 1.429 --- Log message: For PR789: http://llvm.org/PR789 : Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. --- Diffs of the changes: (+4 -0) Makefile.config.in | 2 ++ Makefile.rules | 2 ++ 2 files changed, 4 insertions(+) Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.74 llvm/Makefile.config.in:1.75 --- llvm/Makefile.config.in:1.74 Wed Jan 17 14:24:45 2007 +++ llvm/Makefile.config.in Thu Mar 29 14:05:44 2007 @@ -74,6 +74,8 @@ endif endif +LLVMMAKE := $(LLVM_SRC_ROOT)/make + PROJ_bindir := $(DESTDIR)$(PROJ_prefix)/bin PROJ_libdir := $(DESTDIR)$(PROJ_prefix)/lib PROJ_datadir := $(DESTDIR)$(PROJ_prefix)/share Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.428 llvm/Makefile.rules:1.429 --- llvm/Makefile.rules:1.428 Tue Feb 27 23:10:40 2007 +++ llvm/Makefile.rules Thu Mar 29 14:05:44 2007 @@ -1760,3 +1760,5 @@ $(Echo) "Module : " '$(Module)' $(Echo) "FilesToConfig: " '$(FilesToConfigPATH)' $(Echo) "SubDirs : " '$(SubDirs)' + $(Echo) "ProjLibsPaths: " '$(ProjLibsPaths)' + $(Echo) "ProjLibsOptions: " '$(ProjLibsOptions)' From reid at x10sys.com Thu Mar 29 14:06:33 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 14:06:33 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvmc/CompilerDriver.cpp Message-ID: <200703291906.l2TJ6XgF015816@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvmc: CompilerDriver.cpp updated: 1.45 -> 1.46 --- Log message: For PR789: http://llvm.org/PR789 : Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. --- Diffs of the changes: (+2 -2) CompilerDriver.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/tools/llvmc/CompilerDriver.cpp diff -u llvm/tools/llvmc/CompilerDriver.cpp:1.45 llvm/tools/llvmc/CompilerDriver.cpp:1.46 --- llvm/tools/llvmc/CompilerDriver.cpp:1.45 Fri Feb 16 13:11:07 2007 +++ llvm/tools/llvmc/CompilerDriver.cpp Thu Mar 29 14:05:44 2007 @@ -195,8 +195,8 @@ void cleanup() { if (!isSet(KEEP_TEMPS_FLAG)) { - sys::FileStatus Status; - if (!TempDir.getFileStatus(Status) && Status.isDir) + const sys::FileStatus *Status = TempDir.getFileStatus(); + if (Status && Status->isDir) TempDir.eraseFromDisk(/*remove_contents=*/true); } else { std::cout << "Temporary files are in " << TempDir << "\n"; From reid at x10sys.com Thu Mar 29 14:06:34 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 14:06:34 -0500 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Archive/Archive.cpp ArchiveWriter.cpp Message-ID: <200703291906.l2TJ6YPO015831@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Archive: Archive.cpp updated: 1.18 -> 1.19 ArchiveWriter.cpp updated: 1.35 -> 1.36 --- Log message: For PR789: http://llvm.org/PR789 : Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. --- Diffs of the changes: (+8 -2) Archive.cpp | 5 ++++- ArchiveWriter.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) Index: llvm/lib/Bytecode/Archive/Archive.cpp diff -u llvm/lib/Bytecode/Archive/Archive.cpp:1.18 llvm/lib/Bytecode/Archive/Archive.cpp:1.19 --- llvm/lib/Bytecode/Archive/Archive.cpp:1.18 Thu Mar 29 11:48:16 2007 +++ llvm/lib/Bytecode/Archive/Archive.cpp Thu Mar 29 14:05:44 2007 @@ -116,7 +116,10 @@ path.getMagicNumber(magic,4); signature = magic.c_str(); std::string err; - if (path.getFileStatus(info, false, ErrMsg)) + const sys::FileStatus *FSinfo = path.getFileStatus(false, ErrMsg); + if (FSinfo) + info = *FSinfo; + else return true; } Index: llvm/lib/Bytecode/Archive/ArchiveWriter.cpp diff -u llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.35 llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.36 --- llvm/lib/Bytecode/Archive/ArchiveWriter.cpp:1.35 Thu Mar 29 11:48:16 2007 +++ llvm/lib/Bytecode/Archive/ArchiveWriter.cpp Thu Mar 29 14:05:44 2007 @@ -163,7 +163,10 @@ mbr->data = 0; mbr->path = filePath; - if (mbr->path.getFileStatus(mbr->info, false, ErrMsg)) + const sys::FileStatus *FSInfo = mbr->path.getFileStatus(false, ErrMsg); + if (FSInfo) + mbr->info = *FSInfo; + else return true; unsigned flags = 0; From reid at x10sys.com Thu Mar 29 14:06:34 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 14:06:34 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/System/Path.h Message-ID: <200703291906.l2TJ6YJb015819@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/System: Path.h updated: 1.47 -> 1.48 --- Log message: For PR789: http://llvm.org/PR789 : Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. --- Diffs of the changes: (+15 -9) Path.h | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) Index: llvm/include/llvm/System/Path.h diff -u llvm/include/llvm/System/Path.h:1.47 llvm/include/llvm/System/Path.h:1.48 --- llvm/include/llvm/System/Path.h:1.47 Thu Mar 29 12:28:31 2007 +++ llvm/include/llvm/System/Path.h Thu Mar 29 14:05:44 2007 @@ -166,6 +166,7 @@ /// @brief Construct an empty (and invalid) path. Path() : path(), status(0) {} ~Path() { delete status; } + Path(const Path &that) : path(that.path), status(0) {} /// This constructor will accept a std::string as a path. No checking is /// done on this path to determine if it is valid. To determine validity @@ -183,6 +184,9 @@ /// @brief Assignment Operator Path &operator=(const Path &that) { path = that.path; + if (status) + delete status; + status = 0; return *this; } @@ -223,9 +227,11 @@ /// @brief Determine if a path is syntactically valid or not. bool isValid() const; - /// This function determines if the contents of the path name are - /// empty. That is, the path has a zero length. This does NOT determine if - /// if the file is empty. Use the getSize method for that. + /// This function determines if the contents of the path name are empty. + /// That is, the path name has a zero length. This does NOT determine if + /// if the file is empty. To get the length of the file itself, Use the + /// getFileStatus() method and then the getSize() on the returned + /// FileStatus object /// @returns true iff the path is empty. /// @brief Determines if the path name is empty (invalid). bool isEmpty() const { return path.empty(); } @@ -357,13 +363,13 @@ /// This function returns status information about the file. The type of /// path (file or directory) is updated to reflect the actual contents - /// of the file system. This returns false on success, or true on error - /// and fills in the specified error string if specified. + /// of the file system. + /// @returns 0 on failure, with Error explaining why (if non-zero) + /// @returns a pointer to a FileStatus structure on success. /// @brief Get file status. - bool getFileStatus( - FileStatus &Status, ///< The resulting file status - bool forceUpdate = false, ///< Force an update from the file system - std::string *Error = 0 ///< Optional place to return an error msg. + const FileStatus *getFileStatus( + bool forceUpdate = false, ///< Force an update from the file system + std::string *Error = 0 ///< Optional place to return an error msg. ) const; /// @} From reid at x10sys.com Thu Mar 29 14:06:34 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 14:06:34 -0500 Subject: [llvm-commits] CVS: llvm/lib/Debugger/ProgramInfo.cpp Message-ID: <200703291906.l2TJ6YYM015824@zion.cs.uiuc.edu> Changes in directory llvm/lib/Debugger: ProgramInfo.cpp updated: 1.20 -> 1.21 --- Log message: For PR789: http://llvm.org/PR789 : Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. --- Diffs of the changes: (+4 -3) ProgramInfo.cpp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/lib/Debugger/ProgramInfo.cpp diff -u llvm/lib/Debugger/ProgramInfo.cpp:1.20 llvm/lib/Debugger/ProgramInfo.cpp:1.21 --- llvm/lib/Debugger/ProgramInfo.cpp:1.20 Thu Dec 7 14:28:15 2006 +++ llvm/lib/Debugger/ProgramInfo.cpp Thu Mar 29 14:05:44 2007 @@ -194,9 +194,10 @@ ProgramInfo::ProgramInfo(Module *m) : M(m), ProgramTimeStamp(0,0) { assert(M && "Cannot create program information with a null module!"); - sys::FileStatus Stat; - if (!sys::Path(M->getModuleIdentifier()).getFileStatus(Stat)) - ProgramTimeStamp = Stat.getTimestamp(); + const sys::FileStatus *Stat; + Stat = sys::Path(M->getModuleIdentifier()).getFileStatus(); + if (Stat) + ProgramTimeStamp = Stat->getTimestamp(); SourceFilesIsComplete = false; SourceFunctionsIsComplete = false; From reid at x10sys.com Thu Mar 29 14:06:34 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 14:06:34 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Unix/Path.inc Signals.inc Message-ID: <200703291906.l2TJ6Y27015840@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Unix: Path.inc updated: 1.60 -> 1.61 Signals.inc updated: 1.15 -> 1.16 --- Log message: For PR789: http://llvm.org/PR789 : Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. --- Diffs of the changes: (+39 -34) Path.inc | 67 +++++++++++++++++++++++++++++++----------------------------- Signals.inc | 6 +++-- 2 files changed, 39 insertions(+), 34 deletions(-) Index: llvm/lib/System/Unix/Path.inc diff -u llvm/lib/System/Unix/Path.inc:1.60 llvm/lib/System/Unix/Path.inc:1.61 --- llvm/lib/System/Unix/Path.inc:1.60 Thu Mar 29 12:00:31 2007 +++ llvm/lib/System/Unix/Path.inc Thu Mar 29 14:05:44 2007 @@ -333,9 +333,10 @@ Path::canExecute() const { if (0 != access(path.c_str(), R_OK | X_OK )) return false; - struct stat st; - int r = stat(path.c_str(), &st); - if (r != 0 || !S_ISREG(st.st_mode)) + if (const FileStatus *fs = getFileStatus(true, 0)) { + if (!S_ISREG(fs->mode)) + return false; + } else return false; return true; } @@ -362,12 +363,14 @@ return path.substr(pos+1); } -bool -Path::getFileStatus(FileStatus &info, bool update, std::string *ErrStr) const { +const FileStatus* +Path::getFileStatus(bool update, std::string *ErrStr) const { if (status == 0 || update) { struct stat buf; - if (0 != stat(path.c_str(), &buf)) - return MakeErrMsg(ErrStr, path + ": can't get status of file"); + if (0 != stat(path.c_str(), &buf)) { + MakeErrMsg(ErrStr, path + ": can't get status of file"); + return 0; + } if (status == 0) status = new FileStatus; status->fileSize = buf.st_size; @@ -379,8 +382,7 @@ status->isDir = S_ISDIR(buf.st_mode); status->isFile = S_ISREG(buf.st_mode); } - info = *status; - return false; + return status; } static bool AddPermissionBits(const Path &File, int bits) { @@ -392,12 +394,12 @@ umask(mask); // Restore the umask. // Get the file's current mode. - FileStatus Stat; - if (File.getFileStatus(Stat)) return false; - - // Change the file to have whichever permissions bits from 'bits' - // that the umask would not disable. - if ((chmod(File.c_str(), (Stat.getMode() | (bits & ~mask)))) == -1) + if (const FileStatus *fs = File.getFileStatus()) { + // Change the file to have whichever permissions bits from 'bits' + // that the umask would not disable. + if ((chmod(File.c_str(), (fs->getMode() | (bits & ~mask)))) == -1) + return false; + } else return false; return true; @@ -593,24 +595,25 @@ bool Path::eraseFromDisk(bool remove_contents, std::string *ErrStr) const { FileStatus Status; - if (getFileStatus(Status, ErrStr)) - return true; + if (const FileStatus *Status = getFileStatus(false, ErrStr)) { + // Note: this check catches strange situations. In all cases, LLVM should + // only be involved in the creation and deletion of regular files. This + // check ensures that what we're trying to erase is a regular file. It + // effectively prevents LLVM from erasing things like /dev/null, any block + // special file, or other things that aren't "regular" files. + if (Status->isFile) { + if (unlink(path.c_str()) != 0) + return MakeErrMsg(ErrStr, path + ": can't destroy file"); + return false; + } - // Note: this check catches strange situations. In all cases, LLVM should only - // be involved in the creation and deletion of regular files. This check - // ensures that what we're trying to erase is a regular file. It effectively - // prevents LLVM from erasing things like /dev/null, any block special file, - // or other things that aren't "regular" files. - if (Status.isFile) { - if (unlink(path.c_str()) != 0) - return MakeErrMsg(ErrStr, path + ": can't destroy file"); - return false; - } - - if (!Status.isDir) { - if (ErrStr) *ErrStr = "not a file or directory"; + if (!Status->isDir) { + if (ErrStr) *ErrStr = "not a file or directory"; + return true; + } + } else return true; - } + if (remove_contents) { // Recursively descend the directory to remove its contents. std::string cmd = "/bin/rm -rf " + path; @@ -629,7 +632,7 @@ if (rmdir(pathname) != 0) return MakeErrMsg(ErrStr, - std::string(pathname) + ": can't destroy directory"); + std::string(pathname) + ": can't erase directory"); return false; } Index: llvm/lib/System/Unix/Signals.inc diff -u llvm/lib/System/Unix/Signals.inc:1.15 llvm/lib/System/Unix/Signals.inc:1.16 --- llvm/lib/System/Unix/Signals.inc:1.15 Fri Aug 25 16:37:17 2006 +++ llvm/lib/System/Unix/Signals.inc Thu Mar 29 14:05:44 2007 @@ -168,8 +168,10 @@ // RemoveDirectoryOnSignal - The public API bool sys::RemoveDirectoryOnSignal(const sys::Path& path, std::string* ErrMsg) { // Not a directory? - sys::FileStatus Status; - if (path.getFileStatus(Status) || !Status.isDir) { + const sys::FileStatus *Status = path.getFileStatus(false, ErrMsg); + if (!Status) + return true; + if (!Status->isDir) { if (ErrMsg) *ErrMsg = path.toString() + " is not a directory"; return true; From reid at x10sys.com Thu Mar 29 14:11:39 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 14:11:39 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Unix/MappedFile.inc Message-ID: <200703291911.l2TJBd4H015939@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Unix: MappedFile.inc updated: 1.18 -> 1.19 --- Log message: Use the stat information in the Path object, if it is already obtained. This avoids a call to ::fstat by MappedFile when the file size information was already obtained by the Path object. --- Diffs of the changes: (+3 -4) MappedFile.inc | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) Index: llvm/lib/System/Unix/MappedFile.inc diff -u llvm/lib/System/Unix/MappedFile.inc:1.18 llvm/lib/System/Unix/MappedFile.inc:1.19 --- llvm/lib/System/Unix/MappedFile.inc:1.18 Fri Aug 25 16:37:17 2006 +++ llvm/lib/System/Unix/MappedFile.inc Thu Mar 29 14:11:22 2007 @@ -54,15 +54,14 @@ MakeErrMsg(ErrMsg, "can't open file '" + path_.toString() + "'"); return true; } - struct stat sbuf; - if(::fstat(FD, &sbuf) < 0) { - MakeErrMsg(ErrMsg, "can't stat file '"+ path_.toString() + "'"); + const FileStatus *Status = path_.getFileStatus(false, ErrMsg); + if (!Status) { ::close(FD); return true; } info_ = new MappedFileInfo; info_->FD = FD; - info_->Size = sbuf.st_size; + info_->Size = Status->getSize(); return false; } From reid at x10sys.com Thu Mar 29 14:49:25 2007 From: reid at x10sys.com (Reid Spencer) Date: Thu, 29 Mar 2007 14:49:25 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-nm/llvm-nm.cpp Message-ID: <200703291949.l2TJnPAU016952@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-nm: llvm-nm.cpp updated: 1.32 -> 1.33 --- Log message: Remove some non-sensical logic that prevented llvm-nm from working on any file other than one named "-". --- Diffs of the changes: (+0 -5) llvm-nm.cpp | 5 ----- 1 files changed, 5 deletions(-) Index: llvm/tools/llvm-nm/llvm-nm.cpp diff -u llvm/tools/llvm-nm/llvm-nm.cpp:1.32 llvm/tools/llvm-nm/llvm-nm.cpp:1.33 --- llvm/tools/llvm-nm/llvm-nm.cpp:1.32 Sun Mar 4 18:00:42 2007 +++ llvm/tools/llvm-nm/llvm-nm.cpp Thu Mar 29 14:49:07 2007 @@ -121,11 +121,6 @@ static void DumpSymbolNamesFromFile(std::string &Filename) { std::string ErrorMessage; sys::Path aPath(Filename); - if (Filename != "-") { - std::cerr << ToolName << ": " << Filename << ": " << strerror (errno) - << "\n"; - return; - } // Note: Currently we do not support reading an archive from stdin. if (Filename == "-" || aPath.isBytecodeFile()) { Module *Result = ParseBytecodeFile(Filename, From evan.cheng at apple.com Thu Mar 29 16:39:07 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 29 Mar 2007 16:39:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMInstrThumb.td Message-ID: <200703292139.l2TLd77x018836@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMInstrThumb.td updated: 1.19 -> 1.20 --- Log message: Can't re-materialize mov r, imm in thumb since mov would clobber the condition code. --- Diffs of the changes: (+1 -1) ARMInstrThumb.td | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Target/ARM/ARMInstrThumb.td diff -u llvm/lib/Target/ARM/ARMInstrThumb.td:1.19 llvm/lib/Target/ARM/ARMInstrThumb.td:1.20 --- llvm/lib/Target/ARM/ARMInstrThumb.td:1.19 Tue Mar 27 11:19:21 2007 +++ llvm/lib/Target/ARM/ARMInstrThumb.td Thu Mar 29 16:38:31 2007 @@ -379,7 +379,7 @@ "lsr $dst, $rhs", [(set GPR:$dst, (srl GPR:$lhs, GPR:$rhs))]>; -let isReMaterializable = 1 in +// FIXME: This is not rematerializable because mov changes the condition code. def tMOVi8 : TI<(ops GPR:$dst, i32imm:$src), "mov $dst, $src", [(set GPR:$dst, imm0_255:$src)]>; From evan.cheng at apple.com Thu Mar 29 16:40:30 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 29 Mar 2007 16:40:30 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/README-Thumb.txt Message-ID: <200703292140.l2TLeURr018879@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: README-Thumb.txt updated: 1.9 -> 1.10 --- Log message: New entry. --- Diffs of the changes: (+5 -0) README-Thumb.txt | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/lib/Target/ARM/README-Thumb.txt diff -u llvm/lib/Target/ARM/README-Thumb.txt:1.9 llvm/lib/Target/ARM/README-Thumb.txt:1.10 --- llvm/lib/Target/ARM/README-Thumb.txt:1.9 Tue Mar 20 03:10:17 2007 +++ llvm/lib/Target/ARM/README-Thumb.txt Thu Mar 29 16:40:13 2007 @@ -167,3 +167,8 @@ cpy r3, r6 cpy lr, pc bx r5 + +//===---------------------------------------------------------------------===// + +Make register allocator / spiller smarter so we can re-materialize "mov r, imm", +etc. Almost all Thumb instructions clobber condition code. From alenhar2 at cs.uiuc.edu Thu Mar 29 16:50:11 2007 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Thu, 29 Mar 2007 16:50:11 -0500 Subject: [llvm-commits] CVS: llvm-www/pubs/2007-06-10-PLDI-DSA.html Message-ID: <200703292150.l2TLoBi5019079@zion.cs.uiuc.edu> Changes in directory llvm-www/pubs: 2007-06-10-PLDI-DSA.html updated: 1.1 -> 1.2 --- Log message: fix bibtex entry --- Diffs of the changes: (+1 -1) 2007-06-10-PLDI-DSA.html | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/pubs/2007-06-10-PLDI-DSA.html diff -u llvm-www/pubs/2007-06-10-PLDI-DSA.html:1.1 llvm-www/pubs/2007-06-10-PLDI-DSA.html:1.2 --- llvm-www/pubs/2007-06-10-PLDI-DSA.html:1.1 Wed Mar 28 22:25:57 2007 +++ llvm-www/pubs/2007-06-10-PLDI-DSA.html Thu Mar 29 16:49:41 2007 @@ -72,7 +72,7 @@

      BibTeX Entry:

         @InProceedings{DSA:PLDI07,
      -    author    = {Chris Lattner and Vikram Adve},
      +    author    = {Chris Lattner and Andrew Lenharth and Vikram Adve},
           title     = "{Making Context-Sensitive Points-to Analysis with Heap Cloning Practical For The Real World}",
           booktitle = "{Proceedings of the 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'07)}",
           address   = {San Diego, California},
      
      
      
      
      
      From dpatel at apple.com  Thu Mar 29 17:06:04 2007
      From: dpatel at apple.com (dpatel at apple.com)
      Date: Thu, 29 Mar 2007 15:06:04 -0700 (PDT)
      Subject: [llvm-commits] [125528] Apply Geoff's patch to fix bootstrap
      	failures.
      Message-ID: <20070329220604.BA669C0BE236@src>
      
      Revision: 125528
      Author:   dpatel
      Date:     2007-03-29 15:06:04 -0700 (Thu, 29 Mar 2007)
      
      Log Message:
      -----------
      Apply Geoff's patch to fix bootstrap failures.
      
      Modified Paths:
      --------------
          apple-local/branches/llvm/ChangeLog.apple
          apple-local/branches/llvm/build_gcc
      
      Modified: apple-local/branches/llvm/ChangeLog.apple
      ===================================================================
      --- apple-local/branches/llvm/ChangeLog.apple	2007-03-29 19:54:52 UTC (rev 125527)
      +++ apple-local/branches/llvm/ChangeLog.apple	2007-03-29 22:06:04 UTC (rev 125528)
      @@ -1,3 +1,32 @@
      +2007-03-15  Geoffrey Keating  
      +
      +	* build_gcc: Unset RC_DEBUG_OPTIONS when bootstrapping.
      +
      +2006-12-13  Geoffrey Keating  
      +
      +	Radar 4697325
      +	* driverdriver.c: New.
      +	* build_gcc: Use driverdriver.c rather than
      +	gcc/config/darwin-driver.c.
      +
      +2007-02-27  Geoffrey Keating  
      +
      +	Radar 4913513
      +	* build_gcc: Copy contents of dSYM directories, not just
      +	directory itself.
      +
      +2007-02-06  Mike Stump  
      +
      +	Radar 4979322
      +	* build_gcc: Remove sdk bits.
      +	* sdk: Remove.
      +	* sdk-test: Remove.
      +
      +2007-01-26  Mike Stump  
      +
      +	Radar 4895582
      +	* sdk: Build up liibstdcxx fixups for 10.4 SDKs.
      +
       2007-01-05  Geoffrey Keating  
       
       	Radar 4913513
      
      Modified: apple-local/branches/llvm/build_gcc
      ===================================================================
      --- apple-local/branches/llvm/build_gcc	2007-03-29 19:54:52 UTC (rev 125527)
      +++ apple-local/branches/llvm/build_gcc	2007-03-29 22:06:04 UTC (rev 125528)
      @@ -244,7 +244,9 @@
          `if [ $BUILD = i686 ] ; then echo $I386_CPU ; fi` \
          --host=$BUILD-apple-darwin$DARWIN_VERS --target=$BUILD-apple-darwin$DARWIN_VERS || exit 1
       fi
      -make $MAKEFLAGS $BOOTSTRAP CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
      +# Unset RC_DEBUG_OPTIONS because it causes the bootstrap to fail.
      +RC_DEBUG_OPTIONS= \
      +  make $MAKEFLAGS $BOOTSTRAP CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
       make $MAKEFLAGS html CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
       make $MAKEFLAGS DESTDIR=$DIR/dst-$BUILD-$BUILD install-gcc install-target \
         CFLAGS="$CFLAGS" CXXFLAGS="$CFLAGS" || exit 1
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 18:14:22 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 18:14:22 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/Makefile
      	output_large.mp3
      Message-ID: <200703292314.l2TNEMdN020376@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame:
      
      Makefile updated: 1.2 -> 1.3
      output_large.mp3 (r1.1) removed
      ---
      Log message:
      
      Fix for src != obj.
      Don't keep test output in repository.
      
      
      ---
      Diffs of the changes:  (+1 -1)
      
       Makefile |    2 +-
       1 files changed, 1 insertion(+), 1 deletion(-)
      
      
      Index: llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/Makefile
      diff -u llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/Makefile:1.2 llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/Makefile:1.3
      --- llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/Makefile:1.2	Thu Mar 29 11:53:54 2007
      +++ llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/Makefile	Thu Mar 29 18:14:01 2007
      @@ -3,5 +3,5 @@
       PROG     = consumer-lame
       CPPFLAGS = -DHAVEMPGLIB -DLAMEPARSE -DNDEBUG -D__NO_MATH_INLINES -O -DLAMESNDFILE
       LDFLAGS  = -lm
      -RUN_OPTIONS = -S large.wav $(PROJ_SRC_DIR)/output_large.mp3
      +RUN_OPTIONS = -S $(PROJ_SRC_DIR)/large.wav Output/output_large.mp3
       include $(LEVEL)/MultiSource/Makefile.multisrc
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 18:15:25 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 18:15:25 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Applications/JM/ldecod/Makefile
      Message-ID: <200703292315.l2TNFPGP020404@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Applications/JM/ldecod:
      
      Makefile updated: 1.8 -> 1.9
      ---
      Log message:
      
      Put test output in Output directory.
      
      ---
      Diffs of the changes:  (+1 -1)
      
       Makefile |    2 +-
       1 files changed, 1 insertion(+), 1 deletion(-)
      
      
      Index: llvm-test/MultiSource/Applications/JM/ldecod/Makefile
      diff -u llvm-test/MultiSource/Applications/JM/ldecod/Makefile:1.8 llvm-test/MultiSource/Applications/JM/ldecod/Makefile:1.9
      --- llvm-test/MultiSource/Applications/JM/ldecod/Makefile:1.8	Thu Mar 29 12:52:50 2007
      +++ llvm-test/MultiSource/Applications/JM/ldecod/Makefile	Thu Mar 29 18:15:08 2007
      @@ -3,6 +3,6 @@
       CPPFLAGS = -D __USE_LARGEFILE64 -D _FILE_OFFSET_BITS=64
       LDFLAGS  = -lm $(TOOLLINKOPTS)
       
      -RUN_OPTIONS = -i $(PROJ_SRC_DIR)/data/test.264 -o test_dec.yuv -r $(PROJ_SRC_DIR)/data/test_rec.yuv
      +RUN_OPTIONS = -i $(PROJ_SRC_DIR)/data/test.264 -o Output/test_dec.yuv -r $(PROJ_SRC_DIR)/data/test_rec.yuv
       
       include ../../../Makefile.multisrc
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 18:39:00 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 18:39:00 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Applications/JM/lencod/Makefile
      Message-ID: <200703292339.l2TNd0FN020841@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Applications/JM/lencod:
      
      Makefile updated: 1.3 -> 1.4
      ---
      Log message:
      
      More src != obj corrections.
      
      ---
      Diffs of the changes:  (+1 -1)
      
       Makefile |    2 +-
       1 files changed, 1 insertion(+), 1 deletion(-)
      
      
      Index: llvm-test/MultiSource/Applications/JM/lencod/Makefile
      diff -u llvm-test/MultiSource/Applications/JM/lencod/Makefile:1.3 llvm-test/MultiSource/Applications/JM/lencod/Makefile:1.4
      --- llvm-test/MultiSource/Applications/JM/lencod/Makefile:1.3	Sun Feb  4 08:38:32 2007
      +++ llvm-test/MultiSource/Applications/JM/lencod/Makefile	Thu Mar 29 18:38:42 2007
      @@ -4,6 +4,6 @@
       LDFLAGS  = -lm $(TOOLLINKOPTS)
       FP_TOLERANCE = 0.025
       
      -RUN_OPTIONS = -d $(PROJ_SRC_DIR)/data/encoder.cfg -p InputFile=$(PROJ_SRC_DIR)/data/foreman_part_qcif_444.yuv
      +RUN_OPTIONS = -d $(PROJ_SRC_DIR)/data/encoder.cfg -p InputFile=$(PROJ_SRC_DIR)/data/foreman_part_qcif_444.yuv -p LeakyBucketRateFile=$(PROJ_SRC_DIR)/data/leakybucketrate.cfg -p QmatrixFile=$(PROJ_SRC_DIR)/data/q_matrix.cfg
       
       include ../../../Makefile.multisrc
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 18:39:02 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 18:39:02 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Applications/JM/lencod/data/encoder.cfg
      Message-ID: <200703292339.l2TNd2kR020846@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Applications/JM/lencod/data:
      
      encoder.cfg updated: 1.4 -> 1.5
      ---
      Log message:
      
      More src != obj corrections.
      
      ---
      Diffs of the changes:  (+3 -3)
      
       encoder.cfg |    6 +++---
       1 files changed, 3 insertions(+), 3 deletions(-)
      
      
      Index: llvm-test/MultiSource/Applications/JM/lencod/data/encoder.cfg
      diff -u llvm-test/MultiSource/Applications/JM/lencod/data/encoder.cfg:1.4 llvm-test/MultiSource/Applications/JM/lencod/data/encoder.cfg:1.5
      --- llvm-test/MultiSource/Applications/JM/lencod/data/encoder.cfg:1.4	Fri Feb  9 13:00:20 2007
      +++ llvm-test/MultiSource/Applications/JM/lencod/data/encoder.cfg	Thu Mar 29 18:38:42 2007
      @@ -15,8 +15,8 @@
       SourceWidth           = 176    # Frame width
       SourceHeight          = 144    # Frame height
       TraceFile             = "trace_enc.txt"
      -ReconFile             = "test_rec.yuv"
      -OutputFile            = "test.264"
      +ReconFile             = "Output/test_rec.yuv"
      +OutputFile            = "Output/test.264"
       
       ##########################################################################################
       # Encoder Control
      @@ -247,7 +247,7 @@
       
       NumberofLeakyBuckets     =  8                      # Number of Leaky Bucket values
       LeakyBucketRateFile      =  "leakybucketrate.cfg"  # File from which encoder derives rate values
      -LeakyBucketParamFile     =  "leakybucketparam.cfg" # File where encoder stores leakybucketparams
      +LeakyBucketParamFile     =  "Output/leakybucketparam.cfg" # File where encoder stores leakybucketparams
       
       NumberFramesInEnhancementLayerSubSequence  = 0  # number of frames in the Enhanced Scalability Layer(0: no Enhanced Layer)
       NumberOfFrameInSecondIGOP                  = 0  # Number of frames to be coded in the second IGOP
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 18:55:17 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 18:55:17 -0500
      Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/sim/Makefile
      	sim.c
      Message-ID: <200703292355.l2TNtHMB021164@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/sim:
      
      Makefile updated: 1.5 -> 1.6
      sim.c updated: 1.5 -> 1.6
      ---
      Log message:
      
      Fix for src != obj.
      
      ---
      Diffs of the changes:  (+5 -3)
      
       Makefile |    2 ++
       sim.c    |    6 +++---
       2 files changed, 5 insertions(+), 3 deletions(-)
      
      
      Index: llvm-test/MultiSource/Benchmarks/sim/Makefile
      diff -u llvm-test/MultiSource/Benchmarks/sim/Makefile:1.5 llvm-test/MultiSource/Benchmarks/sim/Makefile:1.6
      --- llvm-test/MultiSource/Benchmarks/sim/Makefile:1.5	Wed Sep  1 09:33:26 2004
      +++ llvm-test/MultiSource/Benchmarks/sim/Makefile	Thu Mar 29 18:54:59 2007
      @@ -4,4 +4,6 @@
       CPPFLAGS = -DUNIX
       LDFLAGS  = 
       
      +RUN_OPTIONS = 8 $(PROJ_SRC_DIR)/tob.38-44 $(PROJ_SRC_DIR)/liv.42-48
      +
       include	../../Makefile.multisrc
      
      
      Index: llvm-test/MultiSource/Benchmarks/sim/sim.c
      diff -u llvm-test/MultiSource/Benchmarks/sim/sim.c:1.5 llvm-test/MultiSource/Benchmarks/sim/sim.c:1.6
      --- llvm-test/MultiSource/Benchmarks/sim/sim.c:1.5	Sat May  3 00:48:35 2003
      +++ llvm-test/MultiSource/Benchmarks/sim/sim.c	Thu Mar 29 18:54:59 2007
      @@ -118,9 +118,9 @@
         FILE *Bp, *Ap, *Cp, *ckopen();
         char *arg1, *arg2, *arg3;
       
      -  if ((Cp = fopen("sim.res","a+")) == NULL)
      +  if ((Cp = fopen("Output/sim.res","a+")) == NULL)
           {
      -	printf("Can not open sim.res\n\n");
      +	printf("Can not open Output/sim.res\n\n");
       	exit(1);
           }
       
      @@ -222,7 +222,7 @@
         /*printf("\nRun Time (sec) = %9.1lf\n",benchtime);*/
         
         fprintf(Cp,"\n");
      -  fprintf(Cp,"  Run Line: sim 8 tob.38-44 liv.42-48\n");
      +  fprintf(Cp,"  Run Line: %s %s %s\n", arg1, arg2, arg3);
         /*fprintf(Cp,"  Run Time: %9.1lf (sec)\n",benchtime);*/
         fprintf(Cp,"#######################################################\n");
         fclose(Cp);
      
      
      
      
      
      From reid at x10sys.com  Thu Mar 29 13:50:19 2007
      From: reid at x10sys.com (Reid Spencer)
      Date: Thu, 29 Mar 2007 13:50:19 -0500
      Subject: [llvm-commits] CVS: llvm/lib/AsmParser/Lexer.cpp.cvs Lexer.l.cvs
      	llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y.cvs
      Message-ID: <200703291850.l2TIoJev015283@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm/lib/AsmParser:
      
      Lexer.cpp.cvs updated: 1.35 -> 1.36
      Lexer.l.cvs updated: 1.29 -> 1.30
      llvmAsmParser.cpp.cvs updated: 1.78 -> 1.79
      llvmAsmParser.h.cvs updated: 1.61 -> 1.62
      llvmAsmParser.y.cvs updated: 1.79 -> 1.80
      ---
      Log message:
      
      Regenerate.
      
      
      ---
      Diffs of the changes:  (+449 -446)
      
       Lexer.cpp.cvs         |  817 +++++++++++++++++++++++++-------------------------
       Lexer.l.cvs           |    2 
       llvmAsmParser.cpp.cvs |   68 ++--
       llvmAsmParser.h.cvs   |    4 
       llvmAsmParser.y.cvs   |    4 
       5 files changed, 449 insertions(+), 446 deletions(-)
      
      
      Index: llvm/lib/AsmParser/Lexer.cpp.cvs
      diff -u llvm/lib/AsmParser/Lexer.cpp.cvs:1.35 llvm/lib/AsmParser/Lexer.cpp.cvs:1.36
      --- llvm/lib/AsmParser/Lexer.cpp.cvs:1.35	Tue Mar 27 21:37:40 2007
      +++ llvm/lib/AsmParser/Lexer.cpp.cvs	Thu Mar 29 13:50:01 2007
      @@ -20,7 +20,7 @@
       /* A lexical scanner generated by flex*/
       
       /* Scanner skeleton version:
      - * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.35 2007/03/28 02:37:40 reid Exp $
      + * $Header: /var/cvs/llvm/llvm/lib/AsmParser/Lexer.cpp.cvs,v 1.36 2007/03/29 18:50:01 reid Exp $
        */
       
       #define FLEX_SCANNER
      @@ -343,11 +343,11 @@
              98,  108,   26,   27,   97,  110,  105,  103,    6,   28,
              95,   32,    9,   18,   10,  101,   11,   45,   44,  102,
       
      -       30,   13,   15,   14,   19,   29,   35,   17,  111,  117,
      -      119,  120,   40,  118,   41,   20
      +       30,   13,   15,   14,   29,   35,   17,  111,  117,  119,
      +      120,   40,  118,   19,   41,   20
           } ;
       
      -static yyconst short int yy_accept[549] =
      +static yyconst short int yy_accept[553] =
           {   0,
               1,    1,    1,    2,    4,    7,    9,   11,   13,   15,
              17,   19,   21,   24,   27,   30,   32,   34,   36,   38,
      @@ -356,8 +356,8 @@
              77,   77,   78,   79,   80,   80,   81,   81,   82,   83,
              83,   84,   84,   85,   86,   86,   86,   86,   86,   86,
              86,   86,   87,   87,   88,   88,   88,   88,   88,   88,
      -       88,   88,   89,   89,   89,   89,   89,   89,   89,   89,
      -       89,   89,   89,   90,   90,   90,   90,   90,   90,   90,
      +       88,   89,   89,   89,   89,   89,   89,   89,   89,   89,
      +       89,   89,   90,   90,   90,   90,   90,   90,   90,   90,
              90,   90,   90,   91,   91,   91,   91,   91,   91,   91,
       
              91,   92,   92,   92,   92,   92,   92,   92,   92,   92,
      @@ -366,7 +366,7 @@
              93,   93,   93,   94,   95,   96,   97,   98,   98,   99,
              99,  100,  101,  102,  102,  102,  103,  103,  103,  104,
             104,  104,  104,  105,  105,  105,  105,  105,  105,  105,
      -      105,  105,  105,  106,  106,  106,  106,  106,  106,  106,
      +      105,  105,  106,  106,  106,  106,  106,  106,  106,  106,
             106,  106,  106,  106,  106,  106,  106,  106,  106,  106,
             106,  106,  106,  106,  106,  106,  106,  107,  107,  107,
             107,  108,  109,  110,  111,  112,  113,  113,  114,  115,
      @@ -378,37 +378,38 @@
             129,  129,  130,  130,  130,  131,  132,  132,  132,  132,
             133,  133,  133,  133,  134,  134,  134,  135,  135,  135,
             135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
      -      135,  135,  136,  137,  137,  137,  137,  137,  138,  139,
      -      139,  139,  139,  140,  140,  140,  140,  140,  140,  140,
      +      135,  136,  137,  137,  137,  137,  137,  138,  139,  139,
      +      139,  139,  140,  140,  140,  140,  140,  140,  140,  140,
             140,  141,  142,  142,  142,  142,  142,  143,  143,  143,
       
             144,  145,  145,  145,  146,  146,  146,  146,  147,  148,
             148,  148,  149,  149,  149,  150,  150,  151,  152,  152,
             152,  152,  152,  153,  153,  154,  154,  155,  155,  155,
             156,  157,  158,  158,  158,  159,  159,  159,  159,  159,
      -      159,  159,  159,  159,  159,  159,  159,  159,  159,  160,
      -      160,  161,  162,  162,  162,  162,  162,  162,  162,  163,
      +      159,  159,  159,  159,  159,  159,  159,  159,  160,  160,
      +      161,  162,  162,  162,  162,  162,  162,  162,  162,  163,
             163,  163,  163,  163,  164,  164,  164,  164,  164,  164,
             164,  164,  164,  164,  164,  164,  164,  165,  165,  165,
             165,  166,  166,  167,  167,  167,  167,  167,  167,  167,
      -      167,  168,  168,  168,  168,  169,  169,  169,  169,  170,
      +      167,  168,  168,  168,  169,  169,  169,  169,  170,  170,
       
      -      170,  170,  170,  171,  171,  171,  172,  173,  174,  174,
      -      174,  175,  176,  176,  176,  176,  177,  177,  178,  179,
      +      170,  170,  171,  171,  171,  172,  173,  174,  174,  174,
      +      175,  176,  176,  176,  176,  176,  177,  177,  178,  179,
             179,  179,  180,  180,  180,  181,  181,  181,  182,  183,
             184,  185,  186,  186,  187,  188,  188,  188,  188,  188,
      -      188,  189,  189,  189,  189,  190,  191,  191,  191,  191,
      -      191,  191,  192,  192,  192,  192,  192,  192,  192,  192,
      +      188,  189,  189,  189,  190,  191,  191,  191,  191,  191,
      +      191,  192,  192,  192,  192,  192,  192,  192,  192,  192,
             192,  193,  193,  193,  193,  193,  193,  193,  193,  193,
      -      193,  194,  194,  194,  194,  194,  195,  195,  195,  195,
      +      194,  194,  194,  194,  194,  195,  195,  195,  195,  195,
             196,  197,  198,  199,  200,  201,  201,  201,  201,  202,
      -      202,  202,  202,  203,  203,  203,  204,  205,  205,  205,
      +      202,  202,  202,  203,  203,  204,  205,  205,  205,  205,
       
      -      205,  205,  205,  205,  205,  205,  205,  205,  206,  207,
      -      207,  207,  207,  207,  207,  208,  208,  208,  208,  208,
      -      209,  209,  209,  209,  209,  210,  210,  210,  210,  210,
      -      210,  210,  210,  210,  210,  210,  210,  211,  212,  213,
      -      213,  214,  214,  215,  216,  216,  217,  217
      +      205,  205,  205,  205,  205,  205,  205,  205,  206,  206,
      +      206,  206,  206,  206,  206,  207,  207,  207,  207,  207,
      +      208,  208,  208,  208,  208,  208,  209,  209,  209,  209,
      +      209,  209,  209,  209,  209,  209,  209,  209,  209,  210,
      +      210,  211,  212,  212,  213,  213,  214,  215,  216,  216,
      +      217,  217
           } ;
       
       static yyconst int yy_ec[256] =
      @@ -452,258 +453,258 @@
               4,    4,    4,    4
           } ;
       
      -static yyconst short int yy_base[556] =
      +static yyconst short int yy_base[560] =
           {   0,
      -        0,    0, 1193, 1194, 1194, 1194, 1188, 1177,   35,   39,
      +        0,    0, 1199, 1200, 1200, 1200, 1194, 1183,   35,   39,
              43,   49,   55,   61,    0,   72,   64,   67,   66,   86,
      -       76,  106,   91,   95,  133,  121,  117,  100,  152,   75,
      -       93,  179,  137,  211,  139,   98,   46,  124, 1186, 1194,
      -     1175, 1194,    0,  150,  185,  217,  116,  238,  254,  259,
      -        0, 1184,    0,  200,  154,  153,  176,  118,  160,   78,
      -      178, 1173,   47,  157,  161,  208,  186,  264,  228,  194,
      -      200, 1172,  222,  260,  230,  218,  261,  271,  231,  273,
      -      274,  277,  291,  279,  278,  113,  187,  239,  285,  292,
      -      294,  299, 1171,  305,  306,  307,  309,  310,  311,  312,
      -
      -      314,  317,  313,  316,  324,  325,  329,  326,  338,  332,
      -      343,  348,  342,  344,  346,  355, 1170,  359,  362,  364,
      -      347,  365,  366,  370,  376,  371,  150,  383,  387,  374,
      -      379,  388, 1169,    0,  408, 1168,  423,  441,    0, 1177,
      -     1194,    0, 1166,  396,  392, 1165,  414,  391, 1164,  415,
      -      409,  426, 1163,  428,  443,  402,  444,  430,  431,  432,
      -      447,  449, 1162,  453,  451,  454,  459,  455,  458,  460,
      -      465,  466,  462,  470,  471,  469,  482,  485,  486,  490,
      -      491,  493,  494,  497,  498,  499, 1161,  502,  500,  504,
      -     1160, 1159, 1158, 1157, 1156, 1155,  505, 1154, 1153,  506,
      -
      -     1152,  535,  511,  516,  507,  523, 1151, 1150, 1149,  525,
      -      548,  535, 1148, 1147,  549,  528, 1146,  527,  513,  552,
      -      555,  553,  557,  556, 1145, 1144, 1143,  559, 1142, 1141,
      -      560, 1140, 1139,  562,  565,  568,  467,  574,  515,  561,
      -      581, 1138,  569,  577, 1194,  593,  611,  597,  615,  620,
      -      580,  621,  584, 1137,  606,  622, 1136,  623,  625,  626,
      -      627,  630,  631,  632,  634,  635,  637,  639,  641,  644,
      -      640, 1135, 1134,  642,  645,  651,  655, 1133, 1132,  656,
      -      657,  658, 1131,  587,  659,  660,  664,  670,  671,  665,
      -     1130, 1129,  667,  673,  675,  677, 1128,  678,  679,    0,
      -
      -     1127,  688,  692, 1126,  690,  695,  696, 1125, 1124,  706,
      -      709, 1123,  708,  694, 1122,  711, 1121, 1120,  712,  713,
      -      691,  714, 1119,  693, 1118,  720, 1117,  722,  721, 1116,
      -      729, 1115,  730,  729, 1114,  731,  737,  734,  740,  741,
      -      739,  743,  748,  749,  750,  752,  756,  751, 1113,  758,
      -     1112, 1111,  763,  764,  765,  771,  760,  767, 1110,  768,
      -      772,  773,  779, 1109,  780,  786,  787,  775,  782,  791,
      -      788,  784,  795,  799,  805,  804, 1108,  807,  806,  808,
      -     1107,  809, 1106,  813,  814,  810,  811,  826,  812,  817,
      -     1105,  827,  828,  831, 1104,  833,  834,  837, 1103,  838,
      -
      -      839,  840, 1102,  843,  842, 1101, 1100, 1099,  845,  854,
      -     1098, 1097,  846,  862,  855, 1096,  857, 1095, 1094,  860,
      -      867, 1093,  869,  870, 1092,  864,  872, 1091, 1090, 1089,
      -     1088, 1087,  873, 1086, 1085,  875,  876,  880,  878,  877,
      -     1084,  884,  881,  890, 1083, 1082,  893,  894,  896,  897,
      -      900, 1071,  901,  902,  903,  904,  907,  906,  912,  908,
      -     1061,  914,  920,  922,  925,  927,  929,  931,  933,  934,
      -     1060,  936,  938,  939,  943, 1057,  941,  942,  944, 1056,
      -     1055, 1054, 1053, 1052, 1051,  946,  950,  959, 1050,  964,
      -      965,  967, 1048,  949,  968, 1045, 1042,  969,  970,  974,
      -
      -      976,  977,  978,  979,  982,  983,  984, 1041, 1037,  986,
      -      987,  989,  996,  991,  948,  997,  994, 1000, 1003,  947,
      -     1008, 1005, 1012, 1013,  844, 1011, 1014, 1017, 1020, 1021,
      -     1023, 1024, 1025, 1026, 1028, 1035,  600,  522,  468, 1036,
      -      400, 1039,  349,  282, 1040,  243, 1194, 1076, 1078,  250,
      -     1083, 1086,  200, 1090,   58
      +       76,  106,   91,   65,  133,  121,  117,   99,  152,   95,
      +       78,  179,  137,  211,  139,   90,  148,   93, 1192, 1200,
      +     1181, 1200,    0,   49,  185,  217,  116,  238,  254,  259,
      +        0, 1190,    0,  200,  125,  149,  146,  153,  177,   63,
      +      154, 1179,  160,  161,  208,  185,  264,  171,  113,  210,
      +     1178,  222,  260,  228,  186,  261,  271,  110,  273,  274,
      +      230,  223,  277,  278,  279,  282,  286,  285,  205,  290,
      +      287,  292, 1177,  288,  299,  300,  307,  309,  312,  314,
      +
      +      316,  318,  323,  311,  324,  326,  328,  327,  330,  329,
      +      339,  347,  341,  343,  334,  354, 1176,  358,  342,  359,
      +      361,  364,  365,  367,  371,  369,  370,  378,  395,  386,
      +      385,  387, 1175,    0,  406, 1174,  421,  439,    0, 1183,
      +     1200,    0, 1172,  232,  408, 1171,  396,  400, 1170,  397,
      +      426,  412, 1169,  414,  424,  440,  413,  430,  441,  442,
      +      443, 1168,  445,  448,  449,  454,  451,  453,  458,  460,
      +      466,  462,  461,  469,  464,  465,  470,  475,  487,  488,
      +      489,  490,  491,  492,  493,  494, 1167,  496,  495,  501,
      +     1166, 1165, 1164, 1163, 1162, 1161,  502, 1160, 1159,  498,
      +
      +     1158,  528,  503,  504,  508,  516, 1157, 1156, 1155,  510,
      +      520,  533, 1154, 1153,  541,  542, 1152,  543,  544,  545,
      +      546,  551,  549,  547, 1151, 1150, 1149,  553, 1148, 1147,
      +      568, 1146, 1145,  570,  548,  554,  550,  574,  575,  576,
      +      577, 1144,  579,  563, 1200,  596,  611,  615,  619,  624,
      +      584,  588,  585, 1143,  625,  626, 1142,  589,  627,  628,
      +      629,  630,  631,  633,  636,  634,  637,  640,  639,  647,
      +     1141, 1140,  638,  641,  652,  642, 1139, 1138,  654,  657,
      +      656, 1137,  658,  660,  664,  669,  671,  586,  673,  674,
      +     1136, 1135,  676,  678,  679,  680, 1134,  681,  682,    0,
      +
      +     1133,  683,  684, 1132,  685,  688,  699, 1131, 1130,  702,
      +      700, 1129,  704,  705, 1128,  709, 1127, 1126,  711,  713,
      +      719,  715, 1125,  716, 1124,  718, 1123,  720,  723, 1122,
      +      730, 1121,  730,  590, 1120,  732,  739,  734,  735,  744,
      +      746,  745,  748,  749,  750,  753,  751, 1119,  754, 1118,
      +     1117,  758,  761,  763,  757,  764,  765,  770, 1116,  773,
      +      774,  776,  778, 1115,  777,  782,  779,  784,  785,  791,
      +      786,  793,  794,  798,  802,  803, 1114,  804,  805,  806,
      +     1113,  807, 1112,  811,  815,  808,  821,  822,  810,  825,
      +     1111,  826,  830, 1110,  831,  832,  836, 1109,  833,  838,
      +
      +      839, 1108,  842,  841, 1107, 1106, 1105,  837,  850, 1104,
      +     1103,  852,  853,  860,  844, 1102,  851, 1101, 1100,  855,
      +      864, 1099,  869,  870, 1098,  871,  872, 1097, 1096, 1095,
      +     1094, 1093,  873, 1092, 1091,  874,  875,  876,  878,  879,
      +     1090,  880,  884, 1089, 1088,  889,  891,  893,  894,  895,
      +     1087,  896,  899,  900,  902,  901,  909,  907,  912,  908,
      +     1076,  914,  924,  922,  926,  915,  927,  929,  930, 1066,
      +      931,  933,  937,  938, 1065,  943,  944,  941,  945, 1064,
      +     1063, 1062, 1059, 1058, 1057,  950,  946,  951, 1056,  963,
      +      964,  952, 1054,  949, 1053, 1052,  968,  967,  969,  972,
      +
      +      975,  976,  979,  980,  981,  982,  983, 1047,  985,  988,
      +      986,  990,  991,  994, 1046,  997,  995,  999, 1004,  947,
      +     1002, 1008, 1009, 1010, 1016,  687, 1013, 1017, 1019, 1021,
      +     1022, 1024, 1026, 1027, 1030, 1034, 1031, 1036,  555, 1037,
      +      515,  512, 1040,  463, 1041,  399,  366,  247, 1045,  243,
      +     1200, 1081, 1083,  212, 1088, 1091,  167, 1095,  108
           } ;
       
      -static yyconst short int yy_def[556] =
      +static yyconst short int yy_def[560] =
           {   0,
      -      547,    1,  547,  547,  547,  547,  548,  549,  550,  547,
      -      549,  549,  549,  549,  551,  552,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  548,  547,
      -      549,  547,  553,  547,  547,  549,  549,  549,  549,  549,
      -      551,  554,  555,  547,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  547,  553,  547,  549,  549,  549,   50,  554,
      -      547,  555,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -
      -      549,   50,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  547,  547,  547,  547,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  202,
      -
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      547,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      -      549,  549,  549,  549,  549,  549,    0,  547,  547,  547,
      -      547,  547,  547,  547,  547
      +      551,    1,  551,  551,  551,  551,  552,  553,  554,  551,
      +      553,  553,  553,  553,  555,  556,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  552,  551,
      +      553,  551,  557,  551,  551,  553,  553,  553,  553,  553,
      +      555,  558,  559,  551,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,   25,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  551,  557,  551,  553,  553,  553,   50,  558,
      +      551,  559,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +
      +      553,   50,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  551,  551,  551,  551,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  202,
      +
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      551,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +      553,  553,  553,  553,  553,  553,  553,  553,  553,  553,
      +        0,  551,  551,  551,  551,  551,  551,  551,  551
           } ;
       
      -static yyconst short int yy_nxt[1239] =
      +static yyconst short int yy_nxt[1245] =
           {   0,
               4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
              14,   14,   14,    4,   15,   16,    8,    8,    8,   17,
              18,   19,   20,   21,   22,   23,   24,   25,    8,   26,
              27,   28,   29,   30,    8,   31,   32,   33,   34,   35,
              36,   37,    8,   38,   44,   44,   44,   44,   45,   45,
      -       45,   45,   46,   46,   46,   46,   42,   47,  130,   42,
      -       42,  142,   42,   48,   49,   49,   49,   49,   42,   48,
      -       49,   49,   49,   49,   42,   52,  152,   42,  131,   42,
      -       42,   54,   54,   54,   54,   63,   55,   64,   42,   42,
      -       60,   42,   65,   56,   61,   57,   50,   58,   66,   42,
      -
      -       59,  102,   62,  150,   42,   67,   42,   71,   42,   68,
      -       72,   42,  103,   42,   80,   69,  104,   73,   70,   42,
      -       81,  129,   82,   93,  136,   74,   42,   75,   76,   42,
      -       42,   42,   94,  181,   42,   77,   90,   42,   95,   78,
      -       86,   79,   83,   83,   83,   83,   42,  132,   87,   91,
      -       42,  147,   42,   88,   84,   92,  116,   89,  127,   44,
      -       44,   44,   44,   42,   85,   42,   42,   42,  237,  117,
      -       42,  128,  118,   42,   42,   96,  143,   97,  153,  119,
      -      144,   98,  145,   99,  154,  100,  148,  101,  105,   42,
      -      149,   42,   42,  135,   45,   45,   45,   45,  146,   42,
      -
      -       42,  106,  107,  134,  108,  109,  110,   42,  111,   54,
      -       54,   54,   54,   42,  112,  151,  113,  114,  182,  115,
      -      105,   42,  163,  157,   42,   48,   46,   46,   46,   46,
      -       42,   42,  162,  120,  121,   42,  122,  155,  123,  156,
      -      124,   42,  125,   42,   42,  168,  126,  137,  137,  137,
      -      137,   42,   42,   43,  172,  138,   42,  161,  183,  164,
      -      167,  138,   48,   49,   49,   49,   49,   42,  139,  139,
      +       45,   45,   46,   46,   46,   46,   42,   47,   44,   44,
      +       44,   44,   42,   48,   49,   49,   49,   49,   42,   48,
      +       49,   49,   49,   49,   42,   52,   42,   42,   42,   42,
      +       42,   54,   54,   54,   54,   63,   55,   64,  150,   42,
      +       60,   42,   81,   56,   61,   57,   50,   58,   65,   42,
      +
      +       59,  104,   62,   42,   42,   66,   42,   70,   42,   67,
      +       71,  142,   42,  129,   79,   68,  132,   72,   69,   42,
      +       80,  102,   93,   42,  136,   73,   42,   74,   75,   42,
      +       42,   94,  103,  171,   42,   76,   90,   95,   42,   77,
      +       86,   78,   82,   82,   82,   82,   42,  143,   87,   91,
      +       42,  161,   42,   88,   83,   92,  116,   89,  127,   42,
      +      130,   42,   42,   84,   85,   42,   42,   42,  146,  117,
      +      134,  128,  118,   42,   42,   96,  144,   97,  145,  119,
      +      131,   98,  153,   99,   42,  100,  147,  101,  105,  152,
      +       42,  151,   42,  135,   45,   45,   45,   45,   42,   42,
      +
      +      160,  106,  107,  148,  108,  109,  110,  149,  111,   54,
      +       54,   54,   54,  167,  112,   43,  113,  114,   42,  115,
      +      105,   42,  156,   42,   42,   48,   46,   46,   46,   46,
      +       42,  184,  162,  120,  121,   42,  122,  154,  123,  155,
      +      124,   42,  125,   42,   41,   42,  126,  137,  137,  137,
      +      137,   42,  174,   41,   41,  138,   42,  251,  166,  163,
      +       42,  138,   48,   49,   49,   49,   49,   42,  139,  139,
             139,  139,   42,   42,   42,  139,  139,   42,  139,  139,
      -      139,  139,  139,  139,   42,  158,   42,   42,  159,  165,
      -       42,   42,   42,  169,  170,   42,  166,  160,   42,  175,
      +      139,  139,  139,  139,   42,  157,   42,   42,  158,  164,
      +       42,   42,   42,  168,  169,   42,  165,  159,   42,   42,
       
      -       83,   83,   83,   83,   42,   42,  174,   42,  171,  176,
      -      173,  184,   42,  177,  178,  179,  186,  180,   42,   42,
      -       42,  185,   42,   42,   42,   42,   42,   42,  187,   42,
      -       42,  197,  192,  194,  196,  190,  198,   42,   42,   42,
      -      188,  191,   42,  189,  199,   42,  193,  195,  200,  207,
      -      204,   42,  203,  201,  211,   42,   42,   42,  205,   42,
      -       42,   42,   42,  208,  217,  202,  213,  209,   42,  212,
      -      206,  215,   42,  218,  216,   42,  210,   42,   42,   42,
      -      214,  225,  219,   42,   42,  241,  221,   42,  226,   42,
      -      220,  224,   42,  229,  236,  223,   42,  222,  231,  232,
      -
      -       42,   42,  227,  228,   42,   42,  240,  230,  233,   42,
      -      238,  234,  239,   42,  242,   42,  235,  246,  246,  246,
      -      246,  251,   42,  243,  252,  247,  254,   42,   42,  244,
      -      256,  247,  137,  137,  137,  137,   42,  253,  260,   42,
      -      138,   42,  255,   42,   42,   42,  138,  248,  249,  258,
      -      250,  250,  250,  250,   42,  257,   42,   42,  263,  262,
      -       42,  264,   42,  261,   42,  259,   42,   42,   42,  267,
      -      265,   42,   42,   42,  266,   42,  268,  274,   42,   42,
      -       42,   42,   42,   42,   42,  280,  324,  270,  269,  278,
      -      281,  271,  272,  282,  273,   42,  279,  276,   42,   42,
      -
      -      277,  275,  283,   42,   42,  284,   42,   42,  285,  286,
      -       42,   42,   42,   42,  289,   42,  291,   42,   42,   42,
      -       42,  290,  288,  287,   42,  295,   42,  293,   42,   42,
      -      303,  296,  292,  297,  326,   42,   42,  294,   42,  298,
      -       42,   42,  312,  299,  300,  300,  300,  300,   42,  305,
      -      301,  300,  300,  302,  300,  300,  300,  300,  300,  300,
      -      304,   42,   42,  310,  311,   42,   42,  307,   42,   42,
      -       42,  306,   42,   42,   42,   42,  315,  313,   42,  308,
      -      317,   42,   42,  320,  316,  321,  309,   42,  314,  327,
      -       42,  319,  322,   42,   42,  318,  325,   42,  323,  328,
      -
      -       42,  329,  246,  246,  246,  246,  331,  331,  331,  331,
      -      247,  332,  359,   42,  330,  334,  247,  248,  248,   42,
      -      331,  331,  331,  331,  250,  250,  250,  250,   42,  250,
      -      250,  250,  250,   42,   42,   42,   42,  335,   42,   42,
      -       42,  336,  333,   42,   42,   42,  338,   42,   42,  341,
      -       42,  337,   42,   42,   42,   42,  340,   42,   42,  343,
      -      348,  350,  342,  339,   42,  345,  346,  349,   42,   42,
      -       42,   42,   42,   42,  347,  344,  357,   42,   42,  351,
      -       42,  358,  352,   42,   42,  356,   42,  353,   42,  354,
      -       42,   42,   42,  355,  360,  361,  362,  365,  363,  366,
      -
      -      364,   42,  367,   42,   42,   42,   42,   42,   42,   42,
      -      384,  371,  368,  373,  374,  372,  370,  369,  375,   42,
      -      376,   42,   42,  380,   42,   42,   42,   42,  386,  377,
      -      378,  379,  381,   42,   42,   42,  382,  383,  331,  331,
      -      331,  331,   42,   42,   42,  385,  388,   42,  390,  391,
      -       42,  392,   42,   42,   42,  395,   42,  387,  389,  396,
      -      397,   42,   42,   42,   42,   42,  399,  393,  400,   42,
      -      394,   42,  405,   42,  398,  403,   42,   42,   42,  406,
      -       42,   42,  401,  402,   42,   42,   42,  404,   42,  411,
      -      407,  408,   42,   42,  410,   42,  409,   42,  412,   42,
      -
      -       42,   42,  416,  414,   42,  413,  415,  418,   42,  421,
      -      419,  417,   42,  420,  422,  423,  424,   42,   42,   42,
      -       42,   42,   42,   42,   42,   42,   42,   42,  426,  427,
      -       42,  431,  425,  429,  433,  435,  434,  428,  436,   42,
      -       42,   42,  432,  430,   42,  437,   42,   42,  439,  438,
      -       42,   42,   42,   42,  440,   42,   42,   42,   42,   42,
      -      445,  449,  450,  442,  443,  441,  452,   42,   42,  454,
      -       42,  447,  448,   42,  446,   42,  444,   42,  457,  451,
      -       42,  455,   42,   42,  453,   42,   42,  462,   42,   42,
      -       42,   42,  456,   42,   42,  458,  463,   42,  459,  464,
      -
      -      460,  461,  467,   42,  465,  468,   42,   42,  469,   42,
      -       42,  470,  466,   42,   42,   42,   42,   42,  471,   42,
      -       42,   42,  472,  477,  478,   42,  476,   42,  473,  474,
      -      482,  479,  480,   42,  484,   42,  475,  483,   42,  481,
      -       42,  488,   42,  487,   42,  485,   42,   42,  489,   42,
      -      491,   42,   42,  486,   42,   42,   42,   42,  493,   42,
      -       42,   42,   42,   42,  490,  494,  498,  501,  492,  502,
      -      499,  503,   42,  500,  495,  496,  497,   42,   42,  504,
      -       42,   42,   42,   42,  506,  505,  508,   42,  510,   42,
      -       42,   42,   42,  511,  507,   42,   42,   42,  514,   42,
      -
      -       42,  517,   42,  519,   42,  509,  513,   42,  516,   42,
      -       42,  512,  518,   42,  520,  515,   42,  521,   42,  523,
      -      525,   42,  522,  526,   42,   42,   42,   42,  524,  527,
      -       42,  529,  528,   42,   42,  534,   42,   42,   42,   42,
      -      533,   42,  530,  531,  535,  532,  540,  541,   42,   42,
      -       42,  536,   42,   42,   42,   42,  537,  544,   42,  539,
      -      538,   42,  545,   42,   42,   42,   42,   42,   42,   42,
      -       42,  542,  543,   42,   42,  546,   39,   39,   39,   39,
      -       39,   41,   41,   51,   42,   51,   51,   51,   53,   53,
      -      140,  140,  140,  140,  140,   42,   42,   42,   42,   42,
      +       42,   42,  181,   42,  183,   42,  173,  175,  170,  186,
      +      172,  176,   42,   42,  177,  178,  179,  182,  180,  185,
      +       42,  187,   42,  188,   42,   42,  189,   42,  190,   42,
      +      192,   42,  194,  197,  191,  196,   42,   42,  198,   42,
      +       42,   42,   42,   42,  193,  199,  195,   42,  201,  204,
      +      207,  211,   42,  203,   42,   42,   42,  205,  200,  209,
      +       42,  218,  213,  217,  208,  202,  212,   42,  210,  206,
      +      215,   42,   42,  216,   42,  223,  214,   42,   42,   42,
      +       42,  219,   42,   42,   42,  221,  224,  226,  237,  220,
      +      229,   42,  236,  231,  232,  225,  222,  241,   42,   42,
      +
      +       42,  227,  228,  233,  230,  238,  234,  239,   42,   42,
      +       42,  235,   42,   42,  240,  246,  246,  246,  246,  253,
      +      242,   42,  243,  247,  255,   42,   42,   42,  244,  247,
      +      137,  137,  137,  137,   42,  254,  258,   42,  138,   42,
      +      252,  257,  261,   42,  138,  248,  249,  256,  250,  250,
      +      250,  250,   42,   42,   42,   42,   42,  262,   42,  260,
      +      259,   42,   42,  266,   42,  264,   42,   42,  267,  265,
      +      263,   42,  273,   42,   42,   42,   42,   42,   42,   42,
      +      268,  280,   42,   42,  269,  279,  270,  271,   42,  277,
      +      272,  281,  275,  284,  283,  276,  278,  282,  285,  274,
      +
      +       42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
      +      286,   42,  289,  291,   42,   42,   42,   42,  290,  295,
      +      288,   42,  293,   42,  287,   42,  296,  292,   42,   42,
      +      297,  303,  294,   42,  305,  299,  298,  300,  300,  300,
      +      300,  302,  301,  306,  300,  300,   42,  300,  300,  300,
      +      300,  300,  300,  304,   42,   42,   42,   42,   42,   42,
      +       42,   42,   42,   42,   42,  307,   42,   42,   42,  324,
      +      313,  308,  317,  312,  315,  322,   42,  310,  309,  314,
      +      311,   42,  316,   42,  323,  319,  318,   42,   42,   42,
      +       42,  320,   42,  321,  326,  328,  325,   42,   42,   42,
      +
      +      330,   42,   42,   42,  327,  246,  246,  246,  246,  333,
      +      337,  329,  392,  247,  363,  332,  334,  248,  248,  247,
      +      331,  331,  331,  331,  331,  331,  331,  331,  250,  250,
      +      250,  250,   42,  250,  250,  250,  250,   42,   42,   42,
      +       42,   42,   42,   42,   42,  336,   42,   42,  340,   42,
      +       42,   42,   42,   42,   42,   42,  335,  339,  342,  347,
      +       42,  341,  348,  345,  338,   42,  344,   42,  349,   42,
      +       42,   42,  346,   42,  343,  350,  356,   42,  351,  357,
      +      354,  358,   42,  355,   42,  359,   42,   42,  352,   42,
      +      353,   42,   42,   42,   42,   42,   42,   42,   42,  360,
      +
      +       42,   42,  364,  362,  361,  373,  365,  367,  366,  374,
      +      372,  375,   42,   42,  371,   42,  368,   42,   42,  370,
      +      369,  378,   42,  376,   42,  377,   42,  379,   42,   42,
      +      381,   42,   42,   42,  380,  382,   42,  383,  384,  331,
      +      331,  331,  331,   42,  388,   42,  385,   42,   42,  391,
      +      390,  386,   42,  395,  396,  387,  389,   42,   42,   42,
      +      394,   42,   42,   42,   42,  399,   42,   42,  393,  398,
      +       42,   42,  404,  402,   42,  405,   42,   42,   42,  397,
      +      409,  400,  401,   42,  403,  406,   42,   42,  407,   42,
      +       42,   42,   42,  410,  408,   42,  411,   42,   42,   42,
      +
      +      412,  416,  419,  418,   42,  414,   42,   42,  417,  415,
      +      413,   42,  421,  423,  422,   42,   42,   42,   42,   42,
      +       42,   42,  420,   42,   42,  424,  427,  426,   42,  431,
      +      429,  425,  433,  435,   42,   42,  428,  434,   42,   42,
      +      432,  437,  430,   42,   42,   42,   42,  438,  436,   42,
      +       42,   42,   42,  440,   42,   42,  439,   42,  451,  444,
      +      448,  449,  442,   42,   42,   42,   42,  441,   42,  445,
      +      446,  447,  457,   42,  443,  453,  454,   42,  450,  455,
      +      452,  456,   42,   42,   42,   42,   42,   42,   42,   42,
      +      458,   42,   42,   42,  462,  459,  463,   42,  467,  464,
      +
      +      460,  461,   42,  465,   42,  468,   42,   42,   42,   42,
      +      469,  466,   42,   42,   42,   42,  471,  470,  476,  477,
      +       42,   42,   42,  475,  472,   42,  473,   42,   42,  479,
      +      478,  480,  482,  474,  484,   42,  481,   42,  483,   42,
      +       42,  488,   42,   42,   42,  485,   42,  487,  491,  489,
      +       42,   42,  490,  486,   42,  493,   42,   42,   42,   42,
      +       42,  497,   42,   42,   42,   42,  492,  503,  501,  494,
      +      495,  504,  498,  502,  496,  499,   42,   42,  500,  507,
      +       42,   42,   42,  506,  505,   42,  508,  509,   42,   42,
      +      510,  512,   42,   42,   42,   42,   42,  514,   42,   42,
      +
      +      517,   42,  519,   42,   42,  513,  511,   42,   42,  516,
      +       42,  518,   42,  520,  524,   42,  515,   42,  521,  522,
      +      526,   42,   42,   42,  527,  530,   42,  523,  528,   42,
      +       42,  525,   42,  529,   42,   42,  532,   42,  536,   42,
      +       42,  533,  535,   42,   42,  531,  537,   42,  534,   42,
      +       42,  543,  538,   42,   42,  544,  540,  539,   42,   42,
      +       42,  548,  542,  541,  549,   42,   42,   42,  547,   42,
      +       42,   42,   42,  546,  545,   42,   42,   42,   42,   42,
      +      550,   39,   39,   39,   39,   39,   41,   41,   51,   42,
      +       51,   51,   51,   53,   53,  140,  140,  140,  140,  140,
       
              42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
              42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
      @@ -713,153 +714,155 @@
              42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
              42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
              42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
      -      141,   42,  245,   42,   42,   42,   42,  141,   42,  133,
      -       42,   40,  547,    3,  547,  547,  547,  547,  547,  547,
      +       42,   42,   42,   42,   42,   42,  141,   42,  245,   42,
      +       42,   42,   42,  141,   42,  133,   42,   40,  551,    3,
       
      -      547,  547,  547,  547,  547,  547,  547,  547,  547,  547,
      -      547,  547,  547,  547,  547,  547,  547,  547,  547,  547,
      -      547,  547,  547,  547,  547,  547,  547,  547,  547,  547,
      -      547,  547,  547,  547,  547,  547,  547,  547
      +      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
      +      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
      +      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
      +      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
      +      551,  551,  551,  551
           } ;
       
      -static yyconst short int yy_chk[1239] =
      +static yyconst short int yy_chk[1245] =
           {   0,
               1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
               1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
               1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
               1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
               1,    1,    1,    1,    9,    9,    9,    9,   10,   10,
      -       10,   10,   11,   11,   11,   11,   11,   12,   37,   37,
      -       63,  555,   12,   13,   13,   13,   13,   13,   13,   14,
      -       14,   14,   14,   14,   14,   16,   63,   17,   37,   19,
      -       18,   16,   16,   16,   16,   19,   17,   19,   30,   21,
      -       18,   60,   19,   17,   18,   17,   13,   17,   19,   20,
      -
      -       17,   30,   18,   60,   23,   20,   31,   21,   24,   20,
      -       21,   36,   30,   28,   23,   20,   31,   21,   20,   22,
      -       23,   36,   24,   28,   47,   22,   86,   22,   22,   47,
      -       27,   58,   28,   86,   26,   22,   27,   38,   28,   22,
      -       26,   22,   25,   25,   25,   25,   25,   38,   26,   27,
      -       33,   58,   35,   26,   25,   27,   33,   26,   35,   44,
      -       44,   44,   44,  127,   25,   29,   56,   55,  127,   33,
      -       64,   35,   33,   59,   65,   29,   55,   29,   64,   33,
      -       56,   29,   56,   29,   65,   29,   59,   29,   32,   57,
      -       59,   61,   32,   45,   45,   45,   45,   45,   57,   67,
      -
      -       87,   32,   32,  553,   32,   32,   32,   70,   32,   54,
      -       54,   54,   54,   71,   32,   61,   32,   32,   87,   32,
      -       34,   66,   71,   67,   34,   46,   46,   46,   46,   46,
      -       46,   76,   70,   34,   34,   73,   34,   66,   34,   66,
      -       34,   69,   34,   75,   79,   76,   34,   48,   48,   48,
      -       48,   48,   88,  550,   79,   48,  546,   69,   88,   73,
      -       75,   48,   49,   49,   49,   49,   49,   49,   50,   50,
      -       50,   50,   50,   74,   77,   50,   50,   68,   50,   50,
      -       50,   50,   50,   50,   78,   68,   80,   81,   68,   74,
      -       82,   85,   84,   77,   78,  544,   74,   68,   89,   82,
      -
      -       83,   83,   83,   83,   83,   90,   81,   91,   78,   84,
      -       80,   89,   92,   85,   85,   85,   91,   85,   94,   95,
      -       96,   90,   97,   98,   99,  100,  103,  101,   92,  104,
      -      102,  100,   97,   98,   99,   95,  101,  105,  106,  108,
      -       94,   96,  107,   94,  102,  110,   97,   98,  103,  108,
      -      107,  109,  106,  104,  110,  113,  111,  114,  107,  115,
      -      121,  112,  543,  108,  114,  105,  111,  109,  116,  110,
      -      107,  112,  118,  115,  113,  119,  109,  120,  122,  123,
      -      111,  121,  116,  124,  126,  130,  118,  130,  122,  125,
      -      116,  120,  131,  124,  126,  119,  128,  118,  125,  125,
      -
      -      129,  132,  122,  123,  148,  145,  129,  124,  125,  144,
      -      128,  125,  128,  541,  131,  156,  125,  135,  135,  135,
      -      135,  144,  151,  132,  145,  135,  148,  147,  150,  132,
      -      151,  135,  137,  137,  137,  137,  137,  147,  156,  152,
      -      137,  154,  150,  158,  159,  160,  137,  138,  138,  154,
      -      138,  138,  138,  138,  138,  152,  155,  157,  159,  158,
      -      161,  160,  162,  157,  165,  155,  164,  166,  168,  162,
      -      161,  169,  167,  170,  161,  173,  164,  169,  171,  172,
      -      237,  539,  176,  174,  175,  173,  237,  165,  164,  172,
      -      174,  166,  167,  175,  168,  177,  172,  171,  178,  179,
      -
      -      171,  170,  176,  180,  181,  177,  182,  183,  178,  179,
      -      184,  185,  186,  189,  181,  188,  183,  190,  197,  200,
      -      205,  182,  180,  179,  203,  188,  219,  185,  239,  204,
      -      205,  189,  184,  190,  239,  538,  206,  186,  210,  197,
      -      218,  216,  219,  200,  202,  202,  202,  202,  212,  210,
      -      203,  202,  202,  204,  202,  202,  202,  202,  202,  202,
      -      206,  211,  215,  216,  218,  220,  222,  212,  221,  224,
      -      223,  211,  228,  231,  240,  234,  222,  220,  235,  215,
      -      223,  236,  243,  231,  222,  234,  215,  238,  221,  240,
      -      244,  228,  235,  251,  241,  224,  238,  253,  236,  241,
      -
      -      284,  243,  246,  246,  246,  246,  248,  248,  248,  248,
      -      246,  251,  284,  537,  244,  253,  246,  247,  247,  255,
      -      247,  247,  247,  247,  249,  249,  249,  249,  249,  250,
      -      250,  250,  250,  250,  252,  256,  258,  255,  259,  260,
      -      261,  256,  252,  262,  263,  264,  259,  265,  266,  262,
      -      267,  258,  268,  271,  269,  274,  261,  270,  275,  264,
      -      269,  271,  263,  260,  276,  266,  267,  270,  277,  280,
      -      281,  282,  285,  286,  268,  265,  281,  287,  290,  274,
      -      293,  282,  275,  288,  289,  280,  294,  276,  295,  276,
      -      296,  298,  299,  277,  285,  286,  287,  290,  288,  293,
      -
      -      289,  302,  294,  305,  321,  303,  324,  314,  306,  307,
      -      321,  299,  295,  303,  305,  302,  298,  296,  306,  310,
      -      307,  313,  311,  314,  316,  319,  320,  322,  324,  310,
      -      311,  313,  316,  326,  329,  328,  319,  320,  331,  331,
      -      331,  331,  334,  333,  336,  322,  328,  338,  329,  333,
      -      337,  334,  341,  339,  340,  338,  342,  326,  328,  339,
      -      340,  343,  344,  345,  348,  346,  342,  336,  343,  347,
      -      337,  350,  348,  357,  341,  346,  353,  354,  355,  350,
      -      358,  360,  344,  345,  356,  361,  362,  347,  368,  357,
      -      353,  354,  363,  365,  356,  369,  355,  372,  358,  366,
      -
      -      367,  371,  363,  361,  370,  360,  362,  366,  373,  369,
      -      367,  365,  374,  368,  370,  371,  372,  376,  375,  379,
      -      378,  380,  382,  386,  387,  389,  384,  385,  374,  375,
      -      390,  380,  373,  378,  384,  386,  385,  376,  387,  388,
      -      392,  393,  382,  379,  394,  388,  396,  397,  390,  389,
      -      398,  400,  401,  402,  392,  405,  404,  525,  409,  413,
      -      398,  404,  404,  394,  396,  393,  409,  410,  415,  413,
      -      417,  401,  402,  420,  400,  414,  397,  426,  417,  405,
      -      421,  414,  423,  424,  410,  427,  433,  426,  436,  437,
      -      440,  439,  415,  438,  443,  420,  427,  442,  421,  433,
      -
      -      423,  424,  438,  444,  436,  439,  447,  448,  440,  449,
      -      450,  442,  437,  451,  453,  454,  455,  456,  443,  458,
      -      457,  460,  444,  451,  453,  459,  450,  462,  447,  448,
      -      457,  454,  455,  463,  459,  464,  449,  458,  465,  456,
      -      466,  464,  467,  463,  468,  460,  469,  470,  465,  472,
      -      467,  473,  474,  462,  477,  478,  475,  479,  469,  486,
      -      520,  515,  494,  487,  466,  470,  475,  479,  468,  486,
      -      477,  487,  488,  478,  472,  473,  474,  490,  491,  488,
      -      492,  495,  498,  499,  491,  490,  494,  500,  498,  501,
      -      502,  503,  504,  499,  492,  505,  506,  507,  502,  510,
      -
      -      511,  505,  512,  507,  514,  495,  501,  517,  504,  513,
      -      516,  500,  506,  518,  510,  503,  519,  511,  522,  513,
      -      516,  521,  512,  517,  526,  523,  524,  527,  514,  518,
      -      528,  521,  519,  529,  530,  527,  531,  532,  533,  534,
      -      526,  535,  522,  523,  528,  524,  533,  534,  536,  540,
      -      509,  529,  542,  545,  508,  497,  530,  540,  496,  532,
      -      531,  493,  542,  489,  485,  484,  483,  482,  481,  480,
      -      476,  535,  536,  471,  461,  545,  548,  548,  548,  548,
      -      548,  549,  549,  551,  452,  551,  551,  551,  552,  552,
      -      554,  554,  554,  554,  554,  446,  445,  441,  435,  434,
      -
      -      432,  431,  430,  429,  428,  425,  422,  419,  418,  416,
      -      412,  411,  408,  407,  406,  403,  399,  395,  391,  383,
      -      381,  377,  364,  359,  352,  351,  349,  335,  332,  330,
      -      327,  325,  323,  318,  317,  315,  312,  309,  308,  304,
      -      301,  297,  292,  291,  283,  279,  278,  273,  272,  257,
      -      254,  242,  233,  232,  230,  229,  227,  226,  225,  217,
      -      214,  213,  209,  208,  207,  201,  199,  198,  196,  195,
      -      194,  193,  192,  191,  187,  163,  153,  149,  146,  143,
      -      140,  136,  133,  117,   93,   72,   62,   52,   41,   39,
      -        8,    7,    3,  547,  547,  547,  547,  547,  547,  547,
      -
      -      547,  547,  547,  547,  547,  547,  547,  547,  547,  547,
      -      547,  547,  547,  547,  547,  547,  547,  547,  547,  547,
      -      547,  547,  547,  547,  547,  547,  547,  547,  547,  547,
      -      547,  547,  547,  547,  547,  547,  547,  547
      +       10,   10,   11,   11,   11,   11,   11,   12,   44,   44,
      +       44,   44,   12,   13,   13,   13,   13,   13,   13,   14,
      +       14,   14,   14,   14,   14,   16,   60,   17,   24,   19,
      +       18,   16,   16,   16,   16,   19,   17,   19,   60,   21,
      +       18,   31,   24,   17,   18,   17,   13,   17,   19,   20,
      +
      +       17,   31,   18,   36,   23,   20,   38,   21,   30,   20,
      +       21,  559,   28,   36,   23,   20,   38,   21,   20,   22,
      +       23,   30,   28,   78,   47,   22,   69,   22,   22,   47,
      +       27,   28,   30,   78,   26,   22,   27,   28,   55,   22,
      +       26,   22,   25,   25,   25,   25,   25,   55,   26,   27,
      +       33,   69,   35,   26,   25,   27,   33,   26,   35,   57,
      +       37,   37,   56,   25,   25,   29,   58,   61,   57,   33,
      +      557,   35,   33,   63,   64,   29,   56,   29,   56,   33,
      +       37,   29,   64,   29,   68,   29,   58,   29,   32,   63,
      +       59,   61,   32,   45,   45,   45,   45,   45,   66,   75,
      +
      +       68,   32,   32,   59,   32,   32,   32,   59,   32,   54,
      +       54,   54,   54,   75,   32,  554,   32,   32,   89,   32,
      +       34,   65,   66,   70,   34,   46,   46,   46,   46,   46,
      +       46,   89,   70,   34,   34,   72,   34,   65,   34,   65,
      +       34,   74,   34,   81,   82,  144,   34,   48,   48,   48,
      +       48,   48,   81,   82,   82,   48,  550,  144,   74,   72,
      +      548,   48,   49,   49,   49,   49,   49,   49,   50,   50,
      +       50,   50,   50,   73,   76,   50,   50,   67,   50,   50,
      +       50,   50,   50,   50,   77,   67,   79,   80,   67,   73,
      +       83,   84,   85,   76,   77,   86,   73,   67,   88,   87,
      +
      +       91,   94,   86,   90,   88,   92,   80,   83,   77,   91,
      +       79,   84,   95,   96,   85,   85,   85,   87,   85,   90,
      +       97,   92,   98,   94,  104,   99,   94,  100,   95,  101,
      +       97,  102,   98,  100,   96,   99,  103,  105,  101,  106,
      +      108,  107,  110,  109,   97,  102,   98,  115,  104,  107,
      +      108,  110,  111,  106,  113,  119,  114,  107,  103,  109,
      +      112,  115,  111,  114,  108,  105,  110,  116,  109,  107,
      +      112,  118,  120,  113,  121,  119,  111,  122,  123,  547,
      +      124,  116,  126,  127,  125,  118,  120,  122,  127,  116,
      +      124,  128,  126,  125,  125,  121,  118,  130,  131,  130,
      +
      +      132,  122,  123,  125,  124,  128,  125,  128,  129,  147,
      +      150,  125,  546,  148,  129,  135,  135,  135,  135,  147,
      +      131,  145,  132,  135,  150,  152,  157,  154,  132,  135,
      +      137,  137,  137,  137,  137,  148,  154,  155,  137,  151,
      +      145,  152,  157,  158,  137,  138,  138,  151,  138,  138,
      +      138,  138,  138,  156,  159,  160,  161,  158,  163,  156,
      +      155,  164,  165,  161,  167,  160,  168,  166,  163,  160,
      +      159,  169,  168,  170,  173,  172,  544,  175,  176,  171,
      +      163,  173,  174,  177,  164,  172,  165,  166,  178,  171,
      +      167,  174,  170,  177,  176,  170,  171,  175,  178,  169,
      +
      +      179,  180,  181,  182,  183,  184,  185,  186,  189,  188,
      +      179,  200,  181,  183,  190,  197,  203,  204,  182,  188,
      +      180,  205,  185,  210,  179,  542,  189,  184,  541,  206,
      +      190,  205,  186,  211,  210,  200,  197,  202,  202,  202,
      +      202,  204,  203,  211,  202,  202,  212,  202,  202,  202,
      +      202,  202,  202,  206,  215,  216,  218,  219,  220,  221,
      +      224,  235,  223,  237,  222,  212,  228,  236,  539,  237,
      +      220,  215,  223,  219,  222,  235,  244,  216,  215,  221,
      +      218,  231,  222,  234,  236,  228,  224,  238,  239,  240,
      +      241,  231,  243,  234,  239,  241,  238,  251,  253,  288,
      +
      +      244,  252,  258,  334,  240,  246,  246,  246,  246,  252,
      +      258,  243,  334,  246,  288,  251,  253,  247,  247,  246,
      +      247,  247,  247,  247,  248,  248,  248,  248,  249,  249,
      +      249,  249,  249,  250,  250,  250,  250,  250,  255,  256,
      +      259,  260,  261,  262,  263,  256,  264,  266,  261,  265,
      +      267,  273,  269,  268,  274,  276,  255,  260,  263,  268,
      +      270,  262,  269,  266,  259,  275,  265,  279,  270,  281,
      +      280,  283,  267,  284,  264,  273,  280,  285,  274,  281,
      +      276,  283,  286,  279,  287,  284,  289,  290,  275,  293,
      +      275,  294,  295,  296,  298,  299,  302,  303,  305,  285,
      +
      +      526,  306,  289,  287,  286,  303,  290,  294,  293,  305,
      +      302,  306,  307,  311,  299,  310,  295,  313,  314,  298,
      +      296,  311,  316,  307,  319,  310,  320,  313,  322,  324,
      +      316,  326,  321,  328,  314,  319,  329,  320,  321,  331,
      +      331,  331,  331,  333,  328,  336,  322,  338,  339,  333,
      +      329,  324,  337,  338,  339,  326,  328,  340,  342,  341,
      +      337,  343,  344,  345,  347,  342,  346,  349,  336,  341,
      +      355,  352,  347,  345,  353,  349,  354,  356,  357,  340,
      +      355,  343,  344,  358,  346,  352,  360,  361,  353,  362,
      +      365,  363,  367,  356,  354,  366,  357,  368,  369,  371,
      +
      +      358,  363,  367,  366,  370,  361,  372,  373,  365,  362,
      +      360,  374,  369,  371,  370,  375,  376,  378,  379,  380,
      +      382,  386,  368,  389,  384,  372,  375,  374,  385,  380,
      +      378,  373,  384,  386,  387,  388,  376,  385,  390,  392,
      +      382,  388,  379,  393,  395,  396,  399,  389,  387,  397,
      +      408,  400,  401,  392,  404,  403,  390,  415,  408,  397,
      +      403,  403,  395,  409,  417,  412,  413,  393,  420,  399,
      +      400,  401,  417,  414,  396,  412,  413,  421,  404,  414,
      +      409,  415,  423,  424,  426,  427,  433,  436,  437,  438,
      +      420,  439,  440,  442,  426,  421,  427,  443,  438,  433,
      +
      +      423,  424,  446,  436,  447,  439,  448,  449,  450,  452,
      +      440,  437,  453,  454,  456,  455,  443,  442,  450,  452,
      +      458,  460,  457,  449,  446,  459,  447,  462,  466,  454,
      +      453,  455,  457,  448,  459,  464,  456,  463,  458,  465,
      +      467,  464,  468,  469,  471,  460,  472,  463,  467,  465,
      +      473,  474,  466,  462,  478,  469,  476,  477,  479,  487,
      +      520,  474,  494,  486,  488,  492,  468,  487,  479,  471,
      +      472,  488,  476,  486,  473,  477,  490,  491,  478,  492,
      +      498,  497,  499,  491,  490,  500,  494,  497,  501,  502,
      +      498,  500,  503,  504,  505,  506,  507,  502,  509,  511,
      +
      +      505,  510,  507,  512,  513,  501,  499,  514,  517,  504,
      +      516,  506,  518,  509,  513,  521,  503,  519,  510,  511,
      +      516,  522,  523,  524,  517,  521,  527,  512,  518,  525,
      +      528,  514,  529,  519,  530,  531,  523,  532,  528,  533,
      +      534,  524,  527,  535,  537,  522,  529,  536,  525,  538,
      +      540,  535,  530,  543,  545,  536,  532,  531,  549,  515,
      +      508,  543,  534,  533,  545,  496,  495,  493,  540,  489,
      +      485,  484,  483,  538,  537,  482,  481,  480,  475,  470,
      +      549,  552,  552,  552,  552,  552,  553,  553,  555,  461,
      +      555,  555,  555,  556,  556,  558,  558,  558,  558,  558,
      +
      +      451,  445,  444,  441,  435,  434,  432,  431,  430,  429,
      +      428,  425,  422,  419,  418,  416,  411,  410,  407,  406,
      +      405,  402,  398,  394,  391,  383,  381,  377,  364,  359,
      +      351,  350,  348,  335,  332,  330,  327,  325,  323,  318,
      +      317,  315,  312,  309,  308,  304,  301,  297,  292,  291,
      +      282,  278,  277,  272,  271,  257,  254,  242,  233,  232,
      +      230,  229,  227,  226,  225,  217,  214,  213,  209,  208,
      +      207,  201,  199,  198,  196,  195,  194,  193,  192,  191,
      +      187,  162,  153,  149,  146,  143,  140,  136,  133,  117,
      +       93,   71,   62,   52,   41,   39,    8,    7,    3,  551,
      +
      +      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
      +      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
      +      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
      +      551,  551,  551,  551,  551,  551,  551,  551,  551,  551,
      +      551,  551,  551,  551
           } ;
       
       static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
      @@ -1024,7 +1027,7 @@
       /* HexIntConstant - Hexadecimal constant generated by the CFE to avoid forcing
        * it to deal with 64 bit numbers.
        */
      -#line 1028 "Lexer.cpp"
      +#line 1031 "Lexer.cpp"
       
       /* Macros after this point can all be overridden by user definitions in
        * section 1.
      @@ -1178,7 +1181,7 @@
       #line 190 "/proj/llvm/llvm-1/lib/AsmParser/Lexer.l"
       
       
      -#line 1182 "Lexer.cpp"
      +#line 1185 "Lexer.cpp"
       
       	if ( yy_init )
       		{
      @@ -1226,14 +1229,14 @@
       			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
       				{
       				yy_current_state = (int) yy_def[yy_current_state];
      -				if ( yy_current_state >= 548 )
      +				if ( yy_current_state >= 552 )
       					yy_c = yy_meta[(unsigned int) yy_c];
       				}
       			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
       			*yy_state_ptr++ = yy_current_state;
       			++yy_cp;
       			}
      -		while ( yy_current_state != 547 );
      +		while ( yy_current_state != 551 );
       
       yy_find_action:
       		yy_current_state = *--yy_state_ptr;
      @@ -1362,7 +1365,7 @@
       case 19:
       YY_RULE_SETUP
       #line 211 "/proj/llvm/llvm-1/lib/AsmParser/Lexer.l"
      -{ return CHECKPOINT; }
      +{ return IMPLEMENTATION; }
       	YY_BREAK
       case 20:
       YY_RULE_SETUP
      @@ -2049,7 +2052,7 @@
       #line 443 "/proj/llvm/llvm-1/lib/AsmParser/Lexer.l"
       YY_FATAL_ERROR( "flex scanner jammed" );
       	YY_BREAK
      -#line 2053 "Lexer.cpp"
      +#line 2056 "Lexer.cpp"
       
       	case YY_END_OF_BUFFER:
       		{
      @@ -2336,7 +2339,7 @@
       		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
       			{
       			yy_current_state = (int) yy_def[yy_current_state];
      -			if ( yy_current_state >= 548 )
      +			if ( yy_current_state >= 552 )
       				yy_c = yy_meta[(unsigned int) yy_c];
       			}
       		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
      @@ -2366,11 +2369,11 @@
       	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
       		{
       		yy_current_state = (int) yy_def[yy_current_state];
      -		if ( yy_current_state >= 548 )
      +		if ( yy_current_state >= 552 )
       			yy_c = yy_meta[(unsigned int) yy_c];
       		}
       	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
      -	yy_is_jam = (yy_current_state == 547);
      +	yy_is_jam = (yy_current_state == 551);
       	if ( ! yy_is_jam )
       		*yy_state_ptr++ = yy_current_state;
       
      
      
      Index: llvm/lib/AsmParser/Lexer.l.cvs
      diff -u llvm/lib/AsmParser/Lexer.l.cvs:1.29 llvm/lib/AsmParser/Lexer.l.cvs:1.30
      --- llvm/lib/AsmParser/Lexer.l.cvs:1.29	Tue Mar 27 21:37:40 2007
      +++ llvm/lib/AsmParser/Lexer.l.cvs	Thu Mar 29 13:50:01 2007
      @@ -208,7 +208,7 @@
       hidden          { return HIDDEN; }
       extern_weak     { return EXTERN_WEAK; }
       external        { return EXTERNAL; }
      -checkpoint      { return CHECKPOINT; }
      +implementation  { return IMPLEMENTATION; }
       zeroinitializer { return ZEROINITIALIZER; }
       \.\.\.          { return DOTDOTDOT; }
       undef           { return UNDEF; }
      
      
      Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs
      diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.78 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.79
      --- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.78	Tue Mar 27 21:37:40 2007
      +++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs	Thu Mar 29 13:50:01 2007
      @@ -82,7 +82,7 @@
            LABELSTR = 273,
            STRINGCONSTANT = 274,
            ATSTRINGCONSTANT = 275,
      -     CHECKPOINT = 276,
      +     IMPLEMENTATION = 276,
            ZEROINITIALIZER = 277,
            TRUETOK = 278,
            FALSETOK = 279,
      @@ -217,7 +217,7 @@
       #define LABELSTR 273
       #define STRINGCONSTANT 274
       #define ATSTRINGCONSTANT 275
      -#define CHECKPOINT 276
      +#define IMPLEMENTATION 276
       #define ZEROINITIALIZER 277
       #define TRUETOK 278
       #define FALSETOK 279
      @@ -1729,38 +1729,38 @@
         "$end", "error", "$undefined", "ESINT64VAL", "EUINT64VAL", "ESAPINTVAL",
         "EUAPINTVAL", "LOCALVAL_ID", "GLOBALVAL_ID", "FPVAL", "VOID", "INTTYPE",
         "FLOAT", "DOUBLE", "LABEL", "TYPE", "LOCALVAR", "GLOBALVAR", "LABELSTR",
      -  "STRINGCONSTANT", "ATSTRINGCONSTANT", "CHECKPOINT", "ZEROINITIALIZER",
      -  "TRUETOK", "FALSETOK", "BEGINTOK", "ENDTOK", "DECLARE", "DEFINE",
      -  "GLOBAL", "CONSTANT", "SECTION", "VOLATILE", "TO", "DOTDOTDOT",
      -  "NULL_TOK", "UNDEF", "INTERNAL", "LINKONCE", "WEAK", "APPENDING",
      -  "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "OPAQUE", "EXTERNAL", "TARGET",
      -  "TRIPLE", "ALIGN", "DEPLIBS", "CALL", "TAIL", "ASM_TOK", "MODULE",
      -  "SIDEEFFECT", "CC_TOK", "CCC_TOK", "FASTCC_TOK", "COLDCC_TOK",
      -  "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT", "RET", "BR",
      -  "SWITCH", "INVOKE", "UNWIND", "UNREACHABLE", "ADD", "SUB", "MUL", "UDIV",
      -  "SDIV", "FDIV", "UREM", "SREM", "FREM", "AND", "OR", "XOR", "SHL",
      -  "LSHR", "ASHR", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT", "SLE", "SGE",
      -  "ULT", "UGT", "ULE", "UGE", "OEQ", "ONE", "OLT", "OGT", "OLE", "OGE",
      -  "ORD", "UNO", "UEQ", "UNE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE",
      -  "GETELEMENTPTR", "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT", "BITCAST",
      -  "UITOFP", "SITOFP", "FPTOUI", "FPTOSI", "INTTOPTR", "PTRTOINT",
      -  "PHI_TOK", "SELECT", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT",
      -  "SHUFFLEVECTOR", "NORETURN", "INREG", "SRET", "NOUNWIND", "DEFAULT",
      -  "HIDDEN", "'='", "','", "'*'", "'\\\\'", "'('", "')'", "'['", "'x'",
      -  "']'", "'<'", "'>'", "'{'", "'}'", "'c'", "$accept", "ArithmeticOps",
      -  "LogicalOps", "CastOps", "IPredicates", "FPredicates", "IntType",
      -  "FPType", "LocalName", "OptLocalName", "OptLocalAssign", "GlobalName",
      -  "OptGlobalAssign", "GVInternalLinkage", "GVExternalLinkage",
      -  "GVVisibilityStyle", "FunctionDeclareLinkage", "FunctionDefineLinkage",
      -  "OptCallingConv", "ParamAttr", "OptParamAttrs", "FuncAttr",
      -  "OptFuncAttrs", "OptAlign", "OptCAlign", "SectionString", "OptSection",
      -  "GlobalVarAttributes", "GlobalVarAttribute", "PrimType", "Types",
      -  "ArgType", "ResultTypes", "ArgTypeList", "ArgTypeListI", "TypeListI",
      -  "ConstVal", "ConstExpr", "ConstVector", "GlobalType", "Module",
      -  "DefinitionList", "Definition", "@1", "@2", "@3", "@4", "@5", "AsmBlock",
      -  "TargetDefinition", "LibrariesDefinition", "LibList", "ArgListH",
      -  "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader", "END",
      -  "Function", "FunctionProto", "OptSideEffect", "ConstValueRef",
      +  "STRINGCONSTANT", "ATSTRINGCONSTANT", "IMPLEMENTATION",
      +  "ZEROINITIALIZER", "TRUETOK", "FALSETOK", "BEGINTOK", "ENDTOK",
      +  "DECLARE", "DEFINE", "GLOBAL", "CONSTANT", "SECTION", "VOLATILE", "TO",
      +  "DOTDOTDOT", "NULL_TOK", "UNDEF", "INTERNAL", "LINKONCE", "WEAK",
      +  "APPENDING", "DLLIMPORT", "DLLEXPORT", "EXTERN_WEAK", "OPAQUE",
      +  "EXTERNAL", "TARGET", "TRIPLE", "ALIGN", "DEPLIBS", "CALL", "TAIL",
      +  "ASM_TOK", "MODULE", "SIDEEFFECT", "CC_TOK", "CCC_TOK", "FASTCC_TOK",
      +  "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT",
      +  "RET", "BR", "SWITCH", "INVOKE", "UNWIND", "UNREACHABLE", "ADD", "SUB",
      +  "MUL", "UDIV", "SDIV", "FDIV", "UREM", "SREM", "FREM", "AND", "OR",
      +  "XOR", "SHL", "LSHR", "ASHR", "ICMP", "FCMP", "EQ", "NE", "SLT", "SGT",
      +  "SLE", "SGE", "ULT", "UGT", "ULE", "UGE", "OEQ", "ONE", "OLT", "OGT",
      +  "OLE", "OGE", "ORD", "UNO", "UEQ", "UNE", "MALLOC", "ALLOCA", "FREE",
      +  "LOAD", "STORE", "GETELEMENTPTR", "TRUNC", "ZEXT", "SEXT", "FPTRUNC",
      +  "FPEXT", "BITCAST", "UITOFP", "SITOFP", "FPTOUI", "FPTOSI", "INTTOPTR",
      +  "PTRTOINT", "PHI_TOK", "SELECT", "VAARG", "EXTRACTELEMENT",
      +  "INSERTELEMENT", "SHUFFLEVECTOR", "NORETURN", "INREG", "SRET",
      +  "NOUNWIND", "DEFAULT", "HIDDEN", "'='", "','", "'*'", "'\\\\'", "'('",
      +  "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'", "'c'", "$accept",
      +  "ArithmeticOps", "LogicalOps", "CastOps", "IPredicates", "FPredicates",
      +  "IntType", "FPType", "LocalName", "OptLocalName", "OptLocalAssign",
      +  "GlobalName", "OptGlobalAssign", "GVInternalLinkage",
      +  "GVExternalLinkage", "GVVisibilityStyle", "FunctionDeclareLinkage",
      +  "FunctionDefineLinkage", "OptCallingConv", "ParamAttr", "OptParamAttrs",
      +  "FuncAttr", "OptFuncAttrs", "OptAlign", "OptCAlign", "SectionString",
      +  "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "PrimType",
      +  "Types", "ArgType", "ResultTypes", "ArgTypeList", "ArgTypeListI",
      +  "TypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType",
      +  "Module", "DefinitionList", "Definition", "@1", "@2", "@3", "@4", "@5",
      +  "AsmBlock", "TargetDefinition", "LibrariesDefinition", "LibList",
      +  "ArgListH", "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader",
      +  "END", "Function", "FunctionProto", "OptSideEffect", "ConstValueRef",
         "SymbolicValueRef", "ValueRef", "ResolvedVal", "BasicBlockList",
         "BasicBlock", "InstructionList", "BBTerminatorInst", "JumpTable", "Inst",
         "PHIList", "ValueRefList", "IndexList", "OptTailCall", "InstVal",
      
      
      Index: llvm/lib/AsmParser/llvmAsmParser.h.cvs
      diff -u llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.61 llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.62
      --- llvm/lib/AsmParser/llvmAsmParser.h.cvs:1.61	Tue Mar 27 21:37:40 2007
      +++ llvm/lib/AsmParser/llvmAsmParser.h.cvs	Thu Mar 29 13:50:01 2007
      @@ -47,7 +47,7 @@
            LABELSTR = 273,
            STRINGCONSTANT = 274,
            ATSTRINGCONSTANT = 275,
      -     CHECKPOINT = 276,
      +     IMPLEMENTATION = 276,
            ZEROINITIALIZER = 277,
            TRUETOK = 278,
            FALSETOK = 279,
      @@ -182,7 +182,7 @@
       #define LABELSTR 273
       #define STRINGCONSTANT 274
       #define ATSTRINGCONSTANT 275
      -#define CHECKPOINT 276
      +#define IMPLEMENTATION 276
       #define ZEROINITIALIZER 277
       #define TRUETOK 278
       #define FALSETOK 279
      
      
      Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs
      diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.79 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.80
      --- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.79	Tue Mar 27 21:37:40 2007
      +++ llvm/lib/AsmParser/llvmAsmParser.y.cvs	Thu Mar 29 13:50:01 2007
      @@ -1039,7 +1039,7 @@
       %type  OptAlign OptCAlign
       %type  OptSection SectionString
       
      -%token CHECKPOINT ZEROINITIALIZER TRUETOK FALSETOK BEGINTOK ENDTOK
      +%token IMPLEMENTATION ZEROINITIALIZER TRUETOK FALSETOK BEGINTOK ENDTOK
       %token DECLARE DEFINE GLOBAL CONSTANT SECTION VOLATILE
       %token TO DOTDOTDOT NULL_TOK UNDEF INTERNAL LINKONCE WEAK APPENDING
       %token DLLIMPORT DLLEXPORT EXTERN_WEAK
      @@ -1942,7 +1942,7 @@
         | MODULE ASM_TOK AsmBlock {
           CHECK_FOR_ERROR
         }  
      -  | CHECKPOINT {
      +  | IMPLEMENTATION {
           // Emit an error if there are any unresolved types left.
           if (!CurModule.LateResolveTypes.empty()) {
             const ValID &DID = CurModule.LateResolveTypes.begin()->first;
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 18:57:41 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 18:57:41 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Benchmarks/MiBench/consumer-jpeg/Makefile
      	output_large_decode.ppm
      Message-ID: <200703292357.l2TNvftU021207@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/consumer-jpeg:
      
      Makefile updated: 1.2 -> 1.3
      output_large_decode.ppm (r1.1) removed
      ---
      Log message:
      
      Do not keep test output in repository.
      
      ---
      Diffs of the changes:  (+1 -1)
      
       Makefile |    2 +-
       1 files changed, 1 insertion(+), 1 deletion(-)
      
      
      Index: llvm-test/MultiSource/Benchmarks/MiBench/consumer-jpeg/Makefile
      diff -u llvm-test/MultiSource/Benchmarks/MiBench/consumer-jpeg/Makefile:1.2 llvm-test/MultiSource/Benchmarks/MiBench/consumer-jpeg/Makefile:1.3
      --- llvm-test/MultiSource/Benchmarks/MiBench/consumer-jpeg/Makefile:1.2	Thu Mar 29 11:44:34 2007
      +++ llvm-test/MultiSource/Benchmarks/MiBench/consumer-jpeg/Makefile	Thu Mar 29 18:57:23 2007
      @@ -2,5 +2,5 @@
       
       PROG     = consumer-jpeg
       LDFLAGS  = -lm
      -RUN_OPTIONS = -dct int -ppm -outfile output_large_decode.ppm $(PROJ_SRC_DIR)/input_large.jpg
      +RUN_OPTIONS = -dct int -ppm -outfile Output/output_large_decode.ppm $(PROJ_SRC_DIR)/input_large.jpg
       include $(LEVEL)/MultiSource/Makefile.multisrc
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 19:09:36 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 19:09:36 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Applications/minisat/Makefile
      Message-ID: <200703300009.l2U09auC021397@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Applications/minisat:
      
      Makefile updated: 1.9 -> 1.10
      ---
      Log message:
      
      Fix for src != obj.
      
      ---
      Diffs of the changes:  (+2 -2)
      
       Makefile |    4 ++--
       1 files changed, 2 insertions(+), 2 deletions(-)
      
      
      Index: llvm-test/MultiSource/Applications/minisat/Makefile
      diff -u llvm-test/MultiSource/Applications/minisat/Makefile:1.9 llvm-test/MultiSource/Applications/minisat/Makefile:1.10
      --- llvm-test/MultiSource/Applications/minisat/Makefile:1.9	Sun Mar 18 23:25:29 2007
      +++ llvm-test/MultiSource/Applications/minisat/Makefile	Thu Mar 29 19:09:19 2007
      @@ -4,10 +4,10 @@
       PROG = minisat
       CPPFLAGS = -D NDEBUG
       LDFLAGS = -lz -lm
      -RUN_OPTIONS = -verbosity=0 short.cnf.gz
      +RUN_OPTIONS = -verbosity=0 $PROJ_SRC_DIR)/short.cnf.gz
       FP_TOLERANCE = 0.1
       ifdef LARGE_PROBLEM_SIZE
      -RUN_OPTIONS = -verbosity=0 long.cnf.gz
      +RUN_OPTIONS = -verbosity=0 $PROJ_SRC_DIR)/long.cnf.gz
       endif
       
       include ../../Makefile.multisrc
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 19:16:48 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 19:16:48 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Benchmarks/McCat/03-testtrie/Makefile
      Message-ID: <200703300016.l2U0Gm3W021527@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/McCat/03-testtrie:
      
      Makefile updated: 1.5 -> 1.6
      ---
      Log message:
      
      Fix for src != obj.
      
      ---
      Diffs of the changes:  (+2 -2)
      
       Makefile |    4 ++--
       1 files changed, 2 insertions(+), 2 deletions(-)
      
      
      Index: llvm-test/MultiSource/Benchmarks/McCat/03-testtrie/Makefile
      diff -u llvm-test/MultiSource/Benchmarks/McCat/03-testtrie/Makefile:1.5 llvm-test/MultiSource/Benchmarks/McCat/03-testtrie/Makefile:1.6
      --- llvm-test/MultiSource/Benchmarks/McCat/03-testtrie/Makefile:1.5	Wed Sep  1 09:33:24 2004
      +++ llvm-test/MultiSource/Benchmarks/McCat/03-testtrie/Makefile	Thu Mar 29 19:16:31 2007
      @@ -1,7 +1,7 @@
       LEVEL = ../../../..
       PROG = testtrie
       LDFLAGS = -lm
      -RUN_OPTIONS += testtrie.in2
      -#STDIN_FILENAME = benchmark.in3
      +RUN_OPTIONS += $(PROJ_SRC_DIR)/testtrie.in2
      +#STDIN_FILENAME = $(PROJ_SRC_DIR)/benchmark.in3
       include $(LEVEL)/MultiSource/Makefile.multisrc
       
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 19:18:41 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 19:18:41 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Benchmarks/McCat/15-trie/Makefile
      Message-ID: <200703300018.l2U0IfDl021564@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/McCat/15-trie:
      
      Makefile updated: 1.4 -> 1.5
      ---
      Log message:
      
      Fix for src != obj.
      
      ---
      Diffs of the changes:  (+1 -1)
      
       Makefile |    2 +-
       1 files changed, 1 insertion(+), 1 deletion(-)
      
      
      Index: llvm-test/MultiSource/Benchmarks/McCat/15-trie/Makefile
      diff -u llvm-test/MultiSource/Benchmarks/McCat/15-trie/Makefile:1.4 llvm-test/MultiSource/Benchmarks/McCat/15-trie/Makefile:1.5
      --- llvm-test/MultiSource/Benchmarks/McCat/15-trie/Makefile:1.4	Wed Sep  1 09:33:25 2004
      +++ llvm-test/MultiSource/Benchmarks/McCat/15-trie/Makefile	Thu Mar 29 19:18:24 2007
      @@ -1,7 +1,7 @@
       LEVEL = ../../../..
       PROG = trie
       LDFLAGS = -lm
      -RUN_OPTIONS += trie.in1
      +RUN_OPTIONS += $(PROJ_SRC_DIR)/trie.in1
       
       include $(LEVEL)/MultiSource/Makefile.multisrc
       
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 19:34:31 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 19:34:31 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Benchmarks/McCat/18-imp/Makefile main.c
      Message-ID: <200703300034.l2U0YVSd021839@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/McCat/18-imp:
      
      Makefile updated: 1.4 -> 1.5
      main.c updated: 1.1 -> 1.2
      ---
      Log message:
      
      Fix for src != obj.
      
      ---
      Diffs of the changes:  (+6 -2)
      
       Makefile |    2 +-
       main.c   |    6 +++++-
       2 files changed, 6 insertions(+), 2 deletions(-)
      
      
      Index: llvm-test/MultiSource/Benchmarks/McCat/18-imp/Makefile
      diff -u llvm-test/MultiSource/Benchmarks/McCat/18-imp/Makefile:1.4 llvm-test/MultiSource/Benchmarks/McCat/18-imp/Makefile:1.5
      --- llvm-test/MultiSource/Benchmarks/McCat/18-imp/Makefile:1.4	Wed Sep  1 09:33:25 2004
      +++ llvm-test/MultiSource/Benchmarks/McCat/18-imp/Makefile	Thu Mar 29 19:34:14 2007
      @@ -1,6 +1,6 @@
       LEVEL = ../../../..
       PROG = imp
      -RUN_OPTIONS += sg01.imp
      +RUN_OPTIONS += $(PROJ_SRC_DIR)/sg01.imp
       LDFLAGS := -lm
       
       include $(LEVEL)/MultiSource/Makefile.multisrc
      
      
      Index: llvm-test/MultiSource/Benchmarks/McCat/18-imp/main.c
      diff -u llvm-test/MultiSource/Benchmarks/McCat/18-imp/main.c:1.1 llvm-test/MultiSource/Benchmarks/McCat/18-imp/main.c:1.2
      --- llvm-test/MultiSource/Benchmarks/McCat/18-imp/main.c:1.1	Mon May 12 13:06:07 2003
      +++ llvm-test/MultiSource/Benchmarks/McCat/18-imp/main.c	Thu Mar 29 19:34:14 2007
      @@ -46,7 +46,7 @@
         void *var;
       } ParmT;
       
      -char IMAGE[80];
      +char IMAGE[800];
       double SIGMA;
       int VAR_THRESHOLD = -1;
       double VSPREAD_THRESHOLD = 0.02;
      @@ -117,6 +117,10 @@
         char read_parm[25];
         char read_val[80];
       
      +  /* Hack: put image file in same directory as input file */
      +  strcpy(IMAGE, file);
      +  parms[0].var = strrchr(IMAGE, '/') + 1;
      +
         if ((fp = fopen(file, "r")) == NULL)
           {
             printf("%s not found. Exiting.\n", file);
      
      
      
      
      
      From isanbard at gmail.com  Thu Mar 29 19:35:39 2007
      From: isanbard at gmail.com (Bill Wendling)
      Date: Thu, 29 Mar 2007 19:35:39 -0500
      Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86CallingConv.td
      Message-ID: <200703300035.l2U0Zd0v021873@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm/lib/Target/X86:
      
      X86CallingConv.td updated: 1.10 -> 1.11
      ---
      Log message:
      
      Add MMX calling conventions.
      
      
      ---
      Diffs of the changes:  (+14 -4)
      
       X86CallingConv.td |   18 ++++++++++++++----
       1 files changed, 14 insertions(+), 4 deletions(-)
      
      
      Index: llvm/lib/Target/X86/X86CallingConv.td
      diff -u llvm/lib/Target/X86/X86CallingConv.td:1.10 llvm/lib/Target/X86/X86CallingConv.td:1.11
      --- llvm/lib/Target/X86/X86CallingConv.td:1.10	Wed Feb 28 12:35:11 2007
      +++ llvm/lib/Target/X86/X86CallingConv.td	Thu Mar 29 19:35:22 2007
      @@ -30,7 +30,11 @@
         
         // Vector types are always returned in XMM0.  If the target doesn't have XMM0,
         // it won't have vector types.
      -  CCIfType<[v16i8, v8i16, v4i32, v2i64, v4f32, v2f64], CCAssignToReg<[XMM0]>>
      +  CCIfType<[v16i8, v8i16, v4i32, v2i64, v4f32, v2f64], CCAssignToReg<[XMM0]>>,
      +
      +  // MMX vector types are always returned in MM0. If the target doesn't have
      +  // MM0, it doesn't support these vector types.
      +  CCIfType<[v8i8, v4i16, v2i32, v1i64], CCAssignToReg<[MM0]>>
       ]>;
       
       // X86-32 C return-value convention.
      @@ -102,8 +106,10 @@
         CCIfType<[i32, i64, f32, f64], CCAssignToStack<8, 8>>,
         
         // Vectors get 16-byte stack slots that are 16-byte aligned.
      -  CCIfType<[v16i8, v8i16, v4i32, v2i64, v4f32, v2f64],
      -              CCAssignToStack<16, 16>>
      +  CCIfType<[v16i8, v8i16, v4i32, v2i64, v4f32, v2f64], CCAssignToStack<16, 16>>,
      +
      +  // __m64 vectors get 8-byte stack slots that are 8-byte aligned.
      +  CCIfType<[v8i8, v4i16, v2i32, v1i64], CCAssignToStack<8, 8>>
       ]>;
       
       
      @@ -127,7 +133,11 @@
                     CCAssignToReg<[XMM0, XMM1, XMM2, XMM3]>>,
       
         // Other vectors get 16-byte stack slots that are 16-byte aligned.
      -  CCIfType<[v16i8, v8i16, v4i32, v2i64, v4f32, v2f64], CCAssignToStack<16, 16>>
      +  CCIfType<[v16i8, v8i16, v4i32, v2i64, v4f32, v2f64], CCAssignToStack<16, 16>>,
      +
      +  // __m64 vectors get 8-byte stack slots that are 8-byte aligned. They are
      +  // passed in the parameter area.
      +  CCIfType<[v8i8, v4i16, v2i32, v1i64], CCAssignToStack<8, 8>>
       ]>;
       
       def CC_X86_32_C : CallingConv<[
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 19:37:48 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 19:37:48 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Benchmarks/MiBench/automotive-susan/Makefile
      	output_large.smoothing.pgm
      Message-ID: <200703300037.l2U0bmZ3021918@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/automotive-susan:
      
      Makefile updated: 1.1 -> 1.2
      output_large.smoothing.pgm (r1.1) removed
      ---
      Log message:
      
      Fix for src != dir.
      
      ---
      Diffs of the changes:  (+1 -1)
      
       Makefile |    2 +-
       1 files changed, 1 insertion(+), 1 deletion(-)
      
      
      Index: llvm-test/MultiSource/Benchmarks/MiBench/automotive-susan/Makefile
      diff -u llvm-test/MultiSource/Benchmarks/MiBench/automotive-susan/Makefile:1.1 llvm-test/MultiSource/Benchmarks/MiBench/automotive-susan/Makefile:1.2
      --- llvm-test/MultiSource/Benchmarks/MiBench/automotive-susan/Makefile:1.1	Tue Jan  9 17:44:34 2007
      +++ llvm-test/MultiSource/Benchmarks/MiBench/automotive-susan/Makefile	Thu Mar 29 19:37:31 2007
      @@ -2,5 +2,5 @@
       
       PROG     = automotive-susan
       LDFLAGS  = -lm
      -RUN_OPTIONS = input_large.pgm output_large.smoothing.pgm -s
      +RUN_OPTIONS = $(PROJ_SRC_DIR)/input_large.pgm Output/output_large.smoothing.pgm -s
       include $(LEVEL)/MultiSource/Makefile.multisrc
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 19:38:59 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 19:38:59 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Applications/minisat/Makefile
      Message-ID: <200703300038.l2U0cxb8021946@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Applications/minisat:
      
      Makefile updated: 1.10 -> 1.11
      ---
      Log message:
      
      oops.
      
      ---
      Diffs of the changes:  (+2 -2)
      
       Makefile |    4 ++--
       1 files changed, 2 insertions(+), 2 deletions(-)
      
      
      Index: llvm-test/MultiSource/Applications/minisat/Makefile
      diff -u llvm-test/MultiSource/Applications/minisat/Makefile:1.10 llvm-test/MultiSource/Applications/minisat/Makefile:1.11
      --- llvm-test/MultiSource/Applications/minisat/Makefile:1.10	Thu Mar 29 19:09:19 2007
      +++ llvm-test/MultiSource/Applications/minisat/Makefile	Thu Mar 29 19:38:42 2007
      @@ -4,10 +4,10 @@
       PROG = minisat
       CPPFLAGS = -D NDEBUG
       LDFLAGS = -lz -lm
      -RUN_OPTIONS = -verbosity=0 $PROJ_SRC_DIR)/short.cnf.gz
      +RUN_OPTIONS = -verbosity=0 $(PROJ_SRC_DIR)/short.cnf.gz
       FP_TOLERANCE = 0.1
       ifdef LARGE_PROBLEM_SIZE
      -RUN_OPTIONS = -verbosity=0 $PROJ_SRC_DIR)/long.cnf.gz
      +RUN_OPTIONS = -verbosity=0 $(PROJ_SRC_DIR)/long.cnf.gz
       endif
       
       include ../../Makefile.multisrc
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 19:57:08 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 19:57:08 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Benchmarks/MiBench/consumer-typeset/.cvsignore
      	Makefile large.lout.ld output_large.ps
      Message-ID: <200703300057.l2U0v8Y7022318@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/consumer-typeset:
      
      .cvsignore updated: 1.1 -> 1.2
      Makefile updated: 1.2 -> 1.3
      large.lout.ld (r1.1) removed
      output_large.ps (r1.1) removed
      ---
      Log message:
      
      Fix for src != obj.
      
      ---
      Diffs of the changes:  (+3 -1)
      
       .cvsignore |    2 ++
       Makefile   |    2 +-
       2 files changed, 3 insertions(+), 1 deletion(-)
      
      
      Index: llvm-test/MultiSource/Benchmarks/MiBench/consumer-typeset/.cvsignore
      diff -u llvm-test/MultiSource/Benchmarks/MiBench/consumer-typeset/.cvsignore:1.1 llvm-test/MultiSource/Benchmarks/MiBench/consumer-typeset/.cvsignore:1.2
      --- llvm-test/MultiSource/Benchmarks/MiBench/consumer-typeset/.cvsignore:1.1	Thu Jan 11 18:29:27 2007
      +++ llvm-test/MultiSource/Benchmarks/MiBench/consumer-typeset/.cvsignore	Thu Mar 29 19:56:51 2007
      @@ -1 +1,3 @@
       Output
      +large.lout.ld
      +output_large.ps
      
      
      Index: llvm-test/MultiSource/Benchmarks/MiBench/consumer-typeset/Makefile
      diff -u llvm-test/MultiSource/Benchmarks/MiBench/consumer-typeset/Makefile:1.2 llvm-test/MultiSource/Benchmarks/MiBench/consumer-typeset/Makefile:1.3
      --- llvm-test/MultiSource/Benchmarks/MiBench/consumer-typeset/Makefile:1.2	Fri Jan 12 00:12:22 2007
      +++ llvm-test/MultiSource/Benchmarks/MiBench/consumer-typeset/Makefile	Thu Mar 29 19:56:51 2007
      @@ -3,5 +3,5 @@
       PROG     = consumer-typeset
       CPPFLAGS = -DOS_UNIX=1 -DOS_DOS=0 -DOS_MAC=0 -DDB_FIX=0 -DUSE_STAT=1 -DSAFE_DFT=0 -DCOLLATE=1 -DLIB_DIR=\"lout.lib\" -DFONT_DIR=\"font\" -DMAPS_DIR=\"maps\" -DINCL_DIR=\"include\" -DDATA_DIR=\"data\" -DHYPH_DIR=\"hyph\" -DLOCALE_DIR=\"locale\" -DCHAR_IN=1 -DCHAR_OUT=0 -DLOCALE_ON=1 -DASSERT_ON=1 -DDEBUG_ON=0  -DPDF_COMPRESSION=0
       LDFLAGS  = -lm
      -RUN_OPTIONS = -I data/include -D data/data -F data/font -C data/maps -H data/hyph large.lout
      +RUN_OPTIONS = -I $(PROJ_SRC_DIR)/data/include -D $(PROJ_SRC_DIR)/data/data -F $(PROJ_SRC_DIR)/data/font -C $(PROJ_SRC_DIR)/data/maps -H $(PROJ_SRC_DIR)/data/hyph $(PROJ_SRC_DIR)/large.lout
       include $(LEVEL)/MultiSource/Makefile.multisrc
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 19:58:50 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 19:58:50 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Benchmarks/MiBench/network-dijkstra/Makefile
      Message-ID: <200703300058.l2U0wonw022357@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/network-dijkstra:
      
      Makefile updated: 1.1 -> 1.2
      ---
      Log message:
      
      Fix for src != obj.
      
      ---
      Diffs of the changes:  (+1 -1)
      
       Makefile |    2 +-
       1 files changed, 1 insertion(+), 1 deletion(-)
      
      
      Index: llvm-test/MultiSource/Benchmarks/MiBench/network-dijkstra/Makefile
      diff -u llvm-test/MultiSource/Benchmarks/MiBench/network-dijkstra/Makefile:1.1 llvm-test/MultiSource/Benchmarks/MiBench/network-dijkstra/Makefile:1.2
      --- llvm-test/MultiSource/Benchmarks/MiBench/network-dijkstra/Makefile:1.1	Tue Jan  9 17:57:18 2007
      +++ llvm-test/MultiSource/Benchmarks/MiBench/network-dijkstra/Makefile	Thu Mar 29 19:58:32 2007
      @@ -2,5 +2,5 @@
       
       PROG     = network-dijkstra
       LDFLAGS  = -lm
      -RUN_OPTIONS = input.dat
      +RUN_OPTIONS = $(PROJ_SRC_DIR)/input.dat
       include $(LEVEL)/MultiSource/Makefile.multisrc
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 19:59:16 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 19:59:16 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Benchmarks/MiBench/network-patricia/Makefile
      Message-ID: <200703300059.l2U0xG7r022378@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/network-patricia:
      
      Makefile updated: 1.1 -> 1.2
      ---
      Log message:
      
      Fix for src != obj.
      
      ---
      Diffs of the changes:  (+1 -1)
      
       Makefile |    2 +-
       1 files changed, 1 insertion(+), 1 deletion(-)
      
      
      Index: llvm-test/MultiSource/Benchmarks/MiBench/network-patricia/Makefile
      diff -u llvm-test/MultiSource/Benchmarks/MiBench/network-patricia/Makefile:1.1 llvm-test/MultiSource/Benchmarks/MiBench/network-patricia/Makefile:1.2
      --- llvm-test/MultiSource/Benchmarks/MiBench/network-patricia/Makefile:1.1	Tue Jan  9 17:57:18 2007
      +++ llvm-test/MultiSource/Benchmarks/MiBench/network-patricia/Makefile	Thu Mar 29 19:58:59 2007
      @@ -2,5 +2,5 @@
       
       PROG     = network-patricia
       LDFLAGS  = -lm
      -RUN_OPTIONS = large.udp
      +RUN_OPTIONS = $(PROJ_SRC_DIR)/large.udp
       include $(LEVEL)/MultiSource/Makefile.multisrc
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 20:09:27 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 20:09:27 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/Makefile
      Message-ID: <200703300109.l2U19RTM022541@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/office-ispell:
      
      Makefile updated: 1.2 -> 1.3
      ---
      Log message:
      
      Fix for src != obj.
      
      ---
      Diffs of the changes:  (+1 -1)
      
       Makefile |    2 +-
       1 files changed, 1 insertion(+), 1 deletion(-)
      
      
      Index: llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/Makefile
      diff -u llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/Makefile:1.2 llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/Makefile:1.3
      --- llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/Makefile:1.2	Thu Mar 29 12:00:52 2007
      +++ llvm-test/MultiSource/Benchmarks/MiBench/office-ispell/Makefile	Thu Mar 29 20:09:10 2007
      @@ -3,6 +3,6 @@
       PROG     = office-ispell
       CPPFLAGS = -Dconst=
       LDFLAGS  = -lm
      -RUN_OPTIONS = -a -d americanmed+ < $(PROJ_SRC_DIR)/large.txt
      +RUN_OPTIONS = -a -d $(PROJ_SRC_DIR)/americanmed+ < $(PROJ_SRC_DIR)/large.txt
       
       include $(LEVEL)/MultiSource/Makefile.multisrc
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 20:15:58 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 20:15:58 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Benchmarks/MiBench/security-blowfish/Makefile
      Message-ID: <200703300115.l2U1FwKv022651@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/security-blowfish:
      
      Makefile updated: 1.1 -> 1.2
      ---
      Log message:
      
      Program doesn't take files as arguments.
      
      ---
      Diffs of the changes:  (+1 -1)
      
       Makefile |    2 +-
       1 files changed, 1 insertion(+), 1 deletion(-)
      
      
      Index: llvm-test/MultiSource/Benchmarks/MiBench/security-blowfish/Makefile
      diff -u llvm-test/MultiSource/Benchmarks/MiBench/security-blowfish/Makefile:1.1 llvm-test/MultiSource/Benchmarks/MiBench/security-blowfish/Makefile:1.2
      --- llvm-test/MultiSource/Benchmarks/MiBench/security-blowfish/Makefile:1.1	Tue Jan  9 18:01:14 2007
      +++ llvm-test/MultiSource/Benchmarks/MiBench/security-blowfish/Makefile	Thu Mar 29 20:15:41 2007
      @@ -2,7 +2,7 @@
       
       PROG     = security-blowfish
       LDFLAGS  = -lm
      -RUN_OPTIONS = e input_large.asc output_large.enc 1234567890abcdeffedcba0987654321
      +RUN_OPTIONS = print_test_data
       #RUN_OPTIONS = d output_large.enc output_large.asc 1234567890abcdeffedcba0987654321
       
       include $(LEVEL)/MultiSource/Makefile.multisrc
      
      
      
      
      
      From llvm at cs.uiuc.edu  Thu Mar 29 20:17:43 2007
      From: llvm at cs.uiuc.edu (LLVM)
      Date: Thu, 29 Mar 2007 20:17:43 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Benchmarks/MiBench/security-blowfish/input_large.asc
      	input_small.asc
      Message-ID: <200703300117.l2U1Hh94022692@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/security-blowfish:
      
      input_large.asc (r1.1) removed
      input_small.asc (r1.1) removed
      ---
      Log message:
      
      Remove unused test data.
      
      ---
      Diffs of the changes:  (+0 -0)
      
       0 files changed
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 20:22:55 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 20:22:55 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Benchmarks/MiBench/security-rijndael/Makefile
      	output_large.dec
      Message-ID: <200703300122.l2U1MtNR022780@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/security-rijndael:
      
      Makefile updated: 1.1 -> 1.2
      output_large.dec (r1.1) removed
      ---
      Log message:
      
      Fix for src != obj.
      
      ---
      Diffs of the changes:  (+1 -1)
      
       Makefile |    2 +-
       1 files changed, 1 insertion(+), 1 deletion(-)
      
      
      Index: llvm-test/MultiSource/Benchmarks/MiBench/security-rijndael/Makefile
      diff -u llvm-test/MultiSource/Benchmarks/MiBench/security-rijndael/Makefile:1.1 llvm-test/MultiSource/Benchmarks/MiBench/security-rijndael/Makefile:1.2
      --- llvm-test/MultiSource/Benchmarks/MiBench/security-rijndael/Makefile:1.1	Tue Jan  9 17:57:18 2007
      +++ llvm-test/MultiSource/Benchmarks/MiBench/security-rijndael/Makefile	Thu Mar 29 20:22:38 2007
      @@ -3,6 +3,6 @@
       PROG     = security-rijndael
       LDFLAGS  = -lm
       #RUN_OPTIONS = input_large.asc output_large.enc e 1234567890abcdeffedcba09876543211234567890abcdeffedcba0987654321
      -RUN_OPTIONS = output_large.enc output_large.dec d 1234567890abcdeffedcba09876543211234567890abcdeffedcba0987654321
      +RUN_OPTIONS = $(PROJ_SRC_DIR)/output_large.enc Output/output_large.dec d 1234567890abcdeffedcba09876543211234567890abcdeffedcba0987654321
       
       include $(LEVEL)/MultiSource/Makefile.multisrc
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 20:23:47 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 20:23:47 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Benchmarks/MiBench/security-sha/Makefile
      Message-ID: <200703300123.l2U1NlNE022814@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/security-sha:
      
      Makefile updated: 1.1 -> 1.2
      ---
      Log message:
      
      Fix for src != obj.
      
      ---
      Diffs of the changes:  (+1 -1)
      
       Makefile |    2 +-
       1 files changed, 1 insertion(+), 1 deletion(-)
      
      
      Index: llvm-test/MultiSource/Benchmarks/MiBench/security-sha/Makefile
      diff -u llvm-test/MultiSource/Benchmarks/MiBench/security-sha/Makefile:1.1 llvm-test/MultiSource/Benchmarks/MiBench/security-sha/Makefile:1.2
      --- llvm-test/MultiSource/Benchmarks/MiBench/security-sha/Makefile:1.1	Tue Jan  9 17:57:18 2007
      +++ llvm-test/MultiSource/Benchmarks/MiBench/security-sha/Makefile	Thu Mar 29 20:23:30 2007
      @@ -2,6 +2,6 @@
       
       PROG     = security-sha
       LDFLAGS  = -lm
      -RUN_OPTIONS = input_large.asc 
      +RUN_OPTIONS = $(PROJ_SRC_DIR)/input_large.asc 
       
       include $(LEVEL)/MultiSource/Makefile.multisrc
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 20:29:27 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 20:29:27 -0500
      Subject: [llvm-commits] CVS:
      	llvm-test/MultiSource/Benchmarks/Prolangs-C++/employ/Makefile
      Message-ID: <200703300129.l2U1TRII022905@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C++/employ:
      
      Makefile updated: 1.2 -> 1.3
      ---
      Log message:
      
      Fix for src != obj.
      
      ---
      Diffs of the changes:  (+1 -1)
      
       Makefile |    2 +-
       1 files changed, 1 insertion(+), 1 deletion(-)
      
      
      Index: llvm-test/MultiSource/Benchmarks/Prolangs-C++/employ/Makefile
      diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C++/employ/Makefile:1.2 llvm-test/MultiSource/Benchmarks/Prolangs-C++/employ/Makefile:1.3
      --- llvm-test/MultiSource/Benchmarks/Prolangs-C++/employ/Makefile:1.2	Mon Oct  4 19:57:47 2004
      +++ llvm-test/MultiSource/Benchmarks/Prolangs-C++/employ/Makefile	Thu Mar 29 20:29:09 2007
      @@ -3,6 +3,6 @@
       PROG     = employ
       LDFLAGS  = -lstdc++
       RUN_OPTIONS = 400
      -STDIN_FILENAME = input.txt
      +STDIN_FILENAME = $(PROJ_SRC_DIR)/input.txt
       include $(LEVEL)/MultiSource/Makefile.multisrc
       
      
      
      
      
      
      From reid at x10sys.com  Thu Mar 29 20:35:49 2007
      From: reid at x10sys.com (Reid Spencer)
      Date: Thu, 29 Mar 2007 20:35:49 -0500
      Subject: [llvm-commits] CVS:
      	llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx
      Message-ID: <200703300135.l2U1ZnOV023018@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm/test/Assembler:
      
      2003-12-30-TypeMapInvalidMemory.llx updated: 1.8 -> 1.9
      ---
      Log message:
      
      For PR1289: http://llvm.org/PR1289 :
      Remove an unneeded instance of "implementation" that soon won't be supported.
      
      
      ---
      Diffs of the changes:  (+1 -3)
      
       2003-12-30-TypeMapInvalidMemory.llx |    4 +---
       1 files changed, 1 insertion(+), 3 deletions(-)
      
      
      Index: llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx
      diff -u llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx:1.8 llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx:1.9
      --- llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx:1.8	Thu Mar 29 13:56:58 2007
      +++ llvm/test/Assembler/2003-12-30-TypeMapInvalidMemory.llx	Thu Mar 29 20:35:32 2007
      @@ -1,4 +1,4 @@
      -; RUN: llvm-as  2>&1 < %s -o /dev/null -f | grep 'Reference to an undef'
      +; RUN: llvm-as  2>&1 < %s -o /dev/null -f | grep 'Undefined type remains'
       
       @d_reduction_0_dparser_gram = global { 
         i32 (i8*, i8**, i32, i32, { 
      @@ -52,5 +52,3 @@
                       %struct.ParseNode_User }*)*, %struct.d_loc_t, i32, i32, i32, 
                       i32, i32, i32, i32, i32, i32, i32, i32, i32 }*)** null 
               }
      -
      -implementation
      
      
      
      
      
      From reid at x10sys.com  Thu Mar 29 20:37:30 2007
      From: reid at x10sys.com (Reid Spencer)
      Date: Thu, 29 Mar 2007 20:37:30 -0500
      Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y
      Message-ID: <200703300137.l2U1bUdD023054@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm/lib/AsmParser:
      
      llvmAsmParser.y updated: 1.334 -> 1.335
      ---
      Log message:
      
      For PR1289: http://llvm.org/PR1289 :
      Check at the end of the parse that there are no unresolved types and no
      undefined values. Issue errors if there are. This gets rid of the need
      for implementation or checkpoint by ensuring you can't finish a parse with
      undefined things.
      
      
      ---
      Diffs of the changes:  (+32 -0)
      
       llvmAsmParser.y |   32 ++++++++++++++++++++++++++++++++
       1 files changed, 32 insertions(+)
      
      
      Index: llvm/lib/AsmParser/llvmAsmParser.y
      diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.334 llvm/lib/AsmParser/llvmAsmParser.y:1.335
      --- llvm/lib/AsmParser/llvmAsmParser.y:1.334	Thu Mar 29 13:49:28 2007
      +++ llvm/lib/AsmParser/llvmAsmParser.y	Thu Mar 29 20:37:13 2007
      @@ -2950,6 +2950,38 @@
           return 0;
         }
       
      +  // Emit an error if there are any unresolved types left.
      +  if (!CurModule.LateResolveTypes.empty()) {
      +    const ValID &DID = CurModule.LateResolveTypes.begin()->first;
      +    if (DID.Type == ValID::LocalName) {
      +      GenerateError("Undefined type remains at eof: '"+DID.getName() + "'");
      +    } else {
      +      GenerateError("Undefined type remains at eof: #" + itostr(DID.Num));
      +    }
      +    if (ParserResult)
      +      delete ParserResult;
      +    return 0;
      +  }
      +
      +  // Emit an error if there are any unresolved values left.
      +  if (!CurModule.LateResolveValues.empty()) {
      +    Value *V = CurModule.LateResolveValues.back();
      +    std::map >::iterator I =
      +      CurModule.PlaceHolderInfo.find(V);
      +
      +    if (I != CurModule.PlaceHolderInfo.end()) {
      +      ValID &DID = I->second.first;
      +      if (DID.Type == ValID::LocalName) {
      +        GenerateError("Undefined value remains at eof: "+DID.getName() + "'");
      +      } else {
      +        GenerateError("Undefined value remains at eof: #" + itostr(DID.Num));
      +      }
      +      if (ParserResult)
      +        delete ParserResult;
      +      return 0;
      +    }
      +  }
      +
         // Check to make sure that parsing produced a result
         if (!ParserResult)
           return 0;
      
      
      
      
      
      From reid at x10sys.com  Thu Mar 29 20:37:57 2007
      From: reid at x10sys.com (Reid Spencer)
      Date: Thu, 29 Mar 2007 20:37:57 -0500
      Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs
      	llvmAsmParser.y.cvs
      Message-ID: <200703300137.l2U1bvOv023074@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm/lib/AsmParser:
      
      llvmAsmParser.cpp.cvs updated: 1.79 -> 1.80
      llvmAsmParser.y.cvs updated: 1.80 -> 1.81
      ---
      Log message:
      
      For PR1289: http://llvm.org/PR1289 : Regenerate
      
      ---
      Diffs of the changes:  (+64 -0)
      
       llvmAsmParser.cpp.cvs |   32 ++++++++++++++++++++++++++++++++
       llvmAsmParser.y.cvs   |   32 ++++++++++++++++++++++++++++++++
       2 files changed, 64 insertions(+)
      
      
      Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs
      diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.79 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.80
      --- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.79	Thu Mar 29 13:50:01 2007
      +++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs	Thu Mar 29 20:37:39 2007
      @@ -5946,6 +5946,38 @@
           return 0;
         }
       
      +  // Emit an error if there are any unresolved types left.
      +  if (!CurModule.LateResolveTypes.empty()) {
      +    const ValID &DID = CurModule.LateResolveTypes.begin()->first;
      +    if (DID.Type == ValID::LocalName) {
      +      GenerateError("Undefined type remains at eof: '"+DID.getName() + "'");
      +    } else {
      +      GenerateError("Undefined type remains at eof: #" + itostr(DID.Num));
      +    }
      +    if (ParserResult)
      +      delete ParserResult;
      +    return 0;
      +  }
      +
      +  // Emit an error if there are any unresolved values left.
      +  if (!CurModule.LateResolveValues.empty()) {
      +    Value *V = CurModule.LateResolveValues.back();
      +    std::map >::iterator I =
      +      CurModule.PlaceHolderInfo.find(V);
      +
      +    if (I != CurModule.PlaceHolderInfo.end()) {
      +      ValID &DID = I->second.first;
      +      if (DID.Type == ValID::LocalName) {
      +        GenerateError("Undefined value remains at eof: "+DID.getName() + "'");
      +      } else {
      +        GenerateError("Undefined value remains at eof: #" + itostr(DID.Num));
      +      }
      +      if (ParserResult)
      +        delete ParserResult;
      +      return 0;
      +    }
      +  }
      +
         // Check to make sure that parsing produced a result
         if (!ParserResult)
           return 0;
      
      
      Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs
      diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.80 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.81
      --- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.80	Thu Mar 29 13:50:01 2007
      +++ llvm/lib/AsmParser/llvmAsmParser.y.cvs	Thu Mar 29 20:37:39 2007
      @@ -2950,6 +2950,38 @@
           return 0;
         }
       
      +  // Emit an error if there are any unresolved types left.
      +  if (!CurModule.LateResolveTypes.empty()) {
      +    const ValID &DID = CurModule.LateResolveTypes.begin()->first;
      +    if (DID.Type == ValID::LocalName) {
      +      GenerateError("Undefined type remains at eof: '"+DID.getName() + "'");
      +    } else {
      +      GenerateError("Undefined type remains at eof: #" + itostr(DID.Num));
      +    }
      +    if (ParserResult)
      +      delete ParserResult;
      +    return 0;
      +  }
      +
      +  // Emit an error if there are any unresolved values left.
      +  if (!CurModule.LateResolveValues.empty()) {
      +    Value *V = CurModule.LateResolveValues.back();
      +    std::map >::iterator I =
      +      CurModule.PlaceHolderInfo.find(V);
      +
      +    if (I != CurModule.PlaceHolderInfo.end()) {
      +      ValID &DID = I->second.first;
      +      if (DID.Type == ValID::LocalName) {
      +        GenerateError("Undefined value remains at eof: "+DID.getName() + "'");
      +      } else {
      +        GenerateError("Undefined value remains at eof: #" + itostr(DID.Num));
      +      }
      +      if (ParserResult)
      +        delete ParserResult;
      +      return 0;
      +    }
      +  }
      +
         // Check to make sure that parsing produced a result
         if (!ParserResult)
           return 0;
      
      
      
      
      
      From jeffc at jolt-lang.org  Thu Mar 29 21:01:40 2007
      From: jeffc at jolt-lang.org (Jeff Cohen)
      Date: Thu, 29 Mar 2007 19:01:40 -0700
      Subject: [llvm-commits]
      	CVS:	llvm-test/MultiSource/Benchmarks/Prolangs-C++/employ/Makefile
      In-Reply-To: <200703300129.l2U1TRII022905@zion.cs.uiuc.edu>
      References: <200703300129.l2U1TRII022905@zion.cs.uiuc.edu>
      Message-ID: <460C6F84.9040801@jolt-lang.org>
      
      And that should be the last of the src != obj fixes.
      
      Jeff Cohen wrote:
      > Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C++/employ:
      >
      > Makefile updated: 1.2 -> 1.3
      > ---
      > Log message:
      >
      > Fix for src != obj.
      >
      > ---
      > Diffs of the changes:  (+1 -1)
      >
      >  Makefile |    2 +-
      >  1 files changed, 1 insertion(+), 1 deletion(-)
      >
      >
      > Index: llvm-test/MultiSource/Benchmarks/Prolangs-C++/employ/Makefile
      > diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C++/employ/Makefile:1.2 llvm-test/MultiSource/Benchmarks/Prolangs-C++/employ/Makefile:1.3
      > --- llvm-test/MultiSource/Benchmarks/Prolangs-C++/employ/Makefile:1.2	Mon Oct  4 19:57:47 2004
      > +++ llvm-test/MultiSource/Benchmarks/Prolangs-C++/employ/Makefile	Thu Mar 29 20:29:09 2007
      > @@ -3,6 +3,6 @@
      >  PROG     = employ
      >  LDFLAGS  = -lstdc++
      >  RUN_OPTIONS = 400
      > -STDIN_FILENAME = input.txt
      > +STDIN_FILENAME = $(PROJ_SRC_DIR)/input.txt
      >  include $(LEVEL)/MultiSource/Makefile.multisrc
      >  
      >
      >
      >
      > _______________________________________________
      > llvm-commits mailing list
      > llvm-commits at cs.uiuc.edu
      > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
      >
      >
      >
      >   
      
      
      
      From zhousheng00 at gmail.com  Thu Mar 29 22:23:12 2007
      From: zhousheng00 at gmail.com (Zhou Sheng)
      Date: Thu, 29 Mar 2007 22:23:12 -0500
      Subject: [llvm-commits] CVS: llvm/include/llvm/Constants.h
      Message-ID: <200703300323.l2U3NCQK024868@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm/include/llvm:
      
      Constants.h updated: 1.140 -> 1.141
      ---
      Log message:
      
      Add two utility methods into ConstantInt.
      
      
      ---
      Diffs of the changes:  (+16 -0)
      
       Constants.h |   16 ++++++++++++++++
       1 files changed, 16 insertions(+)
      
      
      Index: llvm/include/llvm/Constants.h
      diff -u llvm/include/llvm/Constants.h:1.140 llvm/include/llvm/Constants.h:1.141
      --- llvm/include/llvm/Constants.h:1.140	Fri Mar 23 13:44:11 2007
      +++ llvm/include/llvm/Constants.h	Thu Mar 29 22:22:55 2007
      @@ -174,6 +174,22 @@
             return Val.isMinValue();
         }
       
      +  /// This function will return true iff this constant represents a value with
      +  /// active bits bigger than 64 bits or a value greater than the given uint64_t
      +  /// value.
      +  /// @returns true iff this constant is greater or equal to the given number.
      +  /// @brief Determine if the value is greater or equal to the given number.
      +  bool greaterOrEqual(uint64_t Num) {
      +    return Val.getActiveBits() > 64 || Val.getZExtValue() > Num;
      +  }
      +
      +  /// @returns the 64-bit value of this constant if its active bits number is 
      +  /// not greater than 64, otherwise, just return the given uint64_t number.
      +  /// @brief Get the constant's value if possible.
      +  uint64_t getLimitedValue(uint64_t Limit) {
      +    return (Val.getActiveBits() > 64) ? Limit : Val.getZExtValue();
      +  }
      +
         /// @returns the value for an integer constant of the given type that has all
         /// its bits set to true.
         /// @brief Get the all ones value
      
      
      
      
      
      From clattner at apple.com  Thu Mar 29 23:02:05 2007
      From: clattner at apple.com (Chris Lattner)
      Date: Thu, 29 Mar 2007 21:02:05 -0700
      Subject: [llvm-commits] CVS: llvm/include/llvm/Constants.h
      In-Reply-To: <200703300323.l2U3NCQK024868@zion.cs.uiuc.edu>
      References: <200703300323.l2U3NCQK024868@zion.cs.uiuc.edu>
      Message-ID: 
      
      > +  /// This function will return true iff this constant represents  
      > a value with
      > +  /// active bits bigger than 64 bits or a value greater than the  
      > given uint64_t
      > +  /// value.
      > +  /// @returns true iff this constant is greater or equal to the  
      > given number.
      > +  /// @brief Determine if the value is greater or equal to the  
      > given number.
      > +  bool greaterOrEqual(uint64_t Num) {
      > +    return Val.getActiveBits() > 64 || Val.getZExtValue() > Num;
      
      Shouldn't the second one be >= ?
      
      Can you please rename this greaterOrEqualUnsigned  or even compare_gtu 
      (N)?
      
      
      
      
      From rspencer at reidspencer.com  Thu Mar 29 23:25:07 2007
      From: rspencer at reidspencer.com (Reid Spencer)
      Date: Thu, 29 Mar 2007 21:25:07 -0700
      Subject: [llvm-commits] CVS: llvm/include/llvm/Constants.h
      In-Reply-To: 
      References: <200703300323.l2U3NCQK024868@zion.cs.uiuc.edu>
      	
      Message-ID: <1175228707.3058.39.camel@bashful.x10sys.com>
      
      On Thu, 2007-03-29 at 21:02 -0700, Chris Lattner wrote:
      > > +  /// This function will return true iff this constant represents  
      > > a value with
      > > +  /// active bits bigger than 64 bits or a value greater than the  
      > > given uint64_t
      > > +  /// value.
      > > +  /// @returns true iff this constant is greater or equal to the  
      > > given number.
      > > +  /// @brief Determine if the value is greater or equal to the  
      > > given number.
      > > +  bool greaterOrEqual(uint64_t Num) {
      > > +    return Val.getActiveBits() > 64 || Val.getZExtValue() > Num;
      > 
      > Shouldn't the second one be >= ?
      > 
      > Can you please rename this greaterOrEqualUnsigned  or even compare_gtu 
      > (N)?
      
      As this will get used in several places in InstCombine, how about just
      uge ?
      
      like the icmp predicate?
      
      Reid.
      > 
      > 
      > _______________________________________________
      > llvm-commits mailing list
      > llvm-commits at cs.uiuc.edu
      > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
      
      
      
      From zhousheng00 at gmail.com  Thu Mar 29 23:31:18 2007
      From: zhousheng00 at gmail.com (Zhou Sheng)
      Date: Fri, 30 Mar 2007 12:31:18 +0800
      Subject: [llvm-commits] CVS: llvm/include/llvm/Constants.h
      In-Reply-To: 
      References: <200703300323.l2U3NCQK024868@zion.cs.uiuc.edu>
      	
      Message-ID: <1175229078.2604.7.camel@panda.autoesl-bj.intranet>
      
      ? 2007-03-29?? 21:02 -0700?Chris Lattner???
      > > +  /// This function will return true iff this constant represents  
      > > a value with
      > > +  /// active bits bigger than 64 bits or a value greater than the  
      > > given uint64_t
      > > +  /// value.
      > > +  /// @returns true iff this constant is greater or equal to the  
      > > given number.
      > > +  /// @brief Determine if the value is greater or equal to the  
      > > given number.
      > > +  bool greaterOrEqual(uint64_t Num) {
      > > +    return Val.getActiveBits() > 64 || Val.getZExtValue() > Num;
      > 
      > Shouldn't the second one be >= ?
      Yes, i'll correct that.
      
      
      > 
      > Can you please rename this greaterOrEqualUnsigned  or even compare_gtu 
      > (N)?
      How about "bool compare_uge(uint64_t Num)" ?
      
      
      > 
      > 
      
      
      
      From clattner at apple.com  Thu Mar 29 23:45:30 2007
      From: clattner at apple.com (Chris Lattner)
      Date: Thu, 29 Mar 2007 21:45:30 -0700
      Subject: [llvm-commits] CVS: llvm/include/llvm/Constants.h
      In-Reply-To: <1175229078.2604.7.camel@panda.autoesl-bj.intranet>
      References: <200703300323.l2U3NCQK024868@zion.cs.uiuc.edu>
      	
      	<1175229078.2604.7.camel@panda.autoesl-bj.intranet>
      Message-ID: <300A245D-09EC-4ED9-8709-E2F8116FA52D@apple.com>
      
      
      On Mar 29, 2007, at 9:31 PM, Zhou Sheng wrote:
      
      > ? 2007-03-29?? 21:02 -0700?Chris Lattner???
      >>> +  /// This function will return true iff this constant represents
      >>> a value with
      >>> +  /// active bits bigger than 64 bits or a value greater than the
      >>> given uint64_t
      >>> +  /// value.
      >>> +  /// @returns true iff this constant is greater or equal to the
      >>> given number.
      >>> +  /// @brief Determine if the value is greater or equal to the
      >>> given number.
      >>> +  bool greaterOrEqual(uint64_t Num) {
      >>> +    return Val.getActiveBits() > 64 || Val.getZExtValue() > Num;
      >>
      >> Shouldn't the second one be >= ?
      > Yes, i'll correct that.
      >
      >
      >>
      >> Can you please rename this greaterOrEqualUnsigned  or even  
      >> compare_gtu
      >> (N)?
      > How about "bool compare_uge(uint64_t Num)" ?
      
      Sounds great.  I prefer that to just uge since ConstantInt has a lot  
      of other methods,
      
      Thanks!
      
      -Chris
      
      
      From zhousheng00 at gmail.com  Fri Mar 30 00:11:16 2007
      From: zhousheng00 at gmail.com (Zhou Sheng)
      Date: Fri, 30 Mar 2007 00:11:16 -0500
      Subject: [llvm-commits] CVS: llvm/include/llvm/Constants.h
      Message-ID: <200703300511.l2U5BGaq026913@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm/include/llvm:
      
      Constants.h updated: 1.141 -> 1.142
      ---
      Log message:
      
      Rename and correct the method "greaterOrEqual".
      
      
      ---
      Diffs of the changes:  (+2 -2)
      
       Constants.h |    4 ++--
       1 files changed, 2 insertions(+), 2 deletions(-)
      
      
      Index: llvm/include/llvm/Constants.h
      diff -u llvm/include/llvm/Constants.h:1.141 llvm/include/llvm/Constants.h:1.142
      --- llvm/include/llvm/Constants.h:1.141	Thu Mar 29 22:22:55 2007
      +++ llvm/include/llvm/Constants.h	Fri Mar 30 00:10:59 2007
      @@ -179,8 +179,8 @@
         /// value.
         /// @returns true iff this constant is greater or equal to the given number.
         /// @brief Determine if the value is greater or equal to the given number.
      -  bool greaterOrEqual(uint64_t Num) {
      -    return Val.getActiveBits() > 64 || Val.getZExtValue() > Num;
      +  bool uge(uint64_t Num) {
      +    return Val.getActiveBits() > 64 || Val.getZExtValue() >= Num;
         }
       
         /// @returns the 64-bit value of this constant if its active bits number is 
      
      
      
      
      
      From zhousheng00 at gmail.com  Fri Mar 30 00:45:46 2007
      From: zhousheng00 at gmail.com (Zhou Sheng)
      Date: Fri, 30 Mar 2007 00:45:46 -0500
      Subject: [llvm-commits] CVS:
      	llvm/lib/Transforms/Scalar/InstructionCombining.cpp
      Message-ID: <200703300545.l2U5jkof027495@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm/lib/Transforms/Scalar:
      
      InstructionCombining.cpp updated: 1.709 -> 1.710
      ---
      Log message:
      
      Use APInt operation instead of ConstantExpr::getXX.
      
      
      ---
      Diffs of the changes:  (+6 -6)
      
       InstructionCombining.cpp |   12 ++++++------
       1 files changed, 6 insertions(+), 6 deletions(-)
      
      
      Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
      diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.709 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.710
      --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.709	Thu Mar 29 03:15:12 2007
      +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Fri Mar 30 00:45:18 2007
      @@ -5658,9 +5658,9 @@
                     BinaryOperator::create(Op0BO->getOpcode(), YS, V1,
                                            Op0BO->getOperand(1)->getName());
                   InsertNewInstBefore(X, I);  // (X + (Y << C))
      -            Constant *C2 = ConstantInt::getAllOnesValue(X->getType());
      -            C2 = ConstantExpr::getShl(C2, Op1);
      -            return BinaryOperator::createAnd(X, C2);
      +            uint32_t Op1Val = Op1->getZExtValue();
      +            return BinaryOperator::createAnd(X, ConstantInt::get(
      +                       APInt::getHighBitsSet(TypeBits, TypeBits-Op1Val)));
                 }
                 
                 // Turn (Y + ((X >> C) & CC)) << C  ->  ((X & (CC << C)) + (Y << C))
      @@ -5697,9 +5697,9 @@
                     BinaryOperator::create(Op0BO->getOpcode(), V1, YS,
                                            Op0BO->getOperand(0)->getName());
                   InsertNewInstBefore(X, I);  // (X + (Y << C))
      -            Constant *C2 = ConstantInt::getAllOnesValue(X->getType());
      -            C2 = ConstantExpr::getShl(C2, Op1);
      -            return BinaryOperator::createAnd(X, C2);
      +            uint32_t Op1Val = Op1->getZExtValue();
      +            return BinaryOperator::createAnd(X, ConstantInt::get(
      +                       APInt::getHighBitsSet(TypeBits, TypeBits-Op1Val)));
                 }
                 
                 // Turn (((X >> C)&CC) + Y) << C  ->  (X + (Y << C)) & (CC << C)
      
      
      
      
      
      From clattner at apple.com  Fri Mar 30 00:51:06 2007
      From: clattner at apple.com (Chris Lattner)
      Date: Thu, 29 Mar 2007 22:51:06 -0700
      Subject: [llvm-commits] CVS: llvm/Makefile.config.in Makefile.rules
      In-Reply-To: <200703291906.l2TJ6X34015811@zion.cs.uiuc.edu>
      References: <200703291906.l2TJ6X34015811@zion.cs.uiuc.edu>
      Message-ID: <777FC549-D63B-45CD-843F-A83C3EFCC0C4@apple.com>
      
      
      On Mar 29, 2007, at 12:06 PM, Reid Spencer wrote:
      
      >
      > +LLVMMAKE := $(LLVM_SRC_ROOT)/make
      
      Was this intentional?
      
      -Chris
      
      >  PROJ_bindir     := $(DESTDIR)$(PROJ_prefix)/bin
      >  PROJ_libdir     := $(DESTDIR)$(PROJ_prefix)/lib
      >  PROJ_datadir    := $(DESTDIR)$(PROJ_prefix)/share
      >
      >
      > Index: llvm/Makefile.rules
      > diff -u llvm/Makefile.rules:1.428 llvm/Makefile.rules:1.429
      > --- llvm/Makefile.rules:1.428	Tue Feb 27 23:10:40 2007
      > +++ llvm/Makefile.rules	Thu Mar 29 14:05:44 2007
      > @@ -1760,3 +1760,5 @@
      >  	$(Echo) "Module       : " '$(Module)'
      >  	$(Echo) "FilesToConfig: " '$(FilesToConfigPATH)'
      >  	$(Echo) "SubDirs      : " '$(SubDirs)'
      > +	$(Echo) "ProjLibsPaths: " '$(ProjLibsPaths)'
      > +	$(Echo) "ProjLibsOptions: " '$(ProjLibsOptions)'
      >
      >
      >
      > _______________________________________________
      > llvm-commits mailing list
      > llvm-commits at cs.uiuc.edu
      > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
      
      
      
      From clattner at apple.com  Fri Mar 30 00:59:48 2007
      From: clattner at apple.com (Chris Lattner)
      Date: Thu, 29 Mar 2007 22:59:48 -0700
      Subject: [llvm-commits] CVS: llvm/include/llvm/System/Path.h
      In-Reply-To: <200703291643.l2TGhgsJ012431@zion.cs.uiuc.edu>
      References: <200703291643.l2TGhgsJ012431@zion.cs.uiuc.edu>
      Message-ID: <5FB21B22-AFC2-4754-BCC7-3AFE533C1CC3@apple.com>
      
      >
      > For PR789: http://llvm.org/PR789 :
      > * Add a method: bool isAbsolute() const, which determines if the  
      > path name
      >   is absolute or not.
      > * Implement caching of file status information in the Path object.  
      > Allow it
      >   to be updated forcefully or lazily re-fetched from the cached value.
      
      Nice.  Instead of new'ing the status object separately from the Path  
      object, why not embed it by-value?
      
      -Chris
      
      
      
      
      
      From clattner at apple.com  Fri Mar 30 01:02:51 2007
      From: clattner at apple.com (Chris Lattner)
      Date: Thu, 29 Mar 2007 23:02:51 -0700
      Subject: [llvm-commits] CVS: llvm/lib/System/Unix/MappedFile.inc
      In-Reply-To: <200703291911.l2TJBd4H015939@zion.cs.uiuc.edu>
      References: <200703291911.l2TJBd4H015939@zion.cs.uiuc.edu>
      Message-ID: <32F42092-09E3-49C7-81EB-EDEFE1197217@apple.com>
      
      > Use the stat information in the Path object, if it is already  
      > obtained. This
      > avoids a call to ::fstat by MappedFile when the file size  
      > information was
      > already obtained by the Path object.
      
      Interesting approach.  The problem is that fstat is significantly  
      faster than stat.  How about a new Path::getFileStatusFromFD()  
      method, which takes an open file descriptor.  If the System supports  
      it, it can get status information faster by using it, otherwise it  
      falls back to getFileStatus (e.g. if win32 doesn't have fstat)?
      
      -Chris
      
      >
      > ---
      > Diffs of the changes:  (+3 -4)
      >
      >  MappedFile.inc |    7 +++----
      >  1 files changed, 3 insertions(+), 4 deletions(-)
      >
      >
      > Index: llvm/lib/System/Unix/MappedFile.inc
      > diff -u llvm/lib/System/Unix/MappedFile.inc:1.18 llvm/lib/System/ 
      > Unix/MappedFile.inc:1.19
      > --- llvm/lib/System/Unix/MappedFile.inc:1.18	Fri Aug 25 16:37:17 2006
      > +++ llvm/lib/System/Unix/MappedFile.inc	Thu Mar 29 14:11:22 2007
      > @@ -54,15 +54,14 @@
      >      MakeErrMsg(ErrMsg, "can't open file '" + path_.toString() + "'");
      >      return true;
      >    }
      > -  struct stat sbuf;
      > -  if(::fstat(FD, &sbuf) < 0) {
      > -    MakeErrMsg(ErrMsg, "can't stat file '"+ path_.toString() + "'");
      > +  const FileStatus *Status = path_.getFileStatus(false, ErrMsg);
      > +  if (!Status) {
      >      ::close(FD);
      >      return true;
      >    }
      >    info_ = new MappedFileInfo;
      >    info_->FD = FD;
      > -  info_->Size = sbuf.st_size;
      > +  info_->Size = Status->getSize();
      >    return false;
      >  }
      >
      >
      >
      >
      > _______________________________________________
      > llvm-commits mailing list
      > llvm-commits at cs.uiuc.edu
      > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
      
      
      
      From clattner at apple.com  Fri Mar 30 01:08:22 2007
      From: clattner at apple.com (Chris Lattner)
      Date: Thu, 29 Mar 2007 23:08:22 -0700
      Subject: [llvm-commits]
      	CVS:	llvm/lib/Transforms/Scalar/InstructionCombining.cpp
      In-Reply-To: <200703290157.l2T1vdHL018933@zion.cs.uiuc.edu>
      References: <200703290157.l2T1vdHL018933@zion.cs.uiuc.edu>
      Message-ID: 
      
      
      On Mar 28, 2007, at 6:57 PM, Zhou Sheng wrote:
      
      > @@ -540,8 +540,10 @@
      >        if (I->getOpcode() == Instruction::Shl)
      >          if ((CST = dyn_cast(I->getOperand(1)))) {
      >            // The multiplier is really 1 << CST.
      > -          Constant *One = ConstantInt::get(V->getType(), 1);
      > -          CST = cast(ConstantExpr::getShl(One, CST));
      > +          uint32_t BitWidth = cast(V->getType())- 
      > >getBitWidth();
      > +          uint32_t CSTVal = CST->getValue().getActiveBits() > 64 ?
      > +                              BitWidth : CST->getZExtValue();
      > +          CST = ConstantInt::get(APInt(BitWidth, 1).shl(CSTVal));
      >            return I->getOperand(0);
      >          }
      >      }
      
      I don't understand the logic here for the >64 active bits case.  Is  
      the idea that the operation is undefined anyway?
      
      -Chris
      
      
      From clattner at apple.com  Fri Mar 30 01:08:46 2007
      From: clattner at apple.com (clattner at apple.com)
      Date: Thu, 29 Mar 2007 23:08:46 -0700 (PDT)
      Subject: [llvm-commits] [125531] Apply Anton's patch to work-around PR879 on
      	linux.
      Message-ID: <20070330060846.1BFEFC1E522D@src>
      
      Revision: 125531
      Author:   clattner
      Date:     2007-03-29 23:08:44 -0700 (Thu, 29 Mar 2007)
      
      Log Message:
      -----------
      Apply Anton's patch to work-around PR879 on linux.
      
      Modified Paths:
      --------------
          apple-local/branches/llvm/gcc/config/i386/i386.h
      
      Modified: apple-local/branches/llvm/gcc/config/i386/i386.h
      ===================================================================
      --- apple-local/branches/llvm/gcc/config/i386/i386.h	2007-03-30 03:34:45 UTC (rev 125530)
      +++ apple-local/branches/llvm/gcc/config/i386/i386.h	2007-03-30 06:08:44 UTC (rev 125531)
      @@ -746,9 +746,12 @@
       	{							\
       	  builtin_define ("__nocona");				\
       	  builtin_define ("__nocona__");			\
      -	}							\
      -    }								\
      -  while (0)
      +	}                                                       \
      +      /* APPLE LOCAL begin LLVM PR879 workaround */             \
      +      builtin_define("__NO_MATH_INLINES");                      \
      +      /* APPLE LOCAL end LLVM PR879 workaround */               \
      +    }                                                           \
      +while (0)
       
       #define TARGET_CPU_DEFAULT_i386 0
       #define TARGET_CPU_DEFAULT_i486 1
      
      
      
      
      From rspencer at reidspencer.com  Fri Mar 30 01:14:26 2007
      From: rspencer at reidspencer.com (Reid Spencer)
      Date: Thu, 29 Mar 2007 23:14:26 -0700
      Subject: [llvm-commits] CVS: llvm/Makefile.config.in Makefile.rules
      In-Reply-To: <777FC549-D63B-45CD-843F-A83C3EFCC0C4@apple.com>
      References: <200703291906.l2TJ6X34015811@zion.cs.uiuc.edu>
      	<777FC549-D63B-45CD-843F-A83C3EFCC0C4@apple.com>
      Message-ID: <1175235266.3058.72.camel@bashful.x10sys.com>
      
      On Thu, 2007-03-29 at 22:51 -0700, Chris Lattner wrote:
      > On Mar 29, 2007, at 12:06 PM, Reid Spencer wrote:
      > 
      > >
      > > +LLVMMAKE := $(LLVM_SRC_ROOT)/make
      > 
      > Was this intentional?
      
      Erm, probably not :)
      
      Its part of the planned makefile changes, which I'm not sure I'm going
      to do now since we're going to give scons a try.
      
      > 
      > -Chris
      > 
      > >  PROJ_bindir     := $(DESTDIR)$(PROJ_prefix)/bin
      > >  PROJ_libdir     := $(DESTDIR)$(PROJ_prefix)/lib
      > >  PROJ_datadir    := $(DESTDIR)$(PROJ_prefix)/share
      > >
      > >
      > > Index: llvm/Makefile.rules
      > > diff -u llvm/Makefile.rules:1.428 llvm/Makefile.rules:1.429
      > > --- llvm/Makefile.rules:1.428	Tue Feb 27 23:10:40 2007
      > > +++ llvm/Makefile.rules	Thu Mar 29 14:05:44 2007
      > > @@ -1760,3 +1760,5 @@
      > >  	$(Echo) "Module       : " '$(Module)'
      > >  	$(Echo) "FilesToConfig: " '$(FilesToConfigPATH)'
      > >  	$(Echo) "SubDirs      : " '$(SubDirs)'
      > > +	$(Echo) "ProjLibsPaths: " '$(ProjLibsPaths)'
      > > +	$(Echo) "ProjLibsOptions: " '$(ProjLibsOptions)'
      > >
      > >
      > >
      > > _______________________________________________
      > > llvm-commits mailing list
      > > llvm-commits at cs.uiuc.edu
      > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
      > 
      
      
      
      From rspencer at reidspencer.com  Fri Mar 30 01:17:02 2007
      From: rspencer at reidspencer.com (Reid Spencer)
      Date: Thu, 29 Mar 2007 23:17:02 -0700
      Subject: [llvm-commits] CVS: llvm/include/llvm/System/Path.h
      In-Reply-To: <5FB21B22-AFC2-4754-BCC7-3AFE533C1CC3@apple.com>
      References: <200703291643.l2TGhgsJ012431@zion.cs.uiuc.edu>
      	<5FB21B22-AFC2-4754-BCC7-3AFE533C1CC3@apple.com>
      Message-ID: <1175235422.3058.76.camel@bashful.x10sys.com>
      
      On Thu, 2007-03-29 at 22:59 -0700, Chris Lattner wrote:
      > >
      > > For PR789: http://llvm.org/PR789 :
      > > * Add a method: bool isAbsolute() const, which determines if the  
      > > path name
      > >   is absolute or not.
      > > * Implement caching of file status information in the Path object.  
      > > Allow it
      > >   to be updated forcefully or lazily re-fetched from the cached value.
      > 
      > Nice.  Instead of new'ing the status object separately from the Path  
      > object, why not embed it by-value?
      
      Because, by far, the common case for Path objects is to copy them around
      and not use the FileStatus stuff.  I even hesitated about putting a
      pointer into the Path object. :)
      
      For example, this would bloat libLLVMArchive's memory usage
      significantly. Other things are impacted to like llvmc, Linker, etc.
      
      Reid.
      
      > 
      > -Chris
      > 
      > 
      > 
      > _______________________________________________
      > llvm-commits mailing list
      > llvm-commits at cs.uiuc.edu
      > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
      
      
      
      From rspencer at reidspencer.com  Fri Mar 30 01:20:29 2007
      From: rspencer at reidspencer.com (Reid Spencer)
      Date: Thu, 29 Mar 2007 23:20:29 -0700
      Subject: [llvm-commits]
      	CVS:	llvm/lib/Transforms/Scalar/InstructionCombining.cpp
      In-Reply-To: 
      References: <200703290157.l2T1vdHL018933@zion.cs.uiuc.edu>
      	
      Message-ID: <1175235629.3058.80.camel@bashful.x10sys.com>
      
      On Thu, 2007-03-29 at 23:08 -0700, Chris Lattner wrote:
      > On Mar 28, 2007, at 6:57 PM, Zhou Sheng wrote:
      > 
      > > @@ -540,8 +540,10 @@
      > >        if (I->getOpcode() == Instruction::Shl)
      > >          if ((CST = dyn_cast(I->getOperand(1)))) {
      > >            // The multiplier is really 1 << CST.
      > > -          Constant *One = ConstantInt::get(V->getType(), 1);
      > > -          CST = cast(ConstantExpr::getShl(One, CST));
      > > +          uint32_t BitWidth = cast(V->getType())- 
      > > >getBitWidth();
      > > +          uint32_t CSTVal = CST->getValue().getActiveBits() > 64 ?
      > > +                              BitWidth : CST->getZExtValue();
      > > +          CST = ConstantInt::get(APInt(BitWidth, 1).shl(CSTVal));
      > >            return I->getOperand(0);
      > >          }
      > >      }
      > 
      > I don't understand the logic here for the >64 active bits case.  Is  
      > the idea that the operation is undefined anyway?
      
      Yes. The CST constant is the operand 1 of a shift, the shift amount. As
      you noted in previous commits, we have to guard against using
      getZExtValue even on shift amounts because they could be huge (> 64
      bits). In such situations, we just set the shift amount to the bit width
      (also undefined) and avoid the getZExtValue (and avoid the assert).
      
      There will be several more of these. Actually I asked Sheng to change
      these to use a new method on ConstantInt since the idiom appears to be
      cropping up all over the place (every shift examination).
      
      Reid.
      
      > 
      > -Chris
      > _______________________________________________
      > llvm-commits mailing list
      > llvm-commits at cs.uiuc.edu
      > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
      
      
      
      From clattner at apple.com  Fri Mar 30 01:25:31 2007
      From: clattner at apple.com (Chris Lattner)
      Date: Thu, 29 Mar 2007 23:25:31 -0700
      Subject: [llvm-commits]
      	CVS:	llvm/lib/Transforms/Scalar/InstructionCombining.cpp
      In-Reply-To: <200703290226.l2T2QlRm019396@zion.cs.uiuc.edu>
      References: <200703290226.l2T2QlRm019396@zion.cs.uiuc.edu>
      Message-ID: <655E14BA-BFD6-4848-B4DD-2EE2056F1514@apple.com>
      
      
      On Mar 28, 2007, at 7:26 PM, Zhou Sheng wrote:
      
      > InstructionCombining.cpp updated: 1.706 -> 1.707
      > ---
      > Log message:
      >
      > Clean up codes in InstCombiner::SimplifyDemandedBits():
      > 1. Line out nested call of APInt::zext/trunc.
      > 2. Make more use of APInt::getHighBitsSet/getLowBitsSet.
      > 3. Use APInt[] operator instead of expression like "APIntVal &  
      > SignBit".
      
      Very nice, thanks for these cleanups!
      
      -Chris
      
      
      From clattner at apple.com  Fri Mar 30 01:28:18 2007
      From: clattner at apple.com (Chris Lattner)
      Date: Thu, 29 Mar 2007 23:28:18 -0700
      Subject: [llvm-commits] CVS: llvm/include/llvm/System/Path.h
      In-Reply-To: <1175235422.3058.76.camel@bashful.x10sys.com>
      References: <200703291643.l2TGhgsJ012431@zion.cs.uiuc.edu>
      	<5FB21B22-AFC2-4754-BCC7-3AFE533C1CC3@apple.com>
      	<1175235422.3058.76.camel@bashful.x10sys.com>
      Message-ID: <8FC2D896-5072-4FCB-89DB-0E271538802A@apple.com>
      
      
      On Mar 29, 2007, at 11:17 PM, Reid Spencer wrote:
      
      > On Thu, 2007-03-29 at 22:59 -0700, Chris Lattner wrote:
      >>>
      >>> For PR789: http://llvm.org/PR789 :
      >>> * Add a method: bool isAbsolute() const, which determines if the
      >>> path name
      >>>   is absolute or not.
      >>> * Implement caching of file status information in the Path object.
      >>> Allow it
      >>>   to be updated forcefully or lazily re-fetched from the cached  
      >>> value.
      >>
      >> Nice.  Instead of new'ing the status object separately from the Path
      >> object, why not embed it by-value?
      >
      > Because, by far, the common case for Path objects is to copy them  
      > around
      > and not use the FileStatus stuff.  I even hesitated about putting a
      > pointer into the Path object. :)
      
      Okay, how about an alternate approach, which fixes both problems :),  
      how about something like this:
      
      class PathWithStatus : public Path {
         Status S;
         bool IsStatusValid;
      }
      
      If you sink the 'status gathering' methods out of Path into  
      PathWithStatus, then you let the client decide whether they want to  
      store a status or not.
      
      reasonable?
      
      -Chris
      
      
      From rspencer at reidspencer.com  Fri Mar 30 01:36:28 2007
      From: rspencer at reidspencer.com (Reid Spencer)
      Date: Thu, 29 Mar 2007 23:36:28 -0700
      Subject: [llvm-commits] CVS: llvm/include/llvm/System/Path.h
      In-Reply-To: <8FC2D896-5072-4FCB-89DB-0E271538802A@apple.com>
      References: <200703291643.l2TGhgsJ012431@zion.cs.uiuc.edu>
      	<5FB21B22-AFC2-4754-BCC7-3AFE533C1CC3@apple.com>
      	<1175235422.3058.76.camel@bashful.x10sys.com>
      	<8FC2D896-5072-4FCB-89DB-0E271538802A@apple.com>
      Message-ID: <1175236588.3058.92.camel@bashful.x10sys.com>
      
      On Thu, 2007-03-29 at 23:28 -0700, Chris Lattner wrote:
      > On Mar 29, 2007, at 11:17 PM, Reid Spencer wrote:
      > 
      > > On Thu, 2007-03-29 at 22:59 -0700, Chris Lattner wrote:
      > >>>
      > >>> For PR789: http://llvm.org/PR789 :
      > >>> * Add a method: bool isAbsolute() const, which determines if the
      > >>> path name
      > >>>   is absolute or not.
      > >>> * Implement caching of file status information in the Path object.
      > >>> Allow it
      > >>>   to be updated forcefully or lazily re-fetched from the cached  
      > >>> value.
      > >>
      > >> Nice.  Instead of new'ing the status object separately from the Path
      > >> object, why not embed it by-value?
      > >
      > > Because, by far, the common case for Path objects is to copy them  
      > > around
      > > and not use the FileStatus stuff.  I even hesitated about putting a
      > > pointer into the Path object. :)
      > 
      > Okay, how about an alternate approach, which fixes both problems :),  
      > how about something like this:
      > 
      > class PathWithStatus : public Path {
      >    Status S;
      >    bool IsStatusValid;
      > }
      > 
      > If you sink the 'status gathering' methods out of Path into  
      > PathWithStatus, then you let the client decide whether they want to  
      > store a status or not.
      > 
      > reasonable?
      
      Yes, that's quite reasonable. Could you file an enhancement PR with
      this? I won't have time to get to such a large change for a while, and
      don't want to forget.
      
      Thanks,
      
      Reid.
      
      > 
      > -Chris
      
      
      
      From baldrick at free.fr  Fri Mar 30 01:39:59 2007
      From: baldrick at free.fr (Duncan Sands)
      Date: Fri, 30 Mar 2007 01:39:59 -0500
      Subject: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h
      Message-ID: <200703300639.l2U6dxKr028448@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm/include/llvm/ADT:
      
      APInt.h updated: 1.58 -> 1.59
      ---
      Log message:
      
      Correct typo.
      
      
      ---
      Diffs of the changes:  (+1 -1)
      
       APInt.h |    2 +-
       1 files changed, 1 insertion(+), 1 deletion(-)
      
      
      Index: llvm/include/llvm/ADT/APInt.h
      diff -u llvm/include/llvm/ADT/APInt.h:1.58 llvm/include/llvm/ADT/APInt.h:1.59
      --- llvm/include/llvm/ADT/APInt.h:1.58	Sun Mar 25 16:58:42 2007
      +++ llvm/include/llvm/ADT/APInt.h	Fri Mar 30 01:39:42 2007
      @@ -272,7 +272,7 @@
         /// @returns true if the argument APInt value is a power of two > 0.
         bool isPowerOf2() const; 
       
      -  /// This converts the APInt to a boolean valy as a test against zero.
      +  /// This converts the APInt to a boolean value as a test against zero.
         /// @brief Boolean conversion function. 
         inline bool getBoolValue() const {
           return countLeadingZeros() != BitWidth;
      
      
      
      
      
      From zhousheng00 at gmail.com  Fri Mar 30 01:45:49 2007
      From: zhousheng00 at gmail.com (Zhou Sheng)
      Date: Fri, 30 Mar 2007 14:45:49 +0800
      Subject: [llvm-commits]
      	CVS:	llvm/lib/Transforms/Scalar/InstructionCombining.cpp
      In-Reply-To: <1175235629.3058.80.camel@bashful.x10sys.com>
      References: <200703290157.l2T1vdHL018933@zion.cs.uiuc.edu>
      	
      	<1175235629.3058.80.camel@bashful.x10sys.com>
      Message-ID: <1175237149.2604.19.camel@panda.autoesl-bj.intranet>
      
      ? 2007-03-29?? 23:20 -0700?Reid Spencer???
      > On Thu, 2007-03-29 at 23:08 -0700, Chris Lattner wrote:
      > > On Mar 28, 2007, at 6:57 PM, Zhou Sheng wrote:
      > > 
      > > > @@ -540,8 +540,10 @@
      > > >        if (I->getOpcode() == Instruction::Shl)
      > > >          if ((CST = dyn_cast(I->getOperand(1)))) {
      > > >            // The multiplier is really 1 << CST.
      > > > -          Constant *One = ConstantInt::get(V->getType(), 1);
      > > > -          CST = cast(ConstantExpr::getShl(One, CST));
      > > > +          uint32_t BitWidth = cast(V->getType())- 
      > > > >getBitWidth();
      > > > +          uint32_t CSTVal = CST->getValue().getActiveBits() > 64 ?
      > > > +                              BitWidth : CST->getZExtValue();
      > > > +          CST = ConstantInt::get(APInt(BitWidth, 1).shl(CSTVal));
      > > >            return I->getOperand(0);
      > > >          }
      > > >      }
      > > 
      > > I don't understand the logic here for the >64 active bits case.  Is  
      > > the idea that the operation is undefined anyway?
      > 
      > Yes. The CST constant is the operand 1 of a shift, the shift amount. As
      > you noted in previous commits, we have to guard against using
      > getZExtValue even on shift amounts because they could be huge (> 64
      > bits). In such situations, we just set the shift amount to the bit width
      > (also undefined) and avoid the getZExtValue (and avoid the assert).
      > 
      > There will be several more of these. Actually I asked Sheng to change
      > these to use a new method on ConstantInt since the idiom appears to be
      > cropping up all over the place (every shift examination).
      This patch was committed two days ago. I'll update it to use the new
      ConstantInt method.
      
      
      Sheng.
      
      
      > 
      > Reid.
      > 
      > > 
      > > -Chris
      > > _______________________________________________
      > > llvm-commits mailing list
      > > llvm-commits at cs.uiuc.edu
      > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
      > 
      
      
      
      From zhousheng00 at gmail.com  Fri Mar 30 04:30:05 2007
      From: zhousheng00 at gmail.com (Zhou Sheng)
      Date: Fri, 30 Mar 2007 04:30:05 -0500
      Subject: [llvm-commits] CVS:
      	llvm/lib/Transforms/Scalar/InstructionCombining.cpp
      Message-ID: <200703300930.l2U9U5nF008740@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm/lib/Transforms/Scalar:
      
      InstructionCombining.cpp updated: 1.710 -> 1.711
      ---
      Log message:
      
      1. Make sure the use of ConstantInt::getZExtValue() for getting shift
         amount is safe.
      2. Use new method on ConstantInt instead of (? :) operator.
      3. Use new method uge() on ConstantInt to simplify codes.
      
      
      ---
      Diffs of the changes:  (+25 -27)
      
       InstructionCombining.cpp |   52 ++++++++++++++++++++++-------------------------
       1 files changed, 25 insertions(+), 27 deletions(-)
      
      
      Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
      diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.710 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.711
      --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.710	Fri Mar 30 00:45:18 2007
      +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Fri Mar 30 04:29:48 2007
      @@ -541,8 +541,7 @@
               if ((CST = dyn_cast(I->getOperand(1)))) {
                 // The multiplier is really 1 << CST.
                 uint32_t BitWidth = cast(V->getType())->getBitWidth();
      -          uint32_t CSTVal = CST->getValue().getActiveBits() > 64 ?
      -                              BitWidth : CST->getZExtValue();
      +          uint32_t CSTVal = CST->getLimitedValue(BitWidth);
                 CST = ConstantInt::get(APInt(BitWidth, 1).shl(CSTVal));
                 return I->getOperand(0);
               }
      @@ -745,7 +744,7 @@
         case Instruction::Shl:
           // (shl X, C1) & C2 == 0   iff   (X & C2 >>u C1) == 0
           if (ConstantInt *SA = dyn_cast(I->getOperand(1))) {
      -      uint64_t ShiftAmt = SA->getZExtValue();
      +      uint64_t ShiftAmt = SA->getLimitedValue(BitWidth);
             APInt Mask2(Mask.lshr(ShiftAmt));
             ComputeMaskedBits(I->getOperand(0), Mask2, KnownZero, KnownOne, Depth+1);
             assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"); 
      @@ -759,7 +758,7 @@
           // (ushr X, C1) & C2 == 0   iff  (-1 >> C1) & C2 == 0
           if (ConstantInt *SA = dyn_cast(I->getOperand(1))) {
             // Compute the new bits that are at the top now.
      -      uint64_t ShiftAmt = SA->getZExtValue();
      +      uint64_t ShiftAmt = SA->getLimitedValue(BitWidth);
             
             // Unsigned shift right.
             APInt Mask2(Mask.shl(ShiftAmt));
      @@ -776,7 +775,7 @@
           // (ashr X, C1) & C2 == 0   iff  (-1 >> C1) & C2 == 0
           if (ConstantInt *SA = dyn_cast(I->getOperand(1))) {
             // Compute the new bits that are at the top now.
      -      uint64_t ShiftAmt = SA->getZExtValue();
      +      uint64_t ShiftAmt = SA->getLimitedValue(BitWidth);
             
             // Signed shift right.
             APInt Mask2(Mask.shl(ShiftAmt));
      @@ -1306,7 +1305,7 @@
           break;
         case Instruction::Shl:
           if (ConstantInt *SA = dyn_cast(I->getOperand(1))) {
      -      uint64_t ShiftAmt = SA->getZExtValue();
      +      uint64_t ShiftAmt = SA->getLimitedValue(BitWidth);
             APInt DemandedMaskIn(DemandedMask.lshr(ShiftAmt));
             if (SimplifyDemandedBits(I->getOperand(0), DemandedMaskIn, 
                                      RHSKnownZero, RHSKnownOne, Depth+1))
      @@ -1323,7 +1322,7 @@
         case Instruction::LShr:
           // For a logical shift right
           if (ConstantInt *SA = dyn_cast(I->getOperand(1))) {
      -      unsigned ShiftAmt = SA->getZExtValue();
      +      uint64_t ShiftAmt = SA->getLimitedValue(BitWidth);
             
             // Unsigned shift right.
             APInt DemandedMaskIn(DemandedMask.shl(ShiftAmt));
      @@ -2984,8 +2983,7 @@
           // the anded constant includes them, clear them now!
           //
           uint32_t BitWidth = AndRHS->getType()->getBitWidth();
      -    uint32_t OpRHSVal = OpRHS->getValue().getActiveBits() > 64 ?
      -                        BitWidth : OpRHS->getZExtValue();
      +    uint32_t OpRHSVal = OpRHS->getLimitedValue(BitWidth);
           APInt ShlMask(APInt::getHighBitsSet(BitWidth, BitWidth-OpRHSVal));
           ConstantInt *CI = ConstantInt::get(AndRHS->getValue() & ShlMask);
       
      @@ -3005,8 +3003,7 @@
           // unsigned shifts, because a signed shr may bring in set bits!
           //
           uint32_t BitWidth = AndRHS->getType()->getBitWidth();
      -    uint32_t OpRHSVal = OpRHS->getValue().getActiveBits() > 64 ?
      -                        BitWidth : OpRHS->getZExtValue();
      +    uint32_t OpRHSVal = OpRHS->getLimitedValue(BitWidth);
           APInt ShrMask(APInt::getLowBitsSet(BitWidth, BitWidth - OpRHSVal));
           ConstantInt *CI = ConstantInt::get(AndRHS->getValue() & ShrMask);
       
      @@ -3025,8 +3022,7 @@
           // with an and.
           if (Op->hasOneUse()) {
             uint32_t BitWidth = AndRHS->getType()->getBitWidth();
      -      uint32_t OpRHSVal = OpRHS->getValue().getActiveBits() > 64 ?
      -                          BitWidth : OpRHS->getZExtValue();
      +      uint32_t OpRHSVal = OpRHS->getLimitedValue(BitWidth);
             APInt ShrMask(APInt::getLowBitsSet(BitWidth, BitWidth - OpRHSVal));
             Constant *C = ConstantInt::get(AndRHS->getValue() & ShrMask);
             if (C == AndRHS) {          // Masking out bits shifted in.
      @@ -3541,11 +3537,12 @@
           return CollectBSwapParts(I->getOperand(0), ByteValues) ||
                  CollectBSwapParts(I->getOperand(1), ByteValues);
         
      +  uint32_t BitWidth = I->getType()->getPrimitiveSizeInBits();
         // If this is a shift by a constant int, and it is "24", then its operand
         // defines a byte.  We only handle unsigned types here.
         if (I->isShift() && isa(I->getOperand(1))) {
           // Not shifting the entire input by N-1 bytes?
      -    if (cast(I->getOperand(1))->getZExtValue() !=
      +    if (cast(I->getOperand(1))->getLimitedValue(BitWidth) !=
               8*(ByteValues.size()-1))
             return true;
           
      @@ -3576,14 +3573,17 @@
         Instruction *SI = cast(Shift);
       
         // Make sure that the shift amount is by a multiple of 8 and isn't too big.
      -  if (ShiftAmt->getZExtValue() & 7 ||
      -      ShiftAmt->getZExtValue() > 8*ByteValues.size())
      +  if (ShiftAmt->getLimitedValue(BitWidth) & 7 ||
      +      ShiftAmt->getLimitedValue(BitWidth) > 8*ByteValues.size())
           return true;
         
         // Turn 0xFF -> 0, 0xFF00 -> 1, 0xFF0000 -> 2, etc.
         unsigned DestByte;
      +  if (AndAmt->getValue().getActiveBits() > 64)
      +    return true;
      +  uint64_t AndAmtVal = AndAmt->getZExtValue();
         for (DestByte = 0; DestByte != ByteValues.size(); ++DestByte)
      -    if (AndAmt->getZExtValue() == uint64_t(0xFF) << 8*DestByte)
      +    if (AndAmtVal == uint64_t(0xFF) << 8*DestByte)
             break;
         // Unknown mask for bswap.
         if (DestByte == ByteValues.size()) return true;
      @@ -4868,7 +4868,7 @@
                   // Check that the shift amount is in range.  If not, don't perform
                   // undefined shifts.  When the shift is visited it will be
                   // simplified.
      -            if (ShAmt->getZExtValue() >= TypeBits)
      +            if (ShAmt->uge(TypeBits))
                     break;
       
                   // If we are comparing against bits always shifted out, the
      @@ -4906,7 +4906,7 @@
                   // undefined shifts.  When the shift is visited it will be
                   // simplified.
                   unsigned TypeBits = CI->getType()->getPrimitiveSizeInBits();
      -            if (ShAmt->getZExtValue() >= TypeBits)
      +            if (ShAmt->uge(TypeBits))
                     break;
       
                   // If we are comparing against bits always shifted out, the
      @@ -5610,7 +5610,7 @@
         // shl uint X, 32 = 0 and shr ubyte Y, 9 = 0, ... just don't eliminate shr
         // of a signed value.
         //
      -  if (Op1->getValue().getActiveBits() > 64 || Op1->getZExtValue() >= TypeBits) {
      +  if (Op1->uge(TypeBits)) {
           if (I.getOpcode() != Instruction::AShr)
             return ReplaceInstUsesWith(I, Constant::getNullValue(Op0->getType()));
           else {
      @@ -5778,10 +5778,8 @@
         
         if (ShiftOp && isa(ShiftOp->getOperand(1))) {
           ConstantInt *ShiftAmt1C = cast(ShiftOp->getOperand(1));
      -    uint32_t ShiftAmt1 = ShiftAmt1C->getValue().getActiveBits() > 64 ? 
      -                           TypeBits : (uint32_t)ShiftAmt1C->getZExtValue();
      -    uint32_t ShiftAmt2 = Op1->getValue().getActiveBits() > 64 ? 
      -                           TypeBits : (uint32_t)Op1->getZExtValue();
      +    uint32_t ShiftAmt1 = ShiftAmt1C->getLimitedValue(TypeBits);
      +    uint32_t ShiftAmt2 = Op1->getLimitedValue(TypeBits);
           assert(ShiftAmt2 != 0 && "Should have been simplified earlier");
           if (ShiftAmt1 == 0) return 0;  // Will be simplified in the future.
           Value *X = ShiftOp->getOperand(0);
      @@ -8129,9 +8127,9 @@
               } else if (Instruction *Inst =dyn_cast(GEP.getOperand(1))){
                 if (Inst->getOpcode() == Instruction::Shl &&
                     isa(Inst->getOperand(1))) {
      -            unsigned ShAmt =
      -              cast(Inst->getOperand(1))->getZExtValue();
      -            Scale = ConstantInt::get(Inst->getType(), 1ULL << ShAmt);
      +            ConstantInt *ShAmt = cast(Inst->getOperand(1));
      +            uint32_t ShAmtVal = ShAmt->getLimitedValue(64);
      +            Scale = ConstantInt::get(Inst->getType(), 1ULL << ShAmtVal);
                   NewIdx = Inst->getOperand(0);
                 } else if (Inst->getOpcode() == Instruction::Mul &&
                            isa(Inst->getOperand(1))) {
      
      
      
      
      
      From baldrick at free.fr  Fri Mar 30 07:22:26 2007
      From: baldrick at free.fr (Duncan Sands)
      Date: Fri, 30 Mar 2007 07:22:26 -0500
      Subject: [llvm-commits] CVS: llvm/docs/AliasAnalysis.html
      	DeveloperPolicy.html ExceptionHandling.html
      	GarbageCollection.html LangRef.html ProgrammersManual.html
      	SystemLibrary.html
      Message-ID: <200703301222.l2UCMQET011735@zion.cs.uiuc.edu>
      
      
      
      Changes in directory llvm/docs:
      
      AliasAnalysis.html updated: 1.27 -> 1.28
      DeveloperPolicy.html updated: 1.37 -> 1.38
      ExceptionHandling.html updated: 1.1 -> 1.2
      GarbageCollection.html updated: 1.8 -> 1.9
      LangRef.html updated: 1.217 -> 1.218
      ProgrammersManual.html updated: 1.130 -> 1.131
      SystemLibrary.html updated: 1.10 -> 1.11
      ---
      Log message:
      
      Various hopefully correct easy fixes.
      
      
      ---
      Diffs of the changes:  (+26 -27)
      
       AliasAnalysis.html     |    4 ++--
       DeveloperPolicy.html   |    4 ++--
       ExceptionHandling.html |    8 ++++----
       GarbageCollection.html |    4 ++--
       LangRef.html           |   21 ++++++++++-----------
       ProgrammersManual.html |    8 ++++----
       SystemLibrary.html     |    4 ++--
       7 files changed, 26 insertions(+), 27 deletions(-)
      
      
      Index: llvm/docs/AliasAnalysis.html
      diff -u llvm/docs/AliasAnalysis.html:1.27 llvm/docs/AliasAnalysis.html:1.28
      --- llvm/docs/AliasAnalysis.html:1.27	Mon Mar 13 23:39:39 2006
      +++ llvm/docs/AliasAnalysis.html	Fri Mar 30 07:22:09 2007
      @@ -70,7 +70,7 @@
       different ways of classifying them: flow-sensitive vs flow-insensitive,
       context-sensitive vs context-insensitive, field-sensitive vs field-insensitive,
       unification-based vs subset-based, etc.  Traditionally, alias analyses respond
      -to a query with a Must, May, or No alias response,
      +to a query with a Must, May, or No alias response,
       indicating that two pointers always point to the same object, might point to the
       same object, or are known to never point to the same object.

      @@ -952,7 +952,7 @@ Chris Lattner
      LLVM Compiler Infrastructure
      - Last modified: $Date: 2006/03/14 05:39:39 $ + Last modified: $Date: 2007/03/30 12:22:09 $ Index: llvm/docs/DeveloperPolicy.html diff -u llvm/docs/DeveloperPolicy.html:1.37 llvm/docs/DeveloperPolicy.html:1.38 --- llvm/docs/DeveloperPolicy.html:1.37 Thu Mar 1 20:57:34 2007 +++ llvm/docs/DeveloperPolicy.html Fri Mar 30 07:22:09 2007 @@ -162,7 +162,7 @@ bug being fixed or feature being implemented is in the llvm-gcc C++ front-end, in which case it must be written in C++).
    8. Test cases, especially for regressions, should be reduced as much as - possible, by bugpoint or + possible, by bugpoint or manually. It is unacceptable to place an entire failing program into llvm/test as this creates a time-to-test burden on all developers. Please keep them short.
    9. @@ -499,7 +499,7 @@ Written by the LLVM Oversight Group
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2007/03/02 02:57:34 $ + Last modified: $Date: 2007/03/30 12:22:09 $ Index: llvm/docs/ExceptionHandling.html diff -u llvm/docs/ExceptionHandling.html:1.1 llvm/docs/ExceptionHandling.html:1.2 --- llvm/docs/ExceptionHandling.html:1.1 Wed Mar 14 14:29:42 2007 +++ llvm/docs/ExceptionHandling.html Fri Mar 30 07:22:09 2007 @@ -22,10 +22,10 @@
      1. Throw
      2. Try/Catch
      3. -
      4. Finallys
      5. +
      6. Finallys
      7. Throw Filters
      -
    10. Exception Handling Intrinsics +
    11. Exception Handling Intrinsics
      1. llvm.eh.exception
      2. llvm.eh.selector
      3. @@ -281,7 +281,7 @@
        @@ -453,7 +453,7 @@ Chris Lattner
        LLVM Compiler Infrastructure
        - Last modified: $Date: 2007/03/14 19:29:42 $ + Last modified: $Date: 2007/03/30 12:22:09 $ Index: llvm/docs/GarbageCollection.html diff -u llvm/docs/GarbageCollection.html:1.8 llvm/docs/GarbageCollection.html:1.9 --- llvm/docs/GarbageCollection.html:1.8 Mon Mar 13 23:39:39 2006 +++ llvm/docs/GarbageCollection.html Fri Mar 30 07:22:09 2007 @@ -387,7 +387,7 @@ generator that iterates through all of the GC roots on the stack, calling the specified function pointer with each record. For each GC root, the address of the pointer and the meta-data (from the llvm.gcroot intrinsic) are provided. +href="#roots">llvm.gcroot intrinsic) are provided.

        @@ -526,7 +526,7 @@ Chris Lattner
        LLVM Compiler Infrastructure
        - Last modified: $Date: 2006/03/14 05:39:39 $ + Last modified: $Date: 2007/03/30 12:22:09 $ Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.217 llvm/docs/LangRef.html:1.218 --- llvm/docs/LangRef.html:1.217 Tue Mar 27 21:46:29 2007 +++ llvm/docs/LangRef.html Fri Mar 30 07:22:09 2007 @@ -27,7 +27,6 @@
      4. Parameter Attributes
      5. Module-Level Inline Assembly
      6. Data Layout
      7. -
      8. Check Points
    12. Type System @@ -886,7 +885,7 @@ - + @@ -1714,7 +1713,7 @@
      1. - The optional "cconv" marker indicates which calling + The optional "cconv" marker indicates which calling convention the call should use. If none is specified, the call defaults to using C calling conventions.
      2. @@ -2966,8 +2965,8 @@
        Semantics:

        The 'fpext' instruction extends the value from a smaller -floating point type to a larger -floating point type. The fpext cannot be +floating point type to a larger +floating point type. The fpext cannot be used to make a no-op cast because it always changes bits. Use bitcast to make a no-op cast for a floating point cast.

        @@ -3140,7 +3139,7 @@
        Arguments:

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

        Semantics:
        @@ -3174,7 +3173,7 @@ a pointer type, ty2.

        Arguments:
        -

        The 'inttoptr' instruction takes an integer +

        The 'inttoptr' instruction takes an integer value to cast, and a type to cast it to, which must be a pointer type. @@ -3490,7 +3489,7 @@ href="#i_ret">ret instruction.

      3. -

        The optional "cconv" marker indicates which calling +

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

      4. @@ -3747,7 +3746,7 @@

        The 'llvm.va_copy' intrinsic works just like the va_copy macro available in C. In a target-dependent way, it copies the source va_list element into the destination list. This intrinsic is necessary -because the llvm.va_begin intrinsic may be +because the llvm.va_start intrinsic may be arbitrarily complex and require memory allocation, for example.

        @@ -4029,7 +4028,7 @@

        The 'llvm.stackrestore' intrinsic is used to restore the state of the function stack to the state it was in when the corresponding llvm.stacksave intrinsic executed. This is +href="#i_stacksave">llvm.stacksave intrinsic executed. This is useful for implementing language features like scoped automatic variable sized arrays in C99.

        @@ -4611,7 +4610,7 @@ Chris Lattner
        The LLVM Compiler Infrastructure
        - Last modified: $Date: 2007/03/28 02:46:29 $ + Last modified: $Date: 2007/03/30 12:22:09 $ Index: llvm/docs/ProgrammersManual.html diff -u llvm/docs/ProgrammersManual.html:1.130 llvm/docs/ProgrammersManual.html:1.131 --- llvm/docs/ProgrammersManual.html:1.130 Wed Mar 28 13:27:57 2007 +++ llvm/docs/ProgrammersManual.html Fri Mar 30 07:22:09 2007 @@ -2195,7 +2195,7 @@ point type.
        StructType
        Subclass of DerivedTypes for struct types.
        -
        FunctionType
        +
        FunctionType
        Subclass of DerivedTypes for function types.
        • bool isVarArg() const: Returns true if its a vararg @@ -2389,7 +2389,7 @@ -

          The name of this instruction is "foo". NOTE +

          The name of this instruction is "foo". NOTE that the name of any value may be missing (an empty string), so names should ONLY be used for debugging (making the source code easier to read, debugging printouts), they should not be used to keep track of values or map @@ -2805,7 +2805,7 @@ create and what type of linkage the function should have. The FunctionType argument specifies the formal arguments and return value for the function. The same - FunctionType value can be used to + FunctionType value can be used to create multiple functions. The Parent argument specifies the Module in which the function is defined. If this argument is provided, the function will automatically be inserted into that module's list of @@ -3060,7 +3060,7 @@ Dinakar Dhurjati and Chris Lattner
          The LLVM Compiler Infrastructure
          - Last modified: $Date: 2007/03/28 18:27:57 $ + Last modified: $Date: 2007/03/30 12:22:09 $ Index: llvm/docs/SystemLibrary.html diff -u llvm/docs/SystemLibrary.html:1.10 llvm/docs/SystemLibrary.html:1.11 --- llvm/docs/SystemLibrary.html:1.10 Mon Mar 13 23:39:39 2006 +++ llvm/docs/SystemLibrary.html Fri Mar 30 07:22:09 2007 @@ -32,7 +32,7 @@

        -

        Written by Reid Spencer

        +

        Written by Reid Spencer

        @@ -338,7 +338,7 @@ Reid Spencer
        LLVM Compiler Infrastructure
        - Last modified: $Date: 2006/03/14 05:39:39 $ + Last modified: $Date: 2007/03/30 12:22:09 $ From rspencer at reidspencer.com Fri Mar 30 09:23:03 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Fri, 30 Mar 2007 07:23:03 -0700 Subject: [llvm-commits] CVS: llvm/docs/AliasAnalysis.html DeveloperPolicy.html ExceptionHandling.html GarbageCollection.html LangRef.html ProgrammersManual.html SystemLibrary.html In-Reply-To: <200703301222.l2UCMQET011735@zion.cs.uiuc.edu> References: <200703301222.l2UCMQET011735@zion.cs.uiuc.edu> Message-ID: <1175264583.3058.126.camel@bashful.x10sys.com> Duncan, A Couple notes .. On Fri, 2007-03-30 at 07:22 -0500, Duncan Sands wrote: > > Index: llvm/docs/DeveloperPolicy.html > diff -u llvm/docs/DeveloperPolicy.html:1.37 llvm/docs/DeveloperPolicy.html:1.38 > --- llvm/docs/DeveloperPolicy.html:1.37 Thu Mar 1 20:57:34 2007 > +++ llvm/docs/DeveloperPolicy.html Fri Mar 30 07:22:09 2007 > @@ -162,7 +162,7 @@ > bug being fixed or feature being implemented is in the llvm-gcc C++ > front-end, in which case it must be written in C++). >
      5. Test cases, especially for regressions, should be reduced as much as > - possible, by bugpoint or > + possible, by bugpoint or These aren't the same document. If the bugpoint.html document isn't there its an artifact of not generating the HTML version from the POD version. This isn't a huge deal for the link, but do we have a larger issue generating the command pages? > > Index: llvm/docs/LangRef.html > diff -u llvm/docs/LangRef.html:1.217 llvm/docs/LangRef.html:1.218 > --- llvm/docs/LangRef.html:1.217 Tue Mar 27 21:46:29 2007 > +++ llvm/docs/LangRef.html Fri Mar 30 07:22:09 2007 > @@ -27,7 +27,6 @@ >
      6. Parameter Attributes
      7. >
      8. Module-Level Inline Assembly
      9. >
      10. Data Layout
      11. > -
      12. Check Points
      13. Can you delete the CheckPoints section too? Its going away soon, when PR1289 is closed. Thx. >
      > >
    13. Type System > @@ -886,7 +885,7 @@ >
    14. TypeDescription
      voidNo value
      voidNo value
      i88-bit value
      i3232-bit value
      float32-bit floating point value
      > > > - > + > > > Why not put in links for the other types? Thanks, Reid. From baldrick at free.fr Fri Mar 30 09:39:45 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 30 Mar 2007 16:39:45 +0200 Subject: [llvm-commits] CVS: llvm/docs/AliasAnalysis.html DeveloperPolicy.html ExceptionHandling.html GarbageCollection.html LangRef.html ProgrammersManual.html SystemLibrary.html In-Reply-To: <1175264583.3058.126.camel@bashful.x10sys.com> References: <200703301222.l2UCMQET011735@zion.cs.uiuc.edu> <1175264583.3058.126.camel@bashful.x10sys.com> Message-ID: <200703301639.46368.baldrick@free.fr> Hi Reid, > > - possible, by bugpoint or > > + possible, by bugpoint or > > These aren't the same document. If the bugpoint.html document isn't > there its an artifact of not generating the HTML version from the POD > version. This isn't a huge deal for the link, but do we have a larger > issue generating the command pages? I first changed this mistakenly, because I hadn't generated the html files, but when I realized it was a mistake it struck me that it was better this way, so I left it rather than changing it back. > > -
    15. Check Points
    16. > > Can you delete the CheckPoints section too? Its going away soon, when > PR1289 is closed. There is no checkpoints section, there is only "Data Layout". However "Data Layout" talks only of checkpoints. Would you like me to delete it?

      At the top level, the keyword checkpoint may be used to force the assembler to check point the types and values it has defined so far. Any unresolved types or references will generate error messages. This is useful as an assertion point or for debugging.

      > > - > > + > > > > > > > > Why not put in links for the other types? Because they have their own sections with an anchor, eg t_integer refers to the section on integers. Void is the only type that doesn't have its own section. Probably it should get one. Ciao, Duncan. From jeffc at jolt-lang.org Fri Mar 30 09:49:49 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Fri, 30 Mar 2007 07:49:49 -0700 Subject: [llvm-commits] CVS: llvm/lib/System/Unix/MappedFile.inc In-Reply-To: <32F42092-09E3-49C7-81EB-EDEFE1197217@apple.com> References: <200703291911.l2TJBd4H015939@zion.cs.uiuc.edu> <32F42092-09E3-49C7-81EB-EDEFE1197217@apple.com> Message-ID: <460D238D.1010406@jolt-lang.org> Chris Lattner wrote: >> Use the stat information in the Path object, if it is already >> obtained. This >> avoids a call to ::fstat by MappedFile when the file size >> information was >> already obtained by the Path object. >> > > Interesting approach. The problem is that fstat is significantly > faster than stat. How about a new Path::getFileStatusFromFD() > method, which takes an open file descriptor. If the System supports > it, it can get status information faster by using it, otherwise it > falls back to getFileStatus (e.g. if win32 doesn't have fstat)? > > -Chris > It does, but names it _fstat. I'm not sure it's worth the bother to cache fstat either. stat is slow because it has to look up the file path. > >> --- >> Diffs of the changes: (+3 -4) >> >> MappedFile.inc | 7 +++---- >> 1 files changed, 3 insertions(+), 4 deletions(-) >> >> >> Index: llvm/lib/System/Unix/MappedFile.inc >> diff -u llvm/lib/System/Unix/MappedFile.inc:1.18 llvm/lib/System/ >> Unix/MappedFile.inc:1.19 >> --- llvm/lib/System/Unix/MappedFile.inc:1.18 Fri Aug 25 16:37:17 2006 >> +++ llvm/lib/System/Unix/MappedFile.inc Thu Mar 29 14:11:22 2007 >> @@ -54,15 +54,14 @@ >> MakeErrMsg(ErrMsg, "can't open file '" + path_.toString() + "'"); >> return true; >> } >> - struct stat sbuf; >> - if(::fstat(FD, &sbuf) < 0) { >> - MakeErrMsg(ErrMsg, "can't stat file '"+ path_.toString() + "'"); >> + const FileStatus *Status = path_.getFileStatus(false, ErrMsg); >> + if (!Status) { >> ::close(FD); >> return true; >> } >> info_ = new MappedFileInfo; >> info_->FD = FD; >> - info_->Size = sbuf.st_size; >> + info_->Size = Status->getSize(); >> return false; >> } >> >> >> >> >> _______________________________________________ >> 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 rspencer at reidspencer.com Fri Mar 30 09:52:20 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Fri, 30 Mar 2007 07:52:20 -0700 Subject: [llvm-commits] CVS: llvm/docs/AliasAnalysis.html DeveloperPolicy.html ExceptionHandling.html GarbageCollection.html LangRef.html ProgrammersManual.html SystemLibrary.html In-Reply-To: <200703301639.46368.baldrick@free.fr> References: <200703301222.l2UCMQET011735@zion.cs.uiuc.edu> <1175264583.3058.126.camel@bashful.x10sys.com> <200703301639.46368.baldrick@free.fr> Message-ID: <1175266340.3058.131.camel@bashful.x10sys.com> Hi Duncan, On Fri, 2007-03-30 at 16:39 +0200, Duncan Sands wrote: > Hi Reid, > > > > - possible, by bugpoint or > > > + possible, by bugpoint or > > > > These aren't the same document. If the bugpoint.html document isn't > > there its an artifact of not generating the HTML version from the POD > > version. This isn't a huge deal for the link, but do we have a larger > > issue generating the command pages? > > I first changed this mistakenly, because I hadn't generated the html files, > but when I realized it was a mistake it struck me that it was better this way, > so I left it rather than changing it back. Okay, that's fine. > > > > -
    17. Check Points
    18. > > > > Can you delete the CheckPoints section too? Its going away soon, when > > PR1289 is closed. > > There is no checkpoints section, there is only "Data Layout". However > "Data Layout" talks only of checkpoints. Would you like me to delete it? > > >
      >

      At the top level, the keyword checkpoint may be used to force the > assembler to check point the types and values it has defined so far. Any > unresolved types or references will generate error messages. This is useful > as an assertion point or for debugging.

      >
      Yes, delete that whole
      and the doc_subsection too if that's the only paragraph in it. The checkpoint thing is not supported any more. I know this isn't your change, but since you're in there ... :) > > > > > -
      > > > + > > > > > > > > > > > > > Why not put in links for the other types? > > Because they have their own sections with an anchor, eg t_integer refers to the > section on integers. Void is the only type that doesn't have its own section. > Probably it should get one. Oh, yeah, sorry, thought that was an href="#t_void" you put in there. In this case, this link isn't good. We don't want a link coming to this table because itw ill confuse the reader. Please add a section near t_integer for t_void. Then, make all of these table entries have links to the type's section. Thx, Reid. > > Ciao, > > Duncan. From baldrick at free.fr Fri Mar 30 11:10:21 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 30 Mar 2007 11:10:21 -0500 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html Message-ID: <200703301610.l2UGAL8Z018144@zion.cs.uiuc.edu> Changes in directory llvm/docs: LangRef.html updated: 1.218 -> 1.219 --- Log message: Remove reference to checkpoint. --- Diffs of the changes: (+1 -11) LangRef.html | 12 +----------- 1 files changed, 1 insertion(+), 11 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.218 llvm/docs/LangRef.html:1.219 --- llvm/docs/LangRef.html:1.218 Fri Mar 30 07:22:09 2007 +++ llvm/docs/LangRef.html Fri Mar 30 11:09:58 2007 @@ -846,16 +846,6 @@ terms of 64 <2 x double>, for example. - - -
      -

      At the top level, the keyword checkpoint may be used to force the - assembler to check point the types and values it has defined so far. Any - unresolved types or references will generate error messages. This is useful - as an assertion point or for debugging.

      -
      @@ -4610,7 +4600,7 @@ Chris Lattner
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2007/03/30 12:22:09 $ + Last modified: $Date: 2007/03/30 16:09:58 $ From baldrick at free.fr Fri Mar 30 11:13:13 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 30 Mar 2007 18:13:13 +0200 Subject: [llvm-commits] CVS: llvm/docs/AliasAnalysis.html DeveloperPolicy.html ExceptionHandling.html GarbageCollection.html LangRef.html ProgrammersManual.html SystemLibrary.html In-Reply-To: <1175266340.3058.131.camel@bashful.x10sys.com> References: <200703301222.l2UCMQET011735@zion.cs.uiuc.edu> <200703301639.46368.baldrick@free.fr> <1175266340.3058.131.camel@bashful.x10sys.com> Message-ID: <200703301813.13824.baldrick@free.fr> > > There is no checkpoints section, there is only "Data Layout". However > > "Data Layout" talks only of checkpoints. Would you like me to delete it? ... > Yes, delete that whole
      and the doc_subsection too > if that's the only paragraph in it. The checkpoint thing is not > supported any more. I know this isn't your change, but since you're in > there ... :) Done. > > > > -
      > > > > + > > > > > > > > > > > > > > > > > > Why not put in links for the other types? > > > > Because they have their own sections with an anchor, eg t_integer refers to the > > section on integers. Void is the only type that doesn't have its own section. > > Probably it should get one. > > Oh, yeah, sorry, thought that was an href="#t_void" you put in there. > > In this case, this link isn't good. We don't want a link coming to this > table because itw ill confuse the reader. Please add a section near > t_integer for t_void. Then, make all of these table entries have links > to the type's section. Actually, the integer and floating point types don't have their own section. #t_integer and #t_floating refer to the entries in the next table. I don't think leaving t_void anchor where it is will confuse anyone. Ciao, Duncan. From reid at x10sys.com Fri Mar 30 11:42:07 2007 From: reid at x10sys.com (Reid Spencer) Date: Fri, 30 Mar 2007 11:42:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Message-ID: <200703301642.l2UGg7xb019408@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/Interpreter: ExternalFunctions.cpp updated: 1.96 -> 1.97 --- Log message: For PR1293: http://llvm.org/PR1293 : * Rename the FunctionType* parameter from M to FT on all the functions. * Implement a fix for PR1293: http://llvm.org/PR1293 by just asserting that library functions that must return pointers should have pointer typed results. This just makes sure that we don't attempt to use an uninitialized integer or something later on. --- Diffs of the changes: (+67 -49) ExternalFunctions.cpp | 116 ++++++++++++++++++++++++++++---------------------- 1 files changed, 67 insertions(+), 49 deletions(-) Index: llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.96 llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.97 --- llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.96 Mon Mar 5 21:08:12 2007 +++ llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Fri Mar 30 11:41:50 2007 @@ -113,25 +113,25 @@ extern "C" { // Don't add C++ manglings to llvm mangling :) // void putchar(sbyte) -GenericValue lle_VB_putchar(FunctionType *M, const vector &Args) { +GenericValue lle_VB_putchar(FunctionType *FT, const vector &Args){ cout << ((char)Args[0].IntVal.getZExtValue()); return GenericValue(); } // int putchar(int) -GenericValue lle_ii_putchar(FunctionType *M, const vector &Args) { +GenericValue lle_ii_putchar(FunctionType *FT, const vector &Args){ cout << ((char)Args[0].IntVal.getZExtValue()) << std::flush; return Args[0]; } // void putchar(ubyte) -GenericValue lle_Vb_putchar(FunctionType *M, const vector &Args) { +GenericValue lle_Vb_putchar(FunctionType *FT, const vector &Args){ cout << ((char)Args[0].IntVal.getZExtValue()) << std::flush; return Args[0]; } // void atexit(Function*) -GenericValue lle_X_atexit(FunctionType *M, const vector &Args) { +GenericValue lle_X_atexit(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); TheInterpreter->addAtExitHandler((Function*)GVTOP(Args[0])); GenericValue GV; @@ -140,39 +140,48 @@ } // void exit(int) -GenericValue lle_X_exit(FunctionType *M, const vector &Args) { +GenericValue lle_X_exit(FunctionType *FT, const vector &Args) { TheInterpreter->exitCalled(Args[0]); return GenericValue(); } // void abort(void) -GenericValue lle_X_abort(FunctionType *M, const vector &Args) { +GenericValue lle_X_abort(FunctionType *FT, const vector &Args) { raise (SIGABRT); return GenericValue(); } // void *malloc(uint) -GenericValue lle_X_malloc(FunctionType *M, const vector &Args) { +GenericValue lle_X_malloc(FunctionType *FT, const vector &Args) { assert(Args.size() == 1 && "Malloc expects one argument!"); + assert(isa(FT->getReturnType()) && "malloc must return pointer"); return PTOGV(malloc(Args[0].IntVal.getZExtValue())); } // void *calloc(uint, uint) -GenericValue lle_X_calloc(FunctionType *M, const vector &Args) { +GenericValue lle_X_calloc(FunctionType *FT, const vector &Args) { assert(Args.size() == 2 && "calloc expects two arguments!"); + assert(isa(FT->getReturnType()) && "calloc must return pointer"); return PTOGV(calloc(Args[0].IntVal.getZExtValue(), Args[1].IntVal.getZExtValue())); } +// void *calloc(uint, uint) +GenericValue lle_X_realloc(FunctionType *FT, const vector &Args) { + assert(Args.size() == 2 && "calloc expects two arguments!"); + assert(isa(FT->getReturnType()) &&"realloc must return pointer"); + return PTOGV(realloc(GVTOP(Args[0]), Args[1].IntVal.getZExtValue())); +} + // void free(void *) -GenericValue lle_X_free(FunctionType *M, const vector &Args) { +GenericValue lle_X_free(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); free(GVTOP(Args[0])); return GenericValue(); } // int atoi(char *) -GenericValue lle_X_atoi(FunctionType *M, const vector &Args) { +GenericValue lle_X_atoi(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); GenericValue GV; GV.IntVal = APInt(32, atoi((char*)GVTOP(Args[0]))); @@ -180,7 +189,7 @@ } // double pow(double, double) -GenericValue lle_X_pow(FunctionType *M, const vector &Args) { +GenericValue lle_X_pow(FunctionType *FT, const vector &Args) { assert(Args.size() == 2); GenericValue GV; GV.DoubleVal = pow(Args[0].DoubleVal, Args[1].DoubleVal); @@ -188,7 +197,7 @@ } // double exp(double) -GenericValue lle_X_exp(FunctionType *M, const vector &Args) { +GenericValue lle_X_exp(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); GenericValue GV; GV.DoubleVal = exp(Args[0].DoubleVal); @@ -196,7 +205,7 @@ } // double sqrt(double) -GenericValue lle_X_sqrt(FunctionType *M, const vector &Args) { +GenericValue lle_X_sqrt(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); GenericValue GV; GV.DoubleVal = sqrt(Args[0].DoubleVal); @@ -204,7 +213,7 @@ } // double log(double) -GenericValue lle_X_log(FunctionType *M, const vector &Args) { +GenericValue lle_X_log(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); GenericValue GV; GV.DoubleVal = log(Args[0].DoubleVal); @@ -212,7 +221,7 @@ } // double floor(double) -GenericValue lle_X_floor(FunctionType *M, const vector &Args) { +GenericValue lle_X_floor(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); GenericValue GV; GV.DoubleVal = floor(Args[0].DoubleVal); @@ -222,7 +231,7 @@ #ifdef HAVE_RAND48 // double drand48() -GenericValue lle_X_drand48(FunctionType *M, const vector &Args) { +GenericValue lle_X_drand48(FunctionType *FT, const vector &Args) { assert(Args.size() == 0); GenericValue GV; GV.DoubleVal = drand48(); @@ -230,7 +239,7 @@ } // long lrand48() -GenericValue lle_X_lrand48(FunctionType *M, const vector &Args) { +GenericValue lle_X_lrand48(FunctionType *FT, const vector &Args) { assert(Args.size() == 0); GenericValue GV; GV.Int32Val = lrand48(); @@ -238,7 +247,7 @@ } // void srand48(long) -GenericValue lle_X_srand48(FunctionType *M, const vector &Args) { +GenericValue lle_X_srand48(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); srand48(Args[0].Int32Val); return GenericValue(); @@ -247,7 +256,7 @@ #endif // int rand() -GenericValue lle_X_rand(FunctionType *M, const vector &Args) { +GenericValue lle_X_rand(FunctionType *FT, const vector &Args) { assert(Args.size() == 0); GenericValue GV; GV.IntVal = APInt(32, rand()); @@ -255,14 +264,14 @@ } // void srand(uint) -GenericValue lle_X_srand(FunctionType *M, const vector &Args) { +GenericValue lle_X_srand(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); srand(Args[0].IntVal.getZExtValue()); return GenericValue(); } // int puts(const char*) -GenericValue lle_X_puts(FunctionType *M, const vector &Args) { +GenericValue lle_X_puts(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); GenericValue GV; GV.IntVal = APInt(32, puts((char*)GVTOP(Args[0]))); @@ -271,7 +280,7 @@ // int sprintf(sbyte *, sbyte *, ...) - a very rough implementation to make // output useful. -GenericValue lle_X_sprintf(FunctionType *M, const vector &Args) { +GenericValue lle_X_sprintf(FunctionType *FT, const vector &Args) { char *OutputBuffer = (char *)GVTOP(Args[0]); const char *FmtStr = (const char *)GVTOP(Args[1]); unsigned ArgNo = 2; @@ -348,12 +357,12 @@ } // int printf(sbyte *, ...) - a very rough implementation to make output useful. -GenericValue lle_X_printf(FunctionType *M, const vector &Args) { +GenericValue lle_X_printf(FunctionType *FT, const vector &Args) { char Buffer[10000]; vector NewArgs; NewArgs.push_back(PTOGV(Buffer)); NewArgs.insert(NewArgs.end(), Args.begin(), Args.end()); - GenericValue GV = lle_X_sprintf(M, NewArgs); + GenericValue GV = lle_X_sprintf(FT, NewArgs); cout << Buffer; return GV; } @@ -435,7 +444,7 @@ } // int sscanf(const char *format, ...); -GenericValue lle_X_sscanf(FunctionType *M, const vector &args) { +GenericValue lle_X_sscanf(FunctionType *FT, const vector &args) { assert(args.size() < 10 && "Only handle up to 10 args to sscanf right now!"); char *Args[10]; @@ -451,7 +460,7 @@ } // int scanf(const char *format, ...); -GenericValue lle_X_scanf(FunctionType *M, const vector &args) { +GenericValue lle_X_scanf(FunctionType *FT, const vector &args) { assert(args.size() < 10 && "Only handle up to 10 args to scanf right now!"); char *Args[10]; @@ -468,7 +477,7 @@ // int clock(void) - Profiling implementation -GenericValue lle_i_clock(FunctionType *M, const vector &Args) { +GenericValue lle_i_clock(FunctionType *FT, const vector &Args) { extern unsigned int clock(void); GenericValue GV; GV.IntVal = APInt(32, clock()); @@ -481,7 +490,7 @@ //===----------------------------------------------------------------------===// // int strcmp(const char *S1, const char *S2); -GenericValue lle_X_strcmp(FunctionType *M, const vector &Args) { +GenericValue lle_X_strcmp(FunctionType *FT, const vector &Args) { assert(Args.size() == 2); GenericValue Ret; Ret.IntVal = APInt(32, strcmp((char*)GVTOP(Args[0]), (char*)GVTOP(Args[1]))); @@ -489,14 +498,16 @@ } // char *strcat(char *Dest, const char *src); -GenericValue lle_X_strcat(FunctionType *M, const vector &Args) { +GenericValue lle_X_strcat(FunctionType *FT, const vector &Args) { assert(Args.size() == 2); + assert(isa(FT->getReturnType()) &&"strcat must return pointer"); return PTOGV(strcat((char*)GVTOP(Args[0]), (char*)GVTOP(Args[1]))); } // char *strcpy(char *Dest, const char *src); -GenericValue lle_X_strcpy(FunctionType *M, const vector &Args) { +GenericValue lle_X_strcpy(FunctionType *FT, const vector &Args) { assert(Args.size() == 2); + assert(isa(FT->getReturnType()) &&"strcpy must return pointer"); return PTOGV(strcpy((char*)GVTOP(Args[0]), (char*)GVTOP(Args[1]))); } @@ -523,35 +534,39 @@ } // size_t strlen(const char *src); -GenericValue lle_X_strlen(FunctionType *M, const vector &Args) { +GenericValue lle_X_strlen(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); size_t strlenResult = strlen ((char *) GVTOP (Args[0])); return size_t_to_GV (strlenResult); } // char *strdup(const char *src); -GenericValue lle_X_strdup(FunctionType *M, const vector &Args) { +GenericValue lle_X_strdup(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); + assert(isa(FT->getReturnType()) && "strdup must return pointer"); return PTOGV(strdup((char*)GVTOP(Args[0]))); } // char *__strdup(const char *src); -GenericValue lle_X___strdup(FunctionType *M, const vector &Args) { +GenericValue lle_X___strdup(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); + assert(isa(FT->getReturnType()) &&"_strdup must return pointer"); return PTOGV(strdup((char*)GVTOP(Args[0]))); } // void *memset(void *S, int C, size_t N) -GenericValue lle_X_memset(FunctionType *M, const vector &Args) { +GenericValue lle_X_memset(FunctionType *FT, const vector &Args) { assert(Args.size() == 3); size_t count = GV_to_size_t (Args[2]); + assert(isa(FT->getReturnType()) && "memset must return pointer"); return PTOGV(memset(GVTOP(Args[0]), uint32_t(Args[1].IntVal.getZExtValue()), count)); } // void *memcpy(void *Dest, void *src, size_t Size); -GenericValue lle_X_memcpy(FunctionType *M, const vector &Args) { +GenericValue lle_X_memcpy(FunctionType *FT, const vector &Args) { assert(Args.size() == 3); + assert(isa(FT->getReturnType()) && "memcpy must return pointer"); size_t count = GV_to_size_t (Args[2]); return PTOGV(memcpy((char*)GVTOP(Args[0]), (char*)GVTOP(Args[1]), count)); } @@ -565,14 +580,15 @@ #define getFILE(ptr) ((FILE*)ptr) // FILE *fopen(const char *filename, const char *mode); -GenericValue lle_X_fopen(FunctionType *M, const vector &Args) { +GenericValue lle_X_fopen(FunctionType *FT, const vector &Args) { assert(Args.size() == 2); + assert(isa(FT->getReturnType()) && "fopen must return pointer"); return PTOGV(fopen((const char *)GVTOP(Args[0]), (const char *)GVTOP(Args[1]))); } // int fclose(FILE *F); -GenericValue lle_X_fclose(FunctionType *M, const vector &Args) { +GenericValue lle_X_fclose(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); GenericValue GV; GV.IntVal = APInt(32, fclose(getFILE(GVTOP(Args[0])))); @@ -580,7 +596,7 @@ } // int feof(FILE *stream); -GenericValue lle_X_feof(FunctionType *M, const vector &Args) { +GenericValue lle_X_feof(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); GenericValue GV; @@ -589,7 +605,7 @@ } // size_t fread(void *ptr, size_t size, size_t nitems, FILE *stream); -GenericValue lle_X_fread(FunctionType *M, const vector &Args) { +GenericValue lle_X_fread(FunctionType *FT, const vector &Args) { assert(Args.size() == 4); size_t result; @@ -599,7 +615,7 @@ } // size_t fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream); -GenericValue lle_X_fwrite(FunctionType *M, const vector &Args) { +GenericValue lle_X_fwrite(FunctionType *FT, const vector &Args) { assert(Args.size() == 4); size_t result; @@ -609,21 +625,22 @@ } // char *fgets(char *s, int n, FILE *stream); -GenericValue lle_X_fgets(FunctionType *M, const vector &Args) { +GenericValue lle_X_fgets(FunctionType *FT, const vector &Args) { assert(Args.size() == 3); return GVTOP(fgets((char*)GVTOP(Args[0]), Args[1].IntVal.getZExtValue(), getFILE(GVTOP(Args[2])))); } // FILE *freopen(const char *path, const char *mode, FILE *stream); -GenericValue lle_X_freopen(FunctionType *M, const vector &Args) { +GenericValue lle_X_freopen(FunctionType *FT, const vector &Args) { assert(Args.size() == 3); + assert(isa(FT->getReturnType()) &&"freopen must return pointer"); return PTOGV(freopen((char*)GVTOP(Args[0]), (char*)GVTOP(Args[1]), getFILE(GVTOP(Args[2])))); } // int fflush(FILE *stream); -GenericValue lle_X_fflush(FunctionType *M, const vector &Args) { +GenericValue lle_X_fflush(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); GenericValue GV; GV.IntVal = APInt(32, fflush(getFILE(GVTOP(Args[0])))); @@ -631,7 +648,7 @@ } // int getc(FILE *stream); -GenericValue lle_X_getc(FunctionType *M, const vector &Args) { +GenericValue lle_X_getc(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); GenericValue GV; GV.IntVal = APInt(32, getc(getFILE(GVTOP(Args[0])))); @@ -644,7 +661,7 @@ } // int fputc(int C, FILE *stream); -GenericValue lle_X_fputc(FunctionType *M, const vector &Args) { +GenericValue lle_X_fputc(FunctionType *FT, const vector &Args) { assert(Args.size() == 2); GenericValue GV; GV.IntVal = APInt(32, fputc(Args[0].IntVal.getZExtValue(), @@ -653,7 +670,7 @@ } // int ungetc(int C, FILE *stream); -GenericValue lle_X_ungetc(FunctionType *M, const vector &Args) { +GenericValue lle_X_ungetc(FunctionType *FT, const vector &Args) { assert(Args.size() == 2); GenericValue GV; GV.IntVal = APInt(32, ungetc(Args[0].IntVal.getZExtValue(), @@ -662,7 +679,7 @@ } // int ferror (FILE *stream); -GenericValue lle_X_ferror(FunctionType *M, const vector &Args) { +GenericValue lle_X_ferror(FunctionType *FT, const vector &Args) { assert(Args.size() == 1); GenericValue GV; GV.IntVal = APInt(32, ferror (getFILE(GVTOP(Args[0])))); @@ -671,13 +688,13 @@ // int fprintf(FILE *,sbyte *, ...) - a very rough implementation to make output // useful. -GenericValue lle_X_fprintf(FunctionType *M, const vector &Args) { +GenericValue lle_X_fprintf(FunctionType *FT, const vector &Args) { assert(Args.size() >= 2); char Buffer[10000]; vector NewArgs; NewArgs.push_back(PTOGV(Buffer)); NewArgs.insert(NewArgs.end(), Args.begin()+1, Args.end()); - GenericValue GV = lle_X_sprintf(M, NewArgs); + GenericValue GV = lle_X_sprintf(FT, NewArgs); fputs(Buffer, getFILE(GVTOP(Args[0]))); return GV; @@ -694,6 +711,7 @@ FuncNames["lle_X_abort"] = lle_X_abort; FuncNames["lle_X_malloc"] = lle_X_malloc; FuncNames["lle_X_calloc"] = lle_X_calloc; + FuncNames["lle_X_realloc"] = lle_X_realloc; FuncNames["lle_X_free"] = lle_X_free; FuncNames["lle_X_atoi"] = lle_X_atoi; FuncNames["lle_X_pow"] = lle_X_pow; From clattner at apple.com Fri Mar 30 11:45:12 2007 From: clattner at apple.com (Chris Lattner) Date: Fri, 30 Mar 2007 09:45:12 -0700 Subject: [llvm-commits] CVS: llvm/lib/System/Unix/MappedFile.inc In-Reply-To: <460D238D.1010406@jolt-lang.org> References: <200703291911.l2TJBd4H015939@zion.cs.uiuc.edu> <32F42092-09E3-49C7-81EB-EDEFE1197217@apple.com> <460D238D.1010406@jolt-lang.org> Message-ID: <5C716783-0138-465C-AC4C-6435447A6413@apple.com> On Mar 30, 2007, at 7:49 AM, Jeff Cohen wrote: > Chris Lattner wrote: >>> Use the stat information in the Path object, if it is already >>> obtained. This >>> avoids a call to ::fstat by MappedFile when the file size >>> information was >>> already obtained by the Path object. >>> >> >> Interesting approach. The problem is that fstat is significantly >> faster than stat. How about a new Path::getFileStatusFromFD() >> method, which takes an open file descriptor. If the System >> supports it, it can get status information faster by using it, >> otherwise it falls back to getFileStatus (e.g. if win32 doesn't >> have fstat)? >> >> -Chris >> > > It does, but names it _fstat. I'm not sure it's worth the bother > to cache fstat either. stat is slow because it has to look up the > file path. fstat is slow because it's a syscall, meaning you have to cross the userspace/kernel boundary. -Chris From zhousheng00 at gmail.com Fri Mar 30 11:50:45 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Fri, 30 Mar 2007 11:50:45 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Constants.h Message-ID: <200703301650.l2UGojLi019817@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Constants.h updated: 1.142 -> 1.143 --- Log message: Make sure this method just return value equal or less than Limit. --- Diffs of the changes: (+2 -1) Constants.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/include/llvm/Constants.h diff -u llvm/include/llvm/Constants.h:1.142 llvm/include/llvm/Constants.h:1.143 --- llvm/include/llvm/Constants.h:1.142 Fri Mar 30 00:10:59 2007 +++ llvm/include/llvm/Constants.h Fri Mar 30 11:50:28 2007 @@ -187,7 +187,8 @@ /// not greater than 64, otherwise, just return the given uint64_t number. /// @brief Get the constant's value if possible. uint64_t getLimitedValue(uint64_t Limit) { - return (Val.getActiveBits() > 64) ? Limit : Val.getZExtValue(); + return (Val.getActiveBits() > 64 || Val.getZExtValue() > Limit) ? + Limit : Val.getZExtValue(); } /// @returns the value for an integer constant of the given type that has all From zhousheng00 at gmail.com Fri Mar 30 12:20:56 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Fri, 30 Mar 2007 12:20:56 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200703301720.l2UHKuJT020949@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.711 -> 1.712 --- Log message: Make sure the use of ConstantInt::getZExtValue() for shift amount safe. --- Diffs of the changes: (+20 -18) InstructionCombining.cpp | 38 ++++++++++++++++++++------------------ 1 files changed, 20 insertions(+), 18 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.711 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.712 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.711 Fri Mar 30 04:29:48 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Fri Mar 30 12:20:39 2007 @@ -1354,7 +1354,7 @@ } if (ConstantInt *SA = dyn_cast(I->getOperand(1))) { - unsigned ShiftAmt = SA->getZExtValue(); + uint32_t ShiftAmt = SA->getLimitedValue(BitWidth); // Signed shift right. APInt DemandedMaskIn(DemandedMask.shl(ShiftAmt)); @@ -2095,12 +2095,12 @@ // -(X >>u 31) -> (X >>s 31) // -(X >>s 31) -> (X >>u 31) - if (C->isNullValue()) { + if (C->isZero()) { if (BinaryOperator *SI = dyn_cast(Op1)) if (SI->getOpcode() == Instruction::LShr) { if (ConstantInt *CU = dyn_cast(SI->getOperand(1))) { // Check to see if we are shifting out everything but the sign bit. - if (CU->getZExtValue() == + if (CU->getLimitedValue(SI->getType()->getPrimitiveSizeInBits()) == SI->getType()->getPrimitiveSizeInBits()-1) { // Ok, the transformation is safe. Insert AShr. return BinaryOperator::create(Instruction::AShr, @@ -2111,7 +2111,7 @@ else if (SI->getOpcode() == Instruction::AShr) { if (ConstantInt *CU = dyn_cast(SI->getOperand(1))) { // Check to see if we are shifting out everything but the sign bit. - if (CU->getZExtValue() == + if (CU->getLimitedValue(SI->getType()->getPrimitiveSizeInBits()) == SI->getType()->getPrimitiveSizeInBits()-1) { // Ok, the transformation is safe. Insert LShr. return BinaryOperator::createLShr( @@ -4789,7 +4789,8 @@ if (!CanFold) { // To test for the bad case of the signed shr, see if any // of the bits shifted in could be tested after the mask. - int ShAmtVal = Ty->getPrimitiveSizeInBits()-ShAmt->getZExtValue(); + uint32_t TyBits = Ty->getPrimitiveSizeInBits(); + int ShAmtVal = TyBits - ShAmt->getLimitedValue(TyBits); if (ShAmtVal < 0) ShAmtVal = 0; // Out of range shift. uint32_t BitWidth = AndTy->getPrimitiveSizeInBits(); @@ -4883,7 +4884,7 @@ if (LHSI->hasOneUse()) { // Otherwise strength reduce the shift into an and. - unsigned ShAmtVal = (unsigned)ShAmt->getZExtValue(); + uint32_t ShAmtVal = (uint32_t)ShAmt->getLimitedValue(TypeBits); uint64_t Val = (1ULL << (TypeBits-ShAmtVal))-1; Constant *Mask = ConstantInt::get(CI->getType(), Val); @@ -4926,7 +4927,7 @@ } if (LHSI->hasOneUse() || CI->isNullValue()) { - unsigned ShAmtVal = (unsigned)ShAmt->getZExtValue(); + uint32_t ShAmtVal = (uint32_t)ShAmt->getLimitedValue(TypeBits); // Otherwise strength reduce the shift into an and. APInt Val(APInt::getHighBitsSet(TypeBits, TypeBits - ShAmtVal)); @@ -5658,7 +5659,7 @@ BinaryOperator::create(Op0BO->getOpcode(), YS, V1, Op0BO->getOperand(1)->getName()); InsertNewInstBefore(X, I); // (X + (Y << C)) - uint32_t Op1Val = Op1->getZExtValue(); + uint32_t Op1Val = Op1->getLimitedValue(TypeBits); return BinaryOperator::createAnd(X, ConstantInt::get( APInt::getHighBitsSet(TypeBits, TypeBits-Op1Val))); } @@ -5697,7 +5698,7 @@ BinaryOperator::create(Op0BO->getOpcode(), V1, YS, Op0BO->getOperand(0)->getName()); InsertNewInstBefore(X, I); // (X + (Y << C)) - uint32_t Op1Val = Op1->getZExtValue(); + uint32_t Op1Val = Op1->getLimitedValue(TypeBits); return BinaryOperator::createAnd(X, ConstantInt::get( APInt::getHighBitsSet(TypeBits, TypeBits-Op1Val))); } @@ -6084,8 +6085,9 @@ // If we are truncating the result of this SHL, and if it's a shift of a // constant amount, we can always perform a SHL in a smaller type. if (ConstantInt *CI = dyn_cast(I->getOperand(1))) { - if (Ty->getBitWidth() < OrigTy->getBitWidth() && - CI->getZExtValue() < Ty->getBitWidth()) + uint32_t BitWidth = Ty->getBitWidth(); + if (BitWidth < OrigTy->getBitWidth() && + CI->getLimitedValue(BitWidth) < BitWidth) return CanEvaluateInDifferentType(I->getOperand(0), Ty,NumCastsRemoved); } break; @@ -6095,12 +6097,12 @@ // lshr iff we know that the bits we would otherwise be shifting in are // already zeros. if (ConstantInt *CI = dyn_cast(I->getOperand(1))) { - uint32_t BitWidth = OrigTy->getBitWidth(); - if (Ty->getBitWidth() < BitWidth && + uint32_t OrigBitWidth = OrigTy->getBitWidth(); + uint32_t BitWidth = Ty->getBitWidth(); + if (BitWidth < OrigBitWidth && MaskedValueIsZero(I->getOperand(0), - APInt::getAllOnesValue(BitWidth) & - APInt::getAllOnesValue(Ty->getBitWidth()).zextOrTrunc(BitWidth).flip()) - && CI->getZExtValue() < Ty->getBitWidth()) { + APInt::getHighBitsSet(OrigBitWidth, OrigBitWidth-BitWidth)) && + CI->getLimitedValue(BitWidth) < BitWidth) { return CanEvaluateInDifferentType(I->getOperand(0), Ty, NumCastsRemoved); } } @@ -6396,7 +6398,7 @@ // simplifications. if (DestBitSize < SrcBitSize && isa(Op1)) { - unsigned ShiftAmt = cast(Op1)->getZExtValue(); + uint32_t ShiftAmt = cast(Op1)->getLimitedValue(SrcBitSize); if (SrcBitSize > ShiftAmt && SrcBitSize-ShiftAmt >= DestBitSize) { // Insert the new logical shift right. return BinaryOperator::createLShr(Op0, Op1); @@ -6486,7 +6488,7 @@ // We can shrink lshr to something smaller if we know the bits shifted in // are already zeros. if (ConstantInt *ShAmtV = dyn_cast(SrcI->getOperand(1))) { - unsigned ShAmt = ShAmtV->getZExtValue(); + uint32_t ShAmt = ShAmtV->getLimitedValue(SrcBitWidth); // Get a mask for the bits shifting in. APInt Mask(APInt::getLowBitsSet(SrcBitWidth, ShAmt).shl(DestBitWidth)); From scottm at rushg.aero.org Fri Mar 30 13:51:38 2007 From: scottm at rushg.aero.org (Scott Michel) Date: Fri, 30 Mar 2007 11:51:38 -0700 Subject: [llvm-commits] Cleanups in ROTL/ROTR DAG combiner code Message-ID: <20070330185138.GA20770@rush.aero.org> The attached patch contains: - Cleanups in the DAGCombiner.cpp ROTL/ROTR combine code, primarily helping me to fix 80col violations (benefiting the code as a whole). - Detect sign/zext/any-extended versions of ROTL/ROTR patterns. - Allow custom lowering for ROTL/ROTR (needed in the CellSPU's case for 8-bit rotates, when only 16-bit and 32-bit rotates are actually implemented in the instruction set.) -scooter -------------- next part -------------- Index: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp =================================================================== --- lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (.../trunk) (revision 2118) +++ lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (.../branches/llvm-spu) (revision 2118) @@ -2683,10 +2683,24 @@ case ISD::ROTR: Tmp1 = LegalizeOp(Node->getOperand(0)); // LHS Tmp2 = LegalizeOp(Node->getOperand(1)); // RHS - - assert(TLI.isOperationLegal(Node->getOpcode(), Node->getValueType(0)) && - "Cannot handle this yet!"); Result = DAG.UpdateNodeOperands(Result, Tmp1, Tmp2); + switch (TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0))) { + default: + assert(0 && "ROTL/ROTR legalize operation not supported"); + break; + case TargetLowering::Legal: + break; + case TargetLowering::Custom: + Tmp1 = TLI.LowerOperation(Result, DAG); + if (Tmp1.Val) Result = Tmp1; + break; + case TargetLowering::Promote: + assert(0 && "Do not know how to promote ROTL/ROTR"); + break; + case TargetLowering::Expand: + assert(0 && "Do not know how to expand ROTL/ROTR"); + break; + } break; case ISD::BSWAP: Index: lib/CodeGen/SelectionDAG/DAGCombiner.cpp =================================================================== --- lib/CodeGen/SelectionDAG/DAGCombiner.cpp (.../trunk) (revision 2118) +++ lib/CodeGen/SelectionDAG/DAGCombiner.cpp (.../branches/llvm-spu) (revision 2118) @@ -1488,23 +1488,24 @@ } unsigned OpSizeInBits = MVT::getSizeInBits(VT); + SDOperand LHSShiftArg = LHSShift.getOperand(0); + SDOperand LHSShiftAmt = LHSShift.getOperand(1); + SDOperand RHSShiftAmt = RHSShift.getOperand(1); // fold (or (shl x, C1), (srl x, C2)) -> (rotl x, C1) // fold (or (shl x, C1), (srl x, C2)) -> (rotr x, C2) - if (LHSShift.getOperand(1).getOpcode() == ISD::Constant && - RHSShift.getOperand(1).getOpcode() == ISD::Constant) { - uint64_t LShVal = cast(LHSShift.getOperand(1))->getValue(); - uint64_t RShVal = cast(RHSShift.getOperand(1))->getValue(); + if (LHSShiftAmt.getOpcode() == ISD::Constant && + RHSShiftAmt.getOpcode() == ISD::Constant) { + uint64_t LShVal = cast(LHSShiftAmt)->getValue(); + uint64_t RShVal = cast(RHSShiftAmt)->getValue(); if ((LShVal + RShVal) != OpSizeInBits) return 0; SDOperand Rot; if (HasROTL) - Rot = DAG.getNode(ISD::ROTL, VT, LHSShift.getOperand(0), - LHSShift.getOperand(1)); + Rot = DAG.getNode(ISD::ROTL, VT, LHSShiftArg, LHSShiftAmt); else - Rot = DAG.getNode(ISD::ROTR, VT, LHSShift.getOperand(0), - RHSShift.getOperand(1)); + Rot = DAG.getNode(ISD::ROTR, VT, LHSShiftArg, RHSShiftAmt); // If there is an AND of either shifted operand, apply it to the result. if (LHSMask.Val || RHSMask.Val) { @@ -1532,35 +1533,71 @@ // fold (or (shl x, y), (srl x, (sub 32, y))) -> (rotl x, y) // fold (or (shl x, y), (srl x, (sub 32, y))) -> (rotr x, (sub 32, y)) - if (RHSShift.getOperand(1).getOpcode() == ISD::SUB && - LHSShift.getOperand(1) == RHSShift.getOperand(1).getOperand(1)) { + if (RHSShiftAmt.getOpcode() == ISD::SUB && + LHSShiftAmt == RHSShiftAmt.getOperand(1)) { if (ConstantSDNode *SUBC = - dyn_cast(RHSShift.getOperand(1).getOperand(0))) { + dyn_cast(RHSShiftAmt.getOperand(0))) { if (SUBC->getValue() == OpSizeInBits) if (HasROTL) - return DAG.getNode(ISD::ROTL, VT, LHSShift.getOperand(0), - LHSShift.getOperand(1)).Val; + return DAG.getNode(ISD::ROTL, VT, LHSShiftArg, LHSShiftAmt).Val; else - return DAG.getNode(ISD::ROTR, VT, LHSShift.getOperand(0), - LHSShift.getOperand(1)).Val; + return DAG.getNode(ISD::ROTR, VT, LHSShiftArg, LHSShiftAmt).Val; } } // fold (or (shl x, (sub 32, y)), (srl x, r)) -> (rotr x, y) // fold (or (shl x, (sub 32, y)), (srl x, r)) -> (rotl x, (sub 32, y)) - if (LHSShift.getOperand(1).getOpcode() == ISD::SUB && - RHSShift.getOperand(1) == LHSShift.getOperand(1).getOperand(1)) { + if (LHSShiftAmt.getOpcode() == ISD::SUB && + RHSShiftAmt == LHSShiftAmt.getOperand(1)) { if (ConstantSDNode *SUBC = - dyn_cast(LHSShift.getOperand(1).getOperand(0))) { + dyn_cast(LHSShiftAmt.getOperand(0))) { if (SUBC->getValue() == OpSizeInBits) if (HasROTL) - return DAG.getNode(ISD::ROTL, VT, LHSShift.getOperand(0), - LHSShift.getOperand(1)).Val; + return DAG.getNode(ISD::ROTL, VT, LHSShiftArg, LHSShiftAmt).Val; else - return DAG.getNode(ISD::ROTR, VT, LHSShift.getOperand(0), - RHSShift.getOperand(1)).Val; + return DAG.getNode(ISD::ROTR, VT, LHSShiftArg, RHSShiftAmt).Val; } } + + // Look for sign/zext/any-extended cases: + if ((LHSShiftAmt.getOpcode() == ISD::SIGN_EXTEND + || LHSShiftAmt.getOpcode() == ISD::ZERO_EXTEND + || LHSShiftAmt.getOpcode() == ISD::ANY_EXTEND) && + (RHSShiftAmt.getOpcode() == ISD::SIGN_EXTEND + || RHSShiftAmt.getOpcode() == ISD::ZERO_EXTEND + || RHSShiftAmt.getOpcode() == ISD::ANY_EXTEND)) { + SDOperand LHSOp0 = LHSShiftAmt.getOperand(0); + SDOperand RHSOp0 = RHSShiftAmt.getOperand(0); + if (RHSOp0.getOpcode() == ISD::SUB && + RHSOp0.getOperand(1) == LHSOp0) { + // fold (or (shl x, (*ext y)), (srl x, (*ext (sub 32, y)))) -> + // (rotr x, y) + // fold (or (shl x, (*ext y)), (srl x, (*ext (sub 32, y)))) -> + // (rotl x, (sub 32, y)) + if (ConstantSDNode *SUBC = cast(RHSOp0.getOperand(0))) { + if (SUBC->getValue() == OpSizeInBits) { + if (HasROTL) + return DAG.getNode(ISD::ROTL, VT, LHSShiftArg, LHSShiftAmt).Val; + else + return DAG.getNode(ISD::ROTR, VT, LHSShiftArg, RHSShiftAmt).Val; + } + } + } else if (LHSOp0.getOpcode() == ISD::SUB && + RHSOp0 == LHSOp0.getOperand(1)) { + // fold (or (shl x, (*ext (sub 32, y))), (srl x, (*ext r))) -> + // (rotl x, y) + // fold (or (shl x, (*ext (sub 32, y))), (srl x, (*ext r))) -> + // (rotr x, (sub 32, y)) + if (ConstantSDNode *SUBC = cast(LHSOp0.getOperand(0))) { + if (SUBC->getValue() == OpSizeInBits) { + if (HasROTL) + return DAG.getNode(ISD::ROTL, VT, LHSShiftArg, RHSShiftAmt).Val; + else + return DAG.getNode(ISD::ROTL, VT, LHSShiftArg, LHSShiftAmt).Val; + } + } + } + } return 0; } From scottm at rushg.aero.org Fri Mar 30 14:02:56 2007 From: scottm at rushg.aero.org (Scott Michel) Date: Fri, 30 Mar 2007 12:02:56 -0700 Subject: [llvm-commits] Patch resubmit: ROTL/ROTR cleanups Message-ID: <20070330190256.GA23803@rush.aero.org> Spotted what was probably a long-standing bug, since some of my cleanups were simple substitutions. -scooter -------------- next part -------------- Index: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp =================================================================== --- lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (.../trunk) (revision 2119) +++ lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (.../branches/llvm-spu) (revision 2119) @@ -2683,10 +2683,24 @@ case ISD::ROTR: Tmp1 = LegalizeOp(Node->getOperand(0)); // LHS Tmp2 = LegalizeOp(Node->getOperand(1)); // RHS - - assert(TLI.isOperationLegal(Node->getOpcode(), Node->getValueType(0)) && - "Cannot handle this yet!"); Result = DAG.UpdateNodeOperands(Result, Tmp1, Tmp2); + switch (TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0))) { + default: + assert(0 && "ROTL/ROTR legalize operation not supported"); + break; + case TargetLowering::Legal: + break; + case TargetLowering::Custom: + Tmp1 = TLI.LowerOperation(Result, DAG); + if (Tmp1.Val) Result = Tmp1; + break; + case TargetLowering::Promote: + assert(0 && "Do not know how to promote ROTL/ROTR"); + break; + case TargetLowering::Expand: + assert(0 && "Do not know how to expand ROTL/ROTR"); + break; + } break; case ISD::BSWAP: Index: lib/CodeGen/SelectionDAG/DAGCombiner.cpp =================================================================== --- lib/CodeGen/SelectionDAG/DAGCombiner.cpp (.../trunk) (revision 2119) +++ lib/CodeGen/SelectionDAG/DAGCombiner.cpp (.../branches/llvm-spu) (revision 2119) @@ -1488,23 +1488,24 @@ } unsigned OpSizeInBits = MVT::getSizeInBits(VT); + SDOperand LHSShiftArg = LHSShift.getOperand(0); + SDOperand LHSShiftAmt = LHSShift.getOperand(1); + SDOperand RHSShiftAmt = RHSShift.getOperand(1); // fold (or (shl x, C1), (srl x, C2)) -> (rotl x, C1) // fold (or (shl x, C1), (srl x, C2)) -> (rotr x, C2) - if (LHSShift.getOperand(1).getOpcode() == ISD::Constant && - RHSShift.getOperand(1).getOpcode() == ISD::Constant) { - uint64_t LShVal = cast(LHSShift.getOperand(1))->getValue(); - uint64_t RShVal = cast(RHSShift.getOperand(1))->getValue(); + if (LHSShiftAmt.getOpcode() == ISD::Constant && + RHSShiftAmt.getOpcode() == ISD::Constant) { + uint64_t LShVal = cast(LHSShiftAmt)->getValue(); + uint64_t RShVal = cast(RHSShiftAmt)->getValue(); if ((LShVal + RShVal) != OpSizeInBits) return 0; SDOperand Rot; if (HasROTL) - Rot = DAG.getNode(ISD::ROTL, VT, LHSShift.getOperand(0), - LHSShift.getOperand(1)); + Rot = DAG.getNode(ISD::ROTL, VT, LHSShiftArg, LHSShiftAmt); else - Rot = DAG.getNode(ISD::ROTR, VT, LHSShift.getOperand(0), - RHSShift.getOperand(1)); + Rot = DAG.getNode(ISD::ROTR, VT, LHSShiftArg, RHSShiftAmt); // If there is an AND of either shifted operand, apply it to the result. if (LHSMask.Val || RHSMask.Val) { @@ -1532,35 +1533,71 @@ // fold (or (shl x, y), (srl x, (sub 32, y))) -> (rotl x, y) // fold (or (shl x, y), (srl x, (sub 32, y))) -> (rotr x, (sub 32, y)) - if (RHSShift.getOperand(1).getOpcode() == ISD::SUB && - LHSShift.getOperand(1) == RHSShift.getOperand(1).getOperand(1)) { + if (RHSShiftAmt.getOpcode() == ISD::SUB && + LHSShiftAmt == RHSShiftAmt.getOperand(1)) { if (ConstantSDNode *SUBC = - dyn_cast(RHSShift.getOperand(1).getOperand(0))) { + dyn_cast(RHSShiftAmt.getOperand(0))) { if (SUBC->getValue() == OpSizeInBits) if (HasROTL) - return DAG.getNode(ISD::ROTL, VT, LHSShift.getOperand(0), - LHSShift.getOperand(1)).Val; + return DAG.getNode(ISD::ROTL, VT, LHSShiftArg, LHSShiftAmt).Val; else - return DAG.getNode(ISD::ROTR, VT, LHSShift.getOperand(0), - LHSShift.getOperand(1)).Val; + return DAG.getNode(ISD::ROTR, VT, LHSShiftArg, RHSShiftAmt).Val; } } // fold (or (shl x, (sub 32, y)), (srl x, r)) -> (rotr x, y) // fold (or (shl x, (sub 32, y)), (srl x, r)) -> (rotl x, (sub 32, y)) - if (LHSShift.getOperand(1).getOpcode() == ISD::SUB && - RHSShift.getOperand(1) == LHSShift.getOperand(1).getOperand(1)) { + if (LHSShiftAmt.getOpcode() == ISD::SUB && + RHSShiftAmt == LHSShiftAmt.getOperand(1)) { if (ConstantSDNode *SUBC = - dyn_cast(LHSShift.getOperand(1).getOperand(0))) { + dyn_cast(LHSShiftAmt.getOperand(0))) { if (SUBC->getValue() == OpSizeInBits) if (HasROTL) - return DAG.getNode(ISD::ROTL, VT, LHSShift.getOperand(0), - LHSShift.getOperand(1)).Val; + return DAG.getNode(ISD::ROTL, VT, LHSShiftArg, LHSShiftAmt).Val; else - return DAG.getNode(ISD::ROTR, VT, LHSShift.getOperand(0), - RHSShift.getOperand(1)).Val; + return DAG.getNode(ISD::ROTR, VT, LHSShiftArg, RHSShiftAmt).Val; } } + + // Look for sign/zext/any-extended cases: + if ((LHSShiftAmt.getOpcode() == ISD::SIGN_EXTEND + || LHSShiftAmt.getOpcode() == ISD::ZERO_EXTEND + || LHSShiftAmt.getOpcode() == ISD::ANY_EXTEND) && + (RHSShiftAmt.getOpcode() == ISD::SIGN_EXTEND + || RHSShiftAmt.getOpcode() == ISD::ZERO_EXTEND + || RHSShiftAmt.getOpcode() == ISD::ANY_EXTEND)) { + SDOperand LExtOp0 = LHSShiftAmt.getOperand(0); + SDOperand RExtOp0 = RHSShiftAmt.getOperand(0); + if (RExtOp0.getOpcode() == ISD::SUB && + RExtOp0.getOperand(1) == LExtOp0) { + // fold (or (shl x, (*ext y)), (srl x, (*ext (sub 32, y)))) -> + // (rotr x, y) + // fold (or (shl x, (*ext y)), (srl x, (*ext (sub 32, y)))) -> + // (rotl x, (sub 32, y)) + if (ConstantSDNode *SUBC = cast(RExtOp0.getOperand(0))) { + if (SUBC->getValue() == OpSizeInBits) { + if (HasROTL) + return DAG.getNode(ISD::ROTL, VT, LHSShiftArg, LHSShiftAmt).Val; + else + return DAG.getNode(ISD::ROTR, VT, LHSShiftArg, RHSShiftAmt).Val; + } + } + } else if (LExtOp0.getOpcode() == ISD::SUB && + RExtOp0 == LExtOp0.getOperand(1)) { + // fold (or (shl x, (*ext (sub 32, y))), (srl x, (*ext r))) -> + // (rotl x, y) + // fold (or (shl x, (*ext (sub 32, y))), (srl x, (*ext r))) -> + // (rotr x, (sub 32, y)) + if (ConstantSDNode *SUBC = cast(LExtOp0.getOperand(0))) { + if (SUBC->getValue() == OpSizeInBits) { + if (HasROTL) + return DAG.getNode(ISD::ROTL, VT, LHSShiftArg, RHSShiftAmt).Val; + else + return DAG.getNode(ISD::ROTL, VT, LHSShiftArg, LHSShiftAmt).Val; + } + } + } + } return 0; } From evan.cheng at apple.com Fri Mar 30 15:15:40 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 30 Mar 2007 15:15:40 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/2007-03-30-RegScavengerAssert.ll Message-ID: <200703302015.l2UKFeAx024643@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: 2007-03-30-RegScavengerAssert.ll added (r1.1) --- Log message: Test case for PR1279: http://llvm.org/PR1279 (part 2). --- Diffs of the changes: (+101 -0) 2007-03-30-RegScavengerAssert.ll | 101 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 101 insertions(+) Index: llvm/test/CodeGen/ARM/2007-03-30-RegScavengerAssert.ll diff -c /dev/null llvm/test/CodeGen/ARM/2007-03-30-RegScavengerAssert.ll:1.1 *** /dev/null Fri Mar 30 15:15:33 2007 --- llvm/test/CodeGen/ARM/2007-03-30-RegScavengerAssert.ll Fri Mar 30 15:15:22 2007 *************** *** 0 **** --- 1,101 ---- + ; RUN: llvm-as < %s | llc -march=arm -mtriple=arm-linux-gnueabi + ; PR1279 + + %struct.CUMULATIVE_ARGS = type { i32, i32, i32, i32, i32, i32 } + %struct.arm_stack_offsets = type { i32, i32, i32, i32, i32 } + %struct.eh_status = type opaque + %struct.emit_status = type { i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack*, i32, %struct.location_t, i32, i8*, %struct.rtx_def** } + %struct.expr_status = type { i32, i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def* } + %struct.function = type { %struct.eh_status*, %struct.expr_status*, %struct.emit_status*, %struct.varasm_status*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.function*, i32, i32, i32, i32, %struct.rtx_def*, %struct.CUMULATIVE_ARGS, %struct.rtx_def*, %struct.rtx_def*, %struct.initial_value_struct*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, i8, i32, i64, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, %struct.varray_head_tag*, %struct.temp_slot*, i32, %struct.var_refs_queue*, i32, i32, %struct.rtvec_def*, %struct.tree_node*, i32, i32, i32, %struct.machine_function*, i32, i32, i8, i8, %struct.language_function*, %struct.rtx_def*, i32, i32, i32, i32, %struct.location_t, %struct.varray_head_tag*, %struct.tree_node*, i8, i8, i8 } + %struct.initial_value_struct = type opaque + %struct.lang_decl = type opaque + %struct.language_function = type opaque + %struct.location_t = type { i8*, i32 } + %struct.machine_function = type { %struct.rtx_def*, i32, i32, i32, %struct.arm_stack_offsets, i32, i32, i32, [14 x %struct.rtx_def*] } + %struct.rtvec_def = type { i32, [1 x %struct.rtx_def*] } + %struct.rtx_def = type { i16, i8, i8, %struct.u } + %struct.sequence_stack = type { %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack* } + %struct.temp_slot = type opaque + %struct.tree_common = type { %struct.tree_node*, %struct.tree_node*, %union.tree_ann_d*, i8, i8, i8, i8, i8 } + %struct.tree_decl = type { %struct.tree_common, %struct.location_t, i32, %struct.tree_node*, i8, i8, i8, i8, i8, i8, i8, i8, i32, %struct.tree_decl_u1, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, i32, %struct.tree_decl_u2, %struct.tree_node*, %struct.tree_node*, i64, %struct.lang_decl* } + %struct.tree_decl_u1 = type { i64 } + %struct.tree_decl_u2 = type { %struct.function* } + %struct.tree_node = type { %struct.tree_decl } + %struct.u = type { [1 x i64] } + %struct.var_refs_queue = type { %struct.rtx_def*, i32, i32, %struct.var_refs_queue* } + %struct.varasm_status = type opaque + %struct.varray_head_tag = type { i32, i32, i32, i8*, %struct.u } + %union.tree_ann_d = type opaque + @str469 = external global [42 x i8] ; <[42 x i8]*> [#uses=0] + @__FUNCTION__.24265 = external global [19 x i8] ; <[19 x i8]*> [#uses=0] + + declare void @fancy_abort() + + define fastcc void @fold_builtin_bitop() { + entry: + br i1 false, label %cond_true105, label %UnifiedReturnBlock + + cond_true105: ; preds = %entry + br i1 false, label %cond_true134, label %UnifiedReturnBlock + + cond_true134: ; preds = %cond_true105 + switch i32 0, label %bb479 [ + i32 378, label %bb313 + i32 380, label %bb313 + i32 381, label %bb313 + i32 383, label %bb366 + i32 385, label %bb366 + i32 386, label %bb366 + i32 403, label %bb250 + i32 405, label %bb250 + i32 406, label %bb250 + i32 434, label %bb464 + i32 436, label %bb464 + i32 437, label %bb464 + i32 438, label %bb441 + i32 440, label %bb441 + i32 441, label %bb441 + ] + + bb250: ; preds = %cond_true134, %cond_true134, %cond_true134 + ret void + + bb313: ; preds = %cond_true134, %cond_true134, %cond_true134 + ret void + + bb366: ; preds = %cond_true134, %cond_true134, %cond_true134 + ret void + + bb441: ; preds = %cond_true134, %cond_true134, %cond_true134 + ret void + + bb457: ; preds = %bb464, %bb457 + %tmp459 = add i64 0, 1 ; [#uses=1] + br i1 false, label %bb474.preheader, label %bb457 + + bb464: ; preds = %cond_true134, %cond_true134, %cond_true134 + br i1 false, label %bb474.preheader, label %bb457 + + bb474.preheader: ; preds = %bb464, %bb457 + %result.5.ph = phi i64 [ 0, %bb464 ], [ %tmp459, %bb457 ] ; [#uses=1] + br label %bb474 + + bb467: ; preds = %bb474 + %indvar.next586 = add i64 %indvar585, 1 ; [#uses=1] + br label %bb474 + + bb474: ; preds = %bb467, %bb474.preheader + %indvar585 = phi i64 [ 0, %bb474.preheader ], [ %indvar.next586, %bb467 ] ; [#uses=2] + br i1 false, label %bb476, label %bb467 + + bb476: ; preds = %bb474 + %result.5 = add i64 %indvar585, %result.5.ph ; [#uses=0] + ret void + + bb479: ; preds = %cond_true134 + tail call void @fancy_abort( ) + unreachable + + UnifiedReturnBlock: ; preds = %cond_true105, %entry + ret void + } From evan.cheng at apple.com Fri Mar 30 15:18:52 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 30 Mar 2007 15:18:52 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <200703302018.l2UKIqLa024706@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.230 -> 1.231 --- Log message: Bug fix for PR1279: http://llvm.org/PR1279 . When isDead is propagate by copy coalescing, we keep length of dead def live interval at 1 to avoid multiple def's targeting the same register. The previous patch missed a case where the source operand is live-in. In that case, remove the whole interval. --- Diffs of the changes: (+10 -5) LiveIntervalAnalysis.cpp | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.230 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.231 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.230 Wed Mar 28 03:26:40 2007 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Fri Mar 30 15:18:35 2007 @@ -915,6 +915,7 @@ // Check if it is necessary to propagate "isDead" property before intervals // are joined. + MachineBasicBlock *CopyBB = CopyMI->getParent(); MachineOperand *mopd = CopyMI->findRegisterDefOperand(DstReg); bool isDead = mopd->isDead(); bool isShorten = false; @@ -941,9 +942,15 @@ isShorten = true; RemoveStart = getDefIndex(getInstructionIndex(LastUse)); RemoveEnd = SrcEnd; - } else if (RemoveStart > 0) - // A dead def should have a single cycle interval. - ++RemoveStart; + } else { + MachineInstr *SrcMI = getInstructionFromIndex(SrcStart); + if (SrcMI) { + MachineOperand *mops = SrcMI->findRegisterDefOperand(SrcReg); + if (mops) + // A dead def should have a single cycle interval. + ++RemoveStart; + } + } } } @@ -959,7 +966,6 @@ LiveVariables::VarInfo& dvi = lv_->getVarInfo(repDstReg); // Is the value used in the current BB or any immediate successroe BB? - MachineBasicBlock *CopyBB = CopyMI->getParent(); if (dvi.UsedBlocks[CopyBB->getNumber()]) goto TryJoin; for (MachineBasicBlock::succ_iterator SI = CopyBB->succ_begin(), @@ -1018,7 +1024,6 @@ if (SrcMI) { MachineOperand *mops = SrcMI->findRegisterDefOperand(SrcReg); if (mops) - // FIXME: mops == NULL means SrcMI defines a subregister? mops->setIsDead(); } } From evan.cheng at apple.com Fri Mar 30 15:21:52 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 30 Mar 2007 15:21:52 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/VirtRegMap.cpp Message-ID: <200703302021.l2UKLqZ5024811@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: VirtRegMap.cpp updated: 1.107 -> 1.108 --- Log message: Don't add the same MI to register reuse "last def/use" twice if it reads the register more than once. --- Diffs of the changes: (+4 -1) VirtRegMap.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/VirtRegMap.cpp diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.107 llvm/lib/CodeGen/VirtRegMap.cpp:1.108 --- llvm/lib/CodeGen/VirtRegMap.cpp:1.107 Mon Mar 26 19:48:28 2007 +++ llvm/lib/CodeGen/VirtRegMap.cpp Fri Mar 30 15:21:35 2007 @@ -316,7 +316,9 @@ assert(II != SpillSlotsAvailable.end() && "Slot not available!"); unsigned Val = II->second.first; assert((Val >> 1) == PhysReg && "Bidirectional map mismatch!"); - II->second.second.push_back(Use); + // This can be true if there are multiple uses of the same register. + if (II->second.second.back() != Use) + II->second.second.push_back(Use); } } @@ -1117,6 +1119,7 @@ if (TII->isMoveInstr(MI, Src, Dst) && Src == Dst) { ++NumDCE; DOUT << "Removing now-noop copy: " << MI; + Spills.removeLastUse(Src, &MI); MBB.erase(&MI); VRM.RemoveFromFoldedVirtMap(&MI); goto ProcessNextInst; From sabre at nondot.org Fri Mar 30 15:32:00 2007 From: sabre at nondot.org (Chris Lattner) Date: Fri, 30 Mar 2007 15:32:00 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/lame.c Message-ID: <200703302032.l2UKW0pG025064@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame: lame.c updated: 1.2 -> 1.3 --- Log message: fix compilation on darwin --- Diffs of the changes: (+2 -0) lame.c | 2 ++ 1 files changed, 2 insertions(+) Index: llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/lame.c diff -u llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/lame.c:1.2 llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/lame.c:1.3 --- llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/lame.c:1.2 Thu Mar 29 11:53:54 2007 +++ llvm-test/MultiSource/Benchmarks/MiBench/consumer-lame/lame.c Fri Mar 30 15:31:43 2007 @@ -1199,6 +1199,7 @@ /* * Disable floating point exepctions */ +#ifdef __FreeBSD__ { /* seet floating point mask to the Linux default */ fp_except_t mask; @@ -1207,6 +1208,7 @@ fpsetmask(mask & ~(FP_X_INV|FP_X_DZ)); /* fprintf(stderr,"FreeBSD mask is 0x%x\n",mask); */ } +#endif #if defined(__riscos__) && !defined(ABORTFP) /* Disable FPE's under RISC OS */ /* if bit is set, we disable trapping that error! */ From evan.cheng at apple.com Fri Mar 30 15:41:35 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 30 Mar 2007 15:41:35 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/PowerPC/2007-03-30-SpillerCrash.ll Message-ID: <200703302041.l2UKfZ98025276@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/PowerPC: 2007-03-30-SpillerCrash.ll added (r1.1) --- Log message: New test case. --- Diffs of the changes: (+1801 -0) 2007-03-30-SpillerCrash.ll | 1801 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 1801 insertions(+) Index: llvm/test/CodeGen/PowerPC/2007-03-30-SpillerCrash.ll diff -c /dev/null llvm/test/CodeGen/PowerPC/2007-03-30-SpillerCrash.ll:1.1 *** /dev/null Fri Mar 30 15:41:28 2007 --- llvm/test/CodeGen/PowerPC/2007-03-30-SpillerCrash.ll Fri Mar 30 15:41:18 2007 *************** *** 0 **** --- 1,1801 ---- + ; RUN: llvm-as < %s | llc -march=ppc32 -mcpu=g5 + + define void @test(<4 x float>*, { { i16, i16, i32 } }*) { + xOperationInitMasks.exit: + %.sub7896 = getelementptr [4 x <4 x i32>]* null, i32 0, i32 0 ; <<4 x i32>*> [#uses=24] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 175, i32 3 ; <<4 x float>*>:2 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 174, i32 2 ; <<4 x float>*>:3 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 174, i32 3 ; <<4 x float>*>:4 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 173, i32 1 ; <<4 x float>*>:5 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 173, i32 2 ; <<4 x float>*>:6 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 173, i32 3 ; <<4 x float>*>:7 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 172, i32 1 ; <<4 x float>*>:8 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 172, i32 2 ; <<4 x float>*>:9 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 172, i32 3 ; <<4 x float>*>:10 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 171, i32 1 ; <<4 x float>*>:11 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 171, i32 2 ; <<4 x float>*>:12 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 171, i32 3 ; <<4 x float>*>:13 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 170, i32 1 ; <<4 x float>*>:14 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 170, i32 2 ; <<4 x float>*>:15 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 170, i32 3 ; <<4 x float>*>:16 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 169, i32 1 ; <<4 x float>*>:17 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 169, i32 2 ; <<4 x float>*>:18 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 169, i32 3 ; <<4 x float>*>:19 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 168, i32 1 ; <<4 x float>*>:20 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 168, i32 2 ; <<4 x float>*>:21 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 168, i32 3 ; <<4 x float>*>:22 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 167, i32 1 ; <<4 x float>*>:23 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 167, i32 2 ; <<4 x float>*>:24 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 167, i32 3 ; <<4 x float>*>:25 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 166, i32 1 ; <<4 x float>*>:26 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 166, i32 2 ; <<4 x float>*>:27 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 166, i32 3 ; <<4 x float>*>:28 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 165, i32 1 ; <<4 x float>*>:29 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 165, i32 2 ; <<4 x float>*>:30 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 165, i32 3 ; <<4 x float>*>:31 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 164, i32 1 ; <<4 x float>*>:32 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 164, i32 2 ; <<4 x float>*>:33 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 164, i32 3 ; <<4 x float>*>:34 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 163, i32 1 ; <<4 x float>*>:35 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 163, i32 2 ; <<4 x float>*>:36 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 163, i32 3 ; <<4 x float>*>:37 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 162, i32 1 ; <<4 x float>*>:38 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 162, i32 2 ; <<4 x float>*>:39 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 162, i32 3 ; <<4 x float>*>:40 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 161, i32 1 ; <<4 x float>*>:41 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 161, i32 2 ; <<4 x float>*>:42 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 161, i32 3 ; <<4 x float>*>:43 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 160, i32 1 ; <<4 x float>*>:44 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 160, i32 2 ; <<4 x float>*>:45 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 160, i32 3 ; <<4 x float>*>:46 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 159, i32 1 ; <<4 x float>*>:47 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 159, i32 2 ; <<4 x float>*>:48 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 159, i32 3 ; <<4 x float>*>:49 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 158, i32 1 ; <<4 x float>*>:50 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 158, i32 2 ; <<4 x float>*>:51 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 158, i32 3 ; <<4 x float>*>:52 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 157, i32 1 ; <<4 x float>*>:53 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 157, i32 2 ; <<4 x float>*>:54 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 157, i32 3 ; <<4 x float>*>:55 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 156, i32 1 ; <<4 x float>*>:56 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 156, i32 2 ; <<4 x float>*>:57 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 156, i32 3 ; <<4 x float>*>:58 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 155, i32 1 ; <<4 x float>*>:59 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 155, i32 2 ; <<4 x float>*>:60 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 155, i32 3 ; <<4 x float>*>:61 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 154, i32 1 ; <<4 x float>*>:62 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 154, i32 2 ; <<4 x float>*>:63 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 154, i32 3 ; <<4 x float>*>:64 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 153, i32 1 ; <<4 x float>*>:65 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 153, i32 2 ; <<4 x float>*>:66 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 153, i32 3 ; <<4 x float>*>:67 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 152, i32 1 ; <<4 x float>*>:68 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 152, i32 2 ; <<4 x float>*>:69 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 152, i32 3 ; <<4 x float>*>:70 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 151, i32 1 ; <<4 x float>*>:71 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 151, i32 2 ; <<4 x float>*>:72 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 151, i32 3 ; <<4 x float>*>:73 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 150, i32 1 ; <<4 x float>*>:74 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 150, i32 2 ; <<4 x float>*>:75 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 150, i32 3 ; <<4 x float>*>:76 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 149, i32 1 ; <<4 x float>*>:77 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 149, i32 2 ; <<4 x float>*>:78 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 149, i32 3 ; <<4 x float>*>:79 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 148, i32 1 ; <<4 x float>*>:80 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 148, i32 2 ; <<4 x float>*>:81 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 148, i32 3 ; <<4 x float>*>:82 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 147, i32 1 ; <<4 x float>*>:83 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 147, i32 2 ; <<4 x float>*>:84 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 147, i32 3 ; <<4 x float>*>:85 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 146, i32 1 ; <<4 x float>*>:86 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 146, i32 2 ; <<4 x float>*>:87 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 146, i32 3 ; <<4 x float>*>:88 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 145, i32 1 ; <<4 x float>*>:89 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 145, i32 2 ; <<4 x float>*>:90 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 145, i32 3 ; <<4 x float>*>:91 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 144, i32 1 ; <<4 x float>*>:92 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 144, i32 2 ; <<4 x float>*>:93 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 144, i32 3 ; <<4 x float>*>:94 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 143, i32 1 ; <<4 x float>*>:95 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 143, i32 2 ; <<4 x float>*>:96 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 143, i32 3 ; <<4 x float>*>:97 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 142, i32 1 ; <<4 x float>*>:98 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 142, i32 2 ; <<4 x float>*>:99 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 142, i32 3 ; <<4 x float>*>:100 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 141, i32 1 ; <<4 x float>*>:101 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 141, i32 2 ; <<4 x float>*>:102 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 141, i32 3 ; <<4 x float>*>:103 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 140, i32 1 ; <<4 x float>*>:104 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 140, i32 2 ; <<4 x float>*>:105 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 140, i32 3 ; <<4 x float>*>:106 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 139, i32 1 ; <<4 x float>*>:107 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 139, i32 2 ; <<4 x float>*>:108 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 139, i32 3 ; <<4 x float>*>:109 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 138, i32 1 ; <<4 x float>*>:110 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 138, i32 2 ; <<4 x float>*>:111 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 138, i32 3 ; <<4 x float>*>:112 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 137, i32 1 ; <<4 x float>*>:113 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 137, i32 2 ; <<4 x float>*>:114 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 137, i32 3 ; <<4 x float>*>:115 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 136, i32 1 ; <<4 x float>*>:116 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 136, i32 2 ; <<4 x float>*>:117 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 136, i32 3 ; <<4 x float>*>:118 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 135, i32 1 ; <<4 x float>*>:119 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 135, i32 2 ; <<4 x float>*>:120 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 135, i32 3 ; <<4 x float>*>:121 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 134, i32 1 ; <<4 x float>*>:122 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 134, i32 2 ; <<4 x float>*>:123 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 134, i32 3 ; <<4 x float>*>:124 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 133, i32 1 ; <<4 x float>*>:125 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 133, i32 2 ; <<4 x float>*>:126 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 133, i32 3 ; <<4 x float>*>:127 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 132, i32 1 ; <<4 x float>*>:128 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 132, i32 2 ; <<4 x float>*>:129 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 132, i32 3 ; <<4 x float>*>:130 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 131, i32 1 ; <<4 x float>*>:131 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 131, i32 2 ; <<4 x float>*>:132 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 131, i32 3 ; <<4 x float>*>:133 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 130, i32 1 ; <<4 x float>*>:134 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 130, i32 2 ; <<4 x float>*>:135 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 130, i32 3 ; <<4 x float>*>:136 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 129, i32 1 ; <<4 x float>*>:137 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 129, i32 2 ; <<4 x float>*>:138 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 129, i32 3 ; <<4 x float>*>:139 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 128, i32 1 ; <<4 x float>*>:140 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 128, i32 2 ; <<4 x float>*>:141 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 128, i32 3 ; <<4 x float>*>:142 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 127, i32 1 ; <<4 x float>*>:143 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 127, i32 2 ; <<4 x float>*>:144 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 127, i32 3 ; <<4 x float>*>:145 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 126, i32 1 ; <<4 x float>*>:146 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 126, i32 2 ; <<4 x float>*>:147 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 126, i32 3 ; <<4 x float>*>:148 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 125, i32 1 ; <<4 x float>*>:149 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 125, i32 2 ; <<4 x float>*>:150 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 125, i32 3 ; <<4 x float>*>:151 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 124, i32 1 ; <<4 x float>*>:152 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 124, i32 2 ; <<4 x float>*>:153 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 124, i32 3 ; <<4 x float>*>:154 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 123, i32 1 ; <<4 x float>*>:155 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 123, i32 2 ; <<4 x float>*>:156 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 123, i32 3 ; <<4 x float>*>:157 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 122, i32 1 ; <<4 x float>*>:158 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 122, i32 2 ; <<4 x float>*>:159 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 122, i32 3 ; <<4 x float>*>:160 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 121, i32 1 ; <<4 x float>*>:161 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 121, i32 2 ; <<4 x float>*>:162 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 121, i32 3 ; <<4 x float>*>:163 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 120, i32 1 ; <<4 x float>*>:164 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 120, i32 2 ; <<4 x float>*>:165 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 120, i32 3 ; <<4 x float>*>:166 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 119, i32 1 ; <<4 x float>*>:167 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 119, i32 2 ; <<4 x float>*>:168 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 119, i32 3 ; <<4 x float>*>:169 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 118, i32 1 ; <<4 x float>*>:170 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 118, i32 2 ; <<4 x float>*>:171 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 118, i32 3 ; <<4 x float>*>:172 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 117, i32 1 ; <<4 x float>*>:173 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 117, i32 2 ; <<4 x float>*>:174 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 117, i32 3 ; <<4 x float>*>:175 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 116, i32 1 ; <<4 x float>*>:176 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 116, i32 2 ; <<4 x float>*>:177 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 116, i32 3 ; <<4 x float>*>:178 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 115, i32 1 ; <<4 x float>*>:179 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 115, i32 2 ; <<4 x float>*>:180 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 115, i32 3 ; <<4 x float>*>:181 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 114, i32 1 ; <<4 x float>*>:182 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 114, i32 2 ; <<4 x float>*>:183 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 114, i32 3 ; <<4 x float>*>:184 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 113, i32 1 ; <<4 x float>*>:185 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 113, i32 2 ; <<4 x float>*>:186 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 113, i32 3 ; <<4 x float>*>:187 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 112, i32 1 ; <<4 x float>*>:188 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 112, i32 2 ; <<4 x float>*>:189 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 112, i32 3 ; <<4 x float>*>:190 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 111, i32 1 ; <<4 x float>*>:191 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 111, i32 2 ; <<4 x float>*>:192 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 111, i32 3 ; <<4 x float>*>:193 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 110, i32 1 ; <<4 x float>*>:194 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 110, i32 2 ; <<4 x float>*>:195 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 110, i32 3 ; <<4 x float>*>:196 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 109, i32 1 ; <<4 x float>*>:197 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 109, i32 2 ; <<4 x float>*>:198 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 109, i32 3 ; <<4 x float>*>:199 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 108, i32 1 ; <<4 x float>*>:200 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 108, i32 2 ; <<4 x float>*>:201 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 108, i32 3 ; <<4 x float>*>:202 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 107, i32 1 ; <<4 x float>*>:203 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 107, i32 2 ; <<4 x float>*>:204 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 107, i32 3 ; <<4 x float>*>:205 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 106, i32 1 ; <<4 x float>*>:206 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 106, i32 2 ; <<4 x float>*>:207 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 106, i32 3 ; <<4 x float>*>:208 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 105, i32 1 ; <<4 x float>*>:209 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 105, i32 2 ; <<4 x float>*>:210 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 105, i32 3 ; <<4 x float>*>:211 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 104, i32 1 ; <<4 x float>*>:212 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 104, i32 2 ; <<4 x float>*>:213 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 104, i32 3 ; <<4 x float>*>:214 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 103, i32 1 ; <<4 x float>*>:215 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 103, i32 2 ; <<4 x float>*>:216 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 103, i32 3 ; <<4 x float>*>:217 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 102, i32 1 ; <<4 x float>*>:218 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 102, i32 2 ; <<4 x float>*>:219 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 102, i32 3 ; <<4 x float>*>:220 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 101, i32 1 ; <<4 x float>*>:221 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 101, i32 2 ; <<4 x float>*>:222 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 101, i32 3 ; <<4 x float>*>:223 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 100, i32 1 ; <<4 x float>*>:224 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 100, i32 2 ; <<4 x float>*>:225 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 100, i32 3 ; <<4 x float>*>:226 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 99, i32 1 ; <<4 x float>*>:227 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 99, i32 2 ; <<4 x float>*>:228 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 99, i32 3 ; <<4 x float>*>:229 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 98, i32 1 ; <<4 x float>*>:230 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 98, i32 2 ; <<4 x float>*>:231 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 98, i32 3 ; <<4 x float>*>:232 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 97, i32 1 ; <<4 x float>*>:233 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 97, i32 2 ; <<4 x float>*>:234 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 97, i32 3 ; <<4 x float>*>:235 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 96, i32 1 ; <<4 x float>*>:236 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 96, i32 2 ; <<4 x float>*>:237 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 96, i32 3 ; <<4 x float>*>:238 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 95, i32 1 ; <<4 x float>*>:239 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 95, i32 2 ; <<4 x float>*>:240 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 95, i32 3 ; <<4 x float>*>:241 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 94, i32 1 ; <<4 x float>*>:242 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 94, i32 2 ; <<4 x float>*>:243 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 94, i32 3 ; <<4 x float>*>:244 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 93, i32 1 ; <<4 x float>*>:245 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 93, i32 2 ; <<4 x float>*>:246 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 93, i32 3 ; <<4 x float>*>:247 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 92, i32 1 ; <<4 x float>*>:248 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 92, i32 2 ; <<4 x float>*>:249 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 92, i32 3 ; <<4 x float>*>:250 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 91, i32 1 ; <<4 x float>*>:251 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 91, i32 2 ; <<4 x float>*>:252 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 91, i32 3 ; <<4 x float>*>:253 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 90, i32 1 ; <<4 x float>*>:254 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 90, i32 2 ; <<4 x float>*>:255 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 90, i32 3 ; <<4 x float>*>:256 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 89, i32 1 ; <<4 x float>*>:257 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 89, i32 2 ; <<4 x float>*>:258 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 89, i32 3 ; <<4 x float>*>:259 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 88, i32 1 ; <<4 x float>*>:260 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 88, i32 2 ; <<4 x float>*>:261 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 88, i32 3 ; <<4 x float>*>:262 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 87, i32 1 ; <<4 x float>*>:263 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 87, i32 2 ; <<4 x float>*>:264 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 87, i32 3 ; <<4 x float>*>:265 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 86, i32 1 ; <<4 x float>*>:266 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 86, i32 2 ; <<4 x float>*>:267 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 86, i32 3 ; <<4 x float>*>:268 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 85, i32 1 ; <<4 x float>*>:269 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 85, i32 2 ; <<4 x float>*>:270 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 85, i32 3 ; <<4 x float>*>:271 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 84, i32 1 ; <<4 x float>*>:272 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 84, i32 2 ; <<4 x float>*>:273 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 84, i32 3 ; <<4 x float>*>:274 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 83, i32 1 ; <<4 x float>*>:275 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 83, i32 2 ; <<4 x float>*>:276 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 83, i32 3 ; <<4 x float>*>:277 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 82, i32 1 ; <<4 x float>*>:278 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 82, i32 2 ; <<4 x float>*>:279 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 82, i32 3 ; <<4 x float>*>:280 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 81, i32 1 ; <<4 x float>*>:281 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 81, i32 2 ; <<4 x float>*>:282 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 81, i32 3 ; <<4 x float>*>:283 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 80, i32 1 ; <<4 x float>*>:284 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 80, i32 2 ; <<4 x float>*>:285 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 80, i32 3 ; <<4 x float>*>:286 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 79, i32 1 ; <<4 x float>*>:287 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 79, i32 2 ; <<4 x float>*>:288 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 79, i32 3 ; <<4 x float>*>:289 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 78, i32 1 ; <<4 x float>*>:290 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 78, i32 2 ; <<4 x float>*>:291 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 78, i32 3 ; <<4 x float>*>:292 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 77, i32 1 ; <<4 x float>*>:293 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 77, i32 2 ; <<4 x float>*>:294 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 77, i32 3 ; <<4 x float>*>:295 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 76, i32 1 ; <<4 x float>*>:296 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 76, i32 2 ; <<4 x float>*>:297 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 76, i32 3 ; <<4 x float>*>:298 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 75, i32 1 ; <<4 x float>*>:299 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 75, i32 2 ; <<4 x float>*>:300 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 75, i32 3 ; <<4 x float>*>:301 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 74, i32 1 ; <<4 x float>*>:302 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 74, i32 2 ; <<4 x float>*>:303 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 74, i32 3 ; <<4 x float>*>:304 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 73, i32 1 ; <<4 x float>*>:305 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 73, i32 2 ; <<4 x float>*>:306 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 73, i32 3 ; <<4 x float>*>:307 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 72, i32 1 ; <<4 x float>*>:308 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 72, i32 2 ; <<4 x float>*>:309 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 72, i32 3 ; <<4 x float>*>:310 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 71, i32 1 ; <<4 x float>*>:311 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 71, i32 2 ; <<4 x float>*>:312 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 71, i32 3 ; <<4 x float>*>:313 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 70, i32 1 ; <<4 x float>*>:314 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 70, i32 2 ; <<4 x float>*>:315 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 70, i32 3 ; <<4 x float>*>:316 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 69, i32 1 ; <<4 x float>*>:317 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 69, i32 2 ; <<4 x float>*>:318 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 69, i32 3 ; <<4 x float>*>:319 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 68, i32 1 ; <<4 x float>*>:320 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 68, i32 2 ; <<4 x float>*>:321 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 68, i32 3 ; <<4 x float>*>:322 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 67, i32 1 ; <<4 x float>*>:323 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 67, i32 2 ; <<4 x float>*>:324 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 67, i32 3 ; <<4 x float>*>:325 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 66, i32 1 ; <<4 x float>*>:326 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 66, i32 2 ; <<4 x float>*>:327 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 66, i32 3 ; <<4 x float>*>:328 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 65, i32 1 ; <<4 x float>*>:329 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 65, i32 2 ; <<4 x float>*>:330 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 65, i32 3 ; <<4 x float>*>:331 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 64, i32 1 ; <<4 x float>*>:332 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 64, i32 2 ; <<4 x float>*>:333 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 64, i32 3 ; <<4 x float>*>:334 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 63, i32 1 ; <<4 x float>*>:335 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 63, i32 2 ; <<4 x float>*>:336 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 63, i32 3 ; <<4 x float>*>:337 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 62, i32 1 ; <<4 x float>*>:338 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 62, i32 2 ; <<4 x float>*>:339 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 62, i32 3 ; <<4 x float>*>:340 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 61, i32 1 ; <<4 x float>*>:341 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 61, i32 2 ; <<4 x float>*>:342 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 61, i32 3 ; <<4 x float>*>:343 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 60, i32 1 ; <<4 x float>*>:344 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 60, i32 2 ; <<4 x float>*>:345 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 60, i32 3 ; <<4 x float>*>:346 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 59, i32 1 ; <<4 x float>*>:347 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 59, i32 2 ; <<4 x float>*>:348 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 59, i32 3 ; <<4 x float>*>:349 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 58, i32 1 ; <<4 x float>*>:350 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 58, i32 2 ; <<4 x float>*>:351 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 58, i32 3 ; <<4 x float>*>:352 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 57, i32 1 ; <<4 x float>*>:353 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 57, i32 2 ; <<4 x float>*>:354 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 57, i32 3 ; <<4 x float>*>:355 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 56, i32 1 ; <<4 x float>*>:356 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 56, i32 2 ; <<4 x float>*>:357 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 56, i32 3 ; <<4 x float>*>:358 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 55, i32 1 ; <<4 x float>*>:359 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 55, i32 2 ; <<4 x float>*>:360 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 55, i32 3 ; <<4 x float>*>:361 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 54, i32 1 ; <<4 x float>*>:362 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 54, i32 2 ; <<4 x float>*>:363 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 54, i32 3 ; <<4 x float>*>:364 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 53, i32 1 ; <<4 x float>*>:365 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 53, i32 2 ; <<4 x float>*>:366 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 53, i32 3 ; <<4 x float>*>:367 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 52, i32 1 ; <<4 x float>*>:368 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 52, i32 2 ; <<4 x float>*>:369 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 52, i32 3 ; <<4 x float>*>:370 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 51, i32 1 ; <<4 x float>*>:371 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 51, i32 2 ; <<4 x float>*>:372 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 51, i32 3 ; <<4 x float>*>:373 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 50, i32 1 ; <<4 x float>*>:374 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 50, i32 2 ; <<4 x float>*>:375 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 50, i32 3 ; <<4 x float>*>:376 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 49, i32 1 ; <<4 x float>*>:377 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 49, i32 2 ; <<4 x float>*>:378 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 49, i32 3 ; <<4 x float>*>:379 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 48, i32 1 ; <<4 x float>*>:380 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 48, i32 2 ; <<4 x float>*>:381 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 48, i32 3 ; <<4 x float>*>:382 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 47, i32 1 ; <<4 x float>*>:383 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 47, i32 2 ; <<4 x float>*>:384 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 47, i32 3 ; <<4 x float>*>:385 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 46, i32 1 ; <<4 x float>*>:386 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 46, i32 2 ; <<4 x float>*>:387 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 46, i32 3 ; <<4 x float>*>:388 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 45, i32 1 ; <<4 x float>*>:389 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 45, i32 2 ; <<4 x float>*>:390 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 45, i32 3 ; <<4 x float>*>:391 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 44, i32 1 ; <<4 x float>*>:392 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 44, i32 2 ; <<4 x float>*>:393 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 44, i32 3 ; <<4 x float>*>:394 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 43, i32 1 ; <<4 x float>*>:395 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 43, i32 2 ; <<4 x float>*>:396 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 43, i32 3 ; <<4 x float>*>:397 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 42, i32 1 ; <<4 x float>*>:398 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 42, i32 2 ; <<4 x float>*>:399 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 42, i32 3 ; <<4 x float>*>:400 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 41, i32 1 ; <<4 x float>*>:401 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 41, i32 2 ; <<4 x float>*>:402 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 41, i32 3 ; <<4 x float>*>:403 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 40, i32 1 ; <<4 x float>*>:404 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 40, i32 2 ; <<4 x float>*>:405 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 40, i32 3 ; <<4 x float>*>:406 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 39, i32 1 ; <<4 x float>*>:407 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 39, i32 2 ; <<4 x float>*>:408 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 39, i32 3 ; <<4 x float>*>:409 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 38, i32 1 ; <<4 x float>*>:410 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 38, i32 2 ; <<4 x float>*>:411 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 38, i32 3 ; <<4 x float>*>:412 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 37, i32 1 ; <<4 x float>*>:413 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 37, i32 2 ; <<4 x float>*>:414 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 37, i32 3 ; <<4 x float>*>:415 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 36, i32 1 ; <<4 x float>*>:416 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 36, i32 2 ; <<4 x float>*>:417 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 36, i32 3 ; <<4 x float>*>:418 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 35, i32 1 ; <<4 x float>*>:419 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 35, i32 2 ; <<4 x float>*>:420 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 35, i32 3 ; <<4 x float>*>:421 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 34, i32 1 ; <<4 x float>*>:422 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 34, i32 2 ; <<4 x float>*>:423 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 34, i32 3 ; <<4 x float>*>:424 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 33, i32 1 ; <<4 x float>*>:425 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 33, i32 2 ; <<4 x float>*>:426 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 33, i32 3 ; <<4 x float>*>:427 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 32, i32 1 ; <<4 x float>*>:428 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 32, i32 2 ; <<4 x float>*>:429 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 32, i32 3 ; <<4 x float>*>:430 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 31, i32 1 ; <<4 x float>*>:431 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 31, i32 2 ; <<4 x float>*>:432 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 31, i32 3 ; <<4 x float>*>:433 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 30, i32 1 ; <<4 x float>*>:434 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 30, i32 2 ; <<4 x float>*>:435 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 30, i32 3 ; <<4 x float>*>:436 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 29, i32 1 ; <<4 x float>*>:437 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 29, i32 2 ; <<4 x float>*>:438 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 29, i32 3 ; <<4 x float>*>:439 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 28, i32 1 ; <<4 x float>*>:440 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 28, i32 2 ; <<4 x float>*>:441 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 28, i32 3 ; <<4 x float>*>:442 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 27, i32 1 ; <<4 x float>*>:443 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 27, i32 2 ; <<4 x float>*>:444 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 27, i32 3 ; <<4 x float>*>:445 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 26, i32 1 ; <<4 x float>*>:446 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 26, i32 2 ; <<4 x float>*>:447 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 26, i32 3 ; <<4 x float>*>:448 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 25, i32 1 ; <<4 x float>*>:449 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 25, i32 2 ; <<4 x float>*>:450 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 25, i32 3 ; <<4 x float>*>:451 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 24, i32 1 ; <<4 x float>*>:452 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 24, i32 2 ; <<4 x float>*>:453 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 24, i32 3 ; <<4 x float>*>:454 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 23, i32 1 ; <<4 x float>*>:455 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 23, i32 2 ; <<4 x float>*>:456 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 23, i32 3 ; <<4 x float>*>:457 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 22, i32 1 ; <<4 x float>*>:458 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 22, i32 2 ; <<4 x float>*>:459 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 22, i32 3 ; <<4 x float>*>:460 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 21, i32 1 ; <<4 x float>*>:461 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 21, i32 2 ; <<4 x float>*>:462 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 21, i32 3 ; <<4 x float>*>:463 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 20, i32 1 ; <<4 x float>*>:464 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 20, i32 2 ; <<4 x float>*>:465 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 20, i32 3 ; <<4 x float>*>:466 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 19, i32 1 ; <<4 x float>*>:467 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 19, i32 2 ; <<4 x float>*>:468 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 19, i32 3 ; <<4 x float>*>:469 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 18, i32 1 ; <<4 x float>*>:470 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 18, i32 2 ; <<4 x float>*>:471 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 18, i32 3 ; <<4 x float>*>:472 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 17, i32 1 ; <<4 x float>*>:473 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 17, i32 2 ; <<4 x float>*>:474 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 17, i32 3 ; <<4 x float>*>:475 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 16, i32 1 ; <<4 x float>*>:476 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 16, i32 2 ; <<4 x float>*>:477 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 16, i32 3 ; <<4 x float>*>:478 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 15, i32 1 ; <<4 x float>*>:479 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 15, i32 2 ; <<4 x float>*>:480 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 15, i32 3 ; <<4 x float>*>:481 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 14, i32 1 ; <<4 x float>*>:482 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 14, i32 2 ; <<4 x float>*>:483 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 14, i32 3 ; <<4 x float>*>:484 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 4, i32 1 ; <<4 x float>*>:485 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 4, i32 2 ; <<4 x float>*>:486 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 4, i32 3 ; <<4 x float>*>:487 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 3, i32 1 ; <<4 x float>*>:488 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 3, i32 2 ; <<4 x float>*>:489 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 3, i32 3 ; <<4 x float>*>:490 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 180, i32 1 ; <<4 x float>*>:491 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 180, i32 2 ; <<4 x float>*>:492 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 180, i32 3 ; <<4 x float>*>:493 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 181, i32 1 ; <<4 x float>*>:494 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 181, i32 2 ; <<4 x float>*>:495 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 181, i32 3 ; <<4 x float>*>:496 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 182, i32 1 ; <<4 x float>*>:497 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 182, i32 2 ; <<4 x float>*>:498 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 182, i32 3 ; <<4 x float>*>:499 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 183, i32 1 ; <<4 x float>*>:500 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 183, i32 2 ; <<4 x float>*>:501 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 183, i32 3 ; <<4 x float>*>:502 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 184, i32 1 ; <<4 x float>*>:503 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 184, i32 2 ; <<4 x float>*>:504 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 184, i32 3 ; <<4 x float>*>:505 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 185, i32 1 ; <<4 x float>*>:506 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 185, i32 2 ; <<4 x float>*>:507 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 185, i32 3 ; <<4 x float>*>:508 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 190, i32 1 ; <<4 x float>*>:509 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 190, i32 2 ; <<4 x float>*>:510 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 190, i32 3 ; <<4 x float>*>:511 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 9, i32 1 ; <<4 x float>*>:512 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 9, i32 2 ; <<4 x float>*>:513 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 9, i32 3 ; <<4 x float>*>:514 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 10, i32 1 ; <<4 x float>*>:515 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 10, i32 2 ; <<4 x float>*>:516 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 10, i32 3 ; <<4 x float>*>:517 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 11, i32 1 ; <<4 x float>*>:518 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 11, i32 2 ; <<4 x float>*>:519 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 11, i32 3 ; <<4 x float>*>:520 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 12, i32 1 ; <<4 x float>*>:521 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 12, i32 2 ; <<4 x float>*>:522 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 12, i32 3 ; <<4 x float>*>:523 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 13, i32 1 ; <<4 x float>*>:524 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 13, i32 2 ; <<4 x float>*>:525 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 13, i32 3 ; <<4 x float>*>:526 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 5, i32 1 ; <<4 x float>*>:527 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 5, i32 2 ; <<4 x float>*>:528 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 5, i32 3 ; <<4 x float>*>:529 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 1, i32 1 ; <<4 x float>*>:530 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 1, i32 2 ; <<4 x float>*>:531 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 1, i32 3 ; <<4 x float>*>:532 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 2, i32 1 ; <<4 x float>*>:533 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 2, i32 2 ; <<4 x float>*>:534 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 2, i32 3 ; <<4 x float>*>:535 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 6, i32 1 ; <<4 x float>*>:536 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 6, i32 2 ; <<4 x float>*>:537 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 6, i32 3 ; <<4 x float>*>:538 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 7, i32 1 ; <<4 x float>*>:539 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 7, i32 2 ; <<4 x float>*>:540 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 7, i32 3 ; <<4 x float>*>:541 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 186, i32 1 ; <<4 x float>*>:542 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 186, i32 2 ; <<4 x float>*>:543 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 186, i32 3 ; <<4 x float>*>:544 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 187, i32 1 ; <<4 x float>*>:545 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 187, i32 2 ; <<4 x float>*>:546 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 187, i32 3 ; <<4 x float>*>:547 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 8, i32 1 ; <<4 x float>*>:548 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 8, i32 2 ; <<4 x float>*>:549 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 8, i32 3 ; <<4 x float>*>:550 [#uses=0] + load <4 x float>* null ; <<4 x float>>:551 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 188, i32 1 ; <<4 x float>*>:552 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 188, i32 2 ; <<4 x float>*>:553 [#uses=1] + load <4 x float>* %553 ; <<4 x float>>:554 [#uses=1] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 188, i32 3 ; <<4 x float>*>:555 [#uses=0] + shufflevector <4 x float> %554, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>>:556 [#uses=1] + call <4 x i32> @llvm.ppc.altivec.vcmpgtfp( <4 x float> zeroinitializer, <4 x float> %556 ) ; <<4 x i32>>:557 [#uses=0] + bitcast <4 x i32> zeroinitializer to <4 x float> ; <<4 x float>>:558 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 189, i32 0 ; <<4 x float>*>:559 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 189, i32 2 ; <<4 x float>*>:560 [#uses=1] + store <4 x float> zeroinitializer, <4 x float>* %560 + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 189, i32 3 ; <<4 x float>*>:561 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 189, i32 1 ; <<4 x float>*>:562 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 189, i32 2 ; <<4 x float>*>:563 [#uses=0] + load <4 x i32>* %.sub7896 ; <<4 x i32>>:564 [#uses=0] + shufflevector <4 x float> zeroinitializer, <4 x float> zeroinitializer, <4 x i32> < i32 0, i32 5, i32 6, i32 7 > ; <<4 x float>>:565 [#uses=1] + store <4 x float> %565, <4 x float>* null + icmp eq i32 0, 0 ; :566 [#uses=1] + br i1 %566, label %.critedge, label %xPIF.exit + + .critedge: ; preds = %xOperationInitMasks.exit + getelementptr [4 x <4 x i32>]* null, i32 0, i32 3 ; <<4 x i32>*>:567 [#uses=0] + and <4 x i32> zeroinitializer, zeroinitializer ; <<4 x i32>>:568 [#uses=0] + or <4 x i32> zeroinitializer, zeroinitializer ; <<4 x i32>>:569 [#uses=0] + icmp eq i32 0, 0 ; :570 [#uses=1] + br i1 %570, label %.critedge7898, label %xPBRK.exit + + .critedge7898: ; preds = %.critedge + br label %xPIF.exit + + xPIF.exit: ; preds = %.critedge7898, %xOperationInitMasks.exit + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 188, i32 1 ; <<4 x float>*>:571 [#uses=0] + load <4 x float>* null ; <<4 x float>>:572 [#uses=0] + shufflevector <4 x float> zeroinitializer, <4 x float> undef, <4 x i32> zeroinitializer ; <<4 x float>>:573 [#uses=0] + icmp eq i32 0, 0 ; :574 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 3, i32 1 ; <<4 x float>*>:575 [#uses=0] + load <4 x float>* %0 ; <<4 x float>>:576 [#uses=0] + call i32 @llvm.ppc.altivec.vcmpequw.p( i32 0, <4 x i32> zeroinitializer, <4 x i32> zeroinitializer ) ; :577 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 2, i32 0 ; <<4 x float>*>:578 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 2, i32 1 ; <<4 x float>*>:579 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 2, i32 2 ; <<4 x float>*>:580 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 2, i32 3 ; <<4 x float>*>:581 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 1, i32 3 ; <<4 x float>*>:582 [#uses=0] + load <4 x float>* null ; <<4 x float>>:583 [#uses=1] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 0, i32 1 ; <<4 x float>*>:584 [#uses=1] + load <4 x float>* %584 ; <<4 x float>>:585 [#uses=1] + load <4 x float>* null ; <<4 x float>>:586 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 0, i32 3 ; <<4 x float>*>:587 [#uses=1] + load <4 x float>* %587 ; <<4 x float>>:588 [#uses=1] + shufflevector <4 x float> %583, <4 x float> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x float>>:589 [#uses=1] + shufflevector <4 x float> %585, <4 x float> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x float>>:590 [#uses=1] + shufflevector <4 x float> %588, <4 x float> undef, <4 x i32> < i32 3, i32 3, i32 3, i32 3 > ; <<4 x float>>:591 [#uses=1] + mul <4 x float> zeroinitializer, %589 ; <<4 x float>>:592 [#uses=0] + mul <4 x float> zeroinitializer, %590 ; <<4 x float>>:593 [#uses=0] + mul <4 x float> zeroinitializer, zeroinitializer ; <<4 x float>>:594 [#uses=1] + mul <4 x float> zeroinitializer, %591 ; <<4 x float>>:595 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 4, i32 0 ; <<4 x float>*>:596 [#uses=2] + load <4 x float>* %596 ; <<4 x float>>:597 [#uses=0] + store <4 x float> zeroinitializer, <4 x float>* %596 + load <4 x float>* null ; <<4 x float>>:598 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 4, i32 2 ; <<4 x float>*>:599 [#uses=0] + shufflevector <4 x float> %594, <4 x float> zeroinitializer, <4 x i32> < i32 0, i32 1, i32 2, i32 7 > ; <<4 x float>>:600 [#uses=0] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 4, i32 3 ; <<4 x float>*>:601 [#uses=2] + load <4 x float>* %601 ; <<4 x float>>:602 [#uses=0] + store <4 x float> zeroinitializer, <4 x float>* %601 + load <4 x float>* null ; <<4 x float>>:603 [#uses=0] + load <4 x float>* null ; <<4 x float>>:604 [#uses=1] + getelementptr [193 x [4 x <4 x float>]]* null, i32 0, i32 4, i32 2 ; <<4 x float>*>:605 [#uses=1] + load <4 x float>* %605 ; <<4 x float>>:606 [#uses=1] + sub <4 x float> zeroinitializer, %604 ; <<4 x float>>:607 [#uses=2] + sub <4 x float> zeroinitializer, %606 ; <<4 x float>>:608 [#uses=2] + call i32 @llvm.ppc.altivec.vcmpequw.p( i32 0, <4 x i32> zeroinitializer, <4 x i32> zeroinitializer ) ; :609 [#uses=0] + br i1 false, label %617, label %610 + + ;
      TypeDescription
      voidNo value
      voidNo value
      i88-bit value
      i3232-bit value
      float32-bit floating point value
      voidNo value
      voidNo value
      i88-bit value
      i3232-bit value
      float32-bit floating point value
      voidNo value
      voidNo value
      i88-bit value
      i3232-bit value
      float32-bit floating point value
      voidNo value
      voidNo value
      i88-bit value
      i3232-bit value
      float32-bit floating point value
      + + + + + + + + + + + + +
      StartStopDescription
      08:0008:45Meet - Greet
      08:4509:00Session 0: LLVM History
      09:0010:30Session 1: Introductions
      10:3011:00Break - Informal Discussions
      11:0012:00Session 2: Learning LLVM
      12:0013:00Lunch Break
      13:0015:00Session 3: Using LLVM
      15:0015:30Break - Informal Discussions
      15:3017:00Session 4: Improving LLVM
      17:0018:00Wrap up - Social Time
      18:0021:00Dinner (Optional)
      +
    + + +
    +

    During this brief session, Vikram Adve and Chris Lattner (the originators + of LLVM) will present a brief and casual history of how LLVM got from an idea + in the back of Chris' brain in 2000 to an up-and-coming Open Source project in + 2007.

    +
    + + +
    +

    This time is reserved for in-depth introductions of everyone attending + the meeting. The thing you all wanted most was to get to know one another. + So, here's your chance. You have 2-3 minutes to tell us who you are, what + you do, how much you love LLVM, why you work with it, or anything else you + want to say.

    +
    + + +
    +

    This session will provide presentations about LLVM. Most everyone at the + meeting will be somewhat familiar with LLVM (if not experts) so if you're + inclined to submit something for this session, find something unique, perhaps + a little known secret, an idiom you use, tips and tricks, tools you use with + LLVM, that tutorial you gave last week, etc.

    +
    + + +
    +

    This session will cover some of the novel ways in which LLVM is currently + being used. If you use LLVM, please consider making a presentation in this + session. +

    + + + + + + + + +
    SpeakerTopic
    Chris Lattner, Apple, Inc.Using LLVM to improve the Apple OpenGL implementation
    Sarah Thompson, NASA, Ames Research CenterUsing LLVM to support model checking, symbolic execution and static + analysis
    +
    + + +
    +

    This time is reserved for specific LLVM technical issues that need to be + addressed. Everyone should submit their ideas here, from pet peeves to + wishful fantasies. What do you think LLVM lacks? Where does it need to go + from here? This session will consist of a 5 minute presentation by the issue + originator followed by 10 minutes of discussion. This will allow 6 issues to + be discussed in this time slot. +

    +
    + + + +

    The closest airport is San Jose International Airport (SJC; 10 miles away). There is also San Francisco Internation Airport (SFO; 43 miles away) or Oakland (OAK; 49 miles away). IMHO, I would choose SJC, then SFO, and lastly OAK, depending upon the prices.

    - -
    + + + + +

    Use this Google Search to find hotels near the meeting.

    @@ -48,7 +163,37 @@ distance. The Hilton may have a shuttle.

    + +
    + Breakfast: You're on your own. The Apple cafeteria should be open. + There are lots of amenities in the area. + (Anyone care to get more specific?)

    +

    Lunch: Lunch will be catered by Apple. Thank you, Apple!

    +

    Dinner: Dinner is optional and dutch. Those who want to go should + try to agree on where before the meetings so that a reservation can be + made.

    +
    + + +
    +

    The table below lists the confirmed attendees for the meeting.

    + + + + + + + + + + + + +
    NameOrganization
    Vikram AdveUIUC
    Owen AndersonMacAlester College
    Ryan BrownGoogle
    Jeff CohenIndependent
    Chris LattnerApple, Inc.
    Scott Michel + 2Aerospace
    Reid SpencerIndependent
    Sarah Thompson + 1NASA, Ames Research Center
    Bill WendlingApple, Inc.
    Marcel WeiherMetaObject
    +

    Total confirmed attendees: 12

    +

    Total unconfirmed attendees: 4

    +

    @@ -57,6 +202,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
    Last modified: $Date: 2007/03/28 02:26:04 $ +
    Last modified: $Date: 2007/03/31 21:36:49 $ From reid at x10sys.com Sat Mar 31 16:42:00 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 16:42:00 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200703312142.l2VLg0fY029430@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.4 -> 1.5 --- Log message: Fix validation errors. --- Diffs of the changes: (+8 -8) DevMtgMay2007.html | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.4 llvm-www/DevMtgMay2007.html:1.5 --- llvm-www/DevMtgMay2007.html:1.4 Sat Mar 31 16:36:49 2007 +++ llvm-www/DevMtgMay2007.html Sat Mar 31 16:41:43 2007 @@ -122,26 +122,25 @@ originator followed by 10 minutes of discussion. This will allow 6 issues to be discussed in this time slot.
    - - +

    The closest airport is San Jose International Airport (SJC; 10 miles away). There is also San Francisco Internation Airport (SFO; 43 miles away) or Oakland (OAK; 49 miles away). IMHO, I would choose SJC, then SFO, and lastly OAK, depending upon the prices.

    - + @@ -163,7 +162,8 @@ distance. The Hilton may have a shuttle.

    - + +
    Breakfast: You're on your own. The Apple cafeteria should be open. There are lots of amenities in the area. @@ -202,6 +202,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
    Last modified: $Date: 2007/03/31 21:36:49 $ +
    Last modified: $Date: 2007/03/31 21:41:43 $ From reid at x10sys.com Sat Mar 31 16:44:27 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 16:44:27 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200703312144.l2VLiRYF029526@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.5 -> 1.6 --- Log message: More validation errors. --- Diffs of the changes: (+7 -9) DevMtgMay2007.html | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.5 llvm-www/DevMtgMay2007.html:1.6 --- llvm-www/DevMtgMay2007.html:1.5 Sat Mar 31 16:41:43 2007 +++ llvm-www/DevMtgMay2007.html Sat Mar 31 16:44:09 2007 @@ -151,16 +151,14 @@ to find hotels near the meeting.

    If there is sufficient interest, we may try to set up a discount price at one hotel. Please contact Reid if you are interested.

    -

    Bill Wendling reports: -

    The Cypress Hotel +

    Bill Wendling reports:

    +

    The Cypress Hotel is very close to the Apple campus. It's pretty swank, so I'm not sure how - pricey it is.

    -

    -

    Tanya Lattner reports: -

    I have stayed at both the Cupertino Inn and Hilton Garden Inn. + pricey it is.

    +

    Tanya Lattner reports:

    +

    I have stayed at both the Cupertino Inn and Hilton Garden Inn. The Hilton is nicer but the Cupertino Inn is acceptable and within walking - distance. The Hilton may have a shuttle.

    -

    + distance. The Hilton may have a shuttle.

    @@ -202,6 +200,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
    Last modified: $Date: 2007/03/31 21:41:43 $ +
    Last modified: $Date: 2007/03/31 21:44:09 $ From reid at x10sys.com Sat Mar 31 16:49:56 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 16:49:56 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200703312149.l2VLnuMA029666@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.6 -> 1.7 --- Log message: Improve TOC and fix spelling mistakes. --- Diffs of the changes: (+17 -11) DevMtgMay2007.html | 28 +++++++++++++++++----------- 1 files changed, 17 insertions(+), 11 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.6 llvm-www/DevMtgMay2007.html:1.7 --- llvm-www/DevMtgMay2007.html:1.6 Sat Mar 31 16:44:09 2007 +++ llvm-www/DevMtgMay2007.html Sat Mar 31 16:49:38 2007 @@ -2,7 +2,14 @@
    May 2007 LLVM Developers Meeting
    1. Summary
    2. -
    3. Agenda
    4. +
    5. Agenda +
        +
      1. Session 0: LLVM History
      2. +
      3. Session 1: Introductions
      4. +
      5. Session 2: Learning LLVM
      6. +
      7. Session 3: Using LLVM
      8. +
      9. Session 4: Improving LLVM
      10. +
    6. Travel Tips
      1. Airports @@ -34,7 +41,7 @@ indicating that you'd like to attend. Your name will be added below.
      2. CALL FOR PARTICIPATION: Please don't be bashful or just lurk! - Anyone with even a mild curiousity about LLVM is welcome to attend. But, + Anyone with even a mild curiosity about LLVM is welcome to attend. But, please do send an email if you plan to attend so we can ensure there is space for you.

        CALL FOR PRESENTATIONS: This meeting is for you and by you. If you @@ -68,7 +75,7 @@ -

        +

        During this brief session, Vikram Adve and Chris Lattner (the originators of LLVM) will present a brief and casual history of how LLVM got from an idea @@ -76,7 +83,7 @@ 2007.

        - +

        This time is reserved for in-depth introductions of everyone attending the meeting. The thing you all wanted most was to get to know one another. @@ -85,7 +92,7 @@ want to say.

        - +

        This session will provide presentations about LLVM. Most everyone at the meeting will be somewhat familiar with LLVM (if not experts) so if you're @@ -94,7 +101,7 @@ LLVM, that tutorial you gave last week, etc.

        - +

        This session will cover some of the novel ways in which LLVM is currently being used. If you use LLVM, please consider making a presentation in this @@ -112,8 +119,7 @@

        - +

        This time is reserved for specific LLVM technical issues that need to be addressed. Everyone should submit their ideas here, from pet peeves to @@ -128,7 +134,7 @@

        The closest airport is San Jose International Airport (SJC; 10 miles away). - There is also San Francisco Internation Airport (SFO; 43 miles away) or + There is also San Francisco International Airport (SFO; 43 miles away) or Oakland (OAK; 49 miles away). IMHO, I would choose SJC, then SFO, and lastly OAK, depending upon the prices.

        @@ -179,7 +185,7 @@ - + @@ -200,6 +206,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
        Last modified: $Date: 2007/03/31 21:44:09 $ +
        Last modified: $Date: 2007/03/31 21:49:38 $ From reid at x10sys.com Sat Mar 31 17:14:21 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 17:14:21 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200703312214.l2VMELjC030186@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.7 -> 1.8 --- Log message: Fix an anchor. --- Diffs of the changes: (+3 -3) DevMtgMay2007.html | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.7 llvm-www/DevMtgMay2007.html:1.8 --- llvm-www/DevMtgMay2007.html:1.7 Sat Mar 31 16:49:38 2007 +++ llvm-www/DevMtgMay2007.html Sat Mar 31 17:14:04 2007 @@ -51,7 +51,7 @@ - +

        The meeting will start at 8am and finish by 6pm. Beyond that, not much is firm at this point. How much time is spent in the various sessions @@ -179,7 +179,7 @@

        - +

        The table below lists the confirmed attendees for the meeting.

        NameOrganization
        Vikram AdveUIUC
        Owen AndersonMacAlester College
        Owen AndersonMacalester College
        Ryan BrownGoogle
        Jeff CohenIndependent
        Chris LattnerApple, Inc.
        @@ -206,6 +206,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
        Last modified: $Date: 2007/03/31 21:49:38 $ +
        Last modified: $Date: 2007/03/31 22:14:04 $ From reid at x10sys.com Sat Mar 31 17:36:48 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 17:36:48 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200703312236.l2VMamk7030558@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.8 -> 1.9 --- Log message: Fix links in TOC. --- Diffs of the changes: (+6 -6) DevMtgMay2007.html | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.8 llvm-www/DevMtgMay2007.html:1.9 --- llvm-www/DevMtgMay2007.html:1.8 Sat Mar 31 17:14:04 2007 +++ llvm-www/DevMtgMay2007.html Sat Mar 31 17:36:31 2007 @@ -4,11 +4,11 @@
      3. Summary
      4. Agenda
          -
        1. Session 0: LLVM History
        2. -
        3. Session 1: Introductions
        4. -
        5. Session 2: Learning LLVM
        6. -
        7. Session 3: Using LLVM
        8. -
        9. Session 4: Improving LLVM
        10. +
        11. Session 0: LLVM History
        12. +
        13. Session 1: Introductions
        14. +
        15. Session 2: Learning LLVM
        16. +
        17. Session 3: Using LLVM
        18. +
        19. Session 4: Improving LLVM
      5. Travel Tips
          @@ -206,6 +206,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
          Last modified: $Date: 2007/03/31 22:14:04 $ +
          Last modified: $Date: 2007/03/31 22:36:31 $ From reid at x10sys.com Sat Mar 31 17:37:30 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 17:37:30 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200703312237.l2VMbUrV030632@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.9 -> 1.10 --- Log message: Fix section heading. --- Diffs of the changes: (+2 -2) DevMtgMay2007.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.9 llvm-www/DevMtgMay2007.html:1.10 --- llvm-www/DevMtgMay2007.html:1.9 Sat Mar 31 17:36:31 2007 +++ llvm-www/DevMtgMay2007.html Sat Mar 31 17:37:13 2007 @@ -150,7 +150,7 @@ Metropolitan Oakland International Airport (OAK) to Apple

          - +

          Use this Google Search @@ -206,6 +206,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
          Last modified: $Date: 2007/03/31 22:36:31 $ +
          Last modified: $Date: 2007/03/31 22:37:13 $ From reid at x10sys.com Sat Mar 31 20:01:17 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 20:01:17 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200704010101.l3111HaK000626@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.10 -> 1.11 --- Log message: Add Nick Lewycky. --- Diffs of the changes: (+10 -2) DevMtgMay2007.html | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.10 llvm-www/DevMtgMay2007.html:1.11 --- llvm-www/DevMtgMay2007.html:1.10 Sat Mar 31 17:37:13 2007 +++ llvm-www/DevMtgMay2007.html Sat Mar 31 20:01:00 2007 @@ -99,6 +99,13 @@ inclined to submit something for this session, find something unique, perhaps a little known secret, an idiom you use, tips and tricks, tools you use with LLVM, that tutorial you gave last week, etc.

          +
      6. + + + + +
        SpeakerTopic
        Nick Lewycky, U of TorontoDesign and implementation of the PredicateSimplifier pass, or, + "VRP in LLVM"
        @@ -189,13 +196,14 @@ Ryan BrownGoogle Jeff CohenIndependent Chris LattnerApple, Inc. + Nick LewyckyIndependent Scott Michel + 2Aerospace Reid SpencerIndependent Sarah Thompson + 1NASA, Ames Research Center Bill WendlingApple, Inc. Marcel WeiherMetaObject -

        Total confirmed attendees: 12

        +

        Total confirmed attendees: 13

        Total unconfirmed attendees: 4

        @@ -206,6 +214,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
        Last modified: $Date: 2007/03/31 22:37:13 $ +
        Last modified: $Date: 2007/04/01 01:01:00 $ From reid at x10sys.com Sat Mar 31 20:05:31 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 20:05:31 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200704010105.l3115VPG000742@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.11 -> 1.12 --- Log message: Fix Nick's affiliation --- Diffs of the changes: (+2 -2) DevMtgMay2007.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.11 llvm-www/DevMtgMay2007.html:1.12 --- llvm-www/DevMtgMay2007.html:1.11 Sat Mar 31 20:01:00 2007 +++ llvm-www/DevMtgMay2007.html Sat Mar 31 20:05:14 2007 @@ -101,7 +101,7 @@ LLVM, that tutorial you gave last week, etc.

        - + @@ -214,6 +214,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
        Last modified: $Date: 2007/04/01 01:01:00 $ +
        Last modified: $Date: 2007/04/01 01:05:14 $ From reid at x10sys.com Sat Mar 31 20:08:39 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 20:08:39 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200704010108.l3118dqV000846@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.12 -> 1.13 --- Log message: Bump the "maybe" count. --- Diffs of the changes: (+2 -2) DevMtgMay2007.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.12 llvm-www/DevMtgMay2007.html:1.13 --- llvm-www/DevMtgMay2007.html:1.12 Sat Mar 31 20:05:14 2007 +++ llvm-www/DevMtgMay2007.html Sat Mar 31 20:08:22 2007 @@ -204,7 +204,7 @@
        SpeakerTopic
        Nick Lewycky, U of Toronto
        Nick Lewycky Design and implementation of the PredicateSimplifier pass, or, "VRP in LLVM"
        Marcel WeiherMetaObject

        Total confirmed attendees: 13

        -

        Total unconfirmed attendees: 4

        +

        Possible additional attendees: 8

        @@ -214,6 +214,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
        Last modified: $Date: 2007/04/01 01:05:14 $ +
        Last modified: $Date: 2007/04/01 01:08:22 $ From reid at x10sys.com Sat Mar 31 20:11:55 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 20:11:55 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200704010111.l311Bt2u000958@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.13 -> 1.14 --- Log message: No breakfast for anyone! --- Diffs of the changes: (+1 -4) DevMtgMay2007.html | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.13 llvm-www/DevMtgMay2007.html:1.14 --- llvm-www/DevMtgMay2007.html:1.13 Sat Mar 31 20:08:22 2007 +++ llvm-www/DevMtgMay2007.html Sat Mar 31 20:11:38 2007 @@ -176,9 +176,6 @@
        - Breakfast: You're on your own. The Apple cafeteria should be open. - There are lots of amenities in the area. - (Anyone care to get more specific?)

        Lunch: Lunch will be catered by Apple. Thank you, Apple!

        Dinner: Dinner is optional and dutch. Those who want to go should try to agree on where before the meetings so that a reservation can be @@ -214,6 +211,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
        Last modified: $Date: 2007/04/01 01:08:22 $ +
        Last modified: $Date: 2007/04/01 01:11:38 $ From reid at x10sys.com Sat Mar 31 20:14:41 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 20:14:41 -0500 Subject: [llvm-commits] CVS: llvm-www/www-index.html Message-ID: <200704010114.l311EfV9001057@zion.cs.uiuc.edu> Changes in directory llvm-www: www-index.html updated: 1.138 -> 1.139 --- Log message: Add the developer's meeting to the right pane. --- Diffs of the changes: (+10 -0) www-index.html | 10 ++++++++++ 1 files changed, 10 insertions(+) Index: llvm-www/www-index.html diff -u llvm-www/www-index.html:1.138 llvm-www/www-index.html:1.139 --- llvm-www/www-index.html:1.138 Wed Mar 14 10:05:02 2007 +++ llvm-www/www-index.html Sat Mar 31 20:14:23 2007 @@ -113,6 +113,16 @@

        +

        Developers Meeting: May 25, 2007
        + +
        +

        Mark your calendars, the Developers Meeting + is on! Please let us know if you + would like to attend.

        +
        + +

        +
        Try out LLVM in your browser
        From reid at x10sys.com Sat Mar 31 20:15:45 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 20:15:45 -0500 Subject: [llvm-commits] CVS: llvm-www/www-index.html Message-ID: <200704010115.l311Fjt7001136@zion.cs.uiuc.edu> Changes in directory llvm-www: www-index.html updated: 1.139 -> 1.140 --- Log message: Fix vertical space in right pane. --- Diffs of the changes: (+4 -4) www-index.html | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm-www/www-index.html diff -u llvm-www/www-index.html:1.139 llvm-www/www-index.html:1.140 --- llvm-www/www-index.html:1.139 Sat Mar 31 20:14:23 2007 +++ llvm-www/www-index.html Sat Mar 31 20:15:28 2007 @@ -111,9 +111,9 @@ anonymous CVS.

        -

        +
        -
        Developers Meeting: May 25, 2007
        +
        Developers Meeting
        May 25, 2007

        Mark your calendars, the Developers Meeting @@ -121,7 +121,7 @@ would like to attend.

        -

        +
        Try out LLVM in your browser
        @@ -133,7 +133,7 @@ some of the optimizers.

        -

        +
        Neat uses and features of LLVM
        From reid at x10sys.com Sat Mar 31 20:27:55 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 20:27:55 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200704010127.l311RtlY001410@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.14 -> 1.15 --- Log message: Explain dinner a little more clearly. --- Diffs of the changes: (+4 -4) DevMtgMay2007.html | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.14 llvm-www/DevMtgMay2007.html:1.15 --- llvm-www/DevMtgMay2007.html:1.14 Sat Mar 31 20:11:38 2007 +++ llvm-www/DevMtgMay2007.html Sat Mar 31 20:27:38 2007 @@ -177,9 +177,9 @@

        Lunch: Lunch will be catered by Apple. Thank you, Apple!

        -

        Dinner: Dinner is optional and dutch. Those who want to go should - try to agree on where before the meetings so that a reservation can be - made.

        +

        Dinner: Dinner is optional. We'll go to a local restaurant (TBD) + after the meeting. We'll be "going Dutch" for this so you'll need to buy + your own meal. We'll pick the restaurant the day of the meeting.

        @@ -211,6 +211,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
        Last modified: $Date: 2007/04/01 01:11:38 $ +
        Last modified: $Date: 2007/04/01 01:27:38 $ From reid at x10sys.com Sat Mar 31 20:28:55 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 20:28:55 -0500 Subject: [llvm-commits] CVS: llvm-www/www-index.html Message-ID: <200704010128.l311StaJ001487@zion.cs.uiuc.edu> Changes in directory llvm-www: www-index.html updated: 1.140 -> 1.141 --- Log message: Yes, links need suffixes too. --- Diffs of the changes: (+3 -2) www-index.html | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm-www/www-index.html diff -u llvm-www/www-index.html:1.140 llvm-www/www-index.html:1.141 --- llvm-www/www-index.html:1.140 Sat Mar 31 20:15:28 2007 +++ llvm-www/www-index.html Sat Mar 31 20:28:38 2007 @@ -116,8 +116,9 @@
        Developers Meeting
        May 25, 2007
        -

        Mark your calendars, the Developers Meeting - is on! Please let us know if you +

        Mark your calendars, the + Developers Meeting is on! + Please let us know if you would like to attend.

        From reid at x10sys.com Sat Mar 31 20:40:25 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 20:40:25 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html llvm.css Message-ID: <200704010140.l311ePm9001749@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.15 -> 1.16 llvm.css updated: 1.17 -> 1.18 --- Log message: Add some table formatting for the dev meeting agenda. --- Diffs of the changes: (+11 -3) DevMtgMay2007.html | 6 +++--- llvm.css | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.15 llvm-www/DevMtgMay2007.html:1.16 --- llvm-www/DevMtgMay2007.html:1.15 Sat Mar 31 20:27:38 2007 +++ llvm-www/DevMtgMay2007.html Sat Mar 31 20:40:08 2007 @@ -59,8 +59,8 @@ as many submissions as possible, even if it means rearranging this preliminary agenda. That said, here's roughly how we think the meeting will go (all times approximate):

        - - +
        StartStopDescription
        + Start @@ -211,6 +211,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
        Last modified: $Date: 2007/04/01 01:27:38 $ +
        Last modified: $Date: 2007/04/01 01:40:08 $ Index: llvm-www/llvm.css diff -u llvm-www/llvm.css:1.17 llvm-www/llvm.css:1.18 --- llvm-www/llvm.css:1.17 Fri Jan 7 17:25:58 2005 +++ llvm-www/llvm.css Sat Mar 31 20:40:08 2007 @@ -90,3 +90,11 @@ width: 60%; background: #f7f7f7; border: 2px solid #cccccc } +TR.www, TD.www { border: 2px solid gray; padding: 4pt 4pt 2pt 2pt; } +TH.www { border: 2px solid gray; font-weight: bold; font-size: 105%; + color: black; background: url("img/lines.gif"); + font-family: "Georgia,Palatino,Times,Roman,SanSerif"; + text-align:center; vertical-align: middle; } +TABLE.www { text-align: center; border: 2px solid black; + border-collapse: collapse; margin-top: 1em; margin-left: 1em; + margin-right: 1em; margin-bottom: 1em; } From reid at x10sys.com Sat Mar 31 20:42:25 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 20:42:25 -0500 Subject: [llvm-commits] CVS: llvm-www/llvm.css Message-ID: <200704010142.l311gPnf001857@zion.cs.uiuc.edu> Changes in directory llvm-www: llvm.css updated: 1.18 -> 1.19 --- Log message: Fix table formatting. --- Diffs of the changes: (+4 -3) llvm.css | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm-www/llvm.css diff -u llvm-www/llvm.css:1.18 llvm-www/llvm.css:1.19 --- llvm-www/llvm.css:1.18 Sat Mar 31 20:40:08 2007 +++ llvm-www/llvm.css Sat Mar 31 20:42:08 2007 @@ -90,11 +90,12 @@ width: 60%; background: #f7f7f7; border: 2px solid #cccccc } -TR.www, TD.www { border: 2px solid gray; padding: 4pt 4pt 2pt 2pt; } +TR.www, TD.www { border: 2px solid gray; padding: 4pt 4pt 2pt 2pt; + text-align: left; } TH.www { border: 2px solid gray; font-weight: bold; font-size: 105%; color: black; background: url("img/lines.gif"); font-family: "Georgia,Palatino,Times,Roman,SanSerif"; - text-align:center; vertical-align: middle; } -TABLE.www { text-align: center; border: 2px solid black; + text-align: left; vertical-align: middle; } +TABLE.www { text-align: left; border: 2px solid black; border-collapse: collapse; margin-top: 1em; margin-left: 1em; margin-right: 1em; margin-bottom: 1em; } From reid at x10sys.com Sat Mar 31 20:43:31 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 20:43:31 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200704010143.l311hVj9001941@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.16 -> 1.17 --- Log message: Specify formatted table for all tables. --- Diffs of the changes: (+5 -5) DevMtgMay2007.html | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.16 llvm-www/DevMtgMay2007.html:1.17 --- llvm-www/DevMtgMay2007.html:1.16 Sat Mar 31 20:40:08 2007 +++ llvm-www/DevMtgMay2007.html Sat Mar 31 20:43:14 2007 @@ -60,7 +60,7 @@ preliminary agenda. That said, here's roughly how we think the meeting will go (all times approximate):

        StopDescription
        08:0008:45Meet - Greet
        08:4509:00Session 0: LLVM History
        09:0010:30Session 1: Introductions
        - Start + @@ -99,7 +99,7 @@ inclined to submit something for this session, find something unique, perhaps a little known secret, an idiom you use, tips and tricks, tools you use with LLVM, that tutorial you gave last week, etc.

        -
        StopDescription
        StartStopDescription
        08:0008:45Meet - Greet
        08:4509:00Session 0: LLVM History
        09:0010:30Session 1: Introductions
        +
        + future growth and adoption plans? + given us some great things, but sometimes secrecy makes things + difficult for those not involved; should there be an LLVM Foundation + in our (distant?) future?
        SpeakerTopic
        Nick Lewycky Design and implementation of the PredicateSimplifier pass, or, @@ -114,7 +114,7 @@ being used. If you use LLVM, please consider making a presentation in this session.

        - +
        @@ -186,7 +186,7 @@

        The table below lists the confirmed attendees for the meeting.

        -
        SpeakerTopic
        Chris Lattner, Apple, Inc. Using LLVM to improve the Apple OpenGL implementation
        +
        @@ -211,6 +211,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
        Last modified: $Date: 2007/04/01 01:40:08 $ +
        Last modified: $Date: 2007/04/01 01:43:14 $ From reid at x10sys.com Sat Mar 31 20:45:12 2007 From: reid at x10sys.com (Reid Spencer) Date: Sat, 31 Mar 2007 20:45:12 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html llvm.css Message-ID: <200704010145.l311jCM4002043@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.17 -> 1.18 llvm.css updated: 1.19 -> 1.20 --- Log message: Fix table formatting. --- Diffs of the changes: (+4 -4) DevMtgMay2007.html | 4 ++-- llvm.css | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.17 llvm-www/DevMtgMay2007.html:1.18 --- llvm-www/DevMtgMay2007.html:1.17 Sat Mar 31 20:43:14 2007 +++ llvm-www/DevMtgMay2007.html Sat Mar 31 20:44:55 2007 @@ -60,7 +60,7 @@ preliminary agenda. That said, here's roughly how we think the meeting will go (all times approximate):

        NameOrganization
        Vikram AdveUIUC
        Owen AndersonMacalester College
        - + @@ -211,6 +211,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
        Last modified: $Date: 2007/04/01 01:43:14 $ +
        Last modified: $Date: 2007/04/01 01:44:55 $ Index: llvm-www/llvm.css diff -u llvm-www/llvm.css:1.19 llvm-www/llvm.css:1.20 --- llvm-www/llvm.css:1.19 Sat Mar 31 20:42:08 2007 +++ llvm-www/llvm.css Sat Mar 31 20:44:55 2007 @@ -90,9 +90,9 @@ width: 60%; background: #f7f7f7; border: 2px solid #cccccc } -TR.www, TD.www { border: 2px solid gray; padding: 4pt 4pt 2pt 2pt; +.www TD, TH { border: 2px solid gray; padding: 4pt 4pt 2pt 2pt; text-align: left; } -TH.www { border: 2px solid gray; font-weight: bold; font-size: 105%; +.www TH { border: 2px solid gray; font-weight: bold; font-size: 105%; color: black; background: url("img/lines.gif"); font-family: "Georgia,Palatino,Times,Roman,SanSerif"; text-align: left; vertical-align: middle; } From clattner at apple.com Sat Mar 31 21:11:28 2007 From: clattner at apple.com (Chris Lattner) Date: Sat, 31 Mar 2007 19:11:28 -0700 Subject: [llvm-commits] PR1297 patch Message-ID: <6DD19F11-7710-4DB4-BB00-46E70D77B865@apple.com> In langref: +

        This is an overloaded intrinsic. You can use llvm.ctpop on any integer bit +width. Not all targets support all bit widths however. + declare i256 @llvm.ctpop.i256(i256 <src>) ; might fail code gen Please remove comments about codegen limitations. It's not the intrinsics fault that i27 isn't supported by all targets :) We should make the codegen print a sensible error message, then exit, if it sees stuff it doesn't handle, instead of asserting and dying. In Intrinsics.td, please add the new intrinsics as a separate follow- on patch. These intrinsics will need to be documented in langref, etc as a first step (and I'd like to look at the langref changes before you add the intrinsics) In Intrinsics.td, it looks like you didn't choose to make the "count" intrinsics always return i32. As such, you need to update the LangRef.html doc to talk about bswap.i32.i32 (etc) and ctpop.i47.i47, not bswap.i32 and ctpop.i47. I didn't follow the logic in the verifier, but it looks like you cover the right cases. In ConstantFolding.cpp, instead of: if (Name.substr(0,10) == "llvm.bswap") Please use: if (Name.size() > 11 && !memcmp(&Name[0], "llvm.bswap", 10) Please delete: if (OpTy->getBitWidth() >= 16 && OpTy->getBitWidth() % 16 == 0) as the verifier checks it. In InstCombine, drop "if (BitWidth >= 16 && BitWidth % 16 == 0) {", which makes BitWidth dead. In IntrinsicLowering.cpp, note that "LowerCTPOP", "LowerBSWAP", etc, don't work with arbitrary width versions of these. "Future work" is fine though. In llvm-gcc/llvm-convert.cpp, you can eliminate the cast in EmitBuiltinUnaryIntOp. Overall, this looks quite awesome. Very nice work, and a great solution to variable width intrinsics! -Chris From nicholas at mxc.ca Sat Mar 31 22:48:01 2007 From: nicholas at mxc.ca (Nick Lewycky) Date: Sat, 31 Mar 2007 22:48:01 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/ConstantRange.cpp Message-ID: <200704010348.l313m1Vk003947@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: ConstantRange.cpp updated: 1.41 -> 1.42 --- Log message: Implement union of wrapped sets. --- Diffs of the changes: (+65 -7) ConstantRange.cpp | 72 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 65 insertions(+), 7 deletions(-) Index: llvm/lib/Support/ConstantRange.cpp diff -u llvm/lib/Support/ConstantRange.cpp:1.41 llvm/lib/Support/ConstantRange.cpp:1.42 --- llvm/lib/Support/ConstantRange.cpp:1.41 Sat Mar 10 09:54:12 2007 +++ llvm/lib/Support/ConstantRange.cpp Sat Mar 31 22:47:44 2007 @@ -250,9 +250,9 @@ /// unionWith - Return the range that results from the union of this range with /// another range. The resultant range is guaranteed to include the elements of -/// both sets, but may contain more. For example, [3, 9) union [12,15) is [3, -/// 15), which includes 9, 10, and 11, which were not included in either set -/// before. +/// both sets, but may contain more. For example, [3, 9) union [12,15) is +/// [3, 15), which includes 9, 10, and 11, which were not included in either +/// set before. /// ConstantRange ConstantRange::unionWith(const ConstantRange &CR) const { assert(getBitWidth() == CR.getBitWidth() && @@ -261,13 +261,71 @@ if ( isFullSet() || CR.isEmptySet()) return *this; if (CR.isFullSet() || isEmptySet()) return CR; + if (!isWrappedSet() && CR.isWrappedSet()) return CR.unionWith(*this); + APInt L = Lower, U = Upper; - if (!contains(CR.Lower)) - L = APIntOps::umin(L, CR.Lower); + if (!isWrappedSet() && !CR.isWrappedSet()) { + if (CR.Lower.ult(L)) + L = CR.Lower; + + if (CR.Upper.ugt(U)) + U = CR.Upper; + } + + if (isWrappedSet() && !CR.isWrappedSet()) { + if ((CR.Lower.ult(Upper) && CR.Upper.ult(Upper)) || + (CR.Lower.ugt(Lower) && CR.Upper.ugt(Lower))) { + return *this; + } + + if (CR.Lower.ule(Upper) && Lower.ule(CR.Upper)) { + return ConstantRange(getBitWidth()); + } + + if (CR.Lower.ule(Upper) && CR.Upper.ule(Lower)) { + APInt d1 = CR.Upper - Upper, d2 = Lower - CR.Upper; + if (d1.ult(d2)) { + U = CR.Upper; + } else { + L = CR.Upper; + } + } + + if (Upper.ult(CR.Lower) && CR.Upper.ult(Lower)) { + APInt d1 = CR.Lower - Upper, d2 = Lower - CR.Upper; + if (d1.ult(d2)) { + U = CR.Lower + 1; + } else { + L = CR.Upper - 1; + } + } + + if (Upper.ult(CR.Lower) && Lower.ult(CR.Upper)) { + APInt d1 = CR.Lower - Upper, d2 = Lower - CR.Lower; + + if (d1.ult(d2)) { + U = CR.Lower + 1; + } else { + L = CR.Lower; + } + } + } + + if (isWrappedSet() && CR.isWrappedSet()) { + if (Lower.ult(CR.Upper) || CR.Lower.ult(Upper)) + return ConstantRange(getBitWidth()); + + if (CR.Upper.ugt(U)) { + U = CR.Upper; + } + + if (CR.Lower.ult(L)) { + L = CR.Lower; + } - if (!contains(CR.Upper - 1)) - U = APIntOps::umax(U, CR.Upper); + if (L == U) return ConstantRange(getBitWidth()); + } return ConstantRange(L, U); } From sabre at nondot.org Sun Apr 1 00:35:10 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 1 Apr 2007 00:35:10 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/2007-03-31-InfiniteLoop.ll Message-ID: <200704010535.l315ZAGv005793@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/InstCombine: 2007-03-31-InfiniteLoop.ll added (r1.1) --- Log message: New testcase --- Diffs of the changes: (+301 -0) 2007-03-31-InfiniteLoop.ll | 301 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 301 insertions(+) Index: llvm/test/Transforms/InstCombine/2007-03-31-InfiniteLoop.ll diff -c /dev/null llvm/test/Transforms/InstCombine/2007-03-31-InfiniteLoop.ll:1.1 *** /dev/null Sun Apr 1 00:35:03 2007 --- llvm/test/Transforms/InstCombine/2007-03-31-InfiniteLoop.ll Sun Apr 1 00:34:53 2007 *************** *** 0 **** --- 1,301 ---- + ; RUN: llvm-as < %s | opt -instcombine -disable-output + + 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" + target triple = "i686-apple-darwin8" + %struct.ZZIP_FILE = type { %struct.zzip_dir*, i32, i32, i32, i32, i32, i32, i64, i8*, i64, %struct.z_stream, %struct.zzip_plugin_io* } + %struct.anon = type { %struct.ZZIP_FILE*, i8* } + %struct.internal_state = type { i32 } + %struct.z_stream = type { i8*, i32, i32, i8*, i32, i32, i8*, %struct.internal_state*, i8* (i8*, i32, i32)*, void (i8*, i8*)*, i8*, i32, i32, i32 } + %struct.zzip_dir = type { i32, i32, i32, %struct.anon, %struct.zzip_dir_hdr*, %struct.zzip_dir_hdr*, %struct.ZZIP_FILE*, %struct.zzip_dirent, i8*, i8*, i8**, %struct.zzip_plugin_io* } + %struct.zzip_dir_hdr = type { i32, i32, i32, i32, i16, i16, i8, i16, [1 x i8] } + %struct.zzip_dirent = type { i32, i32, i32, i16, i8*, i32, i32 } + %struct.zzip_plugin_io = type { i32 (i8*, i32, ...)*, i32 (i32)*, i32 (i32, i8*, i32)*, i64 (i32, i64, i32)*, i64 (i32)*, i32 } + + define %struct.ZZIP_FILE* @zzip_open_shared_io(%struct.ZZIP_FILE* %stream, i8* %filename, i32 %o_flags, i32 %o_modes, i8** %ext, %struct.zzip_plugin_io* %io) { + entry: + %basename = alloca [1024 x i8], align 16 ; <[1024 x i8]*> [#uses=5] + %e = alloca i32, align 4 ; [#uses=4] + icmp eq %struct.ZZIP_FILE* %stream, null ; :0 [#uses=1] + br i1 %0, label %cond_next22, label %cond_true + + cond_true: ; preds = %entry + %tmp3 = getelementptr %struct.ZZIP_FILE* %stream, i32 0, i32 0 ; <%struct.zzip_dir**> [#uses=1] + %tmp4 = load %struct.zzip_dir** %tmp3 ; <%struct.zzip_dir*> [#uses=1] + icmp eq %struct.zzip_dir* %tmp4, null ; :1 [#uses=1] + br i1 %1, label %cond_next22, label %cond_true5 + + cond_true5: ; preds = %cond_true + icmp eq i8** %ext, null ; :2 [#uses=1] + br i1 %2, label %cond_true7, label %cond_next + + cond_true7: ; preds = %cond_true5 + %tmp9 = getelementptr %struct.ZZIP_FILE* %stream, i32 0, i32 0 ; <%struct.zzip_dir**> [#uses=1] + %tmp10 = load %struct.zzip_dir** %tmp9 ; <%struct.zzip_dir*> [#uses=1] + %tmp11 = getelementptr %struct.zzip_dir* %tmp10, i32 0, i32 10 ; [#uses=1] + %tmp12 = load i8*** %tmp11 ; [#uses=1] + br label %cond_next + + cond_next: ; preds = %cond_true7, %cond_true5 + %ext_addr.0 = phi i8** [ %ext, %cond_true5 ], [ %tmp12, %cond_true7 ] ; [#uses=2] + icmp eq %struct.zzip_plugin_io* %io, null ; :3 [#uses=1] + br i1 %3, label %cond_true14, label %cond_next22 + + cond_true14: ; preds = %cond_next + %tmp16 = getelementptr %struct.ZZIP_FILE* %stream, i32 0, i32 0 ; <%struct.zzip_dir**> [#uses=1] + %tmp17 = load %struct.zzip_dir** %tmp16 ; <%struct.zzip_dir*> [#uses=1] + %tmp18 = getelementptr %struct.zzip_dir* %tmp17, i32 0, i32 11 ; <%struct.zzip_plugin_io**> [#uses=1] + %tmp19 = load %struct.zzip_plugin_io** %tmp18 ; <%struct.zzip_plugin_io*> [#uses=1] + br label %cond_next22 + + cond_next22: ; preds = %cond_true14, %cond_next, %cond_true, %entry + %io_addr.0 = phi %struct.zzip_plugin_io* [ %io, %entry ], [ %io, %cond_true ], [ %io, %cond_next ], [ %tmp19, %cond_true14 ] ; <%struct.zzip_plugin_io*> [#uses=2] + %ext_addr.1 = phi i8** [ %ext, %entry ], [ %ext, %cond_true ], [ %ext_addr.0, %cond_next ], [ %ext_addr.0, %cond_true14 ] ; [#uses=2] + icmp eq %struct.zzip_plugin_io* %io_addr.0, null ; :4 [#uses=1] + br i1 %4, label %cond_true24, label %cond_next26 + + cond_true24: ; preds = %cond_next22 + %tmp25 = call %struct.zzip_plugin_io* @zzip_get_default_io( ) ; <%struct.zzip_plugin_io*> [#uses=1] + br label %cond_next26 + + cond_next26: ; preds = %cond_true24, %cond_next22 + %io_addr.1 = phi %struct.zzip_plugin_io* [ %io_addr.0, %cond_next22 ], [ %tmp25, %cond_true24 ] ; <%struct.zzip_plugin_io*> [#uses=4] + %tmp28 = and i32 %o_modes, 81920 ; [#uses=1] + icmp eq i32 %tmp28, 0 ; :5 [#uses=1] + br i1 %5, label %try_real, label %try_zzip + + try_real: ; preds = %bb223, %cond_next26 + %fd160.2 = phi i32 [ undef, %cond_next26 ], [ %fd160.0, %bb223 ] ; [#uses=1] + %len.2 = phi i32 [ undef, %cond_next26 ], [ %len.0, %bb223 ] ; [#uses=1] + %o_flags_addr.1 = phi i32 [ %o_flags, %cond_next26 ], [ %o_flags_addr.0, %bb223 ] ; [#uses=2] + %tmp33348 = and i32 %o_modes, 262144 ; [#uses=1] + icmp eq i32 %tmp33348, 0 ; :6 [#uses=1] + br i1 %6, label %cond_next38, label %cond_true35 + + cond_true35: ; preds = %try_real + %tmp36 = call %struct.zzip_plugin_io* @zzip_get_default_io( ) ; <%struct.zzip_plugin_io*> [#uses=1] + br label %cond_next38 + + cond_next38: ; preds = %cond_true35, %try_real + %iftmp.21.0 = phi %struct.zzip_plugin_io* [ %tmp36, %cond_true35 ], [ %io_addr.1, %try_real ] ; <%struct.zzip_plugin_io*> [#uses=3] + %tmp41 = getelementptr %struct.zzip_plugin_io* %iftmp.21.0, i32 0, i32 0 ; [#uses=1] + %tmp42 = load i32 (i8*, i32, ...)** %tmp41 ; [#uses=1] + %tmp45 = call i32 (i8*, i32, ...)* %tmp42( i8* %filename, i32 %o_flags_addr.1 ) ; [#uses=3] + icmp eq i32 %tmp45, -1 ; :7 [#uses=1] + br i1 %7, label %cond_next67, label %cond_true47 + + cond_true47: ; preds = %cond_next38 + %tmp48 = call i8* @cli_calloc( i32 1, i32 108 ) ; [#uses=2] + %tmp4849 = bitcast i8* %tmp48 to %struct.ZZIP_FILE* ; <%struct.ZZIP_FILE*> [#uses=3] + icmp eq i8* %tmp48, null ; :8 [#uses=1] + br i1 %8, label %cond_true51, label %cond_next58 + + cond_true51: ; preds = %cond_true47 + %tmp53 = getelementptr %struct.zzip_plugin_io* %iftmp.21.0, i32 0, i32 1 ; [#uses=1] + %tmp54 = load i32 (i32)** %tmp53 ; [#uses=1] + %tmp56 = call i32 %tmp54( i32 %tmp45 ) ; [#uses=0] + ret %struct.ZZIP_FILE* null + + cond_next58: ; preds = %cond_true47 + %tmp60 = getelementptr %struct.ZZIP_FILE* %tmp4849, i32 0, i32 1 ; [#uses=1] + store i32 %tmp45, i32* %tmp60 + %tmp63 = getelementptr %struct.ZZIP_FILE* %tmp4849, i32 0, i32 11 ; <%struct.zzip_plugin_io**> [#uses=1] + store %struct.zzip_plugin_io* %iftmp.21.0, %struct.zzip_plugin_io** %tmp63 + ret %struct.ZZIP_FILE* %tmp4849 + + cond_next67: ; preds = %cond_next38 + %tmp70716 = and i32 %o_modes, 16384 ; [#uses=1] + icmp eq i32 %tmp70716, 0 ; :9 [#uses=1] + br i1 %9, label %try_zzip, label %return + + try_zzip: ; preds = %cond_next67, %cond_next26 + %fd160.3 = phi i32 [ %fd160.2, %cond_next67 ], [ undef, %cond_next26 ] ; [#uses=6] + %len.3 = phi i32 [ %len.2, %cond_next67 ], [ undef, %cond_next26 ] ; [#uses=3] + %o_flags_addr.3 = phi i32 [ %o_flags_addr.1, %cond_next67 ], [ %o_flags, %cond_next26 ] ; [#uses=4] + %tmp76 = and i32 %o_flags_addr.3, 513 ; [#uses=1] + icmp eq i32 %tmp76, 0 ; :10 [#uses=1] + br i1 %10, label %cond_next80, label %cond_true77 + + cond_true77: ; preds = %try_zzip + %tmp78 = call i32* @__error( ) ; [#uses=1] + store i32 22, i32* %tmp78 + ret %struct.ZZIP_FILE* null + + cond_next80: ; preds = %try_zzip + %tmp83844 = and i32 %o_flags_addr.3, 2 ; [#uses=1] + icmp eq i32 %tmp83844, 0 ; :11 [#uses=1] + %tmp87 = xor i32 %o_flags_addr.3, 2 ; [#uses=1] + %o_flags_addr.0 = select i1 %11, i32 %o_flags_addr.3, i32 %tmp87 ; [#uses=2] + %basename90 = getelementptr [1024 x i8]* %basename, i32 0, i32 0 ; [#uses=1] + %tmp92 = call i8* @strcpy( i8* %basename90, i8* %filename ) ; [#uses=0] + icmp eq %struct.ZZIP_FILE* %stream, null ; :12 [#uses=1] + br i1 %12, label %bb219, label %cond_true94 + + cond_true94: ; preds = %cond_next80 + %tmp96 = getelementptr %struct.ZZIP_FILE* %stream, i32 0, i32 0 ; <%struct.zzip_dir**> [#uses=1] + %tmp97 = load %struct.zzip_dir** %tmp96 ; <%struct.zzip_dir*> [#uses=1] + icmp eq %struct.zzip_dir* %tmp97, null ; :13 [#uses=1] + br i1 %13, label %bb219, label %cond_true98 + + cond_true98: ; preds = %cond_true94 + %tmp100 = getelementptr %struct.ZZIP_FILE* %stream, i32 0, i32 0 ; <%struct.zzip_dir**> [#uses=1] + %tmp101 = load %struct.zzip_dir** %tmp100 ; <%struct.zzip_dir*> [#uses=1] + %tmp102 = getelementptr %struct.zzip_dir* %tmp101, i32 0, i32 9 ; [#uses=1] + %tmp103 = load i8** %tmp102 ; [#uses=1] + icmp eq i8* %tmp103, null ; :14 [#uses=1] + br i1 %14, label %bb219, label %cond_true104 + + cond_true104: ; preds = %cond_true98 + %tmp106 = getelementptr %struct.ZZIP_FILE* %stream, i32 0, i32 0 ; <%struct.zzip_dir**> [#uses=1] + %tmp107 = load %struct.zzip_dir** %tmp106 ; <%struct.zzip_dir*> [#uses=1] + %tmp108 = getelementptr %struct.zzip_dir* %tmp107, i32 0, i32 9 ; [#uses=1] + %tmp109 = load i8** %tmp108 ; [#uses=1] + %tmp110 = call i32 @strlen( i8* %tmp109 ) ; [#uses=7] + %tmp112 = getelementptr %struct.ZZIP_FILE* %stream, i32 0, i32 0 ; <%struct.zzip_dir**> [#uses=1] + %tmp113 = load %struct.zzip_dir** %tmp112 ; <%struct.zzip_dir*> [#uses=1] + %tmp114 = getelementptr %struct.zzip_dir* %tmp113, i32 0, i32 9 ; [#uses=1] + %tmp115 = load i8** %tmp114 ; [#uses=1] + %tmp118 = call i32 @memcmp( i8* %filename, i8* %tmp115, i32 %tmp110 ) ; [#uses=1] + icmp eq i32 %tmp118, 0 ; :15 [#uses=1] + br i1 %15, label %cond_true119, label %bb219 + + cond_true119: ; preds = %cond_true104 + %tmp122 = getelementptr i8* %filename, i32 %tmp110 ; [#uses=1] + %tmp123 = load i8* %tmp122 ; [#uses=1] + icmp eq i8 %tmp123, 47 ; :16 [#uses=1] + br i1 %16, label %cond_true124, label %bb219 + + cond_true124: ; preds = %cond_true119 + %tmp126 = add i32 %tmp110, 1 ; [#uses=1] + %tmp128 = getelementptr i8* %filename, i32 %tmp126 ; [#uses=1] + %tmp129 = load i8* %tmp128 ; [#uses=1] + icmp eq i8 %tmp129, 0 ; :17 [#uses=1] + br i1 %17, label %bb219, label %cond_true130 + + cond_true130: ; preds = %cond_true124 + %tmp134.sum = add i32 %tmp110, 1 ; [#uses=1] + %tmp135 = getelementptr i8* %filename, i32 %tmp134.sum ; [#uses=1] + %tmp137 = getelementptr %struct.ZZIP_FILE* %stream, i32 0, i32 0 ; <%struct.zzip_dir**> [#uses=1] + %tmp138 = load %struct.zzip_dir** %tmp137 ; <%struct.zzip_dir*> [#uses=1] + %tmp140 = call %struct.ZZIP_FILE* @zzip_file_open( %struct.zzip_dir* %tmp138, i8* %tmp135, i32 %o_modes, i32 -1 ) ; <%struct.ZZIP_FILE*> [#uses=3] + icmp eq %struct.ZZIP_FILE* %tmp140, null ; :18 [#uses=1] + br i1 %18, label %cond_true142, label %return + + cond_true142: ; preds = %cond_true130 + %tmp144 = getelementptr %struct.ZZIP_FILE* %stream, i32 0, i32 0 ; <%struct.zzip_dir**> [#uses=1] + %tmp145 = load %struct.zzip_dir** %tmp144 ; <%struct.zzip_dir*> [#uses=1] + %tmp146 = getelementptr %struct.zzip_dir* %tmp145, i32 0, i32 1 ; [#uses=1] + %tmp147 = load i32* %tmp146 ; [#uses=1] + %tmp148 = call i32 @zzip_errno( i32 %tmp147 ) ; [#uses=1] + %tmp149 = call i32* @__error( ) ; [#uses=1] + store i32 %tmp148, i32* %tmp149 + ret %struct.ZZIP_FILE* %tmp140 + + bb: ; preds = %bb219 + store i32 0, i32* %e + store i8 0, i8* %tmp221 + %basename162 = getelementptr [1024 x i8]* %basename, i32 0, i32 0 ; [#uses=1] + %tmp166 = call i32 @__zzip_try_open( i8* %basename162, i32 %o_flags_addr.0, i8** %ext_addr.1, %struct.zzip_plugin_io* %io_addr.1 ) ; [#uses=4] + icmp eq i32 %tmp166, -1 ; :19 [#uses=1] + br i1 %19, label %bb219, label %cond_next169 + + cond_next169: ; preds = %bb + %tmp173 = call %struct.zzip_dir* @zzip_dir_fdopen_ext_io( i32 %tmp166, i32* %e, i8** %ext_addr.1, %struct.zzip_plugin_io* %io_addr.1 ) ; <%struct.zzip_dir*> [#uses=7] + %tmp174 = load i32* %e ; [#uses=1] + icmp eq i32 %tmp174, 0 ; :20 [#uses=1] + br i1 %20, label %cond_next185, label %cond_true175 + + cond_true175: ; preds = %cond_next169 + %tmp176 = load i32* %e ; [#uses=1] + %tmp177 = call i32 @zzip_errno( i32 %tmp176 ) ; [#uses=1] + %tmp178 = call i32* @__error( ) ; [#uses=1] + store i32 %tmp177, i32* %tmp178 + %tmp180 = getelementptr %struct.zzip_plugin_io* %io_addr.1, i32 0, i32 1 ; [#uses=1] + %tmp181 = load i32 (i32)** %tmp180 ; [#uses=1] + %tmp183 = call i32 %tmp181( i32 %tmp166 ) ; [#uses=0] + ret %struct.ZZIP_FILE* null + + cond_next185: ; preds = %cond_next169 + %tmp186187 = ptrtoint i8* %tmp221 to i32 ; [#uses=1] + %basename188189 = ptrtoint [1024 x i8]* %basename to i32 ; [#uses=1] + %tmp190 = sub i32 %tmp186187, %basename188189 ; [#uses=1] + %tmp192.sum = add i32 %tmp190, 1 ; [#uses=1] + %tmp193 = getelementptr i8* %filename, i32 %tmp192.sum ; [#uses=1] + %tmp196 = call %struct.ZZIP_FILE* @zzip_file_open( %struct.zzip_dir* %tmp173, i8* %tmp193, i32 %o_modes, i32 -1 ) ; <%struct.ZZIP_FILE*> [#uses=4] + icmp eq %struct.ZZIP_FILE* %tmp196, null ; :21 [#uses=1] + br i1 %21, label %cond_true198, label %cond_false204 + + cond_true198: ; preds = %cond_next185 + %tmp200 = getelementptr %struct.zzip_dir* %tmp173, i32 0, i32 1 ; [#uses=1] + %tmp201 = load i32* %tmp200 ; [#uses=1] + %tmp202 = call i32 @zzip_errno( i32 %tmp201 ) ; [#uses=1] + %tmp203 = call i32* @__error( ) ; [#uses=1] + store i32 %tmp202, i32* %tmp203 + %tmp2169 = call i32 @zzip_dir_close( %struct.zzip_dir* %tmp173 ) ; [#uses=0] + ret %struct.ZZIP_FILE* %tmp196 + + cond_false204: ; preds = %cond_next185 + %tmp206 = getelementptr %struct.zzip_dir* %tmp173, i32 0, i32 9 ; [#uses=1] + %tmp207 = load i8** %tmp206 ; [#uses=1] + icmp eq i8* %tmp207, null ; :22 [#uses=1] + br i1 %22, label %cond_true208, label %cond_next214 + + cond_true208: ; preds = %cond_false204 + %basename209 = getelementptr [1024 x i8]* %basename, i32 0, i32 0 ; [#uses=1] + %tmp210 = call i8* @strdup( i8* %basename209 ) ; [#uses=1] + %tmp212 = getelementptr %struct.zzip_dir* %tmp173, i32 0, i32 9 ; [#uses=1] + store i8* %tmp210, i8** %tmp212 + %tmp21610 = call i32 @zzip_dir_close( %struct.zzip_dir* %tmp173 ) ; [#uses=0] + ret %struct.ZZIP_FILE* %tmp196 + + cond_next214: ; preds = %cond_false204 + %tmp216 = call i32 @zzip_dir_close( %struct.zzip_dir* %tmp173 ) ; [#uses=0] + ret %struct.ZZIP_FILE* %tmp196 + + bb219: ; preds = %bb, %cond_true124, %cond_true119, %cond_true104, %cond_true98, %cond_true94, %cond_next80 + %fd160.0 = phi i32 [ %fd160.3, %cond_next80 ], [ %tmp166, %bb ], [ %fd160.3, %cond_true94 ], [ %fd160.3, %cond_true98 ], [ %fd160.3, %cond_true104 ], [ %fd160.3, %cond_true119 ], [ %fd160.3, %cond_true124 ] ; [#uses=1] + %len.0 = phi i32 [ %len.3, %cond_next80 ], [ %len.0, %bb ], [ %len.3, %cond_true94 ], [ %len.3, %cond_true98 ], [ %tmp110, %cond_true104 ], [ %tmp110, %cond_true119 ], [ %tmp110, %cond_true124 ] ; [#uses=2] + %basename220 = getelementptr [1024 x i8]* %basename, i32 0, i32 0 ; [#uses=1] + %tmp221 = call i8* @strrchr( i8* %basename220, i32 47 ) ; [#uses=3] + icmp eq i8* %tmp221, null ; :23 [#uses=1] + br i1 %23, label %bb223, label %bb + + bb223: ; preds = %bb219 + %tmp2262272 = and i32 %o_modes, 16384 ; [#uses=1] + icmp eq i32 %tmp2262272, 0 ; :24 [#uses=1] + br i1 %24, label %cond_next229, label %try_real + + cond_next229: ; preds = %bb223 + %tmp230 = call i32* @__error( ) ; [#uses=1] + store i32 2, i32* %tmp230 + ret %struct.ZZIP_FILE* null + + return: ; preds = %cond_true130, %cond_next67 + %retval.0 = phi %struct.ZZIP_FILE* [ null, %cond_next67 ], [ %tmp140, %cond_true130 ] ; <%struct.ZZIP_FILE*> [#uses=1] + ret %struct.ZZIP_FILE* %retval.0 + } + + declare i32 @zzip_dir_close(%struct.zzip_dir*) + + declare i8* @strrchr(i8*, i32) + + declare %struct.ZZIP_FILE* @zzip_file_open(%struct.zzip_dir*, i8*, i32, i32) + + declare i8* @cli_calloc(i32, i32) + + declare i32 @zzip_errno(i32) + + declare i32* @__error() + + declare %struct.zzip_plugin_io* @zzip_get_default_io() + + declare i8* @strcpy(i8*, i8*) + + declare i32 @strlen(i8*) + + declare i32 @memcmp(i8*, i8*, i32) + + declare i32 @__zzip_try_open(i8*, i32, i8**, %struct.zzip_plugin_io*) + + declare %struct.zzip_dir* @zzip_dir_fdopen_ext_io(i32, i32*, i8**, %struct.zzip_plugin_io*) + + declare i8* @strdup(i8*) From sabre at nondot.org Sun Apr 1 00:36:54 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 1 Apr 2007 00:36:54 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200704010536.l315as3K005904@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.714 -> 1.715 --- Log message: Fix InstCombine/2007-03-31-InfiniteLoop.ll --- Diffs of the changes: (+3 -1) InstructionCombining.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.714 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.715 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.714 Fri Mar 30 21:50:26 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sun Apr 1 00:36:37 2007 @@ -4083,8 +4083,10 @@ else if (Op0 == B) // A^(B^A) == B return ReplaceInstUsesWith(I, A); } else if (match(Op1I, m_And(m_Value(A), m_Value(B))) && Op1I->hasOneUse()){ - if (A == Op0) // A^(A&B) -> A^(B&A) + if (A == Op0) { // A^(A&B) -> A^(B&A) Op1I->swapOperands(); + std::swap(A, B); + } if (B == Op0) { // A^(B&A) -> (B&A)^A I.swapOperands(); // Simplified below. std::swap(Op0, Op1); From sabre at nondot.org Sun Apr 1 01:19:58 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 1 Apr 2007 01:19:58 -0500 Subject: [llvm-commits] CVS: llvm/test/C++Frontend/2007-03-27-FunctionVarRename.cpp Message-ID: <200704010619.l316Jwdg007388@zion.cs.uiuc.edu> Changes in directory llvm/test/C++Frontend: 2007-03-27-FunctionVarRename.cpp updated: 1.1 -> 1.2 --- Log message: not not! --- Diffs of the changes: (+1 -1) 2007-03-27-FunctionVarRename.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/test/C++Frontend/2007-03-27-FunctionVarRename.cpp diff -u llvm/test/C++Frontend/2007-03-27-FunctionVarRename.cpp:1.1 llvm/test/C++Frontend/2007-03-27-FunctionVarRename.cpp:1.2 --- llvm/test/C++Frontend/2007-03-27-FunctionVarRename.cpp:1.1 Tue Mar 27 19:03:10 2007 +++ llvm/test/C++Frontend/2007-03-27-FunctionVarRename.cpp Sun Apr 1 01:19:41 2007 @@ -1,5 +1,5 @@ // RUN: %llvmgxx %s -emit-llvm -S -o - | not grep 'eprintf1' && -// RUN: %llvmgxx %s -emit-llvm -S -o - | not grep 'eprintf' +// RUN: %llvmgxx %s -emit-llvm -S -o - | grep 'eprintf' // Only one eprintf should exist in the output From reid at x10sys.com Sun Apr 1 02:18:04 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:18:04 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/ValueTypes.h ValueTypes.td Message-ID: <200704010718.l317I4tm015721@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: ValueTypes.h updated: 1.31 -> 1.32 ValueTypes.td updated: 1.3 -> 1.4 --- Log message: For PR1297: http://llvm.org/PR1297 : Add an "iAny" ValueType as a place holder for an integer type of any bit width. This is used for intrinsics overloading on integer type. --- Diffs of the changes: (+7 -0) ValueTypes.h | 5 +++++ ValueTypes.td | 2 ++ 2 files changed, 7 insertions(+) Index: llvm/include/llvm/CodeGen/ValueTypes.h diff -u llvm/include/llvm/CodeGen/ValueTypes.h:1.31 llvm/include/llvm/CodeGen/ValueTypes.h:1.32 --- llvm/include/llvm/CodeGen/ValueTypes.h:1.31 Fri Mar 30 23:03:02 2007 +++ llvm/include/llvm/CodeGen/ValueTypes.h Sun Apr 1 02:17:45 2007 @@ -66,6 +66,11 @@ LAST_VALUETYPE = 25, // This always remains at the end of the list. + // iAny - An integer value of any bit width. This is used for intrinsics + // that have overloadings based on integer bit widths. This is only for + // tblgen's consumption! + iAny = 254, + // iPTR - An int value the size of the pointer of the current // target. This should only be used internal to tblgen! iPTR = 255 Index: llvm/include/llvm/CodeGen/ValueTypes.td diff -u llvm/include/llvm/CodeGen/ValueTypes.td:1.3 llvm/include/llvm/CodeGen/ValueTypes.td:1.4 --- llvm/include/llvm/CodeGen/ValueTypes.td:1.3 Sat Mar 24 12:36:26 2007 +++ llvm/include/llvm/CodeGen/ValueTypes.td Sun Apr 1 02:17:45 2007 @@ -46,6 +46,8 @@ def v4f32 : ValueType<128, 23>; // 4 x f32 vector value def v2f64 : ValueType<128, 24>; // 2 x f64 vector value +// Pseudo valuetype to represent "integer of any bit width" +def iAny : ValueType<0 , 254>; // integer value of any bit width // Pseudo valuetype mapped to the current pointer size. def iPTR : ValueType<0 , 255>; From reid at x10sys.com Sun Apr 1 02:20:19 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:20:19 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/CodeGenIntrinsics.h CodeGenTarget.cpp IntrinsicEmitter.cpp Message-ID: <200704010720.l317KJ9O017533@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: CodeGenIntrinsics.h updated: 1.11 -> 1.12 CodeGenTarget.cpp updated: 1.87 -> 1.88 IntrinsicEmitter.cpp updated: 1.29 -> 1.30 --- Log message: For PR1297: http://llvm.org/PR1297 : Implement code generation for overloaded intrinsic functions. The basic difference is that "actual" argument types must be provided when constructing intrinsic names and types. Also, for recognition, only the prefix is examined. If it matches, the suffix is assumed to match. The suffix is checked by the Verifier, however. --- Diffs of the changes: (+35 -17) CodeGenIntrinsics.h | 6 +++++- CodeGenTarget.cpp | 10 +++++++--- IntrinsicEmitter.cpp | 36 +++++++++++++++++++++++------------- 3 files changed, 35 insertions(+), 17 deletions(-) Index: llvm/utils/TableGen/CodeGenIntrinsics.h diff -u llvm/utils/TableGen/CodeGenIntrinsics.h:1.11 llvm/utils/TableGen/CodeGenIntrinsics.h:1.12 --- llvm/utils/TableGen/CodeGenIntrinsics.h:1.11 Sat Dec 30 23:50:28 2006 +++ llvm/utils/TableGen/CodeGenIntrinsics.h Sun Apr 1 02:20:01 2007 @@ -24,7 +24,7 @@ class CodeGenTarget; struct CodeGenIntrinsic { - Record *TheDef; // The actual record defining this instruction. + Record *TheDef; // The actual record defining this intrinsic. std::string Name; // The name of the LLVM function "llvm.bswap.i32" std::string EnumName; // The name of the enum "bswap_i32" std::string GCCBuiltinName;// Name of the corresponding GCC builtin, or "". @@ -49,6 +49,10 @@ NoMem, ReadArgMem, ReadMem, WriteArgMem, WriteMem } ModRef; + // This is set to true if the intrinsic is overloaded by its argument + // types. + bool isOverloaded; + CodeGenIntrinsic(Record *R, CodeGenTarget *CGT); }; Index: llvm/utils/TableGen/CodeGenTarget.cpp diff -u llvm/utils/TableGen/CodeGenTarget.cpp:1.87 llvm/utils/TableGen/CodeGenTarget.cpp:1.88 --- llvm/utils/TableGen/CodeGenTarget.cpp:1.87 Mon Mar 26 02:53:08 2007 +++ llvm/utils/TableGen/CodeGenTarget.cpp Sun Apr 1 02:20:02 2007 @@ -43,6 +43,7 @@ case MVT::i32: return "MVT::i32"; case MVT::i64: return "MVT::i64"; case MVT::i128: return "MVT::i128"; + case MVT::iAny: return "MVT::iAny"; case MVT::f32: return "MVT::f32"; case MVT::f64: return "MVT::f64"; case MVT::f80: return "MVT::f80"; @@ -74,6 +75,7 @@ case MVT::i32: return "MVT::i32"; case MVT::i64: return "MVT::i64"; case MVT::i128: return "MVT::i128"; + case MVT::iAny: return "MVT::iAny"; case MVT::f32: return "MVT::f32"; case MVT::f64: return "MVT::f64"; case MVT::f80: return "MVT::f80"; @@ -570,6 +572,7 @@ TheDef = R; std::string DefName = R->getName(); ModRef = WriteMem; + isOverloaded = false; if (DefName.size() <= 4 || std::string(DefName.begin(), DefName.begin()+4) != "int_") @@ -610,13 +613,14 @@ Record *TyEl = TypeList->getElementAsRecord(i); assert(TyEl->isSubClassOf("LLVMType") && "Expected a type!"); ArgTypes.push_back(TyEl->getValueAsString("TypeVal")); - - if (CGT) - ArgVTs.push_back(getValueType(TyEl->getValueAsDef("VT"), CGT)); + MVT::ValueType VT = getValueType(TyEl->getValueAsDef("VT"), CGT); + isOverloaded |= VT == MVT::iAny; + ArgVTs.push_back(VT); ArgTypeDefs.push_back(TyEl); } if (ArgTypes.size() == 0) throw "Intrinsic '"+DefName+"' needs at least a type for the ret value!"; + // Parse the intrinsic properties. ListInit *PropList = R->getValueAsListInit("Properties"); Index: llvm/utils/TableGen/IntrinsicEmitter.cpp diff -u llvm/utils/TableGen/IntrinsicEmitter.cpp:1.29 llvm/utils/TableGen/IntrinsicEmitter.cpp:1.30 --- llvm/utils/TableGen/IntrinsicEmitter.cpp:1.29 Thu Feb 15 13:26:16 2007 +++ llvm/utils/TableGen/IntrinsicEmitter.cpp Sun Apr 1 02:20:02 2007 @@ -74,9 +74,9 @@ EmitFnNameRecognizer(const std::vector &Ints, std::ostream &OS) { // Build a function name -> intrinsic name mapping. - std::map IntMapping; + std::map IntMapping; for (unsigned i = 0, e = Ints.size(); i != e; ++i) - IntMapping[Ints[i].Name] = Ints[i].EnumName; + IntMapping[Ints[i].Name] = i; OS << "// Function name -> enum value recognizer code.\n"; OS << "#ifdef GET_FUNCTION_RECOGNIZER\n"; @@ -84,7 +84,7 @@ OS << " default:\n"; // Emit the intrinsics in sorted order. char LastChar = 0; - for (std::map::iterator I = IntMapping.begin(), + for (std::map::iterator I = IntMapping.begin(), E = IntMapping.end(); I != E; ++I) { if (I->first[5] != LastChar) { LastChar = I->first[5]; @@ -92,9 +92,15 @@ OS << " case '" << LastChar << "':\n"; } - OS << " if (Len == " << I->first.size() - << " && !memcmp(Name, \"" << I->first << "\", Len)) return Intrinsic::" - << I->second << ";\n"; + // For overloaded intrinsics, only the prefix needs to match + if (Ints[I->second].isOverloaded) + OS << " if (Len >= " << I->first.size() + << " && !memcmp(Name, \"" << I->first << "\", " << I->first.size() + << ")) return Intrinsic::" << Ints[I->second].EnumName << ";\n"; + else + OS << " if (Len == " << I->first.size() + << " && !memcmp(Name, \"" << I->first << "\", Len)) return Intrinsic::" + << Ints[I->second].EnumName << ";\n"; } OS << " }\n"; OS << " // The 'llvm.' namespace is reserved!\n"; @@ -130,16 +136,20 @@ return false; } -static void EmitTypeGenerate(std::ostream &OS, Record *ArgType) { +static void EmitTypeGenerate(std::ostream &OS, Record *ArgType, unsigned ArgNo){ if (ArgType->isSubClassOf("LLVMIntegerType")) { - OS << "IntegerType::get(" << ArgType->getValueAsInt("Width") << ")"; + unsigned BitWidth = ArgType->getValueAsInt("Width"); + if (BitWidth == 0) + OS << "Tys[" << ArgNo << "]"; + else + OS << "IntegerType::get(" << BitWidth << ")"; } else if (ArgType->isSubClassOf("LLVMVectorType")) { OS << "VectorType::get("; - EmitTypeGenerate(OS, ArgType->getValueAsDef("ElTy")); + EmitTypeGenerate(OS, ArgType->getValueAsDef("ElTy"), ArgNo); OS << ", " << ArgType->getValueAsInt("NumElts") << ")"; } else if (ArgType->isSubClassOf("LLVMPointerType")) { OS << "PointerType::get("; - EmitTypeGenerate(OS, ArgType->getValueAsDef("ElTy")); + EmitTypeGenerate(OS, ArgType->getValueAsDef("ElTy"), ArgNo); OS << ")"; } else if (ArgType->isSubClassOf("LLVMEmptyStructType")) { OS << "StructType::get(std::vector())"; @@ -194,7 +204,7 @@ } const std::vector &ArgTypes = I->first; - OS << " VerifyIntrinsicPrototype(IF, "; + OS << " VerifyIntrinsicPrototype(ID, IF, "; bool VarArg = false; for (unsigned j = 0; j != ArgTypes.size(); ++j) { VarArg = EmitTypeVerify(OS, ArgTypes[j]); @@ -246,12 +256,12 @@ } OS << " ResultTy = "; - EmitTypeGenerate(OS, ArgTypes[0]); + EmitTypeGenerate(OS, ArgTypes[0], 0); OS << ";\n"; for (unsigned j = 1; j != N; ++j) { OS << " ArgTys.push_back("; - EmitTypeGenerate(OS, ArgTypes[j]); + EmitTypeGenerate(OS, ArgTypes[j], j); OS << ");\n"; } From reid at x10sys.com Sun Apr 1 02:23:14 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:23:14 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp Message-ID: <200704010723.l317NEYA017593@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Verifier.cpp updated: 1.197 -> 1.198 --- Log message: For PR1297: http://llvm.org/PR1297 : 1. Clear up confusion between "GotBits" and "ExpectBits". GotBits is the type actually provided. ExpectedBits is the type expected for the intrinsics. Before this patch, it was reversed! 2. Implement checks for overloaded intrinsics. This involves computing the suffix expected and making sure the suffix matches the function name. It also includes some intrinsic-specific checks such as ensuring that the bswap parameter and result are the same width and an even number of bytes. --- Diffs of the changes: (+42 -7) Verifier.cpp | 49 ++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 42 insertions(+), 7 deletions(-) Index: llvm/lib/VMCore/Verifier.cpp diff -u llvm/lib/VMCore/Verifier.cpp:1.197 llvm/lib/VMCore/Verifier.cpp:1.198 --- llvm/lib/VMCore/Verifier.cpp:1.197 Wed Feb 14 21:39:18 2007 +++ llvm/lib/VMCore/Verifier.cpp Sun Apr 1 02:22:57 2007 @@ -212,7 +212,7 @@ void visitUserOp2(Instruction &I) { visitUserOp1(I); } void visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI); - void VerifyIntrinsicPrototype(Function *F, ...); + void VerifyIntrinsicPrototype(Intrinsic::ID ID, Function *F, ...); void WriteValue(const Value *V) { if (!V) return; @@ -961,12 +961,17 @@ /// VerifyIntrinsicPrototype - TableGen emits calls to this function into /// Intrinsics.gen. This implements a little state machine that verifies the /// prototype of intrinsics. -void Verifier::VerifyIntrinsicPrototype(Function *F, ...) { +void Verifier::VerifyIntrinsicPrototype(Intrinsic::ID ID, Function *F, ...) { va_list VA; va_start(VA, F); const FunctionType *FTy = F->getFunctionType(); + // For overloaded intrinsics, the Suffix of the function name must match the + // types of the arguments. This variable keeps track of the expected + // suffix, to be checked at the end. + std::string Suffix; + // Note that "arg#0" is the return type. for (unsigned ArgNo = 0; 1; ++ArgNo) { int TypeID = va_arg(VA, int); @@ -987,7 +992,7 @@ } const Type *Ty; - if (ArgNo == 0) + if (ArgNo == 0) Ty = FTy->getReturnType(); else Ty = FTy->getParamType(ArgNo-1); @@ -1001,10 +1006,12 @@ } if (TypeID == Type::IntegerTyID) { - unsigned GotBits = (unsigned) va_arg(VA, int); - unsigned ExpectBits = cast(Ty)->getBitWidth(); - if (GotBits != ExpectBits) { - std::string bitmsg = " Expecting " + utostr(ExpectBits) + " but got " + + unsigned ExpectedBits = (unsigned) va_arg(VA, int); + unsigned GotBits = cast(Ty)->getBitWidth(); + if (ExpectedBits == 0) { + Suffix += ".i" + utostr(GotBits); + } else if (GotBits != ExpectedBits) { + std::string bitmsg = " Expected " + utostr(ExpectedBits) + " but got "+ utostr(GotBits) + " bits."; if (ArgNo == 0) CheckFailed("Intrinsic prototype has incorrect integer result width!" @@ -1014,6 +1021,21 @@ "incorrect integer width!" + bitmsg, F); break; } + // Check some constraints on various intrinsics. + switch (ID) { + default: break; // Not everything needs to be checked. + case Intrinsic::bswap: + if (GotBits < 16 || GotBits % 16 != 0) + CheckFailed("Intrinsic requires even byte width argument", F); + if (ArgNo == 1) { + unsigned ResultBits = + cast(FTy->getReturnType())->getBitWidth(); + if (GotBits != ResultBits) + CheckFailed("Intrinsic requires parameter and result bit " + "widths to match", F); + } + break; + } } else if (TypeID == Type::VectorTyID) { // If this is a packed argument, verify the number and type of elements. const VectorType *PTy = cast(Ty); @@ -1042,6 +1064,19 @@ } va_end(VA); + + // If we computed a Suffix then the intrinsic is overloaded and we need to + // make sure that the name of the function is correct. We add the suffix to + // the name of the intrinsic and compare against the given function name. If + // they are not the same, the function name is invalid. This ensures that + // overloading of intrinsics uses a sane and consistent naming convention. + if (!Suffix.empty()) { + std::string Name(Intrinsic::getName(ID)); + if (Name + Suffix != F->getName()) + CheckFailed("Overloaded intrinsic has incorrect suffix: '" + + F->getName().substr(Name.length()) + "'. It should be '" + + Suffix + "'", F); + } } From reid at x10sys.com Sun Apr 1 02:25:50 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:25:50 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Function.cpp Message-ID: <200704010725.l317Po2g017647@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Function.cpp updated: 1.114 -> 1.115 --- Log message: For PR1297: http://llvm.org/PR1297 : Implement "actual" argument types for the Intrinsic member functions. This involves changing the getName, getType, and getDeclaration methods to have optional parameters for the actual types. These are necessary in order for the type/name to be constructed properly for overloaded intrinsics. Only the caller knows the actual argument types desired. --- Diffs of the changes: (+14 -5) Function.cpp | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) Index: llvm/lib/VMCore/Function.cpp diff -u llvm/lib/VMCore/Function.cpp:1.114 llvm/lib/VMCore/Function.cpp:1.115 --- llvm/lib/VMCore/Function.cpp:1.114 Thu Feb 15 13:17:16 2007 +++ llvm/lib/VMCore/Function.cpp Sun Apr 1 02:25:33 2007 @@ -176,7 +176,7 @@ return 0; } -const char *Intrinsic::getName(ID id) { +std::string Intrinsic::getName(ID id, const Type **Tys, unsigned numTys) { assert(id < num_intrinsics && "Invalid intrinsic ID!"); const char * const Table[] = { "not_intrinsic", @@ -184,10 +184,17 @@ #include "llvm/Intrinsics.gen" #undef GET_INTRINSIC_NAME_TABLE }; - return Table[id]; + if (numTys == 0) + return Table[id]; + std::string Result(Table[id]); + for (unsigned i = 0; i < numTys; ++i) + if (Tys[i]) + Result += "." + Tys[i]->getDescription(); + return Result; } -const FunctionType *Intrinsic::getType(ID id) { +const FunctionType *Intrinsic::getType(ID id, const Type **Tys, + uint32_t numTys) { const Type *ResultTy = NULL; std::vector ArgTys; std::vector Attrs; @@ -200,10 +207,12 @@ return FunctionType::get(ResultTy, ArgTys, IsVarArg, Attrs); } -Function *Intrinsic::getDeclaration(Module *M, ID id) { +Function *Intrinsic::getDeclaration(Module *M, ID id, const Type **Tys, + unsigned numTys) { // There can never be multiple globals with the same name of different types, // because intrinsics must be a specific type. - return cast(M->getOrInsertFunction(getName(id), getType(id))); + return cast(M->getOrInsertFunction(getName(id, Tys, numTys), + getType(id, Tys, numTys))); } Value *IntrinsicInst::StripPointerCasts(Value *Ptr) { From reid at x10sys.com Sun Apr 1 02:26:53 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:26:53 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Intrinsics.h Message-ID: <200704010726.l317QrI9017675@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Intrinsics.h updated: 1.41 -> 1.42 --- Log message: For PR1297: http://llvm.org/PR1297 : Change the interface to the getName, getType, getDeclaration methods to include the "actual" types of the result/arguments. This is necessary to support overloaded intrinsics. --- Diffs of the changes: (+5 -3) Intrinsics.h | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) Index: llvm/include/llvm/Intrinsics.h diff -u llvm/include/llvm/Intrinsics.h:1.41 llvm/include/llvm/Intrinsics.h:1.42 --- llvm/include/llvm/Intrinsics.h:1.41 Wed Feb 7 14:38:26 2007 +++ llvm/include/llvm/Intrinsics.h Sun Apr 1 02:26:35 2007 @@ -18,6 +18,7 @@ namespace llvm { +class Type; class FunctionType; class Function; class Module; @@ -39,15 +40,16 @@ /// Intrinsic::getName(ID) - Return the LLVM name for an intrinsic, such as /// "llvm.ppc.altivec.lvx". - const char *getName(ID id); + std::string getName(ID id, const Type **Tys = 0, unsigned numTys = 0); /// Intrinsic::getType(ID) - Return the function type for an intrinsic. /// - const FunctionType *getType(ID id); + const FunctionType *getType(ID id, const Type **Tys = 0, unsigned numTys = 0); /// Intrinsic::getDeclaration(M, ID) - Create or insert an LLVM Function /// declaration for an intrinsic, and return it. - Function *getDeclaration(Module *M, ID id); + Function *getDeclaration(Module *M, ID id, const Type **Tys = 0, + unsigned numTys = 0); } // End Intrinsic namespace From reid at x10sys.com Sun Apr 1 02:28:54 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:28:54 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAGNodes.h Message-ID: <200704010728.l317Ss1V017718@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: SelectionDAGNodes.h updated: 1.182 -> 1.183 --- Log message: For PR1297: http://llvm.org/PR1297 : Intrinsic functions might need to be generated (if they are overloaded) so returning a const char* is no longer possible. Change getOperationName to return a std::string instead. --- Diffs of the changes: (+1 -1) SelectionDAGNodes.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.182 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.183 --- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.182 Fri Mar 23 13:44:11 2007 +++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Sun Apr 1 02:28:37 2007 @@ -911,7 +911,7 @@ /// getOperationName - Return the opcode of this operation for printing. /// - const char* getOperationName(const SelectionDAG *G = 0) const; + std::string getOperationName(const SelectionDAG *G = 0) const; static const char* getIndexedModeName(ISD::MemIndexedMode AM); void dump() const; void dump(const SelectionDAG *G) const; From reid at x10sys.com Sun Apr 1 02:31:42 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:31:42 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Intrinsics.td Message-ID: <200704010731.l317VgSq017792@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Intrinsics.td updated: 1.51 -> 1.52 --- Log message: For PR1297: http://llvm.org/PR1297 : Implement bswap, ctpop, ctlz, and cttz utilizing the new overloaded intrinsic feature of tblgen. By defining llvm_int_ty to have an ValueType of iAny, any intrinsic using that type becomes an overloaded intrinsic. This signals that a) any integer type could be used for that argument and b) the intrinsic needs a suffix to match each such argument for the actual intrinsic. --- Diffs of the changes: (+6 -19) Intrinsics.td | 25 ++++++------------------- 1 files changed, 6 insertions(+), 19 deletions(-) Index: llvm/include/llvm/Intrinsics.td diff -u llvm/include/llvm/Intrinsics.td:1.51 llvm/include/llvm/Intrinsics.td:1.52 --- llvm/include/llvm/Intrinsics.td:1.51 Mon Mar 26 02:53:08 2007 +++ llvm/include/llvm/Intrinsics.td Sun Apr 1 02:30:57 2007 @@ -78,7 +78,8 @@ } def llvm_void_ty : LLVMType; -def llvm_bool_ty : LLVMIntegerType; +def llvm_int_ty : LLVMIntegerType; +def llvm_i1_ty : LLVMIntegerType; def llvm_i8_ty : LLVMIntegerType; def llvm_i16_ty : LLVMIntegerType; def llvm_i32_ty : LLVMIntegerType; @@ -202,24 +203,10 @@ // None of these intrinsics accesses memory at all. let Properties = [IntrNoMem] in { - def int_bswap_i16 : Intrinsic<[llvm_i16_ty, llvm_i16_ty]>; - def int_bswap_i32 : Intrinsic<[llvm_i32_ty, llvm_i32_ty]>; - def int_bswap_i64 : Intrinsic<[llvm_i64_ty, llvm_i64_ty]>; - - def int_ctpop_i8 : Intrinsic<[llvm_i8_ty, llvm_i8_ty]>; - def int_ctpop_i16 : Intrinsic<[llvm_i16_ty, llvm_i16_ty]>; - def int_ctpop_i32 : Intrinsic<[llvm_i32_ty, llvm_i32_ty]>; - def int_ctpop_i64 : Intrinsic<[llvm_i64_ty, llvm_i64_ty]>; - - def int_ctlz_i8 : Intrinsic<[llvm_i8_ty, llvm_i8_ty]>; - def int_ctlz_i16 : Intrinsic<[llvm_i16_ty, llvm_i16_ty]>; - def int_ctlz_i32 : Intrinsic<[llvm_i32_ty, llvm_i32_ty]>; - def int_ctlz_i64 : Intrinsic<[llvm_i64_ty, llvm_i64_ty]>; - - def int_cttz_i8 : Intrinsic<[llvm_i8_ty, llvm_i8_ty]>; - def int_cttz_i16 : Intrinsic<[llvm_i16_ty, llvm_i16_ty]>; - def int_cttz_i32 : Intrinsic<[llvm_i32_ty, llvm_i32_ty]>; - def int_cttz_i64 : Intrinsic<[llvm_i64_ty, llvm_i64_ty]>; + def int_bswap: Intrinsic<[llvm_int_ty, llvm_int_ty]>; + def int_ctpop: Intrinsic<[llvm_i32_ty, llvm_int_ty]>; + def int_ctlz : Intrinsic<[llvm_i32_ty, llvm_int_ty]>; + def int_cttz : Intrinsic<[llvm_i32_ty, llvm_int_ty]>; } //===------------------------ Debugger Intrinsics -------------------------===// From reid at x10sys.com Sun Apr 1 02:32:36 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:32:36 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200704010732.l317WaoF017815@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAG.cpp updated: 1.394 -> 1.395 --- Log message: For PR1297: http://llvm.org/PR1297 : Change getOperationName to return std::string instead of const char* --- Diffs of the changes: (+1 -1) SelectionDAG.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.394 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.395 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.394 Fri Mar 30 16:38:07 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sun Apr 1 02:32:19 2007 @@ -2644,7 +2644,7 @@ return cast(OperandList[Num])->getValue(); } -const char *SDNode::getOperationName(const SelectionDAG *G) const { +std::string SDNode::getOperationName(const SelectionDAG *G) const { switch (getOpcode()) { default: if (getOpcode() < ISD::BUILTIN_OP_END) From reid at x10sys.com Sun Apr 1 02:34:28 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:34:28 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200704010734.l317YSec017855@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.400 -> 1.401 --- Log message: For PR1297: http://llvm.org/PR1297 : Adjust for changes in the bit counting intrinsics. They all return i32 now so we have to trunc/zext the DAG node accordingly. --- Diffs of the changes: (+31 -24) SelectionDAGISel.cpp | 55 ++++++++++++++++++++++++++++----------------------- 1 files changed, 31 insertions(+), 24 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.400 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.401 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.400 Fri Mar 30 23:18:03 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Sun Apr 1 02:34:11 2007 @@ -2328,37 +2328,44 @@ DAG.setRoot(Tmp.getValue(1)); return 0; } - case Intrinsic::bswap_i16: - case Intrinsic::bswap_i32: - case Intrinsic::bswap_i64: + case Intrinsic::bswap: setValue(&I, DAG.getNode(ISD::BSWAP, getValue(I.getOperand(1)).getValueType(), getValue(I.getOperand(1)))); return 0; - case Intrinsic::cttz_i8: - case Intrinsic::cttz_i16: - case Intrinsic::cttz_i32: - case Intrinsic::cttz_i64: - setValue(&I, DAG.getNode(ISD::CTTZ, - getValue(I.getOperand(1)).getValueType(), - getValue(I.getOperand(1)))); + case Intrinsic::cttz: { + SDOperand Arg = getValue(I.getOperand(1)); + MVT::ValueType Ty = Arg.getValueType(); + SDOperand result = DAG.getNode(ISD::CTTZ, Ty, Arg); + if (Ty < MVT::i32) + result = DAG.getNode(ISD::ZERO_EXTEND, MVT::i32, result); + else if (Ty > MVT::i32) + result = DAG.getNode(ISD::TRUNCATE, MVT::i32, result); + setValue(&I, result); return 0; - case Intrinsic::ctlz_i8: - case Intrinsic::ctlz_i16: - case Intrinsic::ctlz_i32: - case Intrinsic::ctlz_i64: - setValue(&I, DAG.getNode(ISD::CTLZ, - getValue(I.getOperand(1)).getValueType(), - getValue(I.getOperand(1)))); + } + case Intrinsic::ctlz: { + SDOperand Arg = getValue(I.getOperand(1)); + MVT::ValueType Ty = Arg.getValueType(); + SDOperand result = DAG.getNode(ISD::CTLZ, Ty, Arg); + if (Ty < MVT::i32) + result = DAG.getNode(ISD::ZERO_EXTEND, MVT::i32, result); + else if (Ty > MVT::i32) + result = DAG.getNode(ISD::TRUNCATE, MVT::i32, result); + setValue(&I, result); return 0; - case Intrinsic::ctpop_i8: - case Intrinsic::ctpop_i16: - case Intrinsic::ctpop_i32: - case Intrinsic::ctpop_i64: - setValue(&I, DAG.getNode(ISD::CTPOP, - getValue(I.getOperand(1)).getValueType(), - getValue(I.getOperand(1)))); + } + case Intrinsic::ctpop: { + SDOperand Arg = getValue(I.getOperand(1)); + MVT::ValueType Ty = Arg.getValueType(); + SDOperand result = DAG.getNode(ISD::CTPOP, Ty, Arg); + if (Ty < MVT::i32) + result = DAG.getNode(ISD::ZERO_EXTEND, MVT::i32, result); + else if (Ty > MVT::i32) + result = DAG.getNode(ISD::TRUNCATE, MVT::i32, result); + setValue(&I, result); return 0; + } case Intrinsic::stacksave: { SDOperand Op = getRoot(); SDOperand Tmp = DAG.getNode(ISD::STACKSAVE, From reid at x10sys.com Sun Apr 1 02:35:43 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:35:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/IntrinsicLowering.cpp Message-ID: <200704010735.l317ZhEo017895@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: IntrinsicLowering.cpp updated: 1.72 -> 1.73 --- Log message: For PR1297: http://llvm.org/PR1297 : Support overloaded intrinsics bswap, ctpop, cttz, ctlz. --- Diffs of the changes: (+4 -17) IntrinsicLowering.cpp | 21 ++++----------------- 1 files changed, 4 insertions(+), 17 deletions(-) Index: llvm/lib/CodeGen/IntrinsicLowering.cpp diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.72 llvm/lib/CodeGen/IntrinsicLowering.cpp:1.73 --- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.72 Thu Mar 1 14:24:30 2007 +++ llvm/lib/CodeGen/IntrinsicLowering.cpp Sun Apr 1 02:35:23 2007 @@ -236,8 +236,6 @@ return LowerCTPOP(V, IP); } - - void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) { Function *Callee = CI->getCalledFunction(); assert(Callee && "Cannot lower an indirect call!"); @@ -283,30 +281,19 @@ Type::VoidTy, AbortFCache); break; } - case Intrinsic::ctpop_i8: - case Intrinsic::ctpop_i16: - case Intrinsic::ctpop_i32: - case Intrinsic::ctpop_i64: + case Intrinsic::ctpop: CI->replaceAllUsesWith(LowerCTPOP(CI->getOperand(1), CI)); break; - case Intrinsic::bswap_i16: - case Intrinsic::bswap_i32: - case Intrinsic::bswap_i64: + case Intrinsic::bswap: CI->replaceAllUsesWith(LowerBSWAP(CI->getOperand(1), CI)); break; - case Intrinsic::ctlz_i8: - case Intrinsic::ctlz_i16: - case Intrinsic::ctlz_i32: - case Intrinsic::ctlz_i64: + case Intrinsic::ctlz: CI->replaceAllUsesWith(LowerCTLZ(CI->getOperand(1), CI)); break; - case Intrinsic::cttz_i8: - case Intrinsic::cttz_i16: - case Intrinsic::cttz_i32: - case Intrinsic::cttz_i64: { + case Intrinsic::cttz: { // cttz(x) -> ctpop(~X & (X-1)) Value *Src = CI->getOperand(1); Value *NotSrc = BinaryOperator::createNot(Src, Src->getName()+".not", CI); From reid at x10sys.com Sun Apr 1 02:35:45 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:35:45 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/ConstantFolding.cpp Message-ID: <200704010735.l317Zjp5017900@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: ConstantFolding.cpp updated: 1.20 -> 1.21 --- Log message: For PR1297: http://llvm.org/PR1297 : Support overloaded intrinsics bswap, ctpop, cttz, ctlz. --- Diffs of the changes: (+17 -23) ConstantFolding.cpp | 40 +++++++++++++++++----------------------- 1 files changed, 17 insertions(+), 23 deletions(-) Index: llvm/lib/Analysis/ConstantFolding.cpp diff -u llvm/lib/Analysis/ConstantFolding.cpp:1.20 llvm/lib/Analysis/ConstantFolding.cpp:1.21 --- llvm/lib/Analysis/ConstantFolding.cpp:1.20 Sun Mar 4 18:00:41 2007 +++ llvm/lib/Analysis/ConstantFolding.cpp Sun Apr 1 02:35:23 2007 @@ -317,24 +317,12 @@ switch (F->getIntrinsicID()) { case Intrinsic::sqrt_f32: case Intrinsic::sqrt_f64: - case Intrinsic::bswap_i16: - case Intrinsic::bswap_i32: - case Intrinsic::bswap_i64: case Intrinsic::powi_f32: case Intrinsic::powi_f64: - // FIXME: these should be constant folded as well - //case Intrinsic::ctpop_i8: - //case Intrinsic::ctpop_i16: - //case Intrinsic::ctpop_i32: - //case Intrinsic::ctpop_i64: - //case Intrinsic::ctlz_i8: - //case Intrinsic::ctlz_i16: - //case Intrinsic::ctlz_i32: - //case Intrinsic::ctlz_i64: - //case Intrinsic::cttz_i8: - //case Intrinsic::cttz_i16: - //case Intrinsic::cttz_i32: - //case Intrinsic::cttz_i64: + case Intrinsic::bswap: + case Intrinsic::ctpop: + case Intrinsic::ctlz: + case Intrinsic::cttz: return true; default: break; } @@ -445,13 +433,19 @@ break; } } else if (ConstantInt *Op = dyn_cast(Operands[0])) { - uint64_t V = Op->getZExtValue(); - if (Name == "llvm.bswap.i16") - return ConstantInt::get(Ty, ByteSwap_16(V)); - else if (Name == "llvm.bswap.i32") - return ConstantInt::get(Ty, ByteSwap_32(V)); - else if (Name == "llvm.bswap.i64") - return ConstantInt::get(Ty, ByteSwap_64(V)); + const IntegerType *OpTy = cast(Op->getType()); + if (Name.size() > 11 && !memcmp(&Name[0], "llvm.bswap", 10)) { + return ConstantInt::get(Op->getValue().byteSwap()); + } else if (Name.size() > 11 && !memcmp(&Name[0],"llvm.ctpop",10)) { + uint64_t ctpop = Op->getValue().countPopulation(); + return ConstantInt::get(OpTy, ctpop); + } else if (Name.size() > 10 && !memcmp(&Name[0], "llvm.cttz", 9)) { + uint64_t cttz = Op->getValue().countTrailingZeros(); + return ConstantInt::get(OpTy, cttz); + } else if (Name.size() > 10 && !memcmp(&Name[0], "llvm.ctlz", 9)) { + uint64_t ctlz = Op->getValue().countLeadingZeros(); + return ConstantInt::get(OpTy, ctlz); + } } } else if (NumOperands == 2) { if (ConstantFP *Op1 = dyn_cast(Operands[0])) { From reid at x10sys.com Sun Apr 1 02:35:46 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:35:46 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200704010735.l317ZkII017905@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.715 -> 1.716 --- Log message: For PR1297: http://llvm.org/PR1297 : Support overloaded intrinsics bswap, ctpop, cttz, ctlz. --- Diffs of the changes: (+7 -25) InstructionCombining.cpp | 32 +++++++------------------------- 1 files changed, 7 insertions(+), 25 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.715 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.716 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.715 Sun Apr 1 00:36:37 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sun Apr 1 02:35:23 2007 @@ -3624,11 +3624,11 @@ Module *M = I.getParent()->getParent()->getParent(); const char *FnName = 0; if (I.getType() == Type::Int16Ty) - FnName = "llvm.bswap.i16"; + FnName = "llvm.bswap.i16.i16"; else if (I.getType() == Type::Int32Ty) - FnName = "llvm.bswap.i32"; + FnName = "llvm.bswap.i32.i32"; else if (I.getType() == Type::Int64Ty) - FnName = "llvm.bswap.i64"; + FnName = "llvm.bswap.i64.i64"; else assert(0 && "Unknown integer type!"); Constant *F = M->getOrInsertFunction(FnName, I.getType(), I.getType(), NULL); @@ -5173,29 +5173,11 @@ default: break; } } else if (IntrinsicInst *II = dyn_cast(Op0)) { - // Handle set{eq|ne} , intcst. - switch (II->getIntrinsicID()) { - default: break; - case Intrinsic::bswap_i16: - // icmp eq (bswap(x)), c -> icmp eq (x,bswap(c)) - AddToWorkList(II); // Dead? - I.setOperand(0, II->getOperand(1)); - I.setOperand(1, ConstantInt::get(Type::Int16Ty, - ByteSwap_16(CI->getZExtValue()))); - return &I; - case Intrinsic::bswap_i32: - // icmp eq (bswap(x)), c -> icmp eq (x,bswap(c)) - AddToWorkList(II); // Dead? - I.setOperand(0, II->getOperand(1)); - I.setOperand(1, ConstantInt::get(Type::Int32Ty, - ByteSwap_32(CI->getZExtValue()))); - return &I; - case Intrinsic::bswap_i64: - // icmp eq (bswap(x)), c -> icmp eq (x,bswap(c)) - AddToWorkList(II); // Dead? + // Handle icmp {eq|ne} , intcst. + if (II->getIntrinsicID() == Intrinsic::bswap) { + AddToWorkList(II); I.setOperand(0, II->getOperand(1)); - I.setOperand(1, ConstantInt::get(Type::Int64Ty, - ByteSwap_64(CI->getZExtValue()))); + I.setOperand(1, ConstantInt::get(CI->getValue().byteSwap())); return &I; } } From reid at x10sys.com Sun Apr 1 02:36:50 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:36:50 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll 2007-03-24-cntlzd.ll bswap-load-store.ll Message-ID: <200704010736.l317aoWw017954@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/PowerPC: 2006-07-19-stwbrx-crash.ll updated: 1.2 -> 1.3 2007-03-24-cntlzd.ll updated: 1.1 -> 1.2 bswap-load-store.ll updated: 1.2 -> 1.3 --- Log message: For PR1297: http://llvm.org/PR1297 : Update these test cases to use proper signatures for bswap which is now and overloaded intrinsic. Its name must be of the form llvm.bswap.i32.i32 since both the parameter and the result or of type "iAny". Also, the bit counting intrinsics changed to always return i32. --- Diffs of the changes: (+12 -14) 2006-07-19-stwbrx-crash.ll | 4 ++-- 2007-03-24-cntlzd.ll | 10 ++++------ bswap-load-store.ll | 12 ++++++------ 3 files changed, 12 insertions(+), 14 deletions(-) Index: llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll diff -u llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll:1.2 llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll:1.3 --- llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll Sun Apr 1 02:36:28 2007 @@ -2,9 +2,9 @@ void %img2buf(int %symbol_size_in_bytes, ushort* %ui16) { %tmp93 = load ushort* null ; [#uses=1] - %tmp99 = call ushort %llvm.bswap.i16( ushort %tmp93 ) ; [#uses=1] + %tmp99 = call ushort %llvm.bswap.i16.i16( ushort %tmp93 ) ; [#uses=1] store ushort %tmp99, ushort* %ui16 ret void } -declare ushort %llvm.bswap.i16(ushort) +declare ushort %llvm.bswap.i16.i16(ushort) Index: llvm/test/CodeGen/PowerPC/2007-03-24-cntlzd.ll diff -u llvm/test/CodeGen/PowerPC/2007-03-24-cntlzd.ll:1.1 llvm/test/CodeGen/PowerPC/2007-03-24-cntlzd.ll:1.2 --- llvm/test/CodeGen/PowerPC/2007-03-24-cntlzd.ll:1.1 Sat Mar 24 23:43:51 2007 +++ llvm/test/CodeGen/PowerPC/2007-03-24-cntlzd.ll Sun Apr 1 02:36:28 2007 @@ -2,12 +2,10 @@ define i32 @_ZNK4llvm5APInt17countLeadingZerosEv(i64 *%t) { %tmp19 = load i64* %t - %tmp23 = tail call i64 @llvm.ctlz.i64( i64 %tmp19 ) ; [#uses=1] - %tmp2324 = trunc i64 %tmp23 to i32 ; [#uses=1] - %tmp89 = add i32 %tmp2324, -64 ; [#uses=1] - %tmp90 = add i32 %tmp89, 0 ; [#uses=1] + %tmp23 = tail call i32 @llvm.ctlz.i64( i64 %tmp19 ) ; [#uses=1] + %tmp89 = add i32 %tmp23, -64 ; [#uses=1] + %tmp90 = add i32 %tmp89, 0 ; [#uses=1] ret i32 %tmp90 } -declare i64 @llvm.ctlz.i64(i64) - +declare i32 @llvm.ctlz.i64(i64) Index: llvm/test/CodeGen/PowerPC/bswap-load-store.ll diff -u llvm/test/CodeGen/PowerPC/bswap-load-store.ll:1.2 llvm/test/CodeGen/PowerPC/bswap-load-store.ll:1.3 --- llvm/test/CodeGen/PowerPC/bswap-load-store.ll:1.2 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/PowerPC/bswap-load-store.ll Sun Apr 1 02:36:28 2007 @@ -8,7 +8,7 @@ void %STWBRX(uint %i, sbyte* %ptr, int %off) { %tmp1 = getelementptr sbyte* %ptr, int %off %tmp1 = cast sbyte* %tmp1 to uint* - %tmp13 = tail call uint %llvm.bswap.i32(uint %i) + %tmp13 = tail call uint %llvm.bswap.i32.i32(uint %i) store uint %tmp13, uint* %tmp1 ret void } @@ -17,14 +17,14 @@ %tmp1 = getelementptr sbyte* %ptr, int %off %tmp1 = cast sbyte* %tmp1 to uint* %tmp = load uint* %tmp1 - %tmp14 = tail call uint %llvm.bswap.i32( uint %tmp ) + %tmp14 = tail call uint %llvm.bswap.i32.i32( uint %tmp ) ret uint %tmp14 } void %STHBRX(ushort %s, sbyte* %ptr, int %off) { %tmp1 = getelementptr sbyte* %ptr, int %off %tmp1 = cast sbyte* %tmp1 to ushort* - %tmp5 = call ushort %llvm.bswap.i16( ushort %s ) + %tmp5 = call ushort %llvm.bswap.i16.i16( ushort %s ) store ushort %tmp5, ushort* %tmp1 ret void } @@ -33,10 +33,10 @@ %tmp1 = getelementptr sbyte* %ptr, int %off %tmp1 = cast sbyte* %tmp1 to ushort* %tmp = load ushort* %tmp1 - %tmp6 = call ushort %llvm.bswap.i16(ushort %tmp) + %tmp6 = call ushort %llvm.bswap.i16.i16(ushort %tmp) ret ushort %tmp6 } -declare uint %llvm.bswap.i32(uint) +declare uint %llvm.bswap.i32.i32(uint) -declare ushort %llvm.bswap.i16(ushort) +declare ushort %llvm.bswap.i16.i16(ushort) From reid at x10sys.com Sun Apr 1 02:36:52 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:36:52 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/bswap.ll Message-ID: <200704010736.l317aqaN017959@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: bswap.ll updated: 1.3 -> 1.4 --- Log message: For PR1297: http://llvm.org/PR1297 : Update these test cases to use proper signatures for bswap which is now and overloaded intrinsic. Its name must be of the form llvm.bswap.i32.i32 since both the parameter and the result or of type "iAny". Also, the bit counting intrinsics changed to always return i32. --- Diffs of the changes: (+6 -6) bswap.ll | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/test/CodeGen/X86/bswap.ll diff -u llvm/test/CodeGen/X86/bswap.ll:1.3 llvm/test/CodeGen/X86/bswap.ll:1.4 --- llvm/test/CodeGen/X86/bswap.ll:1.3 Fri Dec 1 22:23:08 2006 +++ llvm/test/CodeGen/X86/bswap.ll Sun Apr 1 02:36:28 2007 @@ -3,21 +3,21 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep bswapl | wc -l | grep 3 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep rolw | wc -l | grep 1 -declare ushort %llvm.bswap.i16(ushort) -declare uint %llvm.bswap.i32(uint) -declare ulong %llvm.bswap.i64(ulong) +declare ushort %llvm.bswap.i16.i16(ushort) +declare uint %llvm.bswap.i32.i32(uint) +declare ulong %llvm.bswap.i64.i64(ulong) ushort %W(ushort %A) { - %Z = call ushort %llvm.bswap.i16(ushort %A) + %Z = call ushort %llvm.bswap.i16.i16(ushort %A) ret ushort %Z } uint %X(uint %A) { - %Z = call uint %llvm.bswap.i32(uint %A) + %Z = call uint %llvm.bswap.i32.i32(uint %A) ret uint %Z } ulong %Y(ulong %A) { - %Z = call ulong %llvm.bswap.i64(ulong %A) + %Z = call ulong %llvm.bswap.i64.i64(ulong %A) ret ulong %Z } From reid at x10sys.com Sun Apr 1 02:36:56 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:36:56 -0500 Subject: [llvm-commits] CVS: llvm/test/Feature/intrinsics.ll Message-ID: <200704010736.l317auGE017965@zion.cs.uiuc.edu> Changes in directory llvm/test/Feature: intrinsics.ll updated: 1.13 -> 1.14 --- Log message: For PR1297: http://llvm.org/PR1297 : Update these test cases to use proper signatures for bswap which is now and overloaded intrinsic. Its name must be of the form llvm.bswap.i32.i32 since both the parameter and the result or of type "iAny". Also, the bit counting intrinsics changed to always return i32. --- Diffs of the changes: (+18 -18) intrinsics.ll | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) Index: llvm/test/Feature/intrinsics.ll diff -u llvm/test/Feature/intrinsics.ll:1.13 llvm/test/Feature/intrinsics.ll:1.14 --- llvm/test/Feature/intrinsics.ll:1.13 Sat Dec 2 14:30:20 2006 +++ llvm/test/Feature/intrinsics.ll Sun Apr 1 02:36:28 2007 @@ -8,20 +8,20 @@ declare void %llvm.prefetch(sbyte*, uint, uint) -declare ubyte %llvm.ctpop.i8(ubyte) -declare ushort %llvm.ctpop.i16(ushort) +declare uint %llvm.ctpop.i8(ubyte) +declare uint %llvm.ctpop.i16(ushort) declare uint %llvm.ctpop.i32(uint) -declare ulong %llvm.ctpop.i64(ulong) +declare uint %llvm.ctpop.i64(ulong) -declare ubyte %llvm.cttz.i8(ubyte) -declare ushort %llvm.cttz.i16(ushort) +declare uint %llvm.cttz.i8(ubyte) +declare uint %llvm.cttz.i16(ushort) declare uint %llvm.cttz.i32(uint) -declare ulong %llvm.cttz.i64(ulong) +declare uint %llvm.cttz.i64(ulong) -declare ubyte %llvm.ctlz.i8(ubyte) -declare ushort %llvm.ctlz.i16(ushort) +declare uint %llvm.ctlz.i8(ubyte) +declare uint %llvm.ctlz.i16(ushort) declare uint %llvm.ctlz.i32(uint) -declare ulong %llvm.ctlz.i64(ulong) +declare uint %llvm.ctlz.i64(ulong) declare float %llvm.sqrt.f32(float) declare double %llvm.sqrt.f64(double) @@ -39,20 +39,20 @@ call float %llvm.sqrt.f32(float 5.0) call double %llvm.sqrt.f64(double 6.0) - call ubyte %llvm.ctpop.i8(ubyte 10) - call ushort %llvm.ctpop.i16(ushort 11) + call uint %llvm.ctpop.i8(ubyte 10) + call uint %llvm.ctpop.i16(ushort 11) call uint %llvm.ctpop.i32(uint 12) - call ulong %llvm.ctpop.i64(ulong 13) + call uint %llvm.ctpop.i64(ulong 13) - call ubyte %llvm.ctlz.i8(ubyte 14) - call ushort %llvm.ctlz.i16(ushort 15) + call uint %llvm.ctlz.i8(ubyte 14) + call uint %llvm.ctlz.i16(ushort 15) call uint %llvm.ctlz.i32(uint 16) - call ulong %llvm.ctlz.i64(ulong 17) + call uint %llvm.ctlz.i64(ulong 17) - call ubyte %llvm.cttz.i8(ubyte 18) - call ushort %llvm.cttz.i16(ushort 19) + call uint %llvm.cttz.i8(ubyte 18) + call uint %llvm.cttz.i16(ushort 19) call uint %llvm.cttz.i32(uint 20) - call ulong %llvm.cttz.i64(ulong 21) + call uint %llvm.cttz.i64(ulong 21) ret void } From reid at x10sys.com Sun Apr 1 02:36:57 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:36:57 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll Message-ID: <200704010736.l317avS8017972@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Generic: llvm-ct-intrinsics.ll updated: 1.4 -> 1.5 --- Log message: For PR1297: http://llvm.org/PR1297 : Update these test cases to use proper signatures for bswap which is now and overloaded intrinsic. Its name must be of the form llvm.bswap.i32.i32 since both the parameter and the result or of type "iAny". Also, the bit counting intrinsics changed to always return i32. --- Diffs of the changes: (+33 -33) llvm-ct-intrinsics.ll | 66 +++++++++++++++++++++++++------------------------- 1 files changed, 33 insertions(+), 33 deletions(-) Index: llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll diff -u llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll:1.4 llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll:1.5 --- llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll:1.4 Sat Dec 2 14:38:10 2006 +++ llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll Sun Apr 1 02:36:28 2007 @@ -1,59 +1,59 @@ ; Make sure this testcase is supported by all code generators ; RUN: llvm-upgrade < %s | llvm-as | llc -declare ulong %llvm.ctpop.i64(ulong) +declare uint %llvm.ctpop.i64(ulong) declare uint %llvm.ctpop.i32(uint) -declare ushort %llvm.ctpop.i16(ushort) -declare ubyte %llvm.ctpop.i8(ubyte) +declare uint %llvm.ctpop.i16(ushort) +declare uint %llvm.ctpop.i8(ubyte) void %ctpoptest(ubyte %A, ushort %B, uint %C, ulong %D, - ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) { - %a = call ubyte %llvm.ctpop.i8(ubyte %A) - %b = call ushort %llvm.ctpop.i16(ushort %B) + uint *%AP, uint* %BP, uint* %CP, uint* %DP) { + %a = call uint %llvm.ctpop.i8(ubyte %A) + %b = call uint %llvm.ctpop.i16(ushort %B) %c = call uint %llvm.ctpop.i32(uint %C) - %d = call ulong %llvm.ctpop.i64(ulong %D) + %d = call uint %llvm.ctpop.i64(ulong %D) - store ubyte %a, ubyte* %AP - store ushort %b, ushort* %BP - store uint %c, uint* %CP - store ulong %d, ulong* %DP + store uint %a, uint* %AP + store uint %b, uint* %BP + store uint %c, uint* %CP + store uint %d, uint* %DP ret void } -declare ulong %llvm.ctlz.i64(ulong) +declare uint %llvm.ctlz.i64(ulong) declare uint %llvm.ctlz.i32(uint) -declare ushort %llvm.ctlz.i16(ushort) -declare ubyte %llvm.ctlz.i8(ubyte) +declare uint %llvm.ctlz.i16(ushort) +declare uint %llvm.ctlz.i8(ubyte) void %ctlztest(ubyte %A, ushort %B, uint %C, ulong %D, - ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) { - %a = call ubyte %llvm.ctlz.i8(ubyte %A) - %b = call ushort %llvm.ctlz.i16(ushort %B) + uint *%AP, uint* %BP, uint* %CP, uint* %DP) { + %a = call uint %llvm.ctlz.i8(ubyte %A) + %b = call uint %llvm.ctlz.i16(ushort %B) %c = call uint %llvm.ctlz.i32(uint %C) - %d = call ulong %llvm.ctlz.i64(ulong %D) + %d = call uint %llvm.ctlz.i64(ulong %D) - store ubyte %a, ubyte* %AP - store ushort %b, ushort* %BP - store uint %c, uint* %CP - store ulong %d, ulong* %DP + store uint %a, uint* %AP + store uint %b, uint* %BP + store uint %c, uint* %CP + store uint %d, uint* %DP ret void } -declare ulong %llvm.cttz.i64(ulong) +declare uint %llvm.cttz.i64(ulong) declare uint %llvm.cttz.i32(uint) -declare ushort %llvm.cttz.i16(ushort) -declare ubyte %llvm.cttz.i8(ubyte) +declare uint %llvm.cttz.i16(ushort) +declare uint %llvm.cttz.i8(ubyte) void %cttztest(ubyte %A, ushort %B, uint %C, ulong %D, - ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) { - %a = call ubyte %llvm.cttz.i8(ubyte %A) - %b = call ushort %llvm.cttz.i16(ushort %B) + uint *%AP, uint* %BP, uint* %CP, uint* %DP) { + %a = call uint %llvm.cttz.i8(ubyte %A) + %b = call uint %llvm.cttz.i16(ushort %B) %c = call uint %llvm.cttz.i32(uint %C) - %d = call ulong %llvm.cttz.i64(ulong %D) + %d = call uint %llvm.cttz.i64(ulong %D) - store ubyte %a, ubyte* %AP - store ushort %b, ushort* %BP - store uint %c, uint* %CP - store ulong %d, ulong* %DP + store uint %a, uint* %AP + store uint %b, uint* %BP + store uint %c, uint* %CP + store uint %d, uint* %DP ret void } From reid at x10sys.com Sun Apr 1 02:36:59 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:36:59 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/bswap-fold.ll Message-ID: <200704010736.l317axmf017977@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/InstCombine: bswap-fold.ll updated: 1.2 -> 1.3 --- Log message: For PR1297: http://llvm.org/PR1297 : Update these test cases to use proper signatures for bswap which is now and overloaded intrinsic. Its name must be of the form llvm.bswap.i32.i32 since both the parameter and the result or of type "iAny". Also, the bit counting intrinsics changed to always return i32. --- Diffs of the changes: (+7 -7) bswap-fold.ll | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) Index: llvm/test/Transforms/InstCombine/bswap-fold.ll diff -u llvm/test/Transforms/InstCombine/bswap-fold.ll:1.2 llvm/test/Transforms/InstCombine/bswap-fold.ll:1.3 --- llvm/test/Transforms/InstCombine/bswap-fold.ll:1.2 Fri Dec 1 22:23:09 2006 +++ llvm/test/Transforms/InstCombine/bswap-fold.ll Sun Apr 1 02:36:28 2007 @@ -2,25 +2,25 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep 'call.*bswap' bool %test1(ushort %tmp2) { - %tmp10 = call ushort %llvm.bswap.i16( ushort %tmp2 ) + %tmp10 = call ushort %llvm.bswap.i16.i16( ushort %tmp2 ) %tmp = seteq ushort %tmp10, 1 ret bool %tmp } bool %test2(uint %tmp) { - %tmp34 = tail call uint %llvm.bswap.i32( uint %tmp ) + %tmp34 = tail call uint %llvm.bswap.i32.i32( uint %tmp ) %tmp = seteq uint %tmp34, 1 ret bool %tmp } -declare uint %llvm.bswap.i32(uint) - bool %test3(ulong %tmp) { - %tmp34 = tail call ulong %llvm.bswap.i64( ulong %tmp ) + %tmp34 = tail call ulong %llvm.bswap.i64.i64( ulong %tmp ) %tmp = seteq ulong %tmp34, 1 ret bool %tmp } -declare ulong %llvm.bswap.i64(ulong) +declare ulong %llvm.bswap.i64.i64(ulong) + +declare ushort %llvm.bswap.i16.i16(ushort) -declare ushort %llvm.bswap.i16(ushort) +declare uint %llvm.bswap.i32.i32(uint) From reid at x10sys.com Sun Apr 1 02:38:44 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:38:44 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200704010738.l317cio1018021@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.18 -> 1.19 --- Log message: Change Owen's affiliation. --- Diffs of the changes: (+2 -2) DevMtgMay2007.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.18 llvm-www/DevMtgMay2007.html:1.19 --- llvm-www/DevMtgMay2007.html:1.18 Sat Mar 31 20:44:55 2007 +++ llvm-www/DevMtgMay2007.html Sun Apr 1 02:38:26 2007 @@ -189,7 +189,7 @@

        StartStopDescription
        StartStopDescription
        08:0008:45Meet - Greet
        08:4509:00Session 0: LLVM History
        09:0010:30Session 1: Introductions
        - + @@ -211,6 +211,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!">Valid HTML 4.01! -
        Last modified: $Date: 2007/04/01 01:44:55 $ +
        Last modified: $Date: 2007/04/01 07:38:26 $ From reid at x10sys.com Sun Apr 1 02:45:22 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 02:45:22 -0500 Subject: [llvm-commits] CVS: llvm/docs/ExtendingLLVM.html Message-ID: <200704010745.l317jMpj018202@zion.cs.uiuc.edu> Changes in directory llvm/docs: ExtendingLLVM.html updated: 1.27 -> 1.28 --- Log message: Mention how to create overloaded intrinsics. --- Diffs of the changes: (+5 -2) ExtendingLLVM.html | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) Index: llvm/docs/ExtendingLLVM.html diff -u llvm/docs/ExtendingLLVM.html:1.27 llvm/docs/ExtendingLLVM.html:1.28 --- llvm/docs/ExtendingLLVM.html:1.27 Wed Apr 12 12:42:39 2006 +++ llvm/docs/ExtendingLLVM.html Sun Apr 1 02:44:52 2007 @@ -87,7 +87,10 @@
      7. llvm/include/llvm/Intrinsics*.td: Add an entry for your intrinsic. Describe its memory access characteristics - for optimization (this controls whether it will be DCE'd, CSE'd, etc).
      8. + for optimization (this controls whether it will be DCE'd, CSE'd, etc). Note + that any intrinsic using the llvm_int_ty type for an argument will + be deemed by tblgen as overloaded and the corresponding suffix + will be required on the intrinsic's name.
      9. llvm/lib/Analysis/ConstantFolding.cpp: If it is possible to constant fold your intrinsic, add support to it in the @@ -382,7 +385,7 @@ The LLVM Compiler Infrastructure
        - Last modified: $Date: 2006/04/12 17:42:39 $ + Last modified: $Date: 2007/04/01 07:44:52 $ From reid at x10sys.com Sun Apr 1 03:04:52 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 03:04:52 -0500 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html Message-ID: <200704010804.l3184qFW018667@zion.cs.uiuc.edu> Changes in directory llvm/docs: LangRef.html updated: 1.219 -> 1.220 --- Log message: For PR1297: http://llvm.org/PR1297 : Document changes to bswap and bit counting intrinsics. bswap's name now requires two types in the suffix per overloaded intrinsic naming rules. The ctpop, cttz, and ctlz intrinsics were changed to always return i32. --- Diffs of the changes: (+50 -25) LangRef.html | 75 +++++++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 50 insertions(+), 25 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.219 llvm/docs/LangRef.html:1.220 --- llvm/docs/LangRef.html:1.219 Fri Mar 30 11:09:58 2007 +++ llvm/docs/LangRef.html Sun Apr 1 03:04:23 2007 @@ -3580,10 +3580,10 @@

        LLVM supports the notion of an "intrinsic function". These functions have -well known names and semantics and are required to follow certain -restrictions. Overall, these instructions represent an extension mechanism for -the LLVM language that does not require changing all of the transformations in -LLVM to add to the language (or the bytecode reader/writer, the parser, +well known names and semantics and are required to follow certain restrictions. +Overall, these intrinsics represent an extension mechanism for the LLVM +language that does not require changing all of the transformations in LLVM to +add to the language (or the bytecode reader/writer, the parser, etc...).

        Intrinsic function names must all start with an "llvm." prefix. This @@ -3594,9 +3594,20 @@ function. Additionally, because intrinsic functions are part of the LLVM language, it is required that they all be documented here if any are added.

        +

        Some intrinsic functions can be overloaded. That is, the intrinsic represents +a family of functions that perform the same operation but on different data +types. This is most frequent with the integer types. Since LLVM can represent +over 8 million different integer types, there is a way to declare an intrinsic +that can be overloaded based on its arguments. Such intrinsics will have the +names of the arbitrary types encoded into the intrinsic function name, each +preceded by a period. For example, the llvm.ctpop function can take an +integer of any width. This leads to a family of functions such as +i32 @llvm.ctpop.i8(i8 %val) and i32 @llvm.ctpop.i29(i29 %val). +

        + -

        To learn how to add an intrinsic function, please see the Extending LLVM Guide. +

        To learn how to add an intrinsic function, please see the +Extending LLVM Guide.

        @@ -4421,29 +4432,34 @@
        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). Note the suffix +that includes the type for the result and the operand.

        -  declare i16 @llvm.bswap.i16(i16 <id>)
        -  declare i32 @llvm.bswap.i32(i32 <id>)
        -  declare i64 @llvm.bswap.i64(i64 <id>)
        +  declare i16 @llvm.bswap.i16.i16(i16 <id>)
        +  declare i32 @llvm.bswap.i32.i32(i32 <id>)
        +  declare i64 @llvm.bswap.i64.i32(i64 <id>)
         
        Overview:

        -The 'llvm.bwsap' family of intrinsics is used to byteswap a 16, 32 or -64 bit quantity. These are useful for performing operations on data that is not -in the target's native byte order. +The 'llvm.bwsap' family of intrinsics is used to byteswap integer +values with an even number of bytes (positive multiple of 16 bits). These are +useful for performing operations on data that is not in the target's native +byte order.

        Semantics:

        -The llvm.bswap.16 intrinsic returns an i16 value that has the high +The llvm.bswap.16.i16 intrinsic returns an i16 value that has the high and low byte of the input i16 swapped. Similarly, the llvm.bswap.i32 intrinsic returns an i32 value that has the four bytes of the input i32 swapped, so that if the input bytes are numbered 0, 1, 2, 3 then the returned -i32 will have its bytes in 3, 2, 1, 0 order. The llvm.bswap.i64 -intrinsic extends this concept to 64 bits. +i32 will have its bytes in 3, 2, 1, 0 order. The llvm.bswap.i48.i48, +llvm.bswap.i64.i64 and other intrinsics extend this concept to +additional even-byte lengths (6 bytes, 8 bytes and more, respectively).

        @@ -4456,11 +4472,14 @@
        Syntax:
        +

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

        -  declare i8  @llvm.ctpop.i8 (i8  <src>)
        -  declare i16 @llvm.ctpop.i16(i16 <src>)
        +  declare i32 @llvm.ctpop.i8 (i8  <src>)
        +  declare i32 @llvm.ctpop.i16(i16 <src>)
           declare i32 @llvm.ctpop.i32(i32 <src>)
        -  declare i64 @llvm.ctpop.i64(i64 <src>)
        +  declare i32 @llvm.ctpop.i64(i64 <src>)
        +  declare i32 @llvm.ctpop.i256(i256 <src>)
         
        Overview:
        @@ -4492,11 +4511,14 @@
        Syntax:
        +

        This is an overloaded intrinsic. You can use llvm.ctlz on any +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>)
        +  declare i32 @llvm.ctlz.i8 (i8  <src>)
        +  declare i32 @llvm.ctlz.i16(i16 <src>)
           declare i32 @llvm.ctlz.i32(i32 <src>)
        -  declare i64 @llvm.ctlz.i64(i64 <src>)
        +  declare i32 @llvm.ctlz.i64(i64 <src>)
        +  declare i32 @llvm.ctlz.i256(i256 <src>)
         
        Overview:
        @@ -4532,11 +4554,14 @@
        Syntax:
        +

        This is an overloaded intrinsic. You can use llvm.cttz on any +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>)
        +  declare i32 @llvm.cttz.i8 (i8  <src>)
        +  declare i32 @llvm.cttz.i16(i16 <src>)
           declare i32 @llvm.cttz.i32(i32 <src>)
        -  declare i64 @llvm.cttz.i64(i64 <src>)
        +  declare i32 @llvm.cttz.i64(i64 <src>)
        +  declare i32 @llvm.cttz.i256(i256 <src>)
         
        Overview:
        @@ -4600,7 +4625,7 @@ Chris Lattner
        The LLVM Compiler Infrastructure
        - Last modified: $Date: 2007/03/30 16:09:58 $ + Last modified: $Date: 2007/04/01 08:04:23 $ From evan.cheng at apple.com Sun Apr 1 03:07:03 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Sun, 1 Apr 2007 03:07:03 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelLowering.cpp Message-ID: <200704010807.l3187335018713@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMISelLowering.cpp updated: 1.33 -> 1.34 --- Log message: Add i16 address mode. --- Diffs of the changes: (+7 -2) ARMISelLowering.cpp | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) Index: llvm/lib/Target/ARM/ARMISelLowering.cpp diff -u llvm/lib/Target/ARM/ARMISelLowering.cpp:1.33 llvm/lib/Target/ARM/ARMISelLowering.cpp:1.34 --- llvm/lib/Target/ARM/ARMISelLowering.cpp:1.33 Fri Mar 30 18:15:24 2007 +++ llvm/lib/Target/ARM/ARMISelLowering.cpp Sun Apr 1 03:06:46 2007 @@ -1300,19 +1300,24 @@ return false; default: - // FIXME: verify. switch (getValueType(Ty)) { default: return false; case MVT::i1: case MVT::i8: - // TODO: i16? i64 should be i32, no? case MVT::i32: + case MVT::i64: + // This assumes i64 is legalized to a pair of i32. If not (i.e. + // ldrd / strd are used, then its address mode is same as i16. // r + r if (AM.Scale == 2) return true; // r + r << imm if (!isPowerOf2_32(AM.Scale & ~1)) return false; + case MVT::i16: + // r + r + if (((unsigned)AM.HasBaseReg + AM.Scale) <= 2) + return true; } break; } From reid at x10sys.com Sun Apr 1 03:27:18 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 03:27:18 -0500 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html Message-ID: <200704010827.l318RIk0019059@zion.cs.uiuc.edu> Changes in directory llvm/docs: LangRef.html updated: 1.220 -> 1.221 --- Log message: For PR1297: http://llvm.org/PR1297 : Preview documentation for the llvm.bit.concat intrinsic (yet to be implemented). --- Diffs of the changes: (+47 -1) LangRef.html | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 47 insertions(+), 1 deletion(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.220 llvm/docs/LangRef.html:1.221 --- llvm/docs/LangRef.html:1.220 Sun Apr 1 03:04:23 2007 +++ llvm/docs/LangRef.html Sun Apr 1 03:27:01 2007 @@ -4587,6 +4587,52 @@

        + + + +
        + +
        Syntax:
        +

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

        +  declare i32 @llvm.bit.concat.i32.i17.i15 (i17 %hi, i15 %lo)
        +  declare i29 @llvm.bit.concat.i29(i16 %lo, i13 %lo)
        +
        + +
        Overview:
        +

        +The 'llvm.bit.concat' family of intrinsic functions concatenates two +integer values to produce a longer one. +

        + +
        Arguments:
        + +

        +The two arguments may be any bit width. The result must be an integer whose bit +width is the sum of the arguments' bit widths. The first argument represents the +bits that will occupy the high order bit locations in the concatenated result. +THe second argument will occupy the lower order bit locations in the result. +

        + +
        Semantics:
        + +

        +The 'llvm.bit.concat' intrinsic is the equivalent of two zext +instructions, a shl and an or. This sequence can be +implemented in hardware so this intrinsic assists with recognizing the sequence +for code generation purposes. The operation proceeds as follows:

        +
          +
        1. Each of the arguments is zext'd to the result bit width.
        2. +
        3. The %hi argument is shift left by the width of the %lo + argument (shifted into to high order bits).
        4. +
        5. The shifted %hi value and %lo are or'd together + to form the result.
        6. +
        +
        +
        Debugger Intrinsics @@ -4625,7 +4671,7 @@ Chris Lattner
        The LLVM Compiler Infrastructure
        - Last modified: $Date: 2007/04/01 08:04:23 $ + Last modified: $Date: 2007/04/01 08:27:01 $ From rspencer at reidspencer.com Sun Apr 1 03:36:35 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Sun, 01 Apr 2007 01:36:35 -0700 Subject: [llvm-commits] Patch for llvm-gcc for PR1297 (please apply) Message-ID: <1175416596.3058.396.camel@bashful.x10sys.com> Hi, Please apply the attached patch to llvm-gcc. This is needed to make llvm-gcc generate overloaded intrinsic functions correctly. This is part of the PR1297 work. Thanks, Reid. -------------- next part -------------- A non-text attachment was scrubbed... Name: PR1297.patch Type: text/x-patch Size: 5226 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070401/37ca10aa/attachment.bin From zhousheng00 at gmail.com Sun Apr 1 07:45:51 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Sun, 1 Apr 2007 07:45:51 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/ADT/APInt.h Message-ID: <200704011245.l31Cjpnk017507@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/ADT: APInt.h updated: 1.59 -> 1.60 --- Log message: Remove unused methods. --- Diffs of the changes: (+0 -18) APInt.h | 18 ------------------ 1 files changed, 18 deletions(-) Index: llvm/include/llvm/ADT/APInt.h diff -u llvm/include/llvm/ADT/APInt.h:1.59 llvm/include/llvm/ADT/APInt.h:1.60 --- llvm/include/llvm/ADT/APInt.h:1.59 Fri Mar 30 01:39:42 2007 +++ llvm/include/llvm/ADT/APInt.h Sun Apr 1 07:45:33 2007 @@ -396,15 +396,6 @@ return &pVal[0]; } - /// @brief Set a sepcific word in the value to a new value. - inline void setWordToValue(uint32_t idx, uint64_t Val) { - assert(idx < getNumWords() && "Invalid word array index"); - if (isSingleWord()) - VAL = Val; - else - pVal[idx] = Val; - } - /// @} /// @name Unary Operators /// @{ @@ -743,15 +734,6 @@ /// @brief Zero extend or truncate to width APInt &zextOrTrunc(uint32_t width); - /// This is a help function for convenience. If the given \p width equals to - /// this APInt's BitWidth, just return this APInt, otherwise, just zero - /// extend it. - inline APInt &zextOrCopy(uint32_t width) { - if (width == BitWidth) - return *this; - return zext(width); - } - /// @} /// @name Bit Manipulation Operators /// @{ From baldrick at free.fr Sun Apr 1 10:29:19 2007 From: baldrick at free.fr (Duncan Sands) Date: Sun, 1 Apr 2007 10:29:19 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/2007-03-26-ZeroWidthBitfield.c Message-ID: <200704011529.l31FTJ5E020476@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: 2007-03-26-ZeroWidthBitfield.c added (r1.1) --- Log message: Testcase for the problem worked around in http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070319/046204.html --- Diffs of the changes: (+2 -0) 2007-03-26-ZeroWidthBitfield.c | 2 ++ 1 files changed, 2 insertions(+) Index: llvm/test/CFrontend/2007-03-26-ZeroWidthBitfield.c diff -c /dev/null llvm/test/CFrontend/2007-03-26-ZeroWidthBitfield.c:1.1 *** /dev/null Sun Apr 1 10:29:12 2007 --- llvm/test/CFrontend/2007-03-26-ZeroWidthBitfield.c Sun Apr 1 10:29:02 2007 *************** *** 0 **** --- 1,2 ---- + // RUN: %llvmgcc %s -S -o - + struct Z { int :0; } z; From zhousheng00 at gmail.com Sun Apr 1 12:13:54 2007 From: zhousheng00 at gmail.com (Zhou Sheng) Date: Sun, 1 Apr 2007 12:13:54 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200704011713.l31HDsax022555@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.716 -> 1.717 --- Log message: Avoid unnecessary APInt construction. --- Diffs of the changes: (+17 -18) InstructionCombining.cpp | 35 +++++++++++++++++------------------ 1 files changed, 17 insertions(+), 18 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.716 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.717 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.716 Sun Apr 1 02:35:23 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sun Apr 1 12:13:37 2007 @@ -1870,7 +1870,7 @@ if (ConstantInt *CI = dyn_cast(RHSC)) { // X + (signbit) --> X ^ signbit - APInt Val(CI->getValue()); + const APInt& Val = CI->getValue(); unsigned BitWidth = Val.getBitWidth(); if (Val == APInt::getSignBit(BitWidth)) return BinaryOperator::createXor(LHS, RHS); @@ -1894,7 +1894,7 @@ if (isa(RHSC) && match(LHS, m_Xor(m_Value(XorLHS), m_ConstantInt(XorRHS)))) { unsigned TySizeBits = I.getType()->getPrimitiveSizeInBits(); - APInt RHSVal(cast(RHSC)->getValue()); + const APInt& RHSVal = cast(RHSC)->getValue(); unsigned Size = TySizeBits / 2; APInt C0080Val(APInt(TySizeBits, 1ULL).shl(Size - 1)); @@ -1999,14 +1999,13 @@ if (Anded == CRHS) { // See if all bits from the first bit set in the Add RHS up are included // in the mask. First, get the rightmost bit. - APInt AddRHSV(CRHS->getValue()); + const APInt& AddRHSV = CRHS->getValue(); // Form a mask of all bits from the lowest bit added through the top. - APInt AddRHSHighBits = ~((AddRHSV & -AddRHSV)-1); - AddRHSHighBits &= C2->getType()->getMask(); + APInt AddRHSHighBits(~((AddRHSV & -AddRHSV)-1)); // See if the and mask includes all of these bits. - APInt AddRHSHighBitsAnd = AddRHSHighBits & C2->getValue(); + APInt AddRHSHighBitsAnd(AddRHSHighBits & C2->getValue()); if (AddRHSHighBits == AddRHSHighBitsAnd) { // Okay, the xform is safe. Insert the new add pronto. @@ -2451,7 +2450,7 @@ if (BinaryOperator *RHSI = dyn_cast(I.getOperand(1))) { if (RHSI->getOpcode() == Instruction::Shl && isa(RHSI->getOperand(0))) { - APInt C1(cast(RHSI->getOperand(0))->getValue()); + const APInt& C1 = cast(RHSI->getOperand(0))->getValue(); if (C1.isPowerOf2()) { Value *N = RHSI->getOperand(1); const Type *NTy = N->getType(); @@ -2469,7 +2468,7 @@ if (SelectInst *SI = dyn_cast(Op1)) if (ConstantInt *STO = dyn_cast(SI->getOperand(1))) if (ConstantInt *SFO = dyn_cast(SI->getOperand(2))) { - APInt TVA(STO->getValue()), FVA(SFO->getValue()); + const APInt &TVA = STO->getValue(), &FVA = SFO->getValue(); if (TVA.isPowerOf2() && FVA.isPowerOf2()) { // Compute the shift amounts uint32_t TSA = TVA.logBase2(), FSA = FVA.logBase2(); @@ -2934,14 +2933,14 @@ // Adding a one to a single bit bit-field should be turned into an XOR // of the bit. First thing to check is to see if this AND is with a // single bit constant. - APInt AndRHSV(cast(AndRHS)->getValue()); + const APInt& AndRHSV = cast(AndRHS)->getValue(); // If there is only one bit set... if (isOneBitSet(cast(AndRHS))) { // Ok, at this point, we know that we are masking the result of the // ADD down to exactly one bit. If the constant we are adding has // no bits set below this bit, then we can eliminate the ADD. - APInt AddRHS(cast(OpRHS)->getValue()); + const APInt& AddRHS = cast(OpRHS)->getValue(); // Check to see if any bits below the one bit set in AndRHSV are set. if ((AddRHS & (AndRHSV-1)) == 0) { @@ -3083,7 +3082,7 @@ // MSB, so 0x000FFF0, 0x0000FFFF, and 0xFF0000FF are all runs. 0x0F0F0000 is // not, since all 1s are not contiguous. static bool isRunOfOnes(ConstantInt *Val, unsigned &MB, unsigned &ME) { - APInt V = Val->getValue(); + const APInt& V = Val->getValue(); uint32_t BitWidth = Val->getType()->getBitWidth(); if (!APIntOps::isShiftedMask(BitWidth, V)) return false; @@ -3180,9 +3179,8 @@ } if (ConstantInt *AndRHS = dyn_cast(Op1)) { - APInt AndRHSMask(AndRHS->getValue()); - APInt TypeMask(cast(Op0->getType())->getMask()); - APInt NotAndRHS = AndRHSMask^TypeMask; + const APInt& AndRHSMask = AndRHS->getValue(); + APInt NotAndRHS(~AndRHSMask); // Optimize a variety of ((val OP C1) & C2) combinations... if (isa(Op0)) { @@ -4675,7 +4673,8 @@ if ((KnownOne | KnownZero) != 0) { // Compute the Min, Max and RHS values based on the known bits. For the // EQ and NE we use unsigned values. - APInt Min(BitWidth, 0), Max(BitWidth, 0), RHSVal(CI->getValue()); + APInt Min(BitWidth, 0), Max(BitWidth, 0); + const APInt& RHSVal = CI->getValue(); if (ICmpInst::isSignedPredicate(I.getPredicate())) { ComputeSignedMinMaxValuesFromKnownBits(Ty, KnownZero, KnownOne, Min, Max); @@ -5078,7 +5077,7 @@ // If we have a signed (X % (2^c)) == 0, turn it into an unsigned one. if (CI->isZero() && isa(BO->getOperand(1)) && BO->hasOneUse()) { - APInt V(cast(BO->getOperand(1))->getValue()); + const APInt& V = cast(BO->getOperand(1))->getValue(); if (V.sgt(APInt(V.getBitWidth(), 1)) && V.isPowerOf2()) { Value *NewRem = InsertNewInstBefore(BinaryOperator::createURem( BO->getOperand(0), BO->getOperand(1), BO->getName()), I); @@ -5789,7 +5788,7 @@ } // If we have ((X << C) >>u C), turn this into X & (-1 >>u C). if (I.getOpcode() == Instruction::LShr) { - APInt Mask(Ty->getMask().lshr(ShiftAmt1)); + APInt Mask(APInt::getLowBitsSet(TypeBits, TypeBits - ShiftAmt1)); return BinaryOperator::createAnd(X, ConstantInt::get(Mask)); } // We can simplify ((X << C) >>s C) into a trunc + sext. @@ -6380,7 +6379,7 @@ // to an integer, then shift the bit to the appropriate place and then // cast to integer to avoid the comparison. if (ConstantInt *Op1C = dyn_cast(Op1)) { - APInt Op1CV(Op1C->getValue()); + const APInt& Op1CV = Op1C->getValue(); // cast (X == 0) to int --> X^1 iff X has only the low bit set. // cast (X == 0) to int --> (X>>1)^1 iff X has only the 2nd bit set. // cast (X == 1) to int --> X iff X has only the low bit set. From reid at x10sys.com Sun Apr 1 13:20:42 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 13:20:42 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200704011820.l31IKgVD023848@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.19 -> 1.20 --- Log message: Add Owen's suggestions for Session 4 issues and discussion topics. --- Diffs of the changes: (+19 -1) DevMtgMay2007.html | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletion(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.19 llvm-www/DevMtgMay2007.html:1.20 --- llvm-www/DevMtgMay2007.html:1.19 Sun Apr 1 02:38:26 2007 +++ llvm-www/DevMtgMay2007.html Sun Apr 1 13:20:25 2007 @@ -134,6 +134,24 @@ from here? This session will consist of a 5 minute presentation by the issue originator followed by 10 minutes of discussion. This will allow 6 issues to be discussed in this time slot. +
      10. NameOrganization
        Vikram AdveUIUC
        Owen AndersonMacalester College
        Owen AndersonIndependent
        Ryan BrownGoogle
        Jeff CohenIndependent
        Chris LattnerApple, Inc.
        + + + + + +
        Suggested ByIssue or Discussion Topic
        Owen AndersonIntegration of HLVM into LLVM - its + future as an LLVM subproject, and plans for making LLVM more accessible + to scripting and higher level language front ends.
        Owen AndersonFuture development practices: with a + burgeoning number of clients and wider adoption, do we want more orgnized + development practices? i.e. release focuses or something?
        Owen AndersonAdoption Goals: while our adoption has + increased greatly recently, we're still tiny compared to GCC. What are our + goals in this respect, adn how do we plan to address them? Do we + want to compete against GCC? Or, are we targeting a different + audience?
        Owen AndersonProject Management: We have an oversight + group right now. Do we want more organization? Corporate interest have + given us some great things, but sometimes their secrecy makes things + difficult; should ther be an LLVM Foundation in our future?
        @@ -211,6 +229,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
        Last modified: $Date: 2007/04/01 07:38:26 $ +
        Last modified: $Date: 2007/04/01 18:20:25 $ From reid at x10sys.com Sun Apr 1 13:42:37 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 13:42:37 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/ConstantFolding.cpp Message-ID: <200704011842.l31Igbwq024242@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: ConstantFolding.cpp updated: 1.21 -> 1.22 --- Log message: The bit counting intrinsics return i32 not the operand type. This fixes last night's regression in SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls --- Diffs of the changes: (+3 -4) ConstantFolding.cpp | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) Index: llvm/lib/Analysis/ConstantFolding.cpp diff -u llvm/lib/Analysis/ConstantFolding.cpp:1.21 llvm/lib/Analysis/ConstantFolding.cpp:1.22 --- llvm/lib/Analysis/ConstantFolding.cpp:1.21 Sun Apr 1 02:35:23 2007 +++ llvm/lib/Analysis/ConstantFolding.cpp Sun Apr 1 13:42:20 2007 @@ -433,18 +433,17 @@ break; } } else if (ConstantInt *Op = dyn_cast(Operands[0])) { - const IntegerType *OpTy = cast(Op->getType()); if (Name.size() > 11 && !memcmp(&Name[0], "llvm.bswap", 10)) { return ConstantInt::get(Op->getValue().byteSwap()); } else if (Name.size() > 11 && !memcmp(&Name[0],"llvm.ctpop",10)) { uint64_t ctpop = Op->getValue().countPopulation(); - return ConstantInt::get(OpTy, ctpop); + return ConstantInt::get(Type::Int32Ty, ctpop); } else if (Name.size() > 10 && !memcmp(&Name[0], "llvm.cttz", 9)) { uint64_t cttz = Op->getValue().countTrailingZeros(); - return ConstantInt::get(OpTy, cttz); + return ConstantInt::get(Type::Int32Ty, cttz); } else if (Name.size() > 10 && !memcmp(&Name[0], "llvm.ctlz", 9)) { uint64_t ctlz = Op->getValue().countLeadingZeros(); - return ConstantInt::get(OpTy, ctlz); + return ConstantInt::get(Type::Int32Ty, ctlz); } } } else if (NumOperands == 2) { From jeffc at jolt-lang.org Sun Apr 1 13:58:39 2007 From: jeffc at jolt-lang.org (Jeff Cohen) Date: Sun, 1 Apr 2007 13:58:39 -0500 Subject: [llvm-commits] CVS: llvm/win32/Transforms/Transforms.vcproj Message-ID: <200704011858.l31IwdVJ024717@zion.cs.uiuc.edu> Changes in directory llvm/win32/Transforms: Transforms.vcproj updated: 1.25 -> 1.26 --- Log message: Unbreak VC++ build. --- Diffs of the changes: (+3 -0) Transforms.vcproj | 3 +++ 1 files changed, 3 insertions(+) Index: llvm/win32/Transforms/Transforms.vcproj diff -u llvm/win32/Transforms/Transforms.vcproj:1.25 llvm/win32/Transforms/Transforms.vcproj:1.26 --- llvm/win32/Transforms/Transforms.vcproj:1.25 Sun Mar 4 18:00:42 2007 +++ llvm/win32/Transforms/Transforms.vcproj Sun Apr 1 13:58:22 2007 @@ -204,6 +204,9 @@ RelativePath="..\..\lib\Transforms\Scalar\BasicBlockPlacement.cpp"> + + Changes in directory llvm/docs: LangRef.html updated: 1.221 -> 1.222 --- Log message: Preview documentation for additional intrinsic functions. --- Diffs of the changes: (+343 -18) LangRef.html | 361 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 343 insertions(+), 18 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.221 llvm/docs/LangRef.html:1.222 --- llvm/docs/LangRef.html:1.221 Sun Apr 1 03:27:01 2007 +++ llvm/docs/LangRef.html Sun Apr 1 14:00:37 2007 @@ -4589,41 +4589,289 @@
        +
        Syntax:
        +

        This is an overloaded intrinsic. You can use llvm.bit.and.reduce on +any integer bit width. +

        +  declare i1 @llvm.bit.and.reduce.i32(i32 %val)
        +  declare i1 @llvm.bit.and.reduce.i97(i97 %val)
        +
        +
        Overview:
        +

        The 'llvm.bit.and.reduce' family of intrinsic functions applies the +AND operator bitwise to each bit in %val until it yields the result. +

        + +
        Arguments:
        +

        The argument may be any bit width. The result is always a 1-bit integer.

        + +
        Semantics:
        +

        The 'llvm.bit.and.reduce' intrinsic is the equivalent of a test +against -1. Only if all bits in %val are set will the result +be 1, otherwise 0.

        +
        + + + +
        Syntax:
        -

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

        This is an overloaded intrinsic. You can use llvm.bit.or.reduce on +any integer bit width.

        -  declare i32 @llvm.bit.concat.i32.i17.i15 (i17 %hi, i15 %lo)
        -  declare i29 @llvm.bit.concat.i29(i16 %lo, i13 %lo)
        +  declare i1 @llvm.bit.or.reduce.i32(i32 %val)
        +  declare i1 @llvm.bit.or.reduce.i97(i97 %val)
         
        +
        Overview:
        +

        The 'llvm.bit.or.reduce' family of intrinsic functions applies the +OR operator bitwise to each bit in %val until it yields the result. +

        + +
        Arguments:
        +

        The argument may be any bit width. The result is always a 1-bit integer.

        +
        Semantics:
        +

        The 'llvm.bit.or.reduce' intrinsic is the equivalent of a test +against 0. Only if all bits in %val are clear will the result +be 0, otherwise 1.

        +
        + + + + +
        +
        Syntax:
        +

        This is an overloaded intrinsic. You can use llvm.bit.xor.reduce on +any integer bit width. +

        +  declare i1 @llvm.bit.xor.reduce.i32(i32 %val)
        +  declare i1 @llvm.bit.xor.reduce.i97(i97 %val)
        +
        Overview:
        -

        -The 'llvm.bit.concat' family of intrinsic functions concatenates two -integer values to produce a longer one. +

        The 'llvm.bit.xor.reduce' family of intrinsic functions applies the +XOR operator bitwise to each bit in %val until it yields the result.

        Arguments:
        +

        The argument may be any bit width. The result is always a 1-bit integer.

        -

        -The two arguments may be any bit width. The result must be an integer whose bit -width is the sum of the arguments' bit widths. The first argument represents the -bits that will occupy the high order bit locations in the concatenated result. -THe second argument will occupy the lower order bit locations in the result. +

        Semantics:
        +

        The 'llvm.bit.xor.reduce' computes its result by performing an XOR +operation on the two lowest order bits in %val. That result is then +XOR'd with the next bit in %val and this process continues until all +bits in %val have been XOR'd with the result of the previous XORs. The +resulting bit is returned.

        +
        + + + + +
        +
        Syntax:
        +

        This is an overloaded intrinsic. You can use llvm.bit.nand.reduce on +any integer bit width. +

        +  declare i1 @llvm.bit.nand.reduce.i32(i32 %val)
        +  declare i1 @llvm.bit.nand.reduce.i97(i97 %val)
        +
        +
        Overview:
        +

        The 'llvm.bit.nand.reduce' family of intrinsic functions applies the +NAND operator bitwise to each bit in %val until it yields the result.

        +
        Arguments:
        +

        The argument may be any bit width. The result is always a 1-bit integer.

        +
        Semantics:
        +

        The 'llvm.bit.nand.reduce' intrinsic is the equivalent of taking the +complement of the llvm.bit.and.reduce intrinsic. That is, it returns 0 +if %val is all ones (-1) and 1 otherwise.

        +
        + + + + +
        +
        Syntax:
        +

        This is an overloaded intrinsic. You can use llvm.bit.nor.reduce on +any integer bit width. +

        +  declare i1 @llvm.bit.nor.reduce.i32(i32 %val)
        +  declare i1 @llvm.bit.nor.reduce.i97(i97 %val)
        +
        +
        Overview:
        +

        The 'llvm.bit.nor.reduce' family of intrinsic functions applies the +NOR operator bitwise to each bit in %val until it yields the result. +

        + +
        Arguments:
        +

        The argument may be any bit width. The result is always a 1-bit integer.

        + +
        Semantics:
        +

        The 'llvm.bit.nor.reduce' intrinsic is equivalent to the complement +of the llvm.bit.or.reduce intrinsic. That is, it returns 1 if all bits +in %val are 0, and 1 otherwise.

        +
        + + + + +
        +
        Syntax:
        +

        This is an overloaded intrinsic. You can use llvm.bit.nxor.reduce on +any integer bit width. +

        +  declare i1 @llvm.bit.nxor.reduce.i32(i32 %val)
        +  declare i1 @llvm.bit.nxor.reduce.i97(i97 %val)
        +
        +
        Overview:
        +

        The 'llvm.bit.nxor.reduce' family of intrinsic functions applies the +AND operator bitwise to each bit in %val until it yields the result. +

        +
        Arguments:
        +

        The argument may be any bit width. The result is always a 1-bit integer.

        + +
        Semantics:
        +

        The 'llvm.bit.nxor.reduce' intrinsic is the equivalent of the +complement of the llvm.bit.xor.reduce intrinsic.

        +
        + + + + +
        +
        Syntax:
        +

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

        +  declare i1 @llvm.bit.select.i17  (i17 %val, i32 %bit)
        +  declare i1 @llvm.bit.select.i29  (i29 %val, i32 %bit)
        +
        + +
        Overview:
        +

        The 'llvm.bit.select' family of intrinsic functions selects a +specific bit from an integer value and returns it.

        + +
        Arguments:
        +

        The two arguments may be any bit width. The result is always a 1-bit +integer. The first argument, %val may be any bit width and is the +value from which the bit is selected. The second argument, %bit must +be an i32 and is the bit index of the bit to be selected. Bits are +numbered starting with 0 as the lowest ordered bit.

        + +
        Semantics:
        +

        The 'llvm.bit.select' intrinsic is the equivalent of shift and a +truncate operation. The %val is shifted right by %bit bits and +then truncated to a 1-bit integer.

        +
        + + + + +
        +
        Syntax:
        +

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

        +  declare i17 @llvm.bit.set.i17.i17 (i17 %val, i32 %bit)
        +  declare i52 @llvm.bit.set.i52.i52 (i52 %val, i32 %bit)
        +
        + +
        Overview:

        -The 'llvm.bit.concat' intrinsic is the equivalent of two zext -instructions, a shl and an or. This sequence can be -implemented in hardware so this intrinsic assists with recognizing the sequence -for code generation purposes. The operation proceeds as follows:

        +The 'llvm.bit.set' family of intrinsic functions sets a specific bit in +a %val and returns the result.

        + +
        Arguments:
        +

        The result and the first argument, %val, may be an integer of any +bit width, but they must be the same bit width. The second argument must be an +i32.

        + +
        Semantics:
        +

        The 'llvm.bit.set' intrinsic is the equivalent of creating a bit +mask for the %bit requested in the width of %val, ORing that +mask with %val and returning the result.

        +
        + + + + +
        + +
        Syntax:
        +

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

        +  declare i17 @llvm.bit.clear.i17.i17 (i17 %val, i32 %bit)
        +  declare i29 @llvm.bit.clear.i29.i29 (i29 %val, i32 %bit)
        +
        + +
        Overview:
        +

        The 'llvm.bit.clear' family of intrinsic functions clears a specific +bit in a value and returns the result.

        + +
        Arguments:
        +

        The result and the first argument, %val, may be an integer of any +bit width, but they must be the same bit width. The second argument must be an +i32.

        + +
        Semantics:
        +

        The 'llvm.bit.clear' intrinsic is the equivalent of making a bit +mask in the width of %val but with the bit at index %bit set +to zero, ANDing that mask with %val and returning the result.

        +
        + + + + +
        + +
        Syntax:
        +

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

        +  declare i32 @llvm.bit.concat.i32.i17.i15 (i17 %hi, i15 %lo)
        +  declare i29 @llvm.bit.concat.i29.i12.i15 (i12 %hi, i15 %lo)
        +
        + +
        Overview:
        +

        The 'llvm.bit.concat' family of intrinsic functions concatenates two +integer values to produce a longer one.

        + +
        Arguments:
        +

        The two arguments may be any bit width. The result must be an integer type +whose bit width is the sum of the arguments' bit widths. The first argument, +%hi, represents the bits that will occupy the high order bit locations +in the concatenated result. The second argument, %lo, will occupy the +lower order bit locations in the result.

        + +
        Semantics:
        + +

        The 'llvm.bit.concat' intrinsic is the equivalent of two +zext instructions, a shl and an or. The operation +proceeds as follows:

        1. Each of the arguments is zext'd to the result bit width.
        2. The %hi argument is shift left by the width of the %lo @@ -4633,6 +4881,83 @@
        + + + +
        + +
        Syntax:
        +

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

        +  declare i17 @llvm.bit.part.select.i17.i17 (i17 %val, i32 %loBit, i32 %hiBit)
        +  declare i29 @llvm.bit.part.select.i29.i29 (i29 %val, i32 %loBit, i32 %hiBit)
        +
        + +
        Overview:
        +

        The 'llvm.bit.part.select' family of intrinsic functions selects a +range of bits from an integer value and returns them in the same bit width as +the original value.

        + +
        Arguments:
        +

        The first argument, %val and the result may be integer types of +any bit width but they must have the same bit width. The second and third +arguments must be i32 type.

        + +
        Semantics:
        +

        The 'llvm.bit.part.select' intrinsic is the equivalent of shifting +%val right by %loBit bits and then ANDing it with a mask with +only the %hiBit - %loBit bits set, as follows:

        +
          +
        1. The %val is shifted right (LSHR) by the number of bits specified + by %loBits. This normalizes the value to the low order bits.
        2. +
        3. The %loBits value is subtracted from the %hiBits value + to determine the number of bits to retain.
        4. +
        5. A mask of the retained bits is created by shifting a -1 value.
        6. +
        7. The mask is ANDed with %val to produce the result. +
        +
        + + + + +
        + +
        Syntax:
        +

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

        +  declare i17 @llvm.bit.part.set.i17.i17.i9 (i17 %val, i32 %bit, i9 %newbits)
        +  declare i29 @llvm.bit.part.set.i29.i29.i13(i29 %val, i32 %bit, i13 %newbits)
        +
        + +
        Overview:
        +

        The 'llvm.bit.part.set' family of intrinsic functions sets a range +of bits in a given value to a new value and returns the result.

        + +
        Arguments:
        +

        The first argument and the result may be an integer type of any bit width but +they must have the same bit width. The second argument must be an i32. +The third argument may be any any bit width less than or equal to the bit width +of the first argument.

        + +
        Semantics:
        +

        The 'llvm.bit.part.set' intrinsic sets the value given by +%newbits into %val at the bit index given by %bit. +This is equivalent to the following sequence:

        +
          +
        1. The bits in %val starting at %bit and up to the width + of %newbits are cleared by ANDing them with a zero mask.
        2. +
        3. The bits in %newbits are shifted left by %bit bits. +
        4. The shifted %newbits value is OR'd into %val to produce + the result.
        5. +
        +
        +
        Debugger Intrinsics @@ -4671,7 +4996,7 @@ Chris Lattner
        The LLVM Compiler Infrastructure
        - Last modified: $Date: 2007/04/01 08:27:01 $ + Last modified: $Date: 2007/04/01 19:00:37 $ From sabre at nondot.org Sun Apr 1 15:15:03 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 1 Apr 2007 15:15:03 -0500 Subject: [llvm-commits] CVS: llvm/docs/GettingStarted.html Message-ID: <200704012015.l31KF3Pw026115@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.156 -> 1.157 --- Log message: gcc 3.4.4 is known-bad on x86-64 --- Diffs of the changes: (+3 -1) GettingStarted.html | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.156 llvm/docs/GettingStarted.html:1.157 --- llvm/docs/GettingStarted.html:1.156 Tue Mar 6 00:27:34 2007 +++ llvm/docs/GettingStarted.html Sun Apr 1 15:14:46 2007 @@ -525,6 +525,8 @@ possibly others) does not compile LLVM correctly (it appears that exception handling is broken in some cases). Please download the FSF 3.3.3 or upgrade to a newer version of GCC.

        +

        GCC 3.4.x on X86-64/amd64: GCC + miscompiles portions of LLVM.

        IA-64 GCC 4.0.0: The IA-64 version of GCC 4.0.0 is known to miscompile LLVM.

        Apple Xcode 2.3: GCC crashes when compiling LLVM at -O3 (which is the @@ -1611,7 +1613,7 @@ Chris Lattner
        Reid Spencer
        The LLVM Compiler Infrastructure
        - Last modified: $Date: 2007/03/06 06:27:34 $ + Last modified: $Date: 2007/04/01 20:14:46 $ From clattner at apple.com Sun Apr 1 15:30:32 2007 From: clattner at apple.com (clattner at apple.com) Date: Sun, 1 Apr 2007 13:30:32 -0700 (PDT) Subject: [llvm-commits] [125595] Apply reid's patch for PR1297 Message-ID: <20070401203032.C7A34C833A10@src> Revision: 125595 Author: clattner Date: 2007-04-01 13:30:32 -0700 (Sun, 01 Apr 2007) Log Message: ----------- Apply reid's patch for PR1297 Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-convert.cpp apple-local/branches/llvm/gcc/llvm-internal.h Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-04-01 11:23:54 UTC (rev 125594) +++ apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-04-01 20:30:32 UTC (rev 125595) @@ -2754,9 +2754,9 @@ Value *RetVal = RHS; RHS = CastToAnyType(RHS, Op1Signed, OldVal->getType(), Op0Signed); if (LV.BitStart) - RHS = BinaryOperator::createShl(RHS, - ConstantInt::get(RHS->getType(), LV.BitStart), - "tmp", CurBB); + RHS = BinaryOperator::createShl(RHS, ConstantInt::get(RHS->getType(), + LV.BitStart), "tmp", CurBB); + // Next, if this doesn't touch the top bit, mask out any bits that shouldn't // be set in the result. uint64_t MaskVal = ((1ULL << LV.BitSize)-1) << LV.BitStart; @@ -3915,11 +3915,6 @@ case BUILT_IN_STACK_SAVE: return EmitBuiltinStackSave(exp, Result); case BUILT_IN_STACK_RESTORE: return EmitBuiltinStackRestore(exp); -#define HANDLE_UNARY_INT(I8, I16, I32, I64, V) \ - EmitBuiltinUnaryIntOp(V, Result, \ - Intrinsic::I8, Intrinsic::I16, \ - Intrinsic::I32, Intrinsic::I64) - #define HANDLE_UNARY_FP(F32, F64, V) \ Result = EmitBuiltinUnaryFPOp(V, Intrinsic::F32, Intrinsic::F64) @@ -3930,24 +3925,21 @@ case BUILT_IN_CLZL: case BUILT_IN_CLZLL: { Value *Amt = Emit(TREE_VALUE(TREE_OPERAND(exp, 1)), 0); - HANDLE_UNARY_INT(ctlz_i8, ctlz_i16, - ctlz_i32, ctlz_i64, Amt); + EmitBuiltinUnaryIntOp(Amt, Result, Intrinsic::ctlz); return true; } case BUILT_IN_CTZ: // These GCC builtins always return int. case BUILT_IN_CTZL: case BUILT_IN_CTZLL: { Value *Amt = Emit(TREE_VALUE(TREE_OPERAND(exp, 1)), 0); - HANDLE_UNARY_INT(cttz_i8, cttz_i16, - cttz_i32, cttz_i64, Amt); + EmitBuiltinUnaryIntOp(Amt, Result, Intrinsic::cttz); return true; } case BUILT_IN_POPCOUNT: // These GCC builtins always return int. case BUILT_IN_POPCOUNTL: case BUILT_IN_POPCOUNTLL: { Value *Amt = Emit(TREE_VALUE(TREE_OPERAND(exp, 1)), 0); - HANDLE_UNARY_INT(ctpop_i8, ctpop_i16, - ctpop_i32, ctpop_i64, Amt); + EmitBuiltinUnaryIntOp(Amt, Result, Intrinsic::ctpop); return true; } case BUILT_IN_SQRT: @@ -3972,8 +3964,7 @@ // The argument and return type of cttz should match the argument type of // the ffs, but should ignore the return type of ffs. Value *Amt = Emit(TREE_VALUE(TREE_OPERAND(exp, 1)), 0); - HANDLE_UNARY_INT(cttz_i8, cttz_i16, - cttz_i32, cttz_i64, Amt); + EmitBuiltinUnaryIntOp(Amt, Result, Intrinsic::cttz); Result = BinaryOperator::createAdd(Result, ConstantInt::get(Type::Int32Ty, 1), "tmp", CurBB); @@ -3989,6 +3980,8 @@ Result, "tmp", CurBB); return true; } + + #undef HANDLE_UNARY_INT #undef HANDLE_UNARY_FP @@ -4032,27 +4025,15 @@ } bool TreeToLLVM::EmitBuiltinUnaryIntOp(Value *InVal, Value *&Result, - Intrinsic::ID I8ID, Intrinsic::ID I16ID, - Intrinsic::ID I32ID, - Intrinsic::ID I64ID) { - Intrinsic::ID Id = Intrinsic::not_intrinsic; - const IntegerType *ITy = cast(InVal->getType()); - - switch (ITy->getBitWidth()) { - default: assert(0 && "Unknown Integer type!"); - case 8 : Id = I8ID; break; - case 16: Id = I16ID; break; - case 32: Id = I32ID; break; - case 64: Id = I64ID; break; - } + Intrinsic::ID Id) { + const Type *Ty = InVal->getType(); - Result = new CallInst(Intrinsic::getDeclaration(TheModule, Id), + const Type* Tys[2]; + Tys[0] = 0; // Result type is i32, not variable, signal so. + Tys[1] = Ty; // Parameter type is iAny so actual type must be specified here + Result = new CallInst(Intrinsic::getDeclaration(TheModule, Id, Tys, 2), InVal, "tmp", CurBB); - // The LLVM intrinsics for these return the same type as their operands. The - // GCC version of these functions always returns int. Cast to int for GCC. - Result = CastToSIntType(Result, Type::Int32Ty); - return true; } Modified: apple-local/branches/llvm/gcc/llvm-internal.h =================================================================== --- apple-local/branches/llvm/gcc/llvm-internal.h 2007-04-01 11:23:54 UTC (rev 125594) +++ apple-local/branches/llvm/gcc/llvm-internal.h 2007-04-01 20:30:32 UTC (rev 125595) @@ -483,9 +483,7 @@ Value *DestLoc, Value *&Result); bool EmitFrontendExpandedBuiltinCall(tree_node *exp, tree_node *fndecl, Value *DestLoc, Value *&Result); - bool EmitBuiltinUnaryIntOp(Value *InVal, Value *&Result, - Intrinsic::ID I8ID, Intrinsic::ID I16ID, - Intrinsic::ID I32ID, Intrinsic::ID I64ID); + bool EmitBuiltinUnaryIntOp(Value *InVal, Value *&Result, Intrinsic::ID Id); Value *EmitBuiltinUnaryFPOp(Value *Amt, Intrinsic::ID F32ID, Intrinsic::ID F64ID); Value *EmitBuiltinUnaryFPOp(Value *InVal, const char *F32Name, From clattner at apple.com Sun Apr 1 15:33:33 2007 From: clattner at apple.com (clattner at apple.com) Date: Sun, 1 Apr 2007 13:33:33 -0700 (PDT) Subject: [llvm-commits] [125596] remove dead #undef Message-ID: <20070401203333.C9BEFC833A75@src> Revision: 125596 Author: clattner Date: 2007-04-01 13:33:33 -0700 (Sun, 01 Apr 2007) Log Message: ----------- remove dead #undef Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-convert.cpp Modified: apple-local/branches/llvm/gcc/llvm-convert.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-04-01 20:30:32 UTC (rev 125595) +++ apple-local/branches/llvm/gcc/llvm-convert.cpp 2007-04-01 20:33:33 UTC (rev 125596) @@ -3982,7 +3982,6 @@ } -#undef HANDLE_UNARY_INT #undef HANDLE_UNARY_FP #if 1 // FIXME: Should handle these GCC extensions eventually. From sabre at nondot.org Sun Apr 1 15:49:53 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 1 Apr 2007 15:49:53 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86TargetAsmInfo.cpp Message-ID: <200704012049.l31KnrDq026710@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86TargetAsmInfo.cpp updated: 1.34 -> 1.35 --- Log message: fix breakage from last night, simplify code. --- Diffs of the changes: (+6 -15) X86TargetAsmInfo.cpp | 21 ++++++--------------- 1 files changed, 6 insertions(+), 15 deletions(-) Index: llvm/lib/Target/X86/X86TargetAsmInfo.cpp diff -u llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.34 llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.35 --- llvm/lib/Target/X86/X86TargetAsmInfo.cpp:1.34 Wed Mar 7 19:07:07 2007 +++ llvm/lib/Target/X86/X86TargetAsmInfo.cpp Sun Apr 1 15:49:36 2007 @@ -17,6 +17,7 @@ #include "llvm/DerivedTypes.h" #include "llvm/InlineAsm.h" #include "llvm/Instructions.h" +#include "llvm/Intrinsics.h" #include "llvm/Module.h" #include "llvm/ADT/StringExtras.h" using namespace llvm; @@ -199,24 +200,14 @@ !CI->getType()->isInteger()) return false; - const Type *Ty = CI->getType(); - const char *IntName; - if (const IntegerType *ITy = dyn_cast(Ty)) { - unsigned BitWidth = ITy->getBitWidth(); - if (BitWidth == 16) - IntName = "llvm.bswap.i16"; - else if (BitWidth == 32) - IntName = "llvm.bswap.i32"; - else if (BitWidth == 64) - IntName = "llvm.bswap.i64"; - else - return false; - } else + const IntegerType *Ty = dyn_cast(CI->getType()); + if (!Ty || Ty->getBitWidth() % 16 != 0) return false; - + // Okay, we can do this xform, do so now. + const Type *Tys[] = { Ty, Ty }; Module *M = CI->getParent()->getParent()->getParent(); - Constant *Int = M->getOrInsertFunction(IntName, Ty, Ty, (Type*)0); + Constant *Int = Intrinsic::getDeclaration(M, Intrinsic::bswap, Tys, 2); Value *Op = CI->getOperand(1); Op = new CallInst(Int, Op, CI->getName(), CI); From clattner at apple.com Sun Apr 1 15:51:02 2007 From: clattner at apple.com (Chris Lattner) Date: Sun, 1 Apr 2007 13:51:02 -0700 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html In-Reply-To: <200704010804.l3184qFW018667@zion.cs.uiuc.edu> References: <200704010804.l3184qFW018667@zion.cs.uiuc.edu> Message-ID: <34F7731A-9609-4CBD-BAC9-48688A3EF2C3@apple.com> > +

        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). > Note the suffix > +that includes the type for the result and the operand. >

        > +  declare i16 @llvm.bswap.i16.i16(i16 <id>)
        > +  declare i32 @llvm.bswap.i32.i32(i32 <id>)
        > +  declare i64 @llvm.bswap.i64.i32(i64 <id>)
        
        Typo for i64.
        
        >  

        > +The 'llvm.bwsap' family of intrinsics is used to byteswap > integer Typo. > +values with an even number of bytes (positive multiple of 16 > bits). These are > +useful for performing operations on data that is not in the > target's native > +byte order. >

        Also, doesn't llvm-upgrade need to do something for these intrinsics? -Chris From clattner at apple.com Sun Apr 1 15:52:05 2007 From: clattner at apple.com (Chris Lattner) Date: Sun, 1 Apr 2007 13:52:05 -0700 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/bswap-fold.ll In-Reply-To: <200704010736.l317axmf017977@zion.cs.uiuc.edu> References: <200704010736.l317axmf017977@zion.cs.uiuc.edu> Message-ID: This is being run through llvm-upgrade: llvm-upgrade should upgrade it, so this should be reverted. -Chris On Apr 1, 2007, at 12:36 AM, Reid Spencer wrote: > > > Changes in directory llvm/test/Transforms/InstCombine: > > bswap-fold.ll updated: 1.2 -> 1.3 > --- > Log message: > > For PR1297: http://llvm.org/PR1297 : > Update these test cases to use proper signatures for bswap which is > now > and overloaded intrinsic. Its name must be of the form > llvm.bswap.i32.i32 > since both the parameter and the result or of type "iAny". Also, the > bit counting intrinsics changed to always return i32. > > > --- > Diffs of the changes: (+7 -7) > > bswap-fold.ll | 14 +++++++------- > 1 files changed, 7 insertions(+), 7 deletions(-) > > > Index: llvm/test/Transforms/InstCombine/bswap-fold.ll > diff -u llvm/test/Transforms/InstCombine/bswap-fold.ll:1.2 llvm/ > test/Transforms/InstCombine/bswap-fold.ll:1.3 > --- llvm/test/Transforms/InstCombine/bswap-fold.ll:1.2 Fri Dec 1 > 22:23:09 2006 > +++ llvm/test/Transforms/InstCombine/bswap-fold.ll Sun Apr 1 > 02:36:28 2007 > @@ -2,25 +2,25 @@ > ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | > not grep 'call.*bswap' > > bool %test1(ushort %tmp2) { > - %tmp10 = call ushort %llvm.bswap.i16( ushort %tmp2 ) > + %tmp10 = call ushort %llvm.bswap.i16.i16( ushort %tmp2 ) > %tmp = seteq ushort %tmp10, 1 > ret bool %tmp > } > > bool %test2(uint %tmp) { > - %tmp34 = tail call uint %llvm.bswap.i32( uint %tmp ) > + %tmp34 = tail call uint %llvm.bswap.i32.i32( uint %tmp ) > %tmp = seteq uint %tmp34, 1 > ret bool %tmp > } > > -declare uint %llvm.bswap.i32(uint) > - > bool %test3(ulong %tmp) { > - %tmp34 = tail call ulong %llvm.bswap.i64( ulong %tmp ) > + %tmp34 = tail call ulong %llvm.bswap.i64.i64( ulong %tmp ) > %tmp = seteq ulong %tmp34, 1 > ret bool %tmp > } > > -declare ulong %llvm.bswap.i64(ulong) > +declare ulong %llvm.bswap.i64.i64(ulong) > + > +declare ushort %llvm.bswap.i16.i16(ushort) > > -declare ushort %llvm.bswap.i16(ushort) > +declare uint %llvm.bswap.i32.i32(uint) > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From clattner at apple.com Sun Apr 1 15:52:35 2007 From: clattner at apple.com (Chris Lattner) Date: Sun, 1 Apr 2007 13:52:35 -0700 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll In-Reply-To: <200704010736.l317avS8017972@zion.cs.uiuc.edu> References: <200704010736.l317avS8017972@zion.cs.uiuc.edu> Message-ID: <312014BD-6F91-4DD6-9263-CCD5B0C5C54F@apple.com> Likewise, llvm-upgrade should do this. Please revert this commit when safe. -Chris On Apr 1, 2007, at 12:36 AM, Reid Spencer wrote: > > > Changes in directory llvm/test/CodeGen/Generic: > > llvm-ct-intrinsics.ll updated: 1.4 -> 1.5 > --- > Log message: > > For PR1297: http://llvm.org/PR1297 : > Update these test cases to use proper signatures for bswap which is > now > and overloaded intrinsic. Its name must be of the form > llvm.bswap.i32.i32 > since both the parameter and the result or of type "iAny". Also, the > bit counting intrinsics changed to always return i32. > > > --- > Diffs of the changes: (+33 -33) > > llvm-ct-intrinsics.ll | 66 ++++++++++++++++++++++++ > +------------------------- > 1 files changed, 33 insertions(+), 33 deletions(-) > > > Index: llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll > diff -u llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll:1.4 llvm/ > test/CodeGen/Generic/llvm-ct-intrinsics.ll:1.5 > --- llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll:1.4 Sat Dec 2 > 14:38:10 2006 > +++ llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll Sun Apr 1 > 02:36:28 2007 > @@ -1,59 +1,59 @@ > ; Make sure this testcase is supported by all code generators > ; RUN: llvm-upgrade < %s | llvm-as | llc > > -declare ulong %llvm.ctpop.i64(ulong) > +declare uint %llvm.ctpop.i64(ulong) > declare uint %llvm.ctpop.i32(uint) > -declare ushort %llvm.ctpop.i16(ushort) > -declare ubyte %llvm.ctpop.i8(ubyte) > +declare uint %llvm.ctpop.i16(ushort) > +declare uint %llvm.ctpop.i8(ubyte) > > void %ctpoptest(ubyte %A, ushort %B, uint %C, ulong %D, > - ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) { > - %a = call ubyte %llvm.ctpop.i8(ubyte %A) > - %b = call ushort %llvm.ctpop.i16(ushort %B) > + uint *%AP, uint* %BP, uint* %CP, uint* %DP) { > + %a = call uint %llvm.ctpop.i8(ubyte %A) > + %b = call uint %llvm.ctpop.i16(ushort %B) > %c = call uint %llvm.ctpop.i32(uint %C) > - %d = call ulong %llvm.ctpop.i64(ulong %D) > + %d = call uint %llvm.ctpop.i64(ulong %D) > > - store ubyte %a, ubyte* %AP > - store ushort %b, ushort* %BP > - store uint %c, uint* %CP > - store ulong %d, ulong* %DP > + store uint %a, uint* %AP > + store uint %b, uint* %BP > + store uint %c, uint* %CP > + store uint %d, uint* %DP > ret void > } > > -declare ulong %llvm.ctlz.i64(ulong) > +declare uint %llvm.ctlz.i64(ulong) > declare uint %llvm.ctlz.i32(uint) > -declare ushort %llvm.ctlz.i16(ushort) > -declare ubyte %llvm.ctlz.i8(ubyte) > +declare uint %llvm.ctlz.i16(ushort) > +declare uint %llvm.ctlz.i8(ubyte) > > void %ctlztest(ubyte %A, ushort %B, uint %C, ulong %D, > - ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) { > - %a = call ubyte %llvm.ctlz.i8(ubyte %A) > - %b = call ushort %llvm.ctlz.i16(ushort %B) > + uint *%AP, uint* %BP, uint* %CP, uint* %DP) { > + %a = call uint %llvm.ctlz.i8(ubyte %A) > + %b = call uint %llvm.ctlz.i16(ushort %B) > %c = call uint %llvm.ctlz.i32(uint %C) > - %d = call ulong %llvm.ctlz.i64(ulong %D) > + %d = call uint %llvm.ctlz.i64(ulong %D) > > - store ubyte %a, ubyte* %AP > - store ushort %b, ushort* %BP > - store uint %c, uint* %CP > - store ulong %d, ulong* %DP > + store uint %a, uint* %AP > + store uint %b, uint* %BP > + store uint %c, uint* %CP > + store uint %d, uint* %DP > ret void > } > > -declare ulong %llvm.cttz.i64(ulong) > +declare uint %llvm.cttz.i64(ulong) > declare uint %llvm.cttz.i32(uint) > -declare ushort %llvm.cttz.i16(ushort) > -declare ubyte %llvm.cttz.i8(ubyte) > +declare uint %llvm.cttz.i16(ushort) > +declare uint %llvm.cttz.i8(ubyte) > > void %cttztest(ubyte %A, ushort %B, uint %C, ulong %D, > - ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) { > - %a = call ubyte %llvm.cttz.i8(ubyte %A) > - %b = call ushort %llvm.cttz.i16(ushort %B) > + uint *%AP, uint* %BP, uint* %CP, uint* %DP) { > + %a = call uint %llvm.cttz.i8(ubyte %A) > + %b = call uint %llvm.cttz.i16(ushort %B) > %c = call uint %llvm.cttz.i32(uint %C) > - %d = call ulong %llvm.cttz.i64(ulong %D) > + %d = call uint %llvm.cttz.i64(ulong %D) > > - store ubyte %a, ubyte* %AP > - store ushort %b, ushort* %BP > - store uint %c, uint* %CP > - store ulong %d, ulong* %DP > + store uint %a, uint* %AP > + store uint %b, uint* %BP > + store uint %c, uint* %CP > + store uint %d, uint* %DP > ret void > } > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From sabre at nondot.org Sun Apr 1 15:57:54 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 1 Apr 2007 15:57:54 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200704012057.l31KvsDI026935@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.717 -> 1.718 --- Log message: simplify this code, make it work for ap ints --- Diffs of the changes: (+6 -17) InstructionCombining.cpp | 23 ++++++----------------- 1 files changed, 6 insertions(+), 17 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.717 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.718 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.717 Sun Apr 1 12:13:37 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sun Apr 1 15:57:36 2007 @@ -3594,14 +3594,14 @@ /// MatchBSwap - Given an OR instruction, check to see if this is a bswap idiom. /// If so, insert the new bswap intrinsic and return it. Instruction *InstCombiner::MatchBSwap(BinaryOperator &I) { - // We cannot bswap one byte. - if (I.getType() == Type::Int8Ty) - return 0; + const IntegerType *ITy = dyn_cast(I.getType()); + if (!ITy || ITy->getBitWidth() % 16) + return 0; // Can only bswap pairs of bytes. Can't do vectors. /// ByteValues - For each byte of the result, we keep track of which value /// defines each byte. SmallVector ByteValues; - ByteValues.resize(TD->getTypeSize(I.getType())); + ByteValues.resize(ITy->getBitWidth()/8); // Try to find all the pieces corresponding to the bswap. if (CollectBSwapParts(I.getOperand(0), ByteValues) || @@ -3616,20 +3616,9 @@ for (unsigned i = 1, e = ByteValues.size(); i != e; ++i) if (ByteValues[i] != V) return 0; - - // If they do then *success* we can turn this into a bswap. Figure out what - // bswap to make it into. + const Type *Tys[] = { ITy, ITy }; Module *M = I.getParent()->getParent()->getParent(); - const char *FnName = 0; - if (I.getType() == Type::Int16Ty) - FnName = "llvm.bswap.i16.i16"; - else if (I.getType() == Type::Int32Ty) - FnName = "llvm.bswap.i32.i32"; - else if (I.getType() == Type::Int64Ty) - FnName = "llvm.bswap.i64.i64"; - else - assert(0 && "Unknown integer type!"); - Constant *F = M->getOrInsertFunction(FnName, I.getType(), I.getType(), NULL); + Function *F = Intrinsic::getDeclaration(M, Intrinsic::bswap, Tys, 2); return new CallInst(F, V); } From clattner at apple.com Sun Apr 1 15:59:03 2007 From: clattner at apple.com (Chris Lattner) Date: Sun, 1 Apr 2007 13:59:03 -0700 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/IntrinsicLowering.cpp In-Reply-To: <200704010735.l317ZhEo017895@zion.cs.uiuc.edu> References: <200704010735.l317ZhEo017895@zion.cs.uiuc.edu> Message-ID: <082F4CD5-2053-4ACE-B9C8-ABDD8C262716@apple.com> This is incorrect for the changes you made to the ctpop (etc) prototypes. They will assert in RAUW. -Chris On Apr 1, 2007, at 12:35 AM, Reid Spencer wrote: > > > Changes in directory llvm/lib/CodeGen: > > IntrinsicLowering.cpp updated: 1.72 -> 1.73 > --- > Log message: > > For PR1297: http://llvm.org/PR1297 : > Support overloaded intrinsics bswap, ctpop, cttz, ctlz. > > > --- > Diffs of the changes: (+4 -17) > > IntrinsicLowering.cpp | 21 ++++----------------- > 1 files changed, 4 insertions(+), 17 deletions(-) > > > Index: llvm/lib/CodeGen/IntrinsicLowering.cpp > diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.72 llvm/lib/ > CodeGen/IntrinsicLowering.cpp:1.73 > --- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.72 Thu Mar 1 14:24:30 > 2007 > +++ llvm/lib/CodeGen/IntrinsicLowering.cpp Sun Apr 1 02:35:23 2007 > @@ -236,8 +236,6 @@ > return LowerCTPOP(V, IP); > } > > - > - > void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) { > Function *Callee = CI->getCalledFunction(); > assert(Callee && "Cannot lower an indirect call!"); > @@ -283,30 +281,19 @@ > Type::VoidTy, AbortFCache); > break; > } > - case Intrinsic::ctpop_i8: > - case Intrinsic::ctpop_i16: > - case Intrinsic::ctpop_i32: > - case Intrinsic::ctpop_i64: > + case Intrinsic::ctpop: > CI->replaceAllUsesWith(LowerCTPOP(CI->getOperand(1), CI)); > break; > > - case Intrinsic::bswap_i16: > - case Intrinsic::bswap_i32: > - case Intrinsic::bswap_i64: > + case Intrinsic::bswap: > CI->replaceAllUsesWith(LowerBSWAP(CI->getOperand(1), CI)); > break; > > - case Intrinsic::ctlz_i8: > - case Intrinsic::ctlz_i16: > - case Intrinsic::ctlz_i32: > - case Intrinsic::ctlz_i64: > + case Intrinsic::ctlz: > CI->replaceAllUsesWith(LowerCTLZ(CI->getOperand(1), CI)); > break; > > - case Intrinsic::cttz_i8: > - case Intrinsic::cttz_i16: > - case Intrinsic::cttz_i32: > - case Intrinsic::cttz_i64: { > + case Intrinsic::cttz: { > // cttz(x) -> ctpop(~X & (X-1)) > Value *Src = CI->getOperand(1); > Value *NotSrc = BinaryOperator::createNot(Src, Src->getName() > +".not", CI); > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From resistor at mac.com Sun Apr 1 16:01:47 2007 From: resistor at mac.com (Owen Anderson) Date: Sun, 1 Apr 2007 16:01:47 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200704012101.l31L1l3Q027110@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.20 -> 1.21 --- Log message: Reword some of my suggestions. --- Diffs of the changes: (+5 -6) DevMtgMay2007.html | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.20 llvm-www/DevMtgMay2007.html:1.21 --- llvm-www/DevMtgMay2007.html:1.20 Sun Apr 1 13:20:25 2007 +++ llvm-www/DevMtgMay2007.html Sun Apr 1 16:01:30 2007 @@ -144,13 +144,12 @@ development practices? i.e. release focuses or something?
        Owen AndersonAdoption Goals: while our adoption has increased greatly recently, we're still tiny compared to GCC. What are our - goals in this respect, adn how do we plan to address them? Do we - want to compete against GCC? Or, are we targeting a different - audience?
        Owen AndersonProject Management: We have an oversight group right now. Do we want more organization? Corporate interest have - given us some great things, but sometimes their secrecy makes things - difficult; should ther be an LLVM Foundation in our future?
        @@ -229,6 +228,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
        Last modified: $Date: 2007/04/01 18:20:25 $ +
        Last modified: $Date: 2007/04/01 21:01:30 $ From resistor at mac.com Sun Apr 1 16:08:10 2007 From: resistor at mac.com (Owen Anderson) Date: Sun, 1 Apr 2007 16:08:10 -0500 Subject: [llvm-commits] CVS: llvm-www/DevMtgMay2007.html Message-ID: <200704012108.l31L8A3u027389@zion.cs.uiuc.edu> Changes in directory llvm-www: DevMtgMay2007.html updated: 1.21 -> 1.22 --- Log message: Fix a some formatting. --- Diffs of the changes: (+10 -10) DevMtgMay2007.html | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.21 llvm-www/DevMtgMay2007.html:1.22 --- llvm-www/DevMtgMay2007.html:1.21 Sun Apr 1 16:01:30 2007 +++ llvm-www/DevMtgMay2007.html Sun Apr 1 16:07:53 2007 @@ -135,21 +135,21 @@ originator followed by 10 minutes of discussion. This will allow 6 issues to be discussed in this time slot. - - + - + - + - + + in our (distant?) future?
        Suggested ByIssue or Discussion Topic
        Owen AndersonIntegration of HLVM into LLVM - its +
        Suggested ByIssue or Discussion Topic
        Owen AndersonIntegration of HLVM into LLVM - its future as an LLVM subproject, and plans for making LLVM more accessible - to scripting and higher level language front ends.
        Owen AndersonFuture development practices: with a + to scripting and higher level language front ends.
        Owen AndersonFuture development practices: with a burgeoning number of clients and wider adoption, do we want more orgnized - development practices? i.e. release focuses or something?
        Owen AndersonAdoption Goals: while our adoption has + development practices? i.e. release focuses or something?
        Owen AndersonAdoption Goals: while our adoption has increased greatly recently, we're still tiny compared to GCC. What are our - future growth and adoption plans?
        Owen AndersonProject Management: We have an oversight + future growth and adoption plans?
        Owen AndersonProject Management: We have an oversight group right now. Do we want more organization? Corporate interest have given us some great things, but sometimes secrecy makes things difficult for those not involved; should there be an LLVM Foundation - in our (distant?) future?
        @@ -228,6 +228,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"> Valid HTML 4.01! -
        Last modified: $Date: 2007/04/01 21:01:30 $ +
        Last modified: $Date: 2007/04/01 21:07:53 $ From clattner at apple.com Sun Apr 1 16:57:56 2007 From: clattner at apple.com (clattner at apple.com) Date: Sun, 1 Apr 2007 14:57:56 -0700 (PDT) Subject: [llvm-commits] [125597] Apply Anton's patch to improve sret handling. Message-ID: <20070401215756.C5748C86A189@src> Revision: 125597 Author: clattner Date: 2007-04-01 14:57:56 -0700 (Sun, 01 Apr 2007) Log Message: ----------- Apply Anton's patch to improve sret handling. Modified Paths: -------------- apple-local/branches/llvm/gcc/llvm-types.cpp Modified: apple-local/branches/llvm/gcc/llvm-types.cpp =================================================================== --- apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-01 20:33:33 UTC (rev 125596) +++ apple-local/branches/llvm/gcc/llvm-types.cpp 2007-04-01 21:57:56 UTC (rev 125597) @@ -708,9 +708,10 @@ FunctionType::ParamAttrsList ParamAttrs; + // Something for the return type. + ParamAttrs.push_back(FunctionType::NoAttributeSet); + if (static_chain) { - // Something for the return type. - ParamAttrs.push_back(FunctionType::NoAttributeSet); // Pass the static chain in a register. ParamAttrs.push_back(FunctionType::InRegAttribute); } @@ -796,10 +797,13 @@ if (static_chain) // Pass the static chain in a register. ParamAttrs.push_back(FunctionType::InRegAttribute); - + + // Handle struct return + if (ABIConverter.isStructReturn()) + ParamAttrs.push_back(FunctionType::StructRetAttribute); + for (tree Args = TYPE_ARG_TYPES(type); - Args && TREE_VALUE(Args) != void_type_node; - Args = TREE_CHAIN(Args)) { + Args && TREE_VALUE(Args) != void_type_node; Args = TREE_CHAIN(Args)) { unsigned Attributes = FunctionType::NoAttributeSet; tree Ty = TREE_VALUE(Args); @@ -816,15 +820,6 @@ } } - // Handle struct return - if (isFirstArg) { - if (ABIConverter.isStructReturn()) { - Attributes |= FunctionType::StructRetAttribute; - //printf("Struct return!\n"); - } - isFirstArg = false; - } - #ifdef LLVM_TARGET_ENABLE_REGPARM if (TREE_CODE(Ty) == INTEGER_TYPE || TREE_CODE(Ty) == POINTER_TYPE) LLVM_ADJUST_REGPARM_ATTRIBUTE(Attributes, TREE_INT_CST_LOW(TYPE_SIZE(Ty)), From clattner at apple.com Sun Apr 1 16:59:35 2007 From: clattner at apple.com (Chris Lattner) Date: Sun, 1 Apr 2007 14:59:35 -0700 Subject: [llvm-commits] Correct handling of "sret" attribute - 2 In-Reply-To: <1175297165.23949.44.camel@asl.dorms.spbu.ru> References: <1175297165.23949.44.camel@asl.dorms.spbu.ru> Message-ID: Applied, thanks! Please commit the testcase, -Chris On Mar 30, 2007, at 4:26 PM, Anton Korobeynikov wrote: > Hello, Everyone. > > Please ignore my prev. patch, it's definitely wrong. > > You might find attached new patch + testcase. > > -- > With best regards, Anton Korobeynikov. > > Faculty of Mathematics & Mechanics, Saint Petersburg State University. > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From asl at math.spbu.ru Sun Apr 1 17:03:22 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Sun, 1 Apr 2007 17:03:22 -0500 Subject: [llvm-commits] CVS: llvm/test/CFrontend/sret.c Message-ID: <200704012203.l31M3Mwf028409@zion.cs.uiuc.edu> Changes in directory llvm/test/CFrontend: sret.c added (r1.1) --- Log message: Add testcase for correct sret handling. --- Diffs of the changes: (+15 -0) sret.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+) Index: llvm/test/CFrontend/sret.c diff -c /dev/null llvm/test/CFrontend/sret.c:1.1 *** /dev/null Sun Apr 1 17:03:15 2007 --- llvm/test/CFrontend/sret.c Sun Apr 1 17:03:04 2007 *************** *** 0 **** --- 1,15 ---- + // RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep 'sret' | wc -l | grep '5' + + struct abc { + int a; + int b; + int c; + }; + + struct abc foo1(void); + struct abc foo2(); + + void bar() { + struct abc dummy1 = foo1(); + struct abc dummy2 = foo2(); + } \ No newline at end of file From sabre at nondot.org Sun Apr 1 17:21:56 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 1 Apr 2007 17:21:56 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200704012221.l31MLuH0028726@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.122 -> 1.123 --- Log message: print the type of an inserted IV in -debug mode. --- Diffs of the changes: (+4 -3) LoopStrengthReduce.cpp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.122 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.123 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.122 Sun Mar 25 22:01:27 2007 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Sun Apr 1 17:21:39 2007 @@ -1029,10 +1029,12 @@ IncV = ReuseIV.IncV; } + const Type *ReplacedTy = CommonExprs->getType(); + // Now that we know what we need to do, insert the PHI node itself. // - DOUT << "INSERTING IV of STRIDE " << *Stride << " and BASE " - << *CommonExprs << " :\n"; + DOUT << "INSERTING IV of TYPE " << *ReplacedTy << " of STRIDE " + << *Stride << " and BASE " << *CommonExprs << " :\n"; SCEVExpander Rewriter(*SE, *LI); SCEVExpander PreheaderRewriter(*SE, *LI); @@ -1043,7 +1045,6 @@ BasicBlock *LatchBlock = L->getLoopLatch(); - const Type *ReplacedTy = CommonExprs->getType(); // Emit the initial base value into the loop preheader. Value *CommonBaseV From reid at x10sys.com Sun Apr 1 19:20:09 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 19:20:09 -0500 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html Message-ID: <200704020020.l320K9Wc031297@zion.cs.uiuc.edu> Changes in directory llvm/docs: LangRef.html updated: 1.222 -> 1.223 --- Log message: Fix some bswap typos that Chris noticed. --- Diffs of the changes: (+3 -3) LangRef.html | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.222 llvm/docs/LangRef.html:1.223 --- llvm/docs/LangRef.html:1.222 Sun Apr 1 14:00:37 2007 +++ llvm/docs/LangRef.html Sun Apr 1 19:19:52 2007 @@ -4438,13 +4438,13 @@
           declare i16 @llvm.bswap.i16.i16(i16 <id>)
           declare i32 @llvm.bswap.i32.i32(i32 <id>)
        -  declare i64 @llvm.bswap.i64.i32(i64 <id>)
        +  declare i64 @llvm.bswap.i64.i64(i64 <id>)
         
        Overview:

        -The 'llvm.bwsap' family of intrinsics is used to byteswap integer +The 'llvm.bwsap' family of intrinsics is used to byte swap integer values with an even number of bytes (positive multiple of 16 bits). These are useful for performing operations on data that is not in the target's native byte order. @@ -4996,7 +4996,7 @@ Chris Lattner
        The LLVM Compiler Infrastructure
        - Last modified: $Date: 2007/04/01 19:00:37 $ + Last modified: $Date: 2007/04/02 00:19:52 $ From reid at x10sys.com Sun Apr 1 19:50:45 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 19:50:45 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-upgrade/UpgradeParser.y Message-ID: <200704020050.l320ojQ2031809@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-upgrade: UpgradeParser.y updated: 1.74 -> 1.75 --- Log message: Handle upgrade of llvm.bswap.iXX to llvm.bswap.iXX.iXX per new naming rules for overloaded intrinsic functions. --- Diffs of the changes: (+47 -30) UpgradeParser.y | 77 ++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 47 insertions(+), 30 deletions(-) Index: llvm/tools/llvm-upgrade/UpgradeParser.y diff -u llvm/tools/llvm-upgrade/UpgradeParser.y:1.74 llvm/tools/llvm-upgrade/UpgradeParser.y:1.75 --- llvm/tools/llvm-upgrade/UpgradeParser.y:1.74 Thu Mar 22 02:43:51 2007 +++ llvm/tools/llvm-upgrade/UpgradeParser.y Sun Apr 1 19:50:28 2007 @@ -1448,35 +1448,52 @@ std::vector& Args) { std::string Name = ID.Type == ValID::NameVal ? ID.Name : ""; - if (Name == "llvm.isunordered.f32" || Name == "llvm.isunordered.f64") { - if (Args.size() != 2) - error("Invalid prototype for " + Name + " prototype"); - return new FCmpInst(FCmpInst::FCMP_UNO, Args[0], Args[1]); - } else { - const Type* PtrTy = PointerType::get(Type::Int8Ty); - std::vector Params; - if (Name == "llvm.va_start" || Name == "llvm.va_end") { - if (Args.size() != 1) - error("Invalid prototype for " + Name + " prototype"); - Params.push_back(PtrTy); - const FunctionType *FTy = FunctionType::get(Type::VoidTy, Params, false); - const PointerType *PFTy = PointerType::get(FTy); - Value* Func = getVal(PFTy, ID); - Args[0] = new BitCastInst(Args[0], PtrTy, makeNameUnique("va"), CurBB); - return new CallInst(Func, &Args[0], Args.size()); - } else if (Name == "llvm.va_copy") { - if (Args.size() != 2) - error("Invalid prototype for " + Name + " prototype"); - Params.push_back(PtrTy); - Params.push_back(PtrTy); - const FunctionType *FTy = FunctionType::get(Type::VoidTy, Params, false); - const PointerType *PFTy = PointerType::get(FTy); - Value* Func = getVal(PFTy, ID); - std::string InstName0(makeNameUnique("va0")); - std::string InstName1(makeNameUnique("va1")); - Args[0] = new BitCastInst(Args[0], PtrTy, InstName0, CurBB); - Args[1] = new BitCastInst(Args[1], PtrTy, InstName1, CurBB); - return new CallInst(Func, &Args[0], Args.size()); + switch (Name[5]) { + case 'i': + if (Name == "llvm.isunordered.f32" || Name == "llvm.isunordered.f64") { + if (Args.size() != 2) + error("Invalid prototype for " + Name); + return new FCmpInst(FCmpInst::FCMP_UNO, Args[0], Args[1]); + } + break; + case 'b': + if (Name.length() > 10 && !memcmp(&Name[5], "bswap.", 6)) { + const Type* ArgTy = Args[0]->getType(); + Name += ".i" + utostr(cast(ArgTy)->getBitWidth()); + Function *F = cast( + CurModule.CurrentModule->getOrInsertFunction(Name, RetTy, ArgTy, + (void*)0)); + return new CallInst(F, Args[0]); + } + break; + case 'v' : { + const Type* PtrTy = PointerType::get(Type::Int8Ty); + std::vector Params; + if (Name == "llvm.va_start" || Name == "llvm.va_end") { + if (Args.size() != 1) + error("Invalid prototype for " + Name + " prototype"); + Params.push_back(PtrTy); + const FunctionType *FTy = + FunctionType::get(Type::VoidTy, Params, false); + const PointerType *PFTy = PointerType::get(FTy); + Value* Func = getVal(PFTy, ID); + Args[0] = new BitCastInst(Args[0], PtrTy, makeNameUnique("va"), CurBB); + return new CallInst(Func, &Args[0], Args.size()); + } else if (Name == "llvm.va_copy") { + if (Args.size() != 2) + error("Invalid prototype for " + Name + " prototype"); + Params.push_back(PtrTy); + Params.push_back(PtrTy); + const FunctionType *FTy = + FunctionType::get(Type::VoidTy, Params, false); + const PointerType *PFTy = PointerType::get(FTy); + Value* Func = getVal(PFTy, ID); + std::string InstName0(makeNameUnique("va0")); + std::string InstName1(makeNameUnique("va1")); + Args[0] = new BitCastInst(Args[0], PtrTy, InstName0, CurBB); + Args[1] = new BitCastInst(Args[1], PtrTy, InstName1, CurBB); + return new CallInst(Func, &Args[0], Args.size()); + } } } return 0; @@ -3661,7 +3678,7 @@ if ($6) for (unsigned i = 0, e = $6->size(); i < e; ++i) Args.push_back((*$6)[i].V); - Instruction *Inst = upgradeIntrinsicCall(FTy, $4, Args); + Instruction *Inst = upgradeIntrinsicCall(FTy->getReturnType(), $4, Args); // If we got an upgraded intrinsic if (Inst) { From reid at x10sys.com Sun Apr 1 19:51:36 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 19:51:36 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll Message-ID: <200704020051.l320paOZ031839@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Generic: llvm-ct-intrinsics.ll updated: 1.5 -> 1.6 --- Log message: Revert the name changes for llvm.bswap to allow (and test) llvm-upgrade of this intrinsic. --- Diffs of the changes: (+33 -33) llvm-ct-intrinsics.ll | 66 +++++++++++++++++++++++++------------------------- 1 files changed, 33 insertions(+), 33 deletions(-) Index: llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll diff -u llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll:1.5 llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll:1.6 --- llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll:1.5 Sun Apr 1 02:36:28 2007 +++ llvm/test/CodeGen/Generic/llvm-ct-intrinsics.ll Sun Apr 1 19:51:15 2007 @@ -1,59 +1,59 @@ ; Make sure this testcase is supported by all code generators ; RUN: llvm-upgrade < %s | llvm-as | llc -declare uint %llvm.ctpop.i64(ulong) +declare ulong %llvm.ctpop.i64(ulong) declare uint %llvm.ctpop.i32(uint) -declare uint %llvm.ctpop.i16(ushort) -declare uint %llvm.ctpop.i8(ubyte) +declare ushort %llvm.ctpop.i16(ushort) +declare ubyte %llvm.ctpop.i8(ubyte) void %ctpoptest(ubyte %A, ushort %B, uint %C, ulong %D, - uint *%AP, uint* %BP, uint* %CP, uint* %DP) { - %a = call uint %llvm.ctpop.i8(ubyte %A) - %b = call uint %llvm.ctpop.i16(ushort %B) + ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) { + %a = call ubyte %llvm.ctpop.i8(ubyte %A) + %b = call ushort %llvm.ctpop.i16(ushort %B) %c = call uint %llvm.ctpop.i32(uint %C) - %d = call uint %llvm.ctpop.i64(ulong %D) + %d = call ulong %llvm.ctpop.i64(ulong %D) - store uint %a, uint* %AP - store uint %b, uint* %BP - store uint %c, uint* %CP - store uint %d, uint* %DP + store ubyte %a, ubyte* %AP + store ushort %b, ushort* %BP + store uint %c, uint* %CP + store ulong %d, ulong* %DP ret void } -declare uint %llvm.ctlz.i64(ulong) +declare ulong %llvm.ctlz.i64(ulong) declare uint %llvm.ctlz.i32(uint) -declare uint %llvm.ctlz.i16(ushort) -declare uint %llvm.ctlz.i8(ubyte) +declare ushort %llvm.ctlz.i16(ushort) +declare ubyte %llvm.ctlz.i8(ubyte) void %ctlztest(ubyte %A, ushort %B, uint %C, ulong %D, - uint *%AP, uint* %BP, uint* %CP, uint* %DP) { - %a = call uint %llvm.ctlz.i8(ubyte %A) - %b = call uint %llvm.ctlz.i16(ushort %B) + ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) { + %a = call ubyte %llvm.ctlz.i8(ubyte %A) + %b = call ushort %llvm.ctlz.i16(ushort %B) %c = call uint %llvm.ctlz.i32(uint %C) - %d = call uint %llvm.ctlz.i64(ulong %D) + %d = call ulong %llvm.ctlz.i64(ulong %D) - store uint %a, uint* %AP - store uint %b, uint* %BP - store uint %c, uint* %CP - store uint %d, uint* %DP + store ubyte %a, ubyte* %AP + store ushort %b, ushort* %BP + store uint %c, uint* %CP + store ulong %d, ulong* %DP ret void } -declare uint %llvm.cttz.i64(ulong) +declare ulong %llvm.cttz.i64(ulong) declare uint %llvm.cttz.i32(uint) -declare uint %llvm.cttz.i16(ushort) -declare uint %llvm.cttz.i8(ubyte) +declare ushort %llvm.cttz.i16(ushort) +declare ubyte %llvm.cttz.i8(ubyte) void %cttztest(ubyte %A, ushort %B, uint %C, ulong %D, - uint *%AP, uint* %BP, uint* %CP, uint* %DP) { - %a = call uint %llvm.cttz.i8(ubyte %A) - %b = call uint %llvm.cttz.i16(ushort %B) + ubyte *%AP, ushort* %BP, uint* %CP, ulong* %DP) { + %a = call ubyte %llvm.cttz.i8(ubyte %A) + %b = call ushort %llvm.cttz.i16(ushort %B) %c = call uint %llvm.cttz.i32(uint %C) - %d = call uint %llvm.cttz.i64(ulong %D) + %d = call ulong %llvm.cttz.i64(ulong %D) - store uint %a, uint* %AP - store uint %b, uint* %BP - store uint %c, uint* %CP - store uint %d, uint* %DP + store ubyte %a, ubyte* %AP + store ushort %b, ushort* %BP + store uint %c, uint* %CP + store ulong %d, ulong* %DP ret void } From reid at x10sys.com Sun Apr 1 19:51:36 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 19:51:36 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/bswap-fold.ll Message-ID: <200704020051.l320pakj031844@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/InstCombine: bswap-fold.ll updated: 1.3 -> 1.4 --- Log message: Revert the name changes for llvm.bswap to allow (and test) llvm-upgrade of this intrinsic. --- Diffs of the changes: (+7 -7) bswap-fold.ll | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) Index: llvm/test/Transforms/InstCombine/bswap-fold.ll diff -u llvm/test/Transforms/InstCombine/bswap-fold.ll:1.3 llvm/test/Transforms/InstCombine/bswap-fold.ll:1.4 --- llvm/test/Transforms/InstCombine/bswap-fold.ll:1.3 Sun Apr 1 02:36:28 2007 +++ llvm/test/Transforms/InstCombine/bswap-fold.ll Sun Apr 1 19:51:15 2007 @@ -2,25 +2,25 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep 'call.*bswap' bool %test1(ushort %tmp2) { - %tmp10 = call ushort %llvm.bswap.i16.i16( ushort %tmp2 ) + %tmp10 = call ushort %llvm.bswap.i16( ushort %tmp2 ) %tmp = seteq ushort %tmp10, 1 ret bool %tmp } bool %test2(uint %tmp) { - %tmp34 = tail call uint %llvm.bswap.i32.i32( uint %tmp ) + %tmp34 = tail call uint %llvm.bswap.i32( uint %tmp ) %tmp = seteq uint %tmp34, 1 ret bool %tmp } +declare uint %llvm.bswap.i32(uint) + bool %test3(ulong %tmp) { - %tmp34 = tail call ulong %llvm.bswap.i64.i64( ulong %tmp ) + %tmp34 = tail call ulong %llvm.bswap.i64( ulong %tmp ) %tmp = seteq ulong %tmp34, 1 ret bool %tmp } -declare ulong %llvm.bswap.i64.i64(ulong) - -declare ushort %llvm.bswap.i16.i16(ushort) +declare ulong %llvm.bswap.i64(ulong) -declare uint %llvm.bswap.i32.i32(uint) +declare ushort %llvm.bswap.i16(ushort) From reid at x10sys.com Sun Apr 1 20:02:07 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 20:02:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/IntrinsicLowering.cpp Message-ID: <200704020102.l32127FN032069@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: IntrinsicLowering.cpp updated: 1.73 -> 1.74 --- Log message: For PR1297: http://llvm.org/PR1297 : Make sure that the CTPOP result is casted to i32 as the bit counting intrinsics all return i32 now (this affects CTLZ and CTTZ as well). --- Diffs of the changes: (+1 -1) IntrinsicLowering.cpp | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/IntrinsicLowering.cpp diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.73 llvm/lib/CodeGen/IntrinsicLowering.cpp:1.74 --- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.73 Sun Apr 1 02:35:23 2007 +++ llvm/lib/CodeGen/IntrinsicLowering.cpp Sun Apr 1 20:01:49 2007 @@ -218,7 +218,7 @@ V = BinaryOperator::createAdd(LHS, RHS, "ctpop.step", IP); } - return V; + return CastInst::createIntegerCast(V, Type::Int32Ty, false, "ctpop", IP); } /// LowerCTLZ - Emit the code to lower ctlz of V before the specified From reid at x10sys.com Sun Apr 1 20:08:19 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 20:08:19 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll bswap-load-store.ll Message-ID: <200704020108.l3218J4u032269@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/PowerPC: 2006-07-19-stwbrx-crash.ll updated: 1.3 -> 1.4 bswap-load-store.ll updated: 1.3 -> 1.4 --- Log message: Let llvm-upgrade upgrade bswap intrinsic. --- Diffs of the changes: (+8 -8) 2006-07-19-stwbrx-crash.ll | 4 ++-- bswap-load-store.ll | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) Index: llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll diff -u llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll:1.3 llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll:1.4 --- llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll:1.3 Sun Apr 1 02:36:28 2007 +++ llvm/test/CodeGen/PowerPC/2006-07-19-stwbrx-crash.ll Sun Apr 1 20:08:02 2007 @@ -2,9 +2,9 @@ void %img2buf(int %symbol_size_in_bytes, ushort* %ui16) { %tmp93 = load ushort* null ; [#uses=1] - %tmp99 = call ushort %llvm.bswap.i16.i16( ushort %tmp93 ) ; [#uses=1] + %tmp99 = call ushort %llvm.bswap.i16( ushort %tmp93 ) ; [#uses=1] store ushort %tmp99, ushort* %ui16 ret void } -declare ushort %llvm.bswap.i16.i16(ushort) +declare ushort %llvm.bswap.i16(ushort) Index: llvm/test/CodeGen/PowerPC/bswap-load-store.ll diff -u llvm/test/CodeGen/PowerPC/bswap-load-store.ll:1.3 llvm/test/CodeGen/PowerPC/bswap-load-store.ll:1.4 --- llvm/test/CodeGen/PowerPC/bswap-load-store.ll:1.3 Sun Apr 1 02:36:28 2007 +++ llvm/test/CodeGen/PowerPC/bswap-load-store.ll Sun Apr 1 20:08:02 2007 @@ -8,7 +8,7 @@ void %STWBRX(uint %i, sbyte* %ptr, int %off) { %tmp1 = getelementptr sbyte* %ptr, int %off %tmp1 = cast sbyte* %tmp1 to uint* - %tmp13 = tail call uint %llvm.bswap.i32.i32(uint %i) + %tmp13 = tail call uint %llvm.bswap.i32(uint %i) store uint %tmp13, uint* %tmp1 ret void } @@ -17,14 +17,14 @@ %tmp1 = getelementptr sbyte* %ptr, int %off %tmp1 = cast sbyte* %tmp1 to uint* %tmp = load uint* %tmp1 - %tmp14 = tail call uint %llvm.bswap.i32.i32( uint %tmp ) + %tmp14 = tail call uint %llvm.bswap.i32( uint %tmp ) ret uint %tmp14 } void %STHBRX(ushort %s, sbyte* %ptr, int %off) { %tmp1 = getelementptr sbyte* %ptr, int %off %tmp1 = cast sbyte* %tmp1 to ushort* - %tmp5 = call ushort %llvm.bswap.i16.i16( ushort %s ) + %tmp5 = call ushort %llvm.bswap.i16( ushort %s ) store ushort %tmp5, ushort* %tmp1 ret void } @@ -33,10 +33,10 @@ %tmp1 = getelementptr sbyte* %ptr, int %off %tmp1 = cast sbyte* %tmp1 to ushort* %tmp = load ushort* %tmp1 - %tmp6 = call ushort %llvm.bswap.i16.i16(ushort %tmp) + %tmp6 = call ushort %llvm.bswap.i16(ushort %tmp) ret ushort %tmp6 } -declare uint %llvm.bswap.i32.i32(uint) +declare uint %llvm.bswap.i32(uint) -declare ushort %llvm.bswap.i16.i16(ushort) +declare ushort %llvm.bswap.i16(ushort) From reid at x10sys.com Sun Apr 1 20:09:36 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 20:09:36 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/X86/bswap.ll Message-ID: <200704020109.l3219a4Q032301@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/X86: bswap.ll updated: 1.4 -> 1.5 --- Log message: Let llvm-upgrade upgrade the bswap intrinsic. --- Diffs of the changes: (+6 -6) bswap.ll | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/test/CodeGen/X86/bswap.ll diff -u llvm/test/CodeGen/X86/bswap.ll:1.4 llvm/test/CodeGen/X86/bswap.ll:1.5 --- llvm/test/CodeGen/X86/bswap.ll:1.4 Sun Apr 1 02:36:28 2007 +++ llvm/test/CodeGen/X86/bswap.ll Sun Apr 1 20:09:19 2007 @@ -3,21 +3,21 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep bswapl | wc -l | grep 3 && ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep rolw | wc -l | grep 1 -declare ushort %llvm.bswap.i16.i16(ushort) -declare uint %llvm.bswap.i32.i32(uint) -declare ulong %llvm.bswap.i64.i64(ulong) +declare ushort %llvm.bswap.i16(ushort) +declare uint %llvm.bswap.i32(uint) +declare ulong %llvm.bswap.i64(ulong) ushort %W(ushort %A) { - %Z = call ushort %llvm.bswap.i16.i16(ushort %A) + %Z = call ushort %llvm.bswap.i16(ushort %A) ret ushort %Z } uint %X(uint %A) { - %Z = call uint %llvm.bswap.i32.i32(uint %A) + %Z = call uint %llvm.bswap.i32(uint %A) ret uint %Z } ulong %Y(ulong %A) { - %Z = call ulong %llvm.bswap.i64.i64(ulong %A) + %Z = call ulong %llvm.bswap.i64(ulong %A) ret ulong %Z } From reid at x10sys.com Sun Apr 1 20:13:53 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 20:13:53 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-upgrade/UpgradeParser.y Message-ID: <200704020113.l321Drsv032392@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-upgrade: UpgradeParser.y updated: 1.75 -> 1.76 --- Log message: Don't upgrade functions that look like a bswap intrinsic but aren't. --- Diffs of the changes: (+1 -1) UpgradeParser.y | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/tools/llvm-upgrade/UpgradeParser.y diff -u llvm/tools/llvm-upgrade/UpgradeParser.y:1.75 llvm/tools/llvm-upgrade/UpgradeParser.y:1.76 --- llvm/tools/llvm-upgrade/UpgradeParser.y:1.75 Sun Apr 1 19:50:28 2007 +++ llvm/tools/llvm-upgrade/UpgradeParser.y Sun Apr 1 20:13:36 2007 @@ -1457,7 +1457,7 @@ } break; case 'b': - if (Name.length() > 10 && !memcmp(&Name[5], "bswap.", 6)) { + if (Name.length() == 14 && !memcmp(&Name[5], "bswap.i", 7)) { const Type* ArgTy = Args[0]->getType(); Name += ".i" + utostr(cast(ArgTy)->getBitWidth()); Function *F = cast( From reid at x10sys.com Sun Apr 1 20:14:17 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 20:14:17 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs UpgradeParser.h.cvs UpgradeParser.y.cvs Message-ID: <200704020114.l321EHIo032418@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-upgrade: UpgradeParser.cpp.cvs updated: 1.69 -> 1.70 UpgradeParser.h.cvs updated: 1.51 -> 1.52 UpgradeParser.y.cvs updated: 1.68 -> 1.69 --- Log message: Regenerate --- Diffs of the changes: (+362 -328) UpgradeParser.cpp.cvs | 611 +++++++++++++++++++++++++------------------------- UpgradeParser.h.cvs | 2 UpgradeParser.y.cvs | 77 +++--- 3 files changed, 362 insertions(+), 328 deletions(-) Index: llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs diff -u llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs:1.69 llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs:1.70 --- llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs:1.69 Thu Mar 22 02:43:50 2007 +++ llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs Sun Apr 1 20:14:00 2007 @@ -1808,35 +1808,52 @@ std::vector& Args) { std::string Name = ID.Type == ValID::NameVal ? ID.Name : ""; - if (Name == "llvm.isunordered.f32" || Name == "llvm.isunordered.f64") { - if (Args.size() != 2) - error("Invalid prototype for " + Name + " prototype"); - return new FCmpInst(FCmpInst::FCMP_UNO, Args[0], Args[1]); - } else { - const Type* PtrTy = PointerType::get(Type::Int8Ty); - std::vector Params; - if (Name == "llvm.va_start" || Name == "llvm.va_end") { - if (Args.size() != 1) - error("Invalid prototype for " + Name + " prototype"); - Params.push_back(PtrTy); - const FunctionType *FTy = FunctionType::get(Type::VoidTy, Params, false); - const PointerType *PFTy = PointerType::get(FTy); - Value* Func = getVal(PFTy, ID); - Args[0] = new BitCastInst(Args[0], PtrTy, makeNameUnique("va"), CurBB); - return new CallInst(Func, &Args[0], Args.size()); - } else if (Name == "llvm.va_copy") { - if (Args.size() != 2) - error("Invalid prototype for " + Name + " prototype"); - Params.push_back(PtrTy); - Params.push_back(PtrTy); - const FunctionType *FTy = FunctionType::get(Type::VoidTy, Params, false); - const PointerType *PFTy = PointerType::get(FTy); - Value* Func = getVal(PFTy, ID); - std::string InstName0(makeNameUnique("va0")); - std::string InstName1(makeNameUnique("va1")); - Args[0] = new BitCastInst(Args[0], PtrTy, InstName0, CurBB); - Args[1] = new BitCastInst(Args[1], PtrTy, InstName1, CurBB); - return new CallInst(Func, &Args[0], Args.size()); + switch (Name[5]) { + case 'i': + if (Name == "llvm.isunordered.f32" || Name == "llvm.isunordered.f64") { + if (Args.size() != 2) + error("Invalid prototype for " + Name); + return new FCmpInst(FCmpInst::FCMP_UNO, Args[0], Args[1]); + } + break; + case 'b': + if (Name.length() == 14 && !memcmp(&Name[5], "bswap.i", 7)) { + const Type* ArgTy = Args[0]->getType(); + Name += ".i" + utostr(cast(ArgTy)->getBitWidth()); + Function *F = cast( + CurModule.CurrentModule->getOrInsertFunction(Name, RetTy, ArgTy, + (void*)0)); + return new CallInst(F, Args[0]); + } + break; + case 'v' : { + const Type* PtrTy = PointerType::get(Type::Int8Ty); + std::vector Params; + if (Name == "llvm.va_start" || Name == "llvm.va_end") { + if (Args.size() != 1) + error("Invalid prototype for " + Name + " prototype"); + Params.push_back(PtrTy); + const FunctionType *FTy = + FunctionType::get(Type::VoidTy, Params, false); + const PointerType *PFTy = PointerType::get(FTy); + Value* Func = getVal(PFTy, ID); + Args[0] = new BitCastInst(Args[0], PtrTy, makeNameUnique("va"), CurBB); + return new CallInst(Func, &Args[0], Args.size()); + } else if (Name == "llvm.va_copy") { + if (Args.size() != 2) + error("Invalid prototype for " + Name + " prototype"); + Params.push_back(PtrTy); + Params.push_back(PtrTy); + const FunctionType *FTy = + FunctionType::get(Type::VoidTy, Params, false); + const PointerType *PFTy = PointerType::get(FTy); + Value* Func = getVal(PFTy, ID); + std::string InstName0(makeNameUnique("va0")); + std::string InstName1(makeNameUnique("va1")); + Args[0] = new BitCastInst(Args[0], PtrTy, InstName0, CurBB); + Args[1] = new BitCastInst(Args[1], PtrTy, InstName1, CurBB); + return new CallInst(Func, &Args[0], Args.size()); + } } } return 0; @@ -2071,7 +2088,7 @@ #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 1693 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1712 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -2114,7 +2131,7 @@ llvm::Module::Endianness Endianness; } YYSTYPE; /* Line 196 of yacc.c. */ -#line 2116 "UpgradeParser.tab.c" +#line 2135 "UpgradeParser.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -2126,7 +2143,7 @@ /* Line 219 of yacc.c. */ -#line 2128 "UpgradeParser.tab.c" +#line 2147 "UpgradeParser.tab.c" #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ @@ -2486,38 +2503,38 @@ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 1833, 1833, 1834, 1842, 1843, 1853, 1853, 1853, 1853, - 1853, 1853, 1853, 1853, 1853, 1853, 1853, 1857, 1857, 1857, - 1861, 1861, 1861, 1861, 1861, 1861, 1865, 1865, 1866, 1866, - 1867, 1867, 1868, 1868, 1869, 1869, 1873, 1873, 1874, 1874, - 1875, 1875, 1876, 1876, 1877, 1877, 1878, 1878, 1879, 1879, - 1880, 1881, 1884, 1884, 1884, 1884, 1888, 1888, 1888, 1888, - 1888, 1888, 1888, 1889, 1889, 1889, 1889, 1889, 1889, 1895, - 1895, 1895, 1895, 1899, 1899, 1899, 1899, 1903, 1903, 1907, - 1907, 1912, 1915, 1920, 1921, 1922, 1923, 1924, 1925, 1926, - 1927, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1948, - 1949, 1957, 1958, 1966, 1975, 1976, 1983, 1984, 1988, 1992, - 2008, 2009, 2016, 2017, 2024, 2032, 2032, 2032, 2032, 2032, - 2032, 2032, 2033, 2033, 2033, 2033, 2033, 2038, 2042, 2046, - 2051, 2060, 2078, 2084, 2097, 2108, 2112, 2125, 2129, 2143, - 2147, 2154, 2155, 2161, 2168, 2180, 2210, 2223, 2246, 2274, - 2296, 2307, 2329, 2340, 2349, 2354, 2413, 2420, 2428, 2435, - 2442, 2446, 2450, 2459, 2474, 2487, 2496, 2524, 2537, 2546, - 2552, 2558, 2569, 2575, 2581, 2592, 2593, 2602, 2603, 2615, - 2624, 2625, 2626, 2627, 2628, 2644, 2664, 2666, 2668, 2668, - 2675, 2675, 2683, 2683, 2691, 2691, 2700, 2702, 2704, 2709, - 2723, 2724, 2728, 2731, 2739, 2743, 2750, 2754, 2758, 2762, - 2770, 2770, 2774, 2775, 2779, 2787, 2792, 2800, 2801, 2808, - 2815, 2819, 3000, 3000, 3004, 3004, 3014, 3014, 3018, 3023, - 3024, 3025, 3029, 3030, 3029, 3042, 3043, 3048, 3049, 3050, - 3051, 3055, 3059, 3060, 3061, 3062, 3083, 3087, 3101, 3102, - 3107, 3107, 3115, 3125, 3128, 3137, 3148, 3153, 3162, 3173, - 3173, 3176, 3180, 3184, 3189, 3199, 3217, 3226, 3291, 3295, - 3302, 3314, 3329, 3359, 3369, 3379, 3383, 3390, 3391, 3395, - 3398, 3404, 3423, 3441, 3457, 3471, 3485, 3496, 3514, 3523, - 3532, 3539, 3560, 3584, 3590, 3596, 3602, 3618, 3702, 3710, - 3711, 3715, 3716, 3720, 3726, 3733, 3739, 3746, 3753, 3766, - 3792 + 0, 1852, 1852, 1853, 1861, 1862, 1872, 1872, 1872, 1872, + 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1876, 1876, 1876, + 1880, 1880, 1880, 1880, 1880, 1880, 1884, 1884, 1885, 1885, + 1886, 1886, 1887, 1887, 1888, 1888, 1892, 1892, 1893, 1893, + 1894, 1894, 1895, 1895, 1896, 1896, 1897, 1897, 1898, 1898, + 1899, 1900, 1903, 1903, 1903, 1903, 1907, 1907, 1907, 1907, + 1907, 1907, 1907, 1908, 1908, 1908, 1908, 1908, 1908, 1914, + 1914, 1914, 1914, 1918, 1918, 1918, 1918, 1922, 1922, 1926, + 1926, 1931, 1934, 1939, 1940, 1941, 1942, 1943, 1944, 1945, + 1946, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1967, + 1968, 1976, 1977, 1985, 1994, 1995, 2002, 2003, 2007, 2011, + 2027, 2028, 2035, 2036, 2043, 2051, 2051, 2051, 2051, 2051, + 2051, 2051, 2052, 2052, 2052, 2052, 2052, 2057, 2061, 2065, + 2070, 2079, 2097, 2103, 2116, 2127, 2131, 2144, 2148, 2162, + 2166, 2173, 2174, 2180, 2187, 2199, 2229, 2242, 2265, 2293, + 2315, 2326, 2348, 2359, 2368, 2373, 2432, 2439, 2447, 2454, + 2461, 2465, 2469, 2478, 2493, 2506, 2515, 2543, 2556, 2565, + 2571, 2577, 2588, 2594, 2600, 2611, 2612, 2621, 2622, 2634, + 2643, 2644, 2645, 2646, 2647, 2663, 2683, 2685, 2687, 2687, + 2694, 2694, 2702, 2702, 2710, 2710, 2719, 2721, 2723, 2728, + 2742, 2743, 2747, 2750, 2758, 2762, 2769, 2773, 2777, 2781, + 2789, 2789, 2793, 2794, 2798, 2806, 2811, 2819, 2820, 2827, + 2834, 2838, 3019, 3019, 3023, 3023, 3033, 3033, 3037, 3042, + 3043, 3044, 3048, 3049, 3048, 3061, 3062, 3067, 3068, 3069, + 3070, 3074, 3078, 3079, 3080, 3081, 3102, 3106, 3120, 3121, + 3126, 3126, 3134, 3144, 3147, 3156, 3167, 3172, 3181, 3192, + 3192, 3195, 3199, 3203, 3208, 3218, 3236, 3245, 3310, 3314, + 3321, 3333, 3348, 3378, 3388, 3398, 3402, 3409, 3410, 3414, + 3417, 3423, 3442, 3460, 3476, 3490, 3504, 3515, 3533, 3542, + 3551, 3558, 3579, 3603, 3609, 3615, 3621, 3637, 3721, 3729, + 3730, 3734, 3735, 3739, 3745, 3752, 3758, 3765, 3772, 3785, + 3811 }; #endif @@ -3907,7 +3924,7 @@ switch (yyn) { case 3: -#line 1834 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1853 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].UIntVal) > (uint32_t)INT32_MAX) // Outside of my range! error("Value too large for type"); @@ -3916,7 +3933,7 @@ break; case 5: -#line 1843 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1862 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].UInt64Val) > (uint64_t)INT64_MAX) // Outside of my range! error("Value too large for type"); @@ -3925,226 +3942,226 @@ break; case 26: -#line 1865 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1884 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_EQ; ;} break; case 27: -#line 1865 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1884 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_NE; ;} break; case 28: -#line 1866 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1885 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_SLT; ;} break; case 29: -#line 1866 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1885 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_SGT; ;} break; case 30: -#line 1867 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1886 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_SLE; ;} break; case 31: -#line 1867 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1886 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_SGE; ;} break; case 32: -#line 1868 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1887 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_ULT; ;} break; case 33: -#line 1868 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1887 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_UGT; ;} break; case 34: -#line 1869 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1888 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_ULE; ;} break; case 35: -#line 1869 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1888 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_UGE; ;} break; case 36: -#line 1873 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1892 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_OEQ; ;} break; case 37: -#line 1873 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1892 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_ONE; ;} break; case 38: -#line 1874 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1893 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_OLT; ;} break; case 39: -#line 1874 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1893 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_OGT; ;} break; case 40: -#line 1875 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1894 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_OLE; ;} break; case 41: -#line 1875 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1894 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_OGE; ;} break; case 42: -#line 1876 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1895 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_ORD; ;} break; case 43: -#line 1876 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1895 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_UNO; ;} break; case 44: -#line 1877 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1896 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_UEQ; ;} break; case 45: -#line 1877 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1896 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_UNE; ;} break; case 46: -#line 1878 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1897 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_ULT; ;} break; case 47: -#line 1878 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1897 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_UGT; ;} break; case 48: -#line 1879 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1898 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_ULE; ;} break; case 49: -#line 1879 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1898 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_UGE; ;} break; case 50: -#line 1880 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1899 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_TRUE; ;} break; case 51: -#line 1881 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1900 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_FALSE; ;} break; case 81: -#line 1912 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1931 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.StrVal) = (yyvsp[-1].StrVal); ;} break; case 82: -#line 1915 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1934 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.StrVal) = 0; ;} break; case 83: -#line 1920 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1939 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 84: -#line 1921 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1940 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 85: -#line 1922 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1941 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 86: -#line 1923 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1942 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; case 87: -#line 1924 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1943 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 88: -#line 1925 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1944 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 89: -#line 1926 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1945 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 90: -#line 1927 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1946 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 91: -#line 1931 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1950 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::C; ;} break; case 92: -#line 1932 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1951 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::C; ;} break; case 93: -#line 1933 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1952 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::CSRet; ;} break; case 94: -#line 1934 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1953 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::Fast; ;} break; case 95: -#line 1935 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1954 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::Cold; ;} break; case 96: -#line 1936 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1955 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::X86_StdCall; ;} break; case 97: -#line 1937 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1956 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::X86_FastCall; ;} break; case 98: -#line 1938 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1957 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val)) error("Calling conv too large"); @@ -4153,12 +4170,12 @@ break; case 99: -#line 1948 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1967 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = 0; ;} break; case 100: -#line 1949 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1968 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4167,12 +4184,12 @@ break; case 101: -#line 1957 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1976 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = 0; ;} break; case 102: -#line 1958 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1977 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4181,7 +4198,7 @@ break; case 103: -#line 1966 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1985 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { for (unsigned i = 0, e = strlen((yyvsp[0].StrVal)); i != e; ++i) if ((yyvsp[0].StrVal)[i] == '"' || (yyvsp[0].StrVal)[i] == '\\') @@ -4191,27 +4208,27 @@ break; case 104: -#line 1975 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1994 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.StrVal) = 0; ;} break; case 105: -#line 1976 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1995 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.StrVal) = (yyvsp[0].StrVal); ;} break; case 106: -#line 1983 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2002 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" {;} break; case 107: -#line 1984 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2003 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" {;} break; case 108: -#line 1988 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2007 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurGV->setSection((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4219,7 +4236,7 @@ break; case 109: -#line 1992 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2011 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val))) error("Alignment must be a power of two"); @@ -4229,7 +4246,7 @@ break; case 111: -#line 2009 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2028 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[0].PrimType).T); (yyval.TypeVal).S.makeSignless(); @@ -4237,7 +4254,7 @@ break; case 113: -#line 2017 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2036 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[0].PrimType).T); (yyval.TypeVal).S.makeSignless(); @@ -4245,7 +4262,7 @@ break; case 114: -#line 2024 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2043 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!UpRefs.empty()) error("Invalid upreference in type: " + (*(yyvsp[0].TypeVal).PAT)->getDescription()); @@ -4254,7 +4271,7 @@ break; case 127: -#line 2038 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2057 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[0].PrimType).T); (yyval.TypeVal).S.copy((yyvsp[0].PrimType).S); @@ -4262,7 +4279,7 @@ break; case 128: -#line 2042 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2061 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeVal).PAT = new PATypeHolder(OpaqueType::get()); (yyval.TypeVal).S.makeSignless(); @@ -4270,7 +4287,7 @@ break; case 129: -#line 2046 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2065 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Named types are also simple types... (yyval.TypeVal).S.copy(getTypeSign((yyvsp[0].ValIDVal))); const Type* tmp = getType((yyvsp[0].ValIDVal)); @@ -4279,7 +4296,7 @@ break; case 130: -#line 2051 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2070 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Type UpReference if ((yyvsp[0].UInt64Val) > (uint64_t)~0U) error("Value out of range"); @@ -4292,7 +4309,7 @@ break; case 131: -#line 2060 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2079 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Function derived type? (yyval.TypeVal).S.makeComposite((yyvsp[-3].TypeVal).S); std::vector Params; @@ -4314,7 +4331,7 @@ break; case 132: -#line 2078 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2097 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Sized array type? (yyval.TypeVal).S.makeComposite((yyvsp[-1].TypeVal).S); (yyval.TypeVal).PAT = new PATypeHolder(HandleUpRefs(ArrayType::get((yyvsp[-1].TypeVal).PAT->get(), @@ -4324,7 +4341,7 @@ break; case 133: -#line 2084 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2103 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Vector type? const llvm::Type* ElemTy = (yyvsp[-1].TypeVal).PAT->get(); if ((unsigned)(yyvsp[-3].UInt64Val) != (yyvsp[-3].UInt64Val)) @@ -4341,7 +4358,7 @@ break; case 134: -#line 2097 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2116 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Structure type? std::vector Elements; (yyval.TypeVal).S.makeComposite(); @@ -4356,7 +4373,7 @@ break; case 135: -#line 2108 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2127 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Empty structure type? (yyval.TypeVal).PAT = new PATypeHolder(StructType::get(std::vector())); (yyval.TypeVal).S.makeComposite(); @@ -4364,7 +4381,7 @@ break; case 136: -#line 2112 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2131 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Packed Structure type? (yyval.TypeVal).S.makeComposite(); std::vector Elements; @@ -4381,7 +4398,7 @@ break; case 137: -#line 2125 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2144 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Empty packed structure type? (yyval.TypeVal).PAT = new PATypeHolder(StructType::get(std::vector(),true)); (yyval.TypeVal).S.makeComposite(); @@ -4389,7 +4406,7 @@ break; case 138: -#line 2129 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2148 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Pointer type? if ((yyvsp[-1].TypeVal).PAT->get() == Type::LabelTy) error("Cannot form a pointer to a basic block"); @@ -4401,7 +4418,7 @@ break; case 139: -#line 2143 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2162 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeList) = new std::list(); (yyval.TypeList)->push_back((yyvsp[0].TypeVal)); @@ -4409,14 +4426,14 @@ break; case 140: -#line 2147 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2166 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back((yyvsp[0].TypeVal)); ;} break; case 142: -#line 2155 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2174 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { PATypeInfo VoidTI; VoidTI.PAT = new PATypeHolder(Type::VoidTy); @@ -4426,7 +4443,7 @@ break; case 143: -#line 2161 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2180 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeList) = new std::list(); PATypeInfo VoidTI; @@ -4437,14 +4454,14 @@ break; case 144: -#line 2168 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2187 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeList) = new std::list(); ;} break; case 145: -#line 2180 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2199 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Nonempty unsized arr const ArrayType *ATy = dyn_cast((yyvsp[-3].TypeVal).PAT->get()); if (ATy == 0) @@ -4478,7 +4495,7 @@ break; case 146: -#line 2210 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2229 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal).PAT->get()); if (ATy == 0) @@ -4495,7 +4512,7 @@ break; case 147: -#line 2223 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2242 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal).PAT->get()); if (ATy == 0) @@ -4522,7 +4539,7 @@ break; case 148: -#line 2246 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2265 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Nonempty unsized arr const VectorType *PTy = dyn_cast((yyvsp[-3].TypeVal).PAT->get()); if (PTy == 0) @@ -4554,7 +4571,7 @@ break; case 149: -#line 2274 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2293 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const StructType *STy = dyn_cast((yyvsp[-3].TypeVal).PAT->get()); if (STy == 0) @@ -4580,7 +4597,7 @@ break; case 150: -#line 2296 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2315 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const StructType *STy = dyn_cast((yyvsp[-2].TypeVal).PAT->get()); if (STy == 0) @@ -4595,7 +4612,7 @@ break; case 151: -#line 2307 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2326 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const StructType *STy = dyn_cast((yyvsp[-5].TypeVal).PAT->get()); if (STy == 0) @@ -4621,7 +4638,7 @@ break; case 152: -#line 2329 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2348 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const StructType *STy = dyn_cast((yyvsp[-4].TypeVal).PAT->get()); if (STy == 0) @@ -4636,7 +4653,7 @@ break; case 153: -#line 2340 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2359 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const PointerType *PTy = dyn_cast((yyvsp[-1].TypeVal).PAT->get()); if (PTy == 0) @@ -4649,7 +4666,7 @@ break; case 154: -#line 2349 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2368 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ConstVal).C = UndefValue::get((yyvsp[-1].TypeVal).PAT->get()); (yyval.ConstVal).S.copy((yyvsp[-1].TypeVal).S); @@ -4658,7 +4675,7 @@ break; case 155: -#line 2354 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2373 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const PointerType *Ty = dyn_cast((yyvsp[-1].TypeVal).PAT->get()); if (Ty == 0) @@ -4721,7 +4738,7 @@ break; case 156: -#line 2413 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2432 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[-1].TypeVal).PAT->get() != (yyvsp[0].ConstVal).C->getType()) error("Mismatched types for constant expression"); @@ -4732,7 +4749,7 @@ break; case 157: -#line 2420 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2439 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-1].TypeVal).PAT->get(); if (isa(Ty) || Ty == Type::LabelTy || isa(Ty)) @@ -4744,7 +4761,7 @@ break; case 158: -#line 2428 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2447 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // integral constants const Type *Ty = (yyvsp[-1].PrimType).T; if (!ConstantInt::isValueValidForType(Ty, (yyvsp[0].SInt64Val))) @@ -4755,7 +4772,7 @@ break; case 159: -#line 2435 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2454 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // integral constants const Type *Ty = (yyvsp[-1].PrimType).T; if (!ConstantInt::isValueValidForType(Ty, (yyvsp[0].UInt64Val))) @@ -4766,7 +4783,7 @@ break; case 160: -#line 2442 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2461 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Boolean constants (yyval.ConstVal).C = ConstantInt::get(Type::Int1Ty, true); (yyval.ConstVal).S.makeUnsigned(); @@ -4774,7 +4791,7 @@ break; case 161: -#line 2446 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2465 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Boolean constants (yyval.ConstVal).C = ConstantInt::get(Type::Int1Ty, false); (yyval.ConstVal).S.makeUnsigned(); @@ -4782,7 +4799,7 @@ break; case 162: -#line 2450 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2469 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Float & Double constants if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType).T, (yyvsp[0].FPVal))) error("Floating point constant invalid for type"); @@ -4792,7 +4809,7 @@ break; case 163: -#line 2459 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2478 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type* SrcTy = (yyvsp[-3].ConstVal).C->getType(); const Type* DstTy = (yyvsp[-1].TypeVal).PAT->get(); @@ -4811,7 +4828,7 @@ break; case 164: -#line 2474 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2493 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-2].ConstVal).C->getType(); if (!isa(Ty)) @@ -4828,7 +4845,7 @@ break; case 165: -#line 2487 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2506 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!(yyvsp[-5].ConstVal).C->getType()->isInteger() || cast((yyvsp[-5].ConstVal).C->getType())->getBitWidth() != 1) @@ -4841,7 +4858,7 @@ break; case 166: -#line 2496 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2515 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-3].ConstVal).C->getType(); if (Ty != (yyvsp[-1].ConstVal).C->getType()) @@ -4873,7 +4890,7 @@ break; case 167: -#line 2524 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2543 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type* Ty = (yyvsp[-3].ConstVal).C->getType(); if (Ty != (yyvsp[-1].ConstVal).C->getType()) @@ -4890,7 +4907,7 @@ break; case 168: -#line 2537 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2556 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type* Ty = (yyvsp[-3].ConstVal).C->getType(); if (Ty != (yyvsp[-1].ConstVal).C->getType()) @@ -4903,7 +4920,7 @@ break; case 169: -#line 2546 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2565 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[-3].ConstVal).C->getType() != (yyvsp[-1].ConstVal).C->getType()) error("icmp operand types must match"); @@ -4913,7 +4930,7 @@ break; case 170: -#line 2552 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2571 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[-3].ConstVal).C->getType() != (yyvsp[-1].ConstVal).C->getType()) error("fcmp operand types must match"); @@ -4923,7 +4940,7 @@ break; case 171: -#line 2558 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2577 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!(yyvsp[-1].ConstVal).C->getType()->isInteger() || cast((yyvsp[-1].ConstVal).C->getType())->getBitWidth() != 8) @@ -4938,7 +4955,7 @@ break; case 172: -#line 2569 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2588 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C)) error("Invalid extractelement operands"); @@ -4948,7 +4965,7 @@ break; case 173: -#line 2575 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2594 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal).C, (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C)) error("Invalid insertelement operands"); @@ -4958,7 +4975,7 @@ break; case 174: -#line 2581 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2600 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal).C, (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C)) error("Invalid shufflevector operands"); @@ -4968,12 +4985,12 @@ break; case 175: -#line 2592 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2611 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal)); ;} break; case 176: -#line 2593 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2612 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ConstVector) = new std::vector(); (yyval.ConstVector)->push_back((yyvsp[0].ConstVal)); @@ -4981,17 +4998,17 @@ break; case 177: -#line 2602 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2621 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = false; ;} break; case 178: -#line 2603 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2622 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = true; ;} break; case 179: -#line 2615 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2634 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = ParserResult = (yyvsp[0].ModuleVal); CurModule.ModuleDone(); @@ -4999,27 +5016,27 @@ break; case 180: -#line 2624 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2643 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CurFun.FunctionDone(); ;} break; case 181: -#line 2625 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2644 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); ;} break; case 182: -#line 2626 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2645 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = (yyvsp[-3].ModuleVal); ;} break; case 183: -#line 2627 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2646 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); ;} break; case 184: -#line 2628 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2647 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = CurModule.CurrentModule; // Emit an error if there are any unresolved types left. @@ -5035,7 +5052,7 @@ break; case 185: -#line 2644 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2663 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Eagerly resolve types. This is not an optimization, this is a // requirement that is due to the fact that we could have this: @@ -5059,19 +5076,19 @@ break; case 186: -#line 2664 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2683 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Function prototypes can be in const pool ;} break; case 187: -#line 2666 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2685 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Asm blocks can be in the const pool ;} break; case 188: -#line 2668 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2687 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].ConstVal).C == 0) error("Global value initializer is not a constant"); @@ -5080,14 +5097,14 @@ break; case 189: -#line 2672 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2691 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurGV = 0; ;} break; case 190: -#line 2675 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2694 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[0].TypeVal).PAT->get(); CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalLinkage, (yyvsp[-1].BoolVal), Ty, 0, @@ -5097,14 +5114,14 @@ break; case 191: -#line 2680 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2699 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurGV = 0; ;} break; case 192: -#line 2683 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2702 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[0].TypeVal).PAT->get(); CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::DLLImportLinkage, (yyvsp[-1].BoolVal), Ty, 0, @@ -5114,14 +5131,14 @@ break; case 193: -#line 2688 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2707 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurGV = 0; ;} break; case 194: -#line 2691 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2710 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[0].TypeVal).PAT->get(); CurGV = @@ -5132,32 +5149,32 @@ break; case 195: -#line 2697 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2716 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurGV = 0; ;} break; case 196: -#line 2700 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2719 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { ;} break; case 197: -#line 2702 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2721 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { ;} break; case 198: -#line 2704 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2723 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { ;} break; case 199: -#line 2709 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2728 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true); @@ -5172,24 +5189,24 @@ break; case 200: -#line 2723 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2742 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Endianness) = Module::BigEndian; ;} break; case 201: -#line 2724 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2743 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Endianness) = Module::LittleEndian; ;} break; case 202: -#line 2728 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2747 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurModule.setEndianness((yyvsp[0].Endianness)); ;} break; case 203: -#line 2731 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2750 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].UInt64Val) == 32) CurModule.setPointerSize(Module::Pointer32); @@ -5201,7 +5218,7 @@ break; case 204: -#line 2739 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2758 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -5209,7 +5226,7 @@ break; case 205: -#line 2743 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2762 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -5217,7 +5234,7 @@ break; case 207: -#line 2754 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2773 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -5225,7 +5242,7 @@ break; case 208: -#line 2758 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2777 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -5233,17 +5250,17 @@ break; case 209: -#line 2762 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2781 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { ;} break; case 213: -#line 2775 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2794 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.StrVal) = 0; ;} break; case 214: -#line 2779 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2798 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[-1].TypeVal).PAT->get() == Type::VoidTy) error("void typed arguments are invalid"); @@ -5252,7 +5269,7 @@ break; case 215: -#line 2787 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2806 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = (yyvsp[-2].ArgList); (yyval.ArgList)->push_back(*(yyvsp[0].ArgVal)); @@ -5261,7 +5278,7 @@ break; case 216: -#line 2792 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2811 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = new std::vector >(); (yyval.ArgList)->push_back(*(yyvsp[0].ArgVal)); @@ -5270,12 +5287,12 @@ break; case 217: -#line 2800 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2819 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = (yyvsp[0].ArgList); ;} break; case 218: -#line 2801 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2820 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = (yyvsp[-2].ArgList); PATypeInfo VoidTI; @@ -5286,7 +5303,7 @@ break; case 219: -#line 2808 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2827 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = new std::vector >(); PATypeInfo VoidTI; @@ -5297,12 +5314,12 @@ break; case 220: -#line 2815 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2834 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = 0; ;} break; case 221: -#line 2819 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2838 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { UnEscapeLexed((yyvsp[-5].StrVal)); std::string FunctionName((yyvsp[-5].StrVal)); @@ -5484,12 +5501,12 @@ break; case 224: -#line 3004 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3023 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurFun.Linkage = (yyvsp[0].Linkage); ;} break; case 225: -#line 3004 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3023 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -5500,39 +5517,39 @@ break; case 228: -#line 3018 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3037 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); ;} break; case 229: -#line 3023 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3042 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 230: -#line 3024 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3043 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 231: -#line 3025 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3044 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 232: -#line 3029 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3048 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurFun.isDeclare = true; ;} break; case 233: -#line 3030 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3049 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurFun.Linkage = (yyvsp[0].Linkage); ;} break; case 234: -#line 3030 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3049 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; CurFun.FunctionDone(); @@ -5541,32 +5558,32 @@ break; case 235: -#line 3042 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3061 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = false; ;} break; case 236: -#line 3043 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3062 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = true; ;} break; case 237: -#line 3048 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3067 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val)); ;} break; case 238: -#line 3049 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3068 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val)); ;} break; case 239: -#line 3050 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3069 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal)); ;} break; case 240: -#line 3051 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3070 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::get(Type::Int1Ty, true)); (yyval.ValIDVal).S.makeUnsigned(); @@ -5574,7 +5591,7 @@ break; case 241: -#line 3055 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3074 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::get(Type::Int1Ty, false)); (yyval.ValIDVal).S.makeUnsigned(); @@ -5582,22 +5599,22 @@ break; case 242: -#line 3059 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3078 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::createNull(); ;} break; case 243: -#line 3060 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3079 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::createUndef(); ;} break; case 244: -#line 3061 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3080 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::createZeroInit(); ;} break; case 245: -#line 3062 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3081 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[-1].ConstVector))[0].C->getType(); int NumElements = (yyvsp[-1].ConstVector)->size(); @@ -5622,7 +5639,7 @@ break; case 246: -#line 3083 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3102 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal).C); (yyval.ValIDVal).S.copy((yyvsp[0].ConstVal).S); @@ -5630,7 +5647,7 @@ break; case 247: -#line 3087 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3106 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { char *End = UnEscapeLexed((yyvsp[-2].StrVal), true); std::string AsmStr = std::string((yyvsp[-2].StrVal), End); @@ -5643,17 +5660,17 @@ break; case 248: -#line 3101 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3120 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].SIntVal)); (yyval.ValIDVal).S.makeSignless(); ;} break; case 249: -#line 3102 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3121 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].StrVal)); (yyval.ValIDVal).S.makeSignless(); ;} break; case 252: -#line 3115 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3134 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-1].TypeVal).PAT->get(); (yyvsp[0].ValIDVal).S.copy((yyvsp[-1].TypeVal).S); @@ -5664,21 +5681,21 @@ break; case 253: -#line 3125 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3144 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); ;} break; case 254: -#line 3128 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3147 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); ;} break; case 255: -#line 3137 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3156 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { ValueInfo VI; VI.V = (yyvsp[0].TermInstVal).TI; VI.S.copy((yyvsp[0].TermInstVal).S); setValueName(VI, (yyvsp[-1].StrVal)); @@ -5690,7 +5707,7 @@ break; case 256: -#line 3148 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3167 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].InstVal).I) (yyvsp[-1].BasicBlockVal)->getInstList().push_back((yyvsp[0].InstVal).I); @@ -5699,7 +5716,7 @@ break; case 257: -#line 3153 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3172 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++),true); // Make sure to move the basic block to the correct location in the @@ -5712,7 +5729,7 @@ break; case 258: -#line 3162 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3181 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((yyvsp[0].StrVal)), true); // Make sure to move the basic block to the correct location in the @@ -5725,7 +5742,7 @@ break; case 261: -#line 3176 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3195 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Return with a result... (yyval.TermInstVal).TI = new ReturnInst((yyvsp[0].ValueVal).V); (yyval.TermInstVal).S.makeSignless(); @@ -5733,7 +5750,7 @@ break; case 262: -#line 3180 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3199 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Return with no result... (yyval.TermInstVal).TI = new ReturnInst(); (yyval.TermInstVal).S.makeSignless(); @@ -5741,7 +5758,7 @@ break; case 263: -#line 3184 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3203 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); (yyval.TermInstVal).TI = new BranchInst(tmpBB); @@ -5750,7 +5767,7 @@ break; case 264: -#line 3189 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3208 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-3].ValIDVal).S.makeSignless(); (yyvsp[0].ValIDVal).S.makeSignless(); @@ -5764,7 +5781,7 @@ break; case 265: -#line 3199 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3218 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-6].ValIDVal).S.copy((yyvsp[-7].PrimType).S); Value* tmpVal = getVal((yyvsp[-7].PrimType).T, (yyvsp[-6].ValIDVal)); @@ -5786,7 +5803,7 @@ break; case 266: -#line 3217 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3236 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-5].ValIDVal).S.copy((yyvsp[-6].PrimType).S); Value* tmpVal = getVal((yyvsp[-6].PrimType).T, (yyvsp[-5].ValIDVal)); @@ -5799,7 +5816,7 @@ break; case 267: -#line 3227 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3246 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -5867,7 +5884,7 @@ break; case 268: -#line 3291 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3310 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TermInstVal).TI = new UnwindInst(); (yyval.TermInstVal).S.makeSignless(); @@ -5875,7 +5892,7 @@ break; case 269: -#line 3295 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3314 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TermInstVal).TI = new UnreachableInst(); (yyval.TermInstVal).S.makeSignless(); @@ -5883,7 +5900,7 @@ break; case 270: -#line 3302 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3321 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.JumpTable) = (yyvsp[-5].JumpTable); (yyvsp[-3].ValIDVal).S.copy((yyvsp[-4].PrimType).S); @@ -5899,7 +5916,7 @@ break; case 271: -#line 3314 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3333 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.JumpTable) = new std::vector >(); (yyvsp[-3].ValIDVal).S.copy((yyvsp[-4].PrimType).S); @@ -5915,7 +5932,7 @@ break; case 272: -#line 3329 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3348 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { bool omit = false; if ((yyvsp[-1].StrVal)) @@ -5948,7 +5965,7 @@ break; case 273: -#line 3359 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3378 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Used for PHI nodes (yyval.PHIList).P = new std::list >(); (yyval.PHIList).S.copy((yyvsp[-5].TypeVal).S); @@ -5962,7 +5979,7 @@ break; case 274: -#line 3369 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3388 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.PHIList) = (yyvsp[-6].PHIList); (yyvsp[-3].ValIDVal).S.copy((yyvsp[-6].PHIList).S); @@ -5974,7 +5991,7 @@ break; case 275: -#line 3379 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3398 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Used for call statements, and memory insts... (yyval.ValueList) = new std::vector(); (yyval.ValueList)->push_back((yyvsp[0].ValueVal)); @@ -5982,7 +5999,7 @@ break; case 276: -#line 3383 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3402 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValueList) = (yyvsp[-2].ValueList); (yyvsp[-2].ValueList)->push_back((yyvsp[0].ValueVal)); @@ -5990,26 +6007,26 @@ break; case 278: -#line 3391 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3410 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValueList) = 0; ;} break; case 279: -#line 3395 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3414 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = true; ;} break; case 280: -#line 3398 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3417 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = false; ;} break; case 281: -#line 3404 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3423 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-2].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); (yyvsp[0].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); @@ -6032,7 +6049,7 @@ break; case 282: -#line 3423 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3442 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-2].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); (yyvsp[0].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); @@ -6054,7 +6071,7 @@ break; case 283: -#line 3441 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3460 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-2].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); (yyvsp[0].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); @@ -6074,7 +6091,7 @@ break; case 284: -#line 3457 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3476 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-2].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); (yyvsp[0].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); @@ -6092,7 +6109,7 @@ break; case 285: -#line 3471 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3490 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-2].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); (yyvsp[0].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); @@ -6110,7 +6127,7 @@ break; case 286: -#line 3485 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3504 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { warning("Use of obsolete 'not' instruction: Replacing with 'xor"); const Type *Ty = (yyvsp[0].ValueVal).V->getType(); @@ -6125,7 +6142,7 @@ break; case 287: -#line 3496 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3515 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!(yyvsp[0].ValueVal).V->getType()->isInteger() || cast((yyvsp[0].ValueVal).V->getType())->getBitWidth() != 8) @@ -6147,7 +6164,7 @@ break; case 288: -#line 3514 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3533 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *DstTy = (yyvsp[0].TypeVal).PAT->get(); if (!DstTy->isFirstClassType()) @@ -6160,7 +6177,7 @@ break; case 289: -#line 3523 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3542 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!(yyvsp[-4].ValueVal).V->getType()->isInteger() || cast((yyvsp[-4].ValueVal).V->getType())->getBitWidth() != 1) @@ -6173,7 +6190,7 @@ break; case 290: -#line 3532 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3551 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[0].TypeVal).PAT->get(); NewVarArgs = true; @@ -6184,7 +6201,7 @@ break; case 291: -#line 3539 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3558 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type* ArgTy = (yyvsp[-2].ValueVal).V->getType(); const Type* DstTy = (yyvsp[0].TypeVal).PAT->get(); @@ -6209,7 +6226,7 @@ break; case 292: -#line 3560 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3579 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type* ArgTy = (yyvsp[-2].ValueVal).V->getType(); const Type* DstTy = (yyvsp[0].TypeVal).PAT->get(); @@ -6237,7 +6254,7 @@ break; case 293: -#line 3584 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3603 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V)) error("Invalid extractelement operands"); @@ -6247,7 +6264,7 @@ break; case 294: -#line 3590 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3609 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-4].ValueVal).V, (yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V)) error("Invalid insertelement operands"); @@ -6257,7 +6274,7 @@ break; case 295: -#line 3596 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3615 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-4].ValueVal).V, (yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V)) error("Invalid shufflevector operands"); @@ -6267,7 +6284,7 @@ break; case 296: -#line 3602 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3621 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[0].PHIList).P->front().first->getType(); if (!Ty->isFirstClassType()) @@ -6287,7 +6304,7 @@ break; case 297: -#line 3618 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3637 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Handle the short call syntax const PointerType *PFTy; @@ -6332,7 +6349,7 @@ if ((yyvsp[-1].ValueList)) for (unsigned i = 0, e = (yyvsp[-1].ValueList)->size(); i < e; ++i) Args.push_back((*(yyvsp[-1].ValueList))[i].V); - Instruction *Inst = upgradeIntrinsicCall(FTy, (yyvsp[-3].ValIDVal), Args); + Instruction *Inst = upgradeIntrinsicCall(FTy->getReturnType(), (yyvsp[-3].ValIDVal), Args); // If we got an upgraded intrinsic if (Inst) { @@ -6375,34 +6392,34 @@ break; case 298: -#line 3702 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3721 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.InstVal) = (yyvsp[0].InstVal); ;} break; case 299: -#line 3710 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3729 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValueList) = (yyvsp[0].ValueList); ;} break; case 300: -#line 3711 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3730 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValueList) = new std::vector(); ;} break; case 301: -#line 3715 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3734 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = true; ;} break; case 302: -#line 3716 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3735 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = false; ;} break; case 303: -#line 3720 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3739 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-1].TypeVal).PAT->get(); (yyval.InstVal).S.makeComposite((yyvsp[-1].TypeVal).S); @@ -6412,7 +6429,7 @@ break; case 304: -#line 3726 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3745 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-4].TypeVal).PAT->get(); (yyvsp[-1].ValIDVal).S.makeUnsigned(); @@ -6423,7 +6440,7 @@ break; case 305: -#line 3733 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3752 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-1].TypeVal).PAT->get(); (yyval.InstVal).S.makeComposite((yyvsp[-1].TypeVal).S); @@ -6433,7 +6450,7 @@ break; case 306: -#line 3739 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3758 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-4].TypeVal).PAT->get(); (yyvsp[-1].ValIDVal).S.makeUnsigned(); @@ -6444,7 +6461,7 @@ break; case 307: -#line 3746 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3765 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *PTy = (yyvsp[0].ValueVal).V->getType(); if (!isa(PTy)) @@ -6455,7 +6472,7 @@ break; case 308: -#line 3753 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3772 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type* Ty = (yyvsp[-1].TypeVal).PAT->get(); (yyvsp[0].ValIDVal).S.copy((yyvsp[-1].TypeVal).S); @@ -6472,7 +6489,7 @@ break; case 309: -#line 3766 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3785 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[0].ValIDVal).S.copy((yyvsp[-1].TypeVal).S); const PointerType *PTy = dyn_cast((yyvsp[-1].TypeVal).PAT->get()); @@ -6502,7 +6519,7 @@ break; case 310: -#line 3792 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3811 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-1].ValIDVal).S.copy((yyvsp[-2].TypeVal).S); const Type* Ty = (yyvsp[-2].TypeVal).PAT->get(); @@ -6526,7 +6543,7 @@ } /* Line 1126 of yacc.c. */ -#line 6528 "UpgradeParser.tab.c" +#line 6547 "UpgradeParser.tab.c" yyvsp -= yylen; yyssp -= yylen; @@ -6794,7 +6811,7 @@ } -#line 3810 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3829 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" int yyerror(const char *ErrorMsg) { Index: llvm/tools/llvm-upgrade/UpgradeParser.h.cvs diff -u llvm/tools/llvm-upgrade/UpgradeParser.h.cvs:1.51 llvm/tools/llvm-upgrade/UpgradeParser.h.cvs:1.52 --- llvm/tools/llvm-upgrade/UpgradeParser.h.cvs:1.51 Wed Mar 21 12:15:50 2007 +++ llvm/tools/llvm-upgrade/UpgradeParser.h.cvs Sun Apr 1 20:14:00 2007 @@ -335,7 +335,7 @@ #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 1693 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1712 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; Index: llvm/tools/llvm-upgrade/UpgradeParser.y.cvs diff -u llvm/tools/llvm-upgrade/UpgradeParser.y.cvs:1.68 llvm/tools/llvm-upgrade/UpgradeParser.y.cvs:1.69 --- llvm/tools/llvm-upgrade/UpgradeParser.y.cvs:1.68 Thu Mar 22 02:43:51 2007 +++ llvm/tools/llvm-upgrade/UpgradeParser.y.cvs Sun Apr 1 20:14:00 2007 @@ -1448,35 +1448,52 @@ std::vector& Args) { std::string Name = ID.Type == ValID::NameVal ? ID.Name : ""; - if (Name == "llvm.isunordered.f32" || Name == "llvm.isunordered.f64") { - if (Args.size() != 2) - error("Invalid prototype for " + Name + " prototype"); - return new FCmpInst(FCmpInst::FCMP_UNO, Args[0], Args[1]); - } else { - const Type* PtrTy = PointerType::get(Type::Int8Ty); - std::vector Params; - if (Name == "llvm.va_start" || Name == "llvm.va_end") { - if (Args.size() != 1) - error("Invalid prototype for " + Name + " prototype"); - Params.push_back(PtrTy); - const FunctionType *FTy = FunctionType::get(Type::VoidTy, Params, false); - const PointerType *PFTy = PointerType::get(FTy); - Value* Func = getVal(PFTy, ID); - Args[0] = new BitCastInst(Args[0], PtrTy, makeNameUnique("va"), CurBB); - return new CallInst(Func, &Args[0], Args.size()); - } else if (Name == "llvm.va_copy") { - if (Args.size() != 2) - error("Invalid prototype for " + Name + " prototype"); - Params.push_back(PtrTy); - Params.push_back(PtrTy); - const FunctionType *FTy = FunctionType::get(Type::VoidTy, Params, false); - const PointerType *PFTy = PointerType::get(FTy); - Value* Func = getVal(PFTy, ID); - std::string InstName0(makeNameUnique("va0")); - std::string InstName1(makeNameUnique("va1")); - Args[0] = new BitCastInst(Args[0], PtrTy, InstName0, CurBB); - Args[1] = new BitCastInst(Args[1], PtrTy, InstName1, CurBB); - return new CallInst(Func, &Args[0], Args.size()); + switch (Name[5]) { + case 'i': + if (Name == "llvm.isunordered.f32" || Name == "llvm.isunordered.f64") { + if (Args.size() != 2) + error("Invalid prototype for " + Name); + return new FCmpInst(FCmpInst::FCMP_UNO, Args[0], Args[1]); + } + break; + case 'b': + if (Name.length() == 14 && !memcmp(&Name[5], "bswap.i", 7)) { + const Type* ArgTy = Args[0]->getType(); + Name += ".i" + utostr(cast(ArgTy)->getBitWidth()); + Function *F = cast( + CurModule.CurrentModule->getOrInsertFunction(Name, RetTy, ArgTy, + (void*)0)); + return new CallInst(F, Args[0]); + } + break; + case 'v' : { + const Type* PtrTy = PointerType::get(Type::Int8Ty); + std::vector Params; + if (Name == "llvm.va_start" || Name == "llvm.va_end") { + if (Args.size() != 1) + error("Invalid prototype for " + Name + " prototype"); + Params.push_back(PtrTy); + const FunctionType *FTy = + FunctionType::get(Type::VoidTy, Params, false); + const PointerType *PFTy = PointerType::get(FTy); + Value* Func = getVal(PFTy, ID); + Args[0] = new BitCastInst(Args[0], PtrTy, makeNameUnique("va"), CurBB); + return new CallInst(Func, &Args[0], Args.size()); + } else if (Name == "llvm.va_copy") { + if (Args.size() != 2) + error("Invalid prototype for " + Name + " prototype"); + Params.push_back(PtrTy); + Params.push_back(PtrTy); + const FunctionType *FTy = + FunctionType::get(Type::VoidTy, Params, false); + const PointerType *PFTy = PointerType::get(FTy); + Value* Func = getVal(PFTy, ID); + std::string InstName0(makeNameUnique("va0")); + std::string InstName1(makeNameUnique("va1")); + Args[0] = new BitCastInst(Args[0], PtrTy, InstName0, CurBB); + Args[1] = new BitCastInst(Args[1], PtrTy, InstName1, CurBB); + return new CallInst(Func, &Args[0], Args.size()); + } } } return 0; @@ -3661,7 +3678,7 @@ if ($6) for (unsigned i = 0, e = $6->size(); i < e; ++i) Args.push_back((*$6)[i].V); - Instruction *Inst = upgradeIntrinsicCall(FTy, $4, Args); + Instruction *Inst = upgradeIntrinsicCall(FTy->getReturnType(), $4, Args); // If we got an upgraded intrinsic if (Inst) { From sabre at nondot.org Sun Apr 1 20:21:36 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 1 Apr 2007 20:21:36 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/ADT/SmallPtrSet.h Message-ID: <200704020121.l321LagK032749@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/ADT: SmallPtrSet.h updated: 1.9 -> 1.10 --- Log message: add range version of insert() --- Diffs of the changes: (+7 -2) SmallPtrSet.h | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) Index: llvm/include/llvm/ADT/SmallPtrSet.h diff -u llvm/include/llvm/ADT/SmallPtrSet.h:1.9 llvm/include/llvm/ADT/SmallPtrSet.h:1.10 --- llvm/include/llvm/ADT/SmallPtrSet.h:1.9 Sat Mar 3 22:04:43 2007 +++ llvm/include/llvm/ADT/SmallPtrSet.h Sun Apr 1 20:21:19 2007 @@ -90,6 +90,12 @@ /// was already in the set. bool insert(void *Ptr); + template + void insert(IterT I, IterT E) { + for (; I != E; ++I) + insert((void*)*I); + } + /// erase - If the set contains the specified pointer, remove it and return /// true, otherwise return false. bool erase(void *Ptr); @@ -212,8 +218,7 @@ template SmallPtrSet(It I, It E) : SmallPtrSetImpl(NextPowerOfTwo::Val) { - for (; I != E; ++I) - insert(*I); + insert(I, E); } typedef SmallPtrSetIterator iterator; From lauro.venancio at gmail.com Sun Apr 1 20:30:25 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Sun, 1 Apr 2007 20:30:25 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/ARM/ARMISelLowering.cpp ARMISelLowering.h ARMInstrInfo.td ARMInstrThumb.td Message-ID: <200704020130.l321UP7Z000901@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/ARM: ARMISelLowering.cpp updated: 1.34 -> 1.35 ARMISelLowering.h updated: 1.10 -> 1.11 ARMInstrInfo.td updated: 1.94 -> 1.95 ARMInstrThumb.td updated: 1.20 -> 1.21 --- Log message: - Divides the comparisons in two types: comparisons that only use N and Z flags (ARMISD::CMPNZ) and comparisons that use all flags (ARMISD::CMP). - Defines the instructions: TST, TEQ (ARM) and TST (Thumb). --- Diffs of the changes: (+45 -7) ARMISelLowering.cpp | 16 +++++++++++++++- ARMISelLowering.h | 1 + ARMInstrInfo.td | 16 ++++++++++++---- ARMInstrThumb.td | 19 +++++++++++++++++-- 4 files changed, 45 insertions(+), 7 deletions(-) Index: llvm/lib/Target/ARM/ARMISelLowering.cpp diff -u llvm/lib/Target/ARM/ARMISelLowering.cpp:1.34 llvm/lib/Target/ARM/ARMISelLowering.cpp:1.35 --- llvm/lib/Target/ARM/ARMISelLowering.cpp:1.34 Sun Apr 1 03:06:46 2007 +++ llvm/lib/Target/ARM/ARMISelLowering.cpp Sun Apr 1 20:30:03 2007 @@ -266,6 +266,7 @@ case ARMISD::RET_FLAG: return "ARMISD::RET_FLAG"; case ARMISD::PIC_ADD: return "ARMISD::PIC_ADD"; case ARMISD::CMP: return "ARMISD::CMP"; + case ARMISD::CMPNZ: return "ARMISD::CMPNZ"; case ARMISD::CMPFP: return "ARMISD::CMPFP"; case ARMISD::CMPFPw0: return "ARMISD::CMPFPw0"; case ARMISD::FMSTAT: return "ARMISD::FMSTAT"; @@ -946,8 +947,21 @@ } ARMCC::CondCodes CondCode = IntCCToARMCC(CC); + ARMISD::NodeType CompareType; + switch (CondCode) { + default: + CompareType = ARMISD::CMP; + break; + case ARMCC::EQ: + case ARMCC::NE: + case ARMCC::MI: + case ARMCC::PL: + // Uses only N and Z Flags + CompareType = ARMISD::CMPNZ; + break; + } ARMCC = DAG.getConstant(CondCode, MVT::i32); - return DAG.getNode(ARMISD::CMP, MVT::Flag, LHS, RHS); + return DAG.getNode(CompareType, MVT::Flag, LHS, RHS); } /// Returns a appropriate VFP CMP (fcmp{s|d}+fmstat) for the given operands. Index: llvm/lib/Target/ARM/ARMISelLowering.h diff -u llvm/lib/Target/ARM/ARMISelLowering.h:1.10 llvm/lib/Target/ARM/ARMISelLowering.h:1.11 --- llvm/lib/Target/ARM/ARMISelLowering.h:1.10 Fri Mar 30 18:15:24 2007 +++ llvm/lib/Target/ARM/ARMISelLowering.h Sun Apr 1 20:30:03 2007 @@ -43,6 +43,7 @@ PIC_ADD, // Add with a PC operand and a PIC label. CMP, // ARM compare instructions. + CMPNZ, // ARM compare that uses only N or Z flags. CMPFP, // ARM VFP compare instruction, sets FPSCR. CMPFPw0, // ARM VFP compare against zero instruction, sets FPSCR. FMSTAT, // ARM fmstat instruction. Index: llvm/lib/Target/ARM/ARMInstrInfo.td diff -u llvm/lib/Target/ARM/ARMInstrInfo.td:1.94 llvm/lib/Target/ARM/ARMInstrInfo.td:1.95 --- llvm/lib/Target/ARM/ARMInstrInfo.td:1.94 Tue Mar 27 11:19:21 2007 +++ llvm/lib/Target/ARM/ARMInstrInfo.td Sun Apr 1 20:30:03 2007 @@ -70,6 +70,9 @@ def ARMcmp : SDNode<"ARMISD::CMP", SDT_ARMCmp, [SDNPOutFlag]>; +def ARMcmpNZ : SDNode<"ARMISD::CMPNZ", SDT_ARMCmp, + [SDNPOutFlag]>; + def ARMpic_add : SDNode<"ARMISD::PIC_ADD", SDT_ARMPICAdd>; def ARMsrl_flag : SDNode<"ARMISD::SRL_FLAG", SDTIntUnaryOp, [SDNPOutFlag]>; @@ -1023,10 +1026,15 @@ (CMNri GPR:$src, so_imm_neg:$imm)>; // Note that TST/TEQ don't set all the same flags that CMP does! -def TSTrr : AI1<(ops GPR:$a, so_reg:$b), "tst $a, $b", []>; -def TSTri : AI1<(ops GPR:$a, so_imm:$b), "tst $a, $b", []>; -def TEQrr : AI1<(ops GPR:$a, so_reg:$b), "teq $a, $b", []>; -def TEQri : AI1<(ops GPR:$a, so_imm:$b), "teq $a, $b", []>; +defm TST : AI1_bin0_irs<"tst", BinOpFrag<(ARMcmpNZ (and node:$LHS, node:$RHS), 0)>>; +defm TEQ : AI1_bin0_irs<"teq", BinOpFrag<(ARMcmpNZ (xor node:$LHS, node:$RHS), 0)>>; + +defm CMPnz : AI1_bin0_irs<"cmp", BinOpFrag<(ARMcmpNZ node:$LHS, node:$RHS)>>; +defm CMNnz : AI1_bin0_irs<"cmn", BinOpFrag<(ARMcmpNZ node:$LHS,(ineg node:$RHS))>>; + +def : ARMPat<(ARMcmpNZ GPR:$src, so_imm_neg:$imm), + (CMNri GPR:$src, so_imm_neg:$imm)>; + // Conditional moves def MOVCCr : AI<(ops GPR:$dst, GPR:$false, GPR:$true, CCOp:$cc), Index: llvm/lib/Target/ARM/ARMInstrThumb.td diff -u llvm/lib/Target/ARM/ARMInstrThumb.td:1.20 llvm/lib/Target/ARM/ARMInstrThumb.td:1.21 --- llvm/lib/Target/ARM/ARMInstrThumb.td:1.20 Thu Mar 29 16:38:31 2007 +++ llvm/lib/Target/ARM/ARMInstrThumb.td Sun Apr 1 20:30:03 2007 @@ -356,7 +356,23 @@ def tCMPr : TI<(ops GPR:$lhs, GPR:$rhs), "cmp $lhs, $rhs", [(ARMcmp GPR:$lhs, GPR:$rhs)]>; - + +def tTST : TI<(ops GPR:$lhs, GPR:$rhs), + "tst $lhs, $rhs", + [(ARMcmpNZ (and GPR:$lhs, GPR:$rhs), 0)]>; + +def tCMNNZ : TI<(ops GPR:$lhs, GPR:$rhs), + "cmn $lhs, $rhs", + [(ARMcmpNZ GPR:$lhs, (ineg GPR:$rhs))]>; + +def tCMPNZi8 : TI<(ops GPR:$lhs, i32imm:$rhs), + "cmp $lhs, $rhs", + [(ARMcmpNZ GPR:$lhs, imm0_255:$rhs)]>; + +def tCMPNZr : TI<(ops GPR:$lhs, GPR:$rhs), + "cmp $lhs, $rhs", + [(ARMcmpNZ GPR:$lhs, GPR:$rhs)]>; + // TODO: A7-37: CMP(3) - cmp hi regs def tEOR : TIt<(ops GPR:$dst, GPR:$lhs, GPR:$rhs), @@ -472,7 +488,6 @@ [(set GPR:$dst, (sext_inreg GPR:$src, i16))]>, Requires<[IsThumb, HasV6]>; -// TODO: A7-122: TST - test. def tUXTB : TI<(ops GPR:$dst, GPR:$src), "uxtb $dst, $src", From lauro.venancio at gmail.com Sun Apr 1 20:30:25 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Sun, 1 Apr 2007 20:30:25 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/ARM/tst_teq.ll Message-ID: <200704020130.l321UPkL000903@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/ARM: tst_teq.ll added (r1.1) --- Log message: - Divides the comparisons in two types: comparisons that only use N and Z flags (ARMISD::CMPNZ) and comparisons that use all flags (ARMISD::CMP). - Defines the instructions: TST, TEQ (ARM) and TST (Thumb). --- Diffs of the changes: (+21 -0) tst_teq.ll | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+) Index: llvm/test/CodeGen/ARM/tst_teq.ll diff -c /dev/null llvm/test/CodeGen/ARM/tst_teq.ll:1.1 *** /dev/null Sun Apr 1 20:30:13 2007 --- llvm/test/CodeGen/ARM/tst_teq.ll Sun Apr 1 20:30:03 2007 *************** *** 0 **** --- 1,21 ---- + ; RUN: llvm-as < %s | llc -march=arm && + ; RUN: llvm-as < %s | llc -march=thumb && + ; RUN: llvm-as < %s | llc -march=arm | grep "tst" && + ; RUN: llvm-as < %s | llc -march=arm | grep "teq" && + ; RUN: llvm-as < %s | llc -march=thumb | grep "tst" + + define i32 @f(i32 %a) { + entry: + %tmp2 = and i32 %a, 255 ; [#uses=1] + icmp eq i32 %tmp2, 0 ; :0 [#uses=1] + %retval = select i1 %0, i32 20, i32 10 ; [#uses=1] + ret i32 %retval + } + + define i32 @g(i32 %a) { + entry: + %tmp2 = xor i32 %a, 255 + icmp eq i32 %tmp2, 0 ; :0 [#uses=1] + %retval = select i1 %0, i32 20, i32 10 ; [#uses=1] + ret i32 %retval + } From sabre at nondot.org Sun Apr 1 20:33:16 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 1 Apr 2007 20:33:16 -0500 Subject: [llvm-commits] CVS: llvm/test/CodeGen/Generic/phi-immediate-factoring.ll Message-ID: <200704020133.l321XGb1001210@zion.cs.uiuc.edu> Changes in directory llvm/test/CodeGen/Generic: phi-immediate-factoring.ll added (r1.1) --- Log message: new testcase for PR1296: http://llvm.org/PR1296 --- Diffs of the changes: (+54 -0) phi-immediate-factoring.ll | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+) Index: llvm/test/CodeGen/Generic/phi-immediate-factoring.ll diff -c /dev/null llvm/test/CodeGen/Generic/phi-immediate-factoring.ll:1.1 *** /dev/null Sun Apr 1 20:33:09 2007 --- llvm/test/CodeGen/Generic/phi-immediate-factoring.ll Sun Apr 1 20:32:59 2007 *************** *** 0 **** --- 1,54 ---- + ; RUN: llvm-as < %s | llc -march=x86 | grep 'movl $1' | wc -l | grep 1 + ; PR1296 + + 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" + target triple = "i686-apple-darwin8" + + define i32 @foo(i32 %A, i32 %B, i32 %C) { + entry: + switch i32 %A, label %out [ + i32 1, label %bb + i32 0, label %bb13 + i32 2, label %bb35 + ] + + bb: ; preds = %cond_next, %entry + %i.144.1 = phi i32 [ 0, %entry ], [ %tmp7, %cond_next ] ; [#uses=2] + %tmp4 = and i32 %i.144.1, %B ; [#uses=1] + icmp eq i32 %tmp4, 0 ; :0 [#uses=1] + br i1 %0, label %cond_next, label %out + + cond_next: ; preds = %bb + %tmp7 = add i32 %i.144.1, 1 ; [#uses=2] + icmp slt i32 %tmp7, 1000 ; :1 [#uses=1] + br i1 %1, label %bb, label %out + + bb13: ; preds = %cond_next18, %entry + %i.248.1 = phi i32 [ 0, %entry ], [ %tmp20, %cond_next18 ] ; [#uses=2] + %tmp16 = and i32 %i.248.1, %C ; [#uses=1] + icmp eq i32 %tmp16, 0 ; :2 [#uses=1] + br i1 %2, label %cond_next18, label %out + + cond_next18: ; preds = %bb13 + %tmp20 = add i32 %i.248.1, 1 ; [#uses=2] + icmp slt i32 %tmp20, 1000 ; :3 [#uses=1] + br i1 %3, label %bb13, label %out + + bb27: ; preds = %bb35 + %tmp30 = and i32 %i.3, %C ; [#uses=1] + icmp eq i32 %tmp30, 0 ; :4 [#uses=1] + br i1 %4, label %cond_next32, label %out + + cond_next32: ; preds = %bb27 + %indvar.next = add i32 %i.3, 1 ; [#uses=1] + br label %bb35 + + bb35: ; preds = %entry, %cond_next32 + %i.3 = phi i32 [ %indvar.next, %cond_next32 ], [ 0, %entry ] ; [#uses=3] + icmp slt i32 %i.3, 1000 ; :5 [#uses=1] + br i1 %5, label %bb27, label %out + + out: ; preds = %bb27, %bb35, %bb13, %cond_next18, %bb, %cond_next, %entry + %result.0 = phi i32 [ 0, %entry ], [ 1, %bb ], [ 0, %cond_next ], [ 1, %bb13 ], [ 0, %cond_next18 ], [ 1, %bb27 ], [ 0, %bb35 ] ; [#uses=1] + ret i32 %result.0 + } From sabre at nondot.org Sun Apr 1 20:35:52 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 1 Apr 2007 20:35:52 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp Message-ID: <200704020135.l321ZqV1001433@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: CodeGenPrepare.cpp updated: 1.1 -> 1.2 --- Log message: Various passes before isel split edges and do other CFG-restructuring changes. isel has its own particular features that it wants in the CFG, in order to reduce the number of times a constant is computed, etc. Make sure that we clean up the CFG before doing any other things for isel. Doing so can dramatically reduce the number of split edges and reduce the number of places that constants get computed. For example, this shrinks CodeGen/Generic/phi-immediate-factoring.ll from 44 to 37 instructions on X86, and from 21 to 17 MBB's in the output. This is primarily a code size win, not a performance win. This implements CodeGen/Generic/phi-immediate-factoring.ll and PR1296: http://llvm.org/PR1296 . --- Diffs of the changes: (+175 -2) CodeGenPrepare.cpp | 177 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 175 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp diff -u llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp:1.1 llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp:1.2 --- llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp:1.1 Fri Mar 30 23:06:36 2007 +++ llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp Sun Apr 1 20:35:34 2007 @@ -20,13 +20,14 @@ #include "llvm/Function.h" #include "llvm/Instructions.h" #include "llvm/Pass.h" -#include "llvm/Support/Compiler.h" #include "llvm/Target/TargetAsmInfo.h" #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetLowering.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/ADT/SmallSet.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/Compiler.h" using namespace llvm; namespace { @@ -39,6 +40,9 @@ bool runOnFunction(Function &F); private: + bool EliminateMostlyEmptyBlocks(Function &F); + bool CanMergeBlocks(const BasicBlock *BB, const BasicBlock *DestBB) const; + void EliminateMostlyEmptyBlock(BasicBlock *BB); bool OptimizeBlock(BasicBlock &BB); bool OptimizeGEPExpression(GetElementPtrInst *GEPI); }; @@ -52,8 +56,13 @@ bool CodeGenPrepare::runOnFunction(Function &F) { - bool MadeChange = true; bool EverMadeChange = false; + + // First pass, eliminate blocks that contain only PHI nodes and an + // unconditional branch. + EverMadeChange |= EliminateMostlyEmptyBlocks(F); + + bool MadeChange = true; while (MadeChange) { MadeChange = false; for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) @@ -63,6 +72,170 @@ return EverMadeChange; } +/// EliminateMostlyEmptyBlocks - eliminate blocks that contain only PHI nodes +/// and an unconditional branch. Passes before isel (e.g. LSR/loopsimplify) +/// often split edges in ways that are non-optimal for isel. Start by +/// eliminating these blocks so we can split them the way we want them. +bool CodeGenPrepare::EliminateMostlyEmptyBlocks(Function &F) { + bool MadeChange = false; + // Note that this intentionally skips the entry block. + for (Function::iterator I = ++F.begin(), E = F.end(); I != E; ) { + BasicBlock *BB = I++; + + // If this block doesn't end with an uncond branch, ignore it. + BranchInst *BI = dyn_cast(BB->getTerminator()); + if (!BI || !BI->isUnconditional()) + continue; + + // If the instruction before the branch isn't a phi node, then other stuff + // is happening here. + BasicBlock::iterator BBI = BI; + if (BBI != BB->begin()) { + --BBI; + if (!isa(BBI)) continue; + } + + // Do not break infinite loops. + BasicBlock *DestBB = BI->getSuccessor(0); + if (DestBB == BB) + continue; + + if (!CanMergeBlocks(BB, DestBB)) + continue; + + EliminateMostlyEmptyBlock(BB); + MadeChange = true; + } + return MadeChange; +} + +/// CanMergeBlocks - Return true if we can merge BB into DestBB if there is a +/// single uncond branch between them, and BB contains no other non-phi +/// instructions. +bool CodeGenPrepare::CanMergeBlocks(const BasicBlock *BB, + const BasicBlock *DestBB) const { + // We only want to eliminate blocks whose phi nodes are used by phi nodes in + // the successor. If there are more complex condition (e.g. preheaders), + // don't mess around with them. + BasicBlock::const_iterator BBI = BB->begin(); + while (const PHINode *PN = dyn_cast(BBI++)) { + for (Value::use_const_iterator UI = PN->use_begin(), E = PN->use_end(); + UI != E; ++UI) { + const Instruction *User = cast(*UI); + if (User->getParent() != DestBB || !isa(User)) + return false; + } + } + + // If BB and DestBB contain any common predecessors, then the phi nodes in BB + // and DestBB may have conflicting incoming values for the block. If so, we + // can't merge the block. + const PHINode *DestBBPN = dyn_cast(DestBB->begin()); + if (!DestBBPN) return true; // no conflict. + + // Collect the preds of BB. + SmallPtrSet BBPreds; + if (const PHINode *BBPN = dyn_cast(BB->begin())) { + // It is faster to get preds from a PHI than with pred_iterator. + for (unsigned i = 0, e = BBPN->getNumIncomingValues(); i != e; ++i) + BBPreds.insert(BBPN->getIncomingBlock(i)); + } else { + BBPreds.insert(pred_begin(BB), pred_end(BB)); + } + + // Walk the preds of DestBB. + for (unsigned i = 0, e = DestBBPN->getNumIncomingValues(); i != e; ++i) { + BasicBlock *Pred = DestBBPN->getIncomingBlock(i); + if (BBPreds.count(Pred)) { // Common predecessor? + BBI = DestBB->begin(); + while (const PHINode *PN = dyn_cast(BBI++)) { + const Value *V1 = PN->getIncomingValueForBlock(Pred); + const Value *V2 = PN->getIncomingValueForBlock(BB); + + // If V2 is a phi node in BB, look up what the mapped value will be. + if (const PHINode *V2PN = dyn_cast(V2)) + if (V2PN->getParent() == BB) + V2 = V2PN->getIncomingValueForBlock(Pred); + + // If there is a conflict, bail out. + if (V1 != V2) return false; + } + } + } + + return true; +} + + +/// EliminateMostlyEmptyBlock - Eliminate a basic block that have only phi's and +/// an unconditional branch in it. +void CodeGenPrepare::EliminateMostlyEmptyBlock(BasicBlock *BB) { + BranchInst *BI = cast(BB->getTerminator()); + BasicBlock *DestBB = BI->getSuccessor(0); + + DOUT << "MERGING MOSTLY EMPTY BLOCKS - BEFORE:\n" << *BB << *DestBB; + + // If the destination block has a single pred, then this is a trivial edge, + // just collapse it. + if (DestBB->getSinglePredecessor()) { + // If DestBB has single-entry PHI nodes, fold them. + while (PHINode *PN = dyn_cast(DestBB->begin())) { + PN->replaceAllUsesWith(PN->getIncomingValue(0)); + PN->eraseFromParent(); + } + + // Splice all the PHI nodes from BB over to DestBB. + DestBB->getInstList().splice(DestBB->begin(), BB->getInstList(), + BB->begin(), BI); + + // Anything that branched to BB now branches to DestBB. + BB->replaceAllUsesWith(DestBB); + + // Nuke BB. + BB->eraseFromParent(); + + DOUT << "AFTER:\n" << *DestBB << "\n\n\n"; + return; + } + + // Otherwise, we have multiple predecessors of BB. Update the PHIs in DestBB + // to handle the new incoming edges it is about to have. + PHINode *PN; + for (BasicBlock::iterator BBI = DestBB->begin(); + (PN = dyn_cast(BBI)); ++BBI) { + // Remove the incoming value for BB, and remember it. + Value *InVal = PN->removeIncomingValue(BB, false); + + // Two options: either the InVal is a phi node defined in BB or it is some + // value that dominates BB. + PHINode *InValPhi = dyn_cast(InVal); + if (InValPhi && InValPhi->getParent() == BB) { + // Add all of the input values of the input PHI as inputs of this phi. + for (unsigned i = 0, e = InValPhi->getNumIncomingValues(); i != e; ++i) + PN->addIncoming(InValPhi->getIncomingValue(i), + InValPhi->getIncomingBlock(i)); + } else { + // Otherwise, add one instance of the dominating value for each edge that + // we will be adding. + if (PHINode *BBPN = dyn_cast(BB->begin())) { + for (unsigned i = 0, e = BBPN->getNumIncomingValues(); i != e; ++i) + PN->addIncoming(InVal, BBPN->getIncomingBlock(i)); + } else { + for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) + PN->addIncoming(InVal, *PI); + } + } + } + + // The PHIs are now updated, change everything that refers to BB to use + // DestBB and remove BB. + BB->replaceAllUsesWith(DestBB); + BB->eraseFromParent(); + + DOUT << "AFTER:\n" << *DestBB << "\n\n\n"; +} + + /// SplitEdgeNicely - Split the critical edge from TI to it's specified /// successor if it will improve codegen. We only do this if the successor has /// phi nodes (otherwise critical edges are ok). If there is already another From sabre at nondot.org Sun Apr 1 20:45:17 2007 From: sabre at nondot.org (Chris Lattner) Date: Sun, 1 Apr 2007 20:45:17 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/SimplifyCFG.cpp Message-ID: <200704020145.l321jHeG002272@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: SimplifyCFG.cpp updated: 1.119 -> 1.120 --- Log message: reduce use of std::set --- Diffs of the changes: (+7 -6) SimplifyCFG.cpp | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.119 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.120 --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.119 Thu Mar 22 11:38:57 2007 +++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp Sun Apr 1 20:44:59 2007 @@ -22,6 +22,7 @@ #include "llvm/Analysis/ConstantFolding.h" #include "llvm/Transforms/Utils/BasicBlockUtils.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/SmallPtrSet.h" #include #include #include @@ -39,7 +40,7 @@ // conflicting incoming values from the two switch blocks. BasicBlock *SI1BB = SI1->getParent(); BasicBlock *SI2BB = SI2->getParent(); - std::set SI1Succs(succ_begin(SI1BB), succ_end(SI1BB)); + SmallPtrSet SI1Succs(succ_begin(SI1BB), succ_end(SI1BB)); for (succ_iterator I = succ_begin(SI2BB), E = succ_end(SI2BB); I != E; ++I) if (SI1Succs.count(*I)) @@ -84,10 +85,10 @@ // with incompatible values coming in from the two edges! // if (isa(Succ->front())) { - std::set BBPreds(pred_begin(BB), pred_end(BB)); + SmallPtrSet BBPreds(pred_begin(BB), pred_end(BB)); for (pred_iterator PI = pred_begin(Succ), PE = pred_end(Succ); PI != PE; ++PI) - if (std::find(BBPreds.begin(), BBPreds.end(), *PI) != BBPreds.end()) { + if (BBPreds.count(*PI)) { // Loop over all of the PHI nodes checking to see if there are // incompatible values coming in. for (BasicBlock::iterator I = Succ->begin(); isa(I); ++I) { @@ -109,7 +110,7 @@ // update the PHI nodes correctly. if (!isa(BB->begin()) || Succ->getSinglePredecessor()) return true; - // If the predecessors of Succ are only BB and Succ itself, we can handle this. + // If the predecessors of Succ are only BB and Succ itself, handle it. bool IsSafe = true; for (pred_iterator PI = pred_begin(Succ), E = pred_end(Succ); PI != E; ++PI) if (*PI != Succ && *PI != BB) { @@ -131,7 +132,7 @@ // Scan the predecessor sets of BB and Succ, making sure there are no common // predecessors. Common predecessors would cause us to build a phi node with // differing incoming values, which is not legal. - std::set BBPreds(pred_begin(BB), pred_end(BB)); + SmallPtrSet BBPreds(pred_begin(BB), pred_end(BB)); for (pred_iterator PI = pred_begin(Succ), E = pred_end(Succ); PI != E; ++PI) if (BBPreds.count(*PI)) return false; @@ -633,7 +634,7 @@ } else { SwitchInst *SI = cast(TI); // Okay, TI has cases that are statically dead, prune them away. - std::set DeadCases; + SmallPtrSet DeadCases; for (unsigned i = 0, e = PredCases.size(); i != e; ++i) DeadCases.insert(PredCases[i].first); From reid at x10sys.com Sun Apr 1 20:45:48 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 20:45:48 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/bitcount.ll Message-ID: <200704020145.l321jmEw002301@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/InstCombine: bitcount.ll added (r1.1) --- Log message: Add a test case to make sure that constant folding of the bit counting intrinsics works. --- Diffs of the changes: (+16 -0) bitcount.ll | 16 ++++++++++++++++ 1 files changed, 16 insertions(+) Index: llvm/test/Transforms/InstCombine/bitcount.ll diff -c /dev/null llvm/test/Transforms/InstCombine/bitcount.ll:1.1 *** /dev/null Sun Apr 1 20:45:41 2007 --- llvm/test/Transforms/InstCombine/bitcount.ll Sun Apr 1 20:45:31 2007 *************** *** 0 **** --- 1,16 ---- + ; Tests to make sure bit counts of constants are folded + ; RUN: llvm-as < %s | opt -instcombine | llvm-dis -o /dev/null -f && + ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep 'llvm.ct' + + declare i32 @llvm.ctpop.i31(i31 %val) + declare i32 @llvm.cttz.i32(i32 %val) + declare i32 @llvm.ctlz.i33(i33 %val) + + define i32 %test(i32 %A) { + %c1 = i32 call @llvm.ctpop(i31 12415124) + %c2 = i32 call @llvm.cttz(i32 87359874) + %c3 = i32 call @llvm.ctlz(i33 87359874) + %r1 = add i32 %c1, %c2 + %r2 = add i32 %r1, %c3 + ret i32 %r2 + } From reid at x10sys.com Sun Apr 1 21:08:23 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 21:08:23 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-upgrade/UpgradeParser.y Message-ID: <200704020208.l3228NFs004281@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-upgrade: UpgradeParser.y updated: 1.76 -> 1.77 --- Log message: Upgrade the bit count intrinsics to have an i32 result. --- Diffs of the changes: (+19 -0) UpgradeParser.y | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+) Index: llvm/tools/llvm-upgrade/UpgradeParser.y diff -u llvm/tools/llvm-upgrade/UpgradeParser.y:1.76 llvm/tools/llvm-upgrade/UpgradeParser.y:1.77 --- llvm/tools/llvm-upgrade/UpgradeParser.y:1.76 Sun Apr 1 20:13:36 2007 +++ llvm/tools/llvm-upgrade/UpgradeParser.y Sun Apr 1 21:08:05 2007 @@ -1466,6 +1466,25 @@ return new CallInst(F, Args[0]); } break; + case 'c': + if ((Name.length() <= 14 && !memcmp(&Name[5], "ctpop.i", 7)) || + (Name.length() <= 13 && !memcmp(&Name[5], "ctlz.i", 6)) || + (Name.length() <= 13 && !memcmp(&Name[5], "cttz.i", 6))) { + // These intrinsics changed their result type. + const Type* ArgTy = Args[0]->getType(); + Function *OldF = CurModule.CurrentModule->getFunction(Name); + if (OldF) + OldF->setName("upgrd.rm." + Name); + + Function *NewF = cast( + CurModule.CurrentModule->getOrInsertFunction(Name, Type::Int32Ty, + ArgTy, (void*)0)); + + Instruction *Call = new CallInst(NewF, Args[0], "", CurBB); + return CastInst::createIntegerCast(Call, RetTy, false); + } + break; + case 'v' : { const Type* PtrTy = PointerType::get(Type::Int8Ty); std::vector Params; From reid at x10sys.com Sun Apr 1 21:08:52 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 21:08:52 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs UpgradeParser.h.cvs UpgradeParser.y.cvs Message-ID: <200704020208.l3228qcd004338@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-upgrade: UpgradeParser.cpp.cvs updated: 1.70 -> 1.71 UpgradeParser.h.cvs updated: 1.52 -> 1.53 UpgradeParser.y.cvs updated: 1.69 -> 1.70 --- Log message: Regenerate --- Diffs of the changes: (+306 -268) UpgradeParser.cpp.cvs | 553 +++++++++++++++++++++++++------------------------- UpgradeParser.h.cvs | 2 UpgradeParser.y.cvs | 19 + 3 files changed, 306 insertions(+), 268 deletions(-) Index: llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs diff -u llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs:1.70 llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs:1.71 --- llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs:1.70 Sun Apr 1 20:14:00 2007 +++ llvm/tools/llvm-upgrade/UpgradeParser.cpp.cvs Sun Apr 1 21:08:35 2007 @@ -1826,6 +1826,25 @@ return new CallInst(F, Args[0]); } break; + case 'c': + if ((Name.length() <= 14 && !memcmp(&Name[5], "ctpop.i", 7)) || + (Name.length() <= 13 && !memcmp(&Name[5], "ctlz.i", 6)) || + (Name.length() <= 13 && !memcmp(&Name[5], "cttz.i", 6))) { + // These intrinsics changed their result type. + const Type* ArgTy = Args[0]->getType(); + Function *OldF = CurModule.CurrentModule->getFunction(Name); + if (OldF) + OldF->setName("upgrd.rm." + Name); + + Function *NewF = cast( + CurModule.CurrentModule->getOrInsertFunction(Name, Type::Int32Ty, + ArgTy, (void*)0)); + + Instruction *Call = new CallInst(NewF, Args[0], "", CurBB); + return CastInst::createIntegerCast(Call, RetTy, false); + } + break; + case 'v' : { const Type* PtrTy = PointerType::get(Type::Int8Ty); std::vector Params; @@ -2088,7 +2107,7 @@ #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 1712 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1731 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -2131,7 +2150,7 @@ llvm::Module::Endianness Endianness; } YYSTYPE; /* Line 196 of yacc.c. */ -#line 2135 "UpgradeParser.tab.c" +#line 2154 "UpgradeParser.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -2143,7 +2162,7 @@ /* Line 219 of yacc.c. */ -#line 2147 "UpgradeParser.tab.c" +#line 2166 "UpgradeParser.tab.c" #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ @@ -2503,38 +2522,38 @@ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 1852, 1852, 1853, 1861, 1862, 1872, 1872, 1872, 1872, - 1872, 1872, 1872, 1872, 1872, 1872, 1872, 1876, 1876, 1876, - 1880, 1880, 1880, 1880, 1880, 1880, 1884, 1884, 1885, 1885, - 1886, 1886, 1887, 1887, 1888, 1888, 1892, 1892, 1893, 1893, - 1894, 1894, 1895, 1895, 1896, 1896, 1897, 1897, 1898, 1898, - 1899, 1900, 1903, 1903, 1903, 1903, 1907, 1907, 1907, 1907, - 1907, 1907, 1907, 1908, 1908, 1908, 1908, 1908, 1908, 1914, - 1914, 1914, 1914, 1918, 1918, 1918, 1918, 1922, 1922, 1926, - 1926, 1931, 1934, 1939, 1940, 1941, 1942, 1943, 1944, 1945, - 1946, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1967, - 1968, 1976, 1977, 1985, 1994, 1995, 2002, 2003, 2007, 2011, - 2027, 2028, 2035, 2036, 2043, 2051, 2051, 2051, 2051, 2051, - 2051, 2051, 2052, 2052, 2052, 2052, 2052, 2057, 2061, 2065, - 2070, 2079, 2097, 2103, 2116, 2127, 2131, 2144, 2148, 2162, - 2166, 2173, 2174, 2180, 2187, 2199, 2229, 2242, 2265, 2293, - 2315, 2326, 2348, 2359, 2368, 2373, 2432, 2439, 2447, 2454, - 2461, 2465, 2469, 2478, 2493, 2506, 2515, 2543, 2556, 2565, - 2571, 2577, 2588, 2594, 2600, 2611, 2612, 2621, 2622, 2634, - 2643, 2644, 2645, 2646, 2647, 2663, 2683, 2685, 2687, 2687, - 2694, 2694, 2702, 2702, 2710, 2710, 2719, 2721, 2723, 2728, - 2742, 2743, 2747, 2750, 2758, 2762, 2769, 2773, 2777, 2781, - 2789, 2789, 2793, 2794, 2798, 2806, 2811, 2819, 2820, 2827, - 2834, 2838, 3019, 3019, 3023, 3023, 3033, 3033, 3037, 3042, - 3043, 3044, 3048, 3049, 3048, 3061, 3062, 3067, 3068, 3069, - 3070, 3074, 3078, 3079, 3080, 3081, 3102, 3106, 3120, 3121, - 3126, 3126, 3134, 3144, 3147, 3156, 3167, 3172, 3181, 3192, - 3192, 3195, 3199, 3203, 3208, 3218, 3236, 3245, 3310, 3314, - 3321, 3333, 3348, 3378, 3388, 3398, 3402, 3409, 3410, 3414, - 3417, 3423, 3442, 3460, 3476, 3490, 3504, 3515, 3533, 3542, - 3551, 3558, 3579, 3603, 3609, 3615, 3621, 3637, 3721, 3729, - 3730, 3734, 3735, 3739, 3745, 3752, 3758, 3765, 3772, 3785, - 3811 + 0, 1871, 1871, 1872, 1880, 1881, 1891, 1891, 1891, 1891, + 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1895, 1895, 1895, + 1899, 1899, 1899, 1899, 1899, 1899, 1903, 1903, 1904, 1904, + 1905, 1905, 1906, 1906, 1907, 1907, 1911, 1911, 1912, 1912, + 1913, 1913, 1914, 1914, 1915, 1915, 1916, 1916, 1917, 1917, + 1918, 1919, 1922, 1922, 1922, 1922, 1926, 1926, 1926, 1926, + 1926, 1926, 1926, 1927, 1927, 1927, 1927, 1927, 1927, 1933, + 1933, 1933, 1933, 1937, 1937, 1937, 1937, 1941, 1941, 1945, + 1945, 1950, 1953, 1958, 1959, 1960, 1961, 1962, 1963, 1964, + 1965, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1986, + 1987, 1995, 1996, 2004, 2013, 2014, 2021, 2022, 2026, 2030, + 2046, 2047, 2054, 2055, 2062, 2070, 2070, 2070, 2070, 2070, + 2070, 2070, 2071, 2071, 2071, 2071, 2071, 2076, 2080, 2084, + 2089, 2098, 2116, 2122, 2135, 2146, 2150, 2163, 2167, 2181, + 2185, 2192, 2193, 2199, 2206, 2218, 2248, 2261, 2284, 2312, + 2334, 2345, 2367, 2378, 2387, 2392, 2451, 2458, 2466, 2473, + 2480, 2484, 2488, 2497, 2512, 2525, 2534, 2562, 2575, 2584, + 2590, 2596, 2607, 2613, 2619, 2630, 2631, 2640, 2641, 2653, + 2662, 2663, 2664, 2665, 2666, 2682, 2702, 2704, 2706, 2706, + 2713, 2713, 2721, 2721, 2729, 2729, 2738, 2740, 2742, 2747, + 2761, 2762, 2766, 2769, 2777, 2781, 2788, 2792, 2796, 2800, + 2808, 2808, 2812, 2813, 2817, 2825, 2830, 2838, 2839, 2846, + 2853, 2857, 3038, 3038, 3042, 3042, 3052, 3052, 3056, 3061, + 3062, 3063, 3067, 3068, 3067, 3080, 3081, 3086, 3087, 3088, + 3089, 3093, 3097, 3098, 3099, 3100, 3121, 3125, 3139, 3140, + 3145, 3145, 3153, 3163, 3166, 3175, 3186, 3191, 3200, 3211, + 3211, 3214, 3218, 3222, 3227, 3237, 3255, 3264, 3329, 3333, + 3340, 3352, 3367, 3397, 3407, 3417, 3421, 3428, 3429, 3433, + 3436, 3442, 3461, 3479, 3495, 3509, 3523, 3534, 3552, 3561, + 3570, 3577, 3598, 3622, 3628, 3634, 3640, 3656, 3740, 3748, + 3749, 3753, 3754, 3758, 3764, 3771, 3777, 3784, 3791, 3804, + 3830 }; #endif @@ -3924,7 +3943,7 @@ switch (yyn) { case 3: -#line 1853 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1872 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].UIntVal) > (uint32_t)INT32_MAX) // Outside of my range! error("Value too large for type"); @@ -3933,7 +3952,7 @@ break; case 5: -#line 1862 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1881 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].UInt64Val) > (uint64_t)INT64_MAX) // Outside of my range! error("Value too large for type"); @@ -3942,226 +3961,226 @@ break; case 26: -#line 1884 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1903 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_EQ; ;} break; case 27: -#line 1884 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1903 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_NE; ;} break; case 28: -#line 1885 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1904 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_SLT; ;} break; case 29: -#line 1885 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1904 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_SGT; ;} break; case 30: -#line 1886 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1905 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_SLE; ;} break; case 31: -#line 1886 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1905 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_SGE; ;} break; case 32: -#line 1887 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1906 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_ULT; ;} break; case 33: -#line 1887 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1906 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_UGT; ;} break; case 34: -#line 1888 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1907 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_ULE; ;} break; case 35: -#line 1888 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1907 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.IPred) = ICmpInst::ICMP_UGE; ;} break; case 36: -#line 1892 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1911 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_OEQ; ;} break; case 37: -#line 1892 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1911 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_ONE; ;} break; case 38: -#line 1893 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1912 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_OLT; ;} break; case 39: -#line 1893 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1912 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_OGT; ;} break; case 40: -#line 1894 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1913 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_OLE; ;} break; case 41: -#line 1894 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1913 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_OGE; ;} break; case 42: -#line 1895 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1914 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_ORD; ;} break; case 43: -#line 1895 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1914 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_UNO; ;} break; case 44: -#line 1896 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1915 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_UEQ; ;} break; case 45: -#line 1896 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1915 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_UNE; ;} break; case 46: -#line 1897 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1916 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_ULT; ;} break; case 47: -#line 1897 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1916 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_UGT; ;} break; case 48: -#line 1898 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1917 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_ULE; ;} break; case 49: -#line 1898 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1917 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_UGE; ;} break; case 50: -#line 1899 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1918 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_TRUE; ;} break; case 51: -#line 1900 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1919 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FPred) = FCmpInst::FCMP_FALSE; ;} break; case 81: -#line 1931 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1950 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.StrVal) = (yyvsp[-1].StrVal); ;} break; case 82: -#line 1934 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1953 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.StrVal) = 0; ;} break; case 83: -#line 1939 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1958 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 84: -#line 1940 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1959 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 85: -#line 1941 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1960 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 86: -#line 1942 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1961 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; case 87: -#line 1943 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1962 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 88: -#line 1944 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1963 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 89: -#line 1945 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1964 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 90: -#line 1946 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1965 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 91: -#line 1950 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1969 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::C; ;} break; case 92: -#line 1951 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1970 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::C; ;} break; case 93: -#line 1952 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1971 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::CSRet; ;} break; case 94: -#line 1953 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1972 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::Fast; ;} break; case 95: -#line 1954 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1973 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::Cold; ;} break; case 96: -#line 1955 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1974 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::X86_StdCall; ;} break; case 97: -#line 1956 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1975 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = OldCallingConv::X86_FastCall; ;} break; case 98: -#line 1957 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1976 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((unsigned)(yyvsp[0].UInt64Val) != (yyvsp[0].UInt64Val)) error("Calling conv too large"); @@ -4170,12 +4189,12 @@ break; case 99: -#line 1967 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1986 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = 0; ;} break; case 100: -#line 1968 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1987 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4184,12 +4203,12 @@ break; case 101: -#line 1976 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1995 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = 0; ;} break; case 102: -#line 1977 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1996 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.UIntVal) = (yyvsp[0].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -4198,7 +4217,7 @@ break; case 103: -#line 1985 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2004 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { for (unsigned i = 0, e = strlen((yyvsp[0].StrVal)); i != e; ++i) if ((yyvsp[0].StrVal)[i] == '"' || (yyvsp[0].StrVal)[i] == '\\') @@ -4208,27 +4227,27 @@ break; case 104: -#line 1994 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2013 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.StrVal) = 0; ;} break; case 105: -#line 1995 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2014 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.StrVal) = (yyvsp[0].StrVal); ;} break; case 106: -#line 2002 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2021 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" {;} break; case 107: -#line 2003 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2022 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" {;} break; case 108: -#line 2007 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2026 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurGV->setSection((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -4236,7 +4255,7 @@ break; case 109: -#line 2011 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2030 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[0].UInt64Val))) error("Alignment must be a power of two"); @@ -4246,7 +4265,7 @@ break; case 111: -#line 2028 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2047 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[0].PrimType).T); (yyval.TypeVal).S.makeSignless(); @@ -4254,7 +4273,7 @@ break; case 113: -#line 2036 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2055 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[0].PrimType).T); (yyval.TypeVal).S.makeSignless(); @@ -4262,7 +4281,7 @@ break; case 114: -#line 2043 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2062 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!UpRefs.empty()) error("Invalid upreference in type: " + (*(yyvsp[0].TypeVal).PAT)->getDescription()); @@ -4271,7 +4290,7 @@ break; case 127: -#line 2057 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2076 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeVal).PAT = new PATypeHolder((yyvsp[0].PrimType).T); (yyval.TypeVal).S.copy((yyvsp[0].PrimType).S); @@ -4279,7 +4298,7 @@ break; case 128: -#line 2061 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2080 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeVal).PAT = new PATypeHolder(OpaqueType::get()); (yyval.TypeVal).S.makeSignless(); @@ -4287,7 +4306,7 @@ break; case 129: -#line 2065 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2084 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Named types are also simple types... (yyval.TypeVal).S.copy(getTypeSign((yyvsp[0].ValIDVal))); const Type* tmp = getType((yyvsp[0].ValIDVal)); @@ -4296,7 +4315,7 @@ break; case 130: -#line 2070 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2089 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Type UpReference if ((yyvsp[0].UInt64Val) > (uint64_t)~0U) error("Value out of range"); @@ -4309,7 +4328,7 @@ break; case 131: -#line 2079 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2098 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Function derived type? (yyval.TypeVal).S.makeComposite((yyvsp[-3].TypeVal).S); std::vector Params; @@ -4331,7 +4350,7 @@ break; case 132: -#line 2097 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2116 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Sized array type? (yyval.TypeVal).S.makeComposite((yyvsp[-1].TypeVal).S); (yyval.TypeVal).PAT = new PATypeHolder(HandleUpRefs(ArrayType::get((yyvsp[-1].TypeVal).PAT->get(), @@ -4341,7 +4360,7 @@ break; case 133: -#line 2103 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2122 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Vector type? const llvm::Type* ElemTy = (yyvsp[-1].TypeVal).PAT->get(); if ((unsigned)(yyvsp[-3].UInt64Val) != (yyvsp[-3].UInt64Val)) @@ -4358,7 +4377,7 @@ break; case 134: -#line 2116 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2135 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Structure type? std::vector Elements; (yyval.TypeVal).S.makeComposite(); @@ -4373,7 +4392,7 @@ break; case 135: -#line 2127 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2146 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Empty structure type? (yyval.TypeVal).PAT = new PATypeHolder(StructType::get(std::vector())); (yyval.TypeVal).S.makeComposite(); @@ -4381,7 +4400,7 @@ break; case 136: -#line 2131 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2150 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Packed Structure type? (yyval.TypeVal).S.makeComposite(); std::vector Elements; @@ -4398,7 +4417,7 @@ break; case 137: -#line 2144 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2163 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Empty packed structure type? (yyval.TypeVal).PAT = new PATypeHolder(StructType::get(std::vector(),true)); (yyval.TypeVal).S.makeComposite(); @@ -4406,7 +4425,7 @@ break; case 138: -#line 2148 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2167 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Pointer type? if ((yyvsp[-1].TypeVal).PAT->get() == Type::LabelTy) error("Cannot form a pointer to a basic block"); @@ -4418,7 +4437,7 @@ break; case 139: -#line 2162 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2181 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeList) = new std::list(); (yyval.TypeList)->push_back((yyvsp[0].TypeVal)); @@ -4426,14 +4445,14 @@ break; case 140: -#line 2166 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2185 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { ((yyval.TypeList)=(yyvsp[-2].TypeList))->push_back((yyvsp[0].TypeVal)); ;} break; case 142: -#line 2174 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2193 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { PATypeInfo VoidTI; VoidTI.PAT = new PATypeHolder(Type::VoidTy); @@ -4443,7 +4462,7 @@ break; case 143: -#line 2180 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2199 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeList) = new std::list(); PATypeInfo VoidTI; @@ -4454,14 +4473,14 @@ break; case 144: -#line 2187 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2206 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TypeList) = new std::list(); ;} break; case 145: -#line 2199 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2218 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Nonempty unsized arr const ArrayType *ATy = dyn_cast((yyvsp[-3].TypeVal).PAT->get()); if (ATy == 0) @@ -4495,7 +4514,7 @@ break; case 146: -#line 2229 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2248 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal).PAT->get()); if (ATy == 0) @@ -4512,7 +4531,7 @@ break; case 147: -#line 2242 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2261 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const ArrayType *ATy = dyn_cast((yyvsp[-2].TypeVal).PAT->get()); if (ATy == 0) @@ -4539,7 +4558,7 @@ break; case 148: -#line 2265 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2284 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Nonempty unsized arr const VectorType *PTy = dyn_cast((yyvsp[-3].TypeVal).PAT->get()); if (PTy == 0) @@ -4571,7 +4590,7 @@ break; case 149: -#line 2293 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2312 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const StructType *STy = dyn_cast((yyvsp[-3].TypeVal).PAT->get()); if (STy == 0) @@ -4597,7 +4616,7 @@ break; case 150: -#line 2315 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2334 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const StructType *STy = dyn_cast((yyvsp[-2].TypeVal).PAT->get()); if (STy == 0) @@ -4612,7 +4631,7 @@ break; case 151: -#line 2326 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2345 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const StructType *STy = dyn_cast((yyvsp[-5].TypeVal).PAT->get()); if (STy == 0) @@ -4638,7 +4657,7 @@ break; case 152: -#line 2348 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2367 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const StructType *STy = dyn_cast((yyvsp[-4].TypeVal).PAT->get()); if (STy == 0) @@ -4653,7 +4672,7 @@ break; case 153: -#line 2359 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2378 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const PointerType *PTy = dyn_cast((yyvsp[-1].TypeVal).PAT->get()); if (PTy == 0) @@ -4666,7 +4685,7 @@ break; case 154: -#line 2368 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2387 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ConstVal).C = UndefValue::get((yyvsp[-1].TypeVal).PAT->get()); (yyval.ConstVal).S.copy((yyvsp[-1].TypeVal).S); @@ -4675,7 +4694,7 @@ break; case 155: -#line 2373 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2392 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const PointerType *Ty = dyn_cast((yyvsp[-1].TypeVal).PAT->get()); if (Ty == 0) @@ -4738,7 +4757,7 @@ break; case 156: -#line 2432 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2451 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[-1].TypeVal).PAT->get() != (yyvsp[0].ConstVal).C->getType()) error("Mismatched types for constant expression"); @@ -4749,7 +4768,7 @@ break; case 157: -#line 2439 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2458 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-1].TypeVal).PAT->get(); if (isa(Ty) || Ty == Type::LabelTy || isa(Ty)) @@ -4761,7 +4780,7 @@ break; case 158: -#line 2447 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2466 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // integral constants const Type *Ty = (yyvsp[-1].PrimType).T; if (!ConstantInt::isValueValidForType(Ty, (yyvsp[0].SInt64Val))) @@ -4772,7 +4791,7 @@ break; case 159: -#line 2454 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2473 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // integral constants const Type *Ty = (yyvsp[-1].PrimType).T; if (!ConstantInt::isValueValidForType(Ty, (yyvsp[0].UInt64Val))) @@ -4783,7 +4802,7 @@ break; case 160: -#line 2461 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2480 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Boolean constants (yyval.ConstVal).C = ConstantInt::get(Type::Int1Ty, true); (yyval.ConstVal).S.makeUnsigned(); @@ -4791,7 +4810,7 @@ break; case 161: -#line 2465 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2484 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Boolean constants (yyval.ConstVal).C = ConstantInt::get(Type::Int1Ty, false); (yyval.ConstVal).S.makeUnsigned(); @@ -4799,7 +4818,7 @@ break; case 162: -#line 2469 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2488 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Float & Double constants if (!ConstantFP::isValueValidForType((yyvsp[-1].PrimType).T, (yyvsp[0].FPVal))) error("Floating point constant invalid for type"); @@ -4809,7 +4828,7 @@ break; case 163: -#line 2478 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2497 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type* SrcTy = (yyvsp[-3].ConstVal).C->getType(); const Type* DstTy = (yyvsp[-1].TypeVal).PAT->get(); @@ -4828,7 +4847,7 @@ break; case 164: -#line 2493 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2512 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-2].ConstVal).C->getType(); if (!isa(Ty)) @@ -4845,7 +4864,7 @@ break; case 165: -#line 2506 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2525 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!(yyvsp[-5].ConstVal).C->getType()->isInteger() || cast((yyvsp[-5].ConstVal).C->getType())->getBitWidth() != 1) @@ -4858,7 +4877,7 @@ break; case 166: -#line 2515 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2534 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-3].ConstVal).C->getType(); if (Ty != (yyvsp[-1].ConstVal).C->getType()) @@ -4890,7 +4909,7 @@ break; case 167: -#line 2543 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2562 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type* Ty = (yyvsp[-3].ConstVal).C->getType(); if (Ty != (yyvsp[-1].ConstVal).C->getType()) @@ -4907,7 +4926,7 @@ break; case 168: -#line 2556 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2575 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type* Ty = (yyvsp[-3].ConstVal).C->getType(); if (Ty != (yyvsp[-1].ConstVal).C->getType()) @@ -4920,7 +4939,7 @@ break; case 169: -#line 2565 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2584 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[-3].ConstVal).C->getType() != (yyvsp[-1].ConstVal).C->getType()) error("icmp operand types must match"); @@ -4930,7 +4949,7 @@ break; case 170: -#line 2571 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2590 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[-3].ConstVal).C->getType() != (yyvsp[-1].ConstVal).C->getType()) error("fcmp operand types must match"); @@ -4940,7 +4959,7 @@ break; case 171: -#line 2577 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2596 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!(yyvsp[-1].ConstVal).C->getType()->isInteger() || cast((yyvsp[-1].ConstVal).C->getType())->getBitWidth() != 8) @@ -4955,7 +4974,7 @@ break; case 172: -#line 2588 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2607 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C)) error("Invalid extractelement operands"); @@ -4965,7 +4984,7 @@ break; case 173: -#line 2594 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2613 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-5].ConstVal).C, (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C)) error("Invalid insertelement operands"); @@ -4975,7 +4994,7 @@ break; case 174: -#line 2600 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2619 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-5].ConstVal).C, (yyvsp[-3].ConstVal).C, (yyvsp[-1].ConstVal).C)) error("Invalid shufflevector operands"); @@ -4985,12 +5004,12 @@ break; case 175: -#line 2611 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2630 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { ((yyval.ConstVector) = (yyvsp[-2].ConstVector))->push_back((yyvsp[0].ConstVal)); ;} break; case 176: -#line 2612 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2631 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ConstVector) = new std::vector(); (yyval.ConstVector)->push_back((yyvsp[0].ConstVal)); @@ -4998,17 +5017,17 @@ break; case 177: -#line 2621 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2640 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = false; ;} break; case 178: -#line 2622 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2641 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = true; ;} break; case 179: -#line 2634 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2653 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = ParserResult = (yyvsp[0].ModuleVal); CurModule.ModuleDone(); @@ -5016,27 +5035,27 @@ break; case 180: -#line 2643 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2662 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); CurFun.FunctionDone(); ;} break; case 181: -#line 2644 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2663 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); ;} break; case 182: -#line 2645 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2664 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = (yyvsp[-3].ModuleVal); ;} break; case 183: -#line 2646 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2665 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = (yyvsp[-1].ModuleVal); ;} break; case 184: -#line 2647 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2666 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ModuleVal) = CurModule.CurrentModule; // Emit an error if there are any unresolved types left. @@ -5052,7 +5071,7 @@ break; case 185: -#line 2663 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2682 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Eagerly resolve types. This is not an optimization, this is a // requirement that is due to the fact that we could have this: @@ -5076,19 +5095,19 @@ break; case 186: -#line 2683 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2702 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Function prototypes can be in const pool ;} break; case 187: -#line 2685 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2704 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Asm blocks can be in the const pool ;} break; case 188: -#line 2687 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2706 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].ConstVal).C == 0) error("Global value initializer is not a constant"); @@ -5097,14 +5116,14 @@ break; case 189: -#line 2691 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2710 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurGV = 0; ;} break; case 190: -#line 2694 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2713 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[0].TypeVal).PAT->get(); CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::ExternalLinkage, (yyvsp[-1].BoolVal), Ty, 0, @@ -5114,14 +5133,14 @@ break; case 191: -#line 2699 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2718 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurGV = 0; ;} break; case 192: -#line 2702 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2721 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[0].TypeVal).PAT->get(); CurGV = ParseGlobalVariable((yyvsp[-3].StrVal), GlobalValue::DLLImportLinkage, (yyvsp[-1].BoolVal), Ty, 0, @@ -5131,14 +5150,14 @@ break; case 193: -#line 2707 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2726 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurGV = 0; ;} break; case 194: -#line 2710 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2729 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[0].TypeVal).PAT->get(); CurGV = @@ -5149,32 +5168,32 @@ break; case 195: -#line 2716 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2735 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurGV = 0; ;} break; case 196: -#line 2719 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2738 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { ;} break; case 197: -#line 2721 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2740 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { ;} break; case 198: -#line 2723 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2742 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { ;} break; case 199: -#line 2728 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2747 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); char *EndStr = UnEscapeLexed((yyvsp[0].StrVal), true); @@ -5189,24 +5208,24 @@ break; case 200: -#line 2742 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2761 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Endianness) = Module::BigEndian; ;} break; case 201: -#line 2743 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2762 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Endianness) = Module::LittleEndian; ;} break; case 202: -#line 2747 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2766 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurModule.setEndianness((yyvsp[0].Endianness)); ;} break; case 203: -#line 2750 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2769 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].UInt64Val) == 32) CurModule.setPointerSize(Module::Pointer32); @@ -5218,7 +5237,7 @@ break; case 204: -#line 2758 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2777 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurModule.CurrentModule->setTargetTriple((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -5226,7 +5245,7 @@ break; case 205: -#line 2762 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2781 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurModule.CurrentModule->setDataLayout((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -5234,7 +5253,7 @@ break; case 207: -#line 2773 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2792 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -5242,7 +5261,7 @@ break; case 208: -#line 2777 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2796 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurModule.CurrentModule->addLibrary((yyvsp[0].StrVal)); free((yyvsp[0].StrVal)); @@ -5250,17 +5269,17 @@ break; case 209: -#line 2781 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2800 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { ;} break; case 213: -#line 2794 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2813 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.StrVal) = 0; ;} break; case 214: -#line 2798 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2817 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[-1].TypeVal).PAT->get() == Type::VoidTy) error("void typed arguments are invalid"); @@ -5269,7 +5288,7 @@ break; case 215: -#line 2806 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2825 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = (yyvsp[-2].ArgList); (yyval.ArgList)->push_back(*(yyvsp[0].ArgVal)); @@ -5278,7 +5297,7 @@ break; case 216: -#line 2811 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2830 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = new std::vector >(); (yyval.ArgList)->push_back(*(yyvsp[0].ArgVal)); @@ -5287,12 +5306,12 @@ break; case 217: -#line 2819 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2838 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = (yyvsp[0].ArgList); ;} break; case 218: -#line 2820 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2839 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = (yyvsp[-2].ArgList); PATypeInfo VoidTI; @@ -5303,7 +5322,7 @@ break; case 219: -#line 2827 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2846 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = new std::vector >(); PATypeInfo VoidTI; @@ -5314,12 +5333,12 @@ break; case 220: -#line 2834 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2853 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ArgList) = 0; ;} break; case 221: -#line 2838 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 2857 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { UnEscapeLexed((yyvsp[-5].StrVal)); std::string FunctionName((yyvsp[-5].StrVal)); @@ -5501,12 +5520,12 @@ break; case 224: -#line 3023 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3042 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurFun.Linkage = (yyvsp[0].Linkage); ;} break; case 225: -#line 3023 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3042 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -5517,39 +5536,39 @@ break; case 228: -#line 3037 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3056 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); ;} break; case 229: -#line 3042 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3061 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 230: -#line 3043 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3062 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 231: -#line 3044 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3063 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 232: -#line 3048 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3067 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurFun.isDeclare = true; ;} break; case 233: -#line 3049 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3068 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { CurFun.Linkage = (yyvsp[0].Linkage); ;} break; case 234: -#line 3049 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3068 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; CurFun.FunctionDone(); @@ -5558,32 +5577,32 @@ break; case 235: -#line 3061 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3080 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = false; ;} break; case 236: -#line 3062 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3081 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = true; ;} break; case 237: -#line 3067 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3086 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].SInt64Val)); ;} break; case 238: -#line 3068 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3087 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].UInt64Val)); ;} break; case 239: -#line 3069 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3088 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].FPVal)); ;} break; case 240: -#line 3070 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3089 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::get(Type::Int1Ty, true)); (yyval.ValIDVal).S.makeUnsigned(); @@ -5591,7 +5610,7 @@ break; case 241: -#line 3074 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3093 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::get(Type::Int1Ty, false)); (yyval.ValIDVal).S.makeUnsigned(); @@ -5599,22 +5618,22 @@ break; case 242: -#line 3078 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3097 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::createNull(); ;} break; case 243: -#line 3079 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3098 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::createUndef(); ;} break; case 244: -#line 3080 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3099 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::createZeroInit(); ;} break; case 245: -#line 3081 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3100 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[-1].ConstVector))[0].C->getType(); int NumElements = (yyvsp[-1].ConstVector)->size(); @@ -5639,7 +5658,7 @@ break; case 246: -#line 3102 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3121 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].ConstVal).C); (yyval.ValIDVal).S.copy((yyvsp[0].ConstVal).S); @@ -5647,7 +5666,7 @@ break; case 247: -#line 3106 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3125 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { char *End = UnEscapeLexed((yyvsp[-2].StrVal), true); std::string AsmStr = std::string((yyvsp[-2].StrVal), End); @@ -5660,17 +5679,17 @@ break; case 248: -#line 3120 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3139 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].SIntVal)); (yyval.ValIDVal).S.makeSignless(); ;} break; case 249: -#line 3121 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3140 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[0].StrVal)); (yyval.ValIDVal).S.makeSignless(); ;} break; case 252: -#line 3134 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3153 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-1].TypeVal).PAT->get(); (yyvsp[0].ValIDVal).S.copy((yyvsp[-1].TypeVal).S); @@ -5681,21 +5700,21 @@ break; case 253: -#line 3144 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3163 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); ;} break; case 254: -#line 3147 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3166 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[-1].FunctionVal); ;} break; case 255: -#line 3156 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3175 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { ValueInfo VI; VI.V = (yyvsp[0].TermInstVal).TI; VI.S.copy((yyvsp[0].TermInstVal).S); setValueName(VI, (yyvsp[-1].StrVal)); @@ -5707,7 +5726,7 @@ break; case 256: -#line 3167 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3186 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if ((yyvsp[0].InstVal).I) (yyvsp[-1].BasicBlockVal)->getInstList().push_back((yyvsp[0].InstVal).I); @@ -5716,7 +5735,7 @@ break; case 257: -#line 3172 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3191 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((int)CurFun.NextBBNum++),true); // Make sure to move the basic block to the correct location in the @@ -5729,7 +5748,7 @@ break; case 258: -#line 3181 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3200 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BasicBlockVal) = CurBB = getBBVal(ValID::create((yyvsp[0].StrVal)), true); // Make sure to move the basic block to the correct location in the @@ -5742,7 +5761,7 @@ break; case 261: -#line 3195 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3214 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Return with a result... (yyval.TermInstVal).TI = new ReturnInst((yyvsp[0].ValueVal).V); (yyval.TermInstVal).S.makeSignless(); @@ -5750,7 +5769,7 @@ break; case 262: -#line 3199 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3218 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Return with no result... (yyval.TermInstVal).TI = new ReturnInst(); (yyval.TermInstVal).S.makeSignless(); @@ -5758,7 +5777,7 @@ break; case 263: -#line 3203 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3222 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[0].ValIDVal)); (yyval.TermInstVal).TI = new BranchInst(tmpBB); @@ -5767,7 +5786,7 @@ break; case 264: -#line 3208 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3227 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-3].ValIDVal).S.makeSignless(); (yyvsp[0].ValIDVal).S.makeSignless(); @@ -5781,7 +5800,7 @@ break; case 265: -#line 3218 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3237 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-6].ValIDVal).S.copy((yyvsp[-7].PrimType).S); Value* tmpVal = getVal((yyvsp[-7].PrimType).T, (yyvsp[-6].ValIDVal)); @@ -5803,7 +5822,7 @@ break; case 266: -#line 3236 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3255 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-5].ValIDVal).S.copy((yyvsp[-6].PrimType).S); Value* tmpVal = getVal((yyvsp[-6].PrimType).T, (yyvsp[-5].ValIDVal)); @@ -5816,7 +5835,7 @@ break; case 267: -#line 3246 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3265 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const PointerType *PFTy; const FunctionType *Ty; @@ -5884,7 +5903,7 @@ break; case 268: -#line 3310 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3329 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TermInstVal).TI = new UnwindInst(); (yyval.TermInstVal).S.makeSignless(); @@ -5892,7 +5911,7 @@ break; case 269: -#line 3314 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3333 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.TermInstVal).TI = new UnreachableInst(); (yyval.TermInstVal).S.makeSignless(); @@ -5900,7 +5919,7 @@ break; case 270: -#line 3321 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3340 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.JumpTable) = (yyvsp[-5].JumpTable); (yyvsp[-3].ValIDVal).S.copy((yyvsp[-4].PrimType).S); @@ -5916,7 +5935,7 @@ break; case 271: -#line 3333 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3352 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.JumpTable) = new std::vector >(); (yyvsp[-3].ValIDVal).S.copy((yyvsp[-4].PrimType).S); @@ -5932,7 +5951,7 @@ break; case 272: -#line 3348 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3367 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { bool omit = false; if ((yyvsp[-1].StrVal)) @@ -5965,7 +5984,7 @@ break; case 273: -#line 3378 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3397 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Used for PHI nodes (yyval.PHIList).P = new std::list >(); (yyval.PHIList).S.copy((yyvsp[-5].TypeVal).S); @@ -5979,7 +5998,7 @@ break; case 274: -#line 3388 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3407 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.PHIList) = (yyvsp[-6].PHIList); (yyvsp[-3].ValIDVal).S.copy((yyvsp[-6].PHIList).S); @@ -5991,7 +6010,7 @@ break; case 275: -#line 3398 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3417 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Used for call statements, and memory insts... (yyval.ValueList) = new std::vector(); (yyval.ValueList)->push_back((yyvsp[0].ValueVal)); @@ -5999,7 +6018,7 @@ break; case 276: -#line 3402 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3421 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValueList) = (yyvsp[-2].ValueList); (yyvsp[-2].ValueList)->push_back((yyvsp[0].ValueVal)); @@ -6007,26 +6026,26 @@ break; case 278: -#line 3410 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3429 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValueList) = 0; ;} break; case 279: -#line 3414 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3433 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = true; ;} break; case 280: -#line 3417 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3436 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = false; ;} break; case 281: -#line 3423 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3442 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-2].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); (yyvsp[0].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); @@ -6049,7 +6068,7 @@ break; case 282: -#line 3442 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3461 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-2].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); (yyvsp[0].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); @@ -6071,7 +6090,7 @@ break; case 283: -#line 3460 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3479 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-2].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); (yyvsp[0].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); @@ -6091,7 +6110,7 @@ break; case 284: -#line 3476 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3495 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-2].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); (yyvsp[0].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); @@ -6109,7 +6128,7 @@ break; case 285: -#line 3490 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3509 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-2].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); (yyvsp[0].ValIDVal).S.copy((yyvsp[-3].TypeVal).S); @@ -6127,7 +6146,7 @@ break; case 286: -#line 3504 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3523 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { warning("Use of obsolete 'not' instruction: Replacing with 'xor"); const Type *Ty = (yyvsp[0].ValueVal).V->getType(); @@ -6142,7 +6161,7 @@ break; case 287: -#line 3515 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3534 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!(yyvsp[0].ValueVal).V->getType()->isInteger() || cast((yyvsp[0].ValueVal).V->getType())->getBitWidth() != 8) @@ -6164,7 +6183,7 @@ break; case 288: -#line 3533 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3552 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *DstTy = (yyvsp[0].TypeVal).PAT->get(); if (!DstTy->isFirstClassType()) @@ -6177,7 +6196,7 @@ break; case 289: -#line 3542 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3561 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!(yyvsp[-4].ValueVal).V->getType()->isInteger() || cast((yyvsp[-4].ValueVal).V->getType())->getBitWidth() != 1) @@ -6190,7 +6209,7 @@ break; case 290: -#line 3551 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3570 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[0].TypeVal).PAT->get(); NewVarArgs = true; @@ -6201,7 +6220,7 @@ break; case 291: -#line 3558 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3577 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type* ArgTy = (yyvsp[-2].ValueVal).V->getType(); const Type* DstTy = (yyvsp[0].TypeVal).PAT->get(); @@ -6226,7 +6245,7 @@ break; case 292: -#line 3579 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3598 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type* ArgTy = (yyvsp[-2].ValueVal).V->getType(); const Type* DstTy = (yyvsp[0].TypeVal).PAT->get(); @@ -6254,7 +6273,7 @@ break; case 293: -#line 3603 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3622 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V)) error("Invalid extractelement operands"); @@ -6264,7 +6283,7 @@ break; case 294: -#line 3609 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3628 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[-4].ValueVal).V, (yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V)) error("Invalid insertelement operands"); @@ -6274,7 +6293,7 @@ break; case 295: -#line 3615 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3634 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[-4].ValueVal).V, (yyvsp[-2].ValueVal).V, (yyvsp[0].ValueVal).V)) error("Invalid shufflevector operands"); @@ -6284,7 +6303,7 @@ break; case 296: -#line 3621 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3640 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[0].PHIList).P->front().first->getType(); if (!Ty->isFirstClassType()) @@ -6304,7 +6323,7 @@ break; case 297: -#line 3637 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3656 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { // Handle the short call syntax const PointerType *PFTy; @@ -6392,34 +6411,34 @@ break; case 298: -#line 3721 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3740 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.InstVal) = (yyvsp[0].InstVal); ;} break; case 299: -#line 3729 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3748 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValueList) = (yyvsp[0].ValueList); ;} break; case 300: -#line 3730 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3749 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.ValueList) = new std::vector(); ;} break; case 301: -#line 3734 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3753 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = true; ;} break; case 302: -#line 3735 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3754 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyval.BoolVal) = false; ;} break; case 303: -#line 3739 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3758 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-1].TypeVal).PAT->get(); (yyval.InstVal).S.makeComposite((yyvsp[-1].TypeVal).S); @@ -6429,7 +6448,7 @@ break; case 304: -#line 3745 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3764 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-4].TypeVal).PAT->get(); (yyvsp[-1].ValIDVal).S.makeUnsigned(); @@ -6440,7 +6459,7 @@ break; case 305: -#line 3752 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3771 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-1].TypeVal).PAT->get(); (yyval.InstVal).S.makeComposite((yyvsp[-1].TypeVal).S); @@ -6450,7 +6469,7 @@ break; case 306: -#line 3758 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3777 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *Ty = (yyvsp[-4].TypeVal).PAT->get(); (yyvsp[-1].ValIDVal).S.makeUnsigned(); @@ -6461,7 +6480,7 @@ break; case 307: -#line 3765 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3784 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type *PTy = (yyvsp[0].ValueVal).V->getType(); if (!isa(PTy)) @@ -6472,7 +6491,7 @@ break; case 308: -#line 3772 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3791 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { const Type* Ty = (yyvsp[-1].TypeVal).PAT->get(); (yyvsp[0].ValIDVal).S.copy((yyvsp[-1].TypeVal).S); @@ -6489,7 +6508,7 @@ break; case 309: -#line 3785 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3804 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[0].ValIDVal).S.copy((yyvsp[-1].TypeVal).S); const PointerType *PTy = dyn_cast((yyvsp[-1].TypeVal).PAT->get()); @@ -6519,7 +6538,7 @@ break; case 310: -#line 3811 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3830 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" { (yyvsp[-1].ValIDVal).S.copy((yyvsp[-2].TypeVal).S); const Type* Ty = (yyvsp[-2].TypeVal).PAT->get(); @@ -6543,7 +6562,7 @@ } /* Line 1126 of yacc.c. */ -#line 6547 "UpgradeParser.tab.c" +#line 6566 "UpgradeParser.tab.c" yyvsp -= yylen; yyssp -= yylen; @@ -6811,7 +6830,7 @@ } -#line 3829 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 3848 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" int yyerror(const char *ErrorMsg) { Index: llvm/tools/llvm-upgrade/UpgradeParser.h.cvs diff -u llvm/tools/llvm-upgrade/UpgradeParser.h.cvs:1.52 llvm/tools/llvm-upgrade/UpgradeParser.h.cvs:1.53 --- llvm/tools/llvm-upgrade/UpgradeParser.h.cvs:1.52 Sun Apr 1 20:14:00 2007 +++ llvm/tools/llvm-upgrade/UpgradeParser.h.cvs Sun Apr 1 21:08:35 2007 @@ -335,7 +335,7 @@ #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 1712 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" +#line 1731 "/proj/llvm/llvm-1/tools/llvm-upgrade/UpgradeParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; Index: llvm/tools/llvm-upgrade/UpgradeParser.y.cvs diff -u llvm/tools/llvm-upgrade/UpgradeParser.y.cvs:1.69 llvm/tools/llvm-upgrade/UpgradeParser.y.cvs:1.70 --- llvm/tools/llvm-upgrade/UpgradeParser.y.cvs:1.69 Sun Apr 1 20:14:00 2007 +++ llvm/tools/llvm-upgrade/UpgradeParser.y.cvs Sun Apr 1 21:08:35 2007 @@ -1466,6 +1466,25 @@ return new CallInst(F, Args[0]); } break; + case 'c': + if ((Name.length() <= 14 && !memcmp(&Name[5], "ctpop.i", 7)) || + (Name.length() <= 13 && !memcmp(&Name[5], "ctlz.i", 6)) || + (Name.length() <= 13 && !memcmp(&Name[5], "cttz.i", 6))) { + // These intrinsics changed their result type. + const Type* ArgTy = Args[0]->getType(); + Function *OldF = CurModule.CurrentModule->getFunction(Name); + if (OldF) + OldF->setName("upgrd.rm." + Name); + + Function *NewF = cast( + CurModule.CurrentModule->getOrInsertFunction(Name, Type::Int32Ty, + ArgTy, (void*)0)); + + Instruction *Call = new CallInst(NewF, Args[0], "", CurBB); + return CastInst::createIntegerCast(Call, RetTy, false); + } + break; + case 'v' : { const Type* PtrTy = PointerType::get(Type::Int8Ty); std::vector Params; From clattner at apple.com Sun Apr 1 21:19:16 2007 From: clattner at apple.com (Chris Lattner) Date: Sun, 1 Apr 2007 19:19:16 -0700 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html In-Reply-To: <200704020020.l320K9Wc031297@zion.cs.uiuc.edu> References: <200704020020.l320K9Wc031297@zion.cs.uiuc.edu> Message-ID: On Apr 1, 2007, at 5:20 PM, Reid Spencer wrote: > >

        > -The 'llvm.bwsap' family of intrinsics is used to byteswap > integer > +The 'llvm.bwsap' family of intrinsics is used to byte > swap integer > values with an even number of bytes (positive multiple of 16 > bits). These are Typo remains: llvm.bwsap -Chris From reid at x10sys.com Sun Apr 1 21:25:36 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 21:25:36 -0500 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html Message-ID: <200704020225.l322Pajf004923@zion.cs.uiuc.edu> Changes in directory llvm/docs: LangRef.html updated: 1.223 -> 1.224 --- Log message: bwsap -> bswap --- Diffs of the changes: (+2 -2) LangRef.html | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.223 llvm/docs/LangRef.html:1.224 --- llvm/docs/LangRef.html:1.223 Sun Apr 1 19:19:52 2007 +++ llvm/docs/LangRef.html Sun Apr 1 21:25:19 2007 @@ -4444,7 +4444,7 @@

        Overview:

        -The 'llvm.bwsap' family of intrinsics is used to byte swap integer +The 'llvm.bswap' family of intrinsics is used to byte swap integer values with an even number of bytes (positive multiple of 16 bits). These are useful for performing operations on data that is not in the target's native byte order. @@ -4996,7 +4996,7 @@ Chris Lattner
        The LLVM Compiler Infrastructure
        - Last modified: $Date: 2007/04/02 00:19:52 $ + Last modified: $Date: 2007/04/02 02:25:19 $ From reid at x10sys.com Sun Apr 1 22:25:04 2007 From: reid at x10sys.com (Reid Spencer) Date: Sun, 1 Apr 2007 22:25:04 -0500 Subject: [llvm-commits] CVS: llvm/test/Transforms/InstCombine/bitcount.ll Message-ID: <200704020325.l323P4uI007275@zion.cs.uiuc.edu> Changes in directory llvm/test/Transforms/InstCombine: bitcount.ll updated: 1.1 -> 1.2 --- Log message: Fix illegal assembly syntax. --- Diffs of the changes: (+4 -4) bitcount.ll | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) Index: llvm/test/Transforms/InstCombine/bitcount.ll diff -u llvm/test/Transforms/InstCombine/bitcount.ll:1.1 llvm/test/Transforms/InstCombine/bitcount.ll:1.2 --- llvm/test/Transforms/InstCombine/bitcount.ll:1.1 Sun Apr 1 20:45:31 2007 +++ llvm/test/Transforms/InstCombine/bitcount.ll Sun Apr 1 22:24:47 2007 @@ -6,10 +6,10 @@ declare i32 @llvm.cttz.i32(i32 %val) declare i32 @llvm.ctlz.i33(i33 %val) -define i32 %test(i32 %A) { - %c1 = i32 call @llvm.ctpop(i31 12415124) - %c2 = i32 call @llvm.cttz(i32 87359874) - %c3 = i32 call @llvm.ctlz(i33 87359874) +define i32 @test(i32 %A) { + %c1 = call i32 @llvm.ctpop.i31(i31 12415124) + %c2 = call i32 @llvm.cttz.i32(i32 87359874) + %c3 = call i32 @llvm.ctlz.i33(i33 87359874) %r1 = add i32 %c1, %c2 %r2 = add i32 %r1, %c3 ret i32 %r2