From gordonhenriksen at mac.com Mon May 19 00:47:11 2008 From: gordonhenriksen at mac.com (Gordon Henriksen) Date: Mon, 19 May 2008 05:47:11 -0000 Subject: [llvm-commits] [llvm] r51238 - in /llvm/trunk: bindings/ocaml/llvm/llvm_ocaml.c include/llvm-c/Core.h lib/AsmParser/llvmAsmParser.cpp.cvs lib/AsmParser/llvmAsmParser.h.cvs lib/AsmParser/llvmAsmParser.y.cvs lib/VMCore/Core.cpp Message-ID: <200805190547.m4J5lC7E018085@zion.cs.uiuc.edu> Author: gordon Date: Mon May 19 00:47:10 2008 New Revision: 51238 URL: http://llvm.org/viewvc/llvm-project?rev=51238&view=rev Log: Remove a duplicative binding. Patch by Mahadevan R. Modified: llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c llvm/trunk/include/llvm-c/Core.h llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs llvm/trunk/lib/VMCore/Core.cpp Modified: llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c?rev=51238&r1=51237&r2=51238&view=diff ============================================================================== --- llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c (original) +++ llvm/trunk/bindings/ocaml/llvm/llvm_ocaml.c Mon May 19 00:47:10 2008 @@ -329,7 +329,7 @@ } CAMLprim value llvm_refine_type(LLVMTypeRef AbstractTy, LLVMTypeRef ConcreteTy){ - LLVMRefineAbstractType(AbstractTy, ConcreteTy); + LLVMRefineType(AbstractTy, ConcreteTy); return Val_unit; } Modified: llvm/trunk/include/llvm-c/Core.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Core.h?rev=51238&r1=51237&r2=51238&view=diff ============================================================================== --- llvm/trunk/include/llvm-c/Core.h (original) +++ llvm/trunk/include/llvm-c/Core.h Mon May 19 00:47:10 2008 @@ -224,9 +224,6 @@ /** See llvm::LLVMTypeKind::getTypeID. */ LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty); -/** See llvm::DerivedType::refineAbstractTypeTo. */ -void LLVMRefineAbstractType(LLVMTypeRef AbstractType, LLVMTypeRef ConcreteType); - /* Operations on integer types */ LLVMTypeRef LLVMInt1Type(void); LLVMTypeRef LLVMInt8Type(void); Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs?rev=51238&r1=51237&r2=51238&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs Mon May 19 00:47:10 2008 @@ -384,7 +384,7 @@ /* Copy the first part of user declarations. */ -#line 14 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 14 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -1340,7 +1340,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 949 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 949 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -3503,152 +3503,152 @@ switch (yyn) { case 29: -#line 1117 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1117 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_EQ; ;} break; case 30: -#line 1117 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1117 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_NE; ;} break; case 31: -#line 1118 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1118 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLT; ;} break; case 32: -#line 1118 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1118 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGT; ;} break; case 33: -#line 1119 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1119 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLE; ;} break; case 34: -#line 1119 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1119 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGE; ;} break; case 35: -#line 1120 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1120 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULT; ;} break; case 36: -#line 1120 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1120 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGT; ;} break; case 37: -#line 1121 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1121 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULE; ;} break; case 38: -#line 1121 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1121 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGE; ;} break; case 39: -#line 1125 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1125 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OEQ; ;} break; case 40: -#line 1125 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1125 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ONE; ;} break; case 41: -#line 1126 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1126 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLT; ;} break; case 42: -#line 1126 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1126 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGT; ;} break; case 43: -#line 1127 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1127 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLE; ;} break; case 44: -#line 1127 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1127 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGE; ;} break; case 45: -#line 1128 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1128 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ORD; ;} break; case 46: -#line 1128 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1128 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNO; ;} break; case 47: -#line 1129 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1129 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UEQ; ;} break; case 48: -#line 1129 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1129 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNE; ;} break; case 49: -#line 1130 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1130 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULT; ;} break; case 50: -#line 1130 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1130 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGT; ;} break; case 51: -#line 1131 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1131 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULE; ;} break; case 52: -#line 1131 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1131 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGE; ;} break; case 53: -#line 1132 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1132 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_TRUE; ;} break; case 54: -#line 1133 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1133 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;} break; case 65: -#line 1142 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1142 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 66: -#line 1144 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1144 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=(yyvsp[(3) - (4)].UInt64Val); ;} break; case 67: -#line 1145 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1145 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=0; ;} break; case 68: -#line 1149 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1149 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR @@ -3656,7 +3656,7 @@ break; case 69: -#line 1153 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1153 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR @@ -3664,7 +3664,7 @@ break; case 73: -#line 1161 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1161 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR @@ -3672,7 +3672,7 @@ break; case 74: -#line 1166 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1166 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR @@ -3680,157 +3680,157 @@ break; case 75: -#line 1172 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1172 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 76: -#line 1173 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1173 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 77: -#line 1174 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1174 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 78: -#line 1175 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1175 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; case 79: -#line 1176 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1176 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 80: -#line 1177 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1177 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::CommonLinkage; ;} break; case 81: -#line 1181 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1181 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 82: -#line 1182 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1182 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 83: -#line 1183 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1183 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 84: -#line 1187 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1187 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; case 85: -#line 1188 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1188 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; case 86: -#line 1189 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1189 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::HiddenVisibility; ;} break; case 87: -#line 1190 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1190 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::ProtectedVisibility; ;} break; case 88: -#line 1194 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1194 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 89: -#line 1195 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1195 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 90: -#line 1196 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1196 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 91: -#line 1200 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1200 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 92: -#line 1201 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1201 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 93: -#line 1202 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1202 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 94: -#line 1203 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1203 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 95: -#line 1204 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1204 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 96: -#line 1208 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1208 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 97: -#line 1209 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1209 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 98: -#line 1210 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1210 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 99: -#line 1213 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1213 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; case 100: -#line 1214 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1214 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; case 101: -#line 1215 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1215 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Fast; ;} break; case 102: -#line 1216 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1216 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Cold; ;} break; case 103: -#line 1217 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1217 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_StdCall; ;} break; case 104: -#line 1218 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1218 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_FastCall; ;} break; case 105: -#line 1219 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1219 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val)) GEN_ERROR("Calling conv too large"); @@ -3840,129 +3840,129 @@ break; case 106: -#line 1226 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1226 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ZExt; ;} break; case 107: -#line 1227 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1227 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ZExt; ;} break; case 108: -#line 1228 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1228 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::SExt; ;} break; case 109: -#line 1229 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1229 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::SExt; ;} break; case 110: -#line 1230 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1230 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::InReg; ;} break; case 111: -#line 1231 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1231 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::StructRet; ;} break; case 112: -#line 1232 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1232 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::NoAlias; ;} break; case 113: -#line 1233 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1233 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ByVal; ;} break; case 114: -#line 1234 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1234 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::Nest; ;} break; case 115: -#line 1235 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1235 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::constructAlignmentFromInt((yyvsp[(2) - (2)].UInt64Val)); ;} break; case 116: -#line 1239 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1239 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::None; ;} break; case 117: -#line 1240 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1240 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = (yyvsp[(1) - (2)].ParamAttrs) | (yyvsp[(2) - (2)].ParamAttrs); ;} break; case 118: -#line 1245 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1245 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::NoReturn; ;} break; case 119: -#line 1246 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1246 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::NoUnwind; ;} break; case 120: -#line 1247 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1247 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ZExt; ;} break; case 121: -#line 1248 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1248 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::SExt; ;} break; case 122: -#line 1249 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1249 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ReadNone; ;} break; case 123: -#line 1250 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1250 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ReadOnly; ;} break; case 124: -#line 1253 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1253 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::None; ;} break; case 125: -#line 1254 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1254 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = (yyvsp[(1) - (2)].ParamAttrs) | (yyvsp[(2) - (2)].ParamAttrs); ;} break; case 126: -#line 1259 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1259 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 127: -#line 1260 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1260 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(2) - (2)].StrVal); ;} break; case 128: -#line 1267 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1267 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; case 129: -#line 1268 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1268 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(2) - (2)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -3972,12 +3972,12 @@ break; case 130: -#line 1274 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1274 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; case 131: -#line 1275 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1275 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(3) - (3)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -3987,7 +3987,7 @@ break; case 132: -#line 1284 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1284 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { for (unsigned i = 0, e = (yyvsp[(2) - (2)].StrVal)->length(); i != e; ++i) if ((*(yyvsp[(2) - (2)].StrVal))[i] == '"' || (*(yyvsp[(2) - (2)].StrVal))[i] == '\\') @@ -3998,27 +3998,27 @@ break; case 133: -#line 1292 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1292 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 134: -#line 1293 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1293 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (1)].StrVal); ;} break; case 135: -#line 1298 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1298 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; case 136: -#line 1299 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1299 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; case 137: -#line 1300 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1300 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV->setSection(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -4027,7 +4027,7 @@ break; case 138: -#line 1305 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1305 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(2) - (2)].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[(2) - (2)].UInt64Val))) GEN_ERROR("Alignment must be a power of two"); @@ -4037,7 +4037,7 @@ break; case 146: -#line 1321 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1321 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(OpaqueType::get()); CHECK_FOR_ERROR @@ -4045,7 +4045,7 @@ break; case 147: -#line 1325 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1325 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[(1) - (1)].PrimType)); CHECK_FOR_ERROR @@ -4053,7 +4053,7 @@ break; case 148: -#line 1329 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1329 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Pointer type? if (*(yyvsp[(1) - (3)].TypeVal) == Type::LabelTy) GEN_ERROR("Cannot form a pointer to a basic block"); @@ -4064,7 +4064,7 @@ break; case 149: -#line 1336 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1336 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... const Type* tmp = getTypeVal((yyvsp[(1) - (1)].ValIDVal)); CHECK_FOR_ERROR @@ -4073,7 +4073,7 @@ break; case 150: -#line 1341 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1341 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if ((yyvsp[(2) - (2)].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -4085,7 +4085,7 @@ break; case 151: -#line 1349 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1349 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4118,7 +4118,7 @@ break; case 152: -#line 1378 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1378 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4146,7 +4146,7 @@ break; case 153: -#line 1403 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1403 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Sized array type? (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[(4) - (5)].TypeVal), (unsigned)(yyvsp[(2) - (5)].UInt64Val)))); delete (yyvsp[(4) - (5)].TypeVal); @@ -4155,7 +4155,7 @@ break; case 154: -#line 1408 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1408 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Vector type? const llvm::Type* ElemTy = (yyvsp[(4) - (5)].TypeVal)->get(); if ((unsigned)(yyvsp[(2) - (5)].UInt64Val) != (yyvsp[(2) - (5)].UInt64Val)) @@ -4169,7 +4169,7 @@ break; case 155: -#line 1418 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1418 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = (yyvsp[(2) - (3)].TypeList)->begin(), @@ -4183,7 +4183,7 @@ break; case 156: -#line 1428 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1428 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector())); CHECK_FOR_ERROR @@ -4191,7 +4191,7 @@ break; case 157: -#line 1432 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1432 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements; for (std::list::iterator I = (yyvsp[(3) - (5)].TypeList)->begin(), @@ -4205,7 +4205,7 @@ break; case 158: -#line 1442 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1442 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector(), true)); CHECK_FOR_ERROR @@ -4213,7 +4213,7 @@ break; case 159: -#line 1449 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1449 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4223,7 +4223,7 @@ break; case 160: -#line 1458 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1458 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (1)].TypeVal))->getDescription()); @@ -4234,14 +4234,14 @@ break; case 161: -#line 1465 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1465 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(Type::VoidTy); ;} break; case 162: -#line 1470 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1470 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); (yyval.TypeWithAttrsList)->push_back((yyvsp[(1) - (1)].TypeWithAttrs)); @@ -4250,7 +4250,7 @@ break; case 163: -#line 1475 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1475 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList))->push_back((yyvsp[(3) - (3)].TypeWithAttrs)); CHECK_FOR_ERROR @@ -4258,7 +4258,7 @@ break; case 165: -#line 1483 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1483 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList); TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None; @@ -4269,7 +4269,7 @@ break; case 166: -#line 1490 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1490 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList; TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None; @@ -4280,7 +4280,7 @@ break; case 167: -#line 1497 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1497 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); CHECK_FOR_ERROR @@ -4288,7 +4288,7 @@ break; case 168: -#line 1505 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1505 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); (yyval.TypeList)->push_back(*(yyvsp[(1) - (1)].TypeVal)); @@ -4298,7 +4298,7 @@ break; case 169: -#line 1511 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1511 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[(1) - (3)].TypeList))->push_back(*(yyvsp[(3) - (3)].TypeVal)); delete (yyvsp[(3) - (3)].TypeVal); @@ -4307,7 +4307,7 @@ break; case 170: -#line 1523 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1523 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4339,7 +4339,7 @@ break; case 171: -#line 1551 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1551 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4359,7 +4359,7 @@ break; case 172: -#line 1567 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1567 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4390,7 +4390,7 @@ break; case 173: -#line 1594 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1594 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4422,7 +4422,7 @@ break; case 174: -#line 1622 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1622 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (4)].TypeVal)->get()); if (STy == 0) @@ -4452,7 +4452,7 @@ break; case 175: -#line 1648 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1648 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4476,7 +4476,7 @@ break; case 176: -#line 1668 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1668 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (6)].TypeVal)->get()); if (STy == 0) @@ -4506,7 +4506,7 @@ break; case 177: -#line 1694 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1694 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (5)].TypeVal))->getDescription()); @@ -4530,7 +4530,7 @@ break; case 178: -#line 1714 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1714 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4546,7 +4546,7 @@ break; case 179: -#line 1726 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1726 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4557,7 +4557,7 @@ break; case 180: -#line 1733 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1733 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4627,7 +4627,7 @@ break; case 181: -#line 1799 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1799 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4641,7 +4641,7 @@ break; case 182: -#line 1809 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1809 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4655,7 +4655,7 @@ break; case 183: -#line 1819 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1819 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].SInt64Val))) GEN_ERROR("Constant value doesn't fit in type"); @@ -4665,7 +4665,7 @@ break; case 184: -#line 1825 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1825 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth(); if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) { @@ -4679,7 +4679,7 @@ break; case 185: -#line 1835 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1835 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].UInt64Val))) GEN_ERROR("Constant value doesn't fit in type"); @@ -4689,7 +4689,7 @@ break; case 186: -#line 1841 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1841 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth(); if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) { @@ -4703,7 +4703,7 @@ break; case 187: -#line 1851 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1851 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants assert(cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() == 1 && "Not Bool?"); (yyval.ConstVal) = ConstantInt::getTrue(); @@ -4712,7 +4712,7 @@ break; case 188: -#line 1856 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1856 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants assert(cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() == 1 && "Not Bool?"); (yyval.ConstVal) = ConstantInt::getFalse(); @@ -4721,7 +4721,7 @@ break; case 189: -#line 1861 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1861 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Floating point constants if (!ConstantFP::isValueValidForType((yyvsp[(1) - (2)].PrimType), *(yyvsp[(2) - (2)].FPVal))) GEN_ERROR("Floating point constant invalid for type"); @@ -4736,7 +4736,7 @@ break; case 190: -#line 1874 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1874 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (6)].TypeVal))->getDescription()); @@ -4752,7 +4752,7 @@ break; case 191: -#line 1886 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1886 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (5)].ConstVal)->getType())) GEN_ERROR("GetElementPtr requires a pointer operand"); @@ -4777,7 +4777,7 @@ break; case 192: -#line 1907 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1907 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (8)].ConstVal)->getType() != Type::Int1Ty) GEN_ERROR("Select condition must be of boolean type"); @@ -4789,7 +4789,7 @@ break; case 193: -#line 1915 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1915 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Binary operator types must match"); @@ -4799,7 +4799,7 @@ break; case 194: -#line 1921 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1921 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Logical operator types must match"); @@ -4814,7 +4814,7 @@ break; case 195: -#line 1932 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1932 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("icmp operand types must match"); @@ -4823,7 +4823,7 @@ break; case 196: -#line 1937 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1937 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("fcmp operand types must match"); @@ -4832,7 +4832,7 @@ break; case 197: -#line 1942 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1942 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vicmp operand types must match"); @@ -4841,7 +4841,7 @@ break; case 198: -#line 1947 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1947 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vfcmp operand types must match"); @@ -4850,7 +4850,7 @@ break; case 199: -#line 1952 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1952 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(3) - (6)].ConstVal), (yyvsp[(5) - (6)].ConstVal))) GEN_ERROR("Invalid extractelement operands"); @@ -4860,7 +4860,7 @@ break; case 200: -#line 1958 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1958 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid insertelement operands"); @@ -4870,7 +4870,7 @@ break; case 201: -#line 1964 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1964 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -4880,7 +4880,7 @@ break; case 202: -#line 1973 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1973 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ConstVector) = (yyvsp[(1) - (3)].ConstVector))->push_back((yyvsp[(3) - (3)].ConstVal)); CHECK_FOR_ERROR @@ -4888,7 +4888,7 @@ break; case 203: -#line 1977 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1977 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector) = new std::vector(); (yyval.ConstVector)->push_back((yyvsp[(1) - (1)].ConstVal)); @@ -4897,27 +4897,27 @@ break; case 204: -#line 1985 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1985 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; case 205: -#line 1985 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1985 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; case 206: -#line 1988 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1988 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; case 207: -#line 1988 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1988 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; case 208: -#line 1991 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1991 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { const Type* VTy = (yyvsp[(1) - (2)].TypeVal)->get(); Value *V = getVal(VTy, (yyvsp[(2) - (2)].ValIDVal)); @@ -4933,7 +4933,7 @@ break; case 209: -#line 2003 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2003 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { Constant *Val = (yyvsp[(3) - (6)].ConstVal); const Type *DestTy = (yyvsp[(5) - (6)].TypeVal)->get(); @@ -4949,7 +4949,7 @@ break; case 210: -#line 2024 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2024 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -4958,7 +4958,7 @@ break; case 211: -#line 2029 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2029 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -4967,12 +4967,12 @@ break; case 214: -#line 2042 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2042 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = false; ;} break; case 215: -#line 2042 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2042 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.FunctionDone(); CHECK_FOR_ERROR @@ -4980,26 +4980,26 @@ break; case 216: -#line 2046 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2046 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ;} break; case 217: -#line 2046 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2046 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 218: -#line 2049 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2049 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 219: -#line 2052 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2052 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (3)].TypeVal))->getDescription()); @@ -5027,7 +5027,7 @@ break; case 220: -#line 2076 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2076 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { ResolveTypeTo((yyvsp[(1) - (3)].StrVal), (yyvsp[(3) - (3)].PrimType)); @@ -5042,7 +5042,7 @@ break; case 221: -#line 2088 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2088 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { /* "Externally Visible" Linkage */ if ((yyvsp[(5) - (6)].ConstVal) == 0) @@ -5054,14 +5054,14 @@ break; case 222: -#line 2095 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2095 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; case 223: -#line 2099 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2099 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(6) - (7)].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant"); @@ -5071,14 +5071,14 @@ break; case 224: -#line 2104 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2104 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; case 225: -#line 2108 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2108 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(6) - (7)].TypeVal))->getDescription()); @@ -5089,7 +5089,7 @@ break; case 226: -#line 2114 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2114 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR @@ -5097,7 +5097,7 @@ break; case 227: -#line 2118 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2118 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { std::string Name; if ((yyvsp[(1) - (5)].StrVal)) { @@ -5141,21 +5141,21 @@ break; case 228: -#line 2158 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2158 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 229: -#line 2161 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2161 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 230: -#line 2167 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2167 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); if (AsmSoFar.empty()) @@ -5168,7 +5168,7 @@ break; case 231: -#line 2177 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2177 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5176,7 +5176,7 @@ break; case 232: -#line 2181 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2181 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setDataLayout(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5184,7 +5184,7 @@ break; case 234: -#line 2188 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2188 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5193,7 +5193,7 @@ break; case 235: -#line 2193 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2193 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5202,14 +5202,14 @@ break; case 236: -#line 2198 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2198 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 237: -#line 2207 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2207 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -5223,7 +5223,7 @@ break; case 238: -#line 2217 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2217 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -5237,7 +5237,7 @@ break; case 239: -#line 2228 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2228 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (1)].ArgList); CHECK_FOR_ERROR @@ -5245,7 +5245,7 @@ break; case 240: -#line 2232 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2232 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (3)].ArgList); struct ArgListEntry E; @@ -5258,7 +5258,7 @@ break; case 241: -#line 2241 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2241 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = new ArgListType; struct ArgListEntry E; @@ -5271,7 +5271,7 @@ break; case 242: -#line 2250 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2250 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = 0; CHECK_FOR_ERROR @@ -5279,7 +5279,7 @@ break; case 243: -#line 2256 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2256 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { std::string FunctionName(*(yyvsp[(3) - (10)].StrVal)); delete (yyvsp[(3) - (10)].StrVal); // Free strdup'd memory! @@ -5410,7 +5410,7 @@ break; case 246: -#line 2386 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2386 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -5422,7 +5422,7 @@ break; case 249: -#line 2397 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2397 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR @@ -5430,7 +5430,7 @@ break; case 250: -#line 2402 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2402 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.CurrentFunction->setLinkage((yyvsp[(1) - (3)].Linkage)); CurFun.CurrentFunction->setVisibility((yyvsp[(2) - (3)].Visibility)); @@ -5441,7 +5441,7 @@ break; case 251: -#line 2414 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2414 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -5449,7 +5449,7 @@ break; case 252: -#line 2418 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2418 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -5457,7 +5457,7 @@ break; case 253: -#line 2423 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2423 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].SInt64Val)); CHECK_FOR_ERROR @@ -5465,7 +5465,7 @@ break; case 254: -#line 2427 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2427 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].UInt64Val)); CHECK_FOR_ERROR @@ -5473,7 +5473,7 @@ break; case 255: -#line 2431 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2431 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].FPVal)); CHECK_FOR_ERROR @@ -5481,7 +5481,7 @@ break; case 256: -#line 2435 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2435 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getTrue()); CHECK_FOR_ERROR @@ -5489,7 +5489,7 @@ break; case 257: -#line 2439 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2439 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getFalse()); CHECK_FOR_ERROR @@ -5497,7 +5497,7 @@ break; case 258: -#line 2443 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2443 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createNull(); CHECK_FOR_ERROR @@ -5505,7 +5505,7 @@ break; case 259: -#line 2447 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2447 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createUndef(); CHECK_FOR_ERROR @@ -5513,7 +5513,7 @@ break; case 260: -#line 2451 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2451 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // A vector zero constant. (yyval.ValIDVal) = ValID::createZeroInit(); CHECK_FOR_ERROR @@ -5521,7 +5521,7 @@ break; case 261: -#line 2455 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2455 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType(); int NumElements = (yyvsp[(2) - (3)].ConstVector)->size(); @@ -5550,7 +5550,7 @@ break; case 262: -#line 2480 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2480 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].ConstVal)); CHECK_FOR_ERROR @@ -5558,7 +5558,7 @@ break; case 263: -#line 2484 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2484 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createInlineAsm(*(yyvsp[(3) - (5)].StrVal), *(yyvsp[(5) - (5)].StrVal), (yyvsp[(2) - (5)].BoolVal)); delete (yyvsp[(3) - (5)].StrVal); @@ -5568,7 +5568,7 @@ break; case 264: -#line 2494 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2494 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? (yyval.ValIDVal) = ValID::createLocalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR @@ -5576,7 +5576,7 @@ break; case 265: -#line 2498 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2498 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createGlobalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR @@ -5584,7 +5584,7 @@ break; case 266: -#line 2502 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2502 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5593,7 +5593,7 @@ break; case 267: -#line 2507 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2507 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createGlobalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5602,7 +5602,7 @@ break; case 270: -#line 2520 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2520 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -5613,7 +5613,7 @@ break; case 271: -#line 2529 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2529 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); (yyval.ValueList)->push_back((yyvsp[(1) - (1)].ValueVal)); @@ -5622,7 +5622,7 @@ break; case 272: -#line 2534 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2534 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ValueList)=(yyvsp[(1) - (3)].ValueList))->push_back((yyvsp[(3) - (3)].ValueVal)); CHECK_FOR_ERROR @@ -5630,7 +5630,7 @@ break; case 273: -#line 2539 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2539 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR @@ -5638,7 +5638,7 @@ break; case 274: -#line 2543 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2543 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR @@ -5646,7 +5646,7 @@ break; case 275: -#line 2552 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2552 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { setValueName((yyvsp[(3) - (3)].TermInstVal), (yyvsp[(2) - (3)].StrVal)); CHECK_FOR_ERROR @@ -5658,7 +5658,7 @@ break; case 276: -#line 2561 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2561 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (CastInst *CI1 = dyn_cast((yyvsp[(2) - (2)].InstVal))) if (CastInst *CI2 = dyn_cast(CI1->getOperand(0))) @@ -5671,7 +5671,7 @@ break; case 277: -#line 2570 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2570 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty space between instruction lists (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalID(CurFun.NextValNum)); CHECK_FOR_ERROR @@ -5679,7 +5679,7 @@ break; case 278: -#line 2574 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2574 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Labelled (named) basic block (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal))); delete (yyvsp[(1) - (1)].StrVal); @@ -5689,7 +5689,7 @@ break; case 279: -#line 2582 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2582 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with a result... ValueList &VL = *(yyvsp[(2) - (2)].ValueList); assert(!VL.empty() && "Invalid ret operands!"); @@ -5700,7 +5700,7 @@ break; case 280: -#line 2589 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2589 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with no result... (yyval.TermInstVal) = ReturnInst::Create(); CHECK_FOR_ERROR @@ -5708,7 +5708,7 @@ break; case 281: -#line 2593 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2593 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[(3) - (3)].ValIDVal)); CHECK_FOR_ERROR @@ -5717,7 +5717,7 @@ break; case 282: -#line 2598 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2598 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { assert(cast((yyvsp[(2) - (9)].PrimType))->getBitWidth() == 1 && "Not Bool?"); BasicBlock* tmpBBA = getBBVal((yyvsp[(6) - (9)].ValIDVal)); @@ -5731,7 +5731,7 @@ break; case 283: -#line 2608 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2608 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (9)].PrimType), (yyvsp[(3) - (9)].ValIDVal)); CHECK_FOR_ERROR @@ -5754,7 +5754,7 @@ break; case 284: -#line 2627 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2627 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (8)].PrimType), (yyvsp[(3) - (8)].ValIDVal)); CHECK_FOR_ERROR @@ -5767,7 +5767,7 @@ break; case 285: -#line 2637 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2637 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -5856,7 +5856,7 @@ break; case 286: -#line 2722 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2722 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnwindInst(); CHECK_FOR_ERROR @@ -5864,7 +5864,7 @@ break; case 287: -#line 2726 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2726 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnreachableInst(); CHECK_FOR_ERROR @@ -5872,7 +5872,7 @@ break; case 288: -#line 2733 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2733 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = (yyvsp[(1) - (6)].JumpTable); Constant *V = cast(getExistingVal((yyvsp[(2) - (6)].PrimType), (yyvsp[(3) - (6)].ValIDVal))); @@ -5887,7 +5887,7 @@ break; case 289: -#line 2744 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2744 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = new std::vector >(); Constant *V = cast(getExistingVal((yyvsp[(1) - (5)].PrimType), (yyvsp[(2) - (5)].ValIDVal))); @@ -5903,7 +5903,7 @@ break; case 290: -#line 2757 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2757 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName((yyvsp[(2) - (2)].InstVal), (yyvsp[(1) - (2)].StrVal)); @@ -5915,7 +5915,7 @@ break; case 291: -#line 2767 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2767 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (6)].TypeVal))->getDescription()); @@ -5930,7 +5930,7 @@ break; case 292: -#line 2778 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2778 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.PHIList) = (yyvsp[(1) - (7)].PHIList); Value* tmpVal = getVal((yyvsp[(1) - (7)].PHIList)->front().first->getType(), (yyvsp[(4) - (7)].ValIDVal)); @@ -5942,7 +5942,7 @@ break; case 293: -#line 2788 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2788 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -5957,7 +5957,7 @@ break; case 294: -#line 2799 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2799 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0 // Labels are only valid in ASMs @@ -5969,7 +5969,7 @@ break; case 295: -#line 2807 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2807 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -5983,7 +5983,7 @@ break; case 296: -#line 2817 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2817 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0 (yyval.ParamList) = (yyvsp[(1) - (6)].ParamList); @@ -5994,17 +5994,17 @@ break; case 297: -#line 2824 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2824 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamList) = new ParamList(); ;} break; case 298: -#line 2827 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2827 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); ;} break; case 299: -#line 2828 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2828 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[(1) - (3)].ValueList); (yyval.ValueList)->push_back((yyvsp[(3) - (3)].ValueVal)); @@ -6013,7 +6013,7 @@ break; case 300: -#line 2835 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2835 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -6021,7 +6021,7 @@ break; case 301: -#line 2839 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2839 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -6029,7 +6029,7 @@ break; case 302: -#line 2844 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2844 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6041,7 +6041,7 @@ CHECK_FOR_ERROR Value* val2 = getVal(*(yyvsp[(2) - (5)].TypeVal), (yyvsp[(5) - (5)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::create((yyvsp[(1) - (5)].BinaryOpVal), val1, val2); + (yyval.InstVal) = BinaryOperator::Create((yyvsp[(1) - (5)].BinaryOpVal), val1, val2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null"); delete (yyvsp[(2) - (5)].TypeVal); @@ -6049,7 +6049,7 @@ break; case 303: -#line 2860 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2860 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6062,7 +6062,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[(2) - (5)].TypeVal), (yyvsp[(5) - (5)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::create((yyvsp[(1) - (5)].BinaryOpVal), tmpVal1, tmpVal2); + (yyval.InstVal) = BinaryOperator::Create((yyvsp[(1) - (5)].BinaryOpVal), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null"); delete (yyvsp[(2) - (5)].TypeVal); @@ -6070,7 +6070,7 @@ break; case 304: -#line 2877 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2877 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6080,7 +6080,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(6) - (6)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].IPredicate), tmpVal1, tmpVal2); + (yyval.InstVal) = CmpInst::Create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].IPredicate), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("icmp operator returned null"); delete (yyvsp[(3) - (6)].TypeVal); @@ -6088,7 +6088,7 @@ break; case 305: -#line 2891 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2891 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6098,7 +6098,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(6) - (6)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].FPredicate), tmpVal1, tmpVal2); + (yyval.InstVal) = CmpInst::Create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].FPredicate), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("fcmp operator returned null"); delete (yyvsp[(3) - (6)].TypeVal); @@ -6106,7 +6106,7 @@ break; case 306: -#line 2905 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2905 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6116,7 +6116,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(6) - (6)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].IPredicate), tmpVal1, tmpVal2); + (yyval.InstVal) = CmpInst::Create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].IPredicate), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("icmp operator returned null"); delete (yyvsp[(3) - (6)].TypeVal); @@ -6124,7 +6124,7 @@ break; case 307: -#line 2919 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2919 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6134,7 +6134,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(6) - (6)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].FPredicate), tmpVal1, tmpVal2); + (yyval.InstVal) = CmpInst::Create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].FPredicate), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("fcmp operator returned null"); delete (yyvsp[(3) - (6)].TypeVal); @@ -6142,7 +6142,7 @@ break; case 308: -#line 2933 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2933 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6152,13 +6152,13 @@ GEN_ERROR("invalid cast opcode for cast from '" + Val->getType()->getDescription() + "' to '" + DestTy->getDescription() + "'"); - (yyval.InstVal) = CastInst::create((yyvsp[(1) - (4)].CastOpVal), Val, DestTy); + (yyval.InstVal) = CastInst::Create((yyvsp[(1) - (4)].CastOpVal), Val, DestTy); delete (yyvsp[(4) - (4)].TypeVal); ;} break; case 309: -#line 2945 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2945 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(2) - (6)].ValueVal)->getType() != Type::Int1Ty) GEN_ERROR("select condition must be boolean"); @@ -6170,7 +6170,7 @@ break; case 310: -#line 2953 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2953 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6181,7 +6181,7 @@ break; case 311: -#line 2960 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2960 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(2) - (4)].ValueVal), (yyvsp[(4) - (4)].ValueVal))) GEN_ERROR("Invalid extractelement operands"); @@ -6191,7 +6191,7 @@ break; case 312: -#line 2966 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2966 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid insertelement operands"); @@ -6201,7 +6201,7 @@ break; case 313: -#line 2972 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2972 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -6211,7 +6211,7 @@ break; case 314: -#line 2978 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2978 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[(2) - (2)].PHIList)->front().first->getType(); if (!Ty->isFirstClassType()) @@ -6230,7 +6230,7 @@ break; case 315: -#line 2994 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2994 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -6323,7 +6323,7 @@ break; case 316: -#line 3083 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3083 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = (yyvsp[(1) - (1)].InstVal); CHECK_FOR_ERROR @@ -6331,7 +6331,7 @@ break; case 317: -#line 3088 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3088 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -6339,7 +6339,7 @@ break; case 318: -#line 3092 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3092 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -6347,7 +6347,7 @@ break; case 319: -#line 3099 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3099 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6358,7 +6358,7 @@ break; case 320: -#line 3106 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3106 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6370,7 +6370,7 @@ break; case 321: -#line 3114 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3114 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6381,7 +6381,7 @@ break; case 322: -#line 3121 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3121 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6393,7 +6393,7 @@ break; case 323: -#line 3129 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3129 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(2) - (2)].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + @@ -6404,7 +6404,7 @@ break; case 324: -#line 3137 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3137 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -6422,7 +6422,7 @@ break; case 325: -#line 3151 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3151 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (7)].TypeVal))->getDescription()); @@ -6443,7 +6443,7 @@ break; case 326: -#line 3168 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3168 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { Value *TmpVal = getVal((yyvsp[(2) - (5)].TypeVal)->get(), (yyvsp[(3) - (5)].ValIDVal)); if (!GetResultInst::isValidOperands(TmpVal, (yyvsp[(5) - (5)].UInt64Val))) @@ -6455,7 +6455,7 @@ break; case 327: -#line 3176 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3176 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()); @@ -6689,7 +6689,7 @@ } -#line 3193 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3193 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" // common code from the two 'RunVMAsmParser' functions Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs?rev=51238&r1=51237&r2=51238&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs Mon May 19 00:47:10 2008 @@ -350,7 +350,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 949 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 949 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" { llvm::Module *ModuleVal; llvm::Function *FunctionVal; Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs?rev=51238&r1=51237&r2=51238&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Mon May 19 00:47:10 2008 @@ -2852,7 +2852,7 @@ CHECK_FOR_ERROR Value* val2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1, val1, val2); + $$ = BinaryOperator::Create($1, val1, val2); if ($$ == 0) GEN_ERROR("binary operator returned null"); delete $2; @@ -2869,7 +2869,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1, tmpVal1, tmpVal2); + $$ = BinaryOperator::Create($1, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("binary operator returned null"); delete $2; @@ -2883,7 +2883,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$3, $6); CHECK_FOR_ERROR - $$ = CmpInst::create($1, $2, tmpVal1, tmpVal2); + $$ = CmpInst::Create($1, $2, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("icmp operator returned null"); delete $3; @@ -2897,7 +2897,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$3, $6); CHECK_FOR_ERROR - $$ = CmpInst::create($1, $2, tmpVal1, tmpVal2); + $$ = CmpInst::Create($1, $2, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("fcmp operator returned null"); delete $3; @@ -2911,7 +2911,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$3, $6); CHECK_FOR_ERROR - $$ = CmpInst::create($1, $2, tmpVal1, tmpVal2); + $$ = CmpInst::Create($1, $2, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("icmp operator returned null"); delete $3; @@ -2925,7 +2925,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$3, $6); CHECK_FOR_ERROR - $$ = CmpInst::create($1, $2, tmpVal1, tmpVal2); + $$ = CmpInst::Create($1, $2, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("fcmp operator returned null"); delete $3; @@ -2939,7 +2939,7 @@ GEN_ERROR("invalid cast opcode for cast from '" + Val->getType()->getDescription() + "' to '" + DestTy->getDescription() + "'"); - $$ = CastInst::create($1, Val, DestTy); + $$ = CastInst::Create($1, Val, DestTy); delete $4; } | SELECT ResolvedVal ',' ResolvedVal ',' ResolvedVal { Modified: llvm/trunk/lib/VMCore/Core.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Core.cpp?rev=51238&r1=51237&r2=51238&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Core.cpp (original) +++ llvm/trunk/lib/VMCore/Core.cpp Mon May 19 00:47:10 2008 @@ -90,11 +90,6 @@ return static_cast(unwrap(Ty)->getTypeID()); } -void LLVMRefineAbstractType(LLVMTypeRef AbstractType, LLVMTypeRef ConcreteType){ - DerivedType *Ty = unwrap(AbstractType); - Ty->refineAbstractTypeTo(unwrap(ConcreteType)); -} - /*--.. Operations on integer types .........................................--*/ LLVMTypeRef LLVMInt1Type(void) { return (LLVMTypeRef) Type::Int1Ty; } From gordonhenriksen at mac.com Mon May 19 00:57:12 2008 From: gordonhenriksen at mac.com (Gordon Henriksen) Date: Mon, 19 May 2008 05:57:12 -0000 Subject: [llvm-commits] [llvm] r51239 - in /llvm/trunk/lib/AsmParser: llvmAsmParser.cpp.cvs llvmAsmParser.h.cvs llvmAsmParser.y.cvs Message-ID: <200805190557.m4J5vCUu018389@zion.cs.uiuc.edu> Author: gordon Date: Mon May 19 00:57:12 2008 New Revision: 51239 URL: http://llvm.org/viewvc/llvm-project?rev=51239&view=rev Log: Reverting accidental commit of generated files. Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs?rev=51239&r1=51238&r2=51239&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs Mon May 19 00:57:12 2008 @@ -384,7 +384,7 @@ /* Copy the first part of user declarations. */ -#line 14 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 14 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -1340,7 +1340,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 949 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 949 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -3503,152 +3503,152 @@ switch (yyn) { case 29: -#line 1117 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1117 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_EQ; ;} break; case 30: -#line 1117 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1117 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_NE; ;} break; case 31: -#line 1118 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1118 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLT; ;} break; case 32: -#line 1118 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1118 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGT; ;} break; case 33: -#line 1119 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1119 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLE; ;} break; case 34: -#line 1119 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1119 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGE; ;} break; case 35: -#line 1120 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1120 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULT; ;} break; case 36: -#line 1120 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1120 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGT; ;} break; case 37: -#line 1121 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1121 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULE; ;} break; case 38: -#line 1121 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1121 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGE; ;} break; case 39: -#line 1125 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1125 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OEQ; ;} break; case 40: -#line 1125 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1125 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ONE; ;} break; case 41: -#line 1126 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1126 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLT; ;} break; case 42: -#line 1126 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1126 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGT; ;} break; case 43: -#line 1127 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1127 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLE; ;} break; case 44: -#line 1127 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1127 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGE; ;} break; case 45: -#line 1128 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1128 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ORD; ;} break; case 46: -#line 1128 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1128 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNO; ;} break; case 47: -#line 1129 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1129 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UEQ; ;} break; case 48: -#line 1129 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1129 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNE; ;} break; case 49: -#line 1130 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1130 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULT; ;} break; case 50: -#line 1130 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1130 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGT; ;} break; case 51: -#line 1131 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1131 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULE; ;} break; case 52: -#line 1131 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1131 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGE; ;} break; case 53: -#line 1132 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1132 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_TRUE; ;} break; case 54: -#line 1133 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1133 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;} break; case 65: -#line 1142 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1142 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 66: -#line 1144 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1144 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=(yyvsp[(3) - (4)].UInt64Val); ;} break; case 67: -#line 1145 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1145 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=0; ;} break; case 68: -#line 1149 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1149 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR @@ -3656,7 +3656,7 @@ break; case 69: -#line 1153 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1153 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR @@ -3664,7 +3664,7 @@ break; case 73: -#line 1161 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1161 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR @@ -3672,7 +3672,7 @@ break; case 74: -#line 1166 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1166 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR @@ -3680,157 +3680,157 @@ break; case 75: -#line 1172 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1172 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 76: -#line 1173 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1173 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 77: -#line 1174 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1174 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 78: -#line 1175 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1175 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; case 79: -#line 1176 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1176 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 80: -#line 1177 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1177 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::CommonLinkage; ;} break; case 81: -#line 1181 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1181 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 82: -#line 1182 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1182 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 83: -#line 1183 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1183 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 84: -#line 1187 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1187 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; case 85: -#line 1188 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1188 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; case 86: -#line 1189 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1189 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::HiddenVisibility; ;} break; case 87: -#line 1190 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1190 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::ProtectedVisibility; ;} break; case 88: -#line 1194 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1194 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 89: -#line 1195 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1195 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 90: -#line 1196 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1196 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 91: -#line 1200 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1200 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 92: -#line 1201 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1201 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 93: -#line 1202 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1202 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 94: -#line 1203 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1203 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 95: -#line 1204 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1204 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 96: -#line 1208 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1208 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 97: -#line 1209 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1209 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 98: -#line 1210 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1210 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 99: -#line 1213 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1213 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; case 100: -#line 1214 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1214 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; case 101: -#line 1215 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1215 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Fast; ;} break; case 102: -#line 1216 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1216 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Cold; ;} break; case 103: -#line 1217 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1217 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_StdCall; ;} break; case 104: -#line 1218 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1218 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_FastCall; ;} break; case 105: -#line 1219 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1219 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val)) GEN_ERROR("Calling conv too large"); @@ -3840,129 +3840,129 @@ break; case 106: -#line 1226 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1226 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ZExt; ;} break; case 107: -#line 1227 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1227 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ZExt; ;} break; case 108: -#line 1228 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1228 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::SExt; ;} break; case 109: -#line 1229 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1229 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::SExt; ;} break; case 110: -#line 1230 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1230 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::InReg; ;} break; case 111: -#line 1231 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1231 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::StructRet; ;} break; case 112: -#line 1232 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1232 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::NoAlias; ;} break; case 113: -#line 1233 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1233 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ByVal; ;} break; case 114: -#line 1234 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1234 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::Nest; ;} break; case 115: -#line 1235 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1235 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::constructAlignmentFromInt((yyvsp[(2) - (2)].UInt64Val)); ;} break; case 116: -#line 1239 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1239 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::None; ;} break; case 117: -#line 1240 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1240 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = (yyvsp[(1) - (2)].ParamAttrs) | (yyvsp[(2) - (2)].ParamAttrs); ;} break; case 118: -#line 1245 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1245 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::NoReturn; ;} break; case 119: -#line 1246 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1246 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::NoUnwind; ;} break; case 120: -#line 1247 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1247 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ZExt; ;} break; case 121: -#line 1248 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1248 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::SExt; ;} break; case 122: -#line 1249 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1249 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ReadNone; ;} break; case 123: -#line 1250 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1250 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ReadOnly; ;} break; case 124: -#line 1253 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1253 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::None; ;} break; case 125: -#line 1254 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1254 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = (yyvsp[(1) - (2)].ParamAttrs) | (yyvsp[(2) - (2)].ParamAttrs); ;} break; case 126: -#line 1259 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1259 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 127: -#line 1260 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1260 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(2) - (2)].StrVal); ;} break; case 128: -#line 1267 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1267 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; case 129: -#line 1268 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1268 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(2) - (2)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -3972,12 +3972,12 @@ break; case 130: -#line 1274 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1274 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; case 131: -#line 1275 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1275 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(3) - (3)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -3987,7 +3987,7 @@ break; case 132: -#line 1284 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1284 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { for (unsigned i = 0, e = (yyvsp[(2) - (2)].StrVal)->length(); i != e; ++i) if ((*(yyvsp[(2) - (2)].StrVal))[i] == '"' || (*(yyvsp[(2) - (2)].StrVal))[i] == '\\') @@ -3998,27 +3998,27 @@ break; case 133: -#line 1292 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1292 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 134: -#line 1293 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1293 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (1)].StrVal); ;} break; case 135: -#line 1298 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1298 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; case 136: -#line 1299 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1299 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; case 137: -#line 1300 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1300 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV->setSection(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -4027,7 +4027,7 @@ break; case 138: -#line 1305 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1305 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(2) - (2)].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[(2) - (2)].UInt64Val))) GEN_ERROR("Alignment must be a power of two"); @@ -4037,7 +4037,7 @@ break; case 146: -#line 1321 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1321 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(OpaqueType::get()); CHECK_FOR_ERROR @@ -4045,7 +4045,7 @@ break; case 147: -#line 1325 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1325 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[(1) - (1)].PrimType)); CHECK_FOR_ERROR @@ -4053,7 +4053,7 @@ break; case 148: -#line 1329 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1329 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Pointer type? if (*(yyvsp[(1) - (3)].TypeVal) == Type::LabelTy) GEN_ERROR("Cannot form a pointer to a basic block"); @@ -4064,7 +4064,7 @@ break; case 149: -#line 1336 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1336 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... const Type* tmp = getTypeVal((yyvsp[(1) - (1)].ValIDVal)); CHECK_FOR_ERROR @@ -4073,7 +4073,7 @@ break; case 150: -#line 1341 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1341 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if ((yyvsp[(2) - (2)].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -4085,7 +4085,7 @@ break; case 151: -#line 1349 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1349 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4118,7 +4118,7 @@ break; case 152: -#line 1378 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1378 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4146,7 +4146,7 @@ break; case 153: -#line 1403 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1403 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Sized array type? (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[(4) - (5)].TypeVal), (unsigned)(yyvsp[(2) - (5)].UInt64Val)))); delete (yyvsp[(4) - (5)].TypeVal); @@ -4155,7 +4155,7 @@ break; case 154: -#line 1408 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1408 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Vector type? const llvm::Type* ElemTy = (yyvsp[(4) - (5)].TypeVal)->get(); if ((unsigned)(yyvsp[(2) - (5)].UInt64Val) != (yyvsp[(2) - (5)].UInt64Val)) @@ -4169,7 +4169,7 @@ break; case 155: -#line 1418 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1418 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = (yyvsp[(2) - (3)].TypeList)->begin(), @@ -4183,7 +4183,7 @@ break; case 156: -#line 1428 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1428 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector())); CHECK_FOR_ERROR @@ -4191,7 +4191,7 @@ break; case 157: -#line 1432 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1432 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements; for (std::list::iterator I = (yyvsp[(3) - (5)].TypeList)->begin(), @@ -4205,7 +4205,7 @@ break; case 158: -#line 1442 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1442 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector(), true)); CHECK_FOR_ERROR @@ -4213,7 +4213,7 @@ break; case 159: -#line 1449 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1449 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4223,7 +4223,7 @@ break; case 160: -#line 1458 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1458 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (1)].TypeVal))->getDescription()); @@ -4234,14 +4234,14 @@ break; case 161: -#line 1465 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1465 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(Type::VoidTy); ;} break; case 162: -#line 1470 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1470 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); (yyval.TypeWithAttrsList)->push_back((yyvsp[(1) - (1)].TypeWithAttrs)); @@ -4250,7 +4250,7 @@ break; case 163: -#line 1475 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1475 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList))->push_back((yyvsp[(3) - (3)].TypeWithAttrs)); CHECK_FOR_ERROR @@ -4258,7 +4258,7 @@ break; case 165: -#line 1483 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1483 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList); TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None; @@ -4269,7 +4269,7 @@ break; case 166: -#line 1490 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1490 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList; TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None; @@ -4280,7 +4280,7 @@ break; case 167: -#line 1497 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1497 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); CHECK_FOR_ERROR @@ -4288,7 +4288,7 @@ break; case 168: -#line 1505 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1505 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); (yyval.TypeList)->push_back(*(yyvsp[(1) - (1)].TypeVal)); @@ -4298,7 +4298,7 @@ break; case 169: -#line 1511 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1511 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[(1) - (3)].TypeList))->push_back(*(yyvsp[(3) - (3)].TypeVal)); delete (yyvsp[(3) - (3)].TypeVal); @@ -4307,7 +4307,7 @@ break; case 170: -#line 1523 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1523 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4339,7 +4339,7 @@ break; case 171: -#line 1551 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1551 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4359,7 +4359,7 @@ break; case 172: -#line 1567 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1567 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4390,7 +4390,7 @@ break; case 173: -#line 1594 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1594 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4422,7 +4422,7 @@ break; case 174: -#line 1622 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1622 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (4)].TypeVal)->get()); if (STy == 0) @@ -4452,7 +4452,7 @@ break; case 175: -#line 1648 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1648 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4476,7 +4476,7 @@ break; case 176: -#line 1668 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1668 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (6)].TypeVal)->get()); if (STy == 0) @@ -4506,7 +4506,7 @@ break; case 177: -#line 1694 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1694 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (5)].TypeVal))->getDescription()); @@ -4530,7 +4530,7 @@ break; case 178: -#line 1714 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1714 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4546,7 +4546,7 @@ break; case 179: -#line 1726 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1726 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4557,7 +4557,7 @@ break; case 180: -#line 1733 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1733 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4627,7 +4627,7 @@ break; case 181: -#line 1799 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1799 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4641,7 +4641,7 @@ break; case 182: -#line 1809 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1809 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4655,7 +4655,7 @@ break; case 183: -#line 1819 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1819 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].SInt64Val))) GEN_ERROR("Constant value doesn't fit in type"); @@ -4665,7 +4665,7 @@ break; case 184: -#line 1825 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1825 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth(); if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) { @@ -4679,7 +4679,7 @@ break; case 185: -#line 1835 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1835 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].UInt64Val))) GEN_ERROR("Constant value doesn't fit in type"); @@ -4689,7 +4689,7 @@ break; case 186: -#line 1841 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1841 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth(); if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) { @@ -4703,7 +4703,7 @@ break; case 187: -#line 1851 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1851 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants assert(cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() == 1 && "Not Bool?"); (yyval.ConstVal) = ConstantInt::getTrue(); @@ -4712,7 +4712,7 @@ break; case 188: -#line 1856 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1856 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants assert(cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() == 1 && "Not Bool?"); (yyval.ConstVal) = ConstantInt::getFalse(); @@ -4721,7 +4721,7 @@ break; case 189: -#line 1861 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1861 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Floating point constants if (!ConstantFP::isValueValidForType((yyvsp[(1) - (2)].PrimType), *(yyvsp[(2) - (2)].FPVal))) GEN_ERROR("Floating point constant invalid for type"); @@ -4736,7 +4736,7 @@ break; case 190: -#line 1874 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1874 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (6)].TypeVal))->getDescription()); @@ -4752,7 +4752,7 @@ break; case 191: -#line 1886 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1886 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (5)].ConstVal)->getType())) GEN_ERROR("GetElementPtr requires a pointer operand"); @@ -4777,7 +4777,7 @@ break; case 192: -#line 1907 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1907 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (8)].ConstVal)->getType() != Type::Int1Ty) GEN_ERROR("Select condition must be of boolean type"); @@ -4789,7 +4789,7 @@ break; case 193: -#line 1915 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1915 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Binary operator types must match"); @@ -4799,7 +4799,7 @@ break; case 194: -#line 1921 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1921 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Logical operator types must match"); @@ -4814,7 +4814,7 @@ break; case 195: -#line 1932 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1932 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("icmp operand types must match"); @@ -4823,7 +4823,7 @@ break; case 196: -#line 1937 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1937 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("fcmp operand types must match"); @@ -4832,7 +4832,7 @@ break; case 197: -#line 1942 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1942 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vicmp operand types must match"); @@ -4841,7 +4841,7 @@ break; case 198: -#line 1947 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1947 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vfcmp operand types must match"); @@ -4850,7 +4850,7 @@ break; case 199: -#line 1952 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1952 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(3) - (6)].ConstVal), (yyvsp[(5) - (6)].ConstVal))) GEN_ERROR("Invalid extractelement operands"); @@ -4860,7 +4860,7 @@ break; case 200: -#line 1958 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1958 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid insertelement operands"); @@ -4870,7 +4870,7 @@ break; case 201: -#line 1964 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1964 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -4880,7 +4880,7 @@ break; case 202: -#line 1973 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1973 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ConstVector) = (yyvsp[(1) - (3)].ConstVector))->push_back((yyvsp[(3) - (3)].ConstVal)); CHECK_FOR_ERROR @@ -4888,7 +4888,7 @@ break; case 203: -#line 1977 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1977 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector) = new std::vector(); (yyval.ConstVector)->push_back((yyvsp[(1) - (1)].ConstVal)); @@ -4897,27 +4897,27 @@ break; case 204: -#line 1985 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1985 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; case 205: -#line 1985 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1985 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; case 206: -#line 1988 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1988 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; case 207: -#line 1988 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1988 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; case 208: -#line 1991 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1991 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { const Type* VTy = (yyvsp[(1) - (2)].TypeVal)->get(); Value *V = getVal(VTy, (yyvsp[(2) - (2)].ValIDVal)); @@ -4933,7 +4933,7 @@ break; case 209: -#line 2003 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2003 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { Constant *Val = (yyvsp[(3) - (6)].ConstVal); const Type *DestTy = (yyvsp[(5) - (6)].TypeVal)->get(); @@ -4949,7 +4949,7 @@ break; case 210: -#line 2024 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2024 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -4958,7 +4958,7 @@ break; case 211: -#line 2029 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2029 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -4967,12 +4967,12 @@ break; case 214: -#line 2042 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2042 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = false; ;} break; case 215: -#line 2042 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2042 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.FunctionDone(); CHECK_FOR_ERROR @@ -4980,26 +4980,26 @@ break; case 216: -#line 2046 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2046 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ;} break; case 217: -#line 2046 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2046 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 218: -#line 2049 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2049 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 219: -#line 2052 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2052 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (3)].TypeVal))->getDescription()); @@ -5027,7 +5027,7 @@ break; case 220: -#line 2076 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2076 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { ResolveTypeTo((yyvsp[(1) - (3)].StrVal), (yyvsp[(3) - (3)].PrimType)); @@ -5042,7 +5042,7 @@ break; case 221: -#line 2088 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2088 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { /* "Externally Visible" Linkage */ if ((yyvsp[(5) - (6)].ConstVal) == 0) @@ -5054,14 +5054,14 @@ break; case 222: -#line 2095 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2095 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; case 223: -#line 2099 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2099 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(6) - (7)].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant"); @@ -5071,14 +5071,14 @@ break; case 224: -#line 2104 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2104 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; case 225: -#line 2108 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2108 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(6) - (7)].TypeVal))->getDescription()); @@ -5089,7 +5089,7 @@ break; case 226: -#line 2114 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2114 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR @@ -5097,7 +5097,7 @@ break; case 227: -#line 2118 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2118 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { std::string Name; if ((yyvsp[(1) - (5)].StrVal)) { @@ -5141,21 +5141,21 @@ break; case 228: -#line 2158 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2158 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 229: -#line 2161 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2161 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 230: -#line 2167 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2167 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); if (AsmSoFar.empty()) @@ -5168,7 +5168,7 @@ break; case 231: -#line 2177 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2177 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5176,7 +5176,7 @@ break; case 232: -#line 2181 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2181 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setDataLayout(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5184,7 +5184,7 @@ break; case 234: -#line 2188 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2188 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5193,7 +5193,7 @@ break; case 235: -#line 2193 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2193 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5202,14 +5202,14 @@ break; case 236: -#line 2198 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2198 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; case 237: -#line 2207 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2207 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -5223,7 +5223,7 @@ break; case 238: -#line 2217 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2217 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -5237,7 +5237,7 @@ break; case 239: -#line 2228 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2228 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (1)].ArgList); CHECK_FOR_ERROR @@ -5245,7 +5245,7 @@ break; case 240: -#line 2232 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2232 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (3)].ArgList); struct ArgListEntry E; @@ -5258,7 +5258,7 @@ break; case 241: -#line 2241 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2241 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = new ArgListType; struct ArgListEntry E; @@ -5271,7 +5271,7 @@ break; case 242: -#line 2250 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2250 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = 0; CHECK_FOR_ERROR @@ -5279,7 +5279,7 @@ break; case 243: -#line 2256 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2256 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { std::string FunctionName(*(yyvsp[(3) - (10)].StrVal)); delete (yyvsp[(3) - (10)].StrVal); // Free strdup'd memory! @@ -5410,7 +5410,7 @@ break; case 246: -#line 2386 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2386 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -5422,7 +5422,7 @@ break; case 249: -#line 2397 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2397 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR @@ -5430,7 +5430,7 @@ break; case 250: -#line 2402 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2402 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.CurrentFunction->setLinkage((yyvsp[(1) - (3)].Linkage)); CurFun.CurrentFunction->setVisibility((yyvsp[(2) - (3)].Visibility)); @@ -5441,7 +5441,7 @@ break; case 251: -#line 2414 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2414 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -5449,7 +5449,7 @@ break; case 252: -#line 2418 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2418 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -5457,7 +5457,7 @@ break; case 253: -#line 2423 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2423 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].SInt64Val)); CHECK_FOR_ERROR @@ -5465,7 +5465,7 @@ break; case 254: -#line 2427 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2427 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].UInt64Val)); CHECK_FOR_ERROR @@ -5473,7 +5473,7 @@ break; case 255: -#line 2431 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2431 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].FPVal)); CHECK_FOR_ERROR @@ -5481,7 +5481,7 @@ break; case 256: -#line 2435 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2435 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getTrue()); CHECK_FOR_ERROR @@ -5489,7 +5489,7 @@ break; case 257: -#line 2439 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2439 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getFalse()); CHECK_FOR_ERROR @@ -5497,7 +5497,7 @@ break; case 258: -#line 2443 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2443 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createNull(); CHECK_FOR_ERROR @@ -5505,7 +5505,7 @@ break; case 259: -#line 2447 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2447 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createUndef(); CHECK_FOR_ERROR @@ -5513,7 +5513,7 @@ break; case 260: -#line 2451 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2451 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // A vector zero constant. (yyval.ValIDVal) = ValID::createZeroInit(); CHECK_FOR_ERROR @@ -5521,7 +5521,7 @@ break; case 261: -#line 2455 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2455 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType(); int NumElements = (yyvsp[(2) - (3)].ConstVector)->size(); @@ -5550,7 +5550,7 @@ break; case 262: -#line 2480 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2480 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].ConstVal)); CHECK_FOR_ERROR @@ -5558,7 +5558,7 @@ break; case 263: -#line 2484 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2484 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createInlineAsm(*(yyvsp[(3) - (5)].StrVal), *(yyvsp[(5) - (5)].StrVal), (yyvsp[(2) - (5)].BoolVal)); delete (yyvsp[(3) - (5)].StrVal); @@ -5568,7 +5568,7 @@ break; case 264: -#line 2494 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2494 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? (yyval.ValIDVal) = ValID::createLocalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR @@ -5576,7 +5576,7 @@ break; case 265: -#line 2498 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2498 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createGlobalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR @@ -5584,7 +5584,7 @@ break; case 266: -#line 2502 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2502 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5593,7 +5593,7 @@ break; case 267: -#line 2507 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2507 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createGlobalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5602,7 +5602,7 @@ break; case 270: -#line 2520 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2520 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -5613,7 +5613,7 @@ break; case 271: -#line 2529 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2529 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); (yyval.ValueList)->push_back((yyvsp[(1) - (1)].ValueVal)); @@ -5622,7 +5622,7 @@ break; case 272: -#line 2534 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2534 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ValueList)=(yyvsp[(1) - (3)].ValueList))->push_back((yyvsp[(3) - (3)].ValueVal)); CHECK_FOR_ERROR @@ -5630,7 +5630,7 @@ break; case 273: -#line 2539 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2539 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR @@ -5638,7 +5638,7 @@ break; case 274: -#line 2543 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2543 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR @@ -5646,7 +5646,7 @@ break; case 275: -#line 2552 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2552 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { setValueName((yyvsp[(3) - (3)].TermInstVal), (yyvsp[(2) - (3)].StrVal)); CHECK_FOR_ERROR @@ -5658,7 +5658,7 @@ break; case 276: -#line 2561 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2561 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (CastInst *CI1 = dyn_cast((yyvsp[(2) - (2)].InstVal))) if (CastInst *CI2 = dyn_cast(CI1->getOperand(0))) @@ -5671,7 +5671,7 @@ break; case 277: -#line 2570 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2570 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty space between instruction lists (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalID(CurFun.NextValNum)); CHECK_FOR_ERROR @@ -5679,7 +5679,7 @@ break; case 278: -#line 2574 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2574 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Labelled (named) basic block (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal))); delete (yyvsp[(1) - (1)].StrVal); @@ -5689,7 +5689,7 @@ break; case 279: -#line 2582 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2582 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with a result... ValueList &VL = *(yyvsp[(2) - (2)].ValueList); assert(!VL.empty() && "Invalid ret operands!"); @@ -5700,7 +5700,7 @@ break; case 280: -#line 2589 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2589 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with no result... (yyval.TermInstVal) = ReturnInst::Create(); CHECK_FOR_ERROR @@ -5708,7 +5708,7 @@ break; case 281: -#line 2593 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2593 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[(3) - (3)].ValIDVal)); CHECK_FOR_ERROR @@ -5717,7 +5717,7 @@ break; case 282: -#line 2598 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2598 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { assert(cast((yyvsp[(2) - (9)].PrimType))->getBitWidth() == 1 && "Not Bool?"); BasicBlock* tmpBBA = getBBVal((yyvsp[(6) - (9)].ValIDVal)); @@ -5731,7 +5731,7 @@ break; case 283: -#line 2608 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2608 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (9)].PrimType), (yyvsp[(3) - (9)].ValIDVal)); CHECK_FOR_ERROR @@ -5754,7 +5754,7 @@ break; case 284: -#line 2627 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2627 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (8)].PrimType), (yyvsp[(3) - (8)].ValIDVal)); CHECK_FOR_ERROR @@ -5767,7 +5767,7 @@ break; case 285: -#line 2637 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2637 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -5856,7 +5856,7 @@ break; case 286: -#line 2722 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2722 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnwindInst(); CHECK_FOR_ERROR @@ -5864,7 +5864,7 @@ break; case 287: -#line 2726 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2726 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnreachableInst(); CHECK_FOR_ERROR @@ -5872,7 +5872,7 @@ break; case 288: -#line 2733 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2733 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = (yyvsp[(1) - (6)].JumpTable); Constant *V = cast(getExistingVal((yyvsp[(2) - (6)].PrimType), (yyvsp[(3) - (6)].ValIDVal))); @@ -5887,7 +5887,7 @@ break; case 289: -#line 2744 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2744 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = new std::vector >(); Constant *V = cast(getExistingVal((yyvsp[(1) - (5)].PrimType), (yyvsp[(2) - (5)].ValIDVal))); @@ -5903,7 +5903,7 @@ break; case 290: -#line 2757 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2757 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName((yyvsp[(2) - (2)].InstVal), (yyvsp[(1) - (2)].StrVal)); @@ -5915,7 +5915,7 @@ break; case 291: -#line 2767 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2767 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (6)].TypeVal))->getDescription()); @@ -5930,7 +5930,7 @@ break; case 292: -#line 2778 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2778 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.PHIList) = (yyvsp[(1) - (7)].PHIList); Value* tmpVal = getVal((yyvsp[(1) - (7)].PHIList)->front().first->getType(), (yyvsp[(4) - (7)].ValIDVal)); @@ -5942,7 +5942,7 @@ break; case 293: -#line 2788 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2788 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -5957,7 +5957,7 @@ break; case 294: -#line 2799 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2799 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0 // Labels are only valid in ASMs @@ -5969,7 +5969,7 @@ break; case 295: -#line 2807 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2807 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -5983,7 +5983,7 @@ break; case 296: -#line 2817 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2817 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0 (yyval.ParamList) = (yyvsp[(1) - (6)].ParamList); @@ -5994,17 +5994,17 @@ break; case 297: -#line 2824 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2824 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamList) = new ParamList(); ;} break; case 298: -#line 2827 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2827 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); ;} break; case 299: -#line 2828 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2828 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[(1) - (3)].ValueList); (yyval.ValueList)->push_back((yyvsp[(3) - (3)].ValueVal)); @@ -6013,7 +6013,7 @@ break; case 300: -#line 2835 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2835 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -6021,7 +6021,7 @@ break; case 301: -#line 2839 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2839 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -6029,7 +6029,7 @@ break; case 302: -#line 2844 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2844 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6041,7 +6041,7 @@ CHECK_FOR_ERROR Value* val2 = getVal(*(yyvsp[(2) - (5)].TypeVal), (yyvsp[(5) - (5)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::Create((yyvsp[(1) - (5)].BinaryOpVal), val1, val2); + (yyval.InstVal) = BinaryOperator::create((yyvsp[(1) - (5)].BinaryOpVal), val1, val2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null"); delete (yyvsp[(2) - (5)].TypeVal); @@ -6049,7 +6049,7 @@ break; case 303: -#line 2860 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2860 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6062,7 +6062,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[(2) - (5)].TypeVal), (yyvsp[(5) - (5)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::Create((yyvsp[(1) - (5)].BinaryOpVal), tmpVal1, tmpVal2); + (yyval.InstVal) = BinaryOperator::create((yyvsp[(1) - (5)].BinaryOpVal), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null"); delete (yyvsp[(2) - (5)].TypeVal); @@ -6070,7 +6070,7 @@ break; case 304: -#line 2877 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2877 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6080,7 +6080,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(6) - (6)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::Create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].IPredicate), tmpVal1, tmpVal2); + (yyval.InstVal) = CmpInst::create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].IPredicate), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("icmp operator returned null"); delete (yyvsp[(3) - (6)].TypeVal); @@ -6088,7 +6088,7 @@ break; case 305: -#line 2891 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2891 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6098,7 +6098,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(6) - (6)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::Create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].FPredicate), tmpVal1, tmpVal2); + (yyval.InstVal) = CmpInst::create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].FPredicate), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("fcmp operator returned null"); delete (yyvsp[(3) - (6)].TypeVal); @@ -6106,7 +6106,7 @@ break; case 306: -#line 2905 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2905 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6116,7 +6116,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(6) - (6)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::Create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].IPredicate), tmpVal1, tmpVal2); + (yyval.InstVal) = CmpInst::create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].IPredicate), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("icmp operator returned null"); delete (yyvsp[(3) - (6)].TypeVal); @@ -6124,7 +6124,7 @@ break; case 307: -#line 2919 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2919 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6134,7 +6134,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(6) - (6)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::Create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].FPredicate), tmpVal1, tmpVal2); + (yyval.InstVal) = CmpInst::create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].FPredicate), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("fcmp operator returned null"); delete (yyvsp[(3) - (6)].TypeVal); @@ -6142,7 +6142,7 @@ break; case 308: -#line 2933 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2933 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6152,13 +6152,13 @@ GEN_ERROR("invalid cast opcode for cast from '" + Val->getType()->getDescription() + "' to '" + DestTy->getDescription() + "'"); - (yyval.InstVal) = CastInst::Create((yyvsp[(1) - (4)].CastOpVal), Val, DestTy); + (yyval.InstVal) = CastInst::create((yyvsp[(1) - (4)].CastOpVal), Val, DestTy); delete (yyvsp[(4) - (4)].TypeVal); ;} break; case 309: -#line 2945 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2945 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(2) - (6)].ValueVal)->getType() != Type::Int1Ty) GEN_ERROR("select condition must be boolean"); @@ -6170,7 +6170,7 @@ break; case 310: -#line 2953 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2953 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6181,7 +6181,7 @@ break; case 311: -#line 2960 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2960 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(2) - (4)].ValueVal), (yyvsp[(4) - (4)].ValueVal))) GEN_ERROR("Invalid extractelement operands"); @@ -6191,7 +6191,7 @@ break; case 312: -#line 2966 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2966 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid insertelement operands"); @@ -6201,7 +6201,7 @@ break; case 313: -#line 2972 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2972 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -6211,7 +6211,7 @@ break; case 314: -#line 2978 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2978 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[(2) - (2)].PHIList)->front().first->getType(); if (!Ty->isFirstClassType()) @@ -6230,7 +6230,7 @@ break; case 315: -#line 2994 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 2994 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -6323,7 +6323,7 @@ break; case 316: -#line 3083 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3083 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = (yyvsp[(1) - (1)].InstVal); CHECK_FOR_ERROR @@ -6331,7 +6331,7 @@ break; case 317: -#line 3088 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3088 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR @@ -6339,7 +6339,7 @@ break; case 318: -#line 3092 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3092 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR @@ -6347,7 +6347,7 @@ break; case 319: -#line 3099 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3099 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6358,7 +6358,7 @@ break; case 320: -#line 3106 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3106 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6370,7 +6370,7 @@ break; case 321: -#line 3114 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3114 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6381,7 +6381,7 @@ break; case 322: -#line 3121 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3121 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6393,7 +6393,7 @@ break; case 323: -#line 3129 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3129 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(2) - (2)].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + @@ -6404,7 +6404,7 @@ break; case 324: -#line 3137 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3137 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -6422,7 +6422,7 @@ break; case 325: -#line 3151 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3151 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (7)].TypeVal))->getDescription()); @@ -6443,7 +6443,7 @@ break; case 326: -#line 3168 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3168 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { Value *TmpVal = getVal((yyvsp[(2) - (5)].TypeVal)->get(), (yyvsp[(3) - (5)].ValIDVal)); if (!GetResultInst::isValidOperands(TmpVal, (yyvsp[(5) - (5)].UInt64Val))) @@ -6455,7 +6455,7 @@ break; case 327: -#line 3176 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3176 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()); @@ -6689,7 +6689,7 @@ } -#line 3193 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3193 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" // common code from the two 'RunVMAsmParser' functions Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs?rev=51239&r1=51238&r2=51239&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs Mon May 19 00:57:12 2008 @@ -350,7 +350,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 949 "/Users/malichus/Source/LLVM/src/svn/llvm/lib/AsmParser/llvmAsmParser.y" +#line 949 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { llvm::Module *ModuleVal; llvm::Function *FunctionVal; Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs?rev=51239&r1=51238&r2=51239&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Mon May 19 00:57:12 2008 @@ -2852,7 +2852,7 @@ CHECK_FOR_ERROR Value* val2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::Create($1, val1, val2); + $$ = BinaryOperator::create($1, val1, val2); if ($$ == 0) GEN_ERROR("binary operator returned null"); delete $2; @@ -2869,7 +2869,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::Create($1, tmpVal1, tmpVal2); + $$ = BinaryOperator::create($1, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("binary operator returned null"); delete $2; @@ -2883,7 +2883,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$3, $6); CHECK_FOR_ERROR - $$ = CmpInst::Create($1, $2, tmpVal1, tmpVal2); + $$ = CmpInst::create($1, $2, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("icmp operator returned null"); delete $3; @@ -2897,7 +2897,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$3, $6); CHECK_FOR_ERROR - $$ = CmpInst::Create($1, $2, tmpVal1, tmpVal2); + $$ = CmpInst::create($1, $2, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("fcmp operator returned null"); delete $3; @@ -2911,7 +2911,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$3, $6); CHECK_FOR_ERROR - $$ = CmpInst::Create($1, $2, tmpVal1, tmpVal2); + $$ = CmpInst::create($1, $2, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("icmp operator returned null"); delete $3; @@ -2925,7 +2925,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$3, $6); CHECK_FOR_ERROR - $$ = CmpInst::Create($1, $2, tmpVal1, tmpVal2); + $$ = CmpInst::create($1, $2, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("fcmp operator returned null"); delete $3; @@ -2939,7 +2939,7 @@ GEN_ERROR("invalid cast opcode for cast from '" + Val->getType()->getDescription() + "' to '" + DestTy->getDescription() + "'"); - $$ = CastInst::Create($1, Val, DestTy); + $$ = CastInst::create($1, Val, DestTy); delete $4; } | SELECT ResolvedVal ',' ResolvedVal ',' ResolvedVal { From romix.llvm at googlemail.com Mon May 19 03:34:13 2008 From: romix.llvm at googlemail.com (Roman Levenstein) Date: Mon, 19 May 2008 10:34:13 +0200 Subject: [llvm-commits] Speeding up RegAllocLinearScan on big test-cases In-Reply-To: <4DFD57BC-7873-4326-B028-AB0AD9D6B323@apple.com> References: <149F341F-BD78-4D7D-86D9-9A8B63015DA5@apple.com> <64355EDB-A34D-4A65-BB1E-F0246B886C94@apple.com> <16e5fdf90805061553u6b25f716wb4476068a18b88b2@mail.gmail.com> <4933F9BB-8DED-43F1-BDAE-4F59D23E9CA3@apple.com> <4DFD57BC-7873-4326-B028-AB0AD9D6B323@apple.com> Message-ID: Hi, 2008/5/18 Chris Lattner : > > > > On May 16, 2008, at 8:20 AM, Roman Levenstein wrote: > > So, we can see, that performance-wise the difference is not that huge. > But if we look at the number of new/delete calls, then it is quite > different: > 1) without STL standard allocator - Total of only 847(!!!) mallocs for > all of the allocators together, while adding 1000000 nodes for each > of them. > 2) with STL standard allocator - Total of 2000628 mallocs for all of > the allocators together, while adding 1000000 nodes for each of them. > > So, the standard allocator of STL produces a huge number of > new/delete calls. And other allocators reduce it > by almost 4 orders of magnitude. But, as mentioned before, it DOES NOT > result in a big performance difference on > my Ubuntu/Linux/x86 machine, which indicates that mallocs are very > efficient here. But for you it seems to be very different... > > Hey Roman, > Also, I don't know how your setup is arranged. I have written a special small program to test different allocators. I have there test_list() and test_set() methods, that test std::list and std::set respectively. Each of them creates all the empty lists/sets first, sets different allocators to handle their respective lists/sets and then tries to add 1000000 elements to them. Once it is done, the test function: - sorts lists. - or deletes some elements from set (e.g. every 4th o so), intermixed with insertion. > In the case of > LLVM, the heap is significantly fragmented before a pass starts beating on > (f.e.) a std::map. When the nodes go through malloc, this means that the > nodes for one map end up scattered throughout the heap. My guess is that > this makes traversals far more expensive than when using a pool allocator > that makes them contiguous. May be. In my case, there are no preallocated data structures on the heap and therefore it is not very fragmented. > it would be interesting to measure the locality effect of using new/delete. Well, it goes eventually too far for my small investigation :-) What I could do, is to add a small initialization pass to my test program that would try to allocate a lot of objects and try free some of them randomly. It should probably create a fragmented heap. And then I can start my experiments, as they are currently done. If your assumption holds, I should see that STL's standard allocator would perform much worse than before. I can also post my sources to the mailing list later, so that you or Evan could test it on OS X to see if we have a similar picture on the same inputs. Does it sound reasonable? Anyway, I think, that it is clear that using a custom allocator for a concrete instance of the std::set is most likely a win, at least when it comes to the number of mallocs involved and eventually in performance. I'll try to clean-up the code for the allocators before I post them to the mailing list. BTW, the reason for talking about boost was not its performance, but more its cross-platform support. The problem with some of the allocators I've found so far was the fact that I'm not sure about their ability to support such features like: - different alignments - exception safety - 64bit clean implementations - different compilers and many others. I mean, they are pretty much simple and basically work for most typical cases. But they are not quite "bullet-proof" compared to e.g. Boost pool allocators. On the other hand, the current BumpPtrAllocator in LLVM is also not quite safe in this regard. So, we don't loose anything ;-) > Relevant reading :) > http://llvm.org/pubs/2005-05-21-PLDI-PoolAlloc.html Yep. I've read it after it appeared ;-) Very good reading! -Roman From baldrick at free.fr Mon May 19 04:27:32 2008 From: baldrick at free.fr (Duncan Sands) Date: Mon, 19 May 2008 09:27:32 -0000 Subject: [llvm-commits] [llvm] r51240 - in /llvm/trunk: lib/Transforms/Scalar/SimplifyLibCalls.cpp test/Transforms/SimplifyLibCalls/2008-05-19-memcmp.ll Message-ID: <200805190927.m4J9RWh5000456@zion.cs.uiuc.edu> Author: baldrick Date: Mon May 19 04:27:24 2008 New Revision: 51240 URL: http://llvm.org/viewvc/llvm-project?rev=51240&view=rev Log: Fix PR2341 - when the length is 4 use an i32 not an i16! Cleaned up trailing whitespace while there. Added: llvm/trunk/test/Transforms/SimplifyLibCalls/2008-05-19-memcmp.ll Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=51240&r1=51239&r2=51240&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Mon May 19 04:27:24 2008 @@ -731,17 +731,17 @@ !isa(FT->getParamType(1)) || FT->getReturnType() != Type::Int32Ty) return 0; - + Value *LHS = CI->getOperand(1), *RHS = CI->getOperand(2); - + if (LHS == RHS) // memcmp(s,s,x) -> 0 return Constant::getNullValue(CI->getType()); - + // Make sure we have a constant length. ConstantInt *LenC = dyn_cast(CI->getOperand(3)); if (!LenC) return 0; uint64_t Len = LenC->getZExtValue(); - + if (Len == 0) // memcmp(s1,s2,0) -> 0 return Constant::getNullValue(CI->getType()); @@ -750,18 +750,20 @@ Value *RHSV = B.CreateLoad(CastToCStr(RHS, B), "rhsv"); return B.CreateZExt(B.CreateSub(LHSV, RHSV, "chardiff"), CI->getType()); } - + // memcmp(S1,S2,2) != 0 -> (*(short*)LHS ^ *(short*)RHS) != 0 // memcmp(S1,S2,4) != 0 -> (*(int*)LHS ^ *(int*)RHS) != 0 if ((Len == 2 || Len == 4) && IsOnlyUsedInZeroEqualityComparison(CI)) { - LHS = B.CreateBitCast(LHS, PointerType::getUnqual(Type::Int16Ty), "tmp"); - RHS = B.CreateBitCast(RHS, LHS->getType(), "tmp"); + const Type *PTy = PointerType::getUnqual(Len == 2 ? + Type::Int16Ty : Type::Int32Ty); + LHS = B.CreateBitCast(LHS, PTy, "tmp"); + RHS = B.CreateBitCast(RHS, PTy, "tmp"); LoadInst *LHSV = B.CreateLoad(LHS, "lhsv"); LoadInst *RHSV = B.CreateLoad(RHS, "rhsv"); LHSV->setAlignment(1); RHSV->setAlignment(1); // Unaligned loads. return B.CreateZExt(B.CreateXor(LHSV, RHSV, "shortdiff"), CI->getType()); } - + return 0; } }; Added: llvm/trunk/test/Transforms/SimplifyLibCalls/2008-05-19-memcmp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyLibCalls/2008-05-19-memcmp.ll?rev=51240&view=auto ============================================================================== --- llvm/trunk/test/Transforms/SimplifyLibCalls/2008-05-19-memcmp.ll (added) +++ llvm/trunk/test/Transforms/SimplifyLibCalls/2008-05-19-memcmp.ll Mon May 19 04:27:24 2008 @@ -0,0 +1,14 @@ +; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep i32 +; PR2341 + + at _2E_str = external constant [5 x i8] ; <[5 x i8]*> [#uses=1] + +declare i32 @memcmp(i8*, i8*, i32) nounwind readonly + +define i1 @f(i8** %start_addr) { +entry: + %tmp4 = load i8** %start_addr, align 4 ; [#uses=1] + %tmp5 = call i32 @memcmp( i8* %tmp4, i8* getelementptr ([5 x i8]* @_2E_str, i32 0, i32 0), i32 4 ) nounwind readonly ; [#uses=1] + %tmp6 = icmp eq i32 %tmp5, 0 ; [#uses=1] + ret i1 %tmp6 +} From nicolas.geoffray at lip6.fr Mon May 19 05:01:04 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Mon, 19 May 2008 10:01:04 -0000 Subject: [llvm-commits] [vmkit] r51241 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaUpcalls.cpp JnjvmModule.cpp JnjvmModule.h Message-ID: <200805191001.m4JA14ci001454@zion.cs.uiuc.edu> Author: geoffray Date: Mon May 19 05:01:03 2008 New Revision: 51241 URL: http://llvm.org/viewvc/llvm-project?rev=51241&view=rev Log: Add a setMethod function to JnjvmModule to specify the runtime method to use. 80-col corrections. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp?rev=51241&r1=51240&r2=51241&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp Mon May 19 05:01:03 2008 @@ -112,34 +112,73 @@ Class* Classpath::vmStackWalker; void ClasspathThread::initialise(Jnjvm* vm) { - newThread = UPCALL_CLASS(vm, "java/lang/Thread"); - newVMThread = UPCALL_CLASS(vm, "java/lang/VMThread"); - assocThread = UPCALL_FIELD(vm, "java/lang/VMThread", "thread", "Ljava/lang/Thread;", ACC_VIRTUAL); - vmdata = UPCALL_FIELD(vm, "java/lang/VMThread", "vmdata", "Ljava/lang/Object;", ACC_VIRTUAL); - finaliseCreateInitialThread = UPCALL_METHOD(vm, "java/lang/InheritableThreadLocal", "newChildThread", "(Ljava/lang/Thread;)V", ACC_STATIC); - initVMThread = UPCALL_METHOD(vm, "java/lang/VMThread", "", "(Ljava/lang/Thread;)V", ACC_VIRTUAL); - groupAddThread = UPCALL_METHOD(vm, "java/lang/ThreadGroup", "addThread", "(Ljava/lang/Thread;)V", ACC_VIRTUAL); - name = UPCALL_FIELD(vm, "java/lang/Thread", "name", "Ljava/lang/String;", ACC_VIRTUAL); - priority = UPCALL_FIELD(vm, "java/lang/Thread", "priority", "I", ACC_VIRTUAL); - daemon = UPCALL_FIELD(vm, "java/lang/Thread", "daemon", "Z", ACC_VIRTUAL); - group = UPCALL_FIELD(vm, "java/lang/Thread", "group", "Ljava/lang/ThreadGroup;", ACC_VIRTUAL); - running = UPCALL_FIELD(vm, "java/lang/VMThread", "running", "Z", ACC_VIRTUAL); - rootGroup = UPCALL_FIELD(vm, "java/lang/ThreadGroup", "root", "Ljava/lang/ThreadGroup;", ACC_STATIC); - vmThread = UPCALL_FIELD(vm, "java/lang/Thread", "vmThread", "Ljava/lang/VMThread;", ACC_VIRTUAL); - uncaughtException = UPCALL_METHOD(vm, "java/lang/ThreadGroup", "uncaughtException", "(Ljava/lang/Thread;Ljava/lang/Throwable;)V", ACC_VIRTUAL); + newThread = + UPCALL_CLASS(vm, "java/lang/Thread"); + + newVMThread = + UPCALL_CLASS(vm, "java/lang/VMThread"); + + assocThread = + UPCALL_FIELD(vm, "java/lang/VMThread", "thread", "Ljava/lang/Thread;", + ACC_VIRTUAL); + + vmdata = + UPCALL_FIELD(vm, "java/lang/VMThread", "vmdata", "Ljava/lang/Object;", + ACC_VIRTUAL); + + finaliseCreateInitialThread = + UPCALL_METHOD(vm, "java/lang/InheritableThreadLocal", "newChildThread", + "(Ljava/lang/Thread;)V", ACC_STATIC); + + initVMThread = + UPCALL_METHOD(vm, "java/lang/VMThread", "", + "(Ljava/lang/Thread;)V", ACC_VIRTUAL); + + groupAddThread = + UPCALL_METHOD(vm, "java/lang/ThreadGroup", "addThread", + "(Ljava/lang/Thread;)V", ACC_VIRTUAL); + + name = + UPCALL_FIELD(vm, "java/lang/Thread", "name", "Ljava/lang/String;", + ACC_VIRTUAL); + + priority = + UPCALL_FIELD(vm, "java/lang/Thread", "priority", "I", ACC_VIRTUAL); + + daemon = + UPCALL_FIELD(vm, "java/lang/Thread", "daemon", "Z", ACC_VIRTUAL); + + group = + UPCALL_FIELD(vm, "java/lang/Thread", "group", + "Ljava/lang/ThreadGroup;", ACC_VIRTUAL); + + running = + UPCALL_FIELD(vm, "java/lang/VMThread", "running", "Z", ACC_VIRTUAL); + + rootGroup = + UPCALL_FIELD(vm, "java/lang/ThreadGroup", "root", + "Ljava/lang/ThreadGroup;", ACC_STATIC); + + vmThread = + UPCALL_FIELD(vm, "java/lang/Thread", "vmThread", + "Ljava/lang/VMThread;", ACC_VIRTUAL); + + uncaughtException = + UPCALL_METHOD(vm, "java/lang/ThreadGroup", "uncaughtException", + "(Ljava/lang/Thread;Ljava/lang/Throwable;)V", ACC_VIRTUAL); } void ClasspathThread::createInitialThread(Jnjvm* vm, JavaObject* th) { JavaObject* vmth = (*newVMThread)(vm); - (*th)(name, (JavaObject*)vm->asciizToStr("main")); - (*th)(priority, (uint32)1); - (*th)(daemon, (uint32)0); - (*th)(vmThread, vmth); - (*vmth)(assocThread, th); - (*vmth)(running, (uint32)1); - (*rootGroup)(); - (*th)(group, (JavaObject*)((*rootGroup)().PointerVal)); - groupAddThread->invokeIntSpecial(vm, (JavaObject*)((*rootGroup)().PointerVal), th); + name->setVirtualObjectField(th, (JavaObject*)vm->asciizToStr("main")); + priority->setVirtualInt32Field(th, (uint32)1); + daemon->setVirtualInt8Field(th, (uint32)0); + vmThread->setVirtualObjectField(th, vmth); + assocThread->setVirtualObjectField(vmth, th); + running->setVirtualInt8Field(vmth, (uint32)1); + JavaObject* RG = rootGroup->getStaticObjectField(); + group->setVirtualObjectField(th, RG); + groupAddThread->invokeIntSpecial(vm, RG, th); } void ClasspathThread::mapInitialThread(Jnjvm* vm) { @@ -147,90 +186,191 @@ createInitialThread(vm, th); JavaThread* myth = JavaThread::get(); myth->javaThread = th; - JavaObject* vmth = (JavaObject*)((*th)(vmThread).PointerVal); - (*vmth)(vmdata, (JavaObject*)myth); + JavaObject* vmth = vmThread->getVirtualObjectField(th); + vmdata->setVirtualObjectField(vmth, (JavaObject*)myth); finaliseCreateInitialThread->invokeIntStatic(vm, th); } void Classpath::initialiseClasspath(Jnjvm* vm) { - getSystemClassLoader = UPCALL_METHOD(vm, "java/lang/ClassLoader", "getSystemClassLoader", "()Ljava/lang/ClassLoader;", ACC_STATIC); - setContextClassLoader = UPCALL_METHOD(vm, "java/lang/Thread", "setContextClassLoader", "(Ljava/lang/ClassLoader;)V", ACC_VIRTUAL); - newString = UPCALL_CLASS(vm, "java/lang/String"); - newClass = UPCALL_CLASS(vm, "java/lang/Class"); - newThrowable = UPCALL_CLASS(vm, "java/lang/Throwable"); - newException = UPCALL_CLASS(vm, "java/lang/Exception"); - initClass = UPCALL_METHOD(vm, "java/lang/Class", "", "(Ljava/lang/Object;)V", ACC_VIRTUAL); - initClassWithProtectionDomain = UPCALL_METHOD(vm, "java/lang/Class", "", "(Ljava/lang/Object;Ljava/security/ProtectionDomain;)V", ACC_VIRTUAL); - vmdataClass = UPCALL_FIELD(vm, "java/lang/Class", "vmdata", "Ljava/lang/Object;", ACC_VIRTUAL); - setProperty = UPCALL_METHOD(vm, "java/util/Properties", "setProperty", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;", ACC_VIRTUAL); - initString = UPCALL_METHOD(vm, "java/lang/String", "", "([CIIZ)V", ACC_VIRTUAL); - - initConstructor = UPCALL_METHOD(vm, "java/lang/reflect/Constructor", "", "(Ljava/lang/Class;I)V", ACC_VIRTUAL); - newConstructor = UPCALL_CLASS(vm, "java/lang/reflect/Constructor"); - constructorArrayClass = UPCALL_ARRAY_CLASS(vm, "java/lang/reflect/Constructor", 1); - constructorSlot = UPCALL_FIELD(vm, "java/lang/reflect/Constructor", "slot", "I", ACC_VIRTUAL); - - initMethod = UPCALL_METHOD(vm, "java/lang/reflect/Method", "", "(Ljava/lang/Class;Ljava/lang/String;I)V", ACC_VIRTUAL); - newMethod = UPCALL_CLASS(vm, "java/lang/reflect/Method"); - methodArrayClass = UPCALL_ARRAY_CLASS(vm, "java/lang/reflect/Method", 1); - methodSlot = UPCALL_FIELD(vm, "java/lang/reflect/Method", "slot", "I", ACC_VIRTUAL); - - initField = UPCALL_METHOD(vm, "java/lang/reflect/Field", "", "(Ljava/lang/Class;Ljava/lang/String;I)V", ACC_VIRTUAL); - newField = UPCALL_CLASS(vm, "java/lang/reflect/Field"); - fieldArrayClass = UPCALL_ARRAY_CLASS(vm, "java/lang/reflect/Field", 1); - fieldSlot = UPCALL_FIELD(vm, "java/lang/reflect/Field", "slot", "I", ACC_VIRTUAL); - - - classArrayClass = UPCALL_ARRAY_CLASS(vm, "java/lang/Class", 1); - newVMThrowable = UPCALL_CLASS(vm, "java/lang/VMThrowable"); - initVMThrowable = UPCALL_METHOD(vm, "java/lang/VMThrowable", "", "()V", ACC_VIRTUAL); - vmDataVMThrowable = UPCALL_FIELD(vm, "java/lang/VMThrowable", "vmdata", "Ljava/lang/Object;", ACC_VIRTUAL); - bufferAddress = UPCALL_FIELD(vm, "java/nio/Buffer", "address", "Lgnu/classpath/Pointer;", ACC_VIRTUAL); - dataPointer32 = UPCALL_FIELD(vm, "gnu/classpath/Pointer32", "data", "I", ACC_VIRTUAL); - vmdataClassLoader = UPCALL_FIELD(vm, "java/lang/ClassLoader", "vmdata", "Ljava/lang/Object;", ACC_VIRTUAL); - - newStackTraceElement = UPCALL_CLASS(vm, "java/lang/StackTraceElement"); - initStackTraceElement = UPCALL_METHOD(vm, "java/lang/StackTraceElement", "", "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Z)V", ACC_VIRTUAL); - - - boolValue = UPCALL_FIELD(vm, "java/lang/Boolean", "value", "Z", ACC_VIRTUAL); - byteValue = UPCALL_FIELD(vm, "java/lang/Byte", "value", "B", ACC_VIRTUAL); - shortValue = UPCALL_FIELD(vm, "java/lang/Short", "value", "S", ACC_VIRTUAL); - charValue = UPCALL_FIELD(vm, "java/lang/Character", "value", "C", ACC_VIRTUAL); - intValue = UPCALL_FIELD(vm, "java/lang/Integer", "value", "I", ACC_VIRTUAL); - longValue = UPCALL_FIELD(vm, "java/lang/Long", "value", "J", ACC_VIRTUAL); - floatValue = UPCALL_FIELD(vm, "java/lang/Float", "value", "F", ACC_VIRTUAL); - doubleValue = UPCALL_FIELD(vm, "java/lang/Double", "value", "D", ACC_VIRTUAL); - - Classpath::voidClass = UPCALL_CLASS(vm, "java/lang/Void"); - Classpath::boolClass = UPCALL_CLASS(vm, "java/lang/Boolean"); - Classpath::byteClass = UPCALL_CLASS(vm, "java/lang/Byte"); - Classpath::shortClass = UPCALL_CLASS(vm, "java/lang/Short"); - Classpath::charClass = UPCALL_CLASS(vm, "java/lang/Character"); - Classpath::intClass = UPCALL_CLASS(vm, "java/lang/Integer"); - Classpath::floatClass = UPCALL_CLASS(vm, "java/lang/Float"); - Classpath::doubleClass = UPCALL_CLASS(vm, "java/lang/Double"); - Classpath::longClass = UPCALL_CLASS(vm, "java/lang/Long"); - - vmStackWalker = UPCALL_CLASS(vm, "gnu/classpath/VMStackWalker"); - - loadInClassLoader = UPCALL_METHOD(vm, "java/lang/ClassLoader", "loadClass", "(Ljava/lang/String;Z)Ljava/lang/Class;", ACC_VIRTUAL); - - JavaMethod* internString = UPCALL_METHOD(vm, "java/lang/VMString", "intern", "(Ljava/lang/String;)Ljava/lang/String;", ACC_STATIC); - // Create intern - { - llvm::Function* func = vm->module->getMethodInfo(internString)->getMethod(); - func->setName("internString"); - func->setLinkage(llvm::GlobalValue::ExternalLinkage); - } - - JavaMethod* isArray = UPCALL_METHOD(vm, "java/lang/Class", "isArray", "()Z", ACC_VIRTUAL); - // Create intern - { - llvm::Function* func = vm->module->getMethodInfo(isArray)->getMethod(); - func->setName("isArray"); - func->setLinkage(llvm::GlobalValue::ExternalLinkage); - } + getSystemClassLoader = + UPCALL_METHOD(vm, "java/lang/ClassLoader", "getSystemClassLoader", + "()Ljava/lang/ClassLoader;", ACC_STATIC); + + setContextClassLoader = + UPCALL_METHOD(vm, "java/lang/Thread", "setContextClassLoader", + "(Ljava/lang/ClassLoader;)V", ACC_VIRTUAL); + + newString = + UPCALL_CLASS(vm, "java/lang/String"); + + newClass = + UPCALL_CLASS(vm, "java/lang/Class"); + + newThrowable = + UPCALL_CLASS(vm, "java/lang/Throwable"); + + newException = + UPCALL_CLASS(vm, "java/lang/Exception"); + + initClass = + UPCALL_METHOD(vm, "java/lang/Class", "", "(Ljava/lang/Object;)V", + ACC_VIRTUAL); + + initClassWithProtectionDomain = + UPCALL_METHOD(vm, "java/lang/Class", "", + "(Ljava/lang/Object;Ljava/security/ProtectionDomain;)V", + ACC_VIRTUAL); + + vmdataClass = + UPCALL_FIELD(vm, "java/lang/Class", "vmdata", "Ljava/lang/Object;", + ACC_VIRTUAL); + + setProperty = + UPCALL_METHOD(vm, "java/util/Properties", "setProperty", + "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;"; + ACC_VIRTUAL); + + initString = + UPCALL_METHOD(vm, "java/lang/String", "", "([CIIZ)V", ACC_VIRTUAL); + + initConstructor = + UPCALL_METHOD(vm, "java/lang/reflect/Constructor", "", + "(Ljava/lang/Class;I)V", ACC_VIRTUAL); + + newConstructor = + UPCALL_CLASS(vm, "java/lang/reflect/Constructor"); + + constructorArrayClass = + UPCALL_ARRAY_CLASS(vm, "java/lang/reflect/Constructor", 1); + + constructorSlot = + UPCALL_FIELD(vm, "java/lang/reflect/Constructor", "slot", "I", ACC_VIRTUAL); + + initMethod = + UPCALL_METHOD(vm, "java/lang/reflect/Method", "", + "(Ljava/lang/Class;Ljava/lang/String;I)V", ACC_VIRTUAL); + + newMethod = + UPCALL_CLASS(vm, "java/lang/reflect/Method"); + + methodArrayClass = + UPCALL_ARRAY_CLASS(vm, "java/lang/reflect/Method", 1); + + methodSlot = + UPCALL_FIELD(vm, "java/lang/reflect/Method", "slot", "I", ACC_VIRTUAL); + + initField = + UPCALL_METHOD(vm, "java/lang/reflect/Field", "", + "(Ljava/lang/Class;Ljava/lang/String;I)V", ACC_VIRTUAL); + + newField = + UPCALL_CLASS(vm, "java/lang/reflect/Field"); + + fieldArrayClass = + UPCALL_ARRAY_CLASS(vm, "java/lang/reflect/Field", 1); + + fieldSlot = + UPCALL_FIELD(vm, "java/lang/reflect/Field", "slot", "I", ACC_VIRTUAL); + + + classArrayClass = + UPCALL_ARRAY_CLASS(vm, "java/lang/Class", 1); + + newVMThrowable = + UPCALL_CLASS(vm, "java/lang/VMThrowable"); + + initVMThrowable = + UPCALL_METHOD(vm, "java/lang/VMThrowable", "", "()V", ACC_VIRTUAL); + + vmDataVMThrowable = + UPCALL_FIELD(vm, "java/lang/VMThrowable", "vmdata", "Ljava/lang/Object;", + ACC_VIRTUAL); + + bufferAddress = + UPCALL_FIELD(vm, "java/nio/Buffer", "address", "Lgnu/classpath/Pointer;", + ACC_VIRTUAL); + + dataPointer32 = + UPCALL_FIELD(vm, "gnu/classpath/Pointer32", "data", "I", ACC_VIRTUAL); + + vmdataClassLoader = + UPCALL_FIELD(vm, "java/lang/ClassLoader", "vmdata", "Ljava/lang/Object;", + ACC_VIRTUAL); + + newStackTraceElement = + UPCALL_CLASS(vm, "java/lang/StackTraceElement"); + + initStackTraceElement = + UPCALL_METHOD(vm, "java/lang/StackTraceElement", "", + "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Z)V", + ACC_VIRTUAL); + + boolValue = + UPCALL_FIELD(vm, "java/lang/Boolean", "value", "Z", ACC_VIRTUAL); + + byteValue = + UPCALL_FIELD(vm, "java/lang/Byte", "value", "B", ACC_VIRTUAL); + + shortValue = + UPCALL_FIELD(vm, "java/lang/Short", "value", "S", ACC_VIRTUAL); + + charValue = + UPCALL_FIELD(vm, "java/lang/Character", "value", "C", ACC_VIRTUAL); + + intValue = + UPCALL_FIELD(vm, "java/lang/Integer", "value", "I", ACC_VIRTUAL); + + longValue = + UPCALL_FIELD(vm, "java/lang/Long", "value", "J", ACC_VIRTUAL); + + floatValue = + UPCALL_FIELD(vm, "java/lang/Float", "value", "F", ACC_VIRTUAL); + + doubleValue = + UPCALL_FIELD(vm, "java/lang/Double", "value", "D", ACC_VIRTUAL); + + Classpath::voidClass = + UPCALL_CLASS(vm, "java/lang/Void"); + + Classpath::boolClass = + UPCALL_CLASS(vm, "java/lang/Boolean"); + + Classpath::byteClass = + UPCALL_CLASS(vm, "java/lang/Byte"); + + Classpath::shortClass = + UPCALL_CLASS(vm, "java/lang/Short"); + + Classpath::charClass = + UPCALL_CLASS(vm, "java/lang/Character"); + + Classpath::intClass = + UPCALL_CLASS(vm, "java/lang/Integer"); + + Classpath::floatClass = + UPCALL_CLASS(vm, "java/lang/Float"); + + Classpath::doubleClass = + UPCALL_CLASS(vm, "java/lang/Double"); + + Classpath::longClass = + UPCALL_CLASS(vm, "java/lang/Long"); + + vmStackWalker = + UPCALL_CLASS(vm, "gnu/classpath/VMStackWalker"); + + loadInClassLoader = + UPCALL_METHOD(vm, "java/lang/ClassLoader", "loadClass", + "(Ljava/lang/String;Z)Ljava/lang/Class;", ACC_VIRTUAL); + + JavaMethod* internString = + UPCALL_METHOD(vm, "java/lang/VMString", "intern", + "(Ljava/lang/String;)Ljava/lang/String;", ACC_STATIC); + vm->module->setMethod(internString, "internString"); + + JavaMethod* isArray = + UPCALL_METHOD(vm, "java/lang/Class", "isArray", "()Z", ACC_VIRTUAL); + vm->module->setMethod(isArray, "isArray"); ClasspathThread::initialise(vm); @@ -244,26 +384,20 @@ true, false); COMPILE_METHODS(object) - JavaMethod* getCallingClass = UPCALL_METHOD(vm, "gnu/classpath/VMStackWalker", "getCallingClass", "()Ljava/lang/Class;", ACC_STATIC); - { - llvm::Function* func = vm->module->getMethodInfo(getCallingClass)->getMethod(); - func->setName("getCallingClass"); - func->setLinkage(llvm::GlobalValue::ExternalLinkage); - } - - JavaMethod* getCallingClassLoader = UPCALL_METHOD(vm, "gnu/classpath/VMStackWalker", "getCallingClassLoader", "()Ljava/lang/ClassLoader;", ACC_STATIC); - { - llvm::Function* func = vm->module->getMethodInfo(getCallingClassLoader)->getMethod(); - func->setName("getCallingClassLoader"); - func->setLinkage(llvm::GlobalValue::ExternalLinkage); - } - - JavaMethod* postProperties = UPCALL_METHOD(vm, "gnu/classpath/VMSystemProperties", "postInit", "(Ljava/util/Properties;)V", ACC_STATIC); - { - llvm::Function* func = vm->module->getMethodInfo(postProperties)->getMethod(); - func->setName("propertiesPostInit"); - func->setLinkage(llvm::GlobalValue::ExternalLinkage); - } + JavaMethod* getCallingClass = + UPCALL_METHOD(vm, "gnu/classpath/VMStackWalker", "getCallingClass", + "()Ljava/lang/Class;", ACC_STATIC); + vm->module->setMethod(getCallingClass, "getCallingClass"); + + JavaMethod* getCallingClassLoader = + UPCALL_METHOD(vm, "gnu/classpath/VMStackWalker", "getCallingClassLoader", + "()Ljava/lang/ClassLoader;", ACC_STATIC); + vm->module->setMethod(getCallingClassLoader, "getCallingClassLoader"); + + JavaMethod* postProperties = + UPCALL_METHOD(vm, "gnu/classpath/VMSystemProperties", "postInit", + "(Ljava/util/Properties;)V", ACC_STATIC); + vm->module->setMethod(postProperties, "propertiesPostInit"); } extern "C" JavaString* internString(JavaString* obj) { @@ -274,7 +408,7 @@ extern "C" uint8 isArray(JavaObject* klass) { CommonClass* cl = - (CommonClass*)(((*Classpath::vmdataClass)((JavaObject*)klass)).PointerVal); + (CommonClass*)((Classpath::vmdataClass->getVirtualObjectField(klass))); return (uint8)cl->isArray; } Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=51241&r1=51240&r2=51241&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Mon May 19 05:01:03 2008 @@ -120,7 +120,8 @@ if (jit->compilingClass->isolate->module == Jnjvm::bootstrapVM->module && isArray && classDef->isolate != Jnjvm::bootstrapVM) { // We know the array class can belong to bootstrap - varGV = Jnjvm::bootstrapVM->constructArray(this->name, 0)->llvmVar(compilingModule); + CommonClass* cl = Jnjvm::bootstrapVM->constructArray(this->name, 0); + return getVar(cl, jit); } #endif @@ -580,7 +581,8 @@ ConstantInt* CI = mvm::jit::constantZero; std::vector Args; - Function* res = Function::Create(virt ? getVirtualBufType() : getStaticBufType(), + Function* res = Function::Create(virt ? getVirtualBufType() : + getStaticBufType(), GlobalValue::ExternalLinkage, signature->printString(), signature->isolate->module); @@ -633,7 +635,8 @@ std::vector Args; - Function* res = Function::Create(virt ? getVirtualBufType() : getStaticBufType(), + Function* res = Function::Create(virt ? getVirtualBufType() : + getStaticBufType(), GlobalValue::ExternalLinkage, signature->printString(), signature->isolate->module); @@ -1020,3 +1023,8 @@ ((float*)((uint64)obj + field->ptrOffset))[0] = val; } +void JnjvmModule::setMethod(JavaMethod* meth, const char* name) { + llvm::Function* func = getMethodInfo(meth)->getMethod(); + func->setName(name); + func->setLinkage(llvm::GlobalValue::ExternalLinkage); +} Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h?rev=51241&r1=51240&r2=51241&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h Mon May 19 05:01:03 2008 @@ -317,6 +317,7 @@ void resolveVirtualClass(Class* cl); void resolveStaticClass(Class* cl); + void setMethod(JavaMethod* meth, const char* name); LLVMSignatureInfo* getSignatureInfo(Signdef*); LLVMCommonClassInfo* getClassInfo(CommonClass*); From nicolas.geoffray at lip6.fr Mon May 19 05:03:04 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Mon, 19 May 2008 10:03:04 -0000 Subject: [llvm-commits] [vmkit] r51242 - in /vmkit/trunk/lib/JnJVM: Classpath/ClasspathConstructor.cpp Classpath/ClasspathMethod.cpp Classpath/ClasspathVMClass.cpp Classpath/ClasspathVMField.cpp Classpath/ClasspathVMStackWalker.cpp Classpath/ClasspathVMThread.cpp Classpath/ClasspathVMThrowable.cpp VMCore/JavaClass.h VMCore/JavaIsolate.cpp VMCore/JavaMetaJIT.cpp VMCore/JavaObject.h VMCore/Jni.cpp VMCore/Jnjvm.cpp VMCore/NativeUtil.cpp Message-ID: <200805191003.m4JA340q001525@zion.cs.uiuc.edu> Author: geoffray Date: Mon May 19 05:03:04 2008 New Revision: 51242 URL: http://llvm.org/viewvc/llvm-project?rev=51242&view=rev Log: Make Java field accesses direct. Callers are in charge of initializing or resolving the classes. Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaObject.h vmkit/trunk/lib/JnJVM/VMCore/Jni.cpp vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp?rev=51242&r1=51241&r2=51242&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp Mon May 19 05:03:04 2008 @@ -33,7 +33,7 @@ JNIEnv *env, #endif jobject cons) { - JavaMethod* meth = (JavaMethod*)((*Classpath::constructorSlot)((JavaObject*)cons).IntVal.getZExtValue()); + JavaMethod* meth = (JavaMethod*)(Classpath::constructorSlot->getVirtualInt32Field((JavaObject*)cons)); JavaObject* loader = meth->classDef->classLoader; return (jobject)(NativeUtil::getParameterTypes(loader, meth)); } @@ -43,7 +43,7 @@ JNIEnv *env, #endif jobject cons) { - JavaMethod* meth = (JavaMethod*)((*Classpath::constructorSlot)((JavaObject*)cons).IntVal.getZExtValue()); + JavaMethod* meth = (JavaMethod*)(Classpath::constructorSlot->getVirtualInt32Field((JavaObject*)cons)); return meth->access; } @@ -105,7 +105,7 @@ #endif jobject cons) { verifyNull(cons); - JavaMethod* meth = (JavaMethod*)(*Classpath::constructorSlot)((JavaObject*)cons).IntVal.getZExtValue(); + JavaMethod* meth = (JavaMethod*)Classpath::constructorSlot->getVirtualInt32Field((JavaObject*)cons); return (jobjectArray)NativeUtil::getExceptionTypes(meth); } Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp?rev=51242&r1=51241&r2=51242&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp Mon May 19 05:03:04 2008 @@ -32,7 +32,7 @@ JNIEnv *env, #endif jobject Meth) { - JavaMethod* meth = (JavaMethod*)((*Classpath::methodSlot)((JavaObject*)Meth).IntVal.getZExtValue()); + JavaMethod* meth = (JavaMethod*)Classpath::methodSlot->getVirtualInt32Field((JavaObject*)Meth); return meth->access; } @@ -41,7 +41,7 @@ JNIEnv *env, #endif jobject Meth) { - JavaMethod* meth = (JavaMethod*)((*Classpath::methodSlot)((JavaObject*)Meth).IntVal.getZExtValue()); + JavaMethod* meth = (JavaMethod*)Classpath::methodSlot->getVirtualInt32Field((JavaObject*)Meth); JavaObject* loader = meth->classDef->classLoader; return (jclass)NativeUtil::getClassType(loader, meth->signature->ret); } @@ -53,7 +53,7 @@ #endif jobject Meth) { - JavaMethod* meth = (JavaMethod*)((*Classpath::methodSlot)((JavaObject*)Meth).IntVal.getZExtValue()); + JavaMethod* meth = (JavaMethod*)Classpath::methodSlot->getVirtualInt32Field((JavaObject*)Meth); JavaObject* loader = meth->classDef->classLoader; return (jobject)(NativeUtil::getParameterTypes(loader, meth)); } @@ -131,42 +131,42 @@ uint32 val = 0; RUN_METH(Int); res = (*Classpath::boolClass)(vm); - (*Classpath::boolValue)(res, val); + Classpath::boolValue->setVirtualInt8Field(res, val); } else if (retType == AssessorDesc::dByte) { uint32 val = 0; RUN_METH(Int); res = (*Classpath::byteClass)(vm); - (*Classpath::byteValue)(res, val); + Classpath::byteValue->setVirtualInt8Field(res, val); } else if (retType == AssessorDesc::dChar) { uint32 val = 0; RUN_METH(Int); res = (*Classpath::charClass)(vm); - (*Classpath::charValue)(res, val); + Classpath::charValue->setVirtualInt16Field(res, val); } else if (retType == AssessorDesc::dShort) { uint32 val = 0; RUN_METH(Int); res = (*Classpath::shortClass)(vm); - (*Classpath::shortValue)(res, val); + Classpath::shortValue->setVirtualInt16Field(res, val); } else if (retType == AssessorDesc::dInt) { uint32 val = 0; RUN_METH(Int); res = (*Classpath::intClass)(vm); - (*Classpath::intValue)(res, val); + Classpath::intValue->setVirtualInt32Field(res, val); } else if (retType == AssessorDesc::dLong) { sint64 val = 0; RUN_METH(Long); res = (*Classpath::longClass)(vm); - (*Classpath::longValue)(res, val); + Classpath::longValue->setVirtualLongField(res, val); } else if (retType == AssessorDesc::dFloat) { float val = 0; RUN_METH(Float); res = (*Classpath::floatClass)(vm); - (*Classpath::floatValue)(res, val); + Classpath::floatValue->setVirtualFloatField(res, val); } else if (retType == AssessorDesc::dDouble) { double val = 0; RUN_METH(Double); res = (*Classpath::doubleClass)(vm); - (*Classpath::doubleValue)(res, val); + Classpath::doubleValue->setVirtualDoubleField(res, val); } else if (retType == AssessorDesc::dTab || retType == AssessorDesc::dRef) { JavaObject* val = 0; RUN_METH(JavaObject); @@ -188,7 +188,7 @@ #endif jobject _meth) { verifyNull(_meth); - JavaMethod* meth = (JavaMethod*)(*Classpath::methodSlot)((JavaObject*)_meth).IntVal.getZExtValue(); + JavaMethod* meth = (JavaMethod*)Classpath::methodSlot->getVirtualInt32Field((JavaObject*)_meth); return (jobjectArray)NativeUtil::getExceptionTypes(meth); } Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp?rev=51242&r1=51241&r2=51242&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp Mon May 19 05:03:04 2008 @@ -38,7 +38,7 @@ jobject klass) { CommonClass* cl = - (CommonClass*)(((*Classpath::vmdataClass)((JavaObject*)klass)).PointerVal); + (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)klass); return cl->isArray; @@ -174,7 +174,7 @@ jobject Cl) { Jnjvm* vm = JavaThread::get()->isolate; CommonClass* cl = - (CommonClass*)((*Classpath::vmdataClass)((JavaObject*)Cl).PointerVal); + (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl); AssessorDesc* ass = AssessorDesc::bogusClassToPrimitive(cl); const UTF8* res = 0; @@ -194,7 +194,7 @@ #endif jclass Cl) { CommonClass* cl = - (CommonClass*)((*Classpath::vmdataClass)((JavaObject*)Cl).PointerVal); + (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl); AssessorDesc* ass = AssessorDesc::bogusClassToPrimitive(cl); if (ass == 0) return false; @@ -219,7 +219,7 @@ #endif jclass Cl) { CommonClass* cl = - (CommonClass*)((*Classpath::vmdataClass)((JavaObject*)Cl).PointerVal); + (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl); if (cl->isArray) { CommonClass* bc = ((ClassArray*)cl)->baseClass(); @@ -236,7 +236,7 @@ #endif jclass Cl) { CommonClass* cl = - (CommonClass*)((*Classpath::vmdataClass)((JavaObject*)Cl).PointerVal); + (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl); return (jobject)cl->classLoader; } @@ -247,9 +247,9 @@ #endif jclass Cl1, jclass Cl2) { CommonClass* cl1 = - (CommonClass*)((*Classpath::vmdataClass)((JavaObject*)Cl1).PointerVal); + (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl1); CommonClass* cl2 = - (CommonClass*)((*Classpath::vmdataClass)((JavaObject*)Cl2).PointerVal); + (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl2); AssessorDesc* ass = AssessorDesc::bogusClassToPrimitive(cl1); if (ass) { @@ -268,7 +268,7 @@ #endif jclass Cl) { CommonClass* cl = - (CommonClass*)((*Classpath::vmdataClass)((JavaObject*)Cl).PointerVal); + (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl); if (isInterface(cl->access)) return 0; else { @@ -285,7 +285,7 @@ #endif jclass Cl, jobject obj) { CommonClass* cl = - (CommonClass*)((*Classpath::vmdataClass)((JavaObject*)Cl).PointerVal); + (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl); return ((JavaObject*)obj)->instanceOf(cl); } Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp?rev=51242&r1=51241&r2=51242&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp Mon May 19 05:03:04 2008 @@ -24,7 +24,7 @@ JNIEnv *env, #endif jobject obj) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)obj).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)obj); return field->access; } @@ -33,7 +33,7 @@ JNIEnv *env, #endif jobject obj) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)obj).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)obj); JavaObject* loader = field->classDef->classLoader; CommonClass* cl = field->signature->assocClass(loader); return (jclass)cl->getClassDelegatee(); @@ -44,12 +44,17 @@ JNIEnv *env, #endif jobject Field, jobject obj) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; if (ass != AssessorDesc::dInt && ass != AssessorDesc::dChar && ass != AssessorDesc::dByte && ass != AssessorDesc::dShort) JavaThread::get()->isolate->illegalArgumentException(""); - return (sint32)(*field)((JavaObject*)obj).IntVal.getZExtValue(); + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + + return isStatic(field->access) ? + (sint32)field->getStaticInt32Field() : + (sint32)field->getVirtualInt32Field((JavaObject*)obj); } JNIEXPORT jlong JNICALL Java_java_lang_reflect_Field_getLong( @@ -57,13 +62,18 @@ JNIEnv *env, #endif jobject Field, jobject obj) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; if (ass != AssessorDesc::dInt && ass != AssessorDesc::dChar && ass != AssessorDesc::dByte && ass != AssessorDesc::dShort && ass != AssessorDesc::dLong) JavaThread::get()->isolate->illegalArgumentException(""); - return (sint64)(*field)((JavaObject*)obj).IntVal.getZExtValue(); + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + + return isStatic(field->access) ? + (sint64)field->getStaticLongField() : + (sint64)field->getVirtualLongField((JavaObject*)obj); } JNIEXPORT jboolean JNICALL Java_java_lang_reflect_Field_getBoolean( @@ -71,11 +81,18 @@ JNIEnv *env, #endif jobject Field, jobject obj) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; + if (ass != AssessorDesc::dBool) JavaThread::get()->isolate->illegalArgumentException(""); - return (uint8)(*field)((JavaObject*)obj).IntVal.getZExtValue(); + + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + + return isStatic(field->access) ? + (uint8)field->getStaticInt8Field() : + (uint8)field->getVirtualInt8Field((JavaObject*)obj); } JNIEXPORT jfloat JNICALL Java_java_lang_reflect_Field_getFloat( @@ -83,14 +100,36 @@ JNIEnv *env, #endif jobject Field, jobject obj) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; - if (ass == AssessorDesc::dByte || ass == AssessorDesc::dInt || ass == AssessorDesc::dShort || ass == AssessorDesc::dLong) { - return (jfloat)(*field)((JavaObject*)obj).IntVal.getSExtValue(); + + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + + if (ass == AssessorDesc::dByte) { + return isStatic(field->access) ? + (jfloat)field->getStaticInt8Field() : + (jfloat)field->getVirtualInt8Field((JavaObject*)obj); + } else if (ass == AssessorDesc::dInt) { + return isStatic(field->access) ? + (jfloat)field->getStaticInt32Field() : + (jfloat)field->getVirtualInt32Field((JavaObject*)obj); + } else if (ass == AssessorDesc::dShort) { + return isStatic(field->access) ? + (jfloat)field->getStaticInt16Field() : + (jfloat)field->getVirtualInt16Field((JavaObject*)obj); + } else if (ass == AssessorDesc::dLong) { + return isStatic(field->access) ? + (jfloat)field->getStaticLongField() : + (jfloat)field->getVirtualLongField((JavaObject*)obj); } else if (ass == AssessorDesc::dChar) { - return (jfloat)(*field)((JavaObject*)obj).IntVal.getZExtValue(); + return isStatic(field->access) ? + (jfloat)(uint32)field->getStaticInt16Field() : + (jfloat)(uint32)field->getVirtualInt16Field((JavaObject*)obj); } else if (ass == AssessorDesc::dFloat) { - return (jfloat)(*field)((JavaObject*)obj).FloatVal; + return isStatic(field->access) ? + (jfloat)field->getStaticFloatField() : + (jfloat)field->getVirtualFloatField((JavaObject*)obj); } JavaThread::get()->isolate->illegalArgumentException(""); return 0.0; @@ -101,11 +140,17 @@ JNIEnv *env, #endif jobject Field, jobject obj) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; if (ass != AssessorDesc::dByte) JavaThread::get()->isolate->illegalArgumentException(""); - return (sint8)(*field)((JavaObject*)obj).IntVal.getSExtValue(); + + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + + return isStatic(field->access) ? + (sint8)field->getStaticInt8Field() : + (sint8)field->getVirtualInt8Field((JavaObject*)obj); } JNIEXPORT jchar JNICALL Java_java_lang_reflect_Field_getChar( @@ -113,11 +158,18 @@ JNIEnv *env, #endif jobject Field, jobject obj) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; + if (ass != AssessorDesc::dChar) JavaThread::get()->isolate->illegalArgumentException(""); - return (uint16)(*field)((JavaObject*)obj).IntVal.getZExtValue(); + + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + + return isStatic(field->access) ? + (uint16)field->getStaticInt16Field() : + (uint16)field->getVirtualInt16Field((JavaObject*)obj); } JNIEXPORT jshort JNICALL Java_java_lang_reflect_Field_getShort( @@ -125,11 +177,18 @@ JNIEnv *env, #endif jobject Field, jobject obj) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; + if (ass != AssessorDesc::dShort && ass != AssessorDesc::dByte) JavaThread::get()->isolate->illegalArgumentException(""); - return (sint16)(*field)((JavaObject*)obj).IntVal.getSExtValue(); + + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + + return isStatic(field->access) ? + (sint16)field->getStaticInt16Field() : + (sint16)field->getVirtualInt16Field((JavaObject*)obj); } JNIEXPORT jdouble JNICALL Java_java_lang_reflect_Field_getDouble( @@ -137,16 +196,40 @@ JNIEnv *env, #endif jobject Field, jobject obj) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; - if (ass == AssessorDesc::dByte || ass == AssessorDesc::dInt || ass == AssessorDesc::dShort || ass == AssessorDesc::dLong) { - return (jdouble)(*field)((JavaObject*)obj).IntVal.getSExtValue(); + + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + + if (ass == AssessorDesc::dByte) { + return isStatic(field->access) ? + (jdouble)(sint64)field->getStaticInt8Field() : + (jdouble)(sint64)field->getVirtualInt8Field((JavaObject*)obj); + } else if (ass == AssessorDesc::dInt) { + return isStatic(field->access) ? + (jdouble)(sint64)field->getStaticInt32Field() : + (jdouble)(sint64)field->getVirtualInt32Field((JavaObject*)obj); + } else if (ass == AssessorDesc::dShort) { + return isStatic(field->access) ? + (jdouble)(sint64)field->getStaticInt16Field() : + (jdouble)(sint64)field->getVirtualInt16Field((JavaObject*)obj); + } else if (ass == AssessorDesc::dLong) { + return isStatic(field->access) ? + (jdouble)(sint64)field->getStaticLongField() : + (jdouble)(sint64)field->getVirtualLongField((JavaObject*)obj); } else if (ass == AssessorDesc::dChar) { - return (jdouble)(*field)((JavaObject*)obj).IntVal.getZExtValue(); + return isStatic(field->access) ? + (jdouble)(uint64)field->getStaticInt16Field() : + (jdouble)(uint64)field->getVirtualInt16Field((JavaObject*)obj); } else if (ass == AssessorDesc::dFloat) { - return (jdouble)(*field)((JavaObject*)obj).FloatVal; + return isStatic(field->access) ? + (jdouble)field->getStaticFloatField() : + (jdouble)field->getVirtualFloatField((JavaObject*)obj); } else if (ass == AssessorDesc::dDouble) { - return (jdouble)(*field)((JavaObject*)obj).DoubleVal; + return isStatic(field->access) ? + (jdouble)field->getStaticDoubleField() : + (jdouble)field->getVirtualDoubleField((JavaObject*)obj); } JavaThread::get()->isolate->illegalArgumentException(""); return 0.0; @@ -157,40 +240,68 @@ JNIEnv *env, #endif jobject Field, jobject _obj) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); Typedef* type = field->signature; const AssessorDesc* ass = type->funcs; JavaObject* obj = (JavaObject*)_obj; - llvm::GenericValue gv = (*field)(obj); Jnjvm* vm = JavaThread::get()->isolate; + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + JavaObject* res = 0; if (ass == AssessorDesc::dBool) { + uint8 val = (isStatic(field->access) ? + field->getStaticInt8Field() : + field->getVirtualInt8Field(obj)); res = (*Classpath::boolClass)(vm); - (*Classpath::boolValue)(res, (uint32)gv.IntVal.getBoolValue()); + Classpath::boolValue->setVirtualInt8Field(res, val); } else if (ass == AssessorDesc::dByte) { + sint8 val = (isStatic(field->access) ? + field->getStaticInt8Field() : + field->getVirtualInt8Field(obj)); res = (*Classpath::byteClass)(vm); - (*Classpath::byteValue)(res, (uint32)gv.IntVal.getSExtValue()); + Classpath::byteValue->setVirtualInt8Field(res, val); } else if (ass == AssessorDesc::dChar) { + uint16 val = (isStatic(field->access) ? + field->getStaticInt16Field() : + field->getVirtualInt16Field(obj)); res = (*Classpath::charClass)(vm); - (*Classpath::charValue)(res, (uint32)gv.IntVal.getZExtValue()); + Classpath::charValue->setVirtualInt16Field(res, val); } else if (ass == AssessorDesc::dShort) { + sint16 val = (isStatic(field->access) ? + field->getStaticInt16Field() : + field->getVirtualInt16Field(obj)); res = (*Classpath::shortClass)(vm); - (*Classpath::shortValue)(res, (uint32)gv.IntVal.getSExtValue()); + Classpath::shortValue->setVirtualInt16Field(res, val); } else if (ass == AssessorDesc::dInt) { + sint32 val = (isStatic(field->access) ? + field->getStaticInt32Field() : + field->getVirtualInt32Field(obj)); res = (*Classpath::intClass)(vm); - (*Classpath::intValue)(res, (uint32)gv.IntVal.getSExtValue()); + Classpath::intValue->setVirtualInt32Field(res, val); } else if (ass == AssessorDesc::dLong) { + sint64 val = (isStatic(field->access) ? + field->getStaticLongField() : + field->getVirtualLongField(obj)); res = (*Classpath::longClass)(vm); - (*Classpath::longValue)(res, (sint64)gv.IntVal.getSExtValue()); + Classpath::longValue->setVirtualLongField(res, val); } else if (ass == AssessorDesc::dFloat) { + float val = (isStatic(field->access) ? + field->getStaticFloatField() : + field->getVirtualFloatField(obj)); res = (*Classpath::floatClass)(vm); - (*Classpath::floatValue)(res, gv.FloatVal); + Classpath::floatValue->setVirtualFloatField(res, val); } else if (ass == AssessorDesc::dDouble) { + double val = (isStatic(field->access) ? + field->getStaticDoubleField() : + field->getVirtualDoubleField(obj)); res = (*Classpath::doubleClass)(vm); - (*Classpath::doubleValue)(res, gv.DoubleVal); + Classpath::doubleValue->setVirtualDoubleField(res, val); } else if (ass == AssessorDesc::dTab || ass == AssessorDesc::dRef) { - res = (JavaObject*)gv.PointerVal; + res = (isStatic(field->access) ? + field->getStaticObjectField() : + field->getVirtualObjectField(obj)); } else { JavaThread::get()->isolate->unknownError("should not be here"); } @@ -202,31 +313,52 @@ JNIEnv *env, #endif jobject Field, jobject obj, jobject val) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); void** buf = (void**)alloca(sizeof(uint64)); void* _buf = (void*)buf; NativeUtil::decapsulePrimitive(JavaThread::get()->isolate, buf, (JavaObject*)val, field->signature); const AssessorDesc* ass = field->signature->funcs; + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + if (ass == AssessorDesc::dBool) { - (*field)((JavaObject*)obj, ((uint32*)_buf)[0]); + isStatic(field->access) ? + field->setStaticInt8Field(((uint8*)_buf)[0]) : + field->setVirtualInt8Field((JavaObject*)obj, ((uint8*)_buf)[0]); } else if (ass == AssessorDesc::dByte) { - (*field)((JavaObject*)obj, ((uint32*)_buf)[0]); + isStatic(field->access) ? + field->setStaticInt8Field(((sint8*)_buf)[0]) : + field->setVirtualInt8Field((JavaObject*)obj, ((sint8*)_buf)[0]); } else if (ass == AssessorDesc::dChar) { - (*field)((JavaObject*)obj, ((uint32*)_buf)[0]); + isStatic(field->access) ? + field->setStaticInt16Field(((uint16*)_buf)[0]) : + field->setVirtualInt16Field((JavaObject*)obj, ((uint16*)_buf)[0]); } else if (ass == AssessorDesc::dShort) { - (*field)((JavaObject*)obj, ((uint32*)_buf)[0]); + isStatic(field->access) ? + field->setStaticInt16Field(((sint16*)_buf)[0]) : + field->setVirtualInt16Field((JavaObject*)obj, ((sint16*)_buf)[0]); } else if (ass == AssessorDesc::dInt) { - (*field)((JavaObject*)obj, ((uint32*)_buf)[0]); + isStatic(field->access) ? + field->setStaticInt32Field(((sint32*)_buf)[0]) : + field->setVirtualInt32Field((JavaObject*)obj, ((sint32*)_buf)[0]); } else if (ass == AssessorDesc::dLong) { - (*field)((JavaObject*)obj, ((sint64*)_buf)[0]); + isStatic(field->access) ? + field->setStaticLongField(((sint64*)_buf)[0]) : + field->setVirtualLongField((JavaObject*)obj, ((sint64*)_buf)[0]); } else if (ass == AssessorDesc::dFloat) { - (*field)((JavaObject*)obj, ((float*)_buf)[0]); + isStatic(field->access) ? + field->setStaticFloatField(((float*)_buf)[0]) : + field->setVirtualFloatField((JavaObject*)obj, ((float*)_buf)[0]); } else if (ass == AssessorDesc::dDouble) { - (*field)((JavaObject*)obj, ((double*)_buf)[0]); + isStatic(field->access) ? + field->setStaticDoubleField(((double*)_buf)[0]) : + field->setVirtualDoubleField((JavaObject*)obj, ((double*)_buf)[0]); } else if (ass == AssessorDesc::dTab || ass == AssessorDesc::dRef) { - (*field)((JavaObject*)obj, ((JavaObject**)_buf)[0]); + isStatic(field->access) ? + field->setStaticObjectField(((JavaObject**)_buf)[0]) : + field->setVirtualObjectField((JavaObject*)obj, ((JavaObject**)_buf)[0]); } else { JavaThread::get()->isolate->unknownError("should not be here"); } @@ -237,28 +369,56 @@ JNIEnv *env, #endif jobject Field, jobject obj, jboolean val) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; + if (ass != AssessorDesc::dBool) JavaThread::get()->isolate->illegalArgumentException(""); - (*field)((JavaObject*)obj, (uint32)val); + + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + + isStatic(field->access) ? + field->setStaticInt8Field((uint8)val) : + field->setVirtualInt8Field((JavaObject*)obj, (uint8)val); } JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setByte( #ifdef NATIVE_JNI JNIEnv *env, #endif -jobject Field, jobject obj, jbyte val) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); +jobject Field, jobject _obj, jbyte val) { + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; - if (ass == AssessorDesc::dByte || ass == AssessorDesc::dShort || ass == AssessorDesc::dInt) { - (*field)((JavaObject*)obj, (uint32)val); + JavaObject* obj = (JavaObject*)_obj; + + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + + if (ass == AssessorDesc::dByte) { + isStatic(field->access) ? + field->setStaticInt8Field((sint8)val) : + field->setVirtualInt8Field((JavaObject*)obj, (sint8)val); + } else if (ass == AssessorDesc::dShort) { + isStatic(field->access) ? + field->setStaticInt16Field((sint16)val) : + field->setVirtualInt16Field((JavaObject*)obj, (sint16)val); + } else if (ass == AssessorDesc::dInt) { + isStatic(field->access) ? + field->setStaticInt32Field((sint32)val) : + field->setVirtualInt32Field((JavaObject*)obj, (sint32)val); } else if (ass == AssessorDesc::dLong) { - (*field)((JavaObject*)obj, (sint64)val); + isStatic(field->access) ? + field->setStaticLongField((sint64)val) : + field->setVirtualLongField((JavaObject*)obj, (sint64)val); } else if (ass == AssessorDesc::dFloat) { - (*field)((JavaObject*)obj, (float)val); + isStatic(field->access) ? + field->setStaticFloatField((float)val) : + field->setVirtualFloatField((JavaObject*)obj, (float)val); } else if (ass == AssessorDesc::dDouble) { - (*field)((JavaObject*)obj, (double)val); + isStatic(field->access) ? + field->setStaticDoubleField((double)val) : + field->setVirtualDoubleField((JavaObject*)obj, (double)val); } else { JavaThread::get()->isolate->illegalArgumentException(""); } @@ -269,16 +429,32 @@ JNIEnv *env, #endif jobject Field, jobject obj, jchar val) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; - if (ass == AssessorDesc::dChar || ass == AssessorDesc::dInt) { - (*field)((JavaObject*)obj, (uint32)val); + + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + + if (ass == AssessorDesc::dChar) { + isStatic(field->access) ? + field->setStaticInt16Field((double)val) : + field->setVirtualDoubleField((JavaObject*)obj, (uint16)val); + } else if (ass == AssessorDesc::dInt) { + isStatic(field->access) ? + field->setStaticInt32Field((uint32)val) : + field->setVirtualInt32Field((JavaObject*)obj, (uint32)val); } else if (ass == AssessorDesc::dLong) { - (*field)((JavaObject*)obj, (sint64)val); + isStatic(field->access) ? + field->setStaticLongField((uint64)val) : + field->setVirtualLongField((JavaObject*)obj, (uint64)val); } else if (ass == AssessorDesc::dFloat) { - (*field)((JavaObject*)obj, (float)val); + isStatic(field->access) ? + field->setStaticFloatField((float)(uint32)val) : + field->setVirtualFloatField((JavaObject*)obj, (float)(uint32)val); } else if (ass == AssessorDesc::dDouble) { - (*field)((JavaObject*)obj, (double)val); + isStatic(field->access) ? + field->setStaticDoubleField((double)(uint64)val) : + field->setVirtualDoubleField((JavaObject*)obj, (double)(uint64)val); } else { JavaThread::get()->isolate->illegalArgumentException(""); } @@ -289,16 +465,32 @@ JNIEnv *env, #endif jobject Field, jobject obj, jshort val) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; - if (ass == AssessorDesc::dShort || ass == AssessorDesc::dInt) { - (*field)((JavaObject*)obj, (uint32)val); + + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + + if (ass == AssessorDesc::dShort) { + isStatic(field->access) ? + field->setStaticInt16Field((sint16)val) : + field->setVirtualInt16Field((JavaObject*)obj, (sint16)val); + } else if (ass == AssessorDesc::dInt) { + isStatic(field->access) ? + field->setStaticInt32Field((sint32)val) : + field->setVirtualInt32Field((JavaObject*)obj, (sint32)val); } else if (ass == AssessorDesc::dLong) { - (*field)((JavaObject*)obj, (sint64)val); + isStatic(field->access) ? + field->setStaticLongField((sint64)val) : + field->setVirtualLongField((JavaObject*)obj, (sint64)val); } else if (ass == AssessorDesc::dFloat) { - (*field)((JavaObject*)obj, (float)val); + isStatic(field->access) ? + field->setStaticFloatField((float)val) : + field->setVirtualFloatField((JavaObject*)obj, (float)val); } else if (ass == AssessorDesc::dDouble) { - (*field)((JavaObject*)obj, (double)val); + isStatic(field->access) ? + field->setStaticDoubleField((double)val) : + field->setVirtualDoubleField((JavaObject*)obj, (double)val); } else { JavaThread::get()->isolate->illegalArgumentException(""); } @@ -309,16 +501,28 @@ JNIEnv *env, #endif jobject Field, jobject obj, jint val) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; + + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + if (ass == AssessorDesc::dInt) { - (*field)((JavaObject*)obj, (uint32)val); + isStatic(field->access) ? + field->setStaticInt32Field((sint32)val) : + field->setVirtualInt32Field((JavaObject*)obj, (sint32)val); } else if (ass == AssessorDesc::dLong) { - (*field)((JavaObject*)obj, (sint64)val); + isStatic(field->access) ? + field->setStaticLongField((sint64)val) : + field->setVirtualLongField((JavaObject*)obj, (sint64)val); } else if (ass == AssessorDesc::dFloat) { - (*field)((JavaObject*)obj, (float)val); + isStatic(field->access) ? + field->setStaticFloatField((float)val) : + field->setVirtualFloatField((JavaObject*)obj, (float)val); } else if (ass == AssessorDesc::dDouble) { - (*field)((JavaObject*)obj, (double)val); + isStatic(field->access) ? + field->setStaticDoubleField((double)val) : + field->setVirtualDoubleField((JavaObject*)obj, (double)val); } else { JavaThread::get()->isolate->illegalArgumentException(""); } @@ -329,14 +533,24 @@ JNIEnv *env, #endif jobject Field, jobject obj, jlong val) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; + + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + if (ass == AssessorDesc::dLong) { - (*field)((JavaObject*)obj, (sint64)val); + isStatic(field->access) ? + field->setStaticLongField((sint64)val) : + field->setVirtualLongField((JavaObject*)obj, (sint64)val); } else if (ass == AssessorDesc::dFloat) { - (*field)((JavaObject*)obj, (float)val); + isStatic(field->access) ? + field->setStaticFloatField((float)val) : + field->setVirtualFloatField((JavaObject*)obj, (float)val); } else if (ass == AssessorDesc::dDouble) { - (*field)((JavaObject*)obj, (double)val); + isStatic(field->access) ? + field->setStaticDoubleField((double)val) : + field->setVirtualDoubleField((JavaObject*)obj, (double)val); } else { JavaThread::get()->isolate->illegalArgumentException(""); } @@ -347,12 +561,20 @@ JNIEnv *env, #endif jobject Field, jobject obj, jfloat val) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; + + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + if (ass == AssessorDesc::dFloat) { - (*field)((JavaObject*)obj, (float)val); + isStatic(field->access) ? + field->setStaticFloatField((float)val) : + field->setVirtualFloatField((JavaObject*)obj, (float)val); } else if (ass == AssessorDesc::dDouble) { - (*field)((JavaObject*)obj, (double)val); + isStatic(field->access) ? + field->setStaticDoubleField((double)val) : + field->setVirtualDoubleField((JavaObject*)obj, (double)val); } else { JavaThread::get()->isolate->illegalArgumentException(""); } @@ -363,10 +585,16 @@ JNIEnv *env, #endif jobject Field, jobject obj, jdouble val) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; + + if (isStatic(field->access)) + JavaThread::get()->isolate->initialiseClass(field->classDef); + if (ass == AssessorDesc::dDouble) { - (*field)((JavaObject*)obj, (double)val); + isStatic(field->access) ? + field->setStaticDoubleField((double)val) : + field->setVirtualDoubleField((JavaObject*)obj, (double)val); } else { JavaThread::get()->isolate->illegalArgumentException(""); } @@ -378,7 +606,7 @@ #endif JavaObject* Unsafe, JavaObject* Field) { - JavaField* field = (JavaField*)((*Classpath::fieldSlot)((JavaObject*)Field).IntVal.getZExtValue()); + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); return (jlong)field->ptrOffset; } Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp?rev=51242&r1=51241&r2=51242&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp Mon May 19 05:03:04 2008 @@ -72,7 +72,7 @@ #endif jclass _Cl) { JavaObject* Cl = (JavaObject*)_Cl; - CommonClass* cl = (CommonClass*)((*Cl)(Classpath::vmdataClass).PointerVal); + CommonClass* cl = (CommonClass*)Classpath::vmdataClass->getVirtualObjectField(Cl); return (jobject)cl->classLoader; } Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp?rev=51242&r1=51241&r2=51242&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp Mon May 19 05:03:04 2008 @@ -60,10 +60,10 @@ Collector::inject_my_thread(&argc); #endif CommonClass* vmthClass = vmThread->classOf; - JavaObject* thread = (JavaObject*)((*ClasspathThread::assocThread)(vmThread).PointerVal); + JavaObject* thread = ClasspathThread::assocThread->getVirtualObjectField(vmThread); JavaIsolate* isolate = (JavaIsolate*)(intern->isolate); ThreadSystem* ts = isolate->threadSystem; - bool isDaemon = (*ClasspathThread::daemon)(thread).IntVal.getBoolValue(); + bool isDaemon = ClasspathThread::daemon->getVirtualInt8Field(thread); if (!isDaemon) { ts->nonDaemonLock->lock(); @@ -109,13 +109,13 @@ #endif jobject _vmThread, sint64 stackSize) { JavaObject* vmThread = (JavaObject*)_vmThread; - JavaObject* javaThread = (JavaObject*)(*ClasspathThread::assocThread)(vmThread).PointerVal; + JavaObject* javaThread = ClasspathThread::assocThread->getVirtualObjectField(vmThread); assert(javaThread); Jnjvm* vm = JavaThread::get()->isolate; JavaThread* th = vm_new(vm, JavaThread)(); th->initialise(javaThread, vm); - (*ClasspathThread::vmdata)(vmThread, (JavaObject*)th); + ClasspathThread::vmdata->setVirtualObjectField(vmThread, (JavaObject*)th); int tid = 0; arg_thread_t* arg = (arg_thread_t*)malloc(sizeof(arg_thread_t)); arg->intern = th; @@ -134,9 +134,10 @@ jobject _vmthread) { JavaObject* vmthread = (JavaObject*)_vmthread; - while ((*ClasspathThread::vmdata)(vmthread).PointerVal == 0) mvm::Thread::yield(); + while (ClasspathThread::vmdata->getVirtualObjectField(vmthread) == 0) + mvm::Thread::yield(); - JavaThread* th = (JavaThread*)(*ClasspathThread::vmdata)(vmthread).PointerVal; + JavaThread* th = (JavaThread*)ClasspathThread::vmdata->getVirtualObjectField(vmthread); th->lock->lock(); th->interruptFlag = 1; @@ -167,7 +168,7 @@ #endif jobject _vmthread) { JavaObject* vmthread = (JavaObject*)_vmthread; - JavaThread* th = (JavaThread*)(*ClasspathThread::vmdata)(vmthread).PointerVal; + JavaThread* th = (JavaThread*)ClasspathThread::vmdata->getVirtualObjectField(vmthread); return (jboolean)th->interruptFlag; } Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp?rev=51242&r1=51241&r2=51242&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp Mon May 19 05:03:04 2008 @@ -9,8 +9,6 @@ #include -#include "llvm/Type.h" - #include "types.h" #include "JavaAccess.h" @@ -99,7 +97,7 @@ JNIEnv *env, #endif jobject vmthrow, jobject throwable) { - int** stack = (int**)(ArrayUInt32*)(*Classpath::vmDataVMThrowable)((JavaObject*)vmthrow).PointerVal; + int** stack = (int**)Classpath::vmDataVMThrowable->getVirtualObjectField((JavaObject*)vmthrow); CommonClass* cl = ((JavaObject*)throwable)->classOf; uint32 first = 0; sint32 i = 0; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h?rev=51242&r1=51241&r2=51242&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h Mon May 19 05:03:04 2008 @@ -14,8 +14,6 @@ #include "types.h" -#include "llvm/ExecutionEngine/GenericValue.h" - #include "mvm/Method.h" #include "mvm/Object.h" #include "mvm/PrintBuffer.h" @@ -126,8 +124,8 @@ /// for a given class. mvm::Lock* lockVar; - /// condVar - Used to wake threads waiting on the load/resolve/initialize process - /// of this class, done by another thread. + /// condVar - Used to wake threads waiting on the load/resolve/initialize + /// process of this class, done by another thread. mvm::Cond* condVar; /// classLoader - The Java class loader that loaded the class. @@ -378,17 +376,37 @@ virtual void print(mvm::PrintBuffer *buf) const; virtual void TRACER; - llvm::GenericValue operator()(JavaObject* obj = 0); - void operator()(JavaObject* obj, float val); - void operator()(JavaObject* obj, double val); - void operator()(JavaObject* obj, uint32 val); - void operator()(JavaObject* obj, sint64 val); - void operator()(JavaObject* obj, JavaObject* val); - void operator()(float val); - void operator()(double val); - void operator()(uint32 val); - void operator()(sint64 val); - + void setStaticFloatField(float val); + void setStaticDoubleField(double val); + void setStaticInt8Field(uint8 val); + void setStaticInt16Field(uint16 val); + void setStaticInt32Field(uint32 val); + void setStaticLongField(sint64 val); + void setStaticObjectField(JavaObject* val); + + float getStaticFloatField(); + double getStaticDoubleField(); + uint8 getStaticInt8Field(); + uint16 getStaticInt16Field(); + uint32 getStaticInt32Field(); + sint64 getStaticLongField(); + JavaObject* getStaticObjectField(); + + void setVirtualFloatField(JavaObject* obj, float val); + void setVirtualDoubleField(JavaObject* obj, double val); + void setVirtualInt8Field(JavaObject* obj, uint8 val); + void setVirtualInt16Field(JavaObject* obj, uint16 val); + void setVirtualInt32Field(JavaObject* obj, uint32 val); + void setVirtualLongField(JavaObject* obj, sint64 val); + void setVirtualObjectField(JavaObject* obj, JavaObject* val); + + float getVirtualFloatField(JavaObject* obj); + double getVirtualDoubleField(JavaObject* obj); + uint8 getVirtualInt8Field(JavaObject* obj); + uint16 getVirtualInt16Field(JavaObject* obj); + uint32 getVirtualInt32Field(JavaObject* obj); + sint64 getVirtualLongField(JavaObject* obj); + JavaObject* getVirtualObjectField(JavaObject* obj); }; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp?rev=51242&r1=51241&r2=51242&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp Mon May 19 05:03:04 2008 @@ -350,7 +350,7 @@ JavaThread::clearException(); JavaObject* obj = JavaThread::currentThread(); JavaObject* group = - (JavaObject*)((*obj)(ClasspathThread::group)).PointerVal; + ClasspathThread::group->getVirtualObjectField(obj); try{ ClasspathThread::uncaughtException->invokeIntSpecial(this, group, obj, exc); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp?rev=51242&r1=51241&r2=51242&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp Mon May 19 05:03:04 2008 @@ -59,143 +59,53 @@ return doNew(vm); } -void JavaField::operator()(JavaObject* obj, float val) { - if (!classDef->isReady()) - classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); - - bool stat = isStatic(access); - if (stat) obj = classDef->staticInstance(); - void* ptr = (void*)((uint64)obj + ptrOffset); - - if (signature->funcs->llvmType == Type::FloatTy) { - ((float*)ptr)[0] = val; - } else { - JavaThread::get()->isolate->illegalArgumentException("wrong type in field assignment"); - } -} - -void JavaField::operator()(JavaObject* obj, double val) { - if (!classDef->isReady()) - classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); - - bool stat = isStatic(access); - if (stat) obj = classDef->staticInstance(); - void* ptr = (void*)((uint64)obj + ptrOffset); - - if (signature->funcs->llvmType == Type::DoubleTy) { - ((double*)ptr)[0] = val; - } else { - JavaThread::get()->isolate->illegalArgumentException("wrong type in field assignment"); - } -} - -void JavaField::operator()(JavaObject* obj, sint64 val) { - if (!classDef->isReady()) - classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); - - bool stat = isStatic(access); - if (stat) obj = classDef->staticInstance(); - void* ptr = (void*)((uint64)obj + ptrOffset); - - if (signature->funcs == AssessorDesc::dLong) { - ((uint64*)ptr)[0] = val; - } else { - JavaThread::get()->isolate->illegalArgumentException("wrong type in field assignment"); - } +#define GETVIRTUALFIELD(TYPE, TYPE_NAME) \ +TYPE JavaField::getVirtual##TYPE_NAME##Field(JavaObject* obj) { \ + if (!classDef->isReady()) \ + classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); \ + void* ptr = (void*)((uint64)obj + ptrOffset); \ + return ((TYPE*)ptr)[0]; \ } -void JavaField::operator()(JavaObject* obj, uint32 val) { - if (!classDef->isReady()) - classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); - - bool stat = isStatic(access); - if (stat) obj = classDef->staticInstance(); - void* ptr = (void*)((uint64)obj + ptrOffset); - - if (signature->funcs == AssessorDesc::dInt) { - ((sint32*)ptr)[0] = (sint32)val; - } else if (signature->funcs == AssessorDesc::dShort) { - ((sint16*)ptr)[0] = (sint16)val; - } else if (signature->funcs == AssessorDesc::dByte) { - ((sint8*)ptr)[0] = (sint8)val; - } else if (signature->funcs == AssessorDesc::dBool) { - ((uint8*)ptr)[0] = (uint8)val; - } else if (signature->funcs == AssessorDesc::dChar) { - ((uint16*)ptr)[0] = (uint16)val; - } else { - JavaThread::get()->isolate->illegalArgumentException("wrong type in field assignment"); - } +#define GETSTATICFIELD(TYPE, TYPE_NAME) \ +TYPE JavaField::getStatic##TYPE_NAME##Field() { \ + if (!classDef->isReady()) \ + classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); \ + JavaObject* obj = classDef->staticInstance(); \ + void* ptr = (void*)((uint64)obj + ptrOffset); \ + return ((TYPE*)ptr)[0]; \ } -void JavaField::operator()(JavaObject* obj, JavaObject* val) { - if (!classDef->isReady()) - classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); - - bool stat = isStatic(access); - if (stat) obj = classDef->staticInstance(); - void* ptr = (void*)((uint64)obj + ptrOffset); - - if (signature->funcs == AssessorDesc::dRef || - signature->funcs == AssessorDesc::dTab) { - ((JavaObject**)ptr)[0] = val; - } else { - JavaThread::get()->isolate->illegalArgumentException("wrong type in field assignment"); - } +#define SETVIRTUALFIELD(TYPE, TYPE_NAME) \ +void JavaField::setVirtual##TYPE_NAME##Field(JavaObject* obj, TYPE val) { \ + if (!classDef->isReady()) \ + classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); \ + void* ptr = (void*)((uint64)obj + ptrOffset); \ + ((TYPE*)ptr)[0] = val; \ } -GenericValue JavaField::operator()(JavaObject* obj) { - if (!classDef->isReady()) - classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); - - bool stat = isStatic(access); - if (stat) { - if (obj != 0) { - // Assignment to a static var - void* ptr = (void*)((uint64)(classDef->staticInstance()) + ptrOffset); - ((JavaObject**)ptr)[0] = obj; - return GenericValue(0); - } else { - // Get a static var - obj = classDef->staticInstance(); - } - } - - assert(obj && "getting a field from a null value"); - - void* ptr = (void*)((uint64)obj + ptrOffset); - const Type* type = signature->funcs->llvmType; - if (type == Type::Int8Ty) { - GenericValue gv; - gv.IntVal = APInt(8, ((uint8*)ptr)[0]); - return gv; - } else if (type == Type::Int16Ty) { - GenericValue gv; - gv.IntVal = APInt(16, ((uint16*)ptr)[0]); - return gv; - } else if (type == Type::Int32Ty) { - GenericValue gv; - gv.IntVal = APInt(32, ((uint32*)ptr)[0]); - return gv; - } else if (type == Type::Int64Ty) { - GenericValue gv; - gv.IntVal = APInt(64, ((uint64*)ptr)[0]); - return gv; - } else if (type == Type::DoubleTy) { - GenericValue gv; - gv.DoubleVal = ((double*)ptr)[0]; - return gv; - } else if (type == Type::FloatTy) { - GenericValue gv; - gv.FloatVal = ((float*)ptr)[0]; - return gv; - } else if (type == JnjvmModule::JavaObjectType) { - GenericValue gv(((JavaObject**)ptr)[0]); - return gv; - } else { - assert(0 && "Unknown type!"); - return GenericValue(0); - } -} +#define SETSTATICFIELD(TYPE, TYPE_NAME) \ +void JavaField::setStatic##TYPE_NAME##Field(TYPE val) { \ + if (!classDef->isReady()) \ + classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); \ + JavaObject* obj = classDef->staticInstance(); \ + void* ptr = (void*)((uint64)obj + ptrOffset); \ + ((TYPE*)ptr)[0] = val; \ +} + +#define MK_ASSESSORS(TYPE, TYPE_NAME) \ + GETVIRTUALFIELD(TYPE, TYPE_NAME) \ + SETVIRTUALFIELD(TYPE, TYPE_NAME) \ + GETSTATICFIELD(TYPE, TYPE_NAME) \ + SETSTATICFIELD(TYPE, TYPE_NAME) \ + +MK_ASSESSORS(float, Float); +MK_ASSESSORS(double, Double); +MK_ASSESSORS(JavaObject*, Object); +MK_ASSESSORS(uint8, Int8); +MK_ASSESSORS(uint16, Int16); +MK_ASSESSORS(uint32, Int32); +MK_ASSESSORS(sint64, Long); #define readArgs(buf, signature, ap) \ for (std::vector::iterator i = signature->args.begin(), \ @@ -443,47 +353,3 @@ INVOKE(JavaObject*, JavaObject, object_virtual_ap, object_static_ap, object_virtual_buf, object_static_buf) #undef INVOKE - -GenericValue JavaObject::operator()(JavaField* field) { - return (*field)(this); -} - -void JavaObject::operator()(JavaField* field, float val) { - return (*field)(this, val); -} - -void JavaObject::operator()(JavaField* field, double val) { - return (*field)(this, val); -} - -void JavaObject::operator()(JavaField* field, uint32 val) { - return (*field)(this, val); -} - -void JavaObject::operator()(JavaField* field, sint64 val) { - return (*field)(this, val); -} - -void JavaObject::operator()(JavaField* field, JavaObject* val) { - return (*field)(this, val); -} - -void JavaField::operator()(float val) { - JavaField * field = this; - return (*field)(0, val); -} - -void JavaField::operator()(double val) { - JavaField * field = this; - return (*field)(0, val); -} - -void JavaField::operator()(sint64 val) { - JavaField * field = this; - return (*field)(0, val); -} - -void JavaField::operator()(uint32 val) { - JavaField * field = this; - return (*field)(0, val); -} Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaObject.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaObject.h?rev=51242&r1=51241&r2=51242&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaObject.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaObject.h Mon May 19 05:03:04 2008 @@ -12,8 +12,6 @@ #include -#include "llvm/ExecutionEngine/GenericValue.h" - #include "mvm/Object.h" #include "mvm/Threads/Locks.h" @@ -99,13 +97,6 @@ if (obj == 0) JavaThread::get()->isolate->nullPointerException(""); #endif - llvm::GenericValue operator()(JavaField* field); - void operator()(JavaField* field, float val); - void operator()(JavaField* field, double val); - void operator()(JavaField* field, sint64 val); - void operator()(JavaField* field, uint32 val); - void operator()(JavaField* field, JavaObject* val); - }; Modified: vmkit/trunk/lib/JnJVM/VMCore/Jni.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jni.cpp?rev=51242&r1=51241&r2=51242&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Jni.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Jni.cpp Mon May 19 05:03:04 2008 @@ -88,9 +88,9 @@ JavaObject* meth = (JavaObject*)method; CommonClass* cl = meth->classOf; if (cl == Classpath::newConstructor) { - return (jmethodID)(*Classpath::constructorSlot)(meth).IntVal.getZExtValue(); + return (jmethodID)Classpath::constructorSlot->getVirtualInt32Field(meth); } else if (cl == Classpath::newMethod) { - return (jmethodID)(*Classpath::methodSlot)(meth).IntVal.getZExtValue(); + return (jmethodID)Classpath::methodSlot->getVirtualInt32Field(meth); } else { JavaThread::get()->isolate->unknownError( "%s is not a constructor or a method", @@ -852,7 +852,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - return (jobject)((*field)(o).PointerVal); + return (jobject)field->getVirtualObjectField(o); END_EXCEPTION return 0; @@ -865,7 +865,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - return (uint8)((*field)(o).IntVal.getZExtValue()); + return (uint8)field->getVirtualInt8Field(o); END_EXCEPTION return 0; @@ -878,7 +878,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - return (sint8)((*field)(o).IntVal.getSExtValue()); + return (sint8)field->getVirtualInt8Field(o); END_EXCEPTION return 0; @@ -891,7 +891,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - return (uint16)((*field)(o).IntVal.getZExtValue()); + return (uint16)field->getVirtualInt16Field(o); END_EXCEPTION return 0; @@ -904,7 +904,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - return (sint16)((*field)(o).IntVal.getSExtValue()); + return (sint16)field->getVirtualInt16Field(o); END_EXCEPTION return 0; @@ -917,7 +917,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - return (sint32)((*field)(o).IntVal.getSExtValue()); + return (sint32)field->getVirtualInt32Field(o); END_EXCEPTION return 0; @@ -930,7 +930,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - return (sint64)((*field)(o).IntVal.getSExtValue()); + return (sint64)field->getVirtualLongField(o); END_EXCEPTION return 0; @@ -943,7 +943,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - return (*field)(o).FloatVal; + return field->getVirtualFloatField(o); END_EXCEPTION return 0; @@ -956,7 +956,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - return (*field)(o).DoubleVal; + return (jdouble)field->getVirtualDoubleField(o); END_EXCEPTION return 0; @@ -969,7 +969,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - (*field)(o, (JavaObject*)value); + field->setVirtualObjectField(o, (JavaObject*)value); END_EXCEPTION } @@ -982,7 +982,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - (*field)(o, (uint32)value); + field->setVirtualInt8Field(o, (uint8)value); END_EXCEPTION } @@ -994,7 +994,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - (*field)(o, (uint32)value); + field->setVirtualInt8Field(o, (uint8)value); END_EXCEPTION } @@ -1006,7 +1006,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - (*field)(o, (uint32)value); + field->setVirtualInt16Field(o, (uint16)value); END_EXCEPTION } @@ -1018,7 +1018,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - (*field)(o, (uint32)value); + field->setVirtualInt16Field(o, (sint16)value); END_EXCEPTION } @@ -1030,7 +1030,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - (*field)(o, (uint32)value); + field->setVirtualInt32Field(o, (sint32)value); END_EXCEPTION } @@ -1042,7 +1042,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - (*field)(o, (sint64)value); + field->setVirtualLongField(o, (sint64)value); END_EXCEPTION } @@ -1054,7 +1054,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - (*field)(o, (float)value); + field->setVirtualFloatField(o, (float)value); END_EXCEPTION } @@ -1066,7 +1066,7 @@ JavaField* field = (JavaField*)fieldID; JavaObject* o = (JavaObject*)obj; - (*field)(o, (double)value); + field->setVirtualDoubleField(o, (float)value); END_EXCEPTION } @@ -1343,8 +1343,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - llvm::GenericValue res = (*field)(); - return (jobject)res.PointerVal; + return (jobject)field->getStaticObjectField(); END_EXCEPTION return 0; @@ -1356,8 +1355,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - llvm::GenericValue res = (*field)(); - return (jboolean)res.IntVal.getZExtValue(); + return (jboolean)field->getStaticInt8Field(); END_EXCEPTION return 0; @@ -1369,8 +1367,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - llvm::GenericValue res = (*field)(); - return (jbyte)res.IntVal.getSExtValue(); + return (jbyte)field->getStaticInt8Field(); END_EXCEPTION return 0; @@ -1382,8 +1379,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - llvm::GenericValue res = (*field)(); - return (jchar)res.IntVal.getZExtValue(); + return (jchar)field->getStaticInt16Field(); END_EXCEPTION return 0; @@ -1395,8 +1391,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - llvm::GenericValue res = (*field)(); - return (jshort)res.IntVal.getSExtValue(); + return (jshort)field->getStaticInt16Field(); END_EXCEPTION return 0; @@ -1408,8 +1403,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - llvm::GenericValue res = (*field)(); - return (jint)res.IntVal.getSExtValue(); + return (jint)field->getStaticInt32Field(); END_EXCEPTION return 0; @@ -1421,8 +1415,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - llvm::GenericValue res = (*field)(); - return (jlong)res.IntVal.getZExtValue(); + return (jlong)field->getStaticLongField(); END_EXCEPTION return 0; @@ -1434,8 +1427,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - llvm::GenericValue res = (*field)(); - return (jfloat)res.FloatVal; + return (jfloat)field->getStaticFloatField(); END_EXCEPTION return 0; @@ -1447,8 +1439,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - llvm::GenericValue res = (*field)(); - return (jdouble)res.DoubleVal; + return (jdouble)field->getStaticDoubleField(); END_EXCEPTION return 0; @@ -1461,7 +1452,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - (*field)((JavaObject*)value); + field->setStaticObjectField((JavaObject*)value); END_EXCEPTION } @@ -1473,7 +1464,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - (*field)((uint32)value); + field->setStaticInt8Field((uint8)value); END_EXCEPTION } @@ -1485,7 +1476,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - (*field)((uint32)value); + field->setStaticInt8Field((sint8)value); END_EXCEPTION } @@ -1497,7 +1488,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - (*field)((uint32)value); + field->setStaticInt16Field((uint16)value); END_EXCEPTION } @@ -1509,7 +1500,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - (*field)((uint32)value); + field->setStaticInt16Field((sint16)value); END_EXCEPTION } @@ -1521,7 +1512,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - (*field)((uint32)value); + field->setStaticInt32Field((sint32)value); END_EXCEPTION } @@ -1533,7 +1524,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - (*field)((sint64)value); + field->setStaticLongField((sint64)value); END_EXCEPTION } @@ -1545,7 +1536,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - (*field)((float)value); + field->setStaticFloatField((float)value); END_EXCEPTION } @@ -1557,7 +1548,7 @@ BEGIN_EXCEPTION JavaField* field = (JavaField*)fieldID; - (*field)((double)value); + field->setStaticDoubleField((double)value); END_EXCEPTION } @@ -2152,9 +2143,9 @@ BEGIN_EXCEPTION JavaObject* buf = (JavaObject*)_buf; - JavaObject* address = (JavaObject*)((*Classpath::bufferAddress)(buf).PointerVal); + JavaObject* address = Classpath::bufferAddress->getVirtualObjectField(buf); if (address != 0) { - int res = (*Classpath::dataPointer32)(address).IntVal.getZExtValue(); + int res = Classpath::dataPointer32->getVirtualInt32Field(address); return (void*)res; } else { return 0; Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp?rev=51242&r1=51241&r2=51242&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp Mon May 19 05:03:04 2008 @@ -641,18 +641,18 @@ if (loader) { #ifndef SERVICE_VM ClassMap* map = - (ClassMap*)(*Classpath::vmdataClassLoader)(loader).PointerVal; + (ClassMap*)(Classpath::vmdataClassLoader->getVirtualObjectField(loader)); if (!map) { map = vm_new(this, ClassMap)(); - (*Classpath::vmdataClassLoader)(loader, (JavaObject*)map); + Classpath::vmdataClassLoader->setVirtualObjectField(loader, (JavaObject*)map); } #else ClassMap* map = 0; ServiceDomain* vm = - (ServiceDomain*)(*Classpath::vmdataClassLoader)(loader).PointerVal; + (ServiceDomain*)(Classpath::vmdataClassLoader->getVirtualObjectField(loader)); if (!vm) { vm = ServiceDomain::allocateService((JavaIsolate*)Jnjvm::bootstrapVM); - (*Classpath::vmdataClassLoader)(loader, (JavaObject*)vm); + Classpath::vmdataClassLoader->setVirtualObjectField(loader, (JavaObject*)vm); } map = vm->classes; #endif @@ -690,19 +690,19 @@ if (loader) { #ifndef SERVICE_VM ClassMap* map = - (ClassMap*)(*Classpath::vmdataClassLoader)(loader).PointerVal; + (ClassMap*)(Classpath::vmdataClassLoader->getVirtualObjectField(loader)); if (!map) { map = vm_new(this, ClassMap)(); - (*Classpath::vmdataClassLoader)(loader, (JavaObject*)map); + Classpath::vmdataClassLoader->setVirtualObjectField(loader, (JavaObject*)map); } ClassArray* res = (ClassArray*)map->lookupOrCreate(name, this, arrayDup); #else ClassMap* map = 0; ServiceDomain* vm = - (ServiceDomain*)(*Classpath::vmdataClassLoader)(loader).PointerVal; + (ServiceDomain*)(Classpath::vmdataClassLoader->getVirtualObjectField(loader)); if (!vm) { vm = ServiceDomain::allocateService((JavaIsolate*)Jnjvm::bootstrapVM); - (*Classpath::vmdataClassLoader)(loader, (JavaObject*)vm); + Classpath::vmdataClassLoader->getVirtualObjectField(loader, (JavaObject*)vm); } map = vm->classes; ClassArray* res = (ClassArray*)map->lookupOrCreate(name, vm, arrayDup); @@ -733,19 +733,19 @@ if (loader) { #ifndef SERVICE_VM ClassMap* map = - (ClassMap*)(*Classpath::vmdataClassLoader)(loader).PointerVal; + (ClassMap*)(Classpath::vmdataClassLoader->getVirtualObjectField(loader)); if (!map) { map = vm_new(this, ClassMap)(); - (*Classpath::vmdataClassLoader)(loader, (JavaObject*)map); + (Classpath::vmdataClassLoader->setVirtualObjectField(loader, (JavaObject*)map)); } Class* res = (Class*)map->lookupOrCreate(name, this, classDup); #else ClassMap* map = 0; ServiceDomain* vm = - (ServiceDomain*)(*Classpath::vmdataClassLoader)(loader).PointerVal; + (ServiceDomain*)(Classpath::vmdataClassLoader->getVirtualObjectField(loader)); if (!vm) { vm = ServiceDomain::allocateService((JavaIsolate*)Jnjvm::bootstrapVM); - (*Classpath::vmdataClassLoader)(loader, (JavaObject*)vm); + Classpath::vmdataClassLoader->setVirtualObjectField(loader, (JavaObject*)vm); } map = vm->classes; Class* res = (Class*)map->lookupOrCreate(name, vm, classDup); @@ -825,7 +825,7 @@ JavaString* str = this->UTF8ToStr(name); JavaObject* obj = (JavaObject*) Classpath::loadInClassLoader->invokeJavaObjectVirtual(this, loader, str); - return (CommonClass*)((*Classpath::vmdataClass)(obj).PointerVal); + return (CommonClass*)(Classpath::vmdataClass->getVirtualObjectField(obj)); } JavaString* Jnjvm::UTF8ToStr(const UTF8* utf8) { Modified: vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp?rev=51242&r1=51241&r2=51242&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp Mon May 19 05:03:04 2008 @@ -229,7 +229,7 @@ CommonClass* NativeUtil::resolvedImplClass(jclass clazz, bool doClinit) { JavaObject *Cl = (JavaObject*)clazz; - CommonClass* cl = (CommonClass*)((*Cl)(Classpath::vmdataClass).PointerVal); + CommonClass* cl = (CommonClass*)Classpath::vmdataClass->getVirtualObjectField(Cl); cl->resolveClass(doClinit); return cl; } @@ -258,13 +258,12 @@ if (funcs == AssessorDesc::dShort) { if (value == AssessorDesc::dShort) { - llvm::GenericValue val = (*Classpath::shortValue)(obj); - ((uint32*)buf)[0] = (uint32)val.IntVal.getSExtValue(); + ((uint16*)buf)[0] = Classpath::shortValue->getVirtualInt16Field(obj); buf++; return; } else if (value == AssessorDesc::dByte) { - llvm::GenericValue val = (*Classpath::shortValue)(obj); - ((uint32*)buf)[0] = (uint32)val.IntVal.getSExtValue(); + ((sint16*)buf)[0] = + (sint16)Classpath::byteValue->getVirtualInt8Field(obj); buf++; return; } else { @@ -272,8 +271,7 @@ } } else if (funcs == AssessorDesc::dByte) { if (value == AssessorDesc::dByte) { - llvm::GenericValue val = (*Classpath::byteValue)(obj); - ((uint32*)buf)[0] = (uint32)val.IntVal.getSExtValue(); + ((uint8*)buf)[0] = Classpath::byteValue->getVirtualInt8Field(obj); buf++; return; } else { @@ -281,170 +279,98 @@ } } else if (funcs == AssessorDesc::dBool) { if (value == AssessorDesc::dBool) { - llvm::GenericValue val = (*Classpath::boolValue)(obj); - ((uint32*)buf)[0] = (uint32)val.IntVal.getZExtValue(); + ((uint8*)buf)[0] = Classpath::boolValue->getVirtualInt8Field(obj); buf++; return; } else { vm->illegalArgumentException(""); } } else if (funcs == AssessorDesc::dInt) { + sint32 val = 0; if (value == AssessorDesc::dInt) { - llvm::GenericValue val = (*Classpath::intValue)(obj); - ((uint32*)buf)[0] = (uint32)val.IntVal.getSExtValue(); - buf++; + val = Classpath::intValue->getVirtualInt32Field(obj); } else if (value == AssessorDesc::dByte) { - llvm::GenericValue val = (*Classpath::byteValue)(obj); - ((uint32*)buf)[0] = (uint32)val.IntVal.getSExtValue(); - buf++; - return; + val = (sint32)Classpath::byteValue->getVirtualInt8Field(obj); } else if (value == AssessorDesc::dChar) { - llvm::GenericValue val = (*Classpath::charValue)(obj); - ((uint32*)buf)[0] = (uint32)val.IntVal.getZExtValue(); - buf++; - return; + val = (uint32)Classpath::charValue->getVirtualInt16Field(obj); } else if (value == AssessorDesc::dShort) { - llvm::GenericValue val = (*Classpath::shortValue)(obj); - ((uint32*)buf)[0] = val.IntVal.getSExtValue(); - buf++; - return; + val = (sint32)Classpath::shortValue->getVirtualInt16Field(obj); } else { vm->illegalArgumentException(""); } + ((sint32*)buf)[0] = val; + buf++; + return; } else if (funcs == AssessorDesc::dChar) { + uint16 val = 0; if (value == AssessorDesc::dChar) { - llvm::GenericValue val = (*Classpath::charValue)(obj); - ((uint32*)buf)[0] = (uint32)val.IntVal.getZExtValue(); - buf++; - return; + val = (uint16)Classpath::charValue->getVirtualInt16Field(obj); } else { vm->illegalArgumentException(""); } + ((uint16*)buf)[0] = val; + buf++; + return; } else if (funcs == AssessorDesc::dFloat) { + float val = 0; if (value == AssessorDesc::dFloat) { - llvm::GenericValue val = (*Classpath::floatValue)(obj); - ((float*)buf)[0] = val.FloatVal; - buf++; - return; + val = (float)Classpath::floatValue->getVirtualFloatField(obj); } else if (value == AssessorDesc::dByte) { - llvm::GenericValue val = (*Classpath::byteValue)(obj); - float res = (float)(val.IntVal.getSExtValue()); - ((float*)buf)[0] = res; - buf++; - return; + val = (float)(sint32)Classpath::byteValue->getVirtualInt8Field(obj); } else if (value == AssessorDesc::dChar) { - llvm::GenericValue val = (*Classpath::charValue)(obj); - float res = (float)(val.IntVal.getZExtValue()); - ((float*)buf)[0] = res; - buf++; - return; + val = (float)(uint32)Classpath::charValue->getVirtualInt16Field(obj); } else if (value == AssessorDesc::dShort) { - llvm::GenericValue val = (*Classpath::shortValue)(obj); - float res = (float)(val.IntVal.getSExtValue()); - ((float*)buf)[0] = res; - buf++; - return; + val = (float)(sint32)Classpath::shortValue->getVirtualInt16Field(obj); } else if (value == AssessorDesc::dInt) { - llvm::GenericValue val = (*Classpath::intValue)(obj); - float res = (float)(val.IntVal.getSExtValue()); - ((float*)buf)[0] = res; - buf++; - return; + val = (float)(sint32)Classpath::intValue->getVirtualInt32Field(obj); } else if (value == AssessorDesc::dLong) { - llvm::GenericValue val = (*Classpath::longValue)(obj); - float res = (float)(val.IntVal.getSExtValue()); - ((float*)buf)[0] = res; - buf++; - return; + val = (float)Classpath::longValue->getVirtualLongField(obj); } else { vm->illegalArgumentException(""); } + ((float*)buf)[0] = val; + buf++; + return; } else if (funcs == AssessorDesc::dDouble) { + double val = 0; if (value == AssessorDesc::dDouble) { - llvm::GenericValue gv = (*Classpath::doubleValue)(obj); - ((double*)buf)[0] = gv.DoubleVal; - buf++; - buf++; - return; + val = (double)Classpath::doubleValue->getVirtualDoubleField(obj); } else if (value == AssessorDesc::dFloat) { - llvm::GenericValue val = (*Classpath::floatValue)(obj); - double res = (double)(val.FloatVal); - ((double*)buf)[0] = res; - buf++; - buf++; - return; + val = (double)Classpath::floatValue->getVirtualFloatField(obj); } else if (value == AssessorDesc::dByte) { - llvm::GenericValue val = (*Classpath::byteValue)(obj); - double res = (double)(val.IntVal.getSExtValue()); - ((double*)buf)[0] = res; - buf++; - buf++; - return; + val = (double)(sint64)Classpath::byteValue->getVirtualInt8Field(obj); } else if (value == AssessorDesc::dChar) { - llvm::GenericValue val = (*Classpath::charValue)(obj); - double res = (double)(val.IntVal.getZExtValue()); - ((double*)buf)[0] = res; - buf++; - buf++; - return; + val = (double)(uint64)Classpath::charValue->getVirtualInt16Field(obj); } else if (value == AssessorDesc::dShort) { - llvm::GenericValue val = (*Classpath::shortValue)(obj); - double res = (double)(val.IntVal.getSExtValue()); - ((double*)buf)[0] = res; - buf++; - buf++; - return; + val = (double)(sint16)Classpath::shortValue->getVirtualInt16Field(obj); } else if (value == AssessorDesc::dInt) { - llvm::GenericValue val = (*Classpath::intValue)(obj); - double res = (double)(val.IntVal.getSExtValue()); - ((double*)buf)[0] = res; - buf++; - buf++; - return; + val = (double)(sint32)Classpath::intValue->getVirtualInt32Field(obj); } else if (value == AssessorDesc::dLong) { - llvm::GenericValue val = (*Classpath::longValue)(obj); - double res = (double)(val.IntVal.getSExtValue()); - ((double*)buf)[0] = res; - buf++; - buf++; - return; + val = (double)(sint64)Classpath::longValue->getVirtualLongField(obj); } else { vm->illegalArgumentException(""); } + ((double*)buf)[0] = val; + buf += 2; + return; } else if (funcs == AssessorDesc::dLong) { + sint64 val = 0; if (value == AssessorDesc::dByte) { - llvm::GenericValue val = (*Classpath::byteValue)(obj); - ((uint64*)buf)[0] = val.IntVal.getSExtValue(); - buf++; - buf++; - return; + val = (sint64)Classpath::byteValue->getVirtualInt8Field(obj); } else if (value == AssessorDesc::dChar) { - llvm::GenericValue val = (*Classpath::charValue)(obj); - ((uint64*)buf)[0] = val.IntVal.getZExtValue(); - buf++; - buf++; - return; + val = (sint64)(uint64)Classpath::charValue->getVirtualInt16Field(obj); } else if (value == AssessorDesc::dShort) { - llvm::GenericValue val = (*Classpath::shortValue)(obj); - ((uint64*)buf)[0] = val.IntVal.getSExtValue(); - buf++; - buf++; - return; + val = (sint64)Classpath::shortValue->getVirtualInt16Field(obj); } else if (value == AssessorDesc::dInt) { - llvm::GenericValue val = (*Classpath::intValue)(obj); - ((uint64*)buf)[0] = val.IntVal.getSExtValue(); - buf++; - buf++; - return; + val = (sint64)Classpath::intValue->getVirtualInt32Field(obj); } else if (value == AssessorDesc::dLong) { - llvm::GenericValue val = (*Classpath::longValue)(obj); - ((uint64*)buf)[0] = val.IntVal.getSExtValue(); - buf++; - buf++; - return; + val = (sint64)Classpath::intValue->getVirtualLongField(obj); } else { vm->illegalArgumentException(""); } + ((sint64*)buf)[0] = val; + buf += 2; + return; } } // can not be here From nicolas.geoffray at lip6.fr Mon May 19 05:11:09 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Mon, 19 May 2008 10:11:09 -0000 Subject: [llvm-commits] [vmkit] r51243 - /vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp Message-ID: <200805191011.m4JAB9CG001734@zion.cs.uiuc.edu> Author: geoffray Date: Mon May 19 05:11:08 2008 New Revision: 51243 URL: http://llvm.org/viewvc/llvm-project?rev=51243&view=rev Log: Fix typo. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp?rev=51243&r1=51242&r2=51243&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp Mon May 19 05:11:08 2008 @@ -227,7 +227,7 @@ setProperty = UPCALL_METHOD(vm, "java/util/Properties", "setProperty", - "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;"; + "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;", ACC_VIRTUAL); initString = From nicolas.geoffray at lip6.fr Mon May 19 05:11:59 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Mon, 19 May 2008 10:11:59 -0000 Subject: [llvm-commits] [vmkit] r51244 - in /vmkit/trunk/lib/JnJVM/Classpath: ClasspathConstructor.cpp ClasspathMethod.cpp ClasspathVMClass.cpp ClasspathVMClassLoader.cpp ClasspathVMObject.cpp ClasspathVMRuntime.cpp ClasspathVMSystem.cpp ClasspathVMSystemProperties.cpp ClasspathVMThread.cpp Message-ID: <200805191011.m4JABx9v001778@zion.cs.uiuc.edu> Author: geoffray Date: Mon May 19 05:11:59 2008 New Revision: 51244 URL: http://llvm.org/viewvc/llvm-project?rev=51244&view=rev Log: Classpath interface does not depend on LLVM. Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClassLoader.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMObject.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystemProperties.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp?rev=51244&r1=51243&r2=51244&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp Mon May 19 05:11:59 2008 @@ -10,8 +10,6 @@ #include -#include "llvm/Type.h" - #include "types.h" #include "JavaArray.h" Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp?rev=51244&r1=51243&r2=51244&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp Mon May 19 05:11:59 2008 @@ -10,8 +10,6 @@ #include -#include "llvm/Type.h" - #include "types.h" #include "JavaArray.h" Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp?rev=51244&r1=51243&r2=51244&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp Mon May 19 05:11:59 2008 @@ -9,8 +9,6 @@ #include -#include "llvm/Type.h" - #include "types.h" #include "JavaAccess.h" Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClassLoader.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClassLoader.cpp?rev=51244&r1=51243&r2=51244&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClassLoader.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClassLoader.cpp Mon May 19 05:11:59 2008 @@ -9,8 +9,6 @@ #include -#include "llvm/Type.h" - #include "types.h" #include "JavaArray.h" Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMObject.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMObject.cpp?rev=51244&r1=51243&r2=51244&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMObject.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMObject.cpp Mon May 19 05:11:59 2008 @@ -9,8 +9,6 @@ #include -#include "llvm/Type.h" - #include "types.h" #include "JavaArray.h" Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp?rev=51244&r1=51243&r2=51244&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMRuntime.cpp Mon May 19 05:11:59 2008 @@ -12,8 +12,6 @@ #include "MvmGC.h" -#include "llvm/Type.h" - #include "types.h" #include "JavaArray.h" Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp?rev=51244&r1=51243&r2=51244&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp Mon May 19 05:11:59 2008 @@ -9,8 +9,6 @@ #include -#include "llvm/Type.h" - #include "types.h" #include "JavaArray.h" @@ -87,7 +85,7 @@ } } - uint32 size = srcFuncs->llvmType->getPrimitiveSizeInBits() / 8; + uint32 size = srcFuncs->nbb; if (size == 0) size = sizeof(void*); void* ptrDst = (void*)((int64_t)(dst->elements) + size * dstart); void* ptrSrc = (void*)((int64_t)(src->elements) + size * sstart); Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystemProperties.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystemProperties.cpp?rev=51244&r1=51243&r2=51244&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystemProperties.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystemProperties.cpp Mon May 19 05:11:59 2008 @@ -11,8 +11,6 @@ #include #include -#include "llvm/Type.h" - #include "types.h" #include "JavaArray.h" Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp?rev=51244&r1=51243&r2=51244&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThread.cpp Mon May 19 05:11:59 2008 @@ -9,8 +9,6 @@ #include -#include "llvm/Type.h" - #include "types.h" #include "mvm/Threads/Thread.h" From romix.llvm at googlemail.com Mon May 19 05:13:00 2008 From: romix.llvm at googlemail.com (Roman Levenstein) Date: Mon, 19 May 2008 12:13:00 +0200 Subject: [llvm-commits] Speeding up RegAllocLinearScan on big test-cases In-Reply-To: References: <149F341F-BD78-4D7D-86D9-9A8B63015DA5@apple.com> <64355EDB-A34D-4A65-BB1E-F0246B886C94@apple.com> <16e5fdf90805061553u6b25f716wb4476068a18b88b2@mail.gmail.com> <4933F9BB-8DED-43F1-BDAE-4F59D23E9CA3@apple.com> <4DFD57BC-7873-4326-B028-AB0AD9D6B323@apple.com> Message-ID: Hi, 2008/5/19 Roman Levenstein : > Hi, > > 2008/5/18 Chris Lattner : > > > > > > > > > On May 16, 2008, at 8:20 AM, Roman Levenstein wrote: > > > > So, we can see, that performance-wise the difference is not that huge. > > But if we look at the number of new/delete calls, then it is quite > > different: > > 1) without STL standard allocator - Total of only 847(!!!) mallocs for > > all of the allocators together, while adding 1000000 nodes for each > > of them. > > 2) with STL standard allocator - Total of 2000628 mallocs for all of > > the allocators together, while adding 1000000 nodes for each of them. > > > > So, the standard allocator of STL produces a huge number of > > new/delete calls. And other allocators reduce it > > by almost 4 orders of magnitude. But, as mentioned before, it DOES NOT > > result in a big performance difference on > > my Ubuntu/Linux/x86 machine, which indicates that mallocs are very > > efficient here. But for you it seems to be very different... > > > > Hey Roman, > > > > Also, I don't know how your setup is arranged. > > I have written a special small program to test different allocators. I > have there test_list() and test_set() methods, that test std::list and > std::set respectively. > Each of them creates all the empty lists/sets first, sets different > allocators to handle their respective lists/sets and then tries to add > 1000000 elements to them. > Once it is done, the test function: > - sorts lists. > - or deletes some elements from set (e.g. every 4th o so), intermixed > with insertion. > > > > In the case of > > LLVM, the heap is significantly fragmented before a pass starts beating on > > (f.e.) a std::map. When the nodes go through malloc, this means that the > > nodes for one map end up scattered throughout the heap. My guess is that > > this makes traversals far more expensive than when using a pool allocator > > that makes them contiguous. > > May be. In my case, there are no preallocated data structures on the > heap and therefore it is not very fragmented. > > > > it would be interesting to measure the locality effect of using new/delete. > > Well, it goes eventually too far for my small investigation :-) What I > could do, is to add a small initialization pass to my test program > that would try to allocate a lot of objects and try free some of them > randomly. It should probably create a fragmented heap. And then I can > start my experiments, as they are currently done. I implemented this proposal. > If your assumption holds, I should see that STL's standard allocator would perform much worse than before. Chris, you're absolutely right!!! The standard STL allocators is now much slower after a special prepass creates artificially a lot of fragmented memory. When I redo the same tests that I did before, the performance figures for STl containers using standard allocators are about 2 times worse than for all other allocators(whose performance is unaffected by the heap fragmentation). I can also nicely see that the performance of containers using the standard STL allocator constantly degrades as memory fragmentation increases. -Roman From nicolas.geoffray at lip6.fr Mon May 19 06:56:17 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Mon, 19 May 2008 11:56:17 -0000 Subject: [llvm-commits] [vmkit] r51245 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaClass.cpp JavaConstantPool.cpp JavaConstantPool.h JavaIsolate.cpp JavaJIT.cpp JavaMetaJIT.cpp Jni.cpp Jnjvm.h JnjvmModule.cpp JnjvmModule.h JnjvmModuleProvider.cpp JnjvmModuleProvider.h LockedMap.h NativeUtil.cpp NativeUtil.h ServiceDomain.cpp ServiceDomain.h VirtualTables.cpp Message-ID: <200805191156.m4JBuIXg004671@zion.cs.uiuc.edu> Author: geoffray Date: Mon May 19 06:56:16 2008 New Revision: 51245 URL: http://llvm.org/viewvc/llvm-project?rev=51245&view=rev Log: Remove LLVM dependencies in some core JnJVM files. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp vmkit/trunk/lib/JnJVM/VMCore/Jni.cpp vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.h vmkit/trunk/lib/JnJVM/VMCore/ServiceDomain.cpp vmkit/trunk/lib/JnJVM/VMCore/ServiceDomain.h vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp Mon May 19 06:56:16 2008 @@ -11,10 +11,6 @@ #include -#include "llvm/Constants.h" -#include "llvm/DerivedTypes.h" - - #include "mvm/JIT.h" #include "types.h" Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp Mon May 19 06:56:16 2008 @@ -12,8 +12,6 @@ #include #include -#include "llvm/GlobalValue.h" - #include "debug.h" #include "JavaAccess.h" @@ -398,11 +396,10 @@ cl = resolveClassName(entry >> 16); } -llvm::Function* JavaCtpInfo::infoOfStaticOrSpecialMethod( - uint32 index, - uint32 access, - Signdef*& sign, - JavaMethod*& meth) { +void* JavaCtpInfo::infoOfStaticOrSpecialMethod(uint32 index, + uint32 access, + Signdef*& sign, + JavaMethod*& meth) { uint8 id = typeAt(index); if (id != ConstantMethodref && id != ConstantInterfaceMethodref) JavaThread::get()->isolate->error(Jnjvm::ClassFormatError, @@ -418,8 +415,7 @@ meth = cl->lookupMethodDontThrow(utf8, sign->keyName, isStatic(access), false); if (meth) { // don't throw if no meth, the exception will be thrown just in time JnjvmModule* M = classDef->isolate->module; - LLVMMethodInfo* LMI = M->getMethodInfo(meth); - llvm::Function* F = LMI->getMethod(); + void* F = M->getMethod(meth); ctpRes[index] = (void*)F; return F; } @@ -427,25 +423,14 @@ // Must be a callback if (ctpRes[index]) { - return (llvm::Function*)ctpRes[index]; + return ctpRes[index]; } else { - // Create the callback - const llvm::FunctionType* type = 0; - JnjvmModule* M = classDef->isolate->module; - LLVMSignatureInfo* LSI = M->getSignatureInfo(sign); - if (isStatic(access)) { - type = LSI->getStaticType(); - } else { - type = LSI->getVirtualType(); - } - llvm::Function* func = llvm::Function::Create(type, - llvm::GlobalValue::GhostLinkage, - "callback", - classDef->isolate->module); - classDef->isolate->TheModuleProvider->functions->hash(func, - new std::pair(classDef, index)); - ctpRes[index] = func; - return func; + void* val = + classDef->isolate->TheModuleProvider->addCallback(classDef, index, sign, + isStatic(access)); + + ctpRes[index] = val; + return val; } } Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h Mon May 19 06:56:16 2008 @@ -14,8 +14,6 @@ #include "types.h" -#include "llvm/Function.h" - namespace jnjvm { class Class; @@ -108,10 +106,10 @@ Typedef* resolveNameAndType(uint32 index); Typedef* infoOfField(uint32 index); Signdef* infoOfInterfaceOrVirtualMethod(uint32 index); - llvm::Function* infoOfStaticOrSpecialMethod(uint32 index, - uint32 access, - Signdef*& sign, - JavaMethod*& meth); + void* infoOfStaticOrSpecialMethod(uint32 index, + uint32 access, + Signdef*& sign, + JavaMethod*& meth); void nameOfStaticOrSpecialMethod(uint32 index, const UTF8*& cl, const UTF8*& name, Signdef*& sign); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp Mon May 19 06:56:16 2008 @@ -447,16 +447,12 @@ isolate->analyseClasspathEnv(isolate->bootClasspathEnv); - isolate->functions = vm_new(isolate, FunctionMap)(); - isolate->functionDefs = vm_new(isolate, FunctionDefMap)(); isolate->module = new JnjvmModule("Isolate JnJVM"); std::string str = mvm::jit::executionEngine->getTargetData()->getStringRepresentation(); isolate->module->setDataLayout(str); isolate->protectModule = mvm::Lock::allocNormal(); - isolate->TheModuleProvider = new JnjvmModuleProvider(isolate->module, - isolate->functions, - isolate->functionDefs); + isolate->TheModuleProvider = new JnjvmModuleProvider(isolate->module); mvm::jit::protectEngine->lock(); mvm::jit::executionEngine->addModuleProvider(isolate->TheModuleProvider); mvm::jit::protectEngine->unlock(); @@ -519,16 +515,12 @@ isolate->analyseClasspathEnv(isolate->bootClasspathEnv); - isolate->functions = vm_new(isolate, FunctionMap)(); - isolate->functionDefs = vm_new(isolate, FunctionDefMap)(); isolate->protectModule = mvm::Lock::allocNormal(); isolate->module = new JnjvmModule("Bootstrap JnJVM"); std::string str = mvm::jit::executionEngine->getTargetData()->getStringRepresentation(); isolate->module->setDataLayout(str); - isolate->TheModuleProvider = new JnjvmModuleProvider(isolate->module, - isolate->functions, - isolate->functionDefs); + isolate->TheModuleProvider = new JnjvmModuleProvider(isolate->module); mvm::jit::protectEngine->lock(); mvm::jit::executionEngine->addModuleProvider(isolate->TheModuleProvider); mvm::jit::protectEngine->unlock(); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp Mon May 19 06:56:16 2008 @@ -232,7 +232,8 @@ } else { JavaObject* loader = compilingClass->classLoader; ServiceDomain* vm = ServiceDomain::getDomainFromLoader(loader); - isolateLocal = new LoadInst(vm->llvmDelegatee(), "", currentBlock); + LLVMServiceInfo* LSI = module->getServiceInfo(vm); + isolateLocal = LSI->getDelegatee(this); Value* cmp = new ICmpInst(ICmpInst::ICMP_NE, lastArg, isolateLocal, "", currentBlock); BasicBlock* ifTrue = createBasicBlock("true service call"); @@ -471,7 +472,8 @@ } else { JavaObject* loader = compilingClass->classLoader; ServiceDomain* vm = ServiceDomain::getDomainFromLoader(loader); - isolateLocal = new LoadInst(vm->llvmDelegatee(), "", currentBlock); + LLVMServiceInfo* LSI = module->getServiceInfo(vm); + isolateLocal = LSI->getDelegatee(this); Value* cmp = new ICmpInst(ICmpInst::ICMP_NE, args[args.size() - 1], isolateLocal, "", currentBlock); BasicBlock* ifTrue = createBasicBlock("true service call"); @@ -635,7 +637,8 @@ } else { JavaObject* loader = compilingClass->classLoader; ServiceDomain* vm = ServiceDomain::getDomainFromLoader(loader); - isolateLocal = new LoadInst(vm->llvmDelegatee(), "", currentBlock); + LLVMServiceInfo* LSI = module->getServiceInfo(vm); + isolateLocal = LSI->getDelegatee(this); Value* cmp = new ICmpInst(ICmpInst::ICMP_NE, i, isolateLocal, "", currentBlock); BasicBlock* ifTrue = createBasicBlock("true service call"); @@ -1420,8 +1423,9 @@ if (!val) { - Function* func = ctpInfo->infoOfStaticOrSpecialMethod(index, ACC_VIRTUAL, - signature, meth); + Function* func = + (Function*)ctpInfo->infoOfStaticOrSpecialMethod(index, ACC_VIRTUAL, + signature, meth); if (meth && meth->canBeInlined && meth != compilingMethod && inlineMethods[meth] == 0) { @@ -1463,8 +1467,9 @@ } if (!val) { - Function* func = ctpInfo->infoOfStaticOrSpecialMethod(index, ACC_STATIC, - signature, meth); + Function* func = (Function*) + ctpInfo->infoOfStaticOrSpecialMethod(index, ACC_STATIC, + signature, meth); #ifdef MULTIPLE_VM Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp Mon May 19 06:56:16 2008 @@ -10,9 +10,6 @@ #include #include -#include -#include "llvm/ExecutionEngine/GenericValue.h" - #include "mvm/JIT.h" #include "mvm/Method.h" @@ -27,7 +24,6 @@ #include "JnjvmModule.h" using namespace jnjvm; -using namespace llvm; void JavaJIT::invokeOnceVoid(Jnjvm* vm, JavaObject* loader, char const* className, char const* func, Modified: vmkit/trunk/lib/JnJVM/VMCore/Jni.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jni.cpp?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Jni.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Jni.cpp Mon May 19 06:56:16 2008 @@ -9,8 +9,6 @@ #include -#include "llvm/ExecutionEngine/GenericValue.h" - #include "JavaArray.h" #include "JavaClass.h" #include "JavaJIT.h" Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h Mon May 19 06:56:16 2008 @@ -264,8 +264,6 @@ mvm::Lock* protectModule; JnjvmModule* module; JnjvmModuleProvider* TheModuleProvider; - FunctionMap* functions; - FunctionDefMap* functionDefs; #ifndef MULTIPLE_GC void* allocateObject(unsigned int sz, VirtualTable* VT) { Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Mon May 19 06:56:16 2008 @@ -18,6 +18,7 @@ #include "JavaTypes.h" #include "Jnjvm.h" #include "JnjvmModule.h" +#include "JnjvmModuleProvider.h" #include "LockedMap.h" @@ -468,7 +469,7 @@ GlobalValue::GhostLinkage, methodDef->printString(), vm->module); - vm->functionDefs->hash(methodFunction, methodDef); + vm->TheModuleProvider->addFunction(methodFunction, methodDef); } return methodFunction; } @@ -835,6 +836,33 @@ } } +#ifdef SERVICE_VM +LLVMServiceInfo* JnjvmModule::getServiceInfo(ServiceDomain* S) { + service_iterator SI = serviceMap.find(S); + if (SI != serviceMap.end()) { + return SI->second; + } else { + LLVMServiceInfo* LSI = new LLVMServiceInfo(sign); + serviceMap.insert(std::make_pair(S, LSI)); + return LSI; + } +} + +Value* LLVMServiceInfo::getDelegatee(JavaJIT* jit) { + if (!delegateeGV) { + Constant* cons = + ConstantExpr::getIntToPtr(ConstantInt::get(Type::Int64Ty, uint64(vm)), + mvm::jit::ptrType); + delegateeGV = new GlobalVariable(mvm::jit::ptrType, true, + GlobalValue::ExternalLinkage, + cons, "", + vm->module); + } + return new LoadInst(delegateeGV, "", jit->currentBlock); +} + +#endif + #include "LLVMRuntime.cpp" @@ -1028,3 +1056,7 @@ func->setName(name); func->setLinkage(llvm::GlobalValue::ExternalLinkage); } + +void* JnjvmModule::getMethod(JavaMethod* meth) { + return getMethodInfo(meth)->getMethod(); +} Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h Mon May 19 06:56:16 2008 @@ -194,6 +194,17 @@ }; +#ifdef SERVICE_VM +class LLVMServiceInfo { +private: + ServiceDomain* vm; + llvm::GlobalVariable* delegateeGV; + +public: + llvm::Value* getDelegatee(JavaJIT* jit); +}; +#endif + class JnjvmModule : public llvm::Module { friend class LLVMClassInfo; private: @@ -201,6 +212,12 @@ std::map signatureMap; std::map fieldMap; std::map methodMap; + +#ifdef SERVICE_VM + std::map serviceMap; + typedef std::map::iterator + class_iterator; +#endif typedef std::map::iterator class_iterator; @@ -318,11 +335,15 @@ void resolveVirtualClass(Class* cl); void resolveStaticClass(Class* cl); void setMethod(JavaMethod* meth, const char* name); + void* getMethod(JavaMethod* meth); LLVMSignatureInfo* getSignatureInfo(Signdef*); LLVMCommonClassInfo* getClassInfo(CommonClass*); LLVMFieldInfo* getFieldInfo(JavaField*); LLVMMethodInfo* getMethodInfo(JavaMethod*); +#ifdef SERVICE_VM + LLVMServiceInfo* getServiceInfo(ServiceDomain*); +#endif explicit JnjvmModule(const std::string &ModuleID) : llvm::Module(ModuleID) {} void initialise(); Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp Mon May 19 06:56:16 2008 @@ -43,6 +43,26 @@ return meth; } +bool JnjvmModuleProvider::lookupCallback(Function* F, std::pair& res) { + callback_iterator CI = callbacks.find(F); + if (CI != callbacks.end()) { + res.first = CI->second.first; + res.second = CI->second.second; + return true; + } else { + return false; + } +} + +bool JnjvmModuleProvider::lookupFunction(Function* F, JavaMethod*& meth) { + function_iterator CI = functions.find(F); + if (CI != functions.end()) { + meth = CI->second; + return true; + } else { + return false; + } +} bool JnjvmModuleProvider::materializeFunction(Function *F, std::string *ErrInfo) { @@ -53,12 +73,14 @@ if (!(F->hasNotBeenReadFromBitcode())) return false; - JavaMethod* meth = functionDefs->lookup(F); + JavaMethod* meth = 0; + lookupFunction(F, meth); if (!meth) { // It's a callback - std::pair * p = functions->lookup(F); - meth = staticLookup(p->first, p->second); + std::pair p; + lookupCallback(F, p); + meth = staticLookup(p.first, p.second); } void* val = meth->compiledPtr(); @@ -94,3 +116,27 @@ return mvm::jit::executionEngine->getPointerToGlobal(func); } + +llvm::Function* JnjvmModuleProvider::addCallback(Class* cl, uint32 index, + Signdef* sign, bool stat) { + const llvm::FunctionType* type = 0; + JnjvmModule* M = cl->isolate->module; + LLVMSignatureInfo* LSI = M->getSignatureInfo(sign); + + if (stat) { + type = LSI->getStaticType(); + } else { + type = LSI->getVirtualType(); + } + Function* func = llvm::Function::Create(type, + llvm::GlobalValue::GhostLinkage, + "callback", + cl->isolate->module); + + callbacks.insert(std::make_pair(func, std::make_pair(cl, index))); + return func; +} + +void JnjvmModuleProvider::addFunction(Function* F, JavaMethod* meth) { + functions.insert(std::make_pair(F, meth)); +} Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h Mon May 19 06:56:16 2008 @@ -20,19 +20,59 @@ class JnjvmModule; +class FunctionMap : + public LockedMap*, + std::less > { +public: + static VirtualTable* VT; + + FunctionMap() { + lock = mvm::Lock::allocNormal(); + } + + virtual void TRACER; +}; + +class FunctionDefMap : + public LockedMap > { +public: + static VirtualTable* VT; + + FunctionDefMap() { + lock = mvm::Lock::allocNormal(); + } + + virtual void TRACER; +}; + + class JnjvmModuleProvider : public ModuleProvider { private: JavaMethod* staticLookup(Class* caller, uint32 index); + + std::map functions; + std::map > callbacks; + + bool lookupCallback(llvm::Function*, std::pair&); + bool lookupFunction(llvm::Function*, JavaMethod*& meth); + + typedef std::map::iterator + function_iterator; + + typedef std::map >::iterator + callback_iterator; + public: - FunctionMap* functions; - FunctionDefMap* functionDefs; - JnjvmModuleProvider(JnjvmModule *m, FunctionMap* fm, FunctionDefMap* fdm) { + + JnjvmModuleProvider(JnjvmModule *m) { TheModule = (Module*)m; - functions = fm; - functionDefs= fdm; } + llvm::Function* addCallback(Class* cl, uint32 index, Signdef* sign, + bool stat); + void addFunction(llvm::Function* F, JavaMethod* meth); bool materializeFunction(Function *F, std::string *ErrInfo = 0); void* materializeFunction(JavaMethod* meth); Modified: vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h Mon May 19 06:56:16 2008 @@ -221,30 +221,6 @@ virtual void TRACER; }; -class FunctionMap : - public LockedMap*, std::less > { -public: - static VirtualTable* VT; - - FunctionMap() { - lock = mvm::Lock::allocNormal(); - } - - virtual void TRACER; -}; - -class FunctionDefMap : - public LockedMap > { -public: - static VirtualTable* VT; - - FunctionDefMap() { - lock = mvm::Lock::allocNormal(); - } - - virtual void TRACER; -}; - class TypeMap : public LockedMap { public: Modified: vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp Mon May 19 06:56:16 2008 @@ -7,8 +7,6 @@ // //===----------------------------------------------------------------------===// -#include "llvm/ExecutionEngine/GenericValue.h" - #include #include #include Modified: vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.h?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.h Mon May 19 06:56:16 2008 @@ -12,9 +12,6 @@ #include -#include "llvm/ExecutionEngine/ExecutionEngine.h" - - namespace jnjvm { class ArrayObject; Modified: vmkit/trunk/lib/JnJVM/VMCore/ServiceDomain.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/ServiceDomain.cpp?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/ServiceDomain.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/ServiceDomain.cpp Mon May 19 06:56:16 2008 @@ -15,18 +15,12 @@ #include "JnjvmModuleProvider.h" #include "ServiceDomain.h" -#include -#include - extern "C" struct JNINativeInterface JNI_JNIEnvTable; extern "C" const struct JNIInvokeInterface JNI_JavaVMTable; using namespace jnjvm; -llvm::Function* ServiceDomain::serviceCallStartLLVM; -llvm::Function* ServiceDomain::serviceCallStopLLVM; - JavaMethod* ServiceDomain::ServiceErrorInit; Class* ServiceDomain::ServiceErrorClass; ServiceDomain* ServiceDomain::bootstrapDomain; @@ -36,31 +30,6 @@ JavaMethod* ServiceDomain::uninstallBundle; -GlobalVariable* ServiceDomain::llvmDelegatee() { - if (!_llvmDelegatee) { - lock->lock(); - if (!_llvmDelegatee) { - const Type* pty = mvm::jit::ptrType; - - mvm::jit::protectConstants();//->lock(); - Constant* cons = - ConstantExpr::getIntToPtr(ConstantInt::get(Type::Int64Ty, uint64(this)), - pty); - mvm::jit::unprotectConstants();//->unlock(); - - this->protectModule->lock(); - _llvmDelegatee = new GlobalVariable(pty, true, - GlobalValue::ExternalLinkage, - cons, "", - this->module); - this->protectModule->unlock(); - } - lock->unlock(); - } - return _llvmDelegatee; -} - - void ServiceDomain::destroyer(size_t sz) { Jnjvm::destroyer(sz); delete lock; @@ -85,7 +54,7 @@ service->bootClasspath = callingVM->bootClasspath; service->functions = vm_new(service, FunctionMap)(); service->functionDefs = vm_new(service, FunctionDefMap)(); - service->module = new llvm::Module("Service Domain"); + service->module = new JnjvmModule("Service Domain"); std::string str = mvm::jit::executionEngine->getTargetData()->getStringRepresentation(); service->module->setDataLayout(str); Modified: vmkit/trunk/lib/JnJVM/VMCore/ServiceDomain.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/ServiceDomain.h?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/ServiceDomain.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/ServiceDomain.h Mon May 19 06:56:16 2008 @@ -17,11 +17,6 @@ #include "JavaIsolate.h" -namespace llvm { - class GlobalVariable; - class Function; -} - namespace mvm { class Lock; } @@ -35,8 +30,6 @@ }DomainState; class ServiceDomain : public JavaIsolate { -private: - llvm::GlobalVariable* _llvmDelegatee; public: static VirtualTable* VT; @@ -44,7 +37,6 @@ virtual void TRACER; virtual void destroyer(size_t sz); static ServiceDomain* allocateService(JavaIsolate* callingVM); - llvm::GlobalVariable* llvmDelegatee(); static void serviceError(ServiceDomain* error, const char* str); mvm::Lock* lock; Modified: vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp?rev=51245&r1=51244&r2=51245&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Mon May 19 06:56:16 2008 @@ -69,8 +69,6 @@ INIT(StringMap); INIT(TypeMap); INIT(StaticInstanceMap); - INIT(FunctionMap); - INIT(FunctionDefMap); INIT(JavaIsolate); INIT(JavaString); INIT(CacheNode); @@ -214,14 +212,10 @@ loadedFields->MARK_AND_TRACE; javaTypes->MARK_AND_TRACE; TRACE_VECTOR(JavaObject*, gc_allocator, globalRefs); - //globalRefsLock->MARK_AND_TRACE; - functions->MARK_AND_TRACE; - functionDefs->MARK_AND_TRACE; #ifdef MULTIPLE_VM statics->MARK_AND_TRACE; delegatees->MARK_AND_TRACE; #endif - //protectModule->MARK_AND_TRACE; } void Reader::TRACER { @@ -294,18 +288,6 @@ } } -void FunctionMap::TRACER { - for (iterator i = map.begin(), e = map.end(); i!= e; ++i) { - i->second->first->MARK_AND_TRACE; - } -} - -void FunctionDefMap::TRACER { - for (iterator i = map.begin(), e = map.end(); i!= e; ++i) { - i->second->MARK_AND_TRACE; - } -} - void TypeMap::TRACER { for (iterator i = map.begin(), e = map.end(); i!= e; ++i) { i->second->MARK_AND_TRACE; From nicolas.geoffray at lip6.fr Mon May 19 07:42:17 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Mon, 19 May 2008 12:42:17 -0000 Subject: [llvm-commits] [vmkit] r51246 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaArray.cpp JavaIsolate.cpp JavaJIT.cpp JavaJIT.h JavaJITInitialise.cpp JavaRuntimeJIT.cpp JavaThread.cpp JavaThread.h Jnjvm.h JnjvmModule.cpp JnjvmModule.h JnjvmModuleProvider.cpp JnjvmModuleProvider.h Makefile.am Message-ID: <200805191242.m4JCgIEO005955@zion.cs.uiuc.edu> Author: geoffray Date: Mon May 19 07:42:17 2008 New Revision: 51246 URL: http://llvm.org/viewvc/llvm-project?rev=51246&view=rev Log: The less Jnjvm core files know about LLVM, the better. Removed: vmkit/trunk/lib/JnJVM/VMCore/JavaJITInitialise.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaArray.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.h vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaThread.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h vmkit/trunk/lib/JnJVM/VMCore/Makefile.am Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaArray.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaArray.cpp?rev=51246&r1=51245&r2=51246&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaArray.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaArray.cpp Mon May 19 07:42:17 2008 @@ -41,13 +41,17 @@ ClassArray* JavaArray::ofString = 0; ClassArray* JavaArray::ofObject = 0; +// This will force linking runtime methods +extern "C" void negativeArraySizeException(sint32 val); +extern "C" void outOfMemoryError(sint32 val); + #ifndef MULTIPLE_VM #define ACONS(name, elmt, primSize) \ name *name::acons(sint32 n, ClassArray* atype, Jnjvm* vm) { \ if (n < 0) \ - JavaThread::get()->isolate->negativeArraySizeException(n); \ + negativeArraySizeException(n); \ else if (n > JavaArray::MaxArraySize) \ - JavaThread::get()->isolate->outOfMemoryError(n); \ + outOfMemoryError(n); \ name* res = (name*) \ (Object*) operator new(sizeof(name) + n * primSize, name::VT); \ res->initialise(atype); \ @@ -58,9 +62,9 @@ #define ACONS(name, elmt, primSize) \ name *name::acons(sint32 n, ClassArray* atype, Jnjvm* vm) { \ if (n < 0) \ - JavaThread::get()->isolate->negativeArraySizeException(n); \ + negativeArraySizeException(n); \ else if (n > JavaArray::MaxArraySize) \ - JavaThread::get()->isolate->outOfMemoryError(n); \ + outOfMemoryError(n); \ name* res = (name*) \ (Object*) vm->allocateObject(sizeof(name) + n * primSize, name::VT); \ res->initialise(atype); \ Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp?rev=51246&r1=51245&r2=51246&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp Mon May 19 07:42:17 2008 @@ -9,11 +9,6 @@ #include -#include "llvm/Module.h" -#include "llvm/PassManager.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/Target/TargetData.h" - #include "mvm/JIT.h" #include "mvm/MvmMemoryManager.h" #include "mvm/Threads/Locks.h" @@ -448,14 +443,7 @@ isolate->analyseClasspathEnv(isolate->bootClasspathEnv); isolate->module = new JnjvmModule("Isolate JnJVM"); - std::string str = - mvm::jit::executionEngine->getTargetData()->getStringRepresentation(); - isolate->module->setDataLayout(str); - isolate->protectModule = mvm::Lock::allocNormal(); isolate->TheModuleProvider = new JnjvmModuleProvider(isolate->module); - mvm::jit::protectEngine->lock(); - mvm::jit::executionEngine->addModuleProvider(isolate->TheModuleProvider); - mvm::jit::protectEngine->unlock(); isolate->bootstrapThread = vm_new(isolate, JavaThread)(); isolate->bootstrapThread->initialise(0, isolate); @@ -517,15 +505,9 @@ isolate->protectModule = mvm::Lock::allocNormal(); isolate->module = new JnjvmModule("Bootstrap JnJVM"); - std::string str = - mvm::jit::executionEngine->getTargetData()->getStringRepresentation(); - isolate->module->setDataLayout(str); isolate->TheModuleProvider = new JnjvmModuleProvider(isolate->module); - mvm::jit::protectEngine->lock(); - mvm::jit::executionEngine->addModuleProvider(isolate->TheModuleProvider); - mvm::jit::protectEngine->unlock(); isolate->module->initialise(); - + isolate->bootstrapThread = vm_new(isolate, JavaThread)(); isolate->bootstrapThread->initialise(0, isolate); void* baseSP = mvm::Thread::get()->baseSP; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp?rev=51246&r1=51245&r2=51246&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp Mon May 19 07:42:17 2008 @@ -730,7 +730,6 @@ } func->setLinkage(GlobalValue::ExternalLinkage); - mvm::jit::runPasses(llvmFunction, JavaThread::get()->perFunctionPasses); /* if (compilingMethod->name == Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.h?rev=51246&r1=51245&r2=51246&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.h Mon May 19 07:42:17 2008 @@ -219,8 +219,6 @@ static void printBacktrace(); static int getBacktrace(void** array, int size); static JavaMethod* IPToJavaMethod(void* ip); - static void initialise(); - static void AddStandardCompilePasses(llvm::FunctionPassManager*); }; enum Opcode { Removed: vmkit/trunk/lib/JnJVM/VMCore/JavaJITInitialise.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJITInitialise.cpp?rev=51245&view=auto ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaJITInitialise.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaJITInitialise.cpp (removed) @@ -1,97 +0,0 @@ -//===------JavaJITInitialise.cpp - Initialization of LLVM objects ---------===// -// -// JnJVM -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include - -#include "llvm/CallingConv.h" -#include "llvm/Instructions.h" -#include "llvm/LinkAllPasses.h" -#include "llvm/Module.h" -#include "llvm/ParameterAttributes.h" -#include "llvm/Analysis/LoopPass.h" -#include "llvm/Support/MutexGuard.h" - - -#include "mvm/JIT.h" -#include "mvm/Method.h" - -#include "JavaArray.h" -#include "JavaCache.h" -#include "JavaClass.h" -#include "JavaJIT.h" -#include "JavaObject.h" -#include "JavaThread.h" -#include "Jnjvm.h" -#include "JnjvmModuleProvider.h" -#ifdef SERVICE_VM -#include "ServiceDomain.h" -#endif - -using namespace jnjvm; -using namespace llvm; - -namespace mvm { - -llvm::FunctionPass* createEscapeAnalysisPass(llvm::Function*, llvm::Function*); -llvm::FunctionPass* createLowerConstantCallsPass(); -//llvm::FunctionPass* createArrayChecksPass(); - -} - -static void addPass(FunctionPassManager *PM, Pass *P) { - // Add the pass to the pass manager... - PM->add(P); -} - -void JavaJIT::AddStandardCompilePasses(FunctionPassManager *PM) { - llvm::MutexGuard locked(mvm::jit::executionEngine->lock); - // LLVM does not allow calling functions from other modules in verifier - //PM->add(llvm::createVerifierPass()); // Verify that input is correct - - addPass(PM, llvm::createCFGSimplificationPass()); // Clean up disgusting code - addPass(PM, llvm::createPromoteMemoryToRegisterPass());// Kill useless allocas - addPass(PM, llvm::createInstructionCombiningPass()); // Clean up after IPCP & DAE - addPass(PM, llvm::createCFGSimplificationPass()); // Clean up after IPCP & DAE - - addPass(PM, createTailDuplicationPass()); // Simplify cfg by copying code - addPass(PM, createSimplifyLibCallsPass()); // Library Call Optimizations - addPass(PM, createInstructionCombiningPass()); // Cleanup for scalarrepl. - addPass(PM, createJumpThreadingPass()); // Thread jumps. - addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs - addPass(PM, createScalarReplAggregatesPass()); // Break up aggregate allocas - addPass(PM, createInstructionCombiningPass()); // Combine silly seq's - addPass(PM, createCondPropagationPass()); // Propagate conditionals - - addPass(PM, createTailCallEliminationPass()); // Eliminate tail calls - addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs - addPass(PM, createReassociatePass()); // Reassociate expressions - addPass(PM, createLoopRotatePass()); - addPass(PM, createLICMPass()); // Hoist loop invariants - addPass(PM, createLoopUnswitchPass()); // Unswitch loops. - addPass(PM, createLoopIndexSplitPass()); // Index split loops. - addPass(PM, createIndVarSimplifyPass()); // Canonicalize indvars - addPass(PM, createLoopDeletionPass()); // Delete dead loops - addPass(PM, createLoopUnrollPass()); // Unroll small loops - addPass(PM, createInstructionCombiningPass()); // Clean up after the unroller - addPass(PM, createGVNPass()); // Remove redundancies - addPass(PM, createMemCpyOptPass()); // Remove memcpy / form memset - addPass(PM, createSCCPPass()); // Constant prop with SCCP - - addPass(PM, mvm::createLowerConstantCallsPass()); - - // Run instcombine after redundancy elimination to exploit opportunities - // opened up by them. - addPass(PM, createInstructionCombiningPass()); - addPass(PM, createCondPropagationPass()); // Propagate conditionals - - addPass(PM, createDeadStoreEliminationPass()); // Delete dead stores - addPass(PM, createAggressiveDCEPass()); // SSA based 'Aggressive DCE' - addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs -} - Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp?rev=51246&r1=51245&r2=51246&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp Mon May 19 07:42:17 2008 @@ -201,11 +201,6 @@ return vm->getClassDelegatee(cl); } -void JavaJIT::initialise() { - void* p; - p = (void*)&runtimeUTF8ToStr; -} - extern "C" Class* newLookup(Class* caller, uint32 index, Class** toAlloc, uint32 clinit) { JavaCtpInfo* ctpInfo = caller->ctpInfo; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaThread.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaThread.cpp?rev=51246&r1=51245&r2=51246&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaThread.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaThread.cpp Mon May 19 07:42:17 2008 @@ -7,10 +7,6 @@ // //===----------------------------------------------------------------------===// -#include "llvm/PassManager.h" -#include "llvm/Analysis/Passes.h" -#include "llvm/Target/TargetData.h" - #include "mvm/JIT.h" #include "mvm/PrintBuffer.h" #include "mvm/Threads/Key.h" @@ -22,8 +18,6 @@ #include "JavaObject.h" #include "JavaThread.h" #include "Jnjvm.h" -#include "JnjvmModule.h" -#include "JnjvmModuleProvider.h" using namespace jnjvm; @@ -35,9 +29,10 @@ buf->write("Thread:"); javaThread->print(buf); } - + void JavaThread::destroyer(size_t sz) { - delete perFunctionPasses; + delete lock; + delete varcond; } JavaThread* JavaThread::get() { @@ -53,10 +48,6 @@ this->state = StateRunning; this->self = mvm::Thread::self(); this->pendingException = 0; - ModuleProvider* MP = isolate->TheModuleProvider; - this->perFunctionPasses = new llvm::FunctionPassManager(MP); - this->perFunctionPasses->add(new llvm::TargetData(isolate->module)); - JavaJIT::AddStandardCompilePasses(this->perFunctionPasses); } JavaObject* JavaThread::currentThread() { Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h?rev=51246&r1=51245&r2=51246&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h Mon May 19 07:42:17 2008 @@ -12,8 +12,6 @@ #include -#include "llvm/PassManager.h" - #include "mvm/Object.h" #include "mvm/Threads/Cond.h" #include "mvm/Threads/Key.h" @@ -43,7 +41,6 @@ unsigned int self; unsigned int interruptFlag; unsigned int state; - llvm::FunctionPassManager* perFunctionPasses; std::vector sjlj_buffers; static const unsigned int StateRunning; Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h?rev=51246&r1=51245&r2=51246&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h Mon May 19 07:42:17 2008 @@ -265,6 +265,7 @@ JnjvmModule* module; JnjvmModuleProvider* TheModuleProvider; + #ifndef MULTIPLE_GC void* allocateObject(unsigned int sz, VirtualTable* VT) { return gc::operator new(sz, VT); Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=51246&r1=51245&r2=51246&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Mon May 19 07:42:17 2008 @@ -1060,3 +1060,10 @@ void* JnjvmModule::getMethod(JavaMethod* meth) { return getMethodInfo(meth)->getMethod(); } + +JnjvmModule::JnjvmModule(const std::string &ModuleID) : llvm::Module(ModuleID) { + std::string str = + mvm::jit::executionEngine->getTargetData()->getStringRepresentation(); + setDataLayout(str); +} + Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h?rev=51246&r1=51245&r2=51246&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h Mon May 19 07:42:17 2008 @@ -236,6 +236,7 @@ public: + static llvm::ConstantInt* JavaArraySizeOffsetConstant; static llvm::ConstantInt* JavaArrayElementsOffsetConstant; static llvm::ConstantInt* JavaObjectLockOffsetConstant; @@ -345,7 +346,7 @@ LLVMServiceInfo* getServiceInfo(ServiceDomain*); #endif - explicit JnjvmModule(const std::string &ModuleID) : llvm::Module(ModuleID) {} + explicit JnjvmModule(const std::string &ModuleID); void initialise(); }; Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp?rev=51246&r1=51245&r2=51246&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp Mon May 19 07:42:17 2008 @@ -7,6 +7,10 @@ // //===----------------------------------------------------------------------===// +#include "llvm/LinkAllPasses.h" +#include "llvm/Analysis/LoopPass.h" +#include "llvm/Support/MutexGuard.h" + #include "mvm/JIT.h" #include "JavaAccess.h" @@ -111,6 +115,7 @@ jit.nativeCompile(); } else { jit.javaCompile(); + mvm::jit::runPasses(func, perFunctionPasses); } } @@ -140,3 +145,70 @@ void JnjvmModuleProvider::addFunction(Function* F, JavaMethod* meth) { functions.insert(std::make_pair(F, meth)); } + + +namespace mvm { + llvm::FunctionPass* createEscapeAnalysisPass(llvm::Function*, llvm::Function*); + llvm::FunctionPass* createLowerConstantCallsPass(); +} + +static void addPass(FunctionPassManager *PM, Pass *P) { + // Add the pass to the pass manager... + PM->add(P); +} + +static void AddStandardCompilePasses(FunctionPassManager *PM) { + llvm::MutexGuard locked(mvm::jit::executionEngine->lock); + // LLVM does not allow calling functions from other modules in verifier + //PM->add(llvm::createVerifierPass()); // Verify that input is correct + + addPass(PM, llvm::createCFGSimplificationPass()); // Clean up disgusting code + addPass(PM, llvm::createPromoteMemoryToRegisterPass());// Kill useless allocas + addPass(PM, llvm::createInstructionCombiningPass()); // Clean up after IPCP & DAE + addPass(PM, llvm::createCFGSimplificationPass()); // Clean up after IPCP & DAE + + addPass(PM, createTailDuplicationPass()); // Simplify cfg by copying code + addPass(PM, createSimplifyLibCallsPass()); // Library Call Optimizations + addPass(PM, createInstructionCombiningPass()); // Cleanup for scalarrepl. + addPass(PM, createJumpThreadingPass()); // Thread jumps. + addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs + addPass(PM, createScalarReplAggregatesPass()); // Break up aggregate allocas + addPass(PM, createInstructionCombiningPass()); // Combine silly seq's + addPass(PM, createCondPropagationPass()); // Propagate conditionals + + addPass(PM, createTailCallEliminationPass()); // Eliminate tail calls + addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs + addPass(PM, createReassociatePass()); // Reassociate expressions + addPass(PM, createLoopRotatePass()); + addPass(PM, createLICMPass()); // Hoist loop invariants + addPass(PM, createLoopUnswitchPass()); // Unswitch loops. + addPass(PM, createLoopIndexSplitPass()); // Index split loops. + addPass(PM, createIndVarSimplifyPass()); // Canonicalize indvars + addPass(PM, createLoopDeletionPass()); // Delete dead loops + addPass(PM, createLoopUnrollPass()); // Unroll small loops + addPass(PM, createInstructionCombiningPass()); // Clean up after the unroller + addPass(PM, createGVNPass()); // Remove redundancies + addPass(PM, createMemCpyOptPass()); // Remove memcpy / form memset + addPass(PM, createSCCPPass()); // Constant prop with SCCP + + addPass(PM, mvm::createLowerConstantCallsPass()); + + // Run instcombine after redundancy elimination to exploit opportunities + // opened up by them. + addPass(PM, createInstructionCombiningPass()); + addPass(PM, createCondPropagationPass()); // Propagate conditionals + + addPass(PM, createDeadStoreEliminationPass()); // Delete dead stores + addPass(PM, createAggressiveDCEPass()); // SSA based 'Aggressive DCE' + addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs +} + +JnjvmModuleProvider::JnjvmModuleProvider(JnjvmModule *m) { + TheModule = (Module*)m; + mvm::jit::protectEngine->lock(); + mvm::jit::executionEngine->addModuleProvider(this); + mvm::jit::protectEngine->unlock(); + perFunctionPasses = new llvm::FunctionPassManager(this); + perFunctionPasses->add(new llvm::TargetData(m)); + AddStandardCompilePasses(perFunctionPasses); +} Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h?rev=51246&r1=51245&r2=51246&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h Mon May 19 07:42:17 2008 @@ -20,33 +20,6 @@ class JnjvmModule; -class FunctionMap : - public LockedMap*, - std::less > { -public: - static VirtualTable* VT; - - FunctionMap() { - lock = mvm::Lock::allocNormal(); - } - - virtual void TRACER; -}; - -class FunctionDefMap : - public LockedMap > { -public: - static VirtualTable* VT; - - FunctionDefMap() { - lock = mvm::Lock::allocNormal(); - } - - virtual void TRACER; -}; - - class JnjvmModuleProvider : public ModuleProvider { private: JavaMethod* staticLookup(Class* caller, uint32 index); @@ -63,12 +36,11 @@ typedef std::map >::iterator callback_iterator; + llvm::FunctionPassManager* perFunctionPasses; public: - JnjvmModuleProvider(JnjvmModule *m) { - TheModule = (Module*)m; - } + JnjvmModuleProvider(JnjvmModule *m); llvm::Function* addCallback(Class* cl, uint32 index, Signdef* sign, bool stat); Modified: vmkit/trunk/lib/JnJVM/VMCore/Makefile.am URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Makefile.am?rev=51246&r1=51245&r2=51246&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Makefile.am (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Makefile.am Mon May 19 07:42:17 2008 @@ -12,7 +12,7 @@ JavaIsolate.h JavaIsolate.cpp JavaString.h JavaString.cpp JavaInitialise.cpp JavaJITOpcodes.cpp \ JavaBacktrace.cpp NativeUtil.h NativeUtil.cpp Jni.cpp \ JavaCache.h JavaCache.cpp JavaUpcalls.h JavaUpcalls.cpp \ - JnjvmModuleProvider.h JnjvmModuleProvider.cpp JavaRuntimeJIT.cpp JavaMetaJIT.cpp JavaJITInitialise.cpp \ + JnjvmModuleProvider.h JnjvmModuleProvider.cpp JavaRuntimeJIT.cpp JavaMetaJIT.cpp \ LowerConstantCalls.cpp JnjvmModule.h JnjvmModule.cpp if SERVICE_BUILD From nicolas.geoffray at lip6.fr Mon May 19 08:08:54 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Mon, 19 May 2008 13:08:54 -0000 Subject: [llvm-commits] [vmkit] r51247 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaConstantPool.cpp JavaIsolate.cpp JavaJIT.cpp JavaTypes.cpp JavaUpcalls.cpp Jnjvm.cpp Jnjvm.h JnjvmModule.cpp JnjvmModuleProvider.cpp JnjvmModuleProvider.h Message-ID: <200805191308.m4JD8sV7006747@zion.cs.uiuc.edu> Author: geoffray Date: Mon May 19 08:08:53 2008 New Revision: 51247 URL: http://llvm.org/viewvc/llvm-project?rev=51247&view=rev Log: Rename Jnjvm::module --> Jnjvm::TheModule Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp?rev=51247&r1=51246&r2=51247&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp Mon May 19 08:08:53 2008 @@ -414,7 +414,7 @@ // lookup the method meth = cl->lookupMethodDontThrow(utf8, sign->keyName, isStatic(access), false); if (meth) { // don't throw if no meth, the exception will be thrown just in time - JnjvmModule* M = classDef->isolate->module; + JnjvmModule* M = classDef->isolate->TheModule; void* F = M->getMethod(meth); ctpRes[index] = (void*)F; return F; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp?rev=51247&r1=51246&r2=51247&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp Mon May 19 08:08:53 2008 @@ -442,8 +442,8 @@ isolate->analyseClasspathEnv(isolate->bootClasspathEnv); - isolate->module = new JnjvmModule("Isolate JnJVM"); - isolate->TheModuleProvider = new JnjvmModuleProvider(isolate->module); + isolate->TheModule = new JnjvmModule("Isolate JnJVM"); + isolate->TheModuleProvider = new JnjvmModuleProvider(isolate->TheModule); isolate->bootstrapThread = vm_new(isolate, JavaThread)(); isolate->bootstrapThread->initialise(0, isolate); @@ -503,10 +503,9 @@ isolate->analyseClasspathEnv(isolate->bootClasspathEnv); - isolate->protectModule = mvm::Lock::allocNormal(); - isolate->module = new JnjvmModule("Bootstrap JnJVM"); - isolate->TheModuleProvider = new JnjvmModuleProvider(isolate->module); - isolate->module->initialise(); + isolate->TheModule = new JnjvmModule("Bootstrap JnJVM"); + isolate->TheModuleProvider = new JnjvmModuleProvider(isolate->TheModule); + isolate->TheModule->initialise(); isolate->bootstrapThread = vm_new(isolate, JavaThread)(); isolate->bootstrapThread->initialise(0, isolate); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp?rev=51247&r1=51246&r2=51247&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp Mon May 19 08:08:53 2008 @@ -132,7 +132,7 @@ } else { GlobalVariable* gv = new GlobalVariable(Type::Int32Ty, false, GlobalValue::ExternalLinkage, - zero, "", compilingClass->isolate->module); + zero, "", module); // set is volatile Value* val = new LoadInst(gv, "", true, currentBlock); @@ -1644,13 +1644,13 @@ new GlobalVariable(mvm::jit::ptrType, false, GlobalValue::ExternalLinkage, mvm::jit::constantPtrNull, - "", compilingClass->isolate->module); + "", module); Constant* zero = mvm::jit::constantZero; GlobalVariable* gv = new GlobalVariable(Type::Int32Ty, false, GlobalValue::ExternalLinkage, - zero, "", compilingClass->isolate->module); + zero, "", module); // set is volatile Value* val = new LoadInst(gv, "", true, currentBlock); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp?rev=51247&r1=51246&r2=51247&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp Mon May 19 08:08:53 2008 @@ -550,7 +550,7 @@ void* Signdef::staticCallBuf() { if (!_staticCallBuf) { - LLVMSignatureInfo* LSI = isolate->module->getSignatureInfo(this); + LLVMSignatureInfo* LSI = isolate->TheModule->getSignatureInfo(this); LSI->getStaticBuf(); } return _staticCallBuf; @@ -558,7 +558,7 @@ void* Signdef::virtualCallBuf() { if (!_virtualCallBuf) { - LLVMSignatureInfo* LSI = isolate->module->getSignatureInfo(this); + LLVMSignatureInfo* LSI = isolate->TheModule->getSignatureInfo(this); LSI->getVirtualBuf(); } return _virtualCallBuf; @@ -566,7 +566,7 @@ void* Signdef::staticCallAP() { if (!_staticCallAP) { - LLVMSignatureInfo* LSI = isolate->module->getSignatureInfo(this); + LLVMSignatureInfo* LSI = isolate->TheModule->getSignatureInfo(this); LSI->getStaticAP(); } return _staticCallAP; @@ -574,7 +574,7 @@ void* Signdef::virtualCallAP() { if (!_virtualCallAP) { - LLVMSignatureInfo* LSI = isolate->module->getSignatureInfo(this); + LLVMSignatureInfo* LSI = isolate->TheModule->getSignatureInfo(this); LSI->getVirtualAP(); } return _virtualCallAP; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp?rev=51247&r1=51246&r2=51247&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp Mon May 19 08:08:53 2008 @@ -366,11 +366,11 @@ JavaMethod* internString = UPCALL_METHOD(vm, "java/lang/VMString", "intern", "(Ljava/lang/String;)Ljava/lang/String;", ACC_STATIC); - vm->module->setMethod(internString, "internString"); + vm->TheModule->setMethod(internString, "internString"); JavaMethod* isArray = UPCALL_METHOD(vm, "java/lang/Class", "isArray", "()Z", ACC_VIRTUAL); - vm->module->setMethod(isArray, "isArray"); + vm->TheModule->setMethod(isArray, "isArray"); ClasspathThread::initialise(vm); @@ -387,17 +387,17 @@ JavaMethod* getCallingClass = UPCALL_METHOD(vm, "gnu/classpath/VMStackWalker", "getCallingClass", "()Ljava/lang/Class;", ACC_STATIC); - vm->module->setMethod(getCallingClass, "getCallingClass"); + vm->TheModule->setMethod(getCallingClass, "getCallingClass"); JavaMethod* getCallingClassLoader = UPCALL_METHOD(vm, "gnu/classpath/VMStackWalker", "getCallingClassLoader", "()Ljava/lang/ClassLoader;", ACC_STATIC); - vm->module->setMethod(getCallingClassLoader, "getCallingClassLoader"); + vm->TheModule->setMethod(getCallingClassLoader, "getCallingClassLoader"); JavaMethod* postProperties = UPCALL_METHOD(vm, "gnu/classpath/VMSystemProperties", "postInit", "(Ljava/util/Properties;)V", ACC_STATIC); - vm->module->setMethod(postProperties, "propertiesPostInit"); + vm->TheModule->setMethod(postProperties, "propertiesPostInit"); } extern "C" JavaString* internString(JavaString* obj) { Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp?rev=51247&r1=51246&r2=51247&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp Mon May 19 08:08:53 2008 @@ -325,7 +325,7 @@ cl->super->initialiseClass(); } - module->resolveStaticClass((Class*)cl); + TheModule->resolveStaticClass((Class*)cl); *status = inClinit; JavaMethod* meth = cl->lookupMethodDontThrow(clinitName, clinitType, true, @@ -395,7 +395,7 @@ loadParents((Class*)cl); cl->aquire(); cl->status = prepared; - module->resolveVirtualClass((Class*)cl); + TheModule->resolveVirtualClass((Class*)cl); cl->status = resolved; } cl->release(); @@ -885,11 +885,6 @@ GC->destroy(); delete GC; #endif - mvm::jit::protectEngine->lock(); - mvm::jit::executionEngine->removeModuleProvider(TheModuleProvider); - mvm::jit::protectEngine->unlock(); delete globalRefsLock; - delete protectModule; delete TheModuleProvider; - delete module; } Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h?rev=51247&r1=51246&r2=51247&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h Mon May 19 08:08:53 2008 @@ -261,9 +261,8 @@ #endif - mvm::Lock* protectModule; - JnjvmModule* module; JnjvmModuleProvider* TheModuleProvider; + JnjvmModule* TheModule; #ifndef MULTIPLE_GC Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=51247&r1=51246&r2=51247&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Mon May 19 08:08:53 2008 @@ -134,7 +134,7 @@ varGV = new GlobalVariable(JnjvmModule::JavaClassType, true, GlobalValue::ExternalLinkage, cons, "", - classDef->isolate->module); + classDef->isolate->TheModule); } return new LoadInst(varGV, "", jit->currentBlock); } @@ -149,7 +149,7 @@ delegateeGV = new GlobalVariable(JnjvmModule::JavaObjectType, true, GlobalValue::ExternalLinkage, cons, "", - classDef->isolate->module); + classDef->isolate->TheModule); } return new LoadInst(delegateeGV, "", jit->currentBlock); #else @@ -240,7 +240,7 @@ Function* func = Function::Create(JnjvmModule::MarkAndTraceType, GlobalValue::ExternalLinkage, "markAndTraceObject", - cl->isolate->module); + cl->isolate->TheModule); Constant* zero = mvm::jit::constantZero; Argument* arg = func->arg_begin(); @@ -409,7 +409,7 @@ staticVarGV = new GlobalVariable(JnjvmModule::JavaObjectType, true, GlobalValue::ExternalLinkage, cons, "", - classDef->isolate->module); + classDef->isolate->TheModule); } return new LoadInst(staticVarGV, "", jit->currentBlock); @@ -434,7 +434,7 @@ virtualTableGV = new GlobalVariable(JnjvmModule::VTType, true, GlobalValue::ExternalLinkage, cons, "", - classDef->isolate->module); + classDef->isolate->TheModule); } return new LoadInst(virtualTableGV, "", jit->currentBlock); } @@ -468,7 +468,7 @@ methodFunction = Function::Create(getFunctionType(), GlobalValue::GhostLinkage, methodDef->printString(), - vm->module); + vm->TheModule); vm->TheModuleProvider->addFunction(methodFunction, methodDef); } return methodFunction; @@ -586,7 +586,7 @@ getStaticBufType(), GlobalValue::ExternalLinkage, signature->printString(), - signature->isolate->module); + signature->isolate->TheModule); BasicBlock* currentBlock = BasicBlock::Create("enter", res); Function::arg_iterator i = res->arg_begin(); @@ -640,7 +640,7 @@ getStaticBufType(), GlobalValue::ExternalLinkage, signature->printString(), - signature->isolate->module); + signature->isolate->TheModule); BasicBlock* currentBlock = BasicBlock::Create("enter", res); Function::arg_iterator i = res->arg_begin(); Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp?rev=51247&r1=51246&r2=51247&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp Mon May 19 08:08:53 2008 @@ -125,7 +125,7 @@ llvm::Function* JnjvmModuleProvider::addCallback(Class* cl, uint32 index, Signdef* sign, bool stat) { const llvm::FunctionType* type = 0; - JnjvmModule* M = cl->isolate->module; + JnjvmModule* M = cl->isolate->TheModule; LLVMSignatureInfo* LSI = M->getSignatureInfo(sign); if (stat) { @@ -136,7 +136,7 @@ Function* func = llvm::Function::Create(type, llvm::GlobalValue::GhostLinkage, "callback", - cl->isolate->module); + TheModule); callbacks.insert(std::make_pair(func, std::make_pair(cl, index))); return func; @@ -212,3 +212,10 @@ perFunctionPasses->add(new llvm::TargetData(m)); AddStandardCompilePasses(perFunctionPasses); } + +JnjvmModuleProvider::~JnjvmModuleProvider() { + mvm::jit::protectEngine->lock(); + mvm::jit::executionEngine->removeModuleProvider(this); + mvm::jit::protectEngine->unlock(); + delete TheModule; +} Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h?rev=51247&r1=51246&r2=51247&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h Mon May 19 08:08:53 2008 @@ -41,13 +41,14 @@ public: JnjvmModuleProvider(JnjvmModule *m); + ~JnjvmModuleProvider(); llvm::Function* addCallback(Class* cl, uint32 index, Signdef* sign, bool stat); void addFunction(llvm::Function* F, JavaMethod* meth); bool materializeFunction(Function *F, std::string *ErrInfo = 0); - void* materializeFunction(JavaMethod* meth); + void* materializeFunction(JavaMethod* meth); Module* materializeModule(std::string *ErrInfo = 0) { return TheModule; } }; From nicolas.geoffray at lip6.fr Mon May 19 08:22:50 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Mon, 19 May 2008 13:22:50 -0000 Subject: [llvm-commits] [vmkit] r51248 - in /vmkit/trunk: include/mvm/JIT.h lib/Mvm/JIT.cpp lib/N3/VMCore/CLIJit.cpp lib/N3/VMCore/CLIJitMeta.cpp lib/N3/VMCore/Opcodes.cpp lib/N3/VMCore/VMCache.cpp lib/N3/VMCore/VMClass.cpp Message-ID: <200805191322.m4JDMofN007159@zion.cs.uiuc.edu> Author: geoffray Date: Mon May 19 08:22:48 2008 New Revision: 51248 URL: http://llvm.org/viewvc/llvm-project?rev=51248&view=rev Log: Remove protectConstant and protectType, since we own the LLVM jit lock when jitting. Modified: vmkit/trunk/include/mvm/JIT.h vmkit/trunk/lib/Mvm/JIT.cpp vmkit/trunk/lib/N3/VMCore/CLIJit.cpp vmkit/trunk/lib/N3/VMCore/CLIJitMeta.cpp vmkit/trunk/lib/N3/VMCore/Opcodes.cpp vmkit/trunk/lib/N3/VMCore/VMCache.cpp vmkit/trunk/lib/N3/VMCore/VMClass.cpp Modified: vmkit/trunk/include/mvm/JIT.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/JIT.h?rev=51248&r1=51247&r2=51248&view=diff ============================================================================== --- vmkit/trunk/include/mvm/JIT.h (original) +++ vmkit/trunk/include/mvm/JIT.h Mon May 19 08:22:48 2008 @@ -102,8 +102,6 @@ extern void initialise(); -//extern mvm::Lock* protectTypes; -//extern mvm::Lock* protectConstants; extern mvm::Lock* protectEngine; extern llvm::ConstantInt* constantInt8Zero; extern llvm::ConstantInt* constantZero; @@ -154,11 +152,6 @@ extern llvm::ExistingModuleProvider *globalModuleProvider; extern mvm::MvmMemoryManager *memoryManager; -extern void protectTypes(); -extern void unprotectTypes(); - -extern void protectConstants(); -extern void unprotectConstants(); extern int disassemble(unsigned int* addr); Modified: vmkit/trunk/lib/Mvm/JIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/JIT.cpp?rev=51248&r1=51247&r2=51248&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/JIT.cpp (original) +++ vmkit/trunk/lib/Mvm/JIT.cpp Mon May 19 08:22:48 2008 @@ -605,8 +605,6 @@ llvm::ExecutionEngine* mvm::jit::executionEngine; -//mvm::Lock* mvm::jit::protectTypes; -//mvm::Lock* mvm::jit::protectConstants; mvm::Lock* mvm::jit::protectEngine; llvm::ConstantInt* mvm::jit::constantInt8Zero; llvm::ConstantInt* mvm::jit::constantZero; @@ -668,22 +666,5 @@ } void mvm::jit::runPasses(llvm::Function* func, llvm::FunctionPassManager* pm) { - llvm::MutexGuard locked(mvm::jit::executionEngine->lock); pm->run(*func); } - -void mvm::jit::protectConstants() { - mvm::jit::executionEngine->lock.acquire(); -} - -void mvm::jit::unprotectConstants() { - mvm::jit::executionEngine->lock.release(); -} - -void mvm::jit::protectTypes() { - mvm::jit::executionEngine->lock.acquire(); -} - -void mvm::jit::unprotectTypes() { - mvm::jit::executionEngine->lock.release(); -} Modified: vmkit/trunk/lib/N3/VMCore/CLIJit.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/CLIJit.cpp?rev=51248&r1=51247&r2=51248&view=diff ============================================================================== --- vmkit/trunk/lib/N3/VMCore/CLIJit.cpp (original) +++ vmkit/trunk/lib/N3/VMCore/CLIJit.cpp Mon May 19 08:22:48 2008 @@ -113,9 +113,7 @@ std::vector args; //size = 2 args.push_back(zero); if (boxed) { - mvm::jit::protectConstants(); args.push_back(ConstantInt::get(field->offset->getValue() + 1)); - mvm::jit::unprotectConstants(); } else { args.push_back(field->offset); } @@ -126,9 +124,7 @@ std::vector args; //size = 2 args.push_back(zero); if (boxed) { - mvm::jit::protectConstants(); args.push_back(ConstantInt::get(field->offset->getValue() + 1)); - mvm::jit::unprotectConstants(); } else { args.push_back(field->offset); } @@ -638,9 +634,7 @@ std::vector params; params.push_back(new BitCastInst(obj, mvm::jit::ptrType, "", currentBlock)); params.push_back(mvm::jit::constantInt8Zero); - mvm::jit::protectConstants(); params.push_back(ConstantInt::get(Type::Int32Ty, size)); - mvm::jit::unprotectConstants(); params.push_back(mvm::jit::constantZero); CallInst::Create(mvm::jit::llvm_memset_i32, params.begin(), params.end(), "", currentBlock); @@ -742,9 +736,7 @@ type = field->signature->naturalType; if (val == constantVMObjectNull) { - mvm::jit::protectConstants(); val = Constant::getNullValue(type); - mvm::jit::unprotectConstants(); } else if (type != valType) { val = changeType(val, type); } @@ -769,9 +761,7 @@ const Type* type = field->signature->naturalType; const Type* valType = val->getType(); if (val == constantVMObjectNull) { - mvm::jit::protectConstants(); val = Constant::getNullValue(type); - mvm::jit::unprotectConstants(); } else if (type != valType) { val = changeType(val, type); } @@ -780,9 +770,7 @@ void CLIJit::JITVerifyNull(Value* obj) { CLIJit* jit = this; - mvm::jit::protectConstants(); Constant* zero = Constant::getNullValue(obj->getType()); - mvm::jit::unprotectConstants(); Value* test = new ICmpInst(ICmpInst::ICMP_EQ, obj, zero, "", jit->currentBlock); @@ -951,11 +939,9 @@ void* natPtr = NativeUtil::nativeLookup(compilingClass, compilingMethod); - mvm::jit::protectConstants(); Value* valPtr = ConstantExpr::getIntToPtr(ConstantInt::get(Type::Int64Ty, (uint64)natPtr), PointerType::getUnqual(funcType)); - mvm::jit::unprotectConstants(); Value* result = CallInst::Create(valPtr, nativeArgs.begin(), nativeArgs.end(), "", currentBlock); @@ -1090,11 +1076,9 @@ Instruction* ptr_eh_ptr = CallInst::Create(mvm::jit::llvmGetException, "eh_ptr", cur->test); int32_eh_select_params.push_back(ptr_eh_ptr); - mvm::jit::protectConstants(); Constant* C = ConstantExpr::getCast(Instruction::BitCast, mvm::jit::personality, PointerTy_0); int32_eh_select_params.push_back(C); - mvm::jit::unprotectConstants(); int32_eh_select_params.push_back(mvm::jit::constantPtrNull); CallInst::Create(mvm::jit::exceptionSelector, int32_eh_select_params.begin(), @@ -1207,10 +1191,8 @@ cl->resolveType(false, false); AllocaInst* alloc = new AllocaInst(cl->naturalType, "", currentBlock); if (cl->naturalType->isFirstClassType()) { - mvm::jit::protectConstants(); new StoreInst(Constant::getNullValue(cl->naturalType), alloc, false, currentBlock); - mvm::jit::unprotectConstants(); } else { uint64 size = mvm::jit::getTypeSize(cl->naturalType); @@ -1218,9 +1200,7 @@ params.push_back(new BitCastInst(alloc, mvm::jit::ptrType, "", currentBlock)); params.push_back(mvm::jit::constantInt8Zero); - mvm::jit::protectConstants(); params.push_back(ConstantInt::get(Type::Int32Ty, size)); - mvm::jit::unprotectConstants(); params.push_back(mvm::jit::constantZero); CallInst::Create(mvm::jit::llvm_memset_i32, params.begin(), params.end(), "", currentBlock); @@ -1263,9 +1243,7 @@ currentBlock)); params.push_back(new BitCastInst(endNode, mvm::jit::ptrType, "", currentBlock)); - mvm::jit::protectConstants(); params.push_back(ConstantInt::get(Type::Int32Ty, size)); - mvm::jit::unprotectConstants(); params.push_back(mvm::jit::constantFour); CallInst::Create(mvm::jit::llvm_memcpy_i32, params.begin(), params.end(), "", currentBlock); @@ -1385,10 +1363,8 @@ cl->resolveType(false, false); AllocaInst* alloc = new AllocaInst(cl->naturalType, "", currentBlock); if (cl->naturalType->isFirstClassType()) { - mvm::jit::protectConstants(); new StoreInst(Constant::getNullValue(cl->naturalType), alloc, false, currentBlock); - mvm::jit::unprotectConstants(); } else { uint64 size = mvm::jit::getTypeSize(cl->naturalType); @@ -1396,9 +1372,7 @@ params.push_back(new BitCastInst(alloc, mvm::jit::ptrType, "", currentBlock)); params.push_back(mvm::jit::constantInt8Zero); - mvm::jit::protectConstants(); params.push_back(ConstantInt::get(Type::Int32Ty, size)); - mvm::jit::unprotectConstants(); params.push_back(mvm::jit::constantZero); CallInst::Create(mvm::jit::llvm_memset_i32, params.begin(), params.end(), "", currentBlock); Modified: vmkit/trunk/lib/N3/VMCore/CLIJitMeta.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/CLIJitMeta.cpp?rev=51248&r1=51247&r2=51248&view=diff ============================================================================== --- vmkit/trunk/lib/N3/VMCore/CLIJitMeta.cpp (original) +++ vmkit/trunk/lib/N3/VMCore/CLIJitMeta.cpp Mon May 19 08:22:48 2008 @@ -365,18 +365,14 @@ aquire(); if (!_llvmVar) { const Type* pty = mvm::jit::ptrType; - mvm::jit::protectConstants(); Constant* cons = ConstantExpr::getIntToPtr(ConstantInt::get(Type::Int64Ty, uint64_t (this)), pty); - mvm::jit::unprotectConstants(); - vm->protectModule->lock(); _llvmVar = new GlobalVariable(pty, true, GlobalValue::ExternalLinkage, cons, "", vm->module); - vm->protectModule->unlock(); } release(); @@ -389,18 +385,14 @@ classDef->aquire(); if (!_llvmVar) { const Type* pty = mvm::jit::ptrType; - mvm::jit::protectConstants(); Constant* cons = ConstantExpr::getIntToPtr(ConstantInt::get(Type::Int64Ty, uint64_t (this)), pty); - mvm::jit::unprotectConstants(); - classDef->vm->protectModule->lock(); _llvmVar = new GlobalVariable(pty, true, GlobalValue::ExternalLinkage, cons, "", classDef->vm->module); - classDef->vm->protectModule->unlock(); } classDef->release(); } @@ -412,18 +404,14 @@ classDef->aquire(); if (!_llvmVar) { const Type* pty = mvm::jit::ptrType; - mvm::jit::protectConstants(); Constant* cons = ConstantExpr::getIntToPtr(ConstantInt::get(Type::Int64Ty, uint64_t (this)), pty); - mvm::jit::unprotectConstants(); - classDef->vm->protectModule->lock(); _llvmVar = new GlobalVariable(pty, true, GlobalValue::ExternalLinkage, cons, "", classDef->vm->module); - classDef->vm->protectModule->unlock(); } classDef->release(); @@ -438,20 +426,16 @@ GlobalVariable* CLIString::llvmVar() { if (!_llvmVar) { VirtualMachine* vm = VMThread::get()->vm; - vm->protectModule->lock(); if (!_llvmVar) { const Type* pty = mvm::jit::ptrType; - mvm::jit::protectConstants(); Constant* cons = ConstantExpr::getIntToPtr(ConstantInt::get(Type::Int64Ty, uint64_t (this)), pty); - mvm::jit::unprotectConstants(); _llvmVar = new GlobalVariable(pty, true, GlobalValue::ExternalLinkage, cons, "", vm->module); } - vm->protectModule->unlock(); } return _llvmVar; } Modified: vmkit/trunk/lib/N3/VMCore/Opcodes.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/Opcodes.cpp?rev=51248&r1=51247&r2=51248&view=diff ============================================================================== --- vmkit/trunk/lib/N3/VMCore/Opcodes.cpp (original) +++ vmkit/trunk/lib/N3/VMCore/Opcodes.cpp Mon May 19 08:22:48 2008 @@ -186,9 +186,7 @@ std::vector params; params.push_back(new BitCastInst(local, PointerType::getUnqual(Type::Int8Ty), "", currentBlock)); params.push_back(new BitCastInst(val, PointerType::getUnqual(Type::Int8Ty), "", currentBlock)); - mvm::jit::protectConstants(); params.push_back(ConstantInt::get(Type::Int32Ty, size)); - mvm::jit::unprotectConstants(); params.push_back(mvm::jit::constantZero); CallInst::Create(mvm::jit::llvm_memcpy_i32, params.begin(), params.end(), "", currentBlock); } @@ -204,9 +202,7 @@ std::vector params; params.push_back(new BitCastInst(ret, PointerType::getUnqual(Type::Int8Ty), "", currentBlock)); params.push_back(new BitCastInst(val, PointerType::getUnqual(Type::Int8Ty), "", currentBlock)); - mvm::jit::protectConstants(); params.push_back(ConstantInt::get(Type::Int32Ty, size)); - mvm::jit::unprotectConstants(); params.push_back(mvm::jit::constantZero); CallInst::Create(mvm::jit::llvm_memcpy_i32, params.begin(), params.end(), "", currentBlock); return ret; @@ -238,7 +234,6 @@ } #if N3_EXECUTE > 1 - mvm::jit::protectConstants(); std::vector args; args.push_back(ConstantInt::get(Type::Int32Ty, (int64_t)OpcodeNames[bytecodes[i]])); args.push_back(ConstantInt::get(Type::Int32Ty, (int64_t)compilingMethod)); @@ -249,7 +244,6 @@ args.push_back(ConstantInt::get(Type::Int32Ty, (int64_t)compilingMethod)); CallInst::Create(printExecutionLLVM, args.begin(), args.end(), "", currentBlock); } - mvm::jit::unprotectConstants(); #endif if (opinfo->reqSuppl) { @@ -348,9 +342,7 @@ #define TEST(name, read, cmpf, cmpi, offset) case name : { \ uint32 tmp = i; \ Value* val2 = pop(); \ - mvm::jit::protectConstants(); \ Value* val1 = Constant::getNullValue(val2->getType()); \ - mvm::jit::unprotectConstants(); \ BasicBlock* ifTrue = opcodeInfos[tmp + offset + read(bytecodes, i)].newBlock; \ Value* test = 0; \ if (val1->getType()->isFloatingPoint()) { \ @@ -705,12 +697,10 @@ leaves.size(), currentBlock); uint32 index = 0; - mvm::jit::protectConstants(); for (std::vector::iterator i = leaves.begin(), e = leaves.end(); i!= e; ++i, ++index) { inst->addCase(ConstantInt::get(Type::Int32Ty, index), *i); } - mvm::jit::unprotectConstants(); //currentBlock = bb2; @@ -753,30 +743,22 @@ } case LDC_I4 : { - mvm::jit::protectConstants(); push(ConstantInt::get(Type::Int32Ty, readS4(bytecodes, i))); - mvm::jit::unprotectConstants(); break; } case LDC_I8 : { - mvm::jit::protectConstants(); push(ConstantInt::get(Type::Int64Ty, readS8(bytecodes, i))); - mvm::jit::unprotectConstants(); break; } case LDC_R4 : { - mvm::jit::protectConstants(); push(ConstantFP::get(Type::FloatTy, readFloat(bytecodes, i))); - mvm::jit::unprotectConstants(); break; } case LDC_R8 : { - mvm::jit::protectConstants(); push(ConstantFP::get(Type::DoubleTy, readDouble(bytecodes, i))); - mvm::jit::unprotectConstants(); break; } @@ -831,9 +813,7 @@ } case LDC_I4_S : { - mvm::jit::protectConstants(); push(ConstantInt::get(Type::Int32Ty, readS1(bytecodes, i))); - mvm::jit::unprotectConstants(); break; } @@ -955,12 +935,10 @@ } } if (res) { - mvm::jit::protectConstants(); Value* expr = ConstantExpr::getIntToPtr( ConstantInt::get(Type::Int64Ty, uint64_t (leaveIndex++)), VMObject::llvmType); - mvm::jit::unprotectConstants(); new StoreInst(expr, supplLocal, false, currentBlock); branch(res->handler, currentBlock); @@ -989,12 +967,10 @@ } } if (res) { - mvm::jit::protectConstants(); Value* expr = ConstantExpr::getIntToPtr( ConstantInt::get(Type::Int64Ty, uint64_t (leaveIndex++)), VMObject::llvmType); - mvm::jit::unprotectConstants(); new StoreInst(expr, supplLocal, false, currentBlock); branch(res->handler, currentBlock); @@ -1027,11 +1003,9 @@ case NEG : { Value* val = pop(); - mvm::jit::protectConstants(); push(BinaryOperator::createSub( Constant::getNullValue(val->getType()), val, "", currentBlock)); - mvm::jit::unprotectConstants(); break; } @@ -1297,9 +1271,7 @@ std::vector params; params.push_back(new BitCastInst(ptr, PointerType::getUnqual(Type::Int8Ty), "", currentBlock)); params.push_back(new BitCastInst(val, PointerType::getUnqual(Type::Int8Ty), "", currentBlock)); - mvm::jit::protectConstants(); params.push_back(ConstantInt::get(Type::Int32Ty, size)); - mvm::jit::unprotectConstants(); params.push_back(mvm::jit::constantZero); CallInst::Create(mvm::jit::llvm_memcpy_i32, params.begin(), params.end(), "", currentBlock); @@ -1371,12 +1343,10 @@ false, true); Value* obj = pop(); - mvm::jit::protectConstants(); Value* cmp = new ICmpInst(ICmpInst::ICMP_EQ, obj, Constant::getNullValue(obj->getType()), "", currentBlock); Constant* nullVirtual = Constant::getNullValue(dcl->virtualType); - mvm::jit::unprotectConstants(); BasicBlock* isInstEndBlock = createBasicBlock("end isinst"); @@ -1567,10 +1537,8 @@ uint32 value = readU4(bytecodes, i); uint32 index = value & 0xfffffff; const UTF8* utf8 = compilingClass->assembly->readUserString(index); - mvm::jit::protectConstants(); Value* val = ConstantExpr::getIntToPtr(ConstantInt::get(Type::Int64Ty, (int64_t)utf8), mvm::jit::ptrType); - mvm::jit::unprotectConstants(); Value* res = CallInst::Create(newStringLLVM, val, "", currentBlock); /*CLIString * str = (CLIString*)(((N3*)VMThread::get()->vm)->UTF8ToStr(utf8)); @@ -1798,9 +1766,7 @@ std::vector params; params.push_back(new BitCastInst(val, PointerType::getUnqual(Type::Int8Ty), "", currentBlock)); params.push_back(new BitCastInst(ptr, PointerType::getUnqual(Type::Int8Ty), "", currentBlock)); - mvm::jit::protectConstants(); params.push_back(ConstantInt::get(Type::Int32Ty, size)); - mvm::jit::unprotectConstants(); params.push_back(mvm::jit::constantZero); CallInst::Create(mvm::jit::llvm_memcpy_i32, params.begin(), params.end(), "", currentBlock); Modified: vmkit/trunk/lib/N3/VMCore/VMCache.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/VMCache.cpp?rev=51248&r1=51247&r2=51248&view=diff ============================================================================== --- vmkit/trunk/lib/N3/VMCore/VMCache.cpp (original) +++ vmkit/trunk/lib/N3/VMCore/VMCache.cpp Mon May 19 08:22:48 2008 @@ -91,11 +91,9 @@ Value* two = mvm::jit::constantTwo; Value* five = mvm::jit::constantFive; - mvm::jit::protectConstants(); Value* llvmEnv = ConstantExpr::getIntToPtr(ConstantInt::get(Type::Int64Ty, uint64_t (enveloppe)), Enveloppe::llvmType); - mvm::jit::unprotectConstants(); std::vector args1; args1.push_back(zero); Modified: vmkit/trunk/lib/N3/VMCore/VMClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/VMClass.cpp?rev=51248&r1=51247&r2=51248&view=diff ============================================================================== --- vmkit/trunk/lib/N3/VMCore/VMClass.cpp (original) +++ vmkit/trunk/lib/N3/VMCore/VMClass.cpp Mon May 19 08:22:48 2008 @@ -247,13 +247,11 @@ std::vector fields; fields.push_back(VMObject::llvmType->getContainedType(0)); uint64 offset = 0; - mvm::jit::protectConstants(); for (std::vector::iterator i = cl->staticFields.begin(), e = cl->staticFields.end(); i!= e; ++i) { // preincrement because 0 is VMObject (*i)->offset = llvm::ConstantInt::get(llvm::Type::Int32Ty, ++offset); } - mvm::jit::unprotectConstants(); for (std::vector::iterator i = cl->staticFields.begin(), e = cl->staticFields.end(); i!= e; ++i) { (*i)->signature->resolveType(false, false); @@ -310,14 +308,12 @@ } else { std::vector Elts; uint32 offset = -1; - mvm::jit::protectConstants(); for (std::vector::iterator i = virtualFields.begin(), e = virtualFields.end(); i!= e; ++i) { (*i)->offset = llvm::ConstantInt::get(llvm::Type::Int32Ty, ++offset); const llvm::Type* type = (*i)->signature->naturalType; Elts.push_back(type); } - mvm::jit::unprotectConstants(); const llvm::Type* tmp = llvm::StructType::get(Elts); ((llvm::OpaqueType*)naturalType)->refineAbstractTypeTo(tmp); naturalType = tmp; @@ -329,14 +325,12 @@ std::vector Elts; Elts.push_back(super->naturalType->getContainedType(0)); uint32 offset = 0; - mvm::jit::protectConstants(); for (std::vector::iterator i = virtualFields.begin(), e = virtualFields.end(); i!= e; ++i) { (*i)->offset = llvm::ConstantInt::get(llvm::Type::Int32Ty, ++offset); const llvm::Type* type = (*i)->signature->naturalType; Elts.push_back(type); } - mvm::jit::unprotectConstants(); const llvm::Type* tmp = llvm::PointerType::getUnqual(llvm::StructType::get(Elts)); ((llvm::OpaqueType*)naturalType)->refineAbstractTypeTo(tmp); naturalType = tmp; From ggreif at gmail.com Mon May 19 09:02:44 2008 From: ggreif at gmail.com (Gabor Greif) Date: Mon, 19 May 2008 14:02:44 -0000 Subject: [llvm-commits] [llvm] r51249 - /llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan2.ll Message-ID: <200805191402.m4JE2isC008371@zion.cs.uiuc.edu> Author: ggreif Date: Mon May 19 09:02:44 2008 New Revision: 51249 URL: http://llvm.org/viewvc/llvm-project?rev=51249&view=rev Log: rename test Added: llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan2.ll - copied unchanged from r51143, llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan.ll From ggreif at gmail.com Mon May 19 09:15:42 2008 From: ggreif at gmail.com (Gabor Greif) Date: Mon, 19 May 2008 14:15:42 -0000 Subject: [llvm-commits] [llvm] r51250 - /llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan.ll Message-ID: <200805191415.m4JEFglF008742@zion.cs.uiuc.edu> Author: ggreif Date: Mon May 19 09:15:42 2008 New Revision: 51250 URL: http://llvm.org/viewvc/llvm-project?rev=51250&view=rev Log: rename test Removed: llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan.ll Removed: llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan.ll URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan.ll?rev=51249&view=auto ============================================================================== --- llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan.ll (original) +++ llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan.ll (removed) @@ -1,11 +0,0 @@ -; RUN: llvm-as < %s | llc -march=x86 -mcpu=yonah | not grep pxor - -; This should not need to materialize 0.0 to evaluate the condition. - -define i32 @test(double %X) nounwind { -entry: - %tmp6 = fcmp uno double %X, 0.000000e+00 ; [#uses=1] - %tmp67 = zext i1 %tmp6 to i32 ; [#uses=1] - ret i32 %tmp67 -} - From ggreif at gmail.com Mon May 19 09:16:56 2008 From: ggreif at gmail.com (Gabor Greif) Date: Mon, 19 May 2008 14:16:56 -0000 Subject: [llvm-commits] [llvm] r51251 - in /llvm/branches/ggreif/use-diet/test/CodeGen/X86: isnan.ll isnan.llx Message-ID: <200805191416.m4JEGu93008793@zion.cs.uiuc.edu> Author: ggreif Date: Mon May 19 09:16:56 2008 New Revision: 51251 URL: http://llvm.org/viewvc/llvm-project?rev=51251&view=rev Log: rename test Added: llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan.ll - copied unchanged from r51249, llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan.llx Removed: llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan.llx Removed: llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan.llx URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan.llx?rev=51250&view=auto ============================================================================== --- llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan.llx (original) +++ llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan.llx (removed) @@ -1,9 +0,0 @@ -; RUN: llvm-as < %s | llc -march=x86 | not grep call - -declare i1 @llvm.isunordered.f64(double) - -define i1 @test_isnan(double %X) { - %R = fcmp uno double %X, %X ; [#uses=1] - ret i1 %R -} - From nicolas.geoffray at lip6.fr Mon May 19 10:16:18 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Mon, 19 May 2008 15:16:18 -0000 Subject: [llvm-commits] [vmkit] r51252 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaArray.h JavaJIT.cpp JavaJITOpcodes.cpp JavaTypes.cpp JavaTypes.h JnjvmModule.cpp JnjvmModule.h Message-ID: <200805191516.m4JFGIeN010629@zion.cs.uiuc.edu> Author: geoffray Date: Mon May 19 10:16:18 2008 New Revision: 51252 URL: http://llvm.org/viewvc/llvm-project?rev=51252&view=rev Log: Make AssessorDesc objects not depend on LLVM. The LLVM meta info are now all placed in JnjvmModule. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h?rev=51252&r1=51251&r2=51252&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaArray.h Mon May 19 10:16:18 2008 @@ -54,8 +54,6 @@ }; -typedef JavaArray* (*arrayCtor_t)(uint32 len, CommonClass* cl, Jnjvm* vm); - #define ARRAYCLASS(name, elmt) \ class name : public JavaArray { \ public: \ Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp?rev=51252&r1=51251&r2=51252&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp Mon May 19 10:16:18 2008 @@ -82,12 +82,13 @@ } void JavaJIT::push(llvm::Value* val, const AssessorDesc* ass) { - assert(ass->llvmType == val->getType()); + assert(LLVMAssessorInfo::AssessorInfo[ass->numId].llvmType == val->getType()); stack.push_back(std::make_pair(val, ass)); } void JavaJIT::push(std::pair pair) { - assert(pair.second->llvmType == pair.first->getType()); + assert(LLVMAssessorInfo::AssessorInfo[pair.second->numId].llvmType == + pair.first->getType()); stack.push_back(pair); } @@ -263,7 +264,9 @@ llvm::BranchInst::Create(executeBlock, endBlock, test, currentBlock); if (compilingMethod->signature->ret->funcs != AssessorDesc::dVoid) { - Constant* C = compilingMethod->signature->ret->funcs->llvmNullConstant; + uint8 id = compilingMethod->signature->ret->funcs->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + Constant* C = LAI.llvmNullConstant; endNode->addIncoming(C, currentBlock); } @@ -1711,11 +1714,13 @@ const AssessorDesc* ass = topFunc(); Value* val = pop(); Typedef* sign = compilingClass->ctpInfo->infoOfField(index); - const Type* type = sign->funcs->llvmType; + uint8 id = sign->funcs->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + const Type* type = LAI.llvmType; if (type == Type::Int64Ty || type == Type::DoubleTy) { val = pop(); } - Value* ptr = ldResolved(index, true, 0, type, sign->funcs->llvmTypePtr); + Value* ptr = ldResolved(index, true, 0, type, LAI.llvmTypePtr); if (type != val->getType()) { // int1, int8, int16 convertValue(val, type, currentBlock, @@ -1727,10 +1732,12 @@ void JavaJIT::getStaticField(uint16 index) { Typedef* sign = compilingClass->ctpInfo->infoOfField(index); - Value* ptr = ldResolved(index, true, 0, sign->funcs->llvmType, - sign->funcs->llvmTypePtr); + uint8 id = sign->funcs->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + Value* ptr = ldResolved(index, true, 0, LAI.llvmType, + LAI.llvmTypePtr); push(new LoadInst(ptr, "", currentBlock), sign->funcs); - const Type* type = sign->funcs->llvmType; + const Type* type = LAI.llvmType; if (type == Type::Int64Ty || type == Type::DoubleTy) { push(mvm::jit::constantZero, AssessorDesc::dInt); } @@ -1740,7 +1747,9 @@ const AssessorDesc* ass = topFunc(); Value* val = pop(); Typedef* sign = compilingClass->ctpInfo->infoOfField(index); - const Type* type = sign->funcs->llvmType; + uint8 id = sign->funcs->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + const Type* type = LAI.llvmType; if (type == Type::Int64Ty || type == Type::DoubleTy) { val = pop(); @@ -1749,7 +1758,7 @@ Value* object = pop(); JITVerifyNull(object); Value* ptr = ldResolved(index, false, object, type, - sign->funcs->llvmTypePtr); + LAI.llvmTypePtr); if (type != val->getType()) { // int1, int8, int16 convertValue(val, type, currentBlock, @@ -1763,10 +1772,12 @@ Typedef* sign = compilingClass->ctpInfo->infoOfField(index); Value* obj = pop(); JITVerifyNull(obj); - Value* ptr = ldResolved(index, false, obj, sign->funcs->llvmType, - sign->funcs->llvmTypePtr); + uint8 id = sign->funcs->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + Value* ptr = ldResolved(index, false, obj, LAI.llvmType, + LAI.llvmTypePtr); push(new LoadInst(ptr, "", currentBlock), sign->funcs); - const Type* type = sign->funcs->llvmType; + const Type* type = LAI.llvmType; if (type == Type::Int64Ty || type == Type::DoubleTy) { push(mvm::jit::constantZero, AssessorDesc::dInt); } Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp?rev=51252&r1=51251&r2=51252&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp Mon May 19 10:16:18 2008 @@ -1457,7 +1457,11 @@ uint32 tmp = i; BasicBlock* ifTrue = opcodeInfos[tmp + readS2(bytecodes, i)].newBlock; const AssessorDesc* ass = topFunc(); - llvm::Value* val = ass->llvmNullConstant; + + uint8 id = ass->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + llvm::Value* val = LAI.llvmNullConstant; + Value* op = pop(); llvm::Value* test = new ICmpInst(ICmpInst::ICMP_EQ, op, val, "", currentBlock); @@ -1471,7 +1475,11 @@ uint32 tmp = i; BasicBlock* ifTrue = opcodeInfos[tmp + readS2(bytecodes, i)].newBlock; const AssessorDesc* ass = topFunc(); - llvm::Value* val = ass->llvmNullConstant; + + uint8 id = ass->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + llvm::Value* val = LAI.llvmNullConstant; + Value* op = pop(); llvm::Value* test = new ICmpInst(ICmpInst::ICMP_NE, op, val, "", currentBlock); @@ -1485,7 +1493,9 @@ uint32 tmp = i; BasicBlock* ifTrue = opcodeInfos[tmp + readS2(bytecodes, i)].newBlock; const AssessorDesc* ass = topFunc(); - llvm::Value* val = ass->llvmNullConstant; + uint8 id = ass->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + llvm::Value* val = LAI.llvmNullConstant; Value* op = pop(); llvm::Value* test = new ICmpInst(ICmpInst::ICMP_SLT, op, val, "", currentBlock); @@ -1499,7 +1509,9 @@ uint32 tmp = i; BasicBlock* ifTrue = opcodeInfos[tmp + readS2(bytecodes, i)].newBlock; const AssessorDesc* ass = topFunc(); - llvm::Value* val = ass->llvmNullConstant; + uint8 id = ass->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + llvm::Value* val = LAI.llvmNullConstant; Value* op = pop(); llvm::Value* test = new ICmpInst(ICmpInst::ICMP_SGE, op, val, "", currentBlock); @@ -1513,7 +1525,9 @@ uint32 tmp = i; BasicBlock* ifTrue = opcodeInfos[tmp + readS2(bytecodes, i)].newBlock; const AssessorDesc* ass = topFunc(); - llvm::Value* val = ass->llvmNullConstant; + uint8 id = ass->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + llvm::Value* val = LAI.llvmNullConstant; Value* op = pop(); llvm::Value* test = new ICmpInst(ICmpInst::ICMP_SGT, op, val, "", currentBlock); @@ -1527,7 +1541,9 @@ uint32 tmp = i; BasicBlock* ifTrue = opcodeInfos[tmp + readS2(bytecodes, i)].newBlock; const AssessorDesc* ass = topFunc(); - llvm::Value* val = ass->llvmNullConstant; + uint8 id = ass->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + llvm::Value* val = LAI.llvmNullConstant; Value* op = pop(); llvm::Value* test = new ICmpInst(ICmpInst::ICMP_SLE, op, val, "", currentBlock); @@ -1837,7 +1853,8 @@ AssessorDesc* ass = AssessorDesc::arrayType(id); dcl = ass->arrayClass; TheVT = JnjvmModule::JavaObjectVirtualTableGV; - sizeElement = ass->sizeInBytesConstant; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[ass->numId]; + sizeElement = LAI.sizeInBytesConstant; } else { uint16 index = readU2(bytecodes, i); const UTF8* className = @@ -2101,7 +2118,8 @@ case IFNULL : { uint32 tmp = i; const AssessorDesc* ass = topFunc(); - llvm::Value* nil = ass->llvmNullConstant; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[ass->numId]; + llvm::Value* nil = LAI.llvmNullConstant; llvm::Value* val = pop(); llvm::Value* test = new ICmpInst(ICmpInst::ICMP_EQ, val, nil, "", currentBlock); @@ -2115,7 +2133,8 @@ case IFNONNULL : { uint32 tmp = i; const AssessorDesc* ass = topFunc(); - llvm::Value* nil = ass->llvmNullConstant; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[ass->numId]; + llvm::Value* nil = LAI.llvmNullConstant; llvm::Value* val = pop(); llvm::Value* test = new ICmpInst(ICmpInst::ICMP_NE, val, nil, "", currentBlock); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp?rev=51252&r1=51251&r2=51252&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp Mon May 19 10:16:18 2008 @@ -9,10 +9,6 @@ #include -#include "llvm/Constant.h" -#include "llvm/DerivedTypes.h" -#include "llvm/Type.h" - #include "mvm/JIT.h" #include "JavaAccess.h" @@ -60,23 +56,19 @@ AssessorDesc* AssessorDesc::allocate(bool dt, char bid, uint32 nb, uint32 nw, const char* name, const char* className, - Jnjvm* vm, const llvm::Type* t, + Jnjvm* vm, uint8 nid, const char* assocName, ClassArray* cl, - llvm::ConstantInt* CI, arrayCtor_t ctor) { + arrayCtor_t ctor) { AssessorDesc* res = vm_new(vm, AssessorDesc)(); + res->numId = nid; res->doTrace = dt; res->byteId = bid; res->nbb = nb; res->nbw = nw; res->asciizName = name; res->UTF8Name = vm->asciizConstructUTF8(name); - res->llvmType = t; - res->sizeInBytesConstant = CI; res->arrayCtor = ctor; - if (t && t != llvm::Type::VoidTy) { - res->llvmTypePtr = llvm::PointerType::getUnqual(t); - res->llvmNullConstant = llvm::Constant::getNullValue(t); - } + res->arrayClass = cl; if (assocName) res->assocClassName = vm->asciizConstructUTF8(assocName); @@ -96,56 +88,54 @@ void AssessorDesc::initialise(Jnjvm* vm) { - dParg = AssessorDesc::allocate(false, I_PARG, 0, 0, "(", "(", vm, 0, 0, 0, - 0, 0); - dPard = AssessorDesc::allocate(false, I_PARD, 0, 0, ")", ")", vm, 0, 0, 0, - 0, 0); + dParg = AssessorDesc::allocate(false, I_PARG, 0, 0, "(", "(", vm, -1, 0, 0, + 0); + dPard = AssessorDesc::allocate(false, I_PARD, 0, 0, ")", ")", vm, -1, 0, 0, + 0); dVoid = AssessorDesc::allocate(false, I_VOID, 0, 0, "void", "*** void ***", - vm, llvm::Type::VoidTy, "java/lang/Void", - 0, 0, 0); + vm, VOID_ID, "java/lang/Void", 0, 0); dBool = AssessorDesc::allocate(false, I_BOOL, 1, 1, "boolean", "*** boolean ***", vm, - llvm::Type::Int8Ty, "java/lang/Boolean", - JavaArray::ofBool, mvm::jit::constantOne, + BOOL_ID, "java/lang/Boolean", + JavaArray::ofBool, (arrayCtor_t)ArrayUInt8::acons); dByte = AssessorDesc::allocate(false, I_BYTE, 1, 1, "byte", "*** byte ***", - vm, llvm::Type::Int8Ty, "java/lang/Byte", - JavaArray::ofByte, mvm::jit::constantOne, + vm, BYTE_ID, "java/lang/Byte", + JavaArray::ofByte, (arrayCtor_t)ArraySInt8::acons); dChar = AssessorDesc::allocate(false, I_CHAR, 2, 1, "char", "*** char ***", - vm, llvm::Type::Int16Ty, "java/lang/Character", - JavaArray::ofChar, mvm::jit::constantTwo, + vm, CHAR_ID, "java/lang/Character", + JavaArray::ofChar, (arrayCtor_t)ArrayUInt16::acons); dShort = AssessorDesc::allocate(false, I_SHORT, 2, 1, "short", - "*** short ***", vm, llvm::Type::Int16Ty, + "*** short ***", vm, SHORT_ID, "java/lang/Short", - JavaArray::ofShort, mvm::jit::constantTwo, + JavaArray::ofShort, (arrayCtor_t)ArraySInt16::acons); dInt = AssessorDesc::allocate(false, I_INT, 4, 1, "int", "*** int ***", vm, - llvm::Type::Int32Ty, "java/lang/Integer", - JavaArray::ofInt, mvm::jit::constantFour, + INT_ID, "java/lang/Integer", + JavaArray::ofInt, (arrayCtor_t)ArraySInt32::acons); dFloat = AssessorDesc::allocate(false, I_FLOAT, 4, 1, "float", "*** float ***", vm, - llvm::Type::FloatTy, "java/lang/Float", - JavaArray::ofFloat, mvm::jit::constantFour, + FLOAT_ID, "java/lang/Float", + JavaArray::ofFloat, (arrayCtor_t)ArrayFloat::acons); dLong = AssessorDesc::allocate(false, I_LONG, 8, 2, "long", "*** long ***", - vm, llvm::Type::Int64Ty, "java/lang/Long", - JavaArray::ofLong, mvm::jit::constantEight, + vm, LONG_ID, "java/lang/Long", + JavaArray::ofLong, (arrayCtor_t)ArrayLong::acons); dDouble = AssessorDesc::allocate(false, I_DOUBLE, 8, 2, "double", "*** double ***", vm, - llvm::Type::DoubleTy, "java/lang/Double", - JavaArray::ofDouble, mvm::jit::constantEight, + DOUBLE_ID, "java/lang/Double", + JavaArray::ofDouble, (arrayCtor_t)ArrayDouble::acons); dTab = AssessorDesc::allocate(true, I_TAB, sizeof(void*), 1, "array", "array", - vm, JnjvmModule::JavaObjectType, 0, 0, - mvm::jit::constantPtrSize, + vm, ARRAY_ID, 0, 0, (arrayCtor_t)ArrayObject::acons); dRef = AssessorDesc::allocate(true, I_REF, sizeof(void*), 1, "reference", - "reference", vm, JnjvmModule::JavaObjectType, - 0, 0, mvm::jit::constantPtrSize, + "reference", vm, OBJECT_ID, + 0, 0, (arrayCtor_t)ArrayObject::acons); mvm::Object::pushRoot((mvm::Object*)dParg); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h?rev=51252&r1=51251&r2=51252&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h Mon May 19 10:16:18 2008 @@ -10,24 +10,39 @@ #ifndef JNJVM_JAVA_TYPES_H #define JNJVM_JAVA_TYPES_H -#include "llvm/Constants.h" -#include "llvm/DerivedTypes.h" -#include "llvm/Type.h" - #include "mvm/Object.h" #include "types.h" -#include "JavaArray.h" +namespace mvm { + class Code; +} namespace jnjvm { +class ClassArray; class CommonClass; +class JavaArray; class JavaJIT; class JavaObject; class Jnjvm; class UTF8; +#define VOID_ID 0 +#define BOOL_ID 1 +#define BYTE_ID 2 +#define CHAR_ID 3 +#define SHORT_ID 4 +#define INT_ID 5 +#define FLOAT_ID 6 +#define LONG_ID 7 +#define DOUBLE_ID 8 +#define ARRAY_ID 9 +#define OBJECT_ID 10 +#define NUM_ASSESSORS 11 + +typedef JavaArray* (*arrayCtor_t)(uint32 len, CommonClass* cl, Jnjvm* vm); + class AssessorDesc : public mvm::Object { public: static VirtualTable *VT; @@ -51,13 +66,10 @@ char byteId; uint32 nbb; uint32 nbw; + uint8 numId; const char* asciizName; CommonClass* classType; - const llvm::Type* llvmType; - const llvm::Type* llvmTypePtr; - llvm::Constant* llvmNullConstant; - llvm::ConstantInt* sizeInBytesConstant; const UTF8* assocClassName; const UTF8* UTF8Name; ClassArray* arrayClass; @@ -79,9 +91,9 @@ static AssessorDesc* allocate(bool dt, char bid, uint32 nb, uint32 nw, const char* name, const char* className, - Jnjvm* vm, const llvm::Type* type, + Jnjvm* vm, uint8 nid, const char* assocName, ClassArray* cl, - llvm::ConstantInt* CI, arrayCtor_t ctor); + arrayCtor_t ctor); static void initialise(Jnjvm* vm); Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=51252&r1=51251&r2=51252&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Mon May 19 10:16:18 2008 @@ -323,7 +323,9 @@ uint32 index = 0; for (std::vector::iterator i = classDef->virtualFields.begin(), e = classDef->virtualFields.end(); i!= e; ++i) { - fields.push_back((*i)->signature->funcs->llvmType); + uint8 id = (*i)->signature->funcs->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + fields.push_back(LAI.llvmType); (*i)->num = index++; } @@ -359,7 +361,9 @@ uint32 index = 0; for (std::vector::iterator i = classDef->staticFields.begin(), e = classDef->staticFields.end(); i!= e; ++i) { - fields.push_back((*i)->signature->funcs->llvmType); + uint8 id = (*i)->signature->funcs->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + fields.push_back(LAI.llvmType); (*i)->num = index++; } @@ -518,15 +522,18 @@ llvmArgs.push_back(JnjvmModule::JavaObjectType); for (uint32 i = 0; i < size; ++i) { - llvmArgs.push_back(signature->args.at(i)->funcs->llvmType); + uint8 id = signature->args.at(i)->funcs->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + llvmArgs.push_back(LAI.llvmType); } #if defined(MULTIPLE_VM) || defined(MULTIPLE_GC) llvmArgs.push_back(mvm::jit::ptrType); // domain #endif - virtualType = FunctionType::get(signature->ret->funcs->llvmType, - llvmArgs, false); + uint8 id = signature->ret->funcs->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + virtualType = FunctionType::get(LAI.llvmType, llvmArgs, false); } return virtualType; } @@ -539,15 +546,18 @@ unsigned int size = signature->args.size(); for (uint32 i = 0; i < size; ++i) { - llvmArgs.push_back(signature->args.at(i)->funcs->llvmType); + uint8 id = signature->args.at(i)->funcs->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + llvmArgs.push_back(LAI.llvmType); } #if defined(MULTIPLE_VM) || defined(MULTIPLE_GC) llvmArgs.push_back(mvm::jit::ptrType); // domain #endif - staticType = FunctionType::get(signature->ret->funcs->llvmType, - llvmArgs, false); + uint8 id = signature->ret->funcs->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + staticType = FunctionType::get(LAI.llvmType, llvmArgs, false); } return staticType; } @@ -563,15 +573,18 @@ llvmArgs.push_back(JnjvmModule::JavaObjectType); // Class for (uint32 i = 0; i < size; ++i) { - llvmArgs.push_back(signature->args.at(i)->funcs->llvmType); + uint8 id = signature->args.at(i)->funcs->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + llvmArgs.push_back(LAI.llvmType); } #if defined(MULTIPLE_VM) || defined(MULTIPLE_GC) llvmArgs.push_back(mvm::jit::ptrType); // domain #endif - nativeType = FunctionType::get(signature->ret->funcs->llvmType, - llvmArgs, false); + uint8 id = signature->ret->funcs->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + nativeType = FunctionType::get(LAI.llvmType, llvmArgs, false); } return nativeType; } @@ -609,7 +622,8 @@ const AssessorDesc* funcs = (*i)->funcs; ptr = GetElementPtrInst::Create(ptr, CI, "", currentBlock); - Value* val = new BitCastInst(ptr, funcs->llvmTypePtr, "", currentBlock); + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[funcs->numId]; + Value* val = new BitCastInst(ptr, LAI.llvmTypePtr, "", currentBlock); Value* arg = new LoadInst(val, "", currentBlock); Args.push_back(arg); if (funcs == AssessorDesc::dLong || funcs == AssessorDesc::dDouble) { @@ -661,7 +675,8 @@ for (std::vector::iterator i = signature->args.begin(), e = signature->args.end(); i!= e; i++) { - Args.push_back(new VAArgInst(ap, (*i)->funcs->llvmType, "", currentBlock)); + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[(*i)->funcs->numId]; + Args.push_back(new VAArgInst(ap, LAI.llvmType, "", currentBlock)); } #if defined(MULTIPLE_VM) || defined(MULTIPLE_GC) @@ -708,8 +723,9 @@ Args2.push_back(getVirtualPtrType()); Args2.push_back(JnjvmModule::JavaObjectType); Args2.push_back(PointerType::getUnqual(Type::Int32Ty)); - virtualBufType = FunctionType::get(signature->ret->funcs->llvmType, - Args2, false); + uint8 id = signature->ret->funcs->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + virtualBufType = FunctionType::get(LAI.llvmType, Args2, false); } return virtualBufType; } @@ -722,8 +738,9 @@ Args.push_back(mvm::jit::ptrType); // vm Args.push_back(getStaticPtrType()); Args.push_back(PointerType::getUnqual(Type::Int32Ty)); - staticBufType = FunctionType::get(signature->ret->funcs->llvmType, - Args, false); + uint8 id = signature->ret->funcs->numId; + LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; + staticBufType = FunctionType::get(LAI.llvmType, Args, false); } return staticBufType; } @@ -1016,6 +1033,7 @@ JavaObjectLockOffsetConstant = mvm::jit::constantTwo; JavaObjectClassOffsetConstant = mvm::jit::constantOne; + LLVMAssessorInfo::initialise(); } void JnjvmModule::InitField(JavaField* field, JavaObject* obj, uint64 val) { @@ -1066,4 +1084,73 @@ mvm::jit::executionEngine->getTargetData()->getStringRepresentation(); setDataLayout(str); } +void LLVMAssessorInfo::initialise() { + AssessorInfo[VOID_ID].llvmType = Type::VoidTy; + AssessorInfo[VOID_ID].llvmTypePtr = 0; + AssessorInfo[VOID_ID].llvmNullConstant = 0; + AssessorInfo[VOID_ID].sizeInBytesConstant = 0; + + AssessorInfo[BOOL_ID].llvmType = Type::Int8Ty; + AssessorInfo[BOOL_ID].llvmTypePtr = PointerType::getUnqual(Type::Int8Ty); + AssessorInfo[BOOL_ID].llvmNullConstant = + Constant::getNullValue(Type::Int8Ty); + AssessorInfo[BOOL_ID].sizeInBytesConstant = mvm::jit::constantOne; + + AssessorInfo[BYTE_ID].llvmType = Type::Int8Ty; + AssessorInfo[BYTE_ID].llvmTypePtr = PointerType::getUnqual(Type::Int8Ty); + AssessorInfo[BYTE_ID].llvmNullConstant = + Constant::getNullValue(Type::Int8Ty); + AssessorInfo[BYTE_ID].sizeInBytesConstant = mvm::jit::constantOne; + + AssessorInfo[SHORT_ID].llvmType = Type::Int16Ty; + AssessorInfo[SHORT_ID].llvmTypePtr = PointerType::getUnqual(Type::Int16Ty); + AssessorInfo[SHORT_ID].llvmNullConstant = + Constant::getNullValue(Type::Int16Ty); + AssessorInfo[SHORT_ID].sizeInBytesConstant = mvm::jit::constantTwo; + + AssessorInfo[CHAR_ID].llvmType = Type::Int16Ty; + AssessorInfo[CHAR_ID].llvmTypePtr = PointerType::getUnqual(Type::Int16Ty); + AssessorInfo[CHAR_ID].llvmNullConstant = + Constant::getNullValue(Type::Int16Ty); + AssessorInfo[CHAR_ID].sizeInBytesConstant = mvm::jit::constantTwo; + + AssessorInfo[INT_ID].llvmType = Type::Int32Ty; + AssessorInfo[INT_ID].llvmTypePtr = PointerType::getUnqual(Type::Int32Ty); + AssessorInfo[INT_ID].llvmNullConstant = + Constant::getNullValue(Type::Int32Ty); + AssessorInfo[INT_ID].sizeInBytesConstant = mvm::jit::constantFour; + + AssessorInfo[FLOAT_ID].llvmType = Type::FloatTy; + AssessorInfo[FLOAT_ID].llvmTypePtr = PointerType::getUnqual(Type::FloatTy); + AssessorInfo[FLOAT_ID].llvmNullConstant = + Constant::getNullValue(Type::FloatTy); + AssessorInfo[FLOAT_ID].sizeInBytesConstant = mvm::jit::constantFour; + + AssessorInfo[LONG_ID].llvmType = Type::Int64Ty; + AssessorInfo[LONG_ID].llvmTypePtr = PointerType::getUnqual(Type::Int64Ty); + AssessorInfo[LONG_ID].llvmNullConstant = + Constant::getNullValue(Type::Int64Ty); + AssessorInfo[LONG_ID].sizeInBytesConstant = mvm::jit::constantEight; + + AssessorInfo[DOUBLE_ID].llvmType = Type::DoubleTy; + AssessorInfo[DOUBLE_ID].llvmTypePtr = PointerType::getUnqual(Type::DoubleTy); + AssessorInfo[DOUBLE_ID].llvmNullConstant = + Constant::getNullValue(Type::DoubleTy); + AssessorInfo[DOUBLE_ID].sizeInBytesConstant = mvm::jit::constantEight; + + AssessorInfo[ARRAY_ID].llvmType = JnjvmModule::JavaObjectType; + AssessorInfo[ARRAY_ID].llvmTypePtr = + PointerType::getUnqual(JnjvmModule::JavaObjectType); + AssessorInfo[ARRAY_ID].llvmNullConstant = + JnjvmModule::JavaObjectNullConstant; + AssessorInfo[ARRAY_ID].sizeInBytesConstant = mvm::jit::constantPtrSize; + + AssessorInfo[OBJECT_ID].llvmType = JnjvmModule::JavaObjectType; + AssessorInfo[OBJECT_ID].llvmTypePtr = + PointerType::getUnqual(JnjvmModule::JavaObjectType); + AssessorInfo[OBJECT_ID].llvmNullConstant = + JnjvmModule::JavaObjectNullConstant; + AssessorInfo[OBJECT_ID].sizeInBytesConstant = mvm::jit::constantPtrSize; +} +LLVMAssessorInfo LLVMAssessorInfo::AssessorInfo[NUM_ASSESSORS]; Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h?rev=51252&r1=51251&r2=51252&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h Mon May 19 10:16:18 2008 @@ -9,6 +9,8 @@ #include +#include "JavaTypes.h" + #include "llvm/Constant.h" #include "llvm/DerivedTypes.h" #include "llvm/Function.h" @@ -28,6 +30,19 @@ class JnjvmModule; class Signdef; +class LLVMAssessorInfo { +public: + const llvm::Type* llvmType; + const llvm::Type* llvmTypePtr; + llvm::Constant* llvmNullConstant; + llvm::ConstantInt* sizeInBytesConstant; + + static void initialise(); + static LLVMAssessorInfo AssessorInfo[NUM_ASSESSORS]; + +}; + + class LLVMCommonClassInfo { friend class JnjvmModule; From nicolas.geoffray at lip6.fr Mon May 19 10:33:33 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Mon, 19 May 2008 15:33:33 -0000 Subject: [llvm-commits] [vmkit] r51253 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaJIT.cpp JnjvmModuleProvider.cpp Message-ID: <200805191533.m4JFXXVS011137@zion.cs.uiuc.edu> Author: geoffray Date: Mon May 19 10:33:32 2008 New Revision: 51253 URL: http://llvm.org/viewvc/llvm-project?rev=51253&view=rev Log: Take the JIT lock when mapping JVM bytecode to LLVM IR. The lock is released when loading exception classes and acquired again just after. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp?rev=51253&r1=51252&r2=51253&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp Mon May 19 10:33:32 2008 @@ -818,7 +818,11 @@ } } } - + + // We don't need the lock here, and Java requires to load the classes in the + // try clause, which may require compilation. Therefore we release the lock + // and aquire it after the exception table is read. + mvm::jit::executionEngine->lock.release(); for (uint16 i = 0; i < nbe - sync; ++i) { Exception* ex = new Exception(); ex->startpc = reader->readU2(); @@ -869,6 +873,7 @@ exceptions.push_back(ex); } + mvm::jit::executionEngine->lock.acquire(); bool first = true; for (std::vector::iterator i = exceptions.begin(), Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp?rev=51253&r1=51252&r2=51253&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.cpp Mon May 19 10:33:32 2008 @@ -104,8 +104,8 @@ LLVMMethodInfo* LMI = ((JnjvmModule*)TheModule)->getMethodInfo(meth); Function* func = LMI->getMethod(); if (func->hasNotBeenReadFromBitcode()) { - // Don't take the JIT lock yet, as Java exceptions in the bytecode must be - // loaded first. + // We are jitting. Take the lock. + llvm::MutexGuard locked(mvm::jit::executionEngine->lock); JavaJIT jit; jit.compilingClass = meth->classDef; jit.compilingMethod = meth; From nicolas.geoffray at lip6.fr Mon May 19 11:11:37 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Mon, 19 May 2008 16:11:37 -0000 Subject: [llvm-commits] [vmkit] r51254 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaUpcalls.cpp Jnjvm.h Message-ID: <200805191611.m4JGBbfE012236@zion.cs.uiuc.edu> Author: geoffray Date: Mon May 19 11:11:37 2008 New Revision: 51254 URL: http://llvm.org/viewvc/llvm-project?rev=51254&view=rev Log: Clean up includes. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp?rev=51254&r1=51253&r2=51254&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp Mon May 19 11:11:37 2008 @@ -9,8 +9,6 @@ #include -#include "llvm/Function.h" - #include "mvm/JIT.h" #include "JavaAccess.h" Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h?rev=51254&r1=51253&r2=51254&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h Mon May 19 11:11:37 2008 @@ -12,9 +12,6 @@ #include -#include "llvm/Function.h" -#include "llvm/PassManager.h" - #include "mvm/Object.h" #include "mvm/PrintBuffer.h" #include "mvm/Threads/Cond.h" From nicolas.geoffray at lip6.fr Mon May 19 11:12:22 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Mon, 19 May 2008 16:12:22 -0000 Subject: [llvm-commits] [vmkit] r51255 - /vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp Message-ID: <200805191612.m4JGCM0i012267@zion.cs.uiuc.edu> Author: geoffray Date: Mon May 19 11:12:21 2008 New Revision: 51255 URL: http://llvm.org/viewvc/llvm-project?rev=51255&view=rev Log: Switch on the numId of the field's AssessorDesc to know what to do. Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp?rev=51255&r1=51254&r2=51255&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp Mon May 19 11:12:21 2008 @@ -46,15 +46,32 @@ jobject Field, jobject obj) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; - if (ass != AssessorDesc::dInt && ass != AssessorDesc::dChar && ass != AssessorDesc::dByte && ass != AssessorDesc::dShort) - JavaThread::get()->isolate->illegalArgumentException(""); if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - - return isStatic(field->access) ? - (sint32)field->getStaticInt32Field() : - (sint32)field->getVirtualInt32Field((JavaObject*)obj); + + switch (ass->numId) { + case INT_ID : + return isStatic(field->access) ? + (sint32)field->getStaticInt32Field() : + (sint32)field->getVirtualInt32Field((JavaObject*)obj); + case CHAR_ID : + return isStatic(field->access) ? + (uint32)field->getStaticInt16Field() : + (uint32)field->getVirtualInt16Field((JavaObject*)obj); + case BYTE_ID : + return isStatic(field->access) ? + (sint32)field->getStaticInt8Field() : + (sint32)field->getVirtualInt8Field((JavaObject*)obj); + case SHORT_ID : + return isStatic(field->access) ? + (sint32)field->getStaticInt16Field() : + (sint32)field->getVirtualInt16Field((JavaObject*)obj); + default : + JavaThread::get()->isolate->illegalArgumentException(""); + } + return 0; + } JNIEXPORT jlong JNICALL Java_java_lang_reflect_Field_getLong( @@ -64,16 +81,35 @@ jobject Field, jobject obj) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; - if (ass != AssessorDesc::dInt && ass != AssessorDesc::dChar && ass != AssessorDesc::dByte && ass != AssessorDesc::dShort && - ass != AssessorDesc::dLong) - JavaThread::get()->isolate->illegalArgumentException(""); if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - return isStatic(field->access) ? - (sint64)field->getStaticLongField() : - (sint64)field->getVirtualLongField((JavaObject*)obj); + switch (ass->numId) { + case INT_ID : + return isStatic(field->access) ? + (sint64)field->getStaticInt32Field() : + (sint64)field->getVirtualInt32Field((JavaObject*)obj); + case CHAR_ID : + return isStatic(field->access) ? + (uint64)field->getStaticInt16Field() : + (uint64)field->getVirtualInt16Field((JavaObject*)obj); + case BYTE_ID : + return isStatic(field->access) ? + (sint64)field->getStaticInt8Field() : + (sint64)field->getVirtualInt8Field((JavaObject*)obj); + case SHORT_ID : + return isStatic(field->access) ? + (sint64)field->getStaticInt16Field() : + (sint64)field->getVirtualInt16Field((JavaObject*)obj); + case LONG_ID : + return isStatic(field->access) ? + (sint64)field->getStaticLongField() : + (sint64)field->getVirtualLongField((JavaObject*)obj); + default: + JavaThread::get()->isolate->illegalArgumentException(""); + } + return 0; } JNIEXPORT jboolean JNICALL Java_java_lang_reflect_Field_getBoolean( @@ -84,15 +120,20 @@ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; - if (ass != AssessorDesc::dBool) - JavaThread::get()->isolate->illegalArgumentException(""); - if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - return isStatic(field->access) ? - (uint8)field->getStaticInt8Field() : - (uint8)field->getVirtualInt8Field((JavaObject*)obj); + switch (ass->numId) { + case BOOL_ID : + return isStatic(field->access) ? + (uint8)field->getStaticInt8Field() : + (uint8)field->getVirtualInt8Field((JavaObject*)obj); + default: + JavaThread::get()->isolate->illegalArgumentException(""); + } + + return 0; + } JNIEXPORT jfloat JNICALL Java_java_lang_reflect_Field_getFloat( @@ -106,32 +147,34 @@ if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - if (ass == AssessorDesc::dByte) { - return isStatic(field->access) ? - (jfloat)field->getStaticInt8Field() : - (jfloat)field->getVirtualInt8Field((JavaObject*)obj); - } else if (ass == AssessorDesc::dInt) { - return isStatic(field->access) ? - (jfloat)field->getStaticInt32Field() : - (jfloat)field->getVirtualInt32Field((JavaObject*)obj); - } else if (ass == AssessorDesc::dShort) { - return isStatic(field->access) ? - (jfloat)field->getStaticInt16Field() : - (jfloat)field->getVirtualInt16Field((JavaObject*)obj); - } else if (ass == AssessorDesc::dLong) { - return isStatic(field->access) ? - (jfloat)field->getStaticLongField() : - (jfloat)field->getVirtualLongField((JavaObject*)obj); - } else if (ass == AssessorDesc::dChar) { - return isStatic(field->access) ? - (jfloat)(uint32)field->getStaticInt16Field() : - (jfloat)(uint32)field->getVirtualInt16Field((JavaObject*)obj); - } else if (ass == AssessorDesc::dFloat) { - return isStatic(field->access) ? - (jfloat)field->getStaticFloatField() : - (jfloat)field->getVirtualFloatField((JavaObject*)obj); + switch (ass->numId) { + case BYTE_ID : + return isStatic(field->access) ? + (jfloat)field->getStaticInt8Field() : + (jfloat)field->getVirtualInt8Field((JavaObject*)obj); + case INT_ID : + return isStatic(field->access) ? + (jfloat)field->getStaticInt32Field() : + (jfloat)field->getVirtualInt32Field((JavaObject*)obj); + case SHORT_ID : + return isStatic(field->access) ? + (jfloat)field->getStaticInt16Field() : + (jfloat)field->getVirtualInt16Field((JavaObject*)obj); + case LONG_ID : + return isStatic(field->access) ? + (jfloat)field->getStaticLongField() : + (jfloat)field->getVirtualLongField((JavaObject*)obj); + case CHAR_ID : + return isStatic(field->access) ? + (jfloat)(uint32)field->getStaticInt16Field() : + (jfloat)(uint32)field->getVirtualInt16Field((JavaObject*)obj); + case FLOAT_ID : + return isStatic(field->access) ? + (jfloat)field->getStaticFloatField() : + (jfloat)field->getVirtualFloatField((JavaObject*)obj); + default: + JavaThread::get()->isolate->illegalArgumentException(""); } - JavaThread::get()->isolate->illegalArgumentException(""); return 0.0; } @@ -142,15 +185,20 @@ jobject Field, jobject obj) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; - if (ass != AssessorDesc::dByte) - JavaThread::get()->isolate->illegalArgumentException(""); if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - return isStatic(field->access) ? - (sint8)field->getStaticInt8Field() : - (sint8)field->getVirtualInt8Field((JavaObject*)obj); + switch (ass->numId) { + case BYTE_ID : + return isStatic(field->access) ? + (sint8)field->getStaticInt8Field() : + (sint8)field->getVirtualInt8Field((JavaObject*)obj); + default : + JavaThread::get()->isolate->illegalArgumentException(""); + } + + return 0; } JNIEXPORT jchar JNICALL Java_java_lang_reflect_Field_getChar( @@ -161,15 +209,20 @@ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; - if (ass != AssessorDesc::dChar) - JavaThread::get()->isolate->illegalArgumentException(""); - if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - return isStatic(field->access) ? - (uint16)field->getStaticInt16Field() : - (uint16)field->getVirtualInt16Field((JavaObject*)obj); + switch (ass->numId) { + case CHAR_ID : + return isStatic(field->access) ? + (uint16)field->getStaticInt16Field() : + (uint16)field->getVirtualInt16Field((JavaObject*)obj); + default : + JavaThread::get()->isolate->illegalArgumentException(""); + } + + return 0; + } JNIEXPORT jshort JNICALL Java_java_lang_reflect_Field_getShort( @@ -180,15 +233,23 @@ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; - if (ass != AssessorDesc::dShort && ass != AssessorDesc::dByte) - JavaThread::get()->isolate->illegalArgumentException(""); - if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - return isStatic(field->access) ? - (sint16)field->getStaticInt16Field() : - (sint16)field->getVirtualInt16Field((JavaObject*)obj); + switch (ass->numId) { + case SHORT_ID : + return isStatic(field->access) ? + (sint16)field->getStaticInt16Field() : + (sint16)field->getVirtualInt16Field((JavaObject*)obj); + case BYTE_ID : + return isStatic(field->access) ? + (sint16)field->getStaticInt8Field() : + (sint16)field->getVirtualInt8Field((JavaObject*)obj); + default : + JavaThread::get()->isolate->illegalArgumentException(""); + } + + return 0; } JNIEXPORT jdouble JNICALL Java_java_lang_reflect_Field_getDouble( @@ -202,36 +263,38 @@ if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - if (ass == AssessorDesc::dByte) { - return isStatic(field->access) ? - (jdouble)(sint64)field->getStaticInt8Field() : - (jdouble)(sint64)field->getVirtualInt8Field((JavaObject*)obj); - } else if (ass == AssessorDesc::dInt) { - return isStatic(field->access) ? - (jdouble)(sint64)field->getStaticInt32Field() : - (jdouble)(sint64)field->getVirtualInt32Field((JavaObject*)obj); - } else if (ass == AssessorDesc::dShort) { - return isStatic(field->access) ? - (jdouble)(sint64)field->getStaticInt16Field() : - (jdouble)(sint64)field->getVirtualInt16Field((JavaObject*)obj); - } else if (ass == AssessorDesc::dLong) { - return isStatic(field->access) ? - (jdouble)(sint64)field->getStaticLongField() : - (jdouble)(sint64)field->getVirtualLongField((JavaObject*)obj); - } else if (ass == AssessorDesc::dChar) { - return isStatic(field->access) ? - (jdouble)(uint64)field->getStaticInt16Field() : - (jdouble)(uint64)field->getVirtualInt16Field((JavaObject*)obj); - } else if (ass == AssessorDesc::dFloat) { - return isStatic(field->access) ? - (jdouble)field->getStaticFloatField() : - (jdouble)field->getVirtualFloatField((JavaObject*)obj); - } else if (ass == AssessorDesc::dDouble) { - return isStatic(field->access) ? - (jdouble)field->getStaticDoubleField() : - (jdouble)field->getVirtualDoubleField((JavaObject*)obj); + switch (ass->numId) { + case BYTE_ID : + return isStatic(field->access) ? + (jdouble)(sint64)field->getStaticInt8Field() : + (jdouble)(sint64)field->getVirtualInt8Field((JavaObject*)obj); + case INT_ID : + return isStatic(field->access) ? + (jdouble)(sint64)field->getStaticInt32Field() : + (jdouble)(sint64)field->getVirtualInt32Field((JavaObject*)obj); + case SHORT_ID : + return isStatic(field->access) ? + (jdouble)(sint64)field->getStaticInt16Field() : + (jdouble)(sint64)field->getVirtualInt16Field((JavaObject*)obj); + case LONG_ID : + return isStatic(field->access) ? + (jdouble)(sint64)field->getStaticLongField() : + (jdouble)(sint64)field->getVirtualLongField((JavaObject*)obj); + case CHAR_ID : + return isStatic(field->access) ? + (jdouble)(uint64)field->getStaticInt16Field() : + (jdouble)(uint64)field->getVirtualInt16Field((JavaObject*)obj); + case FLOAT_ID : + return isStatic(field->access) ? + (jdouble)field->getStaticFloatField() : + (jdouble)field->getVirtualFloatField((JavaObject*)obj); + case DOUBLE_ID : + return isStatic(field->access) ? + (jdouble)field->getStaticDoubleField() : + (jdouble)field->getVirtualDoubleField((JavaObject*)obj); + default : + JavaThread::get()->isolate->illegalArgumentException(""); } - JavaThread::get()->isolate->illegalArgumentException(""); return 0.0; } @@ -250,60 +313,79 @@ JavaThread::get()->isolate->initialiseClass(field->classDef); JavaObject* res = 0; - if (ass == AssessorDesc::dBool) { - uint8 val = (isStatic(field->access) ? - field->getStaticInt8Field() : - field->getVirtualInt8Field(obj)); - res = (*Classpath::boolClass)(vm); - Classpath::boolValue->setVirtualInt8Field(res, val); - } else if (ass == AssessorDesc::dByte) { - sint8 val = (isStatic(field->access) ? - field->getStaticInt8Field() : - field->getVirtualInt8Field(obj)); - res = (*Classpath::byteClass)(vm); - Classpath::byteValue->setVirtualInt8Field(res, val); - } else if (ass == AssessorDesc::dChar) { - uint16 val = (isStatic(field->access) ? - field->getStaticInt16Field() : - field->getVirtualInt16Field(obj)); - res = (*Classpath::charClass)(vm); - Classpath::charValue->setVirtualInt16Field(res, val); - } else if (ass == AssessorDesc::dShort) { - sint16 val = (isStatic(field->access) ? - field->getStaticInt16Field() : - field->getVirtualInt16Field(obj)); - res = (*Classpath::shortClass)(vm); - Classpath::shortValue->setVirtualInt16Field(res, val); - } else if (ass == AssessorDesc::dInt) { - sint32 val = (isStatic(field->access) ? - field->getStaticInt32Field() : - field->getVirtualInt32Field(obj)); - res = (*Classpath::intClass)(vm); - Classpath::intValue->setVirtualInt32Field(res, val); - } else if (ass == AssessorDesc::dLong) { - sint64 val = (isStatic(field->access) ? - field->getStaticLongField() : - field->getVirtualLongField(obj)); - res = (*Classpath::longClass)(vm); - Classpath::longValue->setVirtualLongField(res, val); - } else if (ass == AssessorDesc::dFloat) { - float val = (isStatic(field->access) ? - field->getStaticFloatField() : - field->getVirtualFloatField(obj)); - res = (*Classpath::floatClass)(vm); - Classpath::floatValue->setVirtualFloatField(res, val); - } else if (ass == AssessorDesc::dDouble) { - double val = (isStatic(field->access) ? - field->getStaticDoubleField() : - field->getVirtualDoubleField(obj)); - res = (*Classpath::doubleClass)(vm); - Classpath::doubleValue->setVirtualDoubleField(res, val); - } else if (ass == AssessorDesc::dTab || ass == AssessorDesc::dRef) { - res = (isStatic(field->access) ? - field->getStaticObjectField() : - field->getVirtualObjectField(obj)); - } else { - JavaThread::get()->isolate->unknownError("should not be here"); + switch (ass->numId) { + case BOOL_ID : { + uint8 val = (isStatic(field->access) ? + field->getStaticInt8Field() : + field->getVirtualInt8Field(obj)); + res = (*Classpath::boolClass)(vm); + Classpath::boolValue->setVirtualInt8Field(res, val); + break; + } + case BYTE_ID : { + sint8 val = (isStatic(field->access) ? + field->getStaticInt8Field() : + field->getVirtualInt8Field(obj)); + res = (*Classpath::byteClass)(vm); + Classpath::byteValue->setVirtualInt8Field(res, val); + break; + } + case CHAR_ID : { + uint16 val = (isStatic(field->access) ? + field->getStaticInt16Field() : + field->getVirtualInt16Field(obj)); + res = (*Classpath::charClass)(vm); + Classpath::charValue->setVirtualInt16Field(res, val); + break; + } + case SHORT_ID : { + sint16 val = (isStatic(field->access) ? + field->getStaticInt16Field() : + field->getVirtualInt16Field(obj)); + res = (*Classpath::shortClass)(vm); + Classpath::shortValue->setVirtualInt16Field(res, val); + break; + } + case INT_ID : { + sint32 val = (isStatic(field->access) ? + field->getStaticInt32Field() : + field->getVirtualInt32Field(obj)); + res = (*Classpath::intClass)(vm); + Classpath::intValue->setVirtualInt32Field(res, val); + break; + } + case LONG_ID : { + sint64 val = (isStatic(field->access) ? + field->getStaticLongField() : + field->getVirtualLongField(obj)); + res = (*Classpath::longClass)(vm); + Classpath::longValue->setVirtualLongField(res, val); + break; + } + case FLOAT_ID : { + float val = (isStatic(field->access) ? + field->getStaticFloatField() : + field->getVirtualFloatField(obj)); + res = (*Classpath::floatClass)(vm); + Classpath::floatValue->setVirtualFloatField(res, val); + break; + } + case DOUBLE_ID : { + double val = (isStatic(field->access) ? + field->getStaticDoubleField() : + field->getVirtualDoubleField(obj)); + res = (*Classpath::doubleClass)(vm); + Classpath::doubleValue->setVirtualDoubleField(res, val); + break; + } + case OBJECT_ID : + case ARRAY_ID : + res = (isStatic(field->access) ? + field->getStaticObjectField() : + field->getVirtualObjectField(obj)); + break; + default: + JavaThread::get()->isolate->unknownError("should not be here"); } return (jobject)res; } @@ -323,44 +405,46 @@ if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - if (ass == AssessorDesc::dBool) { - isStatic(field->access) ? - field->setStaticInt8Field(((uint8*)_buf)[0]) : - field->setVirtualInt8Field((JavaObject*)obj, ((uint8*)_buf)[0]); - } else if (ass == AssessorDesc::dByte) { - isStatic(field->access) ? - field->setStaticInt8Field(((sint8*)_buf)[0]) : - field->setVirtualInt8Field((JavaObject*)obj, ((sint8*)_buf)[0]); - } else if (ass == AssessorDesc::dChar) { - isStatic(field->access) ? - field->setStaticInt16Field(((uint16*)_buf)[0]) : - field->setVirtualInt16Field((JavaObject*)obj, ((uint16*)_buf)[0]); - } else if (ass == AssessorDesc::dShort) { - isStatic(field->access) ? - field->setStaticInt16Field(((sint16*)_buf)[0]) : - field->setVirtualInt16Field((JavaObject*)obj, ((sint16*)_buf)[0]); - } else if (ass == AssessorDesc::dInt) { - isStatic(field->access) ? - field->setStaticInt32Field(((sint32*)_buf)[0]) : - field->setVirtualInt32Field((JavaObject*)obj, ((sint32*)_buf)[0]); - } else if (ass == AssessorDesc::dLong) { - isStatic(field->access) ? - field->setStaticLongField(((sint64*)_buf)[0]) : - field->setVirtualLongField((JavaObject*)obj, ((sint64*)_buf)[0]); - } else if (ass == AssessorDesc::dFloat) { - isStatic(field->access) ? - field->setStaticFloatField(((float*)_buf)[0]) : - field->setVirtualFloatField((JavaObject*)obj, ((float*)_buf)[0]); - } else if (ass == AssessorDesc::dDouble) { - isStatic(field->access) ? - field->setStaticDoubleField(((double*)_buf)[0]) : - field->setVirtualDoubleField((JavaObject*)obj, ((double*)_buf)[0]); - } else if (ass == AssessorDesc::dTab || ass == AssessorDesc::dRef) { - isStatic(field->access) ? - field->setStaticObjectField(((JavaObject**)_buf)[0]) : - field->setVirtualObjectField((JavaObject*)obj, ((JavaObject**)_buf)[0]); - } else { - JavaThread::get()->isolate->unknownError("should not be here"); + switch (ass->numId) { + case BOOL_ID : + return isStatic(field->access) ? + field->setStaticInt8Field(((uint8*)_buf)[0]) : + field->setVirtualInt8Field((JavaObject*)obj, ((uint8*)_buf)[0]); + case BYTE_ID : + return isStatic(field->access) ? + field->setStaticInt8Field(((sint8*)_buf)[0]) : + field->setVirtualInt8Field((JavaObject*)obj, ((sint8*)_buf)[0]); + case CHAR_ID : + return isStatic(field->access) ? + field->setStaticInt16Field(((uint16*)_buf)[0]) : + field->setVirtualInt16Field((JavaObject*)obj, ((uint16*)_buf)[0]); + case SHORT_ID : + return isStatic(field->access) ? + field->setStaticInt16Field(((sint16*)_buf)[0]) : + field->setVirtualInt16Field((JavaObject*)obj, ((sint16*)_buf)[0]); + case INT_ID : + return isStatic(field->access) ? + field->setStaticInt32Field(((sint32*)_buf)[0]) : + field->setVirtualInt32Field((JavaObject*)obj, ((sint32*)_buf)[0]); + case LONG_ID : + return isStatic(field->access) ? + field->setStaticLongField(((sint64*)_buf)[0]) : + field->setVirtualLongField((JavaObject*)obj, ((sint64*)_buf)[0]); + case FLOAT_ID : + return isStatic(field->access) ? + field->setStaticFloatField(((float*)_buf)[0]) : + field->setVirtualFloatField((JavaObject*)obj, ((float*)_buf)[0]); + case DOUBLE_ID : + return isStatic(field->access) ? + field->setStaticDoubleField(((double*)_buf)[0]) : + field->setVirtualDoubleField((JavaObject*)obj, ((double*)_buf)[0]); + case ARRAY_ID : + case OBJECT_ID : + return isStatic(field->access) ? + field->setStaticObjectField(((JavaObject**)_buf)[0]) : + field->setVirtualObjectField((JavaObject*)obj, ((JavaObject**)_buf)[0]); + default : + JavaThread::get()->isolate->unknownError("should not be here"); } } @@ -372,15 +456,18 @@ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); const AssessorDesc* ass = field->signature->funcs; - if (ass != AssessorDesc::dBool) - JavaThread::get()->isolate->illegalArgumentException(""); - if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); + + switch (ass->numId) { + case BOOL_ID : + return isStatic(field->access) ? + field->setStaticInt8Field((uint8)val) : + field->setVirtualInt8Field((JavaObject*)obj, (uint8)val); + default : + JavaThread::get()->isolate->illegalArgumentException(""); + } - isStatic(field->access) ? - field->setStaticInt8Field((uint8)val) : - field->setVirtualInt8Field((JavaObject*)obj, (uint8)val); } JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setByte( @@ -395,32 +482,33 @@ if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - if (ass == AssessorDesc::dByte) { - isStatic(field->access) ? - field->setStaticInt8Field((sint8)val) : - field->setVirtualInt8Field((JavaObject*)obj, (sint8)val); - } else if (ass == AssessorDesc::dShort) { - isStatic(field->access) ? - field->setStaticInt16Field((sint16)val) : - field->setVirtualInt16Field((JavaObject*)obj, (sint16)val); - } else if (ass == AssessorDesc::dInt) { - isStatic(field->access) ? - field->setStaticInt32Field((sint32)val) : - field->setVirtualInt32Field((JavaObject*)obj, (sint32)val); - } else if (ass == AssessorDesc::dLong) { - isStatic(field->access) ? - field->setStaticLongField((sint64)val) : - field->setVirtualLongField((JavaObject*)obj, (sint64)val); - } else if (ass == AssessorDesc::dFloat) { - isStatic(field->access) ? - field->setStaticFloatField((float)val) : - field->setVirtualFloatField((JavaObject*)obj, (float)val); - } else if (ass == AssessorDesc::dDouble) { - isStatic(field->access) ? - field->setStaticDoubleField((double)val) : - field->setVirtualDoubleField((JavaObject*)obj, (double)val); - } else { - JavaThread::get()->isolate->illegalArgumentException(""); + switch (ass->numId) { + case BYTE_ID : + return isStatic(field->access) ? + field->setStaticInt8Field((sint8)val) : + field->setVirtualInt8Field((JavaObject*)obj, (sint8)val); + case SHORT_ID : + return isStatic(field->access) ? + field->setStaticInt16Field((sint16)val) : + field->setVirtualInt16Field((JavaObject*)obj, (sint16)val); + case INT_ID : + return isStatic(field->access) ? + field->setStaticInt32Field((sint32)val) : + field->setVirtualInt32Field((JavaObject*)obj, (sint32)val); + case LONG_ID : + return isStatic(field->access) ? + field->setStaticLongField((sint64)val) : + field->setVirtualLongField((JavaObject*)obj, (sint64)val); + case FLOAT_ID : + return isStatic(field->access) ? + field->setStaticFloatField((float)val) : + field->setVirtualFloatField((JavaObject*)obj, (float)val); + case DOUBLE_ID : + return isStatic(field->access) ? + field->setStaticDoubleField((double)val) : + field->setVirtualDoubleField((JavaObject*)obj, (double)val); + default : + JavaThread::get()->isolate->illegalArgumentException(""); } } @@ -435,28 +523,29 @@ if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - if (ass == AssessorDesc::dChar) { - isStatic(field->access) ? - field->setStaticInt16Field((double)val) : - field->setVirtualDoubleField((JavaObject*)obj, (uint16)val); - } else if (ass == AssessorDesc::dInt) { - isStatic(field->access) ? - field->setStaticInt32Field((uint32)val) : - field->setVirtualInt32Field((JavaObject*)obj, (uint32)val); - } else if (ass == AssessorDesc::dLong) { - isStatic(field->access) ? - field->setStaticLongField((uint64)val) : - field->setVirtualLongField((JavaObject*)obj, (uint64)val); - } else if (ass == AssessorDesc::dFloat) { - isStatic(field->access) ? - field->setStaticFloatField((float)(uint32)val) : - field->setVirtualFloatField((JavaObject*)obj, (float)(uint32)val); - } else if (ass == AssessorDesc::dDouble) { - isStatic(field->access) ? - field->setStaticDoubleField((double)(uint64)val) : - field->setVirtualDoubleField((JavaObject*)obj, (double)(uint64)val); - } else { - JavaThread::get()->isolate->illegalArgumentException(""); + switch (ass->numId) { + case CHAR_ID : + return isStatic(field->access) ? + field->setStaticInt16Field((double)val) : + field->setVirtualDoubleField((JavaObject*)obj, (uint16)val); + case INT_ID : + return isStatic(field->access) ? + field->setStaticInt32Field((uint32)val) : + field->setVirtualInt32Field((JavaObject*)obj, (uint32)val); + case LONG_ID : + return isStatic(field->access) ? + field->setStaticLongField((uint64)val) : + field->setVirtualLongField((JavaObject*)obj, (uint64)val); + case FLOAT_ID : + return isStatic(field->access) ? + field->setStaticFloatField((float)(uint32)val) : + field->setVirtualFloatField((JavaObject*)obj, (float)(uint32)val); + case DOUBLE_ID : + return isStatic(field->access) ? + field->setStaticDoubleField((double)(uint64)val) : + field->setVirtualDoubleField((JavaObject*)obj, (double)(uint64)val); + default : + JavaThread::get()->isolate->illegalArgumentException(""); } } @@ -471,28 +560,29 @@ if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - if (ass == AssessorDesc::dShort) { - isStatic(field->access) ? - field->setStaticInt16Field((sint16)val) : - field->setVirtualInt16Field((JavaObject*)obj, (sint16)val); - } else if (ass == AssessorDesc::dInt) { - isStatic(field->access) ? - field->setStaticInt32Field((sint32)val) : - field->setVirtualInt32Field((JavaObject*)obj, (sint32)val); - } else if (ass == AssessorDesc::dLong) { - isStatic(field->access) ? - field->setStaticLongField((sint64)val) : - field->setVirtualLongField((JavaObject*)obj, (sint64)val); - } else if (ass == AssessorDesc::dFloat) { - isStatic(field->access) ? - field->setStaticFloatField((float)val) : - field->setVirtualFloatField((JavaObject*)obj, (float)val); - } else if (ass == AssessorDesc::dDouble) { - isStatic(field->access) ? - field->setStaticDoubleField((double)val) : - field->setVirtualDoubleField((JavaObject*)obj, (double)val); - } else { - JavaThread::get()->isolate->illegalArgumentException(""); + switch (ass->numId) { + case SHORT_ID : + return isStatic(field->access) ? + field->setStaticInt16Field((sint16)val) : + field->setVirtualInt16Field((JavaObject*)obj, (sint16)val); + case INT_ID : + return isStatic(field->access) ? + field->setStaticInt32Field((sint32)val) : + field->setVirtualInt32Field((JavaObject*)obj, (sint32)val); + case LONG_ID : + return isStatic(field->access) ? + field->setStaticLongField((sint64)val) : + field->setVirtualLongField((JavaObject*)obj, (sint64)val); + case FLOAT_ID : + return isStatic(field->access) ? + field->setStaticFloatField((float)val) : + field->setVirtualFloatField((JavaObject*)obj, (float)val); + case DOUBLE_ID : + return isStatic(field->access) ? + field->setStaticDoubleField((double)val) : + field->setVirtualDoubleField((JavaObject*)obj, (double)val); + default : + JavaThread::get()->isolate->illegalArgumentException(""); } } @@ -507,23 +597,24 @@ if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - if (ass == AssessorDesc::dInt) { - isStatic(field->access) ? - field->setStaticInt32Field((sint32)val) : - field->setVirtualInt32Field((JavaObject*)obj, (sint32)val); - } else if (ass == AssessorDesc::dLong) { - isStatic(field->access) ? - field->setStaticLongField((sint64)val) : - field->setVirtualLongField((JavaObject*)obj, (sint64)val); - } else if (ass == AssessorDesc::dFloat) { - isStatic(field->access) ? - field->setStaticFloatField((float)val) : - field->setVirtualFloatField((JavaObject*)obj, (float)val); - } else if (ass == AssessorDesc::dDouble) { - isStatic(field->access) ? - field->setStaticDoubleField((double)val) : - field->setVirtualDoubleField((JavaObject*)obj, (double)val); - } else { + switch (ass->numId) { + case INT_ID : + return isStatic(field->access) ? + field->setStaticInt32Field((sint32)val) : + field->setVirtualInt32Field((JavaObject*)obj, (sint32)val); + case LONG_ID : + return isStatic(field->access) ? + field->setStaticLongField((sint64)val) : + field->setVirtualLongField((JavaObject*)obj, (sint64)val); + case FLOAT_ID : + return isStatic(field->access) ? + field->setStaticFloatField((float)val) : + field->setVirtualFloatField((JavaObject*)obj, (float)val); + case DOUBLE_ID : + return isStatic(field->access) ? + field->setStaticDoubleField((double)val) : + field->setVirtualDoubleField((JavaObject*)obj, (double)val); + default : JavaThread::get()->isolate->illegalArgumentException(""); } } @@ -539,20 +630,21 @@ if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - if (ass == AssessorDesc::dLong) { - isStatic(field->access) ? - field->setStaticLongField((sint64)val) : - field->setVirtualLongField((JavaObject*)obj, (sint64)val); - } else if (ass == AssessorDesc::dFloat) { - isStatic(field->access) ? - field->setStaticFloatField((float)val) : - field->setVirtualFloatField((JavaObject*)obj, (float)val); - } else if (ass == AssessorDesc::dDouble) { - isStatic(field->access) ? - field->setStaticDoubleField((double)val) : - field->setVirtualDoubleField((JavaObject*)obj, (double)val); - } else { - JavaThread::get()->isolate->illegalArgumentException(""); + switch (ass->numId) { + case LONG_ID : + return isStatic(field->access) ? + field->setStaticLongField((sint64)val) : + field->setVirtualLongField((JavaObject*)obj, (sint64)val); + case FLOAT_ID : + return isStatic(field->access) ? + field->setStaticFloatField((float)val) : + field->setVirtualFloatField((JavaObject*)obj, (float)val); + case DOUBLE_ID : + return isStatic(field->access) ? + field->setStaticDoubleField((double)val) : + field->setVirtualDoubleField((JavaObject*)obj, (double)val); + default : + JavaThread::get()->isolate->illegalArgumentException(""); } } @@ -567,16 +659,17 @@ if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - if (ass == AssessorDesc::dFloat) { - isStatic(field->access) ? - field->setStaticFloatField((float)val) : - field->setVirtualFloatField((JavaObject*)obj, (float)val); - } else if (ass == AssessorDesc::dDouble) { - isStatic(field->access) ? - field->setStaticDoubleField((double)val) : - field->setVirtualDoubleField((JavaObject*)obj, (double)val); - } else { - JavaThread::get()->isolate->illegalArgumentException(""); + switch (ass->numId) { + case FLOAT_ID : + return isStatic(field->access) ? + field->setStaticFloatField((float)val) : + field->setVirtualFloatField((JavaObject*)obj, (float)val); + case DOUBLE_ID : + return isStatic(field->access) ? + field->setStaticDoubleField((double)val) : + field->setVirtualDoubleField((JavaObject*)obj, (double)val); + default : + JavaThread::get()->isolate->illegalArgumentException(""); } } @@ -591,12 +684,13 @@ if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); - if (ass == AssessorDesc::dDouble) { - isStatic(field->access) ? - field->setStaticDoubleField((double)val) : - field->setVirtualDoubleField((JavaObject*)obj, (double)val); - } else { - JavaThread::get()->isolate->illegalArgumentException(""); + switch (ass->numId) { + case DOUBLE_ID : + return isStatic(field->access) ? + field->setStaticDoubleField((double)val) : + field->setVirtualDoubleField((JavaObject*)obj, (double)val); + default : + JavaThread::get()->isolate->illegalArgumentException(""); } } From nicolas.geoffray at lip6.fr Mon May 19 11:14:14 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Mon, 19 May 2008 16:14:14 -0000 Subject: [llvm-commits] [vmkit] r51256 - /vmkit/trunk/lib/JnJVM/VMCore/JavaCache.cpp Message-ID: <200805191614.m4JGEFAK012331@zion.cs.uiuc.edu> Author: geoffray Date: Mon May 19 11:14:14 2008 New Revision: 51256 URL: http://llvm.org/viewvc/llvm-project?rev=51256&view=rev Log: Remove iostream include. Thanks Bill! Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaCache.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaCache.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaCache.cpp?rev=51256&r1=51255&r2=51256&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaCache.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaCache.cpp Mon May 19 11:14:14 2008 @@ -7,7 +7,6 @@ // //===----------------------------------------------------------------------===// -#include #include #include "mvm/JIT.h" From baldrick at free.fr Mon May 19 11:42:57 2008 From: baldrick at free.fr (Duncan Sands) Date: Mon, 19 May 2008 16:42:57 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r51257 - in /llvm-gcc-4.2/trunk/gcc: cgraphunit.c ipa-inline.c passes.c Message-ID: <200805191642.m4JGgvVc013244@zion.cs.uiuc.edu> Author: baldrick Date: Mon May 19 11:42:56 2008 New Revision: 51257 URL: http://llvm.org/viewvc/llvm-project?rev=51257&view=rev Log: Inline functions marked always_inline, but otherwise don't do any inlining if building with LLVM support. This fixes always_inline when using -funit-at-a-time. Modified: llvm-gcc-4.2/trunk/gcc/cgraphunit.c llvm-gcc-4.2/trunk/gcc/ipa-inline.c llvm-gcc-4.2/trunk/gcc/passes.c Modified: llvm-gcc-4.2/trunk/gcc/cgraphunit.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cgraphunit.c?rev=51257&r1=51256&r2=51257&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/cgraphunit.c (original) +++ llvm-gcc-4.2/trunk/gcc/cgraphunit.c Mon May 19 11:42:56 2008 @@ -1614,13 +1614,9 @@ dump_cgraph (cgraph_dump_file); } - /* LLVM local begin */ -#ifndef ENABLE_LLVM /* Don't run the IPA passes if there was any error or sorry messages. */ if (errorcount == 0 && sorrycount == 0) ipa_passes (); -#endif - /* LLVM local end */ /* This pass remove bodies of extern inline functions we never inlined. Do this later so other IPA passes see what is really going on. */ Modified: llvm-gcc-4.2/trunk/gcc/ipa-inline.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/ipa-inline.c?rev=51257&r1=51256&r2=51257&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/ipa-inline.c (original) +++ llvm-gcc-4.2/trunk/gcc/ipa-inline.c Mon May 19 11:42:56 2008 @@ -941,7 +941,11 @@ /* At the moment, no IPA passes change function bodies before inlining. Save some time by not recomputing function body sizes if early inlining already did so. */ + /* LLVM local begin - Don't rely on pass_early_ipa_inline being run. */ +#ifndef ENABLE_LLVM if (!flag_early_inlining) +#endif + /* LLVM local end */ node->local.self_insns = node->global.insns = estimate_num_insns (node->decl); @@ -1028,6 +1032,8 @@ overall_insns - old_insns); } + /* LLVM local begin */ +#ifndef ENABLE_LLVM if (!flag_really_no_inline) cgraph_decide_inlining_of_small_functions (); @@ -1101,6 +1107,8 @@ } } } +#endif + /* LLVM local end */ if (dump_file) fprintf (dump_file, @@ -1147,6 +1155,8 @@ inlined = true; } + /* LLVM local begin */ +#ifndef ENABLE_LLVM /* Now do the automatic inlining. */ if (!flag_really_no_inline) for (e = node->callees; e; e = e->next_callee) @@ -1179,6 +1189,8 @@ else if (!early) e->inline_failed = failed_reason; } +#endif + /* LLVM local end */ if (early && inlined) { push_cfun (DECL_STRUCT_FUNCTION (node->decl)); Modified: llvm-gcc-4.2/trunk/gcc/passes.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/passes.c?rev=51257&r1=51256&r2=51257&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/passes.c (original) +++ llvm-gcc-4.2/trunk/gcc/passes.c Mon May 19 11:42:56 2008 @@ -481,14 +481,20 @@ #define NEXT_PASS(PASS) (p = next_pass_1 (p, &PASS)) /* Interprocedural optimization passes. */ p = &all_ipa_passes; + /* LLVM local begin */ +#ifndef ENABLE_LLVM NEXT_PASS (pass_early_ipa_inline); NEXT_PASS (pass_early_local_passes); NEXT_PASS (pass_ipa_cp); - NEXT_PASS (pass_ipa_inline); +#endif + NEXT_PASS (pass_ipa_inline); /* LLVM: inline functions marked always_inline */ +#ifndef ENABLE_LLVM NEXT_PASS (pass_ipa_reference); NEXT_PASS (pass_ipa_pure_const); NEXT_PASS (pass_ipa_type_escape); NEXT_PASS (pass_ipa_pta); +#endif + /* LLVM local end */ *p = NULL; /* All passes needed to lower the function into shape optimizers can From baldrick at free.fr Mon May 19 11:44:44 2008 From: baldrick at free.fr (Duncan Sands) Date: Mon, 19 May 2008 16:44:44 -0000 Subject: [llvm-commits] [llvm] r51258 - /llvm/trunk/test/CFrontend/2008-05-19-AlwaysInline.c Message-ID: <200805191644.m4JGiik3013311@zion.cs.uiuc.edu> Author: baldrick Date: Mon May 19 11:44:44 2008 New Revision: 51258 URL: http://llvm.org/viewvc/llvm-project?rev=51258&view=rev Log: Check that always_inline functions are inlined whether or not -funit-at-a-time is used (C++ uses it, C doesn't) - it was working before only when not doing unit-at-a-time. Added: llvm/trunk/test/CFrontend/2008-05-19-AlwaysInline.c Added: llvm/trunk/test/CFrontend/2008-05-19-AlwaysInline.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2008-05-19-AlwaysInline.c?rev=51258&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2008-05-19-AlwaysInline.c (added) +++ llvm/trunk/test/CFrontend/2008-05-19-AlwaysInline.c Mon May 19 11:44:44 2008 @@ -0,0 +1,12 @@ +// RUN: %llvmgcc %s -S -fno-unit-at-a-time -emit-llvm -O0 -o - | not grep sabrina +// RUN: %llvmgcc %s -S -funit-at-a-time -emit-llvm -O0 -o - | not grep sabrina + +static inline int sabrina (void) __attribute__((always_inline)); +static inline int sabrina (void) +{ + return 13; +} +int bar (void) +{ + return sabrina () + 68; +} From dpatel at apple.com Mon May 19 12:41:16 2008 From: dpatel at apple.com (Devang Patel) Date: Mon, 19 May 2008 10:41:16 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r51257 - in /llvm-gcc-4.2/trunk/gcc: cgraphunit.c ipa-inline.c passes.c In-Reply-To: <200805191642.m4JGgvVc013244@zion.cs.uiuc.edu> References: <200805191642.m4JGgvVc013244@zion.cs.uiuc.edu> Message-ID: <19ACFAEF-F86D-41F0-BACC-7ECD1F794501@apple.com> I'm seeing following bootstrap failure. Any idea? Thanks, - Devang Undefined symbols: "_pass_gcse", referenced from: _pass_gcse$non_lazy_ptr in libbackend.a(passes.o) "_pass_branch_target_load_optimize", referenced from: _pass_branch_target_load_optimize$non_lazy_ptr in libbackend.a(passes.o) "_pass_if_after_reload", referenced from: _pass_if_after_reload$non_lazy_ptr in libbackend.a(passes.o) "_can_copy_p", referenced from: _may_assign_reg_p in libbackend.a(loop-invariant.o) _hash_scan_set in libbackend.a(postreload-gcse.o) _hash_scan_set in libbackend.a(postreload-gcse.o) "_pass_jump_bypass", referenced from: _pass_jump_bypass$non_lazy_ptr in libbackend.a(passes.o) "_fis_get_condition", referenced from: _reload_cse_move2add in libbackend.a(postreload.o) "_peephole2_insns", referenced from: _peephole2_optimize in libbackend.a(recog.o) "_pass_if_after_combine", referenced from: _pass_if_after_combine$non_lazy_ptr in libbackend.a(passes.o) "_pass_combine", referenced from: _pass_combine$non_lazy_ptr in libbackend.a(passes.o) "_pass_rtl_ifcvt", referenced from: _pass_rtl_ifcvt$non_lazy_ptr in libbackend.a(passes.o) "_remove_death", referenced from: _update_equiv_regs in libbackend.a(local-alloc.o) _fixup_match_2 in libbackend.a(regmove.o) "_pass_sms", referenced from: _pass_sms$non_lazy_ptr in libbackend.a(passes.o) "_pass_sched", referenced from: _pass_sched$non_lazy_ptr in libbackend.a(passes.o) "_pass_sched2", referenced from: _pass_sched2$non_lazy_ptr in libbackend.a(passes.o) "_branch_target_load_optimize", referenced from: _rest_of_handle_flow2 in libbackend.a(flow.o) From dalej at apple.com Mon May 19 12:46:47 2008 From: dalej at apple.com (Dale Johannesen) Date: Mon, 19 May 2008 10:46:47 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r51257 - in /llvm-gcc-4.2/trunk/gcc: cgraphunit.c ipa-inline.c passes.c In-Reply-To: <19ACFAEF-F86D-41F0-BACC-7ECD1F794501@apple.com> References: <200805191642.m4JGgvVc013244@zion.cs.uiuc.edu> <19ACFAEF-F86D-41F0-BACC-7ECD1F794501@apple.com> Message-ID: On May 19, 2008, at 10:41 AM, Devang Patel wrote: > I'm seeing following bootstrap failure. > Any idea? > Thanks, > - > Devang I believe these should all be defined elsewhere in libbackend.a. The first one, pass_gcse, is in gcse.o. Do you see it? > Undefined symbols: > "_pass_gcse", referenced from: > _pass_gcse$non_lazy_ptr in libbackend.a(passes.o) > "_pass_branch_target_load_optimize", referenced from: > _pass_branch_target_load_optimize$non_lazy_ptr in > libbackend.a(passes.o) > "_pass_if_after_reload", referenced from: > _pass_if_after_reload$non_lazy_ptr in libbackend.a(passes.o) > "_can_copy_p", referenced from: > _may_assign_reg_p in libbackend.a(loop-invariant.o) > _hash_scan_set in libbackend.a(postreload-gcse.o) > _hash_scan_set in libbackend.a(postreload-gcse.o) > "_pass_jump_bypass", referenced from: > _pass_jump_bypass$non_lazy_ptr in libbackend.a(passes.o) > "_fis_get_condition", referenced from: > _reload_cse_move2add in libbackend.a(postreload.o) > "_peephole2_insns", referenced from: > _peephole2_optimize in libbackend.a(recog.o) > "_pass_if_after_combine", referenced from: > _pass_if_after_combine$non_lazy_ptr in libbackend.a(passes.o) > "_pass_combine", referenced from: > _pass_combine$non_lazy_ptr in libbackend.a(passes.o) > "_pass_rtl_ifcvt", referenced from: > _pass_rtl_ifcvt$non_lazy_ptr in libbackend.a(passes.o) > "_remove_death", referenced from: > _update_equiv_regs in libbackend.a(local-alloc.o) > _fixup_match_2 in libbackend.a(regmove.o) > "_pass_sms", referenced from: > _pass_sms$non_lazy_ptr in libbackend.a(passes.o) > "_pass_sched", referenced from: > _pass_sched$non_lazy_ptr in libbackend.a(passes.o) > "_pass_sched2", referenced from: > _pass_sched2$non_lazy_ptr in libbackend.a(passes.o) > "_branch_target_load_optimize", referenced from: > _rest_of_handle_flow2 in libbackend.a(flow.o) > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From clattner at apple.com Mon May 19 13:16:53 2008 From: clattner at apple.com (Chris Lattner) Date: Mon, 19 May 2008 11:16:53 -0700 Subject: [llvm-commits] [llvm] r51240 - in /llvm/trunk: lib/Transforms/Scalar/SimplifyLibCalls.cpp test/Transforms/SimplifyLibCalls/2008-05-19-memcmp.ll In-Reply-To: <200805190927.m4J9RWh5000456@zion.cs.uiuc.edu> References: <200805190927.m4J9RWh5000456@zion.cs.uiuc.edu> Message-ID: <5EEAF7F8-1AE9-47D8-A15C-B265A30A01A9@apple.com> Whoa, thanks Duncan! (and Scott for tracking it down!) -Chris On May 19, 2008, at 2:27 AM, Duncan Sands wrote: > Author: baldrick > Date: Mon May 19 04:27:24 2008 > New Revision: 51240 > > URL: http://llvm.org/viewvc/llvm-project?rev=51240&view=rev > Log: > Fix PR2341 - when the length is 4 use an i32 not > an i16! Cleaned up trailing whitespace while there. > > Added: > llvm/trunk/test/Transforms/SimplifyLibCalls/2008-05-19-memcmp.ll > Modified: > llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp > > Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=51240&r1=51239&r2=51240&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original) > +++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Mon May 19 > 04:27:24 2008 > @@ -731,17 +731,17 @@ > !isa(FT->getParamType(1)) || > FT->getReturnType() != Type::Int32Ty) > return 0; > - > + > Value *LHS = CI->getOperand(1), *RHS = CI->getOperand(2); > - > + > if (LHS == RHS) // memcmp(s,s,x) -> 0 > return Constant::getNullValue(CI->getType()); > - > + > // Make sure we have a constant length. > ConstantInt *LenC = dyn_cast(CI->getOperand(3)); > if (!LenC) return 0; > uint64_t Len = LenC->getZExtValue(); > - > + > if (Len == 0) // memcmp(s1,s2,0) -> 0 > return Constant::getNullValue(CI->getType()); > > @@ -750,18 +750,20 @@ > Value *RHSV = B.CreateLoad(CastToCStr(RHS, B), "rhsv"); > return B.CreateZExt(B.CreateSub(LHSV, RHSV, "chardiff"), CI- > >getType()); > } > - > + > // memcmp(S1,S2,2) != 0 -> (*(short*)LHS ^ *(short*)RHS) != 0 > // memcmp(S1,S2,4) != 0 -> (*(int*)LHS ^ *(int*)RHS) != 0 > if ((Len == 2 || Len == 4) && > IsOnlyUsedInZeroEqualityComparison(CI)) { > - LHS = B.CreateBitCast(LHS, > PointerType::getUnqual(Type::Int16Ty), "tmp"); > - RHS = B.CreateBitCast(RHS, LHS->getType(), "tmp"); > + const Type *PTy = PointerType::getUnqual(Len == 2 ? > + Type::Int16Ty : > Type::Int32Ty); > + LHS = B.CreateBitCast(LHS, PTy, "tmp"); > + RHS = B.CreateBitCast(RHS, PTy, "tmp"); > LoadInst *LHSV = B.CreateLoad(LHS, "lhsv"); > LoadInst *RHSV = B.CreateLoad(RHS, "rhsv"); > LHSV->setAlignment(1); RHSV->setAlignment(1); // Unaligned > loads. > return B.CreateZExt(B.CreateXor(LHSV, RHSV, "shortdiff"), CI- > >getType()); > } > - > + > return 0; > } > }; > > Added: llvm/trunk/test/Transforms/SimplifyLibCalls/2008-05-19- > memcmp.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyLibCalls/2008-05-19-memcmp.ll?rev=51240&view=auto > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/test/Transforms/SimplifyLibCalls/2008-05-19-memcmp.ll > (added) > +++ llvm/trunk/test/Transforms/SimplifyLibCalls/2008-05-19-memcmp.ll > Mon May 19 04:27:24 2008 > @@ -0,0 +1,14 @@ > +; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | grep i32 > +; PR2341 > + > + at _2E_str = external constant [5 x i8] ; <[5 x i8]*> [#uses=1] > + > +declare i32 @memcmp(i8*, i8*, i32) nounwind readonly > + > +define i1 @f(i8** %start_addr) { > +entry: > + %tmp4 = load i8** %start_addr, align 4 ; [#uses=1] > + %tmp5 = call i32 @memcmp( i8* %tmp4, i8* getelementptr ([5 x i8]* > @_2E_str, i32 0, i32 0), i32 4 ) nounwind readonly ; [#uses=1] > + %tmp6 = icmp eq i32 %tmp5, 0 ; [#uses=1] > + ret i1 %tmp6 > +} > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From dpatel at apple.com Mon May 19 13:33:35 2008 From: dpatel at apple.com (Devang Patel) Date: Mon, 19 May 2008 18:33:35 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r51260 - /llvm-gcc-4.2/trunk/gcc/passes.c Message-ID: <200805191833.m4JIXZmC016850@zion.cs.uiuc.edu> Author: dpatel Date: Mon May 19 13:33:34 2008 New Revision: 51260 URL: http://llvm.org/viewvc/llvm-project?rev=51260&view=rev Log: Revert previous two patches. This fixes undefined symbols error reported during bootstrap. Now I'm able to make further progress on bootstrap. Modified: llvm-gcc-4.2/trunk/gcc/passes.c Modified: llvm-gcc-4.2/trunk/gcc/passes.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/passes.c?rev=51260&r1=51259&r2=51260&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/passes.c (original) +++ llvm-gcc-4.2/trunk/gcc/passes.c Mon May 19 13:33:34 2008 @@ -481,20 +481,18 @@ #define NEXT_PASS(PASS) (p = next_pass_1 (p, &PASS)) /* Interprocedural optimization passes. */ p = &all_ipa_passes; - /* LLVM local begin */ -#ifndef ENABLE_LLVM NEXT_PASS (pass_early_ipa_inline); NEXT_PASS (pass_early_local_passes); NEXT_PASS (pass_ipa_cp); -#endif - NEXT_PASS (pass_ipa_inline); /* LLVM: inline functions marked always_inline */ + NEXT_PASS (pass_ipa_inline); +/* LLVM LOCAL begin */ #ifndef ENABLE_LLVM NEXT_PASS (pass_ipa_reference); NEXT_PASS (pass_ipa_pure_const); NEXT_PASS (pass_ipa_type_escape); NEXT_PASS (pass_ipa_pta); #endif - /* LLVM local end */ +/* LLVM LOCAL end */ *p = NULL; /* All passes needed to lower the function into shape optimizers can @@ -506,9 +504,9 @@ NEXT_PASS (pass_lower_cf); NEXT_PASS (pass_lower_eh); NEXT_PASS (pass_build_cfg); + NEXT_PASS (pass_lower_complex_O0); /* LLVM LOCAL begin */ #ifndef ENABLE_LLVM - NEXT_PASS (pass_lower_complex_O0); NEXT_PASS (pass_lower_vector); #endif /* LLVM LOCAL end */ @@ -520,6 +518,16 @@ /* LLVM LOCAL end */ *p = NULL; + p = &pass_early_local_passes.sub; + /* LLVM LOCAL begin */ +#ifndef ENABLE_LLVM + NEXT_PASS (pass_tree_profile); +#endif + /* LLVM LOCAL end */ + NEXT_PASS (pass_cleanup_cfg); + NEXT_PASS (pass_rebuild_cgraph_edges); + *p = NULL; + /* LLVM LOCAL begin */ #ifdef ENABLE_LLVM p = &all_extra_lowering_passes; @@ -531,12 +539,6 @@ #endif /* LLVM LOCAL end */ - p = &pass_early_local_passes.sub; - NEXT_PASS (pass_tree_profile); - NEXT_PASS (pass_cleanup_cfg); - NEXT_PASS (pass_rebuild_cgraph_edges); - *p = NULL; - p = &all_passes; NEXT_PASS (pass_fixup_cfg); NEXT_PASS (pass_init_datastructures); @@ -682,6 +684,8 @@ NEXT_PASS (pass_dce_loop); *p = NULL; + /* LLVM LOCAL begin */ +#ifndef ENABLE_LLVM p = &pass_loop2.sub; NEXT_PASS (pass_rtl_loop_init); NEXT_PASS (pass_rtl_move_loop_invariants); @@ -756,6 +760,8 @@ NEXT_PASS (pass_set_nothrow_function_flags); NEXT_PASS (pass_final); *p = NULL; +#endif + /* LLVM LOCAL end */ #undef NEXT_PASS From evan.cheng at apple.com Mon May 19 13:37:14 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 19 May 2008 11:37:14 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r51221 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp In-Reply-To: <200805171249.m4HCnUCT005611@zion.cs.uiuc.edu> References: <200805171249.m4HCnUCT005611@zion.cs.uiuc.edu> Message-ID: <9DBE51D2-DE7C-449C-A470-A19FE1F0D10A@apple.com> Actually the inline threshold should be much lower for -O2 and -Os and the various heuristics in InlineCost.cpp that increases threshold for certain functions should be disabled / turned down. Otherwise, it will definitely increase size. Evan On May 17, 2008, at 5:49 AM, Duncan Sands wrote: > Author: baldrick > Date: Sat May 17 07:49:30 2008 > New Revision: 51221 > > URL: http://llvm.org/viewvc/llvm-project?rev=51221&view=rev > Log: > Turn inlining on at -O2, but with the same > threshold as for -Os. This should mean that > only inlining that doesn't increase the size > is done. > > Modified: > llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp > > Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=51221&r1=51220&r2=51221&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original) > +++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Sat May 17 07:49:30 2008 > @@ -128,7 +128,7 @@ > Args.push_back("--debug-pass=Structure"); > if (flag_debug_pass_arguments) > Args.push_back("--debug-pass=Arguments"); > - if (optimize_size) > + if (optimize_size || flag_inline_trees == 1) > // Reduce inline limit. Default limit is 200. > Args.push_back("--inline-threshold=100"); > if (flag_unwind_tables) > @@ -353,14 +353,10 @@ > PM->add(createCFGSimplificationPass()); // Clean up after > IPCP & DAE > if (flag_unit_at_a_time && flag_exceptions) > PM->add(createPruneEHPass()); // Remove dead EH > info > - > - if (optimize > 1) { > - if (flag_inline_trees > 1) // respect -fno- > inline-functions > - PM->add(createFunctionInliningPass()); // Inline small > functions > - if (optimize > 2) > - PM->add(createArgumentPromotionPass()); // Scalarize > uninlined fn args > - } > - > + if (flag_inline_trees) // respect -fno- > inline-functions > + PM->add(createFunctionInliningPass()); // Inline small > functions > + if (optimize > 2) > + PM->add(createArgumentPromotionPass()); // Scalarize > uninlined fn args > PM->add(createTailDuplicationPass()); // Simplify cfg by > copying code > if (!lang_hooks.flag_no_builtin()) > PM->add(createSimplifyLibCallsPass()); // Library Call > Optimizations > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From dpatel at apple.com Mon May 19 13:41:37 2008 From: dpatel at apple.com (Devang Patel) Date: Mon, 19 May 2008 11:41:37 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r51220 - in /llvm-gcc-4.2/trunk/gcc: cgraphunit.c passes.c In-Reply-To: <200805171235.m4HCZ8jJ005150@zion.cs.uiuc.edu> References: <200805171235.m4HCZ8jJ005150@zion.cs.uiuc.edu> Message-ID: Duncan, I'm getting bootstrap failures due to ipa related changes. Are you able to bootstrap llvmgcc42 ? Thanks, - Devang From asl at math.spbu.ru Mon May 19 13:44:29 2008 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Mon, 19 May 2008 22:44:29 +0400 Subject: [llvm-commits] [llvm-gcc-4.2] r51220 - in /llvm-gcc-4.2/trunk/gcc: cgraphunit.c passes.c In-Reply-To: References: <200805171235.m4HCZ8jJ005150@zion.cs.uiuc.edu> Message-ID: <1211222669.30441.184.camel@localhost> Hello, Devang > I'm getting bootstrap failures due to ipa related changes. Are you > able to bootstrap llvmgcc42 ? Currently bootstrap is broken (on x86-32/linux at least) due to PR2343 -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University. From dpatel at apple.com Mon May 19 13:48:27 2008 From: dpatel at apple.com (Devang Patel) Date: Mon, 19 May 2008 11:48:27 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r51220 - in /llvm-gcc-4.2/trunk/gcc: cgraphunit.c passes.c In-Reply-To: <1211222669.30441.184.camel@localhost> References: <200805171235.m4HCZ8jJ005150@zion.cs.uiuc.edu> <1211222669.30441.184.camel@localhost> Message-ID: On May 19, 2008, at 11:44 AM, Anton Korobeynikov wrote: > Hello, Devang > >> I'm getting bootstrap failures due to ipa related changes. Are you >> able to bootstrap llvmgcc42 ? > Currently bootstrap is broken (on x86-32/linux at least) due to PR2343 I'm running into bootstrap failure before I reach PR2343. For example, - undefined symbols build building cc1. - warnings are treated as error : ipa-inline.c:1132: warning: unused variable ?failed_reason? > > > -- > 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 - Devang From sabre at nondot.org Mon May 19 15:01:56 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 19 May 2008 20:01:56 -0000 Subject: [llvm-commits] [llvm] r51263 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/add2.ll Message-ID: <200805192001.m4JK1uel019542@zion.cs.uiuc.edu> Author: lattner Date: Mon May 19 15:01:56 2008 New Revision: 51263 URL: http://llvm.org/viewvc/llvm-project?rev=51263&view=rev Log: be more aggressive about transforming add -> or when the operands have no intersecting bits. This triggers all over the place, for example in lencode, with adds of stuff like: %tmp580 = mul i32 %tmp579, 2 %tmp582 = and i32 %b8, 1 and %tmp28 = shl i32 %abs.i, 1 %sign.0 = select i1 %tmp23, i32 1, i32 0 and %tmp344 = shl i32 %tmp343, 2 %tmp346 = and i32 %tmp96, 3 etc. Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp llvm/trunk/test/Transforms/InstCombine/add2.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51263&r1=51262&r2=51263&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon May 19 15:01:56 2008 @@ -2503,6 +2503,25 @@ if (match(RHS, m_And(m_Value(), m_ConstantInt(C2)))) if (Instruction *R = AssociativeOpt(I, AddMaskingAnd(C2))) return R; + + // A+B --> A|B iff A and B have no bits set in common. + if (const IntegerType *IT = dyn_cast(I.getType())) { + APInt Mask = APInt::getAllOnesValue(IT->getBitWidth()); + APInt LHSKnownOne(IT->getBitWidth(), 0); + APInt LHSKnownZero(IT->getBitWidth(), 0); + ComputeMaskedBits(LHS, Mask, LHSKnownZero, LHSKnownOne); + if (LHSKnownZero != 0) { + APInt RHSKnownOne(IT->getBitWidth(), 0); + APInt RHSKnownZero(IT->getBitWidth(), 0); + ComputeMaskedBits(RHS, Mask, RHSKnownZero, RHSKnownOne); + + // No bits in common -> bitwise or. + if ((LHSKnownZero|RHSKnownZero).isAllOnesValue()) { + cerr << "HACK\n" << *LHS << *RHS << "\n"; + return BinaryOperator::CreateOr(LHS, RHS); + } + } + } // W*X + Y*Z --> W * (X+Z) iff W == Y if (I.getType()->isIntOrIntVector()) { Modified: llvm/trunk/test/Transforms/InstCombine/add2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/add2.ll?rev=51263&r1=51262&r2=51263&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/add2.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/add2.ll Mon May 19 15:01:56 2008 @@ -29,3 +29,18 @@ declare i32 @callee(i32) + +define i32 @test3(i32 %A) { + %B = and i32 %A, 7 + %C = and i32 %A, 32 + %F = add i32 %B, %C + ret i32 %F +} + +define i32 @test4(i32 %A) { + %B = and i32 %A, 128 + %C = lshr i32 %A, 30 + %F = add i32 %B, %C + ret i32 %F +} + From sabre at nondot.org Mon May 19 15:03:53 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 19 May 2008 20:03:53 -0000 Subject: [llvm-commits] [llvm] r51264 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200805192003.m4JK3skY019631@zion.cs.uiuc.edu> Author: lattner Date: Mon May 19 15:03:53 2008 New Revision: 51264 URL: http://llvm.org/viewvc/llvm-project?rev=51264&view=rev Log: remove debug output Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51264&r1=51263&r2=51264&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon May 19 15:03:53 2008 @@ -2516,10 +2516,8 @@ ComputeMaskedBits(RHS, Mask, RHSKnownZero, RHSKnownOne); // No bits in common -> bitwise or. - if ((LHSKnownZero|RHSKnownZero).isAllOnesValue()) { - cerr << "HACK\n" << *LHS << *RHS << "\n"; + if ((LHSKnownZero|RHSKnownZero).isAllOnesValue()) return BinaryOperator::CreateOr(LHS, RHS); - } } } From isanbard at gmail.com Mon May 19 15:15:13 2008 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 19 May 2008 20:15:13 -0000 Subject: [llvm-commits] [llvm] r51266 - in /llvm/trunk/include/llvm: ADT/SmallVector.h CodeGen/ScheduleDAG.h CodeGen/SelectionDAG.h CodeGen/SelectionDAGNodes.h Constant.h Constants.h DerivedTypes.h ExecutionEngine/ExecutionEngine.h GlobalValue.h GlobalVariable.h ModuleProvider.h Pass.h PassSupport.h Support/CommandLine.h Target/TargetMachine.h Type.h User.h Value.h Message-ID: <200805192015.m4JKFDSr020053@zion.cs.uiuc.edu> Author: void Date: Mon May 19 15:15:12 2008 New Revision: 51266 URL: http://llvm.org/viewvc/llvm-project?rev=51266&view=rev Log: Remove warnings about unused parameters and shadowed variables. Modified: llvm/trunk/include/llvm/ADT/SmallVector.h llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h llvm/trunk/include/llvm/CodeGen/SelectionDAG.h llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h llvm/trunk/include/llvm/Constant.h llvm/trunk/include/llvm/Constants.h llvm/trunk/include/llvm/DerivedTypes.h llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h llvm/trunk/include/llvm/GlobalValue.h llvm/trunk/include/llvm/GlobalVariable.h llvm/trunk/include/llvm/ModuleProvider.h llvm/trunk/include/llvm/Pass.h llvm/trunk/include/llvm/PassSupport.h llvm/trunk/include/llvm/Support/CommandLine.h llvm/trunk/include/llvm/Target/TargetMachine.h llvm/trunk/include/llvm/Type.h llvm/trunk/include/llvm/User.h llvm/trunk/include/llvm/Value.h Modified: llvm/trunk/include/llvm/ADT/SmallVector.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallVector.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/SmallVector.h (original) +++ llvm/trunk/include/llvm/ADT/SmallVector.h Mon May 19 15:15:12 2008 @@ -300,8 +300,8 @@ bool operator==(const SmallVectorImpl &RHS) const { if (size() != RHS.size()) return false; - for (T *This = Begin, *That = RHS.Begin, *End = Begin+size(); - This != End; ++This, ++That) + for (T *This = Begin, *That = RHS.Begin, *E = Begin+size(); + This != E; ++This, ++That) if (*This != *That) return false; return true; Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original) +++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Mon May 19 15:15:12 2008 @@ -59,26 +59,23 @@ /// other instruction is available, issue it first. /// * NoopHazard: issuing this instruction would break the program. If /// some other instruction can be issued, do so, otherwise issue a noop. - virtual HazardType getHazardType(SDNode *Node) { + virtual HazardType getHazardType(SDNode *) { return NoHazard; } /// EmitInstruction - This callback is invoked when an instruction is /// emitted, to advance the hazard state. - virtual void EmitInstruction(SDNode *Node) { - } + virtual void EmitInstruction(SDNode *) {} /// AdvanceCycle - This callback is invoked when no instructions can be /// issued on this cycle without a hazard. This should increment the /// internal state of the hazard recognizer so that previously "Hazard" /// instructions will now not be hazards. - virtual void AdvanceCycle() { - } + virtual void AdvanceCycle() {} /// EmitNoop - This callback is invoked when a noop was added to the /// instruction stream. - virtual void EmitNoop() { - } + virtual void EmitNoop() {} }; /// SDep - Scheduling dependency. It keeps track of dependent nodes, @@ -236,9 +233,9 @@ /// ScheduledNode - As each node is scheduled, this method is invoked. This /// allows the priority function to adjust the priority of node that have /// already been emitted. - virtual void ScheduledNode(SUnit *Node) {} + virtual void ScheduledNode(SUnit *) {} - virtual void UnscheduledNode(SUnit *Node) {} + virtual void UnscheduledNode(SUnit *) {} }; class ScheduleDAG { Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Mon May 19 15:15:12 2008 @@ -162,8 +162,8 @@ MVT::ValueType VT3) { return getVTList(VT1, VT2, VT3).VTs; } - const MVT::ValueType *getNodeValueTypes(std::vector &VTList) { - return getVTList(&VTList[0], (unsigned)VTList.size()).VTs; + const MVT::ValueType *getNodeValueTypes(std::vector &vtList) { + return getVTList(&vtList[0], (unsigned)vtList.size()).VTs; } Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Mon May 19 15:15:12 2008 @@ -1964,15 +1964,15 @@ */ SDUse Ops[4]; public: - LSBaseSDNode(ISD::NodeType NodeTy, SDOperand *Operands, unsigned NumOperands, + LSBaseSDNode(ISD::NodeType NodeTy, SDOperand *Operands, unsigned numOperands, SDVTList VTs, ISD::MemIndexedMode AM, MVT::ValueType VT, const Value *SV, int SVO, unsigned Align, bool Vol) : SDNode(NodeTy, VTs), AddrMode(AM), MemoryVT(VT), SrcValue(SV), SVOffset(SVO), Alignment(Align), IsVolatile(Vol) { - for (unsigned i = 0; i != NumOperands; ++i) + for (unsigned i = 0; i != numOperands; ++i) Ops[i] = Operands[i]; - InitOperands(Ops, NumOperands); + InitOperands(Ops, numOperands); assert(Align != 0 && "Loads and stores should have non-zero aligment"); assert((getOffset().getOpcode() == ISD::UNDEF || isIndexed()) && "Only indexed loads and stores have a non-undef offset operand"); @@ -2004,7 +2004,7 @@ /// reference performed by this load or store. MachineMemOperand getMemOperand() const; - static bool classof(const LSBaseSDNode *N) { return true; } + static bool classof(const LSBaseSDNode *) { return true; } static bool classof(const SDNode *N) { return N->getOpcode() == ISD::LOAD || N->getOpcode() == ISD::STORE; @@ -2134,11 +2134,11 @@ //static SDNode *createNode(const SDNode &V) { return new SDNode(V); } - void addNodeToList(SDNode *NTy) {} - void removeNodeFromList(SDNode *NTy) {} - void transferNodesFromList(iplist &L2, - const ilist_iterator &X, - const ilist_iterator &Y) {} + void addNodeToList(SDNode *) {} + void removeNodeFromList(SDNode *) {} + void transferNodesFromList(iplist &, + const ilist_iterator &, + const ilist_iterator &) {} }; namespace ISD { Modified: llvm/trunk/include/llvm/Constant.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constant.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/Constant.h (original) +++ llvm/trunk/include/llvm/Constant.h Mon May 19 15:15:12 2008 @@ -39,8 +39,8 @@ void operator=(const Constant &); // Do not implement Constant(const Constant &); // Do not implement protected: - Constant(const Type *Ty, ValueTy vty, Use *Ops, unsigned NumOps) - : User(Ty, vty, Ops, NumOps) {} + Constant(const Type *ty, ValueTy vty, Use *Ops, unsigned NumOps) + : User(ty, vty, Ops, NumOps) {} void destroyConstantImpl(); public: Modified: llvm/trunk/include/llvm/Constants.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/Constants.h (original) +++ llvm/trunk/include/llvm/Constants.h Mon May 19 15:15:12 2008 @@ -283,8 +283,8 @@ void *operator new(size_t, unsigned); // DO NOT IMPLEMENT ConstantAggregateZero(const ConstantAggregateZero &); // DO NOT IMPLEMENT protected: - explicit ConstantAggregateZero(const Type *Ty) - : Constant(Ty, ConstantAggregateZeroVal, 0, 0) {} + explicit ConstantAggregateZero(const Type *ty) + : Constant(ty, ConstantAggregateZeroVal, 0, 0) {} protected: // allocate space for exactly zero operands void *operator new(size_t s) { @@ -553,8 +553,8 @@ friend struct ConvertConstantType; protected: - ConstantExpr(const Type *Ty, unsigned Opcode, Use *Ops, unsigned NumOps) - : Constant(Ty, ConstantExprVal, Ops, NumOps) { + ConstantExpr(const Type *ty, unsigned Opcode, Use *Ops, unsigned NumOps) + : Constant(ty, ConstantExprVal, Ops, NumOps) { // Operation type (an Instruction opcode) is stored as the SubclassData. SubclassData = Opcode; } Modified: llvm/trunk/include/llvm/DerivedTypes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DerivedTypes.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/DerivedTypes.h (original) +++ llvm/trunk/include/llvm/DerivedTypes.h Mon May 19 15:15:12 2008 @@ -67,7 +67,7 @@ void dump() const { Type::dump(); } // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const DerivedType *T) { return true; } + static inline bool classof(const DerivedType *) { return true; } static inline bool classof(const Type *T) { return T->isDerivedType(); } @@ -127,7 +127,7 @@ bool isPowerOf2ByteWidth() const; // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const IntegerType *T) { return true; } + static inline bool classof(const IntegerType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == IntegerTyID; } @@ -179,7 +179,7 @@ virtual void typeBecameConcrete(const DerivedType *AbsTy); // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const FunctionType *T) { return true; } + static inline bool classof(const FunctionType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == FunctionTyID; } @@ -200,7 +200,7 @@ virtual bool indexValid(const Value *V) const = 0; // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const CompositeType *T) { return true; } + static inline bool classof(const CompositeType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == ArrayTyID || T->getTypeID() == StructTyID || @@ -253,7 +253,7 @@ virtual void typeBecameConcrete(const DerivedType *AbsTy); // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const StructType *T) { return true; } + static inline bool classof(const StructType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == StructTyID; } @@ -292,12 +292,12 @@ /// getTypeAtIndex - Given an index value into the type, return the type of /// the element. For sequential types, there is only one subtype... /// - virtual const Type *getTypeAtIndex(const Value *V) const { + virtual const Type *getTypeAtIndex(const Value *) const { return ContainedTys[0]; } // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SequentialType *T) { return true; } + static inline bool classof(const SequentialType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == ArrayTyID || T->getTypeID() == PointerTyID || @@ -328,7 +328,7 @@ virtual void typeBecameConcrete(const DerivedType *AbsTy); // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const ArrayType *T) { return true; } + static inline bool classof(const ArrayType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == ArrayTyID; } @@ -372,7 +372,7 @@ virtual void typeBecameConcrete(const DerivedType *AbsTy); // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const VectorType *T) { return true; } + static inline bool classof(const VectorType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == VectorTyID; } @@ -407,7 +407,7 @@ virtual void typeBecameConcrete(const DerivedType *AbsTy); // Implement support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const PointerType *T) { return true; } + static inline bool classof(const PointerType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == PointerTyID; } @@ -428,7 +428,7 @@ } // Implement support for type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const OpaqueType *T) { return true; } + static inline bool classof(const OpaqueType *) { return true; } static inline bool classof(const Type *T) { return T->getTypeID() == OpaqueTyID; } Modified: llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h (original) +++ llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h Mon May 19 15:15:12 2008 @@ -50,12 +50,12 @@ public: std::map & - getGlobalAddressMap(const MutexGuard &locked) { + getGlobalAddressMap(const MutexGuard &) { return GlobalAddressMap; } std::map & - getGlobalAddressReverseMap(const MutexGuard& locked) { + getGlobalAddressReverseMap(const MutexGuard &) { return GlobalAddressReverseMap; } }; Modified: llvm/trunk/include/llvm/GlobalValue.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/GlobalValue.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/GlobalValue.h (original) +++ llvm/trunk/include/llvm/GlobalValue.h Mon May 19 15:15:12 2008 @@ -50,9 +50,9 @@ }; protected: - GlobalValue(const Type *Ty, ValueTy vty, Use *Ops, unsigned NumOps, + GlobalValue(const Type *ty, ValueTy vty, Use *Ops, unsigned NumOps, LinkageTypes linkage, const std::string &name = "") - : Constant(Ty, vty, Ops, NumOps), Parent(0), + : Constant(ty, vty, Ops, NumOps), Parent(0), Linkage(linkage), Visibility(DefaultVisibility), Alignment(0) { if (!name.empty()) setName(name); } Modified: llvm/trunk/include/llvm/GlobalVariable.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/GlobalVariable.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/GlobalVariable.h (original) +++ llvm/trunk/include/llvm/GlobalVariable.h Mon May 19 15:15:12 2008 @@ -112,11 +112,11 @@ /// leads to undefined behavior. /// bool isConstant() const { return isConstantGlobal; } - void setConstant(bool Value) { isConstantGlobal = Value; } + void setConstant(bool Val) { isConstantGlobal = Val; } /// If the value is "Thread Local", its value isn't shared by the threads. bool isThreadLocal() const { return isThreadLocalSymbol; } - void setThreadLocal(bool Value) { isThreadLocalSymbol = Value; } + void setThreadLocal(bool Val) { isThreadLocalSymbol = Val; } /// removeFromParent - This method unlinks 'this' from the containing module, /// but does not delete it. Modified: llvm/trunk/include/llvm/ModuleProvider.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ModuleProvider.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/ModuleProvider.h (original) +++ llvm/trunk/include/llvm/ModuleProvider.h Mon May 19 15:15:12 2008 @@ -48,7 +48,7 @@ /// it up to be materialized lazily. If the provider doesn't support this /// capability, this method is a noop. /// - virtual void dematerializeFunction(Function *F) {} + virtual void dematerializeFunction(Function *) {} /// materializeModule - make sure the entire Module has been completely read. /// On error, return null and fill in the error string if specified. @@ -77,10 +77,10 @@ explicit ExistingModuleProvider(Module *M) { TheModule = M; } - bool materializeFunction(Function *F, std::string *ErrInfo = 0) { + bool materializeFunction(Function *, std::string * = 0) { return false; } - Module* materializeModule(std::string *ErrInfo = 0) { return TheModule; } + Module* materializeModule(std::string * = 0) { return TheModule; } }; } // End llvm namespace Modified: llvm/trunk/include/llvm/Pass.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Pass.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/Pass.h (original) +++ llvm/trunk/include/llvm/Pass.h Mon May 19 15:15:12 2008 @@ -109,10 +109,10 @@ /// Each pass is responsible for assigning a pass manager to itself. /// PMS is the stack of available pass manager. - virtual void assignPassManager(PMStack &PMS, - PassManagerType T = PMT_Unknown) {} + virtual void assignPassManager(PMStack &, + PassManagerType = PMT_Unknown) {} /// Check if available pass managers are suitable for this pass or not. - virtual void preparePassManager(PMStack &PMS) {} + virtual void preparePassManager(PMStack &) {} /// Return what kind of Pass Manager can manage this pass. virtual PassManagerType getPotentialPassManagerType() const { @@ -134,7 +134,7 @@ /// particular analysis result to this function, it can then use the /// getAnalysis() function, below. /// - virtual void getAnalysisUsage(AnalysisUsage &Info) const { + virtual void getAnalysisUsage(AnalysisUsage &) const { // By default, no analysis results are used, all are invalidated. } @@ -250,7 +250,7 @@ /// ImmutablePasses are never run. /// - bool runOnModule(Module &M) { return false; } + bool runOnModule(Module &) { return false; } explicit ImmutablePass(intptr_t pid) : ModulePass(pid) {} explicit ImmutablePass(const void *pid) @@ -277,7 +277,7 @@ /// doInitialization - Virtual method overridden by subclasses to do /// any necessary per-module initialization. /// - virtual bool doInitialization(Module &M) { return false; } + virtual bool doInitialization(Module &) { return false; } /// runOnFunction - Virtual method overriden by subclasses to do the /// per-function processing of the pass. @@ -287,7 +287,7 @@ /// doFinalization - Virtual method overriden by subclasses to do any post /// processing needed after all passes have run. /// - virtual bool doFinalization(Module &M) { return false; } + virtual bool doFinalization(Module &) { return false; } /// runOnModule - On a module, we run this pass by initializing, /// ronOnFunction'ing once for every function in the module, then by @@ -329,12 +329,12 @@ /// doInitialization - Virtual method overridden by subclasses to do /// any necessary per-module initialization. /// - virtual bool doInitialization(Module &M) { return false; } + virtual bool doInitialization(Module &) { return false; } /// doInitialization - Virtual method overridden by BasicBlockPass subclasses /// to do any necessary per-function initialization. /// - virtual bool doInitialization(Function &F) { return false; } + virtual bool doInitialization(Function &) { return false; } /// runOnBasicBlock - Virtual method overriden by subclasses to do the /// per-basicblock processing of the pass. @@ -344,12 +344,12 @@ /// doFinalization - Virtual method overriden by BasicBlockPass subclasses to /// do any post processing needed after all passes have run. /// - virtual bool doFinalization(Function &F) { return false; } + virtual bool doFinalization(Function &) { return false; } /// doFinalization - Virtual method overriden by subclasses to do any post /// processing needed after all passes have run. /// - virtual bool doFinalization(Module &M) { return false; } + virtual bool doFinalization(Module &) { return false; } // To run this pass on a function, we simply call runOnBasicBlock once for Modified: llvm/trunk/include/llvm/PassSupport.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassSupport.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassSupport.h (original) +++ llvm/trunk/include/llvm/PassSupport.h Mon May 19 15:15:12 2008 @@ -53,10 +53,10 @@ /// through RegisterPass. PassInfo(const char *name, const char *arg, intptr_t pi, NormalCtor_t normal = 0, - bool isCFGOnly = false, bool isAnalysis = false) + bool isCFGOnly = false, bool is_analysis = false) : PassName(name), PassArgument(arg), PassID(pi), IsCFGOnlyPass(isCFGOnly), - IsAnalysis(isAnalysis), IsAnalysisGroup(false), NormalCtor(normal) { + IsAnalysis(is_analysis), IsAnalysisGroup(false), NormalCtor(normal) { registerPass(); } /// PassInfo ctor - Do not call this directly, this should only be invoked @@ -169,10 +169,10 @@ // Register Pass using default constructor... RegisterPass(const char *PassArg, const char *Name, bool CFGOnly = false, - bool IsAnalysis = false) + bool is_analysis = false) : PassInfo(Name, PassArg, intptr_t(&passName::ID), PassInfo::NormalCtor_t(callDefaultCtor), - CFGOnly, IsAnalysis) { + CFGOnly, is_analysis) { } }; @@ -244,7 +244,7 @@ /// Callback functions - These functions are invoked whenever a pass is loaded /// or removed from the current executable. /// - virtual void passRegistered(const PassInfo *P) {} + virtual void passRegistered(const PassInfo *) {} /// enumeratePasses - Iterate over the registered passes, calling the /// passEnumerate callback on each PassInfo object. @@ -254,7 +254,7 @@ /// passEnumerate - Callback function invoked when someone calls /// enumeratePasses on this PassRegistrationListener object. /// - virtual void passEnumerate(const PassInfo *P) {} + virtual void passEnumerate(const PassInfo *) {} }; Modified: llvm/trunk/include/llvm/Support/CommandLine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/CommandLine.h (original) +++ llvm/trunk/include/llvm/Support/CommandLine.h Mon May 19 15:15:12 2008 @@ -226,7 +226,7 @@ // virtual void printOptionInfo(size_t GlobalWidth) const = 0; - virtual void getExtraOptionNames(std::vector &OptionNames) {} + virtual void getExtraOptionNames(std::vector &) {} // addOccurrence - Wrapper around handleOccurrence that enforces Flags // @@ -324,10 +324,10 @@ Values.push_back(std::make_pair(EnumName, std::make_pair(Val, Desc))); // Process the varargs portion of the values... - while (const char *EnumName = va_arg(ValueArgs, const char *)) { + while (const char *enumName = va_arg(ValueArgs, const char *)) { DataType EnumVal = static_cast(va_arg(ValueArgs, int)); const char *EnumDesc = va_arg(ValueArgs, const char *); - Values.push_back(std::make_pair(EnumName, // Add value to value map + Values.push_back(std::make_pair(enumName, // Add value to value map std::make_pair(EnumVal, EnumDesc))); } } @@ -499,9 +499,9 @@ return ValueRequired; } - void getExtraOptionNames(std::vector &OptionNames) {} + void getExtraOptionNames(std::vector &) {} - void initialize(Option &O) {} + void initialize(Option &) {} // Return the width of the option tag for printing... size_t getOptionWidth(const Option &O) const; @@ -651,7 +651,7 @@ class parser : public basic_parser { public: // parse - Return true on error. - bool parse(Option &O, const char *AN, const std::string &Arg, + bool parse(Option &, const char *, const std::string &Arg, std::string &Value) { Value = Arg; return false; @@ -1257,7 +1257,7 @@ class alias : public Option { Option *AliasFor; - virtual bool handleOccurrence(unsigned pos, const char *ArgName, + virtual bool handleOccurrence(unsigned pos, const char */*ArgName*/, const std::string &Arg) { return AliasFor->handleOccurrence(pos, AliasFor->ArgStr, Arg); } Modified: llvm/trunk/include/llvm/Target/TargetMachine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetMachine.h (original) +++ llvm/trunk/include/llvm/Target/TargetMachine.h Mon May 19 15:15:12 2008 @@ -99,7 +99,7 @@ /// used by the LLC tool to determine which target to use when an explicit /// -march option is not specified. If a target returns zero, it will never /// be chosen without an explicit -march option. - static unsigned getModuleMatchQuality(const Module &M) { return 0; } + static unsigned getModuleMatchQuality(const Module &) { return 0; } /// getJITMatchQuality - This static method should be implemented by targets /// that provide JIT capabilities to indicate how suitable they are for @@ -195,10 +195,10 @@ /// This method should return FileModel::Error if emission of this file type /// is not supported. /// - virtual FileModel::Model addPassesToEmitFile(PassManagerBase &PM, - std::ostream &Out, - CodeGenFileType FileType, - bool Fast) { + virtual FileModel::Model addPassesToEmitFile(PassManagerBase &, + std::ostream &, + CodeGenFileType, + bool /*Fast*/) { return FileModel::None; } @@ -206,8 +206,8 @@ /// to be split up (e.g., to add an object writer pass), this method can be /// used to finish up adding passes to emit the file, if necessary. /// - virtual bool addPassesToEmitFileFinish(PassManagerBase &PM, - MachineCodeEmitter *MCE, bool Fast) { + virtual bool addPassesToEmitFileFinish(PassManagerBase &, + MachineCodeEmitter *, bool /*Fast*/) { return true; } @@ -217,8 +217,9 @@ /// of functions. This method returns true if machine code emission is /// not supported. /// - virtual bool addPassesToEmitMachineCode(PassManagerBase &PM, - MachineCodeEmitter &MCE, bool Fast) { + virtual bool addPassesToEmitMachineCode(PassManagerBase &, + MachineCodeEmitter &, + bool /*Fast*/) { return true; } @@ -226,8 +227,8 @@ /// require having the entire module at once. This is not recommended, do not /// use this. virtual bool WantsWholeFile() const { return false; } - virtual bool addPassesToEmitWholeFile(PassManager &PM, std::ostream &Out, - CodeGenFileType FileType, bool Fast) { + virtual bool addPassesToEmitWholeFile(PassManager &, std::ostream &, + CodeGenFileType, bool /*Fast*/) { return true; } }; @@ -277,14 +278,14 @@ /// addInstSelector - This method should add any "last minute" LLVM->LLVM /// passes, then install an instruction selector pass, which converts from /// LLVM code to machine instructions. - virtual bool addInstSelector(PassManagerBase &PM, bool Fast) { + virtual bool addInstSelector(PassManagerBase &, bool /*Fast*/) { return true; } /// addPreRegAllocPasses - This method may be implemented by targets that want /// to run passes immediately before register allocation. This should return /// true if -print-machineinstrs should print after these passes. - virtual bool addPreRegAlloc(PassManagerBase &PM, bool Fast) { + virtual bool addPreRegAlloc(PassManagerBase &, bool /*Fast*/) { return false; } @@ -292,14 +293,14 @@ /// want to run passes after register allocation but before prolog-epilog /// insertion. This should return true if -print-machineinstrs should print /// after these passes. - virtual bool addPostRegAlloc(PassManagerBase &PM, bool Fast) { + virtual bool addPostRegAlloc(PassManagerBase &, bool /*Fast*/) { return false; } /// addPreEmitPass - This pass may be implemented by targets that want to run /// passes immediately before machine code is emitted. This should return /// true if -print-machineinstrs should print out the code after the passes. - virtual bool addPreEmitPass(PassManagerBase &PM, bool Fast) { + virtual bool addPreEmitPass(PassManagerBase &, bool /*Fast*/) { return false; } @@ -307,16 +308,16 @@ /// addAssemblyEmitter - This pass should be overridden by the target to add /// the asmprinter, if asm emission is supported. If this is not supported, /// 'true' should be returned. - virtual bool addAssemblyEmitter(PassManagerBase &PM, bool Fast, - std::ostream &Out) { + virtual bool addAssemblyEmitter(PassManagerBase &, bool /*Fast*/, + std::ostream &) { return true; } /// addCodeEmitter - This pass should be overridden by the target to add a /// code emitter, if supported. If this is not supported, 'true' should be /// returned. If DumpAsm is true, the generated assembly is printed to cerr. - virtual bool addCodeEmitter(PassManagerBase &PM, bool Fast, bool DumpAsm, - MachineCodeEmitter &MCE) { + virtual bool addCodeEmitter(PassManagerBase &, bool /*Fast*/, + bool /*DumpAsm*/, MachineCodeEmitter &) { return true; } @@ -324,8 +325,8 @@ /// a code emitter (without setting flags), if supported. If this is not /// supported, 'true' should be returned. If DumpAsm is true, the generated /// assembly is printed to cerr. - virtual bool addSimpleCodeEmitter(PassManagerBase &PM, bool Fast, - bool DumpAsm, MachineCodeEmitter &MCE) { + virtual bool addSimpleCodeEmitter(PassManagerBase &, bool /*Fast*/, + bool /*DumpAsm*/, MachineCodeEmitter &) { return true; } Modified: llvm/trunk/include/llvm/Type.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Type.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/Type.h (original) +++ llvm/trunk/include/llvm/Type.h Mon May 19 15:15:12 2008 @@ -293,7 +293,7 @@ static const IntegerType *Int1Ty, *Int8Ty, *Int16Ty, *Int32Ty, *Int64Ty; /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Type *T) { return true; } + static inline bool classof(const Type *) { return true; } void addRef() const { assert(isAbstract() && "Cannot add a reference to a non-abstract type!"); Modified: llvm/trunk/include/llvm/User.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/User.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/User.h (original) +++ llvm/trunk/include/llvm/User.h Mon May 19 15:15:12 2008 @@ -228,8 +228,8 @@ unsigned NumOperands; void *operator new(size_t s, unsigned Us); - User(const Type *Ty, unsigned vty, Use *OpList, unsigned NumOps) - : Value(Ty, vty), OperandList(OpList), NumOperands(NumOps) {} + User(const Type *ty, unsigned vty, Use *OpList, unsigned NumOps) + : Value(ty, vty), OperandList(OpList), NumOperands(NumOps) {} Use *allocHungoffUses(unsigned) const; void dropHungoffUses(Use *U) { if (OperandList == U) { Modified: llvm/trunk/include/llvm/Value.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Value.h?rev=51266&r1=51265&r2=51266&view=diff ============================================================================== --- llvm/trunk/include/llvm/Value.h (original) +++ llvm/trunk/include/llvm/Value.h Mon May 19 15:15:12 2008 @@ -232,7 +232,7 @@ return OS; } -void Use::init(Value *V, User *user) { +void Use::init(Value *V, User *) { Val = V; if (V) V->addUse(*this); } From sabre at nondot.org Mon May 19 15:18:56 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 19 May 2008 20:18:56 -0000 Subject: [llvm-commits] [llvm] r51268 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/sitofp.ll Message-ID: <200805192018.m4JKIumk020190@zion.cs.uiuc.edu> Author: lattner Date: Mon May 19 15:18:56 2008 New Revision: 51268 URL: http://llvm.org/viewvc/llvm-project?rev=51268&view=rev Log: Fold FP comparisons where one operand is converted from an integer type and the other operand is a constant into integer comparisons. This happens surprisingly frequently (e.g. 10 times in 471.omnetpp), which are things like this: %tmp8283 = sitofp i32 %tmp82 to double %tmp1013 = fcmp ult double %tmp8283, 0.0 Clearly comparing tmp82 against i32 0 is cheaper here. this also triggers 8 times in gobmk, including this one: %tmp375376 = sitofp i32 %tmp375 to double %tmp377 = fcmp ogt double %tmp375376, 8.150000e+01 which is comparing an integer against 81.5 :). Added: llvm/trunk/test/Transforms/InstCombine/sitofp.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51268&r1=51267&r2=51268&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon May 19 15:18:56 2008 @@ -185,6 +185,8 @@ Instruction *visitAShr(BinaryOperator &I); Instruction *visitLShr(BinaryOperator &I); Instruction *commonShiftTransforms(BinaryOperator &I); + Instruction *FoldFCmp_IntToFP_Cst(FCmpInst &I, Instruction *LHSI, + Constant *RHSC); Instruction *visitFCmpInst(FCmpInst &I); Instruction *visitICmpInst(ICmpInst &I); Instruction *visitICmpInstWithCastAndCast(ICmpInst &ICI); @@ -418,6 +420,18 @@ return Ty; } +/// GetFPMantissaWidth - Return the width of the mantissa (aka significand) of +/// the specified floating point type in bits. This returns -1 if unknown. +static int GetFPMantissaWidth(const Type *FPType) { + if (FPType == Type::FloatTy) + return 24; + if (FPType == Type::DoubleTy) + return 53; + if (FPType == Type::X86_FP80Ty) + return 64; + return -1; // Unknown/crazy type. +} + /// getBitCastOperand - If the specified operand is a CastInst or a constant /// expression bitcast, return the operand value, otherwise return null. static Value *getBitCastOperand(Value *V) { @@ -5228,6 +5242,135 @@ return 0; } +/// FoldFCmp_IntToFP_Cst - Fold fcmp ([us]itofp x, cst) if possible. +/// +Instruction *InstCombiner::FoldFCmp_IntToFP_Cst(FCmpInst &I, + Instruction *LHSI, + Constant *RHSC) { + if (!isa(RHSC)) return 0; + const APFloat &RHS = cast(RHSC)->getValueAPF(); + + // Get the width of the mantissa. We don't want to hack on conversions that + // might lose information from the integer, e.g. "i64 -> float" + int MantissaWidth = GetFPMantissaWidth(LHSI->getType()); + if (MantissaWidth == -1) return 0; // Unknown. + + // Check to see that the input is converted from an integer type that is small + // enough that preserves all bits. TODO: check here for "known" sign bits. + // This would allow us to handle (fptosi (x >>s 62) to float) if x is i64 f.e. + unsigned InputSize = LHSI->getOperand(0)->getType()->getPrimitiveSizeInBits(); + + // If this is a uitofp instruction, we need an extra bit to hold the sign. + if (isa(LHSI)) + ++InputSize; + + // If the conversion would lose info, don't hack on this. + if ((int)InputSize > MantissaWidth) + return 0; + + // Otherwise, we can potentially simplify the comparison. We know that it + // will always come through as an integer value and we know the constant is + // not a NAN (it would have been previously simplified). + assert(!RHS.isNaN() && "NaN comparison not already folded!"); + + ICmpInst::Predicate Pred; + switch (I.getPredicate()) { + default: assert(0 && "Unexpected predicate!"); + case FCmpInst::FCMP_UEQ: + case FCmpInst::FCMP_OEQ: Pred = ICmpInst::ICMP_EQ; break; + case FCmpInst::FCMP_UGT: + case FCmpInst::FCMP_OGT: Pred = ICmpInst::ICMP_SGT; break; + case FCmpInst::FCMP_UGE: + case FCmpInst::FCMP_OGE: Pred = ICmpInst::ICMP_SGE; break; + case FCmpInst::FCMP_ULT: + case FCmpInst::FCMP_OLT: Pred = ICmpInst::ICMP_SLT; break; + case FCmpInst::FCMP_ULE: + case FCmpInst::FCMP_OLE: Pred = ICmpInst::ICMP_SLE; break; + case FCmpInst::FCMP_UNE: + case FCmpInst::FCMP_ONE: Pred = ICmpInst::ICMP_NE; break; + case FCmpInst::FCMP_ORD: + return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 1)); + case FCmpInst::FCMP_UNO: + return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 0)); + } + + const IntegerType *IntTy = cast(LHSI->getOperand(0)->getType()); + + // Now we know that the APFloat is a normal number, zero or inf. + + // See if the FP constant is top large for the integer. For example, + // comparing an i8 to 300.0. + unsigned IntWidth = IntTy->getPrimitiveSizeInBits(); + + // If the RHS value is > SignedMax, fold the comparison. This handles +INF + // and large values. + APFloat SMax(RHS.getSemantics(), APFloat::fcZero, false); + SMax.convertFromAPInt(APInt::getSignedMaxValue(IntWidth), true, + APFloat::rmNearestTiesToEven); + if (SMax.compare(RHS) == APFloat::cmpLessThan) { // smax < 13123.0 + if (ICmpInst::ICMP_NE || ICmpInst::ICMP_SLT || Pred == ICmpInst::ICMP_SLE) + return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 1)); + return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 0)); + } + + // See if the RHS value is < SignedMin. + APFloat SMin(RHS.getSemantics(), APFloat::fcZero, false); + SMin.convertFromAPInt(APInt::getSignedMinValue(IntWidth), true, + APFloat::rmNearestTiesToEven); + if (SMin.compare(RHS) == APFloat::cmpGreaterThan) { // smin > 12312.0 + if (ICmpInst::ICMP_NE || ICmpInst::ICMP_SGT || Pred == ICmpInst::ICMP_SGE) + return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 1)); + return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 0)); + } + + // Okay, now we know that the FP constant fits in the range [SMIN, SMAX] but + // it may still be fractional. See if it is fractional by casting the FP + // value to the integer value and back, checking for equality. Don't do this + // for zero, because -0.0 is not fractional. + Constant *RHSInt = ConstantExpr::getFPToSI(RHSC, IntTy); + if (!RHS.isZero() && + ConstantExpr::getSIToFP(RHSInt, RHSC->getType()) != RHSC) { + // If we had a comparison against a fractional value, we have to adjust + // the compare predicate and sometimes the value. RHSC is rounded towards + // zero at this point. + switch (Pred) { + default: assert(0 && "Unexpected integer comparison!"); + case ICmpInst::ICMP_NE: // (float)int != 4.4 --> true + return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 1)); + case ICmpInst::ICMP_EQ: // (float)int == 4.4 --> false + return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 0)); + case ICmpInst::ICMP_SLE: + // (float)int <= 4.4 --> int <= 4 + // (float)int <= -4.4 --> int < -4 + if (RHS.isNegative()) + Pred = ICmpInst::ICMP_SLT; + break; + case ICmpInst::ICMP_SLT: + // (float)int < -4.4 --> int < -4 + // (float)int < 4.4 --> int <= 4 + if (!RHS.isNegative()) + Pred = ICmpInst::ICMP_SLE; + break; + case ICmpInst::ICMP_SGT: + // (float)int > 4.4 --> int > 4 + // (float)int > -4.4 --> int >= -4 + if (RHS.isNegative()) + Pred = ICmpInst::ICMP_SGE; + break; + case ICmpInst::ICMP_SGE: + // (float)int >= -4.4 --> int >= -4 + // (float)int >= 4.4 --> int > 4 + if (!RHS.isNegative()) + Pred = ICmpInst::ICMP_SGT; + break; + } + } + + // Lower this FP comparison into an appropriate integer version of the + // comparison. + return new ICmpInst(Pred, LHSI->getOperand(0), RHSInt); +} + Instruction *InstCombiner::visitFCmpInst(FCmpInst &I) { bool Changed = SimplifyCompare(I); Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); @@ -5276,12 +5419,29 @@ // Handle fcmp with constant RHS if (Constant *RHSC = dyn_cast(Op1)) { + // If the constant is a nan, see if we can fold the comparison based on it. + if (ConstantFP *CFP = dyn_cast(RHSC)) { + if (CFP->getValueAPF().isNaN()) { + if (FCmpInst::isOrdered(I.getPredicate())) // True if ordered and... + return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 0)); + if (FCmpInst::isUnordered(I.getPredicate())) // True if unordered or... + return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 1)); + if (FCmpInst::isUnordered(I.getPredicate())) // Undef on unordered. + return ReplaceInstUsesWith(I, UndefValue::get(Type::Int1Ty)); + } + } + if (Instruction *LHSI = dyn_cast(Op0)) switch (LHSI->getOpcode()) { case Instruction::PHI: if (Instruction *NV = FoldOpIntoPhi(I)) return NV; break; + case Instruction::SIToFP: + case Instruction::UIToFP: + if (Instruction *NV = FoldFCmp_IntToFP_Cst(I, LHSI, RHSC)) + return NV; + break; case Instruction::Select: // If either operand of the select is a constant, we can fold the // comparison into the select arms, which will cause one to be Added: llvm/trunk/test/Transforms/InstCombine/sitofp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/sitofp.ll?rev=51268&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/sitofp.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/sitofp.ll Mon May 19 15:18:56 2008 @@ -0,0 +1,25 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep sitofp + +define i1 @test1(i8 %A) { + %B = sitofp i8 %A to double + %C = fcmp ult double %B, 128.0 + ret i1 %C ; True! +} +define i1 @test2(i8 %A) { + %B = sitofp i8 %A to double + %C = fcmp ugt double %B, -128.1 + ret i1 %C ; True! +} + +define i1 @test3(i8 %A) { + %B = sitofp i8 %A to double + %C = fcmp ule double %B, 127.0 + ret i1 %C ; true! +} + +define i1 @test4(i8 %A) { + %B = sitofp i8 %A to double + %C = fcmp ult double %B, 127.0 + ret i1 %C ; A != 127 +} + From dpatel at apple.com Mon May 19 15:22:08 2008 From: dpatel at apple.com (Devang Patel) Date: Mon, 19 May 2008 20:22:08 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r51270 - in /llvm-gcc-4.2/trunk/gcc: ipa-inline.c passes.c Message-ID: <200805192022.m4JKM8Ab020320@zion.cs.uiuc.edu> Author: dpatel Date: Mon May 19 15:22:07 2008 New Revision: 51270 URL: http://llvm.org/viewvc/llvm-project?rev=51270&view=rev Log: Revert ipa patch to fix llvmgcc42 bootstrap on x86-darwin. Modified: llvm-gcc-4.2/trunk/gcc/ipa-inline.c llvm-gcc-4.2/trunk/gcc/passes.c Modified: llvm-gcc-4.2/trunk/gcc/ipa-inline.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/ipa-inline.c?rev=51270&r1=51269&r2=51270&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/ipa-inline.c (original) +++ llvm-gcc-4.2/trunk/gcc/ipa-inline.c Mon May 19 15:22:07 2008 @@ -941,11 +941,7 @@ /* At the moment, no IPA passes change function bodies before inlining. Save some time by not recomputing function body sizes if early inlining already did so. */ - /* LLVM local begin - Don't rely on pass_early_ipa_inline being run. */ -#ifndef ENABLE_LLVM if (!flag_early_inlining) -#endif - /* LLVM local end */ node->local.self_insns = node->global.insns = estimate_num_insns (node->decl); @@ -1032,8 +1028,6 @@ overall_insns - old_insns); } - /* LLVM local begin */ -#ifndef ENABLE_LLVM if (!flag_really_no_inline) cgraph_decide_inlining_of_small_functions (); @@ -1107,8 +1101,6 @@ } } } -#endif - /* LLVM local end */ if (dump_file) fprintf (dump_file, @@ -1155,8 +1147,6 @@ inlined = true; } - /* LLVM local begin */ -#ifndef ENABLE_LLVM /* Now do the automatic inlining. */ if (!flag_really_no_inline) for (e = node->callees; e; e = e->next_callee) @@ -1189,8 +1179,6 @@ else if (!early) e->inline_failed = failed_reason; } -#endif - /* LLVM local end */ if (early && inlined) { push_cfun (DECL_STRUCT_FUNCTION (node->decl)); Modified: llvm-gcc-4.2/trunk/gcc/passes.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/passes.c?rev=51270&r1=51269&r2=51270&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/passes.c (original) +++ llvm-gcc-4.2/trunk/gcc/passes.c Mon May 19 15:22:07 2008 @@ -484,9 +484,9 @@ NEXT_PASS (pass_early_ipa_inline); NEXT_PASS (pass_early_local_passes); NEXT_PASS (pass_ipa_cp); - NEXT_PASS (pass_ipa_inline); /* LLVM LOCAL begin */ #ifndef ENABLE_LLVM + NEXT_PASS (pass_ipa_inline); NEXT_PASS (pass_ipa_reference); NEXT_PASS (pass_ipa_pure_const); NEXT_PASS (pass_ipa_type_escape); From sabre at nondot.org Mon May 19 15:25:04 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 19 May 2008 20:25:04 -0000 Subject: [llvm-commits] [llvm] r51271 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/sitofp.ll Message-ID: <200805192025.m4JKP4uV020415@zion.cs.uiuc.edu> Author: lattner Date: Mon May 19 15:25:04 2008 New Revision: 51271 URL: http://llvm.org/viewvc/llvm-project?rev=51271&view=rev Log: convert fptosi(sitofp x) -> x if the fp value has enough bits in its mantissa to accurately represent the integer. This triggers 9 times in 471.omnetpp, though 8 of those seem to be inlined from the same place. Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp llvm/trunk/test/Transforms/InstCombine/sitofp.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51271&r1=51270&r2=51271&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon May 19 15:25:04 2008 @@ -208,8 +208,8 @@ Instruction *visitSExt(SExtInst &CI); Instruction *visitFPTrunc(FPTruncInst &CI); Instruction *visitFPExt(CastInst &CI); - Instruction *visitFPToUI(CastInst &CI); - Instruction *visitFPToSI(CastInst &CI); + Instruction *visitFPToUI(FPToUIInst &FI); + Instruction *visitFPToSI(FPToSIInst &FI); Instruction *visitUIToFP(CastInst &CI); Instruction *visitSIToFP(CastInst &CI); Instruction *visitPtrToInt(CastInst &CI); @@ -2439,9 +2439,9 @@ } while (Size >= 1); // 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. + // with funny bit widths then this switch statement 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; @@ -7995,12 +7995,30 @@ return commonCastTransforms(CI); } -Instruction *InstCombiner::visitFPToUI(CastInst &CI) { - return commonCastTransforms(CI); -} - -Instruction *InstCombiner::visitFPToSI(CastInst &CI) { - return commonCastTransforms(CI); +Instruction *InstCombiner::visitFPToUI(FPToUIInst &FI) { + // fptoui(uitofp(X)) --> X if the intermediate type has enough bits in its + // mantissa to accurately represent all values of X. For example, do not + // do this with i64->float->i64. + if (UIToFPInst *SrcI = dyn_cast(FI.getOperand(0))) + if (SrcI->getOperand(0)->getType() == FI.getType() && + (int)FI.getType()->getPrimitiveSizeInBits() < /*extra bit for sign */ + GetFPMantissaWidth(SrcI->getType())) + return ReplaceInstUsesWith(FI, SrcI->getOperand(0)); + + return commonCastTransforms(FI); +} + +Instruction *InstCombiner::visitFPToSI(FPToSIInst &FI) { + // fptosi(sitofp(X)) --> X if the intermediate type has enough bits in its + // mantissa to accurately represent all values of X. For example, do not + // do this with i64->float->i64. + if (SIToFPInst *SrcI = dyn_cast(FI.getOperand(0))) + if (SrcI->getOperand(0)->getType() == FI.getType() && + (int)FI.getType()->getPrimitiveSizeInBits() <= + GetFPMantissaWidth(SrcI->getType())) + return ReplaceInstUsesWith(FI, SrcI->getOperand(0)); + + return commonCastTransforms(FI); } Instruction *InstCombiner::visitUIToFP(CastInst &CI) { Modified: llvm/trunk/test/Transforms/InstCombine/sitofp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/sitofp.ll?rev=51271&r1=51270&r2=51271&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/sitofp.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/sitofp.ll Mon May 19 15:25:04 2008 @@ -23,3 +23,11 @@ ret i1 %C ; A != 127 } +define i32 @test5(i32 %A) { + %B = sitofp i32 %A to double + %C = fptosi double %B to i32 + %D = uitofp i32 %C to double + %E = fptoui double %D to i32 + ret i32 %E +} + From sabre at nondot.org Mon May 19 15:27:56 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 19 May 2008 20:27:56 -0000 Subject: [llvm-commits] [llvm] r51272 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200805192027.m4JKRv4r020510@zion.cs.uiuc.edu> Author: lattner Date: Mon May 19 15:27:56 2008 New Revision: 51272 URL: http://llvm.org/viewvc/llvm-project?rev=51272&view=rev Log: minor cleanups, teach instcombine that sitofp/uitofp cannot produce a negative zero. Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51272&r1=51271&r2=51272&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon May 19 15:27:56 2008 @@ -834,10 +834,11 @@ case Instruction::IntToPtr: // We can't handle these if we don't know the pointer size. if (!TD) return; - // Fall through and handle them the same as zext/trunc. + // FALL THROUGH and handle them the same as zext/trunc. case Instruction::ZExt: case Instruction::Trunc: { - // All these have integer operands + // Note that we handle pointer operands here because of inttoptr/ptrtoint + // which fall through here. const Type *SrcTy = I->getOperand(0)->getType(); uint32_t SrcBitWidth = TD ? TD->getTypeSizeInBits(SrcTy) : @@ -2339,13 +2340,17 @@ if (const ConstantFP *CFP = dyn_cast(V)) return !CFP->getValueAPF().isNegZero(); - // (add x, 0.0) is guaranteed to return +0.0, not -0.0. if (const Instruction *I = dyn_cast(V)) { + // (add x, 0.0) is guaranteed to return +0.0, not -0.0. if (I->getOpcode() == Instruction::Add && isa(I->getOperand(1)) && cast(I->getOperand(1))->isNullValue()) return true; + // sitofp and uitofp turn into +0.0 for zero. + if (isa(I) || isa(I)) + return true; + if (const IntrinsicInst *II = dyn_cast(I)) if (II->getIntrinsicID() == Intrinsic::sqrt) return CannotBeNegativeZero(II->getOperand(1)); From dalej at apple.com Mon May 19 15:34:32 2008 From: dalej at apple.com (Dale Johannesen) Date: Mon, 19 May 2008 13:34:32 -0700 Subject: [llvm-commits] [llvm] r51268 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/sitofp.ll In-Reply-To: <200805192018.m4JKIumk020190@zion.cs.uiuc.edu> References: <200805192018.m4JKIumk020190@zion.cs.uiuc.edu> Message-ID: This is fltSemantics.precision. On May 19, 2008, at 1:18 PM, Chris Lattner wrote: > +/// GetFPMantissaWidth - Return the width of the mantissa (aka > significand) of > +/// the specified floating point type in bits. This returns -1 if > unknown. > +static int GetFPMantissaWidth(const Type *FPType) { > + if (FPType == Type::FloatTy) > + return 24; > + if (FPType == Type::DoubleTy) > + return 53; > + if (FPType == Type::X86_FP80Ty) > + return 64; > + return -1; // Unknown/crazy type. > +} > + From clattner at apple.com Mon May 19 16:04:32 2008 From: clattner at apple.com (Chris Lattner) Date: Mon, 19 May 2008 14:04:32 -0700 Subject: [llvm-commits] [llvm] r51268 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/sitofp.ll In-Reply-To: References: <200805192018.m4JKIumk020190@zion.cs.uiuc.edu> Message-ID: <5E85E927-40A4-47B6-8D4C-66BBFC52CE4A@apple.com> On May 19, 2008, at 1:34 PM, Dale Johannesen wrote: > This is fltSemantics.precision. Unfortunately, that isn't public and lies about ppc long double :(. Moving this to be a helper method on APFloat would make a lot of sense though. I'll take care of it. -Chris > > > On May 19, 2008, at 1:18 PM, Chris Lattner wrote: > >> +/// GetFPMantissaWidth - Return the width of the mantissa (aka >> significand) of >> +/// the specified floating point type in bits. This returns -1 if >> unknown. >> +static int GetFPMantissaWidth(const Type *FPType) { >> + if (FPType == Type::FloatTy) >> + return 24; >> + if (FPType == Type::DoubleTy) >> + return 53; >> + if (FPType == Type::X86_FP80Ty) >> + return 64; >> + return -1; // Unknown/crazy type. >> +} >> + > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From sabre at nondot.org Mon May 19 16:17:01 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 19 May 2008 21:17:01 -0000 Subject: [llvm-commits] [llvm] r51274 - /llvm/trunk/include/llvm/Type.h Message-ID: <200805192117.m4JLH1J4022435@zion.cs.uiuc.edu> Author: lattner Date: Mon May 19 16:17:01 2008 New Revision: 51274 URL: http://llvm.org/viewvc/llvm-project?rev=51274&view=rev Log: add a helper method. Modified: llvm/trunk/include/llvm/Type.h Modified: llvm/trunk/include/llvm/Type.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Type.h?rev=51274&r1=51273&r2=51274&view=diff ============================================================================== --- llvm/trunk/include/llvm/Type.h (original) +++ llvm/trunk/include/llvm/Type.h Mon May 19 16:17:01 2008 @@ -242,6 +242,19 @@ /// primitive type. /// unsigned getPrimitiveSizeInBits() const; + + /// getFPMantissaWidth - Return the width of the mantissa of this type. This + /// is only valid on scalar floating point types. If the FP type does not + /// have a stable mantissa (e.g. ppc long double), this method returns -1. + int getFPMantissaWidth() const { + assert(isFloatingPoint() && "Not a floating point type!"); + if (ID == FloatTyID) return 24; + if (ID == DoubleTyID) return 53; + if (ID == X86_FP80TyID) return 64; + if (ID == FP128TyID) return 113; + assert(ID == PPC_FP128TyID && "unknown fp type"); + return -1; + } /// getForwardedType - Return the type that this type has been resolved to if /// it has been resolved to anything. This is used to implement the From sabre at nondot.org Mon May 19 16:17:23 2008 From: sabre at nondot.org (Chris Lattner) Date: Mon, 19 May 2008 21:17:23 -0000 Subject: [llvm-commits] [llvm] r51275 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200805192117.m4JLHNgw022462@zion.cs.uiuc.edu> Author: lattner Date: Mon May 19 16:17:23 2008 New Revision: 51275 URL: http://llvm.org/viewvc/llvm-project?rev=51275&view=rev Log: switch to Type::getFPMantissaWidth instead of reinventing it. Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51275&r1=51274&r2=51275&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon May 19 16:17:23 2008 @@ -420,18 +420,6 @@ return Ty; } -/// GetFPMantissaWidth - Return the width of the mantissa (aka significand) of -/// the specified floating point type in bits. This returns -1 if unknown. -static int GetFPMantissaWidth(const Type *FPType) { - if (FPType == Type::FloatTy) - return 24; - if (FPType == Type::DoubleTy) - return 53; - if (FPType == Type::X86_FP80Ty) - return 64; - return -1; // Unknown/crazy type. -} - /// getBitCastOperand - If the specified operand is a CastInst or a constant /// expression bitcast, return the operand value, otherwise return null. static Value *getBitCastOperand(Value *V) { @@ -5257,7 +5245,7 @@ // Get the width of the mantissa. We don't want to hack on conversions that // might lose information from the integer, e.g. "i64 -> float" - int MantissaWidth = GetFPMantissaWidth(LHSI->getType()); + int MantissaWidth = LHSI->getType()->getFPMantissaWidth(); if (MantissaWidth == -1) return 0; // Unknown. // Check to see that the input is converted from an integer type that is small @@ -8007,7 +7995,7 @@ if (UIToFPInst *SrcI = dyn_cast(FI.getOperand(0))) if (SrcI->getOperand(0)->getType() == FI.getType() && (int)FI.getType()->getPrimitiveSizeInBits() < /*extra bit for sign */ - GetFPMantissaWidth(SrcI->getType())) + SrcI->getType()->getFPMantissaWidth()) return ReplaceInstUsesWith(FI, SrcI->getOperand(0)); return commonCastTransforms(FI); @@ -8020,7 +8008,7 @@ if (SIToFPInst *SrcI = dyn_cast(FI.getOperand(0))) if (SrcI->getOperand(0)->getType() == FI.getType() && (int)FI.getType()->getPrimitiveSizeInBits() <= - GetFPMantissaWidth(SrcI->getType())) + SrcI->getType()->getFPMantissaWidth()) return ReplaceInstUsesWith(FI, SrcI->getOperand(0)); return commonCastTransforms(FI); From clattner at apple.com Mon May 19 16:19:29 2008 From: clattner at apple.com (Chris Lattner) Date: Mon, 19 May 2008 14:19:29 -0700 Subject: [llvm-commits] Speeding up RegAllocLinearScan on big test-cases In-Reply-To: References: <149F341F-BD78-4D7D-86D9-9A8B63015DA5@apple.com> <64355EDB-A34D-4A65-BB1E-F0246B886C94@apple.com> <16e5fdf90805061553u6b25f716wb4476068a18b88b2@mail.gmail.com> <4933F9BB-8DED-43F1-BDAE-4F59D23E9CA3@apple.com> <4DFD57BC-7873-4326-B028-AB0AD9D6B323@apple.com> Message-ID: <4473DA50-449A-4F09-B13C-4F4F8817D107@apple.com> On May 19, 2008, at 3:13 AM, Roman Levenstein wrote: >> If your assumption holds, I should see that STL's standard >> allocator would perform much worse than before. > > Chris, you're absolutely right!!! > > The standard STL allocators is now much slower after a special prepass > creates artificially a lot of fragmented memory. When I redo the same > tests that I did before, the performance figures for STl containers > using standard allocators are about 2 times worse than for all other > allocators(whose performance is unaffected by the heap fragmentation). > I can also nicely see that the performance of containers using the > standard STL allocator constantly degrades as memory fragmentation > increases. Yep, that makes logical sense. The major reason to do per-container allocation is locality :) -Chris From dalej at apple.com Mon May 19 16:38:18 2008 From: dalej at apple.com (Dale Johannesen) Date: Mon, 19 May 2008 21:38:18 -0000 Subject: [llvm-commits] [llvm] r51277 - in /llvm/trunk: include/llvm/CodeGen/AsmPrinter.h lib/CodeGen/AsmPrinter.cpp lib/Target/ARM/ARMAsmPrinter.cpp lib/Target/PowerPC/PPCAsmPrinter.cpp lib/Target/X86/X86ATTAsmPrinter.cpp lib/Target/X86/X86AsmPrinter.cpp Message-ID: <200805192138.m4JLcIIq023242@zion.cs.uiuc.edu> Author: johannes Date: Mon May 19 16:38:18 2008 New Revision: 51277 URL: http://llvm.org/viewvc/llvm-project?rev=51277&view=rev Log: Handle quoted names when constructing $stub's, $non_lazy_ptr's and $lazy_ptr's. Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h llvm/trunk/lib/CodeGen/AsmPrinter.cpp llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=51277&r1=51276&r2=51277&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original) +++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Mon May 19 16:38:18 2008 @@ -348,6 +348,11 @@ /// specified type. void printDataDirective(const Type *type); + /// printSuffixedName - This prints a name with preceding + /// getPrivateGlobalPrefix and the specified suffix, handling quoted names + /// correctly. + void printSuffixedName(std::string &Name, const char* Suffix); + private: void EmitLLVMUsedList(Constant *List); void EmitXXStructorList(Constant *List); Modified: llvm/trunk/lib/CodeGen/AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter.cpp?rev=51277&r1=51276&r2=51277&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter.cpp Mon May 19 16:38:18 2008 @@ -1435,3 +1435,10 @@ } } +void AsmPrinter::printSuffixedName(std::string &Name, const char* Suffix) { + if (Name[0]=='\"') + O << "\"" << TAI->getPrivateGlobalPrefix() << + Name.substr(1, Name.length()-2) << Suffix << "\""; + else + O << TAI->getPrivateGlobalPrefix() << Name << Suffix; +} Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?rev=51277&r1=51276&r2=51277&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Mon May 19 16:38:18 2008 @@ -127,10 +127,10 @@ Name += ACPV->getSymbol(); if (ACPV->isNonLazyPointer()) { GVNonLazyPtrs.insert(Name); - O << TAI->getPrivateGlobalPrefix() << Name << "$non_lazy_ptr"; + printSuffixedName(Name, "$non_lazy_ptr"); } else if (ACPV->isStub()) { FnStubs.insert(Name); - O << TAI->getPrivateGlobalPrefix() << Name << "$stub"; + printSuffixedName(Name, "$stub"); } else O << Name; if (ACPV->hasModifier()) O << "(" << ACPV->getModifier() << ")"; @@ -295,7 +295,7 @@ GV->hasLinkOnceLinkage()); if (isExt && isCallOp && Subtarget->isTargetDarwin() && TM.getRelocationModel() != Reloc::Static) { - O << TAI->getPrivateGlobalPrefix() << Name << "$stub"; + printSuffixedName(Name, "$stub"); FnStubs.insert(Name); } else O << Name; @@ -318,7 +318,7 @@ Name += MO.getSymbolName(); if (isCallOp && Subtarget->isTargetDarwin() && TM.getRelocationModel() != Reloc::Static) { - O << TAI->getPrivateGlobalPrefix() << Name << "$stub"; + printSuffixedName(Name, "$stub"); FnStubs.insert(Name); } else O << Name; @@ -1004,21 +1004,32 @@ EmitAlignment(2); O << "\t.code\t32\n"; - O << "L" << *i << "$stub:\n"; + std::string p = *i; + printSuffixedName(p, "$stub"); + O << ":\n"; O << "\t.indirect_symbol " << *i << "\n"; - O << "\tldr ip, L" << *i << "$slp\n"; + O << "\tldr ip, "; + printSuffixedName(p, "$slp"); + O << "\n"; if (TM.getRelocationModel() == Reloc::PIC_) { - O << "L" << *i << "$scv:\n"; + printSuffixedName(p, "$scv"); + O << ":\n"; O << "\tadd ip, pc, ip\n"; } O << "\tldr pc, [ip, #0]\n"; - O << "L" << *i << "$slp:\n"; - if (TM.getRelocationModel() == Reloc::PIC_) - O << "\t.long\tL" << *i << "$lazy_ptr-(L" << *i << "$scv+8)\n"; - else - O << "\t.long\tL" << *i << "$lazy_ptr\n"; + printSuffixedName(p, "$slp"); + O << ":\n"; + O << "\t.long\t"; + printSuffixedName(p, "$lazy_ptr"); + if (TM.getRelocationModel() == Reloc::PIC_) { + O << "-("; + printSuffixedName(p, "$scv"); + O << "+8)\n"; + } else + O << "\n"; SwitchToDataSection(".lazy_symbol_pointer", 0); - O << "L" << *i << "$lazy_ptr:\n"; + printSuffixedName(p, "$lazy_ptr"); + O << ":\n"; O << "\t.indirect_symbol " << *i << "\n"; O << "\t.long\tdyld_stub_binding_helper\n"; } @@ -1029,7 +1040,9 @@ SwitchToDataSection(".non_lazy_symbol_pointer", 0); for (std::set::iterator i = GVNonLazyPtrs.begin(), e = GVNonLazyPtrs.end(); i != e; ++i) { - O << "L" << *i << "$non_lazy_ptr:\n"; + std::string p = *i; + printSuffixedName(p, "$non_lazy_ptr"); + O << ":\n"; O << "\t.indirect_symbol " << *i << "\n"; O << "\t.long\t0\n"; } Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=51277&r1=51276&r2=51277&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Mon May 19 16:38:18 2008 @@ -189,7 +189,7 @@ // Dynamically-resolved functions need a stub for the function. std::string Name = Mang->getValueName(GV); FnStubs.insert(Name); - O << "L" << Name << "$stub"; + printSuffixedName(Name, "$stub"); if (GV->hasExternalWeakLinkage()) ExtWeakSymbols.insert(GV); return; @@ -198,7 +198,7 @@ if (MO.getType() == MachineOperand::MO_ExternalSymbol) { std::string Name(TAI->getGlobalPrefix()); Name += MO.getSymbolName(); FnStubs.insert(Name); - O << "L" << Name << "$stub"; + printSuffixedName(Name, "$stub"); return; } } @@ -377,7 +377,7 @@ if (TM.getRelocationModel() != Reloc::Static) { std::string Name(TAI->getGlobalPrefix()); Name += MO.getSymbolName(); GVStubs.insert(Name); - O << "L" << Name << "$non_lazy_ptr"; + printSuffixedName(Name, "$non_lazy_ptr"); return; } O << TAI->getGlobalPrefix() << MO.getSymbolName(); @@ -392,7 +392,7 @@ if (((GV->isDeclaration() || GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() || GV->hasCommonLinkage()))) { GVStubs.insert(Name); - O << "L" << Name << "$non_lazy_ptr"; + printSuffixedName(Name, "$non_lazy_ptr"); if (GV->hasExternalWeakLinkage()) ExtWeakSymbols.insert(GV); return; @@ -422,7 +422,7 @@ std::string Name = getGlobalLinkName(GV); if (TM.getRelocationModel() != Reloc::Static) { GVStubs.insert(Name); - O << "L" << Name << "$non_lazy_ptr"; + printSuffixedName(Name, "$non_lazy_ptr"); return; } O << Name; @@ -1051,22 +1051,30 @@ SwitchToTextSection("\t.section __TEXT,__picsymbolstub1,symbol_stubs," "pure_instructions,32"); EmitAlignment(4); - O << "L" << *i << "$stub:\n"; + std::string p = *i; + std::string L0p = (p[0]=='\"') ? "\"L0$" + p.substr(1) : "L0$" + p ; + printSuffixedName(p, "$stub"); + O << ":\n"; O << "\t.indirect_symbol " << *i << "\n"; O << "\tmflr r0\n"; - O << "\tbcl 20,31,L0$" << *i << "\n"; - O << "L0$" << *i << ":\n"; + O << "\tbcl 20,31," << L0p << "\n"; + O << L0p << ":\n"; O << "\tmflr r11\n"; - O << "\taddis r11,r11,ha16(L" << *i << "$lazy_ptr-L0$" << *i << ")\n"; + O << "\taddis r11,r11,ha16("; + printSuffixedName(p, "$lazy_ptr"); + O << "-" << L0p << ")\n"; O << "\tmtlr r0\n"; if (isPPC64) - O << "\tldu r12,lo16(L" << *i << "$lazy_ptr-L0$" << *i << ")(r11)\n"; + O << "\tldu r12,lo16("; else - O << "\tlwzu r12,lo16(L" << *i << "$lazy_ptr-L0$" << *i << ")(r11)\n"; + O << "\tlwzu r12,lo16("; + printSuffixedName(p, "$lazy_ptr"); + O << "-" << L0p << ")(r11)\n"; O << "\tmtctr r12\n"; O << "\tbctr\n"; SwitchToDataSection(".lazy_symbol_pointer"); - O << "L" << *i << "$lazy_ptr:\n"; + printSuffixedName(p, "$lazy_ptr"); + O << ":\n"; O << "\t.indirect_symbol " << *i << "\n"; if (isPPC64) O << "\t.quad dyld_stub_binding_helper\n"; @@ -1079,17 +1087,24 @@ SwitchToTextSection("\t.section __TEXT,__symbol_stub1,symbol_stubs," "pure_instructions,16"); EmitAlignment(4); - O << "L" << *i << "$stub:\n"; + std::string p = *i; + printSuffixedName(p, "$stub"); + O << ":\n"; O << "\t.indirect_symbol " << *i << "\n"; - O << "\tlis r11,ha16(L" << *i << "$lazy_ptr)\n"; + O << "\tlis r11,ha16("; + printSuffixedName(p, "$lazy_ptr"); + O << ")\n"; if (isPPC64) - O << "\tldu r12,lo16(L" << *i << "$lazy_ptr)(r11)\n"; + O << "\tldu r12,lo16("; else - O << "\tlwzu r12,lo16(L" << *i << "$lazy_ptr)(r11)\n"; + O << "\tlwzu r12,lo16("; + printSuffixedName(p, "$lazy_ptr"); + O << ")(r11)\n"; O << "\tmtctr r12\n"; O << "\tbctr\n"; SwitchToDataSection(".lazy_symbol_pointer"); - O << "L" << *i << "$lazy_ptr:\n"; + printSuffixedName(p, "$lazy_ptr"); + O << ":\n"; O << "\t.indirect_symbol " << *i << "\n"; if (isPPC64) O << "\t.quad dyld_stub_binding_helper\n"; @@ -1115,7 +1130,9 @@ SwitchToDataSection(".non_lazy_symbol_pointer"); for (std::set::iterator I = GVStubs.begin(), E = GVStubs.end(); I != E; ++I) { - O << "L" << *I << "$non_lazy_ptr:\n"; + std::string p = *I; + printSuffixedName(p, "$non_lazy_ptr"); + O << ":\n"; O << "\t.indirect_symbol " << *I << "\n"; if (isPPC64) O << "\t.quad\t0\n"; Modified: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp?rev=51277&r1=51276&r2=51277&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp Mon May 19 16:38:18 2008 @@ -314,10 +314,10 @@ // Dynamically-resolved functions need a stub for the function. if (isCallOp && isa(GV)) { FnStubs.insert(Name); - O << TAI->getPrivateGlobalPrefix() << Name << "$stub"; + printSuffixedName(Name, "$stub"); } else { GVStubs.insert(Name); - O << TAI->getPrivateGlobalPrefix() << Name << "$non_lazy_ptr"; + printSuffixedName(Name, "$non_lazy_ptr"); } } else { if (GV->hasDLLImportLinkage()) @@ -398,7 +398,7 @@ Name += MO.getSymbolName(); if (isCallOp && printStub(TM, Subtarget)) { FnStubs.insert(Name); - O << TAI->getPrivateGlobalPrefix() << Name << "$stub"; + printSuffixedName(Name, "$stub"); return; } if (!isCallOp) Modified: llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp?rev=51277&r1=51276&r2=51277&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Mon May 19 16:38:18 2008 @@ -385,8 +385,10 @@ i != e; ++i, ++j) { SwitchToDataSection("\t.section __IMPORT,__jump_table,symbol_stubs," "self_modifying_code+pure_instructions,5", 0); - O << "L" << *i << "$stub:\n"; - O << "\t.indirect_symbol " << *i << "\n"; + std::string p = *i; + printSuffixedName(p, "$stub"); + O << ":\n"; + O << "\t.indirect_symbol " << p << "\n"; O << "\thlt ; hlt ; hlt ; hlt ; hlt\n"; } @@ -408,8 +410,10 @@ "\t.section __IMPORT,__pointers,non_lazy_symbol_pointers"); for (std::set::iterator i = GVStubs.begin(), e = GVStubs.end(); i != e; ++i) { - O << "L" << *i << "$non_lazy_ptr:\n"; - O << "\t.indirect_symbol " << *i << "\n"; + std::string p = *i; + printSuffixedName(p, "$non_lazy_ptr"); + O << ":\n"; + O << "\t.indirect_symbol " << p << "\n"; O << "\t.long\t0\n"; } From gohman at apple.com Mon May 19 17:14:15 2008 From: gohman at apple.com (Dan Gohman) Date: Mon, 19 May 2008 22:14:15 -0000 Subject: [llvm-commits] [llvm] r51279 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200805192214.m4JMEFfs024398@zion.cs.uiuc.edu> Author: djg Date: Mon May 19 17:14:15 2008 New Revision: 51279 URL: http://llvm.org/viewvc/llvm-project?rev=51279&view=rev Log: Add a ComputeNumSignBits function for use by instcombine, based on the code in SelectionDAG. Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51279&r1=51278&r2=51279&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon May 19 17:14:15 2008 @@ -378,8 +378,9 @@ Value *EvaluateInDifferentType(Value *V, const Type *Ty, bool isSigned); void ComputeMaskedBits(Value *V, const APInt &Mask, APInt& KnownZero, - APInt& KnownOne, unsigned Depth = 0); + APInt& KnownOne, unsigned Depth = 0) const; bool MaskedValueIsZero(Value *V, const APInt& Mask, unsigned Depth = 0); + unsigned ComputeNumSignBits(Value *Op, unsigned Depth = 0) const; bool CanEvaluateInDifferentType(Value *V, const IntegerType *Ty, unsigned CastOpc, int &NumCastsRemoved); @@ -596,10 +597,10 @@ /// getOpcode - If this is an Instruction or a ConstantExpr, return the /// opcode value. Otherwise return UserOp1. -static unsigned getOpcode(User *U) { - if (Instruction *I = dyn_cast(U)) +static unsigned getOpcode(Value *V) { + if (Instruction *I = dyn_cast(V)) return I->getOpcode(); - if (ConstantExpr *CE = dyn_cast(U)) + if (ConstantExpr *CE = dyn_cast(V)) return CE->getOpcode(); // Use UserOp1 to mean there's no opcode. return Instruction::UserOp1; @@ -666,7 +667,7 @@ /// this won't lose us code quality. void InstCombiner::ComputeMaskedBits(Value *V, const APInt &Mask, APInt& KnownZero, APInt& KnownOne, - unsigned Depth) { + unsigned Depth) const { assert(V && "No Value?"); assert(Depth <= 6 && "Limit Search Depth"); uint32_t BitWidth = Mask.getBitWidth(); @@ -678,6 +679,7 @@ KnownZero.getBitWidth() == BitWidth && KnownOne.getBitWidth() == 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; @@ -2059,6 +2061,148 @@ return MadeChange ? I : 0; } +/// ComputeNumSignBits - Return the number of times the sign bit of the +/// register is replicated into the other bits. We know that at least 1 bit +/// is always equal to the sign bit (itself), but other cases can give us +/// information. For example, immediately after an "ashr X, 2", we know that +/// the top 3 bits are all equal to each other, so we return 3. +/// +unsigned InstCombiner::ComputeNumSignBits(Value *V, unsigned Depth) const{ + const IntegerType *Ty = cast(V->getType()); + unsigned TyBits = Ty->getBitWidth(); + unsigned Tmp, Tmp2; + + if (Depth == 6) + return 1; // Limit search depth. + + User *U = dyn_cast(V); + switch (getOpcode(V)) { + default: break; + case Instruction::SExt: + Tmp = TyBits-cast(U->getOperand(0)->getType())->getBitWidth(); + return ComputeNumSignBits(U->getOperand(0), Depth+1) + Tmp; + + case Instruction::AShr: + Tmp = ComputeNumSignBits(U->getOperand(0), Depth+1); + // SRA X, C -> adds C sign bits. + if (ConstantInt *C = dyn_cast(U->getOperand(1))) { + Tmp += C->getZExtValue(); + if (Tmp > TyBits) Tmp = TyBits; + } + return Tmp; + case Instruction::Shl: + if (ConstantInt *C = dyn_cast(U->getOperand(1))) { + // shl destroys sign bits. + Tmp = ComputeNumSignBits(U->getOperand(0), Depth+1); + if (C->getZExtValue() >= TyBits || // Bad shift. + C->getZExtValue() >= Tmp) break; // Shifted all sign bits out. + return Tmp - C->getZExtValue(); + } + break; + case Instruction::And: + case Instruction::Or: + case Instruction::Xor: // NOT is handled here. + // Logical binary ops preserve the number of sign bits. + Tmp = ComputeNumSignBits(U->getOperand(0), Depth+1); + if (Tmp == 1) return 1; // Early out. + Tmp2 = ComputeNumSignBits(U->getOperand(1), Depth+1); + return std::min(Tmp, Tmp2); + + case Instruction::Select: + Tmp = ComputeNumSignBits(U->getOperand(0), Depth+1); + if (Tmp == 1) return 1; // Early out. + Tmp2 = ComputeNumSignBits(U->getOperand(1), Depth+1); + return std::min(Tmp, Tmp2); + + case Instruction::Add: + // Add can have at most one carry bit. Thus we know that the output + // is, at worst, one more bit than the inputs. + Tmp = ComputeNumSignBits(U->getOperand(0), Depth+1); + if (Tmp == 1) return 1; // Early out. + + // Special case decrementing a value (ADD X, -1): + if (ConstantInt *CRHS = dyn_cast(U->getOperand(0))) + if (CRHS->isAllOnesValue()) { + APInt KnownZero(TyBits, 0), KnownOne(TyBits, 0); + APInt Mask = APInt::getAllOnesValue(TyBits); + ComputeMaskedBits(U->getOperand(0), Mask, KnownZero, KnownOne, Depth+1); + + // If the input is known to be 0 or 1, the output is 0/-1, which is all + // sign bits set. + if ((KnownZero | APInt(TyBits, 1)) == Mask) + return TyBits; + + // If we are subtracting one from a positive number, there is no carry + // out of the result. + if (KnownZero.isNegative()) + return Tmp; + } + + Tmp2 = ComputeNumSignBits(U->getOperand(1), Depth+1); + if (Tmp2 == 1) return 1; + return std::min(Tmp, Tmp2)-1; + break; + + case Instruction::Sub: + Tmp2 = ComputeNumSignBits(U->getOperand(1), Depth+1); + if (Tmp2 == 1) return 1; + + // Handle NEG. + if (ConstantInt *CLHS = dyn_cast(U->getOperand(0))) + if (CLHS->isNullValue()) { + APInt KnownZero(TyBits, 0), KnownOne(TyBits, 0); + APInt Mask = APInt::getAllOnesValue(TyBits); + ComputeMaskedBits(U->getOperand(1), Mask, KnownZero, KnownOne, Depth+1); + // If the input is known to be 0 or 1, the output is 0/-1, which is all + // sign bits set. + if ((KnownZero | APInt(TyBits, 1)) == Mask) + return TyBits; + + // If the input is known to be positive (the sign bit is known clear), + // the output of the NEG has the same number of sign bits as the input. + if (KnownZero.isNegative()) + return Tmp2; + + // Otherwise, we treat this like a SUB. + } + + // Sub can have at most one carry bit. Thus we know that the output + // is, at worst, one more bit than the inputs. + Tmp = ComputeNumSignBits(U->getOperand(0), Depth+1); + if (Tmp == 1) return 1; // Early out. + return std::min(Tmp, Tmp2)-1; + break; + case Instruction::Trunc: + // FIXME: it's tricky to do anything useful for this, but it is an important + // case for targets like X86. + break; + } + + // Finally, if we can prove that the top bits of the result are 0's or 1's, + // use this information. + APInt KnownZero(TyBits, 0), KnownOne(TyBits, 0); + APInt Mask = APInt::getAllOnesValue(TyBits); + ComputeMaskedBits(V, Mask, KnownZero, KnownOne, Depth); + + if (KnownZero.isNegative()) { // sign bit is 0 + Mask = KnownZero; + } else if (KnownOne.isNegative()) { // sign bit is 1; + Mask = KnownOne; + } else { + // Nothing known. + return 1; + } + + // Okay, we know that the sign bit in Mask is set. Use CLZ to determine + // the number of identical bits in the top of the input value. + Mask = ~Mask; + Mask <<= Mask.getBitWidth()-TyBits; + // Return # leading zeros. We use 'min' here in case Val was zero before + // shifting. We don't want to return '64' as for an i32 "0". + return std::min(TyBits, Mask.countLeadingZeros()); +} + + /// AssociativeOpt - Perform an optimization on an associative operator. This /// function is designed to check a chain of associative operators for a /// potential to apply a certain optimization. Since the optimization may be From dpatel at apple.com Mon May 19 17:23:56 2008 From: dpatel at apple.com (Devang Patel) Date: Mon, 19 May 2008 22:23:56 -0000 Subject: [llvm-commits] [llvm] r51280 - in /llvm/trunk: lib/Transforms/Scalar/LoopIndexSplit.cpp test/Transforms/LoopIndexSplit/2008-05-19-IndVar.ll Message-ID: <200805192223.m4JMNukC024755@zion.cs.uiuc.edu> Author: dpatel Date: Mon May 19 17:23:55 2008 New Revision: 51280 URL: http://llvm.org/viewvc/llvm-project?rev=51280&view=rev Log: Do not erase induction variable increment if it is used outside the loop. Added: llvm/trunk/test/Transforms/LoopIndexSplit/2008-05-19-IndVar.ll Modified: llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp Modified: llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp?rev=51280&r1=51279&r2=51280&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopIndexSplit.cpp Mon May 19 17:23:55 2008 @@ -596,11 +596,27 @@ if (isa(I) || I == LTerminator) continue; - if (I == IndVarIncrement) - I->replaceAllUsesWith(ExitValue); - else + if (I == IndVarIncrement) { + // Replace induction variable increment if it is not used outside + // the loop. + bool UsedOutsideLoop = false; + for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); + UI != E; ++UI) { + if (Instruction *Use = dyn_cast(UI)) + if (!L->contains(Use->getParent())) { + UsedOutsideLoop = true; + break; + } + } + if (!UsedOutsideLoop) { + I->replaceAllUsesWith(ExitValue); + I->eraseFromParent(); + } + } + else { I->replaceAllUsesWith(UndefValue::get(I->getType())); - I->eraseFromParent(); + I->eraseFromParent(); + } } LPM->deleteLoopFromQueue(L); Added: llvm/trunk/test/Transforms/LoopIndexSplit/2008-05-19-IndVar.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopIndexSplit/2008-05-19-IndVar.ll?rev=51280&view=auto ============================================================================== --- llvm/trunk/test/Transforms/LoopIndexSplit/2008-05-19-IndVar.ll (added) +++ llvm/trunk/test/Transforms/LoopIndexSplit/2008-05-19-IndVar.ll Mon May 19 17:23:55 2008 @@ -0,0 +1,41 @@ +; RUN: llvm-as < %s | opt -loop-index-split | llvm-dis | grep tmp8 | count 3 +; count 3 = increment + phi + store +;PR2294 + at g_2 = external global i16 ; [#uses=4] + at g_5 = external global i32 ; [#uses=1] + at .str = external constant [4 x i8] ; <[4 x i8]*> [#uses=1] + +declare void @func_1() nounwind + +define i32 @main() nounwind { +entry: + %tmp101.i = load i16* @g_2, align 2 ; [#uses=1] + %tmp112.i = icmp sgt i16 %tmp101.i, 0 ; [#uses=1] + br i1 %tmp112.i, label %bb.preheader.i, label %func_1.exit +bb.preheader.i: ; preds = %entry + %g_2.promoted.i = load i16* @g_2 ; [#uses=1] + br label %bb.i +bb.i: ; preds = %bb6.i, %bb.preheader.i + %g_2.tmp.0.i = phi i16 [ %g_2.promoted.i, %bb.preheader.i ], [ %tmp8.i, %bb6.i ] ; [#uses=2] + %tmp2.i = icmp eq i16 %g_2.tmp.0.i, 0 ; [#uses=1] + br i1 %tmp2.i, label %bb4.i, label %bb6.i +bb4.i: ; preds = %bb.i + %tmp5.i = volatile load i32* @g_5, align 4 ; [#uses=0] + br label %bb6.i +bb6.i: ; preds = %bb4.i, %bb.i + %tmp8.i = add i16 %g_2.tmp.0.i, 1 ; [#uses=3] + %tmp11.i = icmp sgt i16 %tmp8.i, 0 ; [#uses=1] + br i1 %tmp11.i, label %bb.i, label %return.loopexit.i +return.loopexit.i: ; preds = %bb6.i + %tmp8.i.lcssa = phi i16 [ %tmp8.i, %bb6.i ] ; [#uses=1] + store i16 %tmp8.i.lcssa, i16* @g_2 + br label %func_1.exit +func_1.exit: ; preds = %return.loopexit.i, %entry + %tmp1 = load i16* @g_2, align 2 ; [#uses=1] + %tmp12 = sext i16 %tmp1 to i32 ; [#uses=1] + %tmp3 = tail call i32 (i8*, ...)* @printf( i8* getelementptr ([4 x i8]* @.str, i32 0, i32 0), i32 %tmp12 ) nounwind ; [#uses=0] + ret i32 0 +} + +declare i32 @printf(i8*, ...) nounwind + From neil at daikokuya.co.uk Mon May 19 17:47:20 2008 From: neil at daikokuya.co.uk (Neil Booth) Date: Tue, 20 May 2008 07:47:20 +0900 Subject: [llvm-commits] [llvm] r51268 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/sitofp.ll In-Reply-To: <200805192018.m4JKIumk020190@zion.cs.uiuc.edu> References: <200805192018.m4JKIumk020190@zion.cs.uiuc.edu> Message-ID: <20080519224720.GM23450@daikokuya.co.uk> > + // See if the FP constant is top large for the integer. For example, Typo. > + // Okay, now we know that the FP constant fits in the range [SMIN, SMAX] but > + // it may still be fractional. See if it is fractional by casting the FP > + // value to the integer value and back, checking for equality. Don't do this > + // for zero, because -0.0 is not fractional. Perhaps this is better done as an APFloat method if I understand what you're trying to do? It should be able to determine this reasonably easily without introducing allocations / conversions, though I've not thought about it a lot. > // Handle fcmp with constant RHS > if (Constant *RHSC = dyn_cast(Op1)) { > + // If the constant is a nan, see if we can fold the comparison based on it. > + if (ConstantFP *CFP = dyn_cast(RHSC)) { > + if (CFP->getValueAPF().isNaN()) { > + if (FCmpInst::isOrdered(I.getPredicate())) // True if ordered and... > + return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 0)); > + if (FCmpInst::isUnordered(I.getPredicate())) // True if unordered or... > + return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 1)); > + if (FCmpInst::isUnordered(I.getPredicate())) // Undef on unordered. > + return ReplaceInstUsesWith(I, UndefValue::get(Type::Int1Ty)); > + Duplicate test? Neil. From evan.cheng at apple.com Mon May 19 18:32:17 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 19 May 2008 23:32:17 -0000 Subject: [llvm-commits] [llvm] r51283 - /llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp Message-ID: <200805192332.m4JNWHcf026926@zion.cs.uiuc.edu> Author: evancheng Date: Mon May 19 18:32:17 2008 New Revision: 51283 URL: http://llvm.org/viewvc/llvm-project?rev=51283&view=rev Log: runOnMachineFunction should re-set IsPIC because relocation model may have been changed. Modified: llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp Modified: llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp?rev=51283&r1=51282&r2=51283&view=diff ============================================================================== --- llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp (original) +++ llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp Mon May 19 18:32:17 2008 @@ -117,6 +117,7 @@ II = ((X86TargetMachine&)TM).getInstrInfo(); TD = ((X86TargetMachine&)TM).getTargetData(); Is64BitMode = TM.getSubtarget().is64Bit(); + IsPIC = TM.getRelocationModel() == Reloc::PIC_; do { DOUT << "JITTing function '" << MF.getFunction()->getName() << "'\n"; From snaroff at apple.com Mon May 19 19:46:15 2008 From: snaroff at apple.com (Steve Naroff) Date: Tue, 20 May 2008 00:46:15 -0000 Subject: [llvm-commits] [llvm] r51287 - /llvm/trunk/include/llvm/Support/CommandLine.h Message-ID: <200805200046.m4K0kFpR029134@zion.cs.uiuc.edu> Author: snaroff Date: Mon May 19 19:46:15 2008 New Revision: 51287 URL: http://llvm.org/viewvc/llvm-project?rev=51287&view=rev Log: Silence a warning about "*/" outside a comment. Modified: llvm/trunk/include/llvm/Support/CommandLine.h Modified: llvm/trunk/include/llvm/Support/CommandLine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=51287&r1=51286&r2=51287&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/CommandLine.h (original) +++ llvm/trunk/include/llvm/Support/CommandLine.h Mon May 19 19:46:15 2008 @@ -1257,7 +1257,7 @@ class alias : public Option { Option *AliasFor; - virtual bool handleOccurrence(unsigned pos, const char */*ArgName*/, + virtual bool handleOccurrence(unsigned pos, const char * /*ArgName*/, const std::string &Arg) { return AliasFor->handleOccurrence(pos, AliasFor->ArgStr, Arg); } From dag at cray.com Mon May 19 19:52:38 2008 From: dag at cray.com (David Greene) Date: Mon, 19 May 2008 19:52:38 -0500 Subject: [llvm-commits] [llvm] r51157 - in /llvm/trunk: include/llvm/Constants.h include/llvm/Instruction.def include/llvm/Instructions.h include/llvm/Support/InstVisitor.h lib/AsmParser/llvmAsmParser.cpp.cvs lib/AsmParser/llvmAsmParser.h.cvs lib/AsmParser/llvmAsmParser.y lib/AsmParser/llvmAsmParser.y.cvs lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp lib/VMCore/ConstantFold.cpp lib/VMCore/ConstantFold.h lib/VMCore/Constants.cpp lib/VMCore/Instructions.cpp lib/VMCore/Verifier.cpp test/Verifier/2002-11-05-GetelementptrPointers.ll In-Reply-To: <200805162139.41535.baldrick@free.fr> References: <200805151950.m4FJoZLD009863@zion.cs.uiuc.edu> <361CF20A-B678-404B-A4FA-836A13618414@apple.com> <200805162139.41535.baldrick@free.fr> Message-ID: <200805191952.38342.dag@cray.com> On Friday 16 May 2008 14:39, Duncan Sands wrote: > One problem with this scheme is that vector extractelement/insertelement > can take a non-constant index. Is that actually useful? For some architectures, yes, it is quite useful. -Dave From gohman at apple.com Mon May 19 19:54:39 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 May 2008 00:54:39 -0000 Subject: [llvm-commits] [llvm] r51289 - /llvm/trunk/test/CodeGen/X86/vortex-bug.ll Message-ID: <200805200054.m4K0sdQn029402@zion.cs.uiuc.edu> Author: djg Date: Mon May 19 19:54:39 2008 New Revision: 51289 URL: http://llvm.org/viewvc/llvm-project?rev=51289&view=rev Log: Run vortex-bug as x86-64, which is what the original bug was triggered on. Modified: llvm/trunk/test/CodeGen/X86/vortex-bug.ll Modified: llvm/trunk/test/CodeGen/X86/vortex-bug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vortex-bug.ll?rev=51289&r1=51288&r2=51289&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/vortex-bug.ll (original) +++ llvm/trunk/test/CodeGen/X86/vortex-bug.ll Mon May 19 19:54:39 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=x86 +; RUN: llvm-as < %s | llc -march=x86-64 %struct.blktkntype = type { i32, i32 } %struct.fieldstruc = type { [128 x i8], %struct.blktkntype*, i32, i32 } From gohman at apple.com Mon May 19 20:14:05 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 May 2008 01:14:05 -0000 Subject: [llvm-commits] [llvm] r51290 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200805200114.m4K1E5PF029987@zion.cs.uiuc.edu> Author: djg Date: Mon May 19 20:14:05 2008 New Revision: 51290 URL: http://llvm.org/viewvc/llvm-project?rev=51290&view=rev Log: Make AssociativeOpt static. Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51290&r1=51289&r2=51290&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon May 19 20:14:05 2008 @@ -2212,7 +2212,7 @@ /// 'shouldApply' and 'apply' methods. /// template -Instruction *AssociativeOpt(BinaryOperator &Root, const Functor &F) { +static Instruction *AssociativeOpt(BinaryOperator &Root, const Functor &F) { unsigned Opcode = Root.getOpcode(); Value *LHS = Root.getOperand(0); From gohman at apple.com Mon May 19 20:18:44 2008 From: gohman at apple.com (Dan Gohman) Date: Mon, 19 May 2008 18:18:44 -0700 Subject: [llvm-commits] [llvm] r51283 - /llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp In-Reply-To: <200805192332.m4JNWHcf026926@zion.cs.uiuc.edu> References: <200805192332.m4JNWHcf026926@zion.cs.uiuc.edu> Message-ID: Hi Evan, Did you intend to check this into trunk, rather than a tag tree? Dan On May 19, 2008, at 4:32 PM, Evan Cheng wrote: > Author: evancheng > Date: Mon May 19 18:32:17 2008 > New Revision: 51283 > > URL: http://llvm.org/viewvc/llvm-project?rev=51283&view=rev > Log: > runOnMachineFunction should re-set IsPIC because relocation model > may have been changed. > > Modified: > llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp > > Modified: llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/ > X86CodeEmitter.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp?rev=51283&r1=51282&r2=51283&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/ > X86CodeEmitter.cpp (original) > +++ llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/ > X86CodeEmitter.cpp Mon May 19 18:32:17 2008 > @@ -117,6 +117,7 @@ > II = ((X86TargetMachine&)TM).getInstrInfo(); > TD = ((X86TargetMachine&)TM).getTargetData(); > Is64BitMode = TM.getSubtarget().is64Bit(); > + IsPIC = TM.getRelocationModel() == Reloc::PIC_; > > do { > DOUT << "JITTing function '" << MF.getFunction()->getName() << > "'\n"; > > > _______________________________________________ > 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 Mon May 19 20:54:29 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Mon, 19 May 2008 18:54:29 -0700 Subject: [llvm-commits] [llvm] r51283 - /llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp In-Reply-To: References: <200805192332.m4JNWHcf026926@zion.cs.uiuc.edu> Message-ID: <568B226B-5EC4-4F90-93DD-5998AB13E419@apple.com> Into trunk. Silly me. Evan On May 19, 2008, at 6:18 PM, Dan Gohman wrote: > Hi Evan, > > Did you intend to check this into trunk, rather than a tag tree? > > Dan > > On May 19, 2008, at 4:32 PM, Evan Cheng wrote: > >> Author: evancheng >> Date: Mon May 19 18:32:17 2008 >> New Revision: 51283 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=51283&view=rev >> Log: >> runOnMachineFunction should re-set IsPIC because relocation model >> may have been changed. >> >> Modified: >> llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp >> >> Modified: llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/ >> X86CodeEmitter.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp?rev=51283&r1=51282&r2=51283&view=diff >> >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/ >> X86CodeEmitter.cpp (original) >> +++ llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/ >> X86CodeEmitter.cpp Mon May 19 18:32:17 2008 >> @@ -117,6 +117,7 @@ >> II = ((X86TargetMachine&)TM).getInstrInfo(); >> TD = ((X86TargetMachine&)TM).getTargetData(); >> Is64BitMode = TM.getSubtarget().is64Bit(); >> + IsPIC = TM.getRelocationModel() == Reloc::PIC_; >> >> do { >> DOUT << "JITTing function '" << MF.getFunction()->getName() << >> "'\n"; >> >> >> _______________________________________________ >> 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 evan.cheng at apple.com Mon May 19 20:56:59 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 20 May 2008 01:56:59 -0000 Subject: [llvm-commits] [llvm] r51291 - /llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Message-ID: <200805200156.m4K1uxOw031299@zion.cs.uiuc.edu> Author: evancheng Date: Mon May 19 20:56:59 2008 New Revision: 51291 URL: http://llvm.org/viewvc/llvm-project?rev=51291&view=rev Log: runOnMachineFunction should set IsPIC because relocation model may have been changed. Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp?rev=51291&r1=51290&r2=51291&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Mon May 19 20:56:59 2008 @@ -115,6 +115,7 @@ II = TM.getInstrInfo(); TD = TM.getTargetData(); Is64BitMode = TM.getSubtarget().is64Bit(); + IsPIC = TM.getRelocationModel() == Reloc::PIC_; do { DOUT << "JITTing function '" << MF.getFunction()->getName() << "'\n"; From gohman at apple.com Mon May 19 22:01:49 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 May 2008 03:01:49 -0000 Subject: [llvm-commits] [llvm] r51292 - /llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200805200301.m4K31nZn000778@zion.cs.uiuc.edu> Author: djg Date: Mon May 19 22:01:48 2008 New Revision: 51292 URL: http://llvm.org/viewvc/llvm-project?rev=51292&view=rev Log: Refine the fix in r51169 to only apply when the operand val being replaced is a PHI. This prevents it from inserting uses before defs in the case that it isn't a PHI and it depends on other instructions later in the block. This fixes the 447.dealII regression on x86-64. Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=51292&r1=51291&r2=51292&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon May 19 22:01:48 2008 @@ -625,7 +625,7 @@ // value will be pinned to live somewhere after the original computation. // In this case, we have to back off. if (!isUseOfPostIncrementedValue) { - if (NewBasePt) { + if (NewBasePt && isa(OperandValToReplace)) { InsertPt = NewBasePt; ++InsertPt; } else if (Instruction *OpInst = dyn_cast(OperandValToReplace)) { @@ -1412,8 +1412,9 @@ // consider that they may not have been able to end up immediately // next to RewriteOp, because non-PHI instructions may never precede // PHI instructions in a block. In this case, remember where the last - // instruction was inserted so that we can use that point to expand - // the final RewriteExpr. + // instruction was inserted so that if we're replacing a different + // PHI node, we can use the later point to expand the final + // RewriteExpr. Instruction *NewBasePt = dyn_cast(RewriteOp); if (RewriteOp == NewPHI) NewBasePt = 0; From gohman at apple.com Mon May 19 22:20:10 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 May 2008 03:20:10 -0000 Subject: [llvm-commits] [llvm] r51293 - /llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Message-ID: <200805200320.m4K3KAOh001250@zion.cs.uiuc.edu> Author: djg Date: Mon May 19 22:20:09 2008 New Revision: 51293 URL: http://llvm.org/viewvc/llvm-project?rev=51293&view=rev Log: Fix ExecutionEngine's constant code to work properly when structs and arrays will become first-class types. Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=51293&r1=51292&r2=51293&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Mon May 19 22:20:09 2008 @@ -812,35 +812,26 @@ } else if (isa(Init)) { memset(Addr, 0, (size_t)getTargetData()->getABITypeSize(Init->getType())); return; - } else if (Init->getType()->isFirstClassType()) { - GenericValue Val = getConstantValue(Init); - StoreValueToMemory(Val, (GenericValue*)Addr, Init->getType()); - return; - } - - switch (Init->getType()->getTypeID()) { - case Type::ArrayTyID: { - const ConstantArray *CPA = cast(Init); + } else if (const ConstantArray *CPA = dyn_cast(Init)) { unsigned ElementSize = getTargetData()->getABITypeSize(CPA->getType()->getElementType()); for (unsigned i = 0, e = CPA->getNumOperands(); i != e; ++i) InitializeMemory(CPA->getOperand(i), (char*)Addr+i*ElementSize); return; - } - - case Type::StructTyID: { - const ConstantStruct *CPS = cast(Init); + } else if (const ConstantStruct *CPS = dyn_cast(Init)) { const StructLayout *SL = getTargetData()->getStructLayout(cast(CPS->getType())); for (unsigned i = 0, e = CPS->getNumOperands(); i != e; ++i) InitializeMemory(CPS->getOperand(i), (char*)Addr+SL->getElementOffset(i)); return; + } else if (Init->getType()->isFirstClassType()) { + GenericValue Val = getConstantValue(Init); + StoreValueToMemory(Val, (GenericValue*)Addr, Init->getType()); + return; } - default: - cerr << "Bad Type: " << *Init->getType() << "\n"; - assert(0 && "Unknown constant type to initialize memory with!"); - } + cerr << "Bad Type: " << *Init->getType() << "\n"; + assert(0 && "Unknown constant type to initialize memory with!"); } /// EmitGlobals - Emit all of the global variables to memory, storing their From sabre at nondot.org Mon May 19 22:39:39 2008 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 May 2008 03:39:39 -0000 Subject: [llvm-commits] [llvm] r51295 - in /llvm/trunk: include/llvm/Analysis/SparsePropagation.h lib/Analysis/SparsePropagation.cpp Message-ID: <200805200339.m4K3ddfw001815@zion.cs.uiuc.edu> Author: lattner Date: Mon May 19 22:39:39 2008 New Revision: 51295 URL: http://llvm.org/viewvc/llvm-project?rev=51295&view=rev Log: Add a bool to isEdgeFeasible that tells it whether to treat unknown value as undef or untracked. Modified: llvm/trunk/include/llvm/Analysis/SparsePropagation.h llvm/trunk/lib/Analysis/SparsePropagation.cpp Modified: llvm/trunk/include/llvm/Analysis/SparsePropagation.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/SparsePropagation.h?rev=51295&r1=51294&r2=51295&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/SparsePropagation.h (original) +++ llvm/trunk/include/llvm/Analysis/SparsePropagation.h Mon May 19 22:39:39 2008 @@ -147,8 +147,12 @@ LatticeVal getOrInitValueState(Value *V); /// isEdgeFeasible - Return true if the control flow edge from the 'From' - /// basic block to the 'To' basic block is currently feasible... - bool isEdgeFeasible(BasicBlock *From, BasicBlock *To); + /// basic block to the 'To' basic block is currently feasible. If + /// AggressiveUndef is true, then this treats values with unknown lattice + /// values as undefined. This is generally only useful when solving the + /// lattice, not when querying it. + bool isEdgeFeasible(BasicBlock *From, BasicBlock *To, + bool AggressiveUndef = false); private: /// UpdateState - When the state for some instruction is potentially updated, @@ -165,7 +169,8 @@ /// getFeasibleSuccessors - Return a vector of booleans to indicate which /// successors are reachable from a given terminator instruction. - void getFeasibleSuccessors(TerminatorInst &TI, SmallVectorImpl &Succs); + void getFeasibleSuccessors(TerminatorInst &TI, SmallVectorImpl &Succs, + bool AggressiveUndef); void visitInst(Instruction &I); void visitPHINode(PHINode &I); Modified: llvm/trunk/lib/Analysis/SparsePropagation.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/SparsePropagation.cpp?rev=51295&r1=51294&r2=51295&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/SparsePropagation.cpp (original) +++ llvm/trunk/lib/Analysis/SparsePropagation.cpp Mon May 19 22:39:39 2008 @@ -115,7 +115,8 @@ /// getFeasibleSuccessors - Return a vector of booleans to indicate which /// successors are reachable from a given terminator instruction. void SparseSolver::getFeasibleSuccessors(TerminatorInst &TI, - SmallVectorImpl &Succs) { + SmallVectorImpl &Succs, + bool AggressiveUndef) { Succs.resize(TI.getNumSuccessors()); if (TI.getNumSuccessors() == 0) return; @@ -125,7 +126,12 @@ return; } - LatticeVal BCValue = getOrInitValueState(BI->getCondition()); + LatticeVal BCValue; + if (AggressiveUndef) + BCValue = getOrInitValueState(BI->getCondition()); + else + BCValue = getLatticeState(BI->getCondition()); + if (BCValue == LatticeFunc->getOverdefinedVal() || BCValue == LatticeFunc->getUntrackedVal()) { // Overdefined condition variables can branch either way. @@ -157,7 +163,12 @@ } SwitchInst &SI = cast(TI); - LatticeVal SCValue = getOrInitValueState(SI.getCondition()); + LatticeVal SCValue; + if (AggressiveUndef) + SCValue = getOrInitValueState(SI.getCondition()); + else + SCValue = getLatticeState(SI.getCondition()); + if (SCValue == LatticeFunc->getOverdefinedVal() || SCValue == LatticeFunc->getUntrackedVal()) { // All destinations are executable! @@ -182,10 +193,11 @@ /// isEdgeFeasible - Return true if the control flow edge from the 'From' /// basic block to the 'To' basic block is currently feasible... -bool SparseSolver::isEdgeFeasible(BasicBlock *From, BasicBlock *To) { +bool SparseSolver::isEdgeFeasible(BasicBlock *From, BasicBlock *To, + bool AggressiveUndef) { SmallVector SuccFeasible; TerminatorInst *TI = From->getTerminator(); - getFeasibleSuccessors(*TI, SuccFeasible); + getFeasibleSuccessors(*TI, SuccFeasible, AggressiveUndef); for (unsigned i = 0, e = TI->getNumSuccessors(); i != e; ++i) if (TI->getSuccessor(i) == To && SuccFeasible[i]) @@ -196,7 +208,7 @@ void SparseSolver::visitTerminatorInst(TerminatorInst &TI) { SmallVector SuccFeasible; - getFeasibleSuccessors(TI, SuccFeasible); + getFeasibleSuccessors(TI, SuccFeasible, true); BasicBlock *BB = TI.getParent(); @@ -226,7 +238,7 @@ // transfer function to give us the merge of the incoming values. for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) { // If the edge is not yet known to be feasible, it doesn't impact the PHI. - if (!isEdgeFeasible(PN.getIncomingBlock(i), PN.getParent())) + if (!isEdgeFeasible(PN.getIncomingBlock(i), PN.getParent(), true)) continue; // Merge in this value. From sabre at nondot.org Mon May 19 22:50:52 2008 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 May 2008 03:50:52 -0000 Subject: [llvm-commits] [llvm] r51296 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200805200350.m4K3oqSl002131@zion.cs.uiuc.edu> Author: lattner Date: Mon May 19 22:50:52 2008 New Revision: 51296 URL: http://llvm.org/viewvc/llvm-project?rev=51296&view=rev Log: fix two issues Neil noticed, thanks! Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51296&r1=51295&r2=51296&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon May 19 22:50:52 2008 @@ -5435,7 +5435,7 @@ // Now we know that the APFloat is a normal number, zero or inf. - // See if the FP constant is top large for the integer. For example, + // See if the FP constant is too large for the integer. For example, // comparing an i8 to 300.0. unsigned IntWidth = IntTy->getPrimitiveSizeInBits(); @@ -5561,10 +5561,10 @@ if (CFP->getValueAPF().isNaN()) { if (FCmpInst::isOrdered(I.getPredicate())) // True if ordered and... return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 0)); - if (FCmpInst::isUnordered(I.getPredicate())) // True if unordered or... - return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 1)); - if (FCmpInst::isUnordered(I.getPredicate())) // Undef on unordered. - return ReplaceInstUsesWith(I, UndefValue::get(Type::Int1Ty)); + assert(FCmpInst::isUnordered(I.getPredicate()) && + "Comparison must be either ordered or unordered!"); + // True if unordered. + return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 1)); } } From clattner at apple.com Mon May 19 22:52:31 2008 From: clattner at apple.com (Chris Lattner) Date: Mon, 19 May 2008 20:52:31 -0700 Subject: [llvm-commits] [llvm] r51268 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/sitofp.ll In-Reply-To: <20080519224720.GM23450@daikokuya.co.uk> References: <200805192018.m4JKIumk020190@zion.cs.uiuc.edu> <20080519224720.GM23450@daikokuya.co.uk> Message-ID: <3D0E8A93-0EEF-45FA-BC3E-6DEA14190CE9@apple.com> On May 19, 2008, at 3:47 PM, Neil Booth wrote: >> + // See if the FP constant is top large for the integer. For >> example, > > Typo. Fixed. >> // Handle fcmp with constant RHS >> if (Constant *RHSC = dyn_cast(Op1)) { >> + // If the constant is a nan, see if we can fold the comparison >> based on it. >> + if (ConstantFP *CFP = dyn_cast(RHSC)) { >> + if (CFP->getValueAPF().isNaN()) { >> + if (FCmpInst::isOrdered(I.getPredicate())) // True if >> ordered and... >> + return ReplaceInstUsesWith(I, >> ConstantInt::get(Type::Int1Ty, 0)); >> + if (FCmpInst::isUnordered(I.getPredicate())) // True if >> unordered or... >> + return ReplaceInstUsesWith(I, >> ConstantInt::get(Type::Int1Ty, 1)); >> + if (FCmpInst::isUnordered(I.getPredicate())) // Undef on >> unordered. >> + return ReplaceInstUsesWith(I, >> UndefValue::get(Type::Int1Ty)); >> + > > Duplicate test? Fixed. >> + // Okay, now we know that the FP constant fits in the range >> [SMIN, SMAX] but >> + // it may still be fractional. See if it is fractional by >> casting the FP >> + // value to the integer value and back, checking for equality. >> Don't do this >> + // for zero, because -0.0 is not fractional. > > Perhaps this is better done as an APFloat method if I understand what > you're trying to do? It should be able to determine this reasonably > easily without introducing allocations / conversions, though I've not > thought about it a lot. Yeah, I was meaning to ask you about this. What is the best way of telling that an APFloat is fractional? I could do the conversion back and forth and see if it is the same value, but that seems silly. Is there a better way? -Chris From sabre at nondot.org Tue May 20 00:46:14 2008 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 May 2008 05:46:14 -0000 Subject: [llvm-commits] [llvm] r51302 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/add-shrink.ll test/Transforms/InstCombine/sitofp.ll Message-ID: <200805200546.m4K5kEFH019372@zion.cs.uiuc.edu> Author: lattner Date: Tue May 20 00:46:13 2008 New Revision: 51302 URL: http://llvm.org/viewvc/llvm-project?rev=51302&view=rev Log: Teach instcombine 4 new xforms: (add (sext x), cst) --> (sext (add x, cst')) (add (sext x), (sext y)) --> (sext (add int x, y)) (add double (sitofp x), fpcst) --> (sitofp (add int x, intcst)) (add double (sitofp x), (sitofp y)) --> (sitofp (add int x, y)) This generally reduces conversions. For example MiBench/telecomm-gsm gets these simplifications: HACK2: %tmp67.i142.i.i = sext i16 %tmp6.i141.i.i to i32 ; [#uses=1] %tmp23.i139.i.i = sext i16 %tmp2.i138.i.i to i32 ; [#uses=1] %tmp8.i143.i.i = add i32 %tmp67.i142.i.i, %tmp23.i139.i.i ; [#uses=3] HACK2: %tmp67.i121.i.i = sext i16 %tmp6.i120.i.i to i32 ; [#uses=1] %tmp23.i118.i.i = sext i16 %tmp2.i117.i.i to i32 ; [#uses=1] %tmp8.i122.i.i = add i32 %tmp67.i121.i.i, %tmp23.i118.i.i ; [#uses=3] HACK2: %tmp67.i.i190.i = sext i16 %tmp6.i.i189.i to i32 ; [#uses=1] %tmp23.i.i187.i = sext i16 %tmp2.i.i186.i to i32 ; [#uses=1] %tmp8.i.i191.i = add i32 %tmp67.i.i190.i, %tmp23.i.i187.i ; [#uses=3] HACK2: %tmp67.i173.i.i.i = sext i16 %tmp6.i172.i.i.i to i32 ; [#uses=1] %tmp23.i170.i.i.i = sext i16 %tmp2.i169.i.i.i to i32 ; [#uses=1] %tmp8.i174.i.i.i = add i32 %tmp67.i173.i.i.i, %tmp23.i170.i.i.i ; [#uses=3] HACK2: %tmp67.i152.i.i.i = sext i16 %tmp6.i151.i.i.i to i32 ; [#uses=1] %tmp23.i149.i.i.i = sext i16 %tmp2.i148.i.i.i to i32 ; [#uses=1] %tmp8.i153.i.i.i = add i32 %tmp67.i152.i.i.i, %tmp23.i149.i.i.i ; [#uses=3] HACK2: %tmp67.i.i.i.i = sext i16 %tmp6.i.i.i.i to i32 ; [#uses=1] %tmp23.i.i5.i.i = sext i16 %tmp2.i.i.i.i to i32 ; [#uses=1] %tmp8.i.i7.i.i = add i32 %tmp67.i.i.i.i, %tmp23.i.i5.i.i ; [#uses=3] This also fixes a bug in ComputeNumSignBits handling select and makes it more aggressive with and/or. Added: llvm/trunk/test/Transforms/InstCombine/add-shrink.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp llvm/trunk/test/Transforms/InstCombine/sitofp.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51302&r1=51301&r2=51302&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Tue May 20 00:46:13 2008 @@ -241,6 +241,7 @@ Instruction *transformCallThroughTrampoline(CallSite CS); Instruction *transformZExtICmp(ICmpInst *ICI, Instruction &CI, bool DoXform = true); + bool WillNotOverflowSignedAdd(Value *LHS, Value *RHS); public: // InsertNewInstBefore - insert an instruction New before instruction Old @@ -377,7 +378,7 @@ Value *EvaluateInDifferentType(Value *V, const Type *Ty, bool isSigned); - void ComputeMaskedBits(Value *V, const APInt &Mask, APInt& KnownZero, + void ComputeMaskedBits(Value *V, const APInt &Mask, APInt& KnownZero, APInt& KnownOne, unsigned Depth = 0) const; bool MaskedValueIsZero(Value *V, const APInt& Mask, unsigned Depth = 0); unsigned ComputeNumSignBits(Value *Op, unsigned Depth = 0) const; @@ -2100,7 +2101,48 @@ } break; case Instruction::And: + // Logical binary ops preserve the number of sign bits at the worst. + Tmp = ComputeNumSignBits(U->getOperand(0), Depth+1); + if (Tmp != 1) { + Tmp2 = ComputeNumSignBits(U->getOperand(1), Depth+1); + Tmp = std::min(Tmp, Tmp2); + } + + // X & C has sign bits equal to C if C's top bits are zeros. + if (ConstantInt *C = dyn_cast(U->getOperand(1))) { + // See what bits are known to be zero on the output. + APInt KnownZero(TyBits, 0), KnownOne(TyBits, 0); + APInt Mask = APInt::getAllOnesValue(TyBits); + ComputeMaskedBits(U->getOperand(0), Mask, KnownZero, KnownOne, Depth+1); + + KnownZero |= ~C->getValue(); + // If we know that we have leading zeros, we know we have at least that + // many sign bits. + Tmp = std::max(Tmp, KnownZero.countLeadingOnes()); + } + return Tmp; + case Instruction::Or: + // Logical binary ops preserve the number of sign bits at the worst. + Tmp = ComputeNumSignBits(U->getOperand(0), Depth+1); + if (Tmp != 1) { + Tmp2 = ComputeNumSignBits(U->getOperand(1), Depth+1); + Tmp = std::min(Tmp, Tmp2); + } + // X & C has sign bits equal to C if C's top bits are zeros. + if (ConstantInt *C = dyn_cast(U->getOperand(1))) { + // See what bits are known to be one on the output. + APInt KnownZero(TyBits, 0), KnownOne(TyBits, 0); + APInt Mask = APInt::getAllOnesValue(TyBits); + ComputeMaskedBits(U->getOperand(0), Mask, KnownZero, KnownOne, Depth+1); + + KnownOne |= C->getValue(); + // If we know that we have leading ones, we know we have at least that + // many sign bits. + Tmp = std::max(Tmp, KnownOne.countLeadingOnes()); + } + return Tmp; + case Instruction::Xor: // NOT is handled here. // Logical binary ops preserve the number of sign bits. Tmp = ComputeNumSignBits(U->getOperand(0), Depth+1); @@ -2109,9 +2151,9 @@ return std::min(Tmp, Tmp2); case Instruction::Select: - Tmp = ComputeNumSignBits(U->getOperand(0), Depth+1); + Tmp = ComputeNumSignBits(U->getOperand(1), Depth+1); if (Tmp == 1) return 1; // Early out. - Tmp2 = ComputeNumSignBits(U->getOperand(1), Depth+1); + Tmp2 = ComputeNumSignBits(U->getOperand(2), Depth+1); return std::min(Tmp, Tmp2); case Instruction::Add: @@ -2506,6 +2548,32 @@ return false; } +/// WillNotOverflowSignedAdd - Return true if we can prove that: +/// (sext (add LHS, RHS)) === (add (sext LHS), (sext RHS)) +/// This basically requires proving that the add in the original type would not +/// overflow to change the sign bit or have a carry out. +bool InstCombiner::WillNotOverflowSignedAdd(Value *LHS, Value *RHS) { + // There are different heuristics we can use for this. Here are some simple + // ones. + + // Add has the property that adding any two 2's complement numbers can only + // have one carry bit which can change a sign. As such, if LHS and RHS each + // have at least two sign bits, we know that the addition of the two values will + // sign extend fine. + if (ComputeNumSignBits(LHS) > 1 && ComputeNumSignBits(RHS) > 1) + return true; + + + // If one of the operands only has one non-zero bit, and if the other operand + // has a known-zero bit in a more significant place than it (not including the + // sign bit) the ripple may go up to and fill the zero, but won't change the + // sign. For example, (X & ~4) + 1. + + // TODO: Implement. + + return false; +} + Instruction *InstCombiner::visitAdd(BinaryOperator &I) { bool Changed = SimplifyCommutative(I); @@ -2781,6 +2849,84 @@ if (CFP->getValueAPF().isPosZero() && CannotBeNegativeZero(LHS)) return ReplaceInstUsesWith(I, LHS); + // Check for (add (sext x), y), see if we can merge this into an + // integer add followed by a sext. + if (SExtInst *LHSConv = dyn_cast(LHS)) { + // (add (sext x), cst) --> (sext (add x, cst')) + if (ConstantInt *RHSC = dyn_cast(RHS)) { + Constant *CI = + ConstantExpr::getTrunc(RHSC, LHSConv->getOperand(0)->getType()); + if (LHSConv->hasOneUse() && + ConstantExpr::getSExt(CI, I.getType()) == RHSC && + WillNotOverflowSignedAdd(LHSConv->getOperand(0), CI)) { + // Insert the new, smaller add. + Instruction *NewAdd = BinaryOperator::CreateAdd(LHSConv->getOperand(0), + CI, "addconv"); + InsertNewInstBefore(NewAdd, I); + return new SExtInst(NewAdd, I.getType()); + } + } + + // (add (sext x), (sext y)) --> (sext (add int x, y)) + if (SExtInst *RHSConv = dyn_cast(RHS)) { + // Only do this if x/y have the same type, if at last one of them has a + // single use (so we don't increase the number of sexts), and if the + // integer add will not overflow. + if (LHSConv->getOperand(0)->getType()==RHSConv->getOperand(0)->getType()&& + (LHSConv->hasOneUse() || RHSConv->hasOneUse()) && + WillNotOverflowSignedAdd(LHSConv->getOperand(0), + RHSConv->getOperand(0))) { + // Insert the new integer add. + Instruction *NewAdd = BinaryOperator::CreateAdd(LHSConv->getOperand(0), + RHSConv->getOperand(0), + "addconv"); + InsertNewInstBefore(NewAdd, I); + return new SExtInst(NewAdd, I.getType()); + } + } + } + + // Check for (add double (sitofp x), y), see if we can merge this into an + // integer add followed by a promotion. + if (SIToFPInst *LHSConv = dyn_cast(LHS)) { + // (add double (sitofp x), fpcst) --> (sitofp (add int x, intcst)) + // ... if the constant fits in the integer value. This is useful for things + // like (double)(x & 1234) + 4.0 -> (double)((X & 1234)+4) which no longer + // requires a constant pool load, and generally allows the add to be better + // instcombined. + if (ConstantFP *CFP = dyn_cast(RHS)) { + Constant *CI = + ConstantExpr::getFPToSI(CFP, LHSConv->getOperand(0)->getType()); + if (LHSConv->hasOneUse() && + ConstantExpr::getSIToFP(CI, I.getType()) == CFP && + WillNotOverflowSignedAdd(LHSConv->getOperand(0), CI)) { + // Insert the new integer add. + Instruction *NewAdd = BinaryOperator::CreateAdd(LHSConv->getOperand(0), + CI, "addconv"); + InsertNewInstBefore(NewAdd, I); + return new SIToFPInst(NewAdd, I.getType()); + } + } + + // (add double (sitofp x), (sitofp y)) --> (sitofp (add int x, y)) + if (SIToFPInst *RHSConv = dyn_cast(RHS)) { + // Only do this if x/y have the same type, if at last one of them has a + // single use (so we don't increase the number of int->fp conversions), + // and if the integer add will not overflow. + if (LHSConv->getOperand(0)->getType()==RHSConv->getOperand(0)->getType()&& + (LHSConv->hasOneUse() || RHSConv->hasOneUse()) && + WillNotOverflowSignedAdd(LHSConv->getOperand(0), + RHSConv->getOperand(0))) { + // Insert the new integer add. + Instruction *NewAdd = BinaryOperator::CreateAdd(LHSConv->getOperand(0), + RHSConv->getOperand(0), + "addconv"); + InsertNewInstBefore(NewAdd, I); + return new SIToFPInst(NewAdd, I.getType()); + } + } + } + return Changed ? &I : 0; } Added: llvm/trunk/test/Transforms/InstCombine/add-shrink.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/add-shrink.ll?rev=51302&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/add-shrink.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/add-shrink.ll Tue May 20 00:46:13 2008 @@ -0,0 +1,14 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {add i32} +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep sext | count 1 + +; Should only have one sext and the add should be i32 instead of i64. + +define i64 @test1(i32 %A) { + %B = ashr i32 %A, 7 ; [#uses=1] + %C = ashr i32 %A, 9 ; [#uses=1] + %D = sext i32 %B to i64 ; [#uses=1] + %E = sext i32 %C to i64 ; [#uses=1] + %F = add i64 %D, %E ; [#uses=1] + ret i64 %F +} + Modified: llvm/trunk/test/Transforms/InstCombine/sitofp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/sitofp.ll?rev=51302&r1=51301&r2=51302&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/sitofp.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/sitofp.ll Tue May 20 00:46:13 2008 @@ -31,3 +31,13 @@ ret i32 %E } +define i32 @test6(i32 %A) { + %B = and i32 %A, 7 ; [#uses=1] + %C = and i32 %A, 32 ; [#uses=1] + %D = sitofp i32 %B to double ; [#uses=1] + %E = sitofp i32 %C to double ; [#uses=1] + %F = add double %D, %E ; [#uses=1] + %G = fptosi double %F to i32 ; [#uses=1] + ret i32 %G +} + From isanbard at gmail.com Tue May 20 01:27:03 2008 From: isanbard at gmail.com (Bill Wendling) Date: Mon, 19 May 2008 23:27:03 -0700 Subject: [llvm-commits] [llvm] r51287 - /llvm/trunk/include/llvm/Support/CommandLine.h In-Reply-To: <200805200046.m4K0kFpR029134@zion.cs.uiuc.edu> References: <200805200046.m4K0kFpR029134@zion.cs.uiuc.edu> Message-ID: <7E9E7866-7284-4DB4-8DCF-F7DA82811955@gmail.com> Doh! Thanks, Steve! -bw On May 19, 2008, at 5:46 PM, Steve Naroff wrote: > Author: snaroff > Date: Mon May 19 19:46:15 2008 > New Revision: 51287 > > URL: http://llvm.org/viewvc/llvm-project?rev=51287&view=rev > Log: > Silence a warning about "*/" outside a comment. > > Modified: > llvm/trunk/include/llvm/Support/CommandLine.h > > Modified: llvm/trunk/include/llvm/Support/CommandLine.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=51287&r1=51286&r2=51287&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/include/llvm/Support/CommandLine.h (original) > +++ llvm/trunk/include/llvm/Support/CommandLine.h Mon May 19 > 19:46:15 2008 > @@ -1257,7 +1257,7 @@ > > class alias : public Option { > Option *AliasFor; > - virtual bool handleOccurrence(unsigned pos, const char */ > *ArgName*/, > + virtual bool handleOccurrence(unsigned pos, const char * / > *ArgName*/, > const std::string &Arg) { > return AliasFor->handleOccurrence(pos, AliasFor->ArgStr, Arg); > } > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From mikael.lepisto at tut.fi Tue May 20 01:45:45 2008 From: mikael.lepisto at tut.fi (=?ISO-8859-1?Q?Mikael_Lepist=F6?=) Date: Tue, 20 May 2008 09:45:45 +0300 Subject: [llvm-commits] Patch for llvm-ar, llvm-ranlib creating files with wrong? file access rights In-Reply-To: References: <482C091B.5040404@tut.fi> <69E4F7F5-7B48-4F88-9497-F253AAF27D50@mac.com> <200805152240.26561.baldrick@free.fr> <959F4EE4-693F-469C-A174-C01D65735C3F@tut.fi> Message-ID: <8FE42800-1DBD-480D-9BC7-3CC3734575B9@tut.fi> On May 16, 2008, at 8:57, Owen Anderson wrote: > > On May 16, 2008, at 12:46 AM, Mikael Lepist? wrote: >>> >>> On unix machines the usual thing is to pass ugo+rw to open, and it >>> will be masked with the current umask to produce (usually) something >>> tighter like rw-r--r--. Dunno how this should be done in LLVM. >> >> That is how the patch worked at least on my linux box. Archives were >> still created with -rw-r--r-- rights. Actually baldrick instructed to >> use gou+rw rights on irc channel :) >> > > I defer to his greater knowledge then. > I don't know what is the policy for applying patches to trunk, but I was wondering if this patch is waiting to be applied or was it rejected or forgotten? > P.S. Duncan is baldrick. ;-) good to know :) - mikael From sabre at nondot.org Tue May 20 01:48:12 2008 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 May 2008 01:48:12 -0500 Subject: [llvm-commits] CVS: llvm-www/pubs/2008-05-17-BSDCan-LLVMIntro.html 2008-05-17-BSDCan-LLVMIntro.pdf index.html Message-ID: <200805200648.m4K6mCWH022096@zion.cs.uiuc.edu> Changes in directory llvm-www/pubs: 2008-05-17-BSDCan-LLVMIntro.html added (r1.1) 2008-05-17-BSDCan-LLVMIntro.pdf added (r1.1) index.html updated: 1.75 -> 1.76 --- Log message: Add BSDCan talk. --- Diffs of the changes: (+42 -0) 2008-05-17-BSDCan-LLVMIntro.html | 38 ++++++++++++++++++++++++++++++++++++++ 2008-05-17-BSDCan-LLVMIntro.pdf | 0 index.html | 4 ++++ 3 files changed, 42 insertions(+) Index: llvm-www/pubs/2008-05-17-BSDCan-LLVMIntro.html diff -c /dev/null llvm-www/pubs/2008-05-17-BSDCan-LLVMIntro.html:1.1 *** /dev/null Tue May 20 01:47:32 2008 --- llvm-www/pubs/2008-05-17-BSDCan-LLVMIntro.html Tue May 20 01:47:22 2008 *************** *** 0 **** --- 1,38 ---- + + + + + + LLVM and Clang: Next Generation Compiler Technology + + + +
+ LLVM and Clang: Next Generation Compiler Technology +
+ + +

Abstract:

+
+

+ This talk gives a gentle introduction to LLVM and Clang, particularly suited + for those without a deep compiler hacker background. +

+ +
+ +

Published:

+
+ "LLVM and Clang: Next Generation Compiler Technology", Chris Lattner,
+ BSDCan 2008: The BSD Conference, Ottawa, Canada, May 2008.
+
+ +

Download Presentation:

+ + + + Index: llvm-www/pubs/2008-05-17-BSDCan-LLVMIntro.pdf Index: llvm-www/pubs/index.html diff -u llvm-www/pubs/index.html:1.75 llvm-www/pubs/index.html:1.76 --- llvm-www/pubs/index.html:1.75 Mon May 12 10:51:57 2008 +++ llvm-www/pubs/index.html Tue May 20 01:47:22 2008 @@ -13,6 +13,10 @@ Proc. ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation (PLDI'08), June, 2008 +
  • "LLVM and Clang: Next Generation Compiler Technology"
    +Chris Lattner
    +BSDCan 2008: The BSD Conference, Ottawa, Canada, May 2008.
  • +
  • "Cycle-approximate Retargetable Performance Estimation at the Transaction Level"
    Y. Hwang, S. Abdi, and D. Gajski
    From overminddl1 at gmail.com Tue May 20 02:13:24 2008 From: overminddl1 at gmail.com (OvermindDL1) Date: Tue, 20 May 2008 01:13:24 -0600 Subject: [llvm-commits] Fix to Visual Studio 2005 Solution (AsmParser.vcproj) Message-ID: <3f49a9f40805200013s486b6edcm833a44c39453372f@mail.gmail.com> The two generated files in the AsmParser.vcproj are pointing to the wrong directory, this is the patch to fix it (also attached). --- AsmParser.vcproj (revision 51302) +++ AsmParser.vcproj (working copy) @@ -380,11 +380,11 @@ Name="Generated Files" > -------------- next part -------------- A non-text attachment was scrubbed... Name: AsmParser.vcproj.patch Type: application/octet-stream Size: 403 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20080520/3f166c79/attachment.obj From matthijs at stdin.nl Tue May 20 02:26:46 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Tue, 20 May 2008 07:26:46 -0000 Subject: [llvm-commits] [llvm] r51303 - /llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Message-ID: <200805200726.m4K7Ql9j024081@zion.cs.uiuc.edu> Author: matthijs Date: Tue May 20 02:26:45 2008 New Revision: 51303 URL: http://llvm.org/viewvc/llvm-project?rev=51303&view=rev Log: Fix typo. Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=51303&r1=51302&r2=51303&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Tue May 20 02:26:45 2008 @@ -158,7 +158,7 @@ /// ThreadBlock - If there are any predecessors whose control can be threaded /// through to a successor, transform them now. bool JumpThreading::ThreadBlock(BasicBlock *BB) { - // See if this block ends with a branch of switch. If so, see if the + // See if this block ends with a branch or switch. If so, see if the // condition is a phi node. If so, and if an entry of the phi node is a // constant, we can thread the block. Value *Condition; From evan.cheng at apple.com Tue May 20 03:10:37 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 20 May 2008 08:10:37 -0000 Subject: [llvm-commits] [llvm] r51305 - in /llvm/trunk: lib/CodeGen/LiveIntervalAnalysis.cpp test/CodeGen/ARM/2008-05-19-LiveIntervalsBug.ll Message-ID: <200805200810.m4K8Ab0A001185@zion.cs.uiuc.edu> Author: evancheng Date: Tue May 20 03:10:37 2008 New Revision: 51305 URL: http://llvm.org/viewvc/llvm-project?rev=51305&view=rev Log: Don't spill dead def. Added: llvm/trunk/test/CodeGen/ARM/2008-05-19-LiveIntervalsBug.ll Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=51305&r1=51304&r2=51305&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original) +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Tue May 20 03:10:37 2008 @@ -1562,7 +1562,9 @@ if (!Folded) { LiveRange *LR = &nI.ranges[nI.ranges.size()-1]; bool isKill = LR->end == getStoreIndex(index); - vrm.addSpillPoint(VReg, isKill, MI); + if (!MI->registerDefIsDead(nI.reg)) + // No need to spill a dead def. + vrm.addSpillPoint(VReg, isKill, MI); if (isKill) AddedKill.insert(&nI); } Added: llvm/trunk/test/CodeGen/ARM/2008-05-19-LiveIntervalsBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2008-05-19-LiveIntervalsBug.ll?rev=51305&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/ARM/2008-05-19-LiveIntervalsBug.ll (added) +++ llvm/trunk/test/CodeGen/ARM/2008-05-19-LiveIntervalsBug.ll Tue May 20 03:10:37 2008 @@ -0,0 +1,55 @@ +; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin + + %struct.BiContextType = type { i16, i8, i32 } + %struct.Bitstream = type { i32, i32, i8, i32, i32, i8, i8, i32, i32, i8*, i32 } + %struct.DataPartition = type { %struct.Bitstream*, %struct.EncodingEnvironment, %struct.EncodingEnvironment } + %struct.DecRefPicMarking_t = type { i32, i32, i32, i32, i32, %struct.DecRefPicMarking_t* } + %struct.EncodingEnvironment = type { i32, i32, i32, i32, i32, i8*, i32*, i32, i32 } + %struct.ImageParameters = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8**, i8**, i32, i32***, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [9 x [16 x [16 x i16]]], [5 x [16 x [16 x i16]]], [9 x [8 x [8 x i16]]], [2 x [4 x [16 x [16 x i16]]]], [16 x [16 x i16]], [16 x [16 x i32]], i32****, i32***, i32***, i32***, i32****, i32****, %struct.Picture*, %struct.Slice*, %struct.Macroblock*, i32*, i32*, i32, i32, i32, i32, [4 x [4 x i32]], i32, i32, i32, i32, i32, double, i32, i32, i32, i32, i16******, i16******, i16******, i16******, [15 x i16], i32, i32, i32, i32, i32, i32, i32, i32, [6 x [32 x i32]], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [1 x i32], i32, i32, [2 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.DecRefPicMarking_t*, i32, i32, i32, i32, i32, i32, i32, i32, i3! 2, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double**, double***, i32***, double**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [3 x [2 x i32]], [2 x i32], i32, i32, i16, i32, i32, i32, i32, i32 } + %struct.Macroblock = type { i32, i32, i32, [2 x i32], i32, [8 x i32], %struct.Macroblock*, %struct.Macroblock*, i32, [2 x [4 x [4 x [2 x i32]]]], [16 x i8], [16 x i8], i32, i64, [4 x i32], [4 x i32], i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, double, i32, i32, i32, i32, i32, i32, i32, i32, i32 } + %struct.MotionInfoContexts = type { [3 x [11 x %struct.BiContextType]], [2 x [9 x %struct.BiContextType]], [2 x [10 x %struct.BiContextType]], [2 x [6 x %struct.BiContextType]], [4 x %struct.BiContextType], [4 x %struct.BiContextType], [3 x %struct.BiContextType] } + %struct.Picture = type { i32, i32, [100 x %struct.Slice*], i32, float, float, float } + %struct.Slice = type { i32, i32, i32, i32, i32, i32, %struct.DataPartition*, %struct.MotionInfoContexts*, %struct.TextureInfoContexts*, i32, i32*, i32*, i32*, i32, i32*, i32*, i32*, i32 (i32)*, [3 x [2 x i32]] } + %struct.TextureInfoContexts = type { [2 x %struct.BiContextType], [4 x %struct.BiContextType], [3 x [4 x %struct.BiContextType]], [10 x [4 x %struct.BiContextType]], [10 x [15 x %struct.BiContextType]], [10 x [15 x %struct.BiContextType]], [10 x [5 x %struct.BiContextType]], [10 x [5 x %struct.BiContextType]], [10 x [15 x %struct.BiContextType]], [10 x [15 x %struct.BiContextType]] } + at images = external global %struct.ImageParameters ; <%struct.ImageParameters*> [#uses=2] + +declare i8* @calloc(i32, i32) + +define fastcc void @init_global_buffers() nounwind { +entry: + %tmp50.i.i = mul i32 0, 0 ; [#uses=2] + br i1 false, label %init_orig_buffers.exit, label %cond_true.i29 + +cond_true.i29: ; preds = %entry + %tmp17.i = load i32* getelementptr (%struct.ImageParameters* @images, i32 0, i32 20), align 8 ; [#uses=1] + %tmp20.i27 = load i32* getelementptr (%struct.ImageParameters* @images, i32 0, i32 16), align 8 ; [#uses=1] + %tmp8.i.i = select i1 false, i32 1, i32 0 ; [#uses=1] + br label %bb.i8.us.i + +bb.i8.us.i: ; preds = %get_mem2Dpel.exit.i.us.i, %cond_true.i29 + %j.04.i.us.i = phi i32 [ %indvar.next39.i, %get_mem2Dpel.exit.i.us.i ], [ 0, %cond_true.i29 ] ; [#uses=2] + %tmp13.i.us.i = getelementptr i16*** null, i32 %j.04.i.us.i ; [#uses=0] + %tmp15.i.i.us.i = tail call i8* @calloc( i32 0, i32 2 ) ; [#uses=0] + store i16* null, i16** null, align 4 + br label %bb.i.i.us.i + +get_mem2Dpel.exit.i.us.i: ; preds = %bb.i.i.us.i + %indvar.next39.i = add i32 %j.04.i.us.i, 1 ; [#uses=2] + %exitcond40.i = icmp eq i32 %indvar.next39.i, 2 ; [#uses=1] + br i1 %exitcond40.i, label %get_mem3Dpel.exit.split.i, label %bb.i8.us.i + +bb.i.i.us.i: ; preds = %bb.i.i.us.i, %bb.i8.us.i + %exitcond.i = icmp eq i32 0, %tmp8.i.i ; [#uses=1] + br i1 %exitcond.i, label %get_mem2Dpel.exit.i.us.i, label %bb.i.i.us.i + +get_mem3Dpel.exit.split.i: ; preds = %get_mem2Dpel.exit.i.us.i + %tmp30.i.i = shl i32 %tmp17.i, 2 ; [#uses=1] + %tmp31.i.i = mul i32 %tmp30.i.i, %tmp20.i27 ; [#uses=1] + %tmp23.i31 = add i32 %tmp31.i.i, %tmp50.i.i ; [#uses=1] + br label %init_orig_buffers.exit + +init_orig_buffers.exit: ; preds = %get_mem3Dpel.exit.split.i, %entry + %memory_size.0.i = phi i32 [ %tmp23.i31, %get_mem3Dpel.exit.split.i ], [ %tmp50.i.i, %entry ] ; [#uses=1] + %tmp41 = add i32 0, %memory_size.0.i ; [#uses=0] + unreachable +} From evan.cheng at apple.com Tue May 20 03:13:21 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 20 May 2008 08:13:21 -0000 Subject: [llvm-commits] [llvm] r51306 - in /llvm/trunk: lib/CodeGen/VirtRegMap.cpp test/CodeGen/ARM/2008-05-19-ScavengerAssert.ll Message-ID: <200805200813.m4K8DLe7001283@zion.cs.uiuc.edu> Author: evancheng Date: Tue May 20 03:13:21 2008 New Revision: 51306 URL: http://llvm.org/viewvc/llvm-project?rev=51306&view=rev Log: More local spiller complexity! If local spiller optimization turns some instruction into an identity copy, it will be removed. If the output register happens to be dead (and source is obviously killed), transfer the kill / dead information to last use / def in the same MBB. Added: llvm/trunk/test/CodeGen/ARM/2008-05-19-ScavengerAssert.ll Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/VirtRegMap.cpp?rev=51306&r1=51305&r2=51306&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/VirtRegMap.cpp (original) +++ llvm/trunk/lib/CodeGen/VirtRegMap.cpp Tue May 20 03:13:21 2008 @@ -302,6 +302,7 @@ MachineRegisterInfo *RegInfo; const TargetRegisterInfo *TRI; const TargetInstrInfo *TII; + DenseMap DistanceMap; public: bool runOnMachineFunction(MachineFunction &MF, VirtRegMap &VRM) { RegInfo = &MF.getRegInfo(); @@ -333,6 +334,9 @@ return true; } private: + void TransferDeadness(MachineBasicBlock *MBB, unsigned CurDist, + unsigned Reg, BitVector &RegKills, + std::vector &KillOps); bool PrepForUnfoldOpti(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MII, std::vector &MaybeDeadStores, @@ -943,6 +947,7 @@ VRM.assignVirt2Phys(UnfoldVR, UnfoldPR); VRM.virtFolded(VirtReg, FoldedMI, VirtRegMap::isRef); MII = MBB.insert(MII, FoldedMI); + InvalidateKills(MI, RegKills, KillOps); VRM.RemoveMachineInstrFromMaps(&MI); MBB.erase(&MI); return true; @@ -1026,6 +1031,49 @@ ++NumStores; } +/// TransferDeadness - A identity copy definition is dead and it's being +/// removed. Find the last def or use and mark it as dead / kill. +void LocalSpiller::TransferDeadness(MachineBasicBlock *MBB, unsigned CurDist, + unsigned Reg, BitVector &RegKills, + std::vector &KillOps) { + int LastUDDist = -1; + MachineInstr *LastUDMI = NULL; + for (MachineRegisterInfo::reg_iterator RI = RegInfo->reg_begin(Reg), + RE = RegInfo->reg_end(); RI != RE; ++RI) { + MachineInstr *UDMI = &*RI; + if (UDMI->getParent() != MBB) + continue; + DenseMap::iterator DI = DistanceMap.find(UDMI); + if (DI == DistanceMap.end() || DI->second > CurDist) + continue; + if ((int)DI->second < LastUDDist) + continue; + LastUDDist = DI->second; + LastUDMI = UDMI; + } + + if (LastUDMI) { + const TargetInstrDesc &TID = LastUDMI->getDesc(); + MachineOperand *LastUD = NULL; + for (unsigned i = 0, e = LastUDMI->getNumOperands(); i != e; ++i) { + MachineOperand &MO = LastUDMI->getOperand(i); + if (!MO.isRegister() || MO.getReg() != Reg) + continue; + if (!LastUD || (LastUD->isUse() && MO.isDef())) + LastUD = &MO; + if (TID.getOperandConstraint(i, TOI::TIED_TO) != -1) + return; + } + if (LastUD->isDef()) + LastUD->setIsDead(); + else { + LastUD->setIsKill(); + RegKills.set(Reg); + KillOps[Reg] = LastUD; + } + } +} + /// rewriteMBB - Keep track of which spills are available even after the /// register allocator is done with them. If possible, avid reloading vregs. void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) { @@ -1054,6 +1102,8 @@ std::vector KillOps; KillOps.resize(TRI->getNumRegs(), NULL); + unsigned Dist = 0; + DistanceMap.clear(); for (MachineBasicBlock::iterator MII = MBB.begin(), E = MBB.end(); MII != E; ) { MachineBasicBlock::iterator NextMII = MII; ++NextMII; @@ -1431,6 +1481,7 @@ InvalidateKill(InReg, RegKills, KillOps); } + InvalidateKills(MI, RegKills, KillOps); VRM.RemoveMachineInstrFromMaps(&MI); MBB.erase(&MI); Erased = true; @@ -1442,6 +1493,7 @@ if (PhysReg && TII->unfoldMemoryOperand(MF, &MI, PhysReg, false, false, NewMIs)) { MBB.insert(MII, NewMIs[0]); + InvalidateKills(MI, RegKills, KillOps); VRM.RemoveMachineInstrFromMaps(&MI); MBB.erase(&MI); Erased = true; @@ -1476,6 +1528,7 @@ NewStore = NewMIs[1]; MBB.insert(MII, NewStore); VRM.addSpillSlotUse(SS, NewStore); + InvalidateKills(MI, RegKills, KillOps); VRM.RemoveMachineInstrFromMaps(&MI); MBB.erase(&MI); Erased = true; @@ -1549,6 +1602,13 @@ if (TII->isMoveInstr(MI, Src, Dst) && Src == Dst) { ++NumDCE; DOUT << "Removing now-noop copy: " << MI; + SmallVector KillRegs; + InvalidateKills(MI, RegKills, KillOps, &KillRegs); + if (MO.isDead() && !KillRegs.empty()) { + assert(KillRegs[0] == Dst); + // Last def is now dead. + TransferDeadness(&MBB, Dist, Src, RegKills, KillOps); + } VRM.RemoveMachineInstrFromMaps(&MI); MBB.erase(&MI); Erased = true; @@ -1626,6 +1686,7 @@ if (TII->isMoveInstr(MI, Src, Dst) && Src == Dst) { ++NumDCE; DOUT << "Removing now-noop copy: " << MI; + InvalidateKills(MI, RegKills, KillOps); VRM.RemoveMachineInstrFromMaps(&MI); MBB.erase(&MI); Erased = true; @@ -1636,6 +1697,7 @@ } } ProcessNextInst: + DistanceMap.insert(std::make_pair(&MI, Dist++)); if (!Erased && !BackTracked) { for (MachineBasicBlock::iterator II = MI; II != NextMII; ++II) UpdateKills(*II, RegKills, KillOps); Added: llvm/trunk/test/CodeGen/ARM/2008-05-19-ScavengerAssert.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/2008-05-19-ScavengerAssert.ll?rev=51306&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/ARM/2008-05-19-ScavengerAssert.ll (added) +++ llvm/trunk/test/CodeGen/ARM/2008-05-19-ScavengerAssert.ll Tue May 20 03:13:21 2008 @@ -0,0 +1,22 @@ +; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin + + %struct.Decoders = type { i32**, i16***, i16****, i16***, i16**, i8**, i8** } + at decoders = external global %struct.Decoders ; <%struct.Decoders*> [#uses=1] + +declare i8* @calloc(i32, i32) + +declare fastcc i32 @get_mem2Dint(i32***, i32, i32) + +define fastcc void @init_global_buffers() nounwind { +entry: + %tmp151 = tail call fastcc i32 @get_mem2Dint( i32*** getelementptr (%struct.Decoders* @decoders, i32 0, i32 0), i32 16, i32 16 ) ; [#uses=1] + %tmp158 = tail call i8* @calloc( i32 0, i32 4 ) ; [#uses=0] + br i1 false, label %cond_true166, label %bb190.preheader + +bb190.preheader: ; preds = %entry + %memory_size.3555 = add i32 0, %tmp151 ; [#uses=0] + unreachable + +cond_true166: ; preds = %entry + unreachable +} From matthijs at stdin.nl Tue May 20 05:29:01 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Tue, 20 May 2008 10:29:01 -0000 Subject: [llvm-commits] [llvm] r51313 - /llvm/trunk/docs/TestingGuide.html Message-ID: <200805201029.m4KAT2RD005910@zion.cs.uiuc.edu> Author: matthijs Date: Tue May 20 05:28:55 2008 New Revision: 51313 URL: http://llvm.org/viewvc/llvm-project?rev=51313&view=rev Log: Clarify the testing documentation a bit and solve two HTML validator warnings. Modified: llvm/trunk/docs/TestingGuide.html Modified: llvm/trunk/docs/TestingGuide.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/TestingGuide.html?rev=51313&r1=51312&r2=51313&view=diff ============================================================================== --- llvm/trunk/docs/TestingGuide.html (original) +++ llvm/trunk/docs/TestingGuide.html Tue May 20 05:28:55 2008 @@ -157,6 +157,8 @@ % cd projects/llvm-test % gmake +

    where $LLVM_GCC_DIR is the directory where you installed +llvm-gcc, not it's src or obj dir.

    @@ -703,18 +705,24 @@ % cd $LLVM_OBJ_ROOT ; $LLVM_SRC_ROOT/configure --with-llvmgccdir=$LLVM_GCC_DIR -
  • gmake
  • +

    Note that that $LLVM_GCC_DIR is the directory where you + installed llvm-gcc, not its src or obj directory.

    + + +
  • Change back to the llvm/projects/llvm-test directory you created before + and run gmake (or just "make" on systems where GNU make is + the default, such as linux.

  • Note that the second and third steps only need to be done once. After you have the suite checked out and configured, you don't need to do it again (unless -the test code or configure script changes). $LLVM_GCC_DIR is the path to the LLVM -C/C++ FrontEnd

    +the test code or configure script changes).

    To make a specialized test (use one of the llvm-test/TEST.<type>.Makefiles), just run:

    +% cd llvm/projects/llvm-test
     % gmake TEST=<type> test
     
    @@ -884,10 +892,10 @@ Valid CSS! Valid HTML 4.01! + src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> John T. Criswell, Reid Spencer, and Tanya Lattner
    - The LLVM Compiler Infrastructure
    + The LLVM Compiler Infrastructure
    Last modified: $Date$ From baldrick at free.fr Tue May 20 06:07:38 2008 From: baldrick at free.fr (Duncan Sands) Date: Tue, 20 May 2008 11:07:38 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r51314 - in /llvm-gcc-4.2/trunk/gcc: ipa-inline.c passes.c Message-ID: <200805201107.m4KB7e71007004@zion.cs.uiuc.edu> Author: baldrick Date: Tue May 20 06:07:25 2008 New Revision: 51314 URL: http://llvm.org/viewvc/llvm-project?rev=51314&view=rev Log: Reapply the turn-off-all-gcc-optimization-passes patch (except for inlining of always_inline functions), but tweaked so there are no warnings and (hopefully) no more problems with undefined symbols when bootstrapping. Modified: llvm-gcc-4.2/trunk/gcc/ipa-inline.c llvm-gcc-4.2/trunk/gcc/passes.c Modified: llvm-gcc-4.2/trunk/gcc/ipa-inline.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/ipa-inline.c?rev=51314&r1=51313&r2=51314&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/ipa-inline.c (original) +++ llvm-gcc-4.2/trunk/gcc/ipa-inline.c Tue May 20 06:07:25 2008 @@ -941,7 +941,11 @@ /* At the moment, no IPA passes change function bodies before inlining. Save some time by not recomputing function body sizes if early inlining already did so. */ + /* LLVM local begin - Don't rely on pass_early_ipa_inline being run. */ +#ifndef ENABLE_LLVM if (!flag_early_inlining) +#endif + /* LLVM local end */ node->local.self_insns = node->global.insns = estimate_num_insns (node->decl); @@ -1028,9 +1032,19 @@ overall_insns - old_insns); } + /* LLVM local begin */ +#ifdef ENABLE_LLVM + if (0) +#endif + /* LLVM local end*/ if (!flag_really_no_inline) cgraph_decide_inlining_of_small_functions (); + /* LLVM local begin */ +#ifdef ENABLE_LLVM + if (0) +#endif + /* LLVM local end*/ if (!flag_really_no_inline && flag_inline_functions_called_once) { @@ -1148,6 +1162,11 @@ } /* Now do the automatic inlining. */ + /* LLVM local begin */ +#ifdef ENABLE_LLVM + if (0) +#endif + /* LLVM local end */ if (!flag_really_no_inline) for (e = node->callees; e; e = e->next_callee) if (e->callee->local.inlinable Modified: llvm-gcc-4.2/trunk/gcc/passes.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/passes.c?rev=51314&r1=51313&r2=51314&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/passes.c (original) +++ llvm-gcc-4.2/trunk/gcc/passes.c Tue May 20 06:07:25 2008 @@ -481,18 +481,20 @@ #define NEXT_PASS(PASS) (p = next_pass_1 (p, &PASS)) /* Interprocedural optimization passes. */ p = &all_ipa_passes; + /* LLVM local begin */ +#ifndef ENABLE_LLVM NEXT_PASS (pass_early_ipa_inline); NEXT_PASS (pass_early_local_passes); NEXT_PASS (pass_ipa_cp); -/* LLVM LOCAL begin */ +#endif + NEXT_PASS (pass_ipa_inline); /* LLVM: inline functions marked always_inline */ #ifndef ENABLE_LLVM - NEXT_PASS (pass_ipa_inline); NEXT_PASS (pass_ipa_reference); NEXT_PASS (pass_ipa_pure_const); NEXT_PASS (pass_ipa_type_escape); NEXT_PASS (pass_ipa_pta); #endif -/* LLVM LOCAL end */ + /* LLVM local end */ *p = NULL; /* All passes needed to lower the function into shape optimizers can @@ -504,9 +506,9 @@ NEXT_PASS (pass_lower_cf); NEXT_PASS (pass_lower_eh); NEXT_PASS (pass_build_cfg); - NEXT_PASS (pass_lower_complex_O0); /* LLVM LOCAL begin */ #ifndef ENABLE_LLVM + NEXT_PASS (pass_lower_complex_O0); NEXT_PASS (pass_lower_vector); #endif /* LLVM LOCAL end */ @@ -518,16 +520,6 @@ /* LLVM LOCAL end */ *p = NULL; - p = &pass_early_local_passes.sub; - /* LLVM LOCAL begin */ -#ifndef ENABLE_LLVM - NEXT_PASS (pass_tree_profile); -#endif - /* LLVM LOCAL end */ - NEXT_PASS (pass_cleanup_cfg); - NEXT_PASS (pass_rebuild_cgraph_edges); - *p = NULL; - /* LLVM LOCAL begin */ #ifdef ENABLE_LLVM p = &all_extra_lowering_passes; @@ -539,6 +531,14 @@ #endif /* LLVM LOCAL end */ + /* LLVM LOCAL begin - Do not pull in symbols. */ +#ifndef ENABLE_LLVM + p = &pass_early_local_passes.sub; + NEXT_PASS (pass_tree_profile); + NEXT_PASS (pass_cleanup_cfg); + NEXT_PASS (pass_rebuild_cgraph_edges); + *p = NULL; + p = &all_passes; NEXT_PASS (pass_fixup_cfg); NEXT_PASS (pass_init_datastructures); @@ -684,8 +684,6 @@ NEXT_PASS (pass_dce_loop); *p = NULL; - /* LLVM LOCAL begin */ -#ifndef ENABLE_LLVM p = &pass_loop2.sub; NEXT_PASS (pass_rtl_loop_init); NEXT_PASS (pass_rtl_move_loop_invariants); @@ -761,7 +759,7 @@ NEXT_PASS (pass_final); *p = NULL; #endif - /* LLVM LOCAL end */ + /* LLVM local end */ #undef NEXT_PASS @@ -775,11 +773,12 @@ register_dump_files (all_extra_lowering_passes, false, PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_cfg); -#endif - /* LLVM LOCAL end */ +#else register_dump_files (all_passes, false, PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_cfg); +#endif + /* LLVM LOCAL end */ } static unsigned int last_verified; From matthijs at stdin.nl Tue May 20 06:10:15 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Tue, 20 May 2008 11:10:15 -0000 Subject: [llvm-commits] [test-suite] r51315 - /test-suite/trunk/TEST.example.Makefile Message-ID: <200805201110.m4KBAJCb007087@zion.cs.uiuc.edu> Author: matthijs Date: Tue May 20 06:10:04 2008 New Revision: 51315 URL: http://llvm.org/viewvc/llvm-project?rev=51315&view=rev Log: Make the example test use wc to count bytes instead of characters, words and lines as before. wc doesn't like counting these in binary files that contain invalid multibyte characters. Modified: test-suite/trunk/TEST.example.Makefile Modified: test-suite/trunk/TEST.example.Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.example.Makefile?rev=51315&r1=51314&r2=51315&view=diff ============================================================================== --- test-suite/trunk/TEST.example.Makefile (original) +++ test-suite/trunk/TEST.example.Makefile Tue May 20 06:10:04 2008 @@ -11,4 +11,4 @@ test.$(TEST).%: Output/%.llvm.bc @echo "=========================================" @echo "Running '$(TEST)' test on '$(TESTNAME)' program" - wc $< + wc -c $< From baldrick at free.fr Tue May 20 06:12:32 2008 From: baldrick at free.fr (Duncan Sands) Date: Tue, 20 May 2008 13:12:32 +0200 Subject: [llvm-commits] [llvm-gcc-4.2] r51257 - in /llvm-gcc-4.2/trunk/gcc: cgraphunit.c ipa-inline.c passes.c In-Reply-To: <19ACFAEF-F86D-41F0-BACC-7ECD1F794501@apple.com> References: <200805191642.m4JGgvVc013244@zion.cs.uiuc.edu> <19ACFAEF-F86D-41F0-BACC-7ECD1F794501@apple.com> Message-ID: <200805201312.32955.baldrick@free.fr> Hi Devang, > I'm seeing following bootstrap failure. I don't see that (bootstrap fails earlier - PR2343) but it seems clear what must be causing it (all_passes referring to passes that aren't being linked; this caused by my oversimplification of the ENABLE_LLVM ifdef logic). It should be fixed now. I also fixed the warnings. Sorry for the breakage. Ciao, Duncan. PS: It would be nice to build with -Werr on x86-linux, but it's not feasible because Apple changes in i386.c generate a bunch of warnings. I didn't dare touch that mysterious stuff - can perhaps one of the Apple guys take a look, thanks! > Any idea? > Thanks, > - > Devang > > Undefined symbols: > "_pass_gcse", referenced from: > _pass_gcse$non_lazy_ptr in libbackend.a(passes.o) > "_pass_branch_target_load_optimize", referenced from: > _pass_branch_target_load_optimize$non_lazy_ptr in > libbackend.a(passes.o) > "_pass_if_after_reload", referenced from: > _pass_if_after_reload$non_lazy_ptr in libbackend.a(passes.o) > "_can_copy_p", referenced from: > _may_assign_reg_p in libbackend.a(loop-invariant.o) > _hash_scan_set in libbackend.a(postreload-gcse.o) > _hash_scan_set in libbackend.a(postreload-gcse.o) > "_pass_jump_bypass", referenced from: > _pass_jump_bypass$non_lazy_ptr in libbackend.a(passes.o) > "_fis_get_condition", referenced from: > _reload_cse_move2add in libbackend.a(postreload.o) > "_peephole2_insns", referenced from: > _peephole2_optimize in libbackend.a(recog.o) > "_pass_if_after_combine", referenced from: > _pass_if_after_combine$non_lazy_ptr in libbackend.a(passes.o) > "_pass_combine", referenced from: > _pass_combine$non_lazy_ptr in libbackend.a(passes.o) > "_pass_rtl_ifcvt", referenced from: > _pass_rtl_ifcvt$non_lazy_ptr in libbackend.a(passes.o) > "_remove_death", referenced from: > _update_equiv_regs in libbackend.a(local-alloc.o) > _fixup_match_2 in libbackend.a(regmove.o) > "_pass_sms", referenced from: > _pass_sms$non_lazy_ptr in libbackend.a(passes.o) > "_pass_sched", referenced from: > _pass_sched$non_lazy_ptr in libbackend.a(passes.o) > "_pass_sched2", referenced from: > _pass_sched2$non_lazy_ptr in libbackend.a(passes.o) > "_branch_target_load_optimize", referenced from: > _rest_of_handle_flow2 in libbackend.a(flow.o) > > > From baldrick at free.fr Tue May 20 06:23:46 2008 From: baldrick at free.fr (Duncan Sands) Date: Tue, 20 May 2008 13:23:46 +0200 Subject: [llvm-commits] [llvm-gcc-4.2] r51220 - in /llvm-gcc-4.2/trunk/gcc: cgraphunit.c passes.c In-Reply-To: References: <200805171235.m4HCZ8jJ005150@zion.cs.uiuc.edu> Message-ID: <200805201323.46126.baldrick@free.fr> > I'm getting bootstrap failures due to ipa related changes. Are you > able to bootstrap llvmgcc42 ? I just successfully bootstrapped with my latest version applied (now in svn), but I had to increase the tail-duplication threshold to 6 in order to avoid a bootstrap failure (PR2343). Ciao, Duncan. From sabre at nondot.org Tue May 20 12:28:01 2008 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 May 2008 17:28:01 -0000 Subject: [llvm-commits] [llvm] r51323 - /llvm/trunk/win32/AsmParser/AsmParser.vcproj Message-ID: <200805201728.m4KHS2oe000633@zion.cs.uiuc.edu> Author: lattner Date: Tue May 20 12:27:57 2008 New Revision: 51323 URL: http://llvm.org/viewvc/llvm-project?rev=51323&view=rev Log: "The two generated files in the AsmParser.vcproj are pointing to the wrong directory, this is the patch to fix it (also attached)." Patch by 'OvermindDL1' Modified: llvm/trunk/win32/AsmParser/AsmParser.vcproj Modified: llvm/trunk/win32/AsmParser/AsmParser.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/AsmParser/AsmParser.vcproj?rev=51323&r1=51322&r2=51323&view=diff ============================================================================== --- llvm/trunk/win32/AsmParser/AsmParser.vcproj (original) +++ llvm/trunk/win32/AsmParser/AsmParser.vcproj Tue May 20 12:27:57 2008 @@ -380,11 +380,11 @@ Name="Generated Files" > From asl at math.spbu.ru Tue May 20 12:56:47 2008 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 20 May 2008 17:56:47 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r51325 - /llvm-gcc-4.2/trunk/gcc/config/freebsd-spec.h Message-ID: <200805201756.m4KHuldY001765@zion.cs.uiuc.edu> Author: asl Date: Tue May 20 12:56:47 2008 New Revision: 51325 URL: http://llvm.org/viewvc/llvm-project?rev=51325&view=rev Log: Fix FreeBSD specs handling. This seems to be merge problem during 4.0 => 4.2 migration. Modified: llvm-gcc-4.2/trunk/gcc/config/freebsd-spec.h Modified: llvm-gcc-4.2/trunk/gcc/config/freebsd-spec.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/freebsd-spec.h?rev=51325&r1=51324&r2=51325&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/freebsd-spec.h (original) +++ llvm-gcc-4.2/trunk/gcc/config/freebsd-spec.h Tue May 20 12:56:47 2008 @@ -48,8 +48,6 @@ || !strcmp ((STR), "soname") || !strcmp ((STR), "defsym") \ || !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker")) -/* LLVM LOCAL begin */ -#ifndef ENABLE_LLVM #define FBSD_TARGET_OS_CPP_BUILTINS() \ do \ { \ @@ -62,32 +60,6 @@ FBSD_TARGET_CPU_CPP_BUILTINS(); \ } \ while (0) -#else -#define FBSD_TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - if (FBSD_MAJOR == 7) \ - builtin_define ("__FreeBSD__=7"); \ - else if (FBSD_MAJOR == 6) \ - builtin_define ("__FreeBSD__=6"); \ - else if (FBSD_MAJOR == 5) \ - builtin_define ("__FreeBSD__=5"); \ - else if (FBSD_MAJOR == 4) \ - builtin_define ("__FreeBSD__=4"); \ - else if (FBSD_MAJOR == 3) \ - builtin_define ("__FreeBSD__=3"); \ - else \ - builtin_define ("__FreeBSD__"); \ - builtin_define_std ("unix"); \ - builtin_define ("__KPRINTF_ATTRIBUTE__"); \ - builtin_assert ("system=unix"); \ - builtin_assert ("system=bsd"); \ - builtin_assert ("system=FreeBSD"); \ - FBSD_TARGET_CPU_CPP_BUILTINS(); \ - } \ - while (0) -#endif -/* LLVM LOCAL end */ /* Define the default FreeBSD-specific per-CPU hook code. */ #define FBSD_TARGET_CPU_CPP_BUILTINS() do {} while (0) From evan.cheng at apple.com Tue May 20 13:24:48 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Tue, 20 May 2008 18:24:48 -0000 Subject: [llvm-commits] [llvm] r51327 - /llvm/trunk/lib/Target/X86/X86InstrSSE.td Message-ID: <200805201824.m4KIOmKu002797@zion.cs.uiuc.edu> Author: evancheng Date: Tue May 20 13:24:47 2008 New Revision: 51327 URL: http://llvm.org/viewvc/llvm-project?rev=51327&view=rev Log: movsd and movq do not require 16-byte alignment. This fixes vec_set-5.ll on Linux. Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=51327&r1=51326&r2=51327&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Tue May 20 13:24:47 2008 @@ -1036,7 +1036,7 @@ [(set VR128:$dst, (v4f32 (X86vzmovl (v4f32 (scalar_to_vector (loadf32 addr:$src))))))]>; -def : Pat<(v4f32 (X86vzmovl (memopv4f32 addr:$src))), +def : Pat<(v4f32 (X86vzmovl (loadv4f32 addr:$src))), (MOVZSS2PSrm addr:$src)>; //===----------------------------------------------------------------------===// @@ -2325,7 +2325,9 @@ (v2f64 (X86vzmovl (v2f64 (scalar_to_vector (loadf64 addr:$src))))))]>; -def : Pat<(v2f64 (X86vzmovl (memopv2f64 addr:$src))), +def : Pat<(v2f64 (X86vzmovl (loadv2f64 addr:$src))), + (MOVZSD2PDrm addr:$src)>; +def : Pat<(v2f64 (X86vzmovl (bc_v2f64 (loadv4f32 addr:$src)))), (MOVZSD2PDrm addr:$src)>; def : Pat<(v2f64 (X86vzload addr:$src)), (MOVZSD2PDrm addr:$src)>; } @@ -2367,13 +2369,17 @@ [(set VR128:$dst, (v2i64 (X86vzmovl (v2i64 VR128:$src))))]>, XS, Requires<[HasSSE2]>; -let AddedComplexity = 20 in +let AddedComplexity = 20 in { def MOVZPQILo2PQIrm : I<0x7E, MRMSrcMem, (outs VR128:$dst), (ins i128mem:$src), "movq\t{$src, $dst|$dst, $src}", [(set VR128:$dst, (v2i64 (X86vzmovl - (memopv2i64 addr:$src))))]>, + (loadv2i64 addr:$src))))]>, XS, Requires<[HasSSE2]>; +def : Pat<(v2i64 (X86vzmovl (bc_v2i64 (loadv4i32 addr:$src)))), + (MOVZPQILo2PQIrm addr:$src)>; +} + //===----------------------------------------------------------------------===// // SSE3 Instructions //===----------------------------------------------------------------------===// From ggreif at gmail.com Tue May 20 14:52:05 2008 From: ggreif at gmail.com (Gabor Greif) Date: Tue, 20 May 2008 19:52:05 -0000 Subject: [llvm-commits] [llvm] r51328 - in /llvm/trunk/test: Analysis/Andersens/ Analysis/BasicAA/ Analysis/Dominators/ Analysis/GlobalsModRef/ Analysis/LoadVN/ Analysis/LoopInfo/ Analysis/PostDominators/ Archive/ Assembler/ Bitcode/ C++Frontend/ CFrontend/ CodeGen/ARM/ CodeGen/CBackend/ CodeGen/CellSPU/ CodeGen/Generic/ CodeGen/Generic/GC/ CodeGen/IA64/ CodeGen/PowerPC/ CodeGen/SPARC/ CodeGen/X86/ DebugInfo/ ExecutionEngine/ Feature/ Integer/ Linker/ Other/ Transforms/ADCE/ Transforms/ArgumentPromotion/ Transforms/BlockPlaceme... Message-ID: <200805201952.m4KJq6Tx005519@zion.cs.uiuc.edu> Author: ggreif Date: Tue May 20 14:52:04 2008 New Revision: 51328 URL: http://llvm.org/viewvc/llvm-project?rev=51328&view=rev Log: Rename the last test with .llx extension to .ll, resolve duplicate test by renaming to isnan2. Now that no test has llx ending there is no need to search for them from dg.exp too. Added: llvm/trunk/test/CodeGen/X86/isnan.ll - copied unchanged from r51251, llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan.ll llvm/trunk/test/CodeGen/X86/isnan2.ll - copied unchanged from r51251, llvm/branches/ggreif/use-diet/test/CodeGen/X86/isnan2.ll Removed: llvm/trunk/test/CodeGen/X86/isnan.llx Modified: llvm/trunk/test/Analysis/Andersens/dg.exp llvm/trunk/test/Analysis/BasicAA/dg.exp llvm/trunk/test/Analysis/Dominators/dg.exp llvm/trunk/test/Analysis/GlobalsModRef/dg.exp llvm/trunk/test/Analysis/LoadVN/dg.exp llvm/trunk/test/Analysis/LoopInfo/dg.exp llvm/trunk/test/Analysis/PostDominators/dg.exp llvm/trunk/test/Archive/dg.exp llvm/trunk/test/Assembler/dg.exp llvm/trunk/test/Bitcode/dg.exp llvm/trunk/test/C++Frontend/dg.exp llvm/trunk/test/CFrontend/dg.exp llvm/trunk/test/CodeGen/ARM/dg.exp llvm/trunk/test/CodeGen/CBackend/dg.exp llvm/trunk/test/CodeGen/CellSPU/dg.exp llvm/trunk/test/CodeGen/Generic/GC/dg.exp llvm/trunk/test/CodeGen/Generic/dg.exp llvm/trunk/test/CodeGen/IA64/dg.exp llvm/trunk/test/CodeGen/PowerPC/dg.exp llvm/trunk/test/CodeGen/SPARC/dg.exp llvm/trunk/test/CodeGen/X86/dg.exp llvm/trunk/test/DebugInfo/dg.exp llvm/trunk/test/ExecutionEngine/dg.exp llvm/trunk/test/Feature/dg.exp llvm/trunk/test/Integer/dg.exp llvm/trunk/test/Linker/dg.exp llvm/trunk/test/Other/dg.exp llvm/trunk/test/Transforms/ADCE/dg.exp llvm/trunk/test/Transforms/ArgumentPromotion/dg.exp llvm/trunk/test/Transforms/BlockPlacement/dg.exp llvm/trunk/test/Transforms/CodeExtractor/dg.exp llvm/trunk/test/Transforms/ConstProp/dg.exp llvm/trunk/test/Transforms/ConstantMerge/dg.exp llvm/trunk/test/Transforms/DeadArgElim/dg.exp llvm/trunk/test/Transforms/DeadStoreElimination/dg.exp llvm/trunk/test/Transforms/GCSE/dg.exp llvm/trunk/test/Transforms/GVN/dg.exp llvm/trunk/test/Transforms/GVNPRE/dg.exp llvm/trunk/test/Transforms/GlobalDCE/dg.exp llvm/trunk/test/Transforms/GlobalOpt/dg.exp llvm/trunk/test/Transforms/IPConstantProp/dg.exp llvm/trunk/test/Transforms/IndVarsSimplify/dg.exp llvm/trunk/test/Transforms/Inline/dg.exp llvm/trunk/test/Transforms/InstCombine/dg.exp llvm/trunk/test/Transforms/Internalize/dg.exp llvm/trunk/test/Transforms/LCSSA/dg.exp llvm/trunk/test/Transforms/LICM/dg.exp llvm/trunk/test/Transforms/LoopDeletion/dg.exp llvm/trunk/test/Transforms/LoopIndexSplit/dg.exp llvm/trunk/test/Transforms/LoopRotate/dg.exp llvm/trunk/test/Transforms/LoopSimplify/dg.exp llvm/trunk/test/Transforms/LoopStrengthReduce/dg.exp llvm/trunk/test/Transforms/LoopUnroll/dg.exp llvm/trunk/test/Transforms/LoopUnswitch/dg.exp llvm/trunk/test/Transforms/LowerInvoke/dg.exp llvm/trunk/test/Transforms/LowerSetJmp/dg.exp llvm/trunk/test/Transforms/LowerSwitch/dg.exp llvm/trunk/test/Transforms/Mem2Reg/dg.exp llvm/trunk/test/Transforms/MemCpyOpt/dg.exp llvm/trunk/test/Transforms/PredicateSimplifier/dg.exp llvm/trunk/test/Transforms/PruneEH/dg.exp llvm/trunk/test/Transforms/RaiseAllocations/dg.exp llvm/trunk/test/Transforms/Reassociate/dg.exp llvm/trunk/test/Transforms/SCCP/dg.exp llvm/trunk/test/Transforms/SRETPromotion/dg.exp llvm/trunk/test/Transforms/ScalarRepl/dg.exp llvm/trunk/test/Transforms/SimplifyCFG/dg.exp llvm/trunk/test/Transforms/SimplifyLibCalls/dg.exp llvm/trunk/test/Transforms/StripSymbols/dg.exp llvm/trunk/test/Transforms/TailCallElim/dg.exp llvm/trunk/test/Transforms/TailDup/dg.exp llvm/trunk/test/Verifier/dg.exp Modified: llvm/trunk/test/Analysis/Andersens/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/Andersens/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Analysis/Andersens/dg.exp (original) +++ llvm/trunk/test/Analysis/Andersens/dg.exp Tue May 20 14:52:04 2008 @@ -1,4 +1,4 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Analysis/BasicAA/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/BasicAA/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Analysis/BasicAA/dg.exp (original) +++ llvm/trunk/test/Analysis/BasicAA/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Analysis/Dominators/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/Dominators/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Analysis/Dominators/dg.exp (original) +++ llvm/trunk/test/Analysis/Dominators/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Analysis/GlobalsModRef/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/GlobalsModRef/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Analysis/GlobalsModRef/dg.exp (original) +++ llvm/trunk/test/Analysis/GlobalsModRef/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Analysis/LoadVN/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoadVN/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Analysis/LoadVN/dg.exp (original) +++ llvm/trunk/test/Analysis/LoadVN/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Analysis/LoopInfo/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopInfo/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Analysis/LoopInfo/dg.exp (original) +++ llvm/trunk/test/Analysis/LoopInfo/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Analysis/PostDominators/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/PostDominators/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Analysis/PostDominators/dg.exp (original) +++ llvm/trunk/test/Analysis/PostDominators/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Archive/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Archive/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Archive/dg.exp (original) +++ llvm/trunk/test/Archive/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Assembler/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Assembler/dg.exp (original) +++ llvm/trunk/test/Assembler/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Bitcode/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Bitcode/dg.exp (original) +++ llvm/trunk/test/Bitcode/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/C++Frontend/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/C++Frontend/dg.exp (original) +++ llvm/trunk/test/C++Frontend/dg.exp Tue May 20 14:52:04 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if [ llvm_gcc_supports c++ ] then { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] } Modified: llvm/trunk/test/CFrontend/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/CFrontend/dg.exp (original) +++ llvm/trunk/test/CFrontend/dg.exp Tue May 20 14:52:04 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if [ llvm_gcc_supports c ] then { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] } Modified: llvm/trunk/test/CodeGen/ARM/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/dg.exp (original) +++ llvm/trunk/test/CodeGen/ARM/dg.exp Tue May 20 14:52:04 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if { [llvm_supports_target ARM] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] } Modified: llvm/trunk/test/CodeGen/CBackend/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CBackend/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/CBackend/dg.exp (original) +++ llvm/trunk/test/CodeGen/CBackend/dg.exp Tue May 20 14:52:04 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if { [llvm_supports_target CBackend] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] } Modified: llvm/trunk/test/CodeGen/CellSPU/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CellSPU/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/CellSPU/dg.exp (original) +++ llvm/trunk/test/CodeGen/CellSPU/dg.exp Tue May 20 14:52:04 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if { [llvm_supports_target CellSPU] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] } Modified: llvm/trunk/test/CodeGen/Generic/GC/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/GC/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Generic/GC/dg.exp (original) +++ llvm/trunk/test/CodeGen/Generic/GC/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/CodeGen/Generic/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Generic/dg.exp (original) +++ llvm/trunk/test/CodeGen/Generic/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/CodeGen/IA64/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/IA64/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/IA64/dg.exp (original) +++ llvm/trunk/test/CodeGen/IA64/dg.exp Tue May 20 14:52:04 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if { [llvm_supports_target IA64] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] } Modified: llvm/trunk/test/CodeGen/PowerPC/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/PowerPC/dg.exp (original) +++ llvm/trunk/test/CodeGen/PowerPC/dg.exp Tue May 20 14:52:04 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if { [llvm_supports_target PowerPC] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] } Modified: llvm/trunk/test/CodeGen/SPARC/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/SPARC/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/SPARC/dg.exp (original) +++ llvm/trunk/test/CodeGen/SPARC/dg.exp Tue May 20 14:52:04 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if { [llvm_supports_target Sparc] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] } Modified: llvm/trunk/test/CodeGen/X86/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/dg.exp (original) +++ llvm/trunk/test/CodeGen/X86/dg.exp Tue May 20 14:52:04 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if { [llvm_supports_target X86] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] } Removed: llvm/trunk/test/CodeGen/X86/isnan.llx URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/isnan.llx?rev=51327&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/isnan.llx (original) +++ llvm/trunk/test/CodeGen/X86/isnan.llx (removed) @@ -1,9 +0,0 @@ -; RUN: llvm-as < %s | llc -march=x86 | not grep call - -declare i1 @llvm.isunordered.f64(double) - -define i1 @test_isnan(double %X) { - %R = fcmp uno double %X, %X ; [#uses=1] - ret i1 %R -} - Modified: llvm/trunk/test/DebugInfo/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/DebugInfo/dg.exp (original) +++ llvm/trunk/test/DebugInfo/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/ExecutionEngine/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/dg.exp (original) +++ llvm/trunk/test/ExecutionEngine/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Feature/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Feature/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Feature/dg.exp (original) +++ llvm/trunk/test/Feature/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Integer/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Integer/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Integer/dg.exp (original) +++ llvm/trunk/test/Integer/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Linker/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Linker/dg.exp (original) +++ llvm/trunk/test/Linker/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Other/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Other/dg.exp (original) +++ llvm/trunk/test/Other/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/ADCE/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ADCE/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/ADCE/dg.exp (original) +++ llvm/trunk/test/Transforms/ADCE/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/ArgumentPromotion/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ArgumentPromotion/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/ArgumentPromotion/dg.exp (original) +++ llvm/trunk/test/Transforms/ArgumentPromotion/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/BlockPlacement/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/BlockPlacement/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/BlockPlacement/dg.exp (original) +++ llvm/trunk/test/Transforms/BlockPlacement/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/CodeExtractor/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/CodeExtractor/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/CodeExtractor/dg.exp (original) +++ llvm/trunk/test/Transforms/CodeExtractor/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/ConstProp/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ConstProp/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/ConstProp/dg.exp (original) +++ llvm/trunk/test/Transforms/ConstProp/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/ConstantMerge/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ConstantMerge/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/ConstantMerge/dg.exp (original) +++ llvm/trunk/test/Transforms/ConstantMerge/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/DeadArgElim/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadArgElim/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/DeadArgElim/dg.exp (original) +++ llvm/trunk/test/Transforms/DeadArgElim/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/DeadStoreElimination/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/DeadStoreElimination/dg.exp (original) +++ llvm/trunk/test/Transforms/DeadStoreElimination/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/GCSE/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GCSE/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/GCSE/dg.exp (original) +++ llvm/trunk/test/Transforms/GCSE/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/GVN/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/GVN/dg.exp (original) +++ llvm/trunk/test/Transforms/GVN/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/GVNPRE/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVNPRE/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/GVNPRE/dg.exp (original) +++ llvm/trunk/test/Transforms/GVNPRE/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/GlobalDCE/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalDCE/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/GlobalDCE/dg.exp (original) +++ llvm/trunk/test/Transforms/GlobalDCE/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/GlobalOpt/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/GlobalOpt/dg.exp (original) +++ llvm/trunk/test/Transforms/GlobalOpt/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/IPConstantProp/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IPConstantProp/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/IPConstantProp/dg.exp (original) +++ llvm/trunk/test/Transforms/IPConstantProp/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/IndVarsSimplify/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarsSimplify/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/IndVarsSimplify/dg.exp (original) +++ llvm/trunk/test/Transforms/IndVarsSimplify/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/Inline/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Inline/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/Inline/dg.exp (original) +++ llvm/trunk/test/Transforms/Inline/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/InstCombine/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/dg.exp (original) +++ llvm/trunk/test/Transforms/InstCombine/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/Internalize/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Internalize/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/Internalize/dg.exp (original) +++ llvm/trunk/test/Transforms/Internalize/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/LCSSA/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LCSSA/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LCSSA/dg.exp (original) +++ llvm/trunk/test/Transforms/LCSSA/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/LICM/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LICM/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LICM/dg.exp (original) +++ llvm/trunk/test/Transforms/LICM/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/LoopDeletion/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopDeletion/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopDeletion/dg.exp (original) +++ llvm/trunk/test/Transforms/LoopDeletion/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/LoopIndexSplit/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopIndexSplit/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopIndexSplit/dg.exp (original) +++ llvm/trunk/test/Transforms/LoopIndexSplit/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/LoopRotate/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopRotate/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopRotate/dg.exp (original) +++ llvm/trunk/test/Transforms/LoopRotate/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/LoopSimplify/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopSimplify/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopSimplify/dg.exp (original) +++ llvm/trunk/test/Transforms/LoopSimplify/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/LoopStrengthReduce/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopStrengthReduce/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopStrengthReduce/dg.exp (original) +++ llvm/trunk/test/Transforms/LoopStrengthReduce/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/LoopUnroll/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopUnroll/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopUnroll/dg.exp (original) +++ llvm/trunk/test/Transforms/LoopUnroll/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/LoopUnswitch/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopUnswitch/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopUnswitch/dg.exp (original) +++ llvm/trunk/test/Transforms/LoopUnswitch/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/LowerInvoke/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LowerInvoke/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LowerInvoke/dg.exp (original) +++ llvm/trunk/test/Transforms/LowerInvoke/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/LowerSetJmp/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LowerSetJmp/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LowerSetJmp/dg.exp (original) +++ llvm/trunk/test/Transforms/LowerSetJmp/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/LowerSwitch/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LowerSwitch/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LowerSwitch/dg.exp (original) +++ llvm/trunk/test/Transforms/LowerSwitch/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/Mem2Reg/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Mem2Reg/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/Mem2Reg/dg.exp (original) +++ llvm/trunk/test/Transforms/Mem2Reg/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/MemCpyOpt/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/MemCpyOpt/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/MemCpyOpt/dg.exp (original) +++ llvm/trunk/test/Transforms/MemCpyOpt/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/PredicateSimplifier/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/PredicateSimplifier/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/PredicateSimplifier/dg.exp (original) +++ llvm/trunk/test/Transforms/PredicateSimplifier/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/PruneEH/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/PruneEH/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/PruneEH/dg.exp (original) +++ llvm/trunk/test/Transforms/PruneEH/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/RaiseAllocations/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/RaiseAllocations/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/RaiseAllocations/dg.exp (original) +++ llvm/trunk/test/Transforms/RaiseAllocations/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/Reassociate/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Reassociate/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/Reassociate/dg.exp (original) +++ llvm/trunk/test/Transforms/Reassociate/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/SCCP/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SCCP/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/SCCP/dg.exp (original) +++ llvm/trunk/test/Transforms/SCCP/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/SRETPromotion/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SRETPromotion/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/SRETPromotion/dg.exp (original) +++ llvm/trunk/test/Transforms/SRETPromotion/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/ScalarRepl/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ScalarRepl/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/ScalarRepl/dg.exp (original) +++ llvm/trunk/test/Transforms/ScalarRepl/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/SimplifyCFG/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/SimplifyCFG/dg.exp (original) +++ llvm/trunk/test/Transforms/SimplifyCFG/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/SimplifyLibCalls/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyLibCalls/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/SimplifyLibCalls/dg.exp (original) +++ llvm/trunk/test/Transforms/SimplifyLibCalls/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/StripSymbols/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/StripSymbols/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/StripSymbols/dg.exp (original) +++ llvm/trunk/test/Transforms/StripSymbols/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/TailCallElim/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/TailCallElim/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/TailCallElim/dg.exp (original) +++ llvm/trunk/test/Transforms/TailCallElim/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Transforms/TailDup/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/TailDup/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Transforms/TailDup/dg.exp (original) +++ llvm/trunk/test/Transforms/TailDup/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] Modified: llvm/trunk/test/Verifier/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/dg.exp?rev=51328&r1=51327&r2=51328&view=diff ============================================================================== --- llvm/trunk/test/Verifier/dg.exp (original) +++ llvm/trunk/test/Verifier/dg.exp Tue May 20 14:52:04 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] From clattner at apple.com Tue May 20 15:03:53 2008 From: clattner at apple.com (Chris Lattner) Date: Tue, 20 May 2008 13:03:53 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r51325 - /llvm-gcc-4.2/trunk/gcc/config/freebsd-spec.h In-Reply-To: <200805201756.m4KHuldY001765@zion.cs.uiuc.edu> References: <200805201756.m4KHuldY001765@zion.cs.uiuc.edu> Message-ID: <8F4C0BDA-A3A8-4704-A972-89E957EE11EB@apple.com> On May 20, 2008, at 10:56 AM, Anton Korobeynikov wrote: > > URL: http://llvm.org/viewvc/llvm-project?rev=51325&view=rev > Log: > Fix FreeBSD specs handling. This seems to be merge problem during > 4.0 => 4.2 migration. What does this fix? Should this go into 2.3? -Chris > > > Modified: > llvm-gcc-4.2/trunk/gcc/config/freebsd-spec.h > > Modified: llvm-gcc-4.2/trunk/gcc/config/freebsd-spec.h > URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/freebsd-spec.h?rev=51325&r1=51324&r2=51325&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm-gcc-4.2/trunk/gcc/config/freebsd-spec.h (original) > +++ llvm-gcc-4.2/trunk/gcc/config/freebsd-spec.h Tue May 20 12:56:47 > 2008 > @@ -48,8 +48,6 @@ > || !strcmp ((STR), "soname") || !strcmp ((STR), "defsym") \ > || !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker")) > > -/* LLVM LOCAL begin */ > -#ifndef ENABLE_LLVM > #define FBSD_TARGET_OS_CPP_BUILTINS() \ > do \ > { \ > @@ -62,32 +60,6 @@ > FBSD_TARGET_CPU_CPP_BUILTINS(); \ > } \ > while (0) > -#else > -#define FBSD_TARGET_OS_CPP_BUILTINS() \ > - do \ > - { \ > - if (FBSD_MAJOR == 7) \ > - builtin_define ("__FreeBSD__=7"); \ > - else if (FBSD_MAJOR == 6) \ > - builtin_define ("__FreeBSD__=6"); \ > - else if (FBSD_MAJOR == 5) \ > - builtin_define ("__FreeBSD__=5"); \ > - else if (FBSD_MAJOR == 4) \ > - builtin_define ("__FreeBSD__=4"); \ > - else if (FBSD_MAJOR == 3) \ > - builtin_define ("__FreeBSD__=3"); \ > - else \ > - builtin_define ("__FreeBSD__"); \ > - builtin_define_std ("unix"); \ > - builtin_define ("__KPRINTF_ATTRIBUTE__"); \ > - builtin_assert ("system=unix"); \ > - builtin_assert ("system=bsd"); \ > - builtin_assert ("system=FreeBSD"); \ > - FBSD_TARGET_CPU_CPP_BUILTINS(); \ > - } \ > - while (0) > -#endif > -/* LLVM LOCAL end */ > > /* Define the default FreeBSD-specific per-CPU hook code. */ > #define FBSD_TARGET_CPU_CPP_BUILTINS() do {} while (0) > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From clattner at apple.com Tue May 20 15:05:09 2008 From: clattner at apple.com (Chris Lattner) Date: Tue, 20 May 2008 13:05:09 -0700 Subject: [llvm-commits] [llvm] r51328 - in /llvm/trunk/test: Analysis/Andersens/ Analysis/BasicAA/ Analysis/Dominators/ Analysis/GlobalsModRef/ Analysis/LoadVN/ Analysis/LoopInfo/ Analysis/PostDominators/ Archive/ Assembler/ Bitcode/ C++Frontend/ CFrontend/ CodeGen/ARM/ CodeGen/CBackend/ CodeGen/CellSPU/ CodeGen/Generic/ CodeGen/Generic/GC/ CodeGen/IA64/ CodeGen/PowerPC/ CodeGen/SPARC/ CodeGen/X86/ DebugInfo/ ExecutionEngine/ Feature/ Integer/ Linker/ Other/ Transforms/ADCE/ Transforms/ArgumentPromotion/ Transforms/BlockPlaceme... In-Reply-To: <200805201952.m4KJq6Tx005519@zion.cs.uiuc.edu> References: <200805201952.m4KJq6Tx005519@zion.cs.uiuc.edu> Message-ID: <7FF65553-5501-4423-AF6F-F4DDC9759003@apple.com> On May 20, 2008, at 12:52 PM, Gabor Greif wrote: > Author: ggreif > Date: Tue May 20 14:52:04 2008 > New Revision: 51328 > > URL: http://llvm.org/viewvc/llvm-project?rev=51328&view=rev > Log: > Rename the last test with .llx extension to .ll, resolve duplicate > test by renaming to isnan2. Now that no test has llx ending there is > no need to search for them from dg.exp too. Hey Gabor, Thanks for doing this. You might also be able to drop the globbing for ".tr" also, which is an obsolete suffix meant to be "testrunner". -Chris From sabre at nondot.org Tue May 20 15:06:53 2008 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 May 2008 20:06:53 -0000 Subject: [llvm-commits] [llvm] r51329 - /llvm/trunk/docs/DeveloperPolicy.html Message-ID: <200805202006.m4KK6rE9005910@zion.cs.uiuc.edu> Author: lattner Date: Tue May 20 15:06:53 2008 New Revision: 51329 URL: http://llvm.org/viewvc/llvm-project?rev=51329&view=rev Log: Clarify copyright transfer when you don't own the copyright of the contributed code. Modified: llvm/trunk/docs/DeveloperPolicy.html Modified: llvm/trunk/docs/DeveloperPolicy.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/DeveloperPolicy.html?rev=51329&r1=51328&r2=51329&view=diff ============================================================================== --- llvm/trunk/docs/DeveloperPolicy.html (original) +++ llvm/trunk/docs/DeveloperPolicy.html Tue May 20 15:06:53 2008 @@ -458,7 +458,7 @@

    Although UIUC may eventually reassign the copyright of the software to another - entity (e.g. a dedicated non-profit "LLVM Organization", or something) + entity (e.g. a dedicated non-profit "LLVM Organization") the intent for the project is to always have a single entity hold the copyrights to LLVM at any given time.

    @@ -467,6 +467,12 @@ reduces the managerial burden for any kind of administrative or technical decisions about LLVM. The goal of the LLVM project is to always keep the code open and licensed under a very liberal license.

    + +

    When contributing code, you also affirm that you are legally entitled to + grant this copyright, personally or on behalf of your employer. If the code + belongs to some other entity, please raise this issue with the oversight + group before the code is committed.

    + @@ -480,7 +486,8 @@
    • You can freely distribute LLVM.
    • You must retain the copyright notice if you redistribute LLVM.
    • -
    • Binaries derived from LLVM must reproduce the copyright notice.
    • +
    • Binaries derived from LLVM must reproduce the copyright notice (e.g. + in an included readme file).
    • You can't use our names to promote your LLVM derived products.
    • There's no warranty on LLVM at all.
    From asl at math.spbu.ru Tue May 20 15:10:23 2008 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Wed, 21 May 2008 00:10:23 +0400 Subject: [llvm-commits] [llvm-gcc-4.2] r51325 - /llvm-gcc-4.2/trunk/gcc/config/freebsd-spec.h In-Reply-To: <8F4C0BDA-A3A8-4704-A972-89E957EE11EB@apple.com> References: <200805201756.m4KHuldY001765@zion.cs.uiuc.edu> <8F4C0BDA-A3A8-4704-A972-89E957EE11EB@apple.com> Message-ID: <1211314223.12186.50.camel@localhost> Hi Chris > What does this fix? Should this go into 2.3? There was some patch in the gcc mainline between 4.0 and 4.2, which generalized FreeBSD version defines (so, you don't need to add new 'if' case with every FreeBSD release). It seems, that '#ifdef ENABLE_LLVM' guarded 4.0 version, so I just dropped it and restored mainline behaviour. I suggest this to be pushed into release branch. -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University. From nicolas.geoffray at lip6.fr Tue May 20 15:40:59 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 20 May 2008 20:40:59 -0000 Subject: [llvm-commits] [vmkit] r51331 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaClass.cpp JavaClass.h JavaMetaJIT.cpp Message-ID: <200805202040.m4KKex05007049@zion.cs.uiuc.edu> Author: geoffray Date: Tue May 20 15:40:59 2008 New Revision: 51331 URL: http://llvm.org/viewvc/llvm-project?rev=51331&view=rev Log: Inline simple functions, optimize others. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp?rev=51331&r1=51330&r2=51331&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp Tue May 20 15:40:59 2008 @@ -22,7 +22,6 @@ #include "JavaThread.h" #include "JavaTypes.h" #include "Jnjvm.h" -#include "JnjvmModule.h" #include "JnjvmModuleProvider.h" #include "Reader.h" @@ -82,11 +81,11 @@ static void printClassNameIntern(const UTF8* name, unsigned int start, unsigned int end, mvm::PrintBuffer* buf) { - uint16 first = name->at(start); + uint16 first = name->elements[start]; if (first == AssessorDesc::I_TAB) { unsigned int stepsEnd = start; - while (name->at(stepsEnd) == AssessorDesc::I_TAB) stepsEnd++; - if (name->at(stepsEnd) == AssessorDesc::I_REF) { + while (name->elements[stepsEnd] == AssessorDesc::I_TAB) stepsEnd++; + if (name->elements[stepsEnd] == AssessorDesc::I_REF) { printClassNameIntern(name, (stepsEnd + 1),(end - 1), buf); } else { AssessorDesc * funcs = 0; @@ -100,7 +99,7 @@ } else { char* tmp = (char*)(alloca(1 + (end - start))); for (uint32 i = start; i < end; i++) { - short int cur = name->at(i); + short int cur = name->elements[i]; tmp[i - start] = (cur == '/' ? '.' : cur); } tmp[end - start] = 0; @@ -129,26 +128,6 @@ #endif } -void CommonClass::aquire() { - lockVar->lock(); -} - -void CommonClass::release() { - lockVar->unlock(); -} - -void CommonClass::waitClass() { - condVar->wait(lockVar); -} - -void CommonClass::broadcastClass() { - condVar->broadcast(); -} - -bool CommonClass::ownerClass() { - return mvm::Lock::selfOwner(lockVar); -} - void Class::print(mvm::PrintBuffer* buf) const { buf->write("Class<"); printClassName(name, buf); @@ -166,27 +145,13 @@ _baseClass); } -CommonClass* ClassArray::baseClass() { - if (_baseClass == 0) { - this->resolveComponent(); - } - return _baseClass; -} - -AssessorDesc* ClassArray::funcs() { - if (_funcs == 0) { - this->resolveComponent(); - } - return _funcs; -} - JavaObject* ClassArray::arrayLoader(Jnjvm* isolate, const UTF8* name, JavaObject* loader, unsigned int start, unsigned int len) { - if (name->at(start) == AssessorDesc::I_TAB) { + if (name->elements[start] == AssessorDesc::I_TAB) { return arrayLoader(isolate, name, loader, start + 1, len - 1); - } else if (name->at(start) == AssessorDesc::I_REF) { + } else if (name->elements[start] == AssessorDesc::I_REF) { const UTF8* componentName = name->javaToInternal(isolate, start + 1, len - 2); CommonClass* cl = isolate->loadName(componentName, loader, false, false, @@ -197,7 +162,7 @@ } } -void* JavaMethod::compiledPtr() { +void* JavaMethod::_compiledPtr() { if (code != 0) return code; else { classDef->aquire(); @@ -248,33 +213,31 @@ std::vector* meths = (isStatic? &staticMethods : &virtualMethods); - JavaMethod *cur, *res = 0; - int i = 0; - int nbm = meths->size(); - - while (!res && i < nbm) { - cur = meths->at(i); + JavaMethod *cur = 0; + + for (std::vector::iterator i = meths->begin(), + e = meths->end(); i!= e; i++) { + cur = *i; if (cur->name->equals(name) && cur->type->equals(type)) { return cur; } - ++i; } + cur = 0; if (recurse) { - if (super) res = super->lookupMethodDontThrow(name, type, isStatic, + if (super) cur = super->lookupMethodDontThrow(name, type, isStatic, recurse); - if (!res && isStatic) { - int nbi = interfaces.size(); - i = 0; - while (res == 0 && i < nbi) { - res = interfaces[i]->lookupMethodDontThrow(name, type, isStatic, - recurse); - ++i; + if (cur) return cur; + if (isStatic) { + for (std::vector::iterator i = interfaces.begin(), + e = interfaces.end(); i!= e; i++) { + cur = (*i)->lookupMethodDontThrow(name, type, isStatic, recurse); + if (cur) return cur; } } } - return res; + return 0; } JavaMethod* CommonClass::lookupMethod(const UTF8* name, const UTF8* type, @@ -294,33 +257,32 @@ std::vector* fields = (isStatic? &staticFields : &virtualFields); - JavaField *cur, *res = 0; - int i = 0; - int nbm = fields->size(); + JavaField *cur = 0; - while (!res && i < nbm) { - cur = fields->at(i); + for (std::vector::iterator i = fields->begin(), + e = fields->end(); i!= e; i++) { + cur = *i; if (cur->name->equals(name) && cur->type->equals(type)) { return cur; } - ++i; } + cur = 0; + if (recurse) { - if (super) res = super->lookupFieldDontThrow(name, type, isStatic, + if (super) cur = super->lookupFieldDontThrow(name, type, isStatic, recurse); - if (!res && isStatic) { - int nbi = interfaces.size(); - i = 0; - while (res == 0 && i < nbi) { - res = interfaces[i]->lookupFieldDontThrow(name, type, isStatic, - recurse); - ++i; + if (cur) return cur; + if (isStatic) { + for (std::vector::iterator i = interfaces.begin(), + e = interfaces.end(); i!= e; i++) { + cur = (*i)->lookupFieldDontThrow(name, type, isStatic, recurse); + if (cur) return cur; } } } - return res; + return 0; } JavaField* CommonClass::lookupField(const UTF8* name, const UTF8* type, @@ -365,7 +327,7 @@ uint32 len = Tname->size; bool res = true; - while (res && Tname->at(prof) == AssessorDesc::I_TAB) { + while (res && Tname->elements[prof] == AssessorDesc::I_TAB) { CommonClass* cl = ((ClassArray*)curS)->baseClass(); Jnjvm *vm = cl->isolate; ++prof; @@ -375,7 +337,7 @@ } Jnjvm *vm = this->isolate; - return (Tname->at(prof) == AssessorDesc::I_REF) && + return (Tname->elements[prof] == AssessorDesc::I_REF) && (res && curS->inheritName(Tname->extract(vm, prof + 1, len - 1))); } else { return false; @@ -385,10 +347,10 @@ bool CommonClass::implements(CommonClass* cl) { if (this == cl) return true; else { - for (uint32 i = 0; i < interfaces.size(); i++) { - CommonClass* cur = interfaces[i]; - if (cur == cl) return true; - else if (cur->implements(cl)) return true; + for (std::vector::iterator i = interfaces.begin(), + e = interfaces.end(); i!= e; i++) { + if (*i == cl) return true; + else if ((*i)->implements(cl)) return true; } if (super) { return super->implements(cl); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h?rev=51331&r1=51330&r2=51331&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h Tue May 20 15:40:59 2008 @@ -164,11 +164,26 @@ static void printClassName(const UTF8* name, mvm::PrintBuffer* buf); void initialise(Jnjvm* isolate, bool array); - void aquire(); - void release(); - void waitClass(); - void broadcastClass(); - bool ownerClass(); + + void aquire() { + lockVar->lock(); + } + + void release() { + lockVar->unlock(); + } + + void waitClass() { + condVar->wait(lockVar); + } + + void broadcastClass() { + condVar->broadcast(); + } + + bool ownerClass() { + return mvm::Lock::selfOwner(lockVar); + } JavaMethod* lookupMethodDontThrow(const UTF8* name, const UTF8* type, bool isStatic, bool recurse); @@ -262,8 +277,19 @@ AssessorDesc* _funcs; void resolveComponent(); - CommonClass* baseClass(); - AssessorDesc* funcs(); + + CommonClass* baseClass() { + if (_baseClass == 0) + resolveComponent(); + return _baseClass; + } + + AssessorDesc* funcs() { + if (_funcs == 0) + resolveComponent(); + return _funcs; + } + static JavaObject* arrayLoader(Jnjvm* isolate, const UTF8* name, JavaObject* loader, unsigned int start, unsigned int end); @@ -281,6 +307,8 @@ class JavaMethod : public mvm::Object { +private: + void* _compiledPtr(); public: static VirtualTable* VT; unsigned int access; @@ -299,8 +327,12 @@ virtual void print(mvm::PrintBuffer *buf) const; virtual void TRACER; + - void* compiledPtr(); + void* compiledPtr() { + if (!code) return _compiledPtr(); + return code; + } uint32 invokeIntSpecialAP(Jnjvm* vm, JavaObject* obj, va_list ap); float invokeFloatSpecialAP(Jnjvm* vm, JavaObject* obj, va_list ap); @@ -376,38 +408,50 @@ virtual void print(mvm::PrintBuffer *buf) const; virtual void TRACER; - void setStaticFloatField(float val); - void setStaticDoubleField(double val); - void setStaticInt8Field(uint8 val); - void setStaticInt16Field(uint16 val); - void setStaticInt32Field(uint32 val); - void setStaticLongField(sint64 val); - void setStaticObjectField(JavaObject* val); - - float getStaticFloatField(); - double getStaticDoubleField(); - uint8 getStaticInt8Field(); - uint16 getStaticInt16Field(); - uint32 getStaticInt32Field(); - sint64 getStaticLongField(); - JavaObject* getStaticObjectField(); - - void setVirtualFloatField(JavaObject* obj, float val); - void setVirtualDoubleField(JavaObject* obj, double val); - void setVirtualInt8Field(JavaObject* obj, uint8 val); - void setVirtualInt16Field(JavaObject* obj, uint16 val); - void setVirtualInt32Field(JavaObject* obj, uint32 val); - void setVirtualLongField(JavaObject* obj, sint64 val); - void setVirtualObjectField(JavaObject* obj, JavaObject* val); - - float getVirtualFloatField(JavaObject* obj); - double getVirtualDoubleField(JavaObject* obj); - uint8 getVirtualInt8Field(JavaObject* obj); - uint16 getVirtualInt16Field(JavaObject* obj); - uint32 getVirtualInt32Field(JavaObject* obj); - sint64 getVirtualLongField(JavaObject* obj); - JavaObject* getVirtualObjectField(JavaObject* obj); - + #define GETVIRTUALFIELD(TYPE, TYPE_NAME) \ + TYPE getVirtual##TYPE_NAME##Field(JavaObject* obj) { \ + assert(classDef->isReady()); \ + void* ptr = (void*)((uint64)obj + ptrOffset); \ + return ((TYPE*)ptr)[0]; \ + } + + #define GETSTATICFIELD(TYPE, TYPE_NAME) \ + TYPE getStatic##TYPE_NAME##Field() { \ + assert(classDef->isReady()); \ + JavaObject* obj = classDef->staticInstance(); \ + void* ptr = (void*)((uint64)obj + ptrOffset); \ + return ((TYPE*)ptr)[0]; \ + } + + #define SETVIRTUALFIELD(TYPE, TYPE_NAME) \ + void setVirtual##TYPE_NAME##Field(JavaObject* obj, TYPE val) { \ + assert(classDef->isReady()); \ + void* ptr = (void*)((uint64)obj + ptrOffset); \ + ((TYPE*)ptr)[0] = val; \ + } + + #define SETSTATICFIELD(TYPE, TYPE_NAME) \ + void setStatic##TYPE_NAME##Field(TYPE val) { \ + assert(classDef->isReady()); \ + JavaObject* obj = classDef->staticInstance(); \ + void* ptr = (void*)((uint64)obj + ptrOffset); \ + ((TYPE*)ptr)[0] = val; \ + } + + #define MK_ASSESSORS(TYPE, TYPE_NAME) \ + GETVIRTUALFIELD(TYPE, TYPE_NAME) \ + SETVIRTUALFIELD(TYPE, TYPE_NAME) \ + GETSTATICFIELD(TYPE, TYPE_NAME) \ + SETSTATICFIELD(TYPE, TYPE_NAME) \ + + MK_ASSESSORS(float, Float); + MK_ASSESSORS(double, Double); + MK_ASSESSORS(JavaObject*, Object); + MK_ASSESSORS(uint8, Int8); + MK_ASSESSORS(uint16, Int16); + MK_ASSESSORS(uint32, Int32); + MK_ASSESSORS(sint64, Long); + }; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp?rev=51331&r1=51330&r2=51331&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp Tue May 20 15:40:59 2008 @@ -50,58 +50,10 @@ JavaObject* Class::operator()(Jnjvm* vm) { - if (!isReady()) - isolate->loadName(name, classLoader, true, true, true); + assert(isReady()); return doNew(vm); } -#define GETVIRTUALFIELD(TYPE, TYPE_NAME) \ -TYPE JavaField::getVirtual##TYPE_NAME##Field(JavaObject* obj) { \ - if (!classDef->isReady()) \ - classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); \ - void* ptr = (void*)((uint64)obj + ptrOffset); \ - return ((TYPE*)ptr)[0]; \ -} - -#define GETSTATICFIELD(TYPE, TYPE_NAME) \ -TYPE JavaField::getStatic##TYPE_NAME##Field() { \ - if (!classDef->isReady()) \ - classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); \ - JavaObject* obj = classDef->staticInstance(); \ - void* ptr = (void*)((uint64)obj + ptrOffset); \ - return ((TYPE*)ptr)[0]; \ -} - -#define SETVIRTUALFIELD(TYPE, TYPE_NAME) \ -void JavaField::setVirtual##TYPE_NAME##Field(JavaObject* obj, TYPE val) { \ - if (!classDef->isReady()) \ - classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); \ - void* ptr = (void*)((uint64)obj + ptrOffset); \ - ((TYPE*)ptr)[0] = val; \ -} - -#define SETSTATICFIELD(TYPE, TYPE_NAME) \ -void JavaField::setStatic##TYPE_NAME##Field(TYPE val) { \ - if (!classDef->isReady()) \ - classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); \ - JavaObject* obj = classDef->staticInstance(); \ - void* ptr = (void*)((uint64)obj + ptrOffset); \ - ((TYPE*)ptr)[0] = val; \ -} - -#define MK_ASSESSORS(TYPE, TYPE_NAME) \ - GETVIRTUALFIELD(TYPE, TYPE_NAME) \ - SETVIRTUALFIELD(TYPE, TYPE_NAME) \ - GETSTATICFIELD(TYPE, TYPE_NAME) \ - SETSTATICFIELD(TYPE, TYPE_NAME) \ - -MK_ASSESSORS(float, Float); -MK_ASSESSORS(double, Double); -MK_ASSESSORS(JavaObject*, Object); -MK_ASSESSORS(uint8, Int8); -MK_ASSESSORS(uint16, Int16); -MK_ASSESSORS(uint32, Int32); -MK_ASSESSORS(sint64, Long); #define readArgs(buf, signature, ap) \ for (std::vector::iterator i = signature->args.begin(), \ From nicolas.geoffray at lip6.fr Tue May 20 15:42:53 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 20 May 2008 20:42:53 -0000 Subject: [llvm-commits] [vmkit] r51332 - in /vmkit/trunk/lib/JnJVM/VMCore: Reader.cpp Reader.h Message-ID: <200805202042.m4KKgrTG007118@zion.cs.uiuc.edu> Author: geoffray Date: Tue May 20 15:42:53 2008 New Revision: 51332 URL: http://llvm.org/viewvc/llvm-project?rev=51332&view=rev Log: Inline simple functions. Modified: vmkit/trunk/lib/JnJVM/VMCore/Reader.cpp vmkit/trunk/lib/JnJVM/VMCore/Reader.h Modified: vmkit/trunk/lib/JnJVM/VMCore/Reader.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Reader.cpp?rev=51332&r1=51331&r2=51332&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Reader.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Reader.cpp Tue May 20 15:42:53 2008 @@ -20,34 +20,6 @@ using namespace jnjvm; -double Reader::readDouble(int first, int second) { - int values[2]; - double res[1]; -#if defined(__PPC__) - values[0] = second; - values[1] = first; -#else - values[0] = first; - values[1] = second; -#endif - memcpy(res, values, 8); - return res[0]; -} - -sint64 Reader::readLong(int first, int second) { - int values[2]; - sint64 res[1]; -#if defined(__PPC__) - values[0] = second; - values[1] = first; -#else - values[0] = first; - values[1] = second; -#endif - memcpy(res, values, 8); - return res[0]; -} - const int Reader::SeekSet = SEEK_SET; const int Reader::SeekCur = SEEK_CUR; const int Reader::SeekEnd = SEEK_END; @@ -81,56 +53,6 @@ return ret; } -uint8 Reader::readU1() { - return bytes->at(cursor++); -} - -sint8 Reader::readS1() { - return readU1(); -} - -uint16 Reader::readU2() { - uint16 tmp = ((uint16)(readU1())) << 8; - return tmp | ((uint16)(readU1())); -} - -sint16 Reader::readS2() { - sint16 tmp = ((sint16)(readS1())) << 8; - return tmp | ((sint16)(readS1())); -} - -uint32 Reader::readU4() { - uint32 tmp = ((uint32)(readU2())) << 16; - return tmp | ((uint32)(readU2())); -} - -sint32 Reader::readS4() { - sint32 tmp = ((sint32)(readS2())) << 16; - return tmp | ((sint32)(readS2())); -} - -uint64 Reader::readU8() { - uint64 tmp = ((uint64)(readU4())) << 32; - return tmp | ((uint64)(readU4())); -} - -sint64 Reader::readS8() { - sint64 tmp = ((sint64)(readS8())) << 32; - return tmp | ((sint64)(readS8())); -} - -Reader::Reader(ArrayUInt8* array, uint32 start, uint32 end) { - if (!end) end = array->size; - this->bytes = array; - this->cursor = start; - this->min = start; - this->max = start + end; -} - -unsigned int Reader::tell() { - return cursor - min; -} - Reader* Reader::derive(Jnjvm* vm, uint32 nbb) { return vm_new(vm, Reader)(bytes, cursor, nbb); } Modified: vmkit/trunk/lib/JnJVM/VMCore/Reader.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Reader.h?rev=51332&r1=51331&r2=51332&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Reader.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Reader.h Tue May 20 15:42:53 2008 @@ -14,9 +14,10 @@ #include "types.h" +#include "JavaArray.h" + namespace jnjvm { -class ArrayUInt8; class Jnjvm; class Reader : public mvm::Object { @@ -27,8 +28,34 @@ uint32 cursor; uint32 max; - static double readDouble(int first, int second); - static sint64 readLong(int first, int second); + static double readDouble(int first, int second) { + int values[2]; + double res[1]; +#if defined(__PPC__) + values[0] = second; + values[1] = first; +#else + values[0] = first; + values[1] = second; +#endif + memcpy(res, values, 8); + return res[0]; + } + + + static sint64 readLong(int first, int second) { + int values[2]; + sint64 res[1]; +#if defined(__PPC__) + values[0] = second; + values[1] = first; +#else + values[0] = first; + values[1] = second; +#endif + memcpy(res, values, 8); + return res[0]; + } static const int SeekSet; static const int SeekCur; @@ -36,19 +63,61 @@ static ArrayUInt8* openFile(Jnjvm* vm, char* path); static ArrayUInt8* openZip(Jnjvm* vm, char* zipname, char* filename); - uint8 readU1(); - sint8 readS1(); - uint16 readU2(); - sint16 readS2(); - uint32 readU4(); - sint32 readS4(); - uint64 readU8(); - sint64 readS8(); - Reader(ArrayUInt8* array, uint32 start = 0, uint32 end = 0); + + uint8 readU1() { + return bytes->elements[cursor++]; + } + + sint8 readS1() { + return bytes->elements[cursor++]; + } + + uint16 readU2() { + uint16 tmp = ((uint16)(readU1())) << 8; + return tmp | ((uint16)(readU1())); + } + + sint16 readS2() { + sint16 tmp = ((sint16)(readS1())) << 8; + return tmp | ((sint16)(readS1())); + } + + uint32 readU4() { + uint32 tmp = ((uint32)(readU2())) << 16; + return tmp | ((uint32)(readU2())); + } + + sint32 readS4() { + sint32 tmp = ((sint32)(readS2())) << 16; + return tmp | ((sint32)(readS2())); + } + + uint64 readU8() { + uint64 tmp = ((uint64)(readU4())) << 32; + return tmp | ((uint64)(readU4())); + } + + sint64 readS8() { + sint64 tmp = ((sint64)(readS8())) << 32; + return tmp | ((sint64)(readS8())); + } + + Reader(ArrayUInt8* array, uint32 start = 0, uint32 end = 0) { + if (!end) end = array->size; + this->bytes = array; + this->cursor = start; + this->min = start; + this->max = start + end; + } + Reader() {} - unsigned int tell(); - Reader* derive(Jnjvm* vm, uint32 nbb); + + unsigned int tell() { + return cursor - min; + } + void seek(uint32 pos, int from); + Reader* derive(Jnjvm* vm, uint32 nbb); virtual void print(mvm::PrintBuffer* buf) const; virtual void TRACER; From nicolas.geoffray at lip6.fr Tue May 20 15:45:19 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 20 May 2008 20:45:19 -0000 Subject: [llvm-commits] [vmkit] r51333 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaJIT.cpp JavaJIT.h JavaJITOpcodes.cpp JavaThread.cpp JavaThread.h Message-ID: <200805202045.m4KKjJVc007193@zion.cs.uiuc.edu> Author: geoffray Date: Tue May 20 15:45:19 2008 New Revision: 51333 URL: http://llvm.org/viewvc/llvm-project?rev=51333&view=rev Log: Inline simple functions. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.h vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaThread.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp?rev=51333&r1=51332&r2=51333&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp Tue May 20 15:45:19 2008 @@ -38,7 +38,6 @@ #include "JavaTypes.h" #include "JavaUpcalls.h" #include "Jnjvm.h" -#include "JnjvmModule.h" #include "JnjvmModuleProvider.h" #include "NativeUtil.h" #include "Reader.h" @@ -51,56 +50,6 @@ using namespace jnjvm; using namespace llvm; -BasicBlock* JavaJIT::createBasicBlock(const char* name) { - return llvm::BasicBlock::Create(name, llvmFunction); -} - -Value* JavaJIT::top() { - return stack.back().first; -} - -Value* JavaJIT::pop() { - llvm::Value * ret = top(); - stack.pop_back(); - return ret; -} - -Value* JavaJIT::popAsInt() { - llvm::Value * ret = top(); - const AssessorDesc* ass = topFunc(); - stack.pop_back(); - - if (ret->getType() != Type::Int32Ty) { - if (ass == AssessorDesc::dChar) { - ret = new ZExtInst(ret, Type::Int32Ty, "", currentBlock); - } else { - ret = new SExtInst(ret, Type::Int32Ty, "", currentBlock); - } - } - - return ret; -} - -void JavaJIT::push(llvm::Value* val, const AssessorDesc* ass) { - assert(LLVMAssessorInfo::AssessorInfo[ass->numId].llvmType == val->getType()); - stack.push_back(std::make_pair(val, ass)); -} - -void JavaJIT::push(std::pair pair) { - assert(LLVMAssessorInfo::AssessorInfo[pair.second->numId].llvmType == - pair.first->getType()); - stack.push_back(pair); -} - - -const AssessorDesc* JavaJIT::topFunc() { - return stack.back().second; -} - -uint32 JavaJIT::stackSize() { - return stack.size(); -} - void JavaJIT::invokeVirtual(uint16 index) { JavaCtpInfo* ctpInfo = compilingClass->ctpInfo; @@ -187,12 +136,6 @@ #endif } -std::pair JavaJIT::popPair() { - std::pair ret = stack.back(); - stack.pop_back(); - return ret; -} - llvm::Function* JavaJIT::nativeCompile(void* natPtr) { PRINT_DEBUG(JNJVM_COMPILE, 1, COLOR_NORMAL, "native compile %s\n", @@ -1711,8 +1654,31 @@ } } -extern void convertValue(Value*& val, const Type* t1, BasicBlock* currentBlock, - bool usign); +void JavaJIT::convertValue(Value*& val, const Type* t1, BasicBlock* currentBlock, + bool usign) { + const Type* t2 = val->getType(); + if (t1 != t2) { + if (t1->isInteger() && t2->isInteger()) { + if (t2->getPrimitiveSizeInBits() < t1->getPrimitiveSizeInBits()) { + if (usign) { + val = new ZExtInst(val, t1, "", currentBlock); + } else { + val = new SExtInst(val, t1, "", currentBlock); + } + } else { + val = new TruncInst(val, t1, "", currentBlock); + } + } else if (t1->isFloatingPoint() && t2->isFloatingPoint()) { + if (t2->getPrimitiveSizeInBits() < t1->getPrimitiveSizeInBits()) { + val = new FPExtInst(val, t1, "", currentBlock); + } else { + val = new FPTruncInst(val, t1, "", currentBlock); + } + } else if (isa(t1) && isa(t2)) { + val = new BitCastInst(val, t1, "", currentBlock); + } + } +} void JavaJIT::setStaticField(uint16 index) { Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.h?rev=51333&r1=51332&r2=51333&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.h Tue May 20 15:45:19 2008 @@ -28,9 +28,11 @@ #include "mvm/Object.h" #include "mvm/PrintBuffer.h" +#include "JavaTypes.h" +#include "JnjvmModule.h" + namespace jnjvm { -class AssessorDesc; class CacheNode; class Class; class JavaField; @@ -107,14 +109,58 @@ // stack manipulation std::vector< std::pair > stack; - void push(llvm::Value* val, const AssessorDesc* ass); - void push(std::pair pair); - llvm::Value* pop(); - llvm::Value* popAsInt(); - llvm::Value* top(); - const AssessorDesc* topFunc(); - std::pair popPair(); - uint32 stackSize(); + void push(llvm::Value* val, const AssessorDesc* ass) { + assert(LLVMAssessorInfo::AssessorInfo[ass->numId].llvmType == + val->getType()); + stack.push_back(std::make_pair(val, ass)); + } + + void push(std::pair pair) { + assert(LLVMAssessorInfo::AssessorInfo[pair.second->numId].llvmType == + pair.first->getType()); + stack.push_back(pair); + } + + llvm::Value* pop() { + llvm::Value * ret = top(); + stack.pop_back(); + return ret; + } + + llvm::Value* top() { + return stack.back().first; + } + + const AssessorDesc* topFunc() { + return stack.back().second; + } + + uint32 stackSize() { + return stack.size(); + } + + llvm::Value* popAsInt() { + llvm::Value * ret = top(); + const AssessorDesc* ass = topFunc(); + stack.pop_back(); + + if (ret->getType() != llvm::Type::Int32Ty) { + if (ass == AssessorDesc::dChar || ass == AssessorDesc::dBool) { + ret = new llvm::ZExtInst(ret, llvm::Type::Int32Ty, "", currentBlock); + } else { + ret = new llvm::SExtInst(ret, llvm::Type::Int32Ty, "", currentBlock); + } + } + + return ret; + + } + + std::pair popPair() { + std::pair ret = stack.back(); + stack.pop_back(); + return ret; + } // exceptions std::vector jsrs; @@ -128,7 +174,9 @@ // block manipulation llvm::BasicBlock* currentBlock; - llvm::BasicBlock* createBasicBlock(const char* name = ""); + llvm::BasicBlock* createBasicBlock(const char* name = "") { + return llvm::BasicBlock::Create(name, llvmFunction); + } void setCurrentBlock(llvm::BasicBlock* block); // branches @@ -196,6 +244,10 @@ llvm::BasicBlock *InsertAtEnd); + void convertValue(llvm::Value*& val, const llvm::Type* t1, + llvm::BasicBlock* currentBlock, bool usign); + + // wide status bool wide; uint32 WREAD_U1(uint8* bytecodes, bool init, uint32 &i); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp?rev=51333&r1=51332&r2=51333&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaJITOpcodes.cpp Tue May 20 15:45:19 2008 @@ -33,7 +33,6 @@ #include "JavaThread.h" #include "JavaTypes.h" #include "Jnjvm.h" -#include "JnjvmModule.h" #include "OpcodeNames.def" @@ -100,32 +99,6 @@ } } -void convertValue(Value*& val, const Type* t1, BasicBlock* currentBlock, - bool usign) { - const Type* t2 = val->getType(); - if (t1 != t2) { - if (t1->isInteger() && t2->isInteger()) { - if (t2->getPrimitiveSizeInBits() < t1->getPrimitiveSizeInBits()) { - if (usign) { - val = new ZExtInst(val, t1, "", currentBlock); - } else { - val = new SExtInst(val, t1, "", currentBlock); - } - } else { - val = new TruncInst(val, t1, "", currentBlock); - } - } else if (t1->isFloatingPoint() && t2->isFloatingPoint()) { - if (t2->getPrimitiveSizeInBits() < t1->getPrimitiveSizeInBits()) { - val = new FPExtInst(val, t1, "", currentBlock); - } else { - val = new FPTruncInst(val, t1, "", currentBlock); - } - } else if (isa(t1) && isa(t2)) { - val = new BitCastInst(val, t1, "", currentBlock); - } - } -} - void JavaJIT::compileOpcodes(uint8* bytecodes, uint32 codeLength) { wide = false; uint32 jsrIndex = 0; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaThread.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaThread.cpp?rev=51333&r1=51332&r2=51333&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaThread.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaThread.cpp Tue May 20 15:45:19 2008 @@ -34,43 +34,3 @@ delete lock; delete varcond; } - -JavaThread* JavaThread::get() { - return (JavaThread*)Thread::threadKey->get(); -} - -void JavaThread::initialise(JavaObject* thread, Jnjvm* isolate) { - this->javaThread = thread; - this->isolate = isolate; - this->lock = mvm::Lock::allocNormal(); - this->varcond = mvm::Cond::allocCond(); - this->interruptFlag = 0; - this->state = StateRunning; - this->self = mvm::Thread::self(); - this->pendingException = 0; -} - -JavaObject* JavaThread::currentThread() { - JavaThread* result = get(); - if (result != 0) - return result->javaThread; - else - return 0; -} - -void JavaThread::throwPendingException() { - JavaThread* th = JavaThread::get(); - assert(th->pendingException); - void* exc = __cxa_allocate_exception(0); - th->internalPendingException = exc; - __cxa_throw(exc, 0, 0); -} - -void JavaThread::returnFromNative() { - assert(sjlj_buffers.size()); -#if defined(__MACH__) - longjmp((int*)sjlj_buffers.back(), 1); -#else - longjmp((__jmp_buf_tag*)sjlj_buffers.back(), 1); -#endif -} Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h?rev=51333&r1=51332&r2=51333&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaThread.h Tue May 20 15:45:19 2008 @@ -51,9 +51,27 @@ virtual void TRACER; virtual void destroyer(size_t sz); - void initialise(JavaObject* thread, Jnjvm* isolate); - static JavaThread* get(); - static JavaObject* currentThread(); + void initialise(JavaObject* thread, Jnjvm* isolate) { + this->javaThread = thread; + this->isolate = isolate; + this->lock = mvm::Lock::allocNormal(); + this->varcond = mvm::Cond::allocCond(); + this->interruptFlag = 0; + this->state = StateRunning; + this->self = mvm::Thread::self(); + this->pendingException = 0; + } + + static JavaThread* get() { + return (JavaThread*)Thread::threadKey->get(); + } + static JavaObject* currentThread() { + JavaThread* result = get(); + if (result != 0) + return result->javaThread; + else + return 0; + } static void* getException() { return (void*) @@ -69,7 +87,13 @@ __cxa_throw(exc, 0, 0); } - static void throwPendingException(); + static void throwPendingException() { + JavaThread* th = JavaThread::get(); + assert(th->pendingException); + void* exc = __cxa_allocate_exception(0); + th->internalPendingException = exc; + __cxa_throw(exc, 0, 0); + } static void clearException() { JavaThread* th = JavaThread::get(); @@ -88,7 +112,14 @@ return JavaThread::get()->pendingException; } - void returnFromNative(); + void returnFromNative() { + assert(sjlj_buffers.size()); +#if defined(__MACH__) + longjmp((int*)sjlj_buffers.back(), 1); +#else + longjmp((__jmp_buf_tag*)sjlj_buffers.back(), 1); +#endif + } }; } // end namespace jnjvm From dalej at apple.com Tue May 20 15:46:49 2008 From: dalej at apple.com (Dale Johannesen) Date: Tue, 20 May 2008 20:46:49 -0000 Subject: [llvm-commits] [test-suite] r51334 - /test-suite/trunk/Makefile.programs Message-ID: <200805202046.m4KKknSh007243@zion.cs.uiuc.edu> Author: johannes Date: Tue May 20 15:46:49 2008 New Revision: 51334 URL: http://llvm.org/viewvc/llvm-project?rev=51334&view=rev Log: Add comment. Modified: test-suite/trunk/Makefile.programs Modified: test-suite/trunk/Makefile.programs URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.programs?rev=51334&r1=51333&r2=51334&view=diff ============================================================================== --- test-suite/trunk/Makefile.programs (original) +++ test-suite/trunk/Makefile.programs Tue May 20 15:46:49 2008 @@ -345,6 +345,8 @@ # It is important to link C++ programs with G++ so look for -lstdc++ in LDFLAGS # and set the LLVMGCCLD variable to the correct compiler interface to use. +# Note that LDFLAGS must already be defined at the time this file is included, +# or this will not work. ifneq ($(filter -lstdc++,$(LDFLAGS)),) LLVMGCCLD := $(CXX) else From sabre at nondot.org Tue May 20 15:48:22 2008 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 May 2008 20:48:22 -0000 Subject: [llvm-commits] [llvm] r51335 - /llvm/trunk/docs/LangRef.html Message-ID: <200805202048.m4KKmMFQ007300@zion.cs.uiuc.edu> Author: lattner Date: Tue May 20 15:48:21 2008 New Revision: 51335 URL: http://llvm.org/viewvc/llvm-project?rev=51335&view=rev Log: Clarify that and/or/xor/sdiv etc all allow vectors. Modified: llvm/trunk/docs/LangRef.html Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=51335&r1=51334&r2=51335&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Tue May 20 15:48:21 2008 @@ -2095,82 +2095,121 @@

    There are several different binary operators:

    - + +
    +
    Syntax:
    -
      <result> = add <ty> <var1>, <var2>   ; yields {ty}:result
    +
    +
    +  <result> = add <ty> <var1>, <var2>   ; yields {ty}:result
     
    +
    Overview:
    +

    The 'add' instruction returns the sum of its two operands.

    +
    Arguments:
    -

    The two arguments to the 'add' instruction must be either integer or floating point values. - This instruction can also take vector versions of the values. -Both arguments must have identical types.

    + +

    The two arguments to the 'add' instruction must be integer, floating point, or + vector values. Both arguments must have identical + types.

    +
    Semantics:
    +

    The value produced is the integer or floating point sum of the two operands.

    +

    If an integer sum has unsigned overflow, the result returned is the mathematical result modulo 2n, where n is the bit width of the result.

    +

    Because LLVM integers use a two's complement representation, this instruction is appropriate for both signed and unsigned integers.

    +
    Example:
    -
      <result> = add i32 4, %var          ; yields {i32}:result = 4 + %var
    +
    +
    +  <result> = add i32 4, %var          ; yields {i32}:result = 4 + %var
     
    - + +
    +
    Syntax:
    -
      <result> = sub <ty> <var1>, <var2>   ; yields {ty}:result
    +
    +
    +  <result> = sub <ty> <var1>, <var2>   ; yields {ty}:result
     
    +
    Overview:
    +

    The 'sub' instruction returns the difference of its two operands.

    -

    Note that the 'sub' instruction is used to represent the 'neg' -instruction present in most other intermediate representations.

    + +

    Note that the 'sub' instruction is used to represent the +'neg' instruction present in most other intermediate +representations.

    +
    Arguments:
    -

    The two arguments to the 'sub' instruction must be either integer or floating point -values. -This instruction can also take vector versions of the values. -Both arguments must have identical types.

    + +

    The two arguments to the 'sub' instruction must be integer, floating point, + or vector values. Both arguments must have identical + types.

    +
    Semantics:
    +

    The value produced is the integer or floating point difference of the two operands.

    +

    If an integer difference has unsigned overflow, the result returned is the mathematical result modulo 2n, where n is the bit width of the result.

    +

    Because LLVM integers use a two's complement representation, this instruction is appropriate for both signed and unsigned integers.

    +
    Example:
       <result> = sub i32 4, %var          ; yields {i32}:result = 4 - %var
       <result> = sub i32 0, %val          ; yields {i32}:result = -%var
     
    + - + +
    +
    Syntax:
      <result> = mul <ty> <var1>, <var2>   ; yields {ty}:result
     
    Overview:

    The 'mul' instruction returns the product of its two operands.

    +
    Arguments:
    -

    The two arguments to the 'mul' instruction must be either integer or floating point -values. -This instruction can also take vector versions of the values. -Both arguments must have identical types.

    + +

    The two arguments to the 'mul' instruction must be integer, floating point, +or vector values. Both arguments must have identical +types.

    +
    Semantics:
    +

    The value produced is the integer or floating point product of the two operands.

    +

    If the result of an integer multiplication has unsigned overflow, the result returned is the mathematical result modulo 2n, where n is the bit width of the result.

    @@ -2184,6 +2223,7 @@
      <result> = mul i32 4, %var          ; yields {i32}:result = 4 * %var
     
    + @@ -2194,12 +2234,15 @@
    Overview:

    The 'udiv' instruction returns the quotient of its two operands.

    +
    Arguments:
    +

    The two arguments to the 'udiv' instruction must be -integer values. Both arguments must have identical -types. This instruction can also take vector versions -of the values in which case the elements must be integers.

    +integer or vector of integer +values. Both arguments must have identical types.

    +
    Semantics:
    +

    The value produced is the unsigned integer quotient of the two operands.

    Note that unsigned integer division and signed integer division are distinct operations; for signed integer division, use 'sdiv'.

    @@ -2213,16 +2256,21 @@
    Syntax:
    -
      <result> = sdiv <ty> <var1>, <var2>   ; yields {ty}:result
    +
    +  <result> = sdiv <ty> <var1>, <var2>   ; yields {ty}:result
     
    +
    Overview:
    +

    The 'sdiv' instruction returns the quotient of its two operands.

    +
    Arguments:
    -

    The two arguments to the 'sdiv' instruction must be -integer values. Both arguments must have identical -types. This instruction can also take vector versions -of the values in which case the elements must be integers.

    + +

    The two arguments to the 'sdiv' instruction must be +integer or vector of integer +values. Both arguments must have identical types.

    +
    Semantics:

    The value produced is the signed integer quotient of the two operands rounded towards zero.

    Note that signed integer division and unsigned integer division are distinct @@ -2239,22 +2287,31 @@ Instruction

    Syntax:
    -
      <result> = fdiv <ty> <var1>, <var2>   ; yields {ty}:result
    +
    +  <result> = fdiv <ty> <var1>, <var2>   ; yields {ty}:result
     
    Overview:
    +

    The 'fdiv' instruction returns the quotient of its two operands.

    +
    Arguments:
    +

    The two arguments to the 'fdiv' instruction must be -floating point values. Both arguments must have -identical types. This instruction can also take vector -versions of floating point values.

    +floating point or vector +of floating point values. Both arguments must have identical types.

    +
    Semantics:
    +

    The value produced is the floating point quotient of the two operands.

    +
    Example:
    -
      <result> = fdiv float 4.0, %var          ; yields {float}:result = 4.0 / %var
    +
    +
    +  <result> = fdiv float 4.0, %var          ; yields {float}:result = 4.0 / %var
     
    + @@ -2266,10 +2323,9 @@

    The 'urem' instruction returns the remainder from the unsigned division of its two arguments.

    Arguments:
    -

    The two arguments to the 'urem' instruction must be -integer values. Both arguments must have identical -types. This instruction can also take vector versions -of the values in which case the elements must be integers.

    +

    The two arguments to the 'urem' instruction must be +integer or vector of integer +values. Both arguments must have identical types.

    Semantics:

    This instruction returns the unsigned integer remainder of a division. This instruction always performs an unsigned division to get the remainder.

    @@ -2282,23 +2338,33 @@ - + +
    +
    Syntax:
    -
      <result> = srem <ty> <var1>, <var2>   ; yields {ty}:result
    +
    +
    +  <result> = srem <ty> <var1>, <var2>   ; yields {ty}:result
     
    +
    Overview:
    +

    The 'srem' instruction returns the remainder from the signed division of its two operands. This instruction can also take vector versions of the values in which case the elements must be integers.

    Arguments:
    +

    The two arguments to the 'srem' instruction must be -integer values. Both arguments must have identical -types.

    +integer or vector of integer +values. Both arguments must have identical types.

    +
    Semantics:
    +

    This instruction returns the remainder of a division (where the result has the same sign as the dividend, var1), not the modulo operator (where the result has the same sign as the divisor, var2) of @@ -2321,9 +2387,11 @@

    - + +
    +
    Syntax:
      <result> = frem <ty> <var1>, <var2>   ; yields {ty}:result
     
    @@ -2332,14 +2400,18 @@ division of its two operands.

    Arguments:

    The two arguments to the 'frem' instruction must be -floating point values. Both arguments must have -identical types. This instruction can also take vector -versions of floating point values.

    +floating point or vector +of floating point values. Both arguments must have identical types.

    +
    Semantics:
    +

    This instruction returns the remainder of a division. The remainder has the same sign as the dividend.

    +
    Example:
    -
      <result> = frem float 4.0, %var          ; yields {float}:result = 4.0 % %var
    +
    +
    +  <result> = frem float 4.0, %var          ; yields {float}:result = 4.0 % %var
     
    @@ -2371,7 +2443,8 @@

    Both arguments to the 'shl' instruction must be the same integer type. 'var2' is treated as an -unsigned value.

    +unsigned value. This instruction does not support +vector operands.

    Semantics:
    @@ -2401,7 +2474,8 @@
    Arguments:

    Both arguments to the 'lshr' instruction must be the same integer type. 'var2' is treated as an -unsigned value.

    +unsigned value. This instruction does not support +vector operands.

    Semantics:
    @@ -2436,7 +2510,8 @@
    Arguments:

    Both arguments to the 'ashr' instruction must be the same integer type. 'var2' is treated as an -unsigned value.

    +unsigned value. This instruction does not support +vector operands.

    Semantics:

    This instruction always performs an arithmetic shift right operation, @@ -2458,17 +2533,26 @@

    +
    +
    Syntax:
    -
      <result> = and <ty> <var1>, <var2>   ; yields {ty}:result
    +
    +
    +  <result> = and <ty> <var1>, <var2>   ; yields {ty}:result
     
    +
    Overview:
    +

    The 'and' instruction returns the bitwise logical and of its two operands.

    +
    Arguments:
    -

    The two arguments to the 'and' instruction must be integer values. Both arguments must have -identical types.

    + +

    The two arguments to the 'and' instruction must be +integer or vector of integer +values. Both arguments must have identical types.

    +
    Semantics:

    The truth table used for the 'and' instruction is:

    @@ -2504,7 +2588,8 @@
    Example:
    -
      <result> = and i32 4, %var         ; yields {i32}:result = 4 & %var
    +
    +  <result> = and i32 4, %var         ; yields {i32}:result = 4 & %var
       <result> = and i32 15, 40          ; yields {i32}:result = 8
       <result> = and i32 4, 8            ; yields {i32}:result = 0
     
    @@ -2519,9 +2604,10 @@

    The 'or' instruction returns the bitwise logical inclusive or of its two operands.

    Arguments:
    -

    The two arguments to the 'or' instruction must be integer values. Both arguments must have -identical types.

    + +

    The two arguments to the 'or' instruction must be +integer or vector of integer +values. Both arguments must have identical types.

    Semantics:

    The truth table used for the 'or' instruction is:

    @@ -2574,10 +2660,12 @@ or of its two operands. The xor is used to implement the "one's complement" operation, which is the "~" operator in C.

    Arguments:
    -

    The two arguments to the 'xor' instruction must be integer values. Both arguments must have -identical types.

    +

    The two arguments to the 'xor' instruction must be +integer or vector of integer +values. Both arguments must have identical types.

    +
    Semantics:
    +

    The truth table used for the 'xor' instruction is:

    @@ -3658,15 +3746,19 @@
    Overview:
    +

    The 'bitcast' instruction converts value to type ty2 without changing any bits.

    Arguments:
    +

    The 'bitcast' instruction takes a value to cast, which must be a first class value, and a type to cast it to, which must also be a first class type. The bit sizes of value and the destination type, ty2, must be identical. If the source -type is a pointer, the destination type must also be a pointer.

    +type is a pointer, the destination type must also be a pointer. This +instruction supports bitwise conversion of vectors to integers and to vectors +of other types (as long as they have the same size).

    Semantics:

    The 'bitcast' instruction converts value to type @@ -3881,8 +3973,8 @@

    Example:
    -  <result> = vicmp eq <2 x i32> < i32 4, i32 0 >, < i32 5, i32 0 >   ; yields: result=<2 x i32> < i32 0, i32 -1 >
    -  <result> = vicmp ult <2 x i8> < i8 1, i8 2 >, < i8 2, i8 2>        ; yields: result=<2 x i8> < i8 -1, i8 0 >
    +  <result> = vicmp eq <2 x i32> < i32 4, i32 0>, < i32 5, i32 0>   ; yields: result=<2 x i32> < i32 0, i32 -1 >
    +  <result> = vicmp ult <2 x i8 > < i8 1, i8 2>, < i8 2, i8 2 >        ; yields: result=<2 x i8> < i8 -1, i8 0 >
     
    @@ -3935,36 +4027,50 @@
    Example:
    -  <result> = vfcmp oeq <2 x float> < float 4, float 0 >, < float 5, float 0 >       ; yields: result=<2 x i32> < i32 0, i32 -1 >
    -  <result> = vfcmp ult <2 x double> < double 1, double 2 >, < double 2, double 2>   ; yields: result=<2 x i64> < i64 -1, i64 0 >
    +  <result> = vfcmp oeq <2 x float> < float 4, float 0 >, < float 5, float 0 >       ; yields: result=<2 x i32> < i32 0, i32 -1 >
    +  <result> = vfcmp ult <2 x double> < double 1, double 2 >, < double 2, double 2>   ; yields: result=<2 x i64> < i64 -1, i64 0 >
     
    - + +
    +
    Syntax:
    +
      <result> = phi <ty> [ <val0>, <label0>], ...
    Overview:

    The 'phi' instruction is used to implement the φ node in the SSA graph representing the function.

    Arguments:
    +

    The type of the incoming values is specified with the first type field. After this, the 'phi' instruction takes a list of pairs as arguments, with one pair for each predecessor basic block of the current block. Only values of first class type may be used as the value arguments to the PHI node. Only labels may be used as the label arguments.

    +

    There must be no non-phi instructions between the start of a basic block and the PHI instructions: i.e. PHI instructions must be first in a basic block.

    +
    Semantics:
    +

    At runtime, the 'phi' instruction logically takes on the value specified by the pair corresponding to the predecessor basic block that executed just prior to the current block.

    +
    Example:
    -
    Loop:       ; Infinite loop that counts from 0 on up...
    %indvar = phi i32 [ 0, %LoopHeader ], [ %nextindvar, %Loop ]
    %nextindvar = add i32 %indvar, 1
    br label %Loop
    +
    +Loop:       ; Infinite loop that counts from 0 on up...
    +  %indvar = phi i32 [ 0, %LoopHeader ], [ %nextindvar, %Loop ]
    +  %nextindvar = add i32 %indvar, 1
    +  br label %Loop
    +
    @@ -3991,13 +4097,16 @@
    Arguments:

    -The 'select' instruction requires a boolean value indicating the condition, and two values of the same first class type. +The 'select' instruction requires an 'i1' value indicating the +condition, and two values of the same first class +type. If the val1/val2 are vectors, the entire vectors are selected, not +individual elements.

    Semantics:

    -If the boolean condition evaluates to true, the instruction returns the first +If the i1 condition evaluates is 1, the instruction returns the first value argument; otherwise, it returns the second value argument.

    From nicolas.geoffray at lip6.fr Tue May 20 15:48:23 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 20 May 2008 20:48:23 -0000 Subject: [llvm-commits] [vmkit] r51336 - /vmkit/trunk/lib/JnJVM/VMCore/JavaString.cpp Message-ID: <200805202048.m4KKmNJN007313@zion.cs.uiuc.edu> Author: geoffray Date: Tue May 20 15:48:23 2008 New Revision: 51336 URL: http://llvm.org/viewvc/llvm-project?rev=51336&view=rev Log: Call doNew instead of operator(), because we don't want to check initialization. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaString.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaString.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaString.cpp?rev=51336&r1=51335&r2=51336&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaString.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaString.cpp Tue May 20 15:48:23 2008 @@ -17,7 +17,7 @@ JavaString* JavaString::stringDup(const UTF8*& utf8, Jnjvm* vm) { - JavaString* res = (JavaString*)(*Classpath::newString)(vm); + JavaString* res = (JavaString*)Classpath::newString->doNew(vm); // no need to call the function // Classpath::initString->run(res, utf8, 0, utf8->size, true); res->value = utf8; From nicolas.geoffray at lip6.fr Tue May 20 15:49:16 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 20 May 2008 20:49:16 -0000 Subject: [llvm-commits] [vmkit] r51337 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaConstantPool.cpp JavaConstantPool.h Message-ID: <200805202049.m4KKnH5A007343@zion.cs.uiuc.edu> Author: geoffray Date: Tue May 20 15:49:16 2008 New Revision: 51337 URL: http://llvm.org/viewvc/llvm-project?rev=51337&view=rev Log: Inline simple functions. Bugfix in IntegerAt, FloatAt, DoubleAt and UTF8At Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp?rev=51337&r1=51336&r2=51337&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp Tue May 20 15:49:16 2008 @@ -20,7 +20,6 @@ #include "JavaConstantPool.h" #include "JavaJIT.h" #include "Jnjvm.h" -#include "JnjvmModule.h" #include "JnjvmModuleProvider.h" #include "JavaThread.h" #include "JavaTypes.h" @@ -225,21 +224,9 @@ } } -bool JavaCtpInfo::isAStaticCall(uint32 index) { - return (ctpType[index] & 0x80) != 0; -} - -void JavaCtpInfo::markAsStaticCall(uint32 index) { - ctpType[index] |= 0x80; -} - -uint8 JavaCtpInfo::typeAt(uint32 index) { - return ctpType[index] & 0x7F; -} - const UTF8* JavaCtpInfo::UTF8At(uint32 entry) { - if (! (entry > 0) && (entry < ctpSize) && - typeAt(entry) == ConstantUTF8) { + if (! ((entry > 0) && (entry < ctpSize) && + typeAt(entry) == ConstantUTF8)) { JavaThread::get()->isolate->error(Jnjvm::ClassFormatError, "bad constant pool number for utf8 at entry %d", entry); } @@ -247,8 +234,8 @@ } float JavaCtpInfo::FloatAt(uint32 entry) { - if (! (entry > 0) && (entry < ctpSize) && - typeAt(entry) == ConstantFloat) { + if (! ((entry > 0) && (entry < ctpSize) && + typeAt(entry) == ConstantFloat)) { JavaThread::get()->isolate->error(Jnjvm::ClassFormatError, "bad constant pool number for float at entry %d", entry); } @@ -256,8 +243,8 @@ } sint32 JavaCtpInfo::IntegerAt(uint32 entry) { - if (! (entry > 0) && (entry < ctpSize) && - typeAt(entry) == ConstantInteger) { + if (! ((entry > 0) && (entry < ctpSize) && + typeAt(entry) == ConstantInteger)) { JavaThread::get()->isolate->error(Jnjvm::ClassFormatError, "bad constant pool number for integer at entry %d", entry); } @@ -265,8 +252,8 @@ } sint64 JavaCtpInfo::LongAt(uint32 entry) { - if (! (entry > 0) && (entry < ctpSize) && - typeAt(entry) == ConstantLong) { + if (! ((entry > 0) && (entry < ctpSize) && + typeAt(entry) == ConstantLong)) { JavaThread::get()->isolate->error(Jnjvm::ClassFormatError, "bad constant pool number for long at entry %d", entry); } @@ -274,8 +261,8 @@ } double JavaCtpInfo::DoubleAt(uint32 entry) { - if (! (entry > 0) && (entry < ctpSize) && - typeAt(entry) == ConstantDouble) { + if (! ((entry > 0) && (entry < ctpSize) && + typeAt(entry) == ConstantDouble)) { JavaThread::get()->isolate->error(Jnjvm::ClassFormatError, "bad constant pool number for double at entry %d", entry); } @@ -283,8 +270,8 @@ } CommonClass* JavaCtpInfo::isLoadedClassOrClassName(uint32 entry) { - if (! (entry > 0) && (entry < ctpSize) && - typeAt(entry) == ConstantClass) { + if (! ((entry > 0) && (entry < ctpSize) && + typeAt(entry) == ConstantClass)) { JavaThread::get()->isolate->error(Jnjvm::ClassFormatError, "bad constant pool number for class at entry %d", entry); } @@ -302,7 +289,7 @@ if (!temp) { JavaObject* loader = classDef->classLoader; const UTF8* name = UTF8At(ctpDef[index]); - if (name->at(0) == AssessorDesc::I_TAB) { + if (name->elements[0] == AssessorDesc::I_TAB) { // Don't put into ctpRes because the class can be isolate specific temp = JavaThread::get()->isolate->constructArray(name, loader); } else { Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h?rev=51337&r1=51336&r2=51337&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h Tue May 20 15:49:16 2008 @@ -89,10 +89,18 @@ static void read(Jnjvm *vm, Class* cl, Reader* reader); - bool isAStaticCall(uint32 index); - void markAsStaticCall(uint32 index); + bool isAStaticCall(uint32 index) { + return (ctpType[index] & 0x80) != 0; + } + + void markAsStaticCall(uint32 index) { + ctpType[index] |= 0x80; + } + + uint8 typeAt(uint32 index) { + return ctpType[index] & 0x7F; + } - uint8 typeAt(uint32 index); const UTF8* UTF8At(uint32 entry); float FloatAt(uint32 entry); sint32 IntegerAt(uint32 entry); From nicolas.geoffray at lip6.fr Tue May 20 15:50:04 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 20 May 2008 20:50:04 -0000 Subject: [llvm-commits] [vmkit] r51338 - /vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp Message-ID: <200805202050.m4KKo4CY007381@zion.cs.uiuc.edu> Author: geoffray Date: Tue May 20 15:50:04 2008 New Revision: 51338 URL: http://llvm.org/viewvc/llvm-project?rev=51338&view=rev Log: Use switch/case instead of if/else Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp?rev=51338&r1=51337&r2=51338&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp Tue May 20 15:50:04 2008 @@ -19,8 +19,6 @@ #include "JavaThread.h" #include "JavaTypes.h" #include "Jnjvm.h" -#include "JnjvmModule.h" - using namespace jnjvm; @@ -173,58 +171,72 @@ void AssessorDesc::analyseIntern(const UTF8* name, uint32 pos, uint32 meth, AssessorDesc*& ass, uint32& ret) { - short int cur = name->at(pos); - if (cur == I_PARG) { - ass = dParg; - ret = pos + 1; - } else if (cur == I_PARD) { - ass = dPard; - ret = pos + 1; - } else if (cur == I_BOOL) { - ass = dBool; - ret = pos + 1; - } else if (cur == I_BYTE) { - ass = dByte; - ret = pos + 1; - } else if (cur == I_CHAR) { - ass = dChar; - ret = pos + 1; - } else if (cur == I_SHORT) { - ass = dShort; - ret = pos + 1; - } else if (cur == I_INT) { - ass = dInt; - ret = pos + 1; - } else if (cur == I_FLOAT) { - ass = dFloat; - ret = pos + 1; - } else if (cur == I_DOUBLE) { - ass = dDouble; - ret = pos + 1; - } else if (cur == I_LONG) { - ass = dLong; - ret = pos + 1; - } else if (cur == I_VOID) { - ass = dVoid; - ret = pos + 1; - } else if (cur == I_TAB) { - if (meth == 1) { - pos++; - } else { - AssessorDesc * typeIntern = dTab; - while (name->at(++pos) == I_TAB) {} - analyseIntern(name, pos, 1, typeIntern, pos); - } - ass = dTab; - ret = pos; - } else if (cur == I_REF) { - if (meth != 2) { - while (name->at(++pos) != I_END_REF) {} - } - ass = dRef; - ret = pos + 1; - } else { - typeError(name, cur); + short int cur = name->elements[pos]; + switch (cur) { + case I_PARG : + ass = dParg; + ret = pos + 1; + break; + case I_PARD : + ass = dPard; + ret = pos + 1; + break; + case I_BOOL : + ass = dBool; + ret = pos + 1; + break; + case I_BYTE : + ass = dByte; + ret = pos + 1; + break; + case I_CHAR : + ass = dChar; + ret = pos + 1; + break; + case I_SHORT : + ass = dShort; + ret = pos + 1; + break; + case I_INT : + ass = dInt; + ret = pos + 1; + break; + case I_FLOAT : + ass = dFloat; + ret = pos + 1; + break; + case I_DOUBLE : + ass = dDouble; + ret = pos + 1; + break; + case I_LONG : + ass = dLong; + ret = pos + 1; + break; + case I_VOID : + ass = dVoid; + ret = pos + 1; + break; + case I_TAB : + if (meth == 1) { + pos++; + } else { + AssessorDesc * typeIntern = dTab; + while (name->elements[++pos] == I_TAB) {} + analyseIntern(name, pos, 1, typeIntern, pos); + } + ass = dTab; + ret = pos; + break; + case I_REF : + if (meth != 2) { + while (name->elements[++pos] != I_END_REF) {} + } + ass = dRef; + ret = pos + 1; + break; + default : + typeError(name, cur); } } @@ -241,7 +253,7 @@ } else { uint32 len = className->size; uint32 pos = steps; - AssessorDesc * funcs = (className->at(0) == I_TAB ? dTab : dRef); + AssessorDesc * funcs = (className->elements[0] == I_TAB ? dTab : dRef); uint32 n = steps + len + (funcs == dRef ? 2 : 0); uint16* buf = (uint16*)alloca(n * sizeof(uint16)); @@ -255,7 +267,7 @@ } for (uint32 i = 0; i < len; i++) { - buf[pos + i] = className->at(i); + buf[pos + i] = className->elements[i]; } if (funcs == dRef) { @@ -352,26 +364,27 @@ } AssessorDesc* AssessorDesc::byteIdToPrimitive(char id) { - if (id == I_FLOAT) { - return dFloat; - } else if (id == I_INT) { - return dInt; - } else if (id == I_SHORT) { - return dShort; - } else if (id == I_CHAR) { - return dChar; - } else if (id == I_DOUBLE) { - return dDouble; - } else if (id == I_BYTE) { - return dByte; - } else if (id == I_BOOL) { - return dBool; - } else if (id == I_LONG) { - return dLong; - } else if (id == I_VOID) { - return dVoid; - } else { - return 0; + switch (id) { + case I_FLOAT : + return dFloat; + case I_INT : + return dInt; + case I_SHORT : + return dShort; + case I_CHAR : + return dChar; + case I_DOUBLE : + return dDouble; + case I_BYTE : + return dByte; + case I_BOOL : + return dBool; + case I_LONG : + return dLong; + case I_VOID : + return dVoid; + default : + return 0; } } From nicolas.geoffray at lip6.fr Tue May 20 15:50:37 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 20 May 2008 20:50:37 -0000 Subject: [llvm-commits] [vmkit] r51339 - /vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h Message-ID: <200805202050.m4KKobb2007410@zion.cs.uiuc.edu> Author: geoffray Date: Tue May 20 15:50:37 2008 New Revision: 51339 URL: http://llvm.org/viewvc/llvm-project?rev=51339&view=rev Log: Cleanup includes. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h?rev=51339&r1=51338&r2=51339&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h Tue May 20 15:50:37 2008 @@ -17,12 +17,15 @@ #include "types.h" -#include "JavaArray.h" -#include "JavaThread.h" #include "Jnjvm.h" namespace jnjvm { +class ArrayObject; +class JavaThread; +class JavaObject; +class ThreadSystem; + class ThreadSystem : public mvm::Object { public: static VirtualTable* VT; From nicolas.geoffray at lip6.fr Tue May 20 15:51:17 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 20 May 2008 20:51:17 -0000 Subject: [llvm-commits] [vmkit] r51340 - /vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h Message-ID: <200805202051.m4KKpHrH007434@zion.cs.uiuc.edu> Author: geoffray Date: Tue May 20 15:51:17 2008 New Revision: 51340 URL: http://llvm.org/viewvc/llvm-project?rev=51340&view=rev Log: Cleanup includes. Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h?rev=51340&r1=51339&r2=51340&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModuleProvider.h Tue May 20 15:51:17 2008 @@ -12,8 +12,6 @@ #include -#include "LockedMap.h" - using namespace llvm; namespace jnjvm { From nicolas.geoffray at lip6.fr Tue May 20 15:52:29 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 20 May 2008 20:52:29 -0000 Subject: [llvm-commits] [vmkit] r51341 - /vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Message-ID: <200805202052.m4KKqTOY007477@zion.cs.uiuc.edu> Author: geoffray Date: Tue May 20 15:52:29 2008 New Revision: 51341 URL: http://llvm.org/viewvc/llvm-project?rev=51341&view=rev Log: JavaObjectTracerFunction only exists in tracer mode. Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=51341&r1=51340&r2=51341&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Tue May 20 15:52:29 2008 @@ -63,6 +63,7 @@ #ifdef WITH_TRACER llvm::Function* JnjvmModule::MarkAndTraceFunction = 0; +llvm::Function* JnjvmModule::JavaObjectTracerFunction = 0; #endif llvm::Function* JnjvmModule::GetSJLJBufferFunction = 0; llvm::Function* JnjvmModule::ThrowExceptionFunction = 0; @@ -76,7 +77,6 @@ llvm::Function* JnjvmModule::NegativeArraySizeExceptionFunction = 0; llvm::Function* JnjvmModule::OutOfMemoryErrorFunction = 0; llvm::Function* JnjvmModule::JavaObjectAllocateFunction = 0; -llvm::Function* JnjvmModule::JavaObjectTracerFunction = 0; llvm::Function* JnjvmModule::InterfaceLookupFunction = 0; llvm::Function* JnjvmModule::FieldLookupFunction = 0; #ifndef WITHOUT_VTABLE From nicolas.geoffray at lip6.fr Tue May 20 15:53:54 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 20 May 2008 20:53:54 -0000 Subject: [llvm-commits] [vmkit] r51342 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaIsolate.cpp JavaUpcalls.cpp Message-ID: <200805202053.m4KKrs6W007525@zion.cs.uiuc.edu> Author: geoffray Date: Tue May 20 15:53:53 2008 New Revision: 51342 URL: http://llvm.org/viewvc/llvm-project?rev=51342&view=rev Log: Manually initialize bootstrap classes. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp?rev=51342&r1=51341&r2=51342&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp Tue May 20 15:53:53 2008 @@ -18,9 +18,9 @@ #include "JavaIsolate.h" #include "JavaJIT.h" #include "JavaString.h" +#include "JavaThread.h" #include "JavaTypes.h" #include "JavaUpcalls.h" -#include "JnjvmModule.h" #include "JnjvmModuleProvider.h" #include "LockedMap.h" #include "Zip.h" @@ -323,6 +323,16 @@ } void JavaIsolate::loadBootstrap() { + loadName(Classpath::newClass->name, + CommonClass::jnjvmClassLoader, true, true, true); + loadName(Classpath::newConstructor->name, + CommonClass::jnjvmClassLoader, true, true, true); + loadName(Classpath::newMethod->name, + CommonClass::jnjvmClassLoader, true, true, true); + loadName(Classpath::newField->name, + CommonClass::jnjvmClassLoader, true, true, true); + loadName(Classpath::newStackTraceElement->name, + CommonClass::jnjvmClassLoader, true, true, true); mapInitialThread(); loadAppClassLoader(); JavaObject* obj = JavaThread::currentThread(); @@ -403,7 +413,7 @@ ArrayObject* args = ArrayObject::acons(argc - 2, JavaArray::ofString, this); for (int i = 2; i < argc; ++i) { - args->setAt(i - 2, (JavaObject*)asciizToStr(argv[i])); + args->elements[i - 2] = (JavaObject*)asciizToStr(argv[i]); } executeClass(info.className, args); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp?rev=51342&r1=51341&r2=51342&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp Tue May 20 15:53:53 2008 @@ -167,6 +167,8 @@ } void ClasspathThread::createInitialThread(Jnjvm* vm, JavaObject* th) { + vm->loadName(newVMThread->name, newVMThread->classLoader, true, true, true); + JavaObject* vmth = (*newVMThread)(vm); name->setVirtualObjectField(th, (JavaObject*)vm->asciizToStr("main")); priority->setVirtualInt32Field(th, (uint32)1); @@ -174,12 +176,17 @@ vmThread->setVirtualObjectField(th, vmth); assocThread->setVirtualObjectField(vmth, th); running->setVirtualInt8Field(vmth, (uint32)1); + + rootGroup->classDef->isolate->loadName(rootGroup->classDef->name, + rootGroup->classDef->classLoader, + true, true, true); JavaObject* RG = rootGroup->getStaticObjectField(); group->setVirtualObjectField(th, RG); groupAddThread->invokeIntSpecial(vm, RG, th); } void ClasspathThread::mapInitialThread(Jnjvm* vm) { + vm->loadName(newThread->name, newThread->classLoader, true, true, true); JavaObject* th = (*newThread)(vm); createInitialThread(vm, th); JavaThread* myth = JavaThread::get(); From nicolas.geoffray at lip6.fr Tue May 20 15:54:51 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 20 May 2008 20:54:51 -0000 Subject: [llvm-commits] [vmkit] r51343 - /vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h Message-ID: <200805202054.m4KKspYi007565@zion.cs.uiuc.edu> Author: geoffray Date: Tue May 20 15:54:51 2008 New Revision: 51343 URL: http://llvm.org/viewvc/llvm-project?rev=51343&view=rev Log: Cleanup includes and set the macro header. Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h?rev=51343&r1=51342&r2=51343&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h Tue May 20 15:54:51 2008 @@ -7,9 +7,10 @@ // //===----------------------------------------------------------------------===// -#include +#ifndef JNJVM_MODULE_H +#define JNJVM_MODULE_H -#include "JavaTypes.h" +#include #include "llvm/Constant.h" #include "llvm/DerivedTypes.h" @@ -38,7 +39,7 @@ llvm::ConstantInt* sizeInBytesConstant; static void initialise(); - static LLVMAssessorInfo AssessorInfo[NUM_ASSESSORS]; + static LLVMAssessorInfo AssessorInfo[]; }; @@ -366,3 +367,5 @@ }; } + +#endif From nicolas.geoffray at lip6.fr Tue May 20 15:56:21 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 20 May 2008 20:56:21 -0000 Subject: [llvm-commits] [vmkit] r51344 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaArray.cpp JavaRuntimeJIT.cpp Jnjvm.cpp LockedMap.cpp NativeUtil.cpp Message-ID: <200805202056.m4KKuLCi007644@zion.cs.uiuc.edu> Author: geoffray Date: Tue May 20 15:56:21 2008 New Revision: 51344 URL: http://llvm.org/viewvc/llvm-project?rev=51344&view=rev Log: Do inline accesses on arrays. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaArray.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp vmkit/trunk/lib/JnJVM/VMCore/LockedMap.cpp vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaArray.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaArray.cpp?rev=51344&r1=51343&r2=51344&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaArray.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaArray.cpp Tue May 20 15:56:21 2008 @@ -199,7 +199,7 @@ unsigned int len) const { uint16* java = (uint16*) alloca(len * sizeof(uint16)); for (uint32 i = 0; i < len; i++) { - uint16 cur = at(start + i); + uint16 cur = elements[start + i]; if (cur == '.') java[i] = '/'; else java[i] = cur; } @@ -211,7 +211,7 @@ unsigned int len) const { uint16* java = (uint16*) alloca(len * sizeof(uint16)); for (uint32 i = 0; i < len; i++) { - uint16 cur = at(start + i); + uint16 cur = elements[start + i]; if (cur == '/') java[i] = '.'; else java[i] = cur; } @@ -224,7 +224,7 @@ uint16* buf = (uint16*)alloca(sizeof(uint16) * len); for (uint32 i = 0; i < len; i++) { - buf[i] = at(i + start); + buf[i] = elements[i + start]; } return readerConstruct(vm, buf, len); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp?rev=51344&r1=51343&r2=51344&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp Tue May 20 15:56:21 2008 @@ -248,8 +248,8 @@ arrayCtor_t newCtor = func->arrayCtor; if (dims[0] > 0) { for (sint32 i = 0; i < dims[0]; ++i) { - res->setAt(i, multiCallNewIntern(newCtor, base, (len - 1), &dims[1], - vm)); + res->elements[i] = multiCallNewIntern(newCtor, base, (len - 1), + &dims[1], vm); } } else { for (uint32 i = 1; i < len; ++i) { Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp?rev=51344&r1=51343&r2=51344&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp Tue May 20 15:56:21 2008 @@ -28,7 +28,6 @@ #include "JavaTypes.h" #include "JavaUpcalls.h" #include "Jnjvm.h" -#include "JnjvmModule.h" #include "JnjvmModuleProvider.h" #include "LockedMap.h" #include "Reader.h" @@ -576,7 +575,7 @@ if (len == 0) { return 0; - } else if (name->at(0) == AssessorDesc::I_TAB) { + } else if (name->elements[0] == AssessorDesc::I_TAB) { while (doLoop) { --len; @@ -584,12 +583,12 @@ doLoop = false; } else { ++start; - if (name->at(start) != AssessorDesc::I_TAB) { - if (name->at(start) == AssessorDesc::I_REF) { + if (name->elements[start] != AssessorDesc::I_TAB) { + if (name->elements[start] == AssessorDesc::I_REF) { uint32 size = (uint32)name->size; if ((size == (start + 1)) || (size == (start + 2)) || - (name->at(start + 1) == AssessorDesc::I_TAB) || - (utf8->at(origLen - 1) != AssessorDesc::I_END_REF)) { + (name->elements[start + 1] == AssessorDesc::I_TAB) || + (utf8->elements[origLen - 1] != AssessorDesc::I_END_REF)) { doLoop = false; } else { const UTF8* componentName = utf8->javaToInternal(this, start + 1, @@ -604,7 +603,7 @@ } } } else { - uint16 cur = name->at(start); + uint16 cur = name->elements[start]; if ((cur == AssessorDesc::I_BOOL || cur == AssessorDesc::I_BYTE || cur == AssessorDesc::I_CHAR || cur == AssessorDesc::I_SHORT || cur == AssessorDesc::I_INT || cur == AssessorDesc::I_FLOAT || Modified: vmkit/trunk/lib/JnJVM/VMCore/LockedMap.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/LockedMap.cpp?rev=51344&r1=51343&r2=51344&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/LockedMap.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/LockedMap.cpp Tue May 20 15:56:21 2008 @@ -46,7 +46,7 @@ if (len != size) return false; else { for (sint32 i = 0; i < len; i++) { - if (asciiz[i] != val->at(i)) return false; + if (asciiz[i] != val->elements[i]) return false; } return true; } @@ -92,7 +92,7 @@ if (res == 0) { UTF8* tmp = (UTF8*)UTF8::acons(size, JavaArray::ofChar, vm); for (sint32 i = 0; i < size; i++) { - tmp->setAt(i, asciiz[i]); + tmp->elements[i] = asciiz[i]; } res = (const UTF8*)tmp; map.insert(std::make_pair(key, res)); Modified: vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp?rev=51344&r1=51343&r2=51344&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp Tue May 20 15:56:21 2008 @@ -388,7 +388,7 @@ sint32 index = 0; for (std::vector::iterator i = args.begin(), e = args.end(); i != e; ++i, ++index) { - res->setAt(index, getClassType(loader, (*i))); + res->elements[index] = getClassType(loader, (*i)); } return res; From gohman at apple.com Tue May 20 15:56:34 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 May 2008 20:56:34 -0000 Subject: [llvm-commits] [llvm] r51345 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200805202056.m4KKuYGX007658@zion.cs.uiuc.edu> Author: djg Date: Tue May 20 15:56:33 2008 New Revision: 51345 URL: http://llvm.org/viewvc/llvm-project?rev=51345&view=rev Log: Code simplification. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=51345&r1=51344&r2=51345&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue May 20 15:56:33 2008 @@ -2776,20 +2776,18 @@ if (N0.getOpcode() == ISD::SIGN_EXTEND || N0.getOpcode() == ISD::ANY_EXTEND) return DAG.getNode(ISD::SIGN_EXTEND, VT, N0.getOperand(0)); - // fold (sext (truncate (load x))) -> (sext (smaller load x)) - // fold (sext (truncate (srl (load x), c))) -> (sext (smaller load (x+c/n))) if (N0.getOpcode() == ISD::TRUNCATE) { + // fold (sext (truncate (load x))) -> (sext (smaller load x)) + // fold (sext (truncate (srl (load x), c))) -> (sext (smaller load (x+c/n))) SDOperand NarrowLoad = ReduceLoadWidth(N0.Val); if (NarrowLoad.Val) { if (NarrowLoad.Val != N0.Val) CombineTo(N0.Val, NarrowLoad); return DAG.getNode(ISD::SIGN_EXTEND, VT, NarrowLoad); } - } - // See if the value being truncated is already sign extended. If so, just - // eliminate the trunc/sext pair. - if (N0.getOpcode() == ISD::TRUNCATE) { + // See if the value being truncated is already sign extended. If so, just + // eliminate the trunc/sext pair. SDOperand Op = N0.getOperand(0); unsigned OpBits = MVT::getSizeInBits(Op.getValueType()); unsigned MidBits = MVT::getSizeInBits(N0.getValueType()); From nicolas.geoffray at lip6.fr Tue May 20 15:57:41 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 20 May 2008 20:57:41 -0000 Subject: [llvm-commits] [vmkit] r51346 - in /vmkit/trunk/lib/JnJVM/Classpath: ClasspathVMClass.cpp ClasspathVMStackWalker.cpp ClasspathVMThrowable.cpp Message-ID: <200805202057.m4KKvfLx007702@zion.cs.uiuc.edu> Author: geoffray Date: Tue May 20 15:57:41 2008 New Revision: 51346 URL: http://llvm.org/viewvc/llvm-project?rev=51346&view=rev Log: Perform inline accesses on arrays. Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp?rev=51346&r1=51345&r2=51346&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp Tue May 20 15:57:41 2008 @@ -100,7 +100,7 @@ // TODO: check parameter types JavaObject* tmp = (*Classpath::newConstructor)(vm); Classpath::initConstructor->invokeIntSpecial(vm, tmp, Cl, meth); - ret->setAt(index, tmp); + ret->elements[index] = tmp; } return (jobject)ret; } @@ -146,7 +146,7 @@ JavaObject* tmp = (*Classpath::newMethod)(vm); Classpath::initMethod->invokeIntSpecial(vm, tmp, Cl, vm->UTF8ToStr(meth->name), meth); - ret->setAt(index, tmp); + ret->elements[index] = tmp; } return (jobject)ret; } @@ -325,7 +325,7 @@ JavaObject* tmp = (*Classpath::newField)(vm); Classpath::initField->invokeIntSpecial(vm, tmp, Cl, vm->UTF8ToStr(field->name), field); - ret->setAt(index, tmp); + ret->elements[index] = tmp; } return (jobject)ret; } @@ -345,7 +345,7 @@ for (std::vector::iterator i = interfaces.begin(), e = interfaces.end(); i != e; ++i, ++index) { Class* klass = *i; - ret->setAt(index, vm->getClassDelegatee(klass)); + ret->elements[index] = vm->getClassDelegatee(klass); } return (jobject)ret; } Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp?rev=51346&r1=51345&r2=51346&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMStackWalker.cpp Tue May 20 15:57:41 2008 @@ -31,7 +31,7 @@ JavaMethod* meth = JavaJIT::IPToJavaMethod(stack[first]); if (meth) { ArrayObject* res = recGetClassContext(stack, size, first + 1, rec + 1); - res->setAt(rec, meth->classDef->getClassDelegatee()); + res->elements[rec] = meth->classDef->getClassDelegatee(); return res; } else { return recGetClassContext(stack, size, first + 1, rec); Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp?rev=51346&r1=51345&r2=51346&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp Tue May 20 15:57:41 2008 @@ -82,7 +82,7 @@ JavaMethod* meth = JavaJIT::IPToJavaMethod(begIp); if (meth) { ArrayObject* res = recGetStackTrace(stack, first + 1, rec + 1); - res->setAt(rec, consStackElement(meth, stack[first])); + res->elements[rec] = consStackElement(meth, stack[first]); return res; } else { return recGetStackTrace(stack, first + 1, rec); From nicolas.geoffray at lip6.fr Tue May 20 15:58:35 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Tue, 20 May 2008 20:58:35 -0000 Subject: [llvm-commits] [vmkit] r51347 - /vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp Message-ID: <200805202058.m4KKwZnt007736@zion.cs.uiuc.edu> Author: geoffray Date: Tue May 20 15:58:35 2008 New Revision: 51347 URL: http://llvm.org/viewvc/llvm-project?rev=51347&view=rev Log: Implement VMObjectStreamClass and VMArray native methods. Modified: vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp Modified: vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp?rev=51347&r1=51346&r2=51347&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/Classpath.cpp Tue May 20 15:58:35 2008 @@ -51,6 +51,125 @@ return false; } +JNIEXPORT void JNICALL Java_java_io_VMObjectStreamClass_setBooleanNative( +#ifdef NATIVE_JNI +JNIEnv *env, +jclass clazz, +#endif +jobject Field, jobject obj, jboolean val) { + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); + field->setVirtualInt8Field((JavaObject*)obj, (uint8)val); +} + +JNIEXPORT void JNICALL Java_java_io_VMObjectStreamClass_setByteNative( +#ifdef NATIVE_JNI +JNIEnv *env, +jclass clazz, +#endif +jobject Field, jobject obj, jbyte val) { + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); + field->setVirtualInt8Field((JavaObject*)obj, (uint8)val); +} + +JNIEXPORT void JNICALL Java_java_io_VMObjectStreamClass_setCharNative( +#ifdef NATIVE_JNI +JNIEnv *env, +jclass clazz, +#endif +jobject Field, jobject obj, jchar val) { + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); + field->setVirtualInt16Field((JavaObject*)obj, (uint16)val); +} + +JNIEXPORT void JNICALL Java_java_io_VMObjectStreamClass_setShortNative( +#ifdef NATIVE_JNI +JNIEnv *env, +jclass clazz, +#endif +jobject Field, jobject obj, jshort val) { + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); + field->setVirtualInt16Field((JavaObject*)obj, (sint16)val); +} + +JNIEXPORT void JNICALL Java_java_io_VMObjectStreamClass_setIntNative( +#ifdef NATIVE_JNI +JNIEnv *env, +jclass clazz, +#endif +jobject Field, jobject obj, jint val) { + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); + field->setVirtualInt32Field((JavaObject*)obj, (sint32)val); +} + +JNIEXPORT void JNICALL Java_java_io_VMObjectStreamClass_setLongNative( +#ifdef NATIVE_JNI +JNIEnv *env, +jclass clazz, +#endif +jobject Field, jobject obj, jlong val) { + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); + field->setVirtualLongField((JavaObject*)obj, (sint64)val); +} + +JNIEXPORT void JNICALL Java_java_io_VMObjectStreamClass_setFloatNative( +#ifdef NATIVE_JNI +JNIEnv *env, +jclass clazz, +#endif +jobject Field, jobject obj, jfloat val) { + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); + field->setVirtualFloatField((JavaObject*)obj, (float)val); +} + +JNIEXPORT void JNICALL Java_java_io_VMObjectStreamClass_setDoubleNative( +#ifdef NATIVE_JNI +JNIEnv *env, +jclass clazz, +#endif +jobject Field, jobject obj, jdouble val) { + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); + field->setVirtualDoubleField((JavaObject*)obj, (double)val); +} + +JNIEXPORT void JNICALL Java_java_io_VMObjectStreamClass_setObjectNative( +#ifdef NATIVE_JNI +JNIEnv *env, +jclass clazz, +#endif +jobject Field, jobject obj, jobject val) { + JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); + field->setVirtualObjectField((JavaObject*)obj, (JavaObject*)val); +} + +JNIEXPORT jobject JNICALL Java_java_io_VMObjectInputStream_allocateObject( +#ifdef NATIVE_JNI +JNIEnv *env, +jclass clazz, +#endif +jclass target, jclass constr, jobject cons) { + Jnjvm* vm = JavaThread::get()->isolate; + Class* cl = (Class*)NativeUtil::resolvedImplClass(target, true); + JavaObject* res = cl->doNew(vm); + JavaMethod* meth = (JavaMethod*)(Classpath::constructorSlot->getVirtualInt32Field((JavaObject*)cons)); + meth->invokeIntSpecial(vm, res); + return (jobject)res; +} + +JNIEXPORT jobject JNICALL +Java_java_lang_reflect_VMArray_createObjectArray + ( +#ifdef NATIVE_JNI + JNIEnv * env, + jclass thisClass __attribute__ ((__unused__)), +#endif + jclass arrayType, jint arrayLength) +{ + Jnjvm* vm = JavaThread::get()->isolate; + ClassArray* cl = (ClassArray*)NativeUtil::resolvedImplClass(arrayType, true); + return (jobject) ArrayObject::acons((sint32)arrayLength, cl, vm); +} + + JNIEXPORT bool JNICALL Java_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8( #ifdef NATIVE_JNI JNIEnv *env, From gohman at apple.com Tue May 20 15:59:51 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 May 2008 20:59:51 -0000 Subject: [llvm-commits] [llvm] r51348 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Message-ID: <200805202059.m4KKxpA5007778@zion.cs.uiuc.edu> Author: djg Date: Tue May 20 15:59:51 2008 New Revision: 51348 URL: http://llvm.org/viewvc/llvm-project?rev=51348&view=rev Log: Port the fix for the select operator from instcombine's ComputeNumSignBits to SelectionDAG's ComputeNumSignBits. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=51348&r1=51347&r2=51348&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue May 20 15:59:51 2008 @@ -1690,9 +1690,9 @@ return std::min(Tmp, Tmp2); case ISD::SELECT: - Tmp = ComputeNumSignBits(Op.getOperand(0), Depth+1); + Tmp = ComputeNumSignBits(Op.getOperand(1), Depth+1); if (Tmp == 1) return 1; // Early out. - Tmp2 = ComputeNumSignBits(Op.getOperand(1), Depth+1); + Tmp2 = ComputeNumSignBits(Op.getOperand(2), Depth+1); return std::min(Tmp, Tmp2); case ISD::SETCC: From ggreif at gmail.com Tue May 20 16:00:04 2008 From: ggreif at gmail.com (Gabor Greif) Date: Tue, 20 May 2008 21:00:04 -0000 Subject: [llvm-commits] [llvm] r51349 - in /llvm/trunk/test: Analysis/Andersens/ Analysis/BasicAA/ Analysis/Dominators/ Analysis/GlobalsModRef/ Analysis/LoadVN/ Analysis/LoopInfo/ Analysis/PostDominators/ Archive/ Assembler/ Bitcode/ C++Frontend/ CFrontend/ CodeGen/ARM/ CodeGen/CBackend/ CodeGen/CellSPU/ CodeGen/Generic/ CodeGen/Generic/GC/ CodeGen/IA64/ CodeGen/PowerPC/ CodeGen/SPARC/ CodeGen/X86/ DebugInfo/ ExecutionEngine/ Feature/ Integer/ Linker/ Other/ Transforms/ADCE/ Transforms/ArgumentPromotion/ Transforms/BlockPlaceme... Message-ID: <200805202100.m4KL06EO007871@zion.cs.uiuc.edu> Author: ggreif Date: Tue May 20 16:00:03 2008 New Revision: 51349 URL: http://llvm.org/viewvc/llvm-project?rev=51349&view=rev Log: sabre brings to my attention that the 'tr' suffix is also obsolete Modified: llvm/trunk/test/Analysis/Andersens/dg.exp llvm/trunk/test/Analysis/BasicAA/dg.exp llvm/trunk/test/Analysis/Dominators/dg.exp llvm/trunk/test/Analysis/GlobalsModRef/dg.exp llvm/trunk/test/Analysis/LoadVN/dg.exp llvm/trunk/test/Analysis/LoopInfo/dg.exp llvm/trunk/test/Analysis/PostDominators/dg.exp llvm/trunk/test/Archive/dg.exp llvm/trunk/test/Assembler/dg.exp llvm/trunk/test/Bitcode/dg.exp llvm/trunk/test/C++Frontend/dg.exp llvm/trunk/test/CFrontend/dg.exp llvm/trunk/test/CodeGen/ARM/dg.exp llvm/trunk/test/CodeGen/CBackend/dg.exp llvm/trunk/test/CodeGen/CellSPU/dg.exp llvm/trunk/test/CodeGen/Generic/GC/dg.exp llvm/trunk/test/CodeGen/Generic/dg.exp llvm/trunk/test/CodeGen/IA64/dg.exp llvm/trunk/test/CodeGen/PowerPC/dg.exp llvm/trunk/test/CodeGen/SPARC/dg.exp llvm/trunk/test/CodeGen/X86/dg.exp llvm/trunk/test/DebugInfo/dg.exp llvm/trunk/test/ExecutionEngine/dg.exp llvm/trunk/test/Feature/dg.exp llvm/trunk/test/Integer/dg.exp llvm/trunk/test/Linker/dg.exp llvm/trunk/test/Other/dg.exp llvm/trunk/test/Transforms/ADCE/dg.exp llvm/trunk/test/Transforms/ArgumentPromotion/dg.exp llvm/trunk/test/Transforms/BlockPlacement/dg.exp llvm/trunk/test/Transforms/CodeExtractor/dg.exp llvm/trunk/test/Transforms/ConstProp/dg.exp llvm/trunk/test/Transforms/ConstantMerge/dg.exp llvm/trunk/test/Transforms/DeadArgElim/dg.exp llvm/trunk/test/Transforms/DeadStoreElimination/dg.exp llvm/trunk/test/Transforms/GCSE/dg.exp llvm/trunk/test/Transforms/GVN/dg.exp llvm/trunk/test/Transforms/GVNPRE/dg.exp llvm/trunk/test/Transforms/GlobalDCE/dg.exp llvm/trunk/test/Transforms/GlobalOpt/dg.exp llvm/trunk/test/Transforms/IPConstantProp/dg.exp llvm/trunk/test/Transforms/IndVarsSimplify/dg.exp llvm/trunk/test/Transforms/Inline/dg.exp llvm/trunk/test/Transforms/InstCombine/dg.exp llvm/trunk/test/Transforms/Internalize/dg.exp llvm/trunk/test/Transforms/LCSSA/dg.exp llvm/trunk/test/Transforms/LICM/dg.exp llvm/trunk/test/Transforms/LoopDeletion/dg.exp llvm/trunk/test/Transforms/LoopIndexSplit/dg.exp llvm/trunk/test/Transforms/LoopRotate/dg.exp llvm/trunk/test/Transforms/LoopSimplify/dg.exp llvm/trunk/test/Transforms/LoopStrengthReduce/dg.exp llvm/trunk/test/Transforms/LoopUnroll/dg.exp llvm/trunk/test/Transforms/LoopUnswitch/dg.exp llvm/trunk/test/Transforms/LowerInvoke/dg.exp llvm/trunk/test/Transforms/LowerSetJmp/dg.exp llvm/trunk/test/Transforms/LowerSwitch/dg.exp llvm/trunk/test/Transforms/Mem2Reg/dg.exp llvm/trunk/test/Transforms/MemCpyOpt/dg.exp llvm/trunk/test/Transforms/PredicateSimplifier/dg.exp llvm/trunk/test/Transforms/PruneEH/dg.exp llvm/trunk/test/Transforms/RaiseAllocations/dg.exp llvm/trunk/test/Transforms/Reassociate/dg.exp llvm/trunk/test/Transforms/SCCP/dg.exp llvm/trunk/test/Transforms/SRETPromotion/dg.exp llvm/trunk/test/Transforms/ScalarRepl/dg.exp llvm/trunk/test/Transforms/SimplifyCFG/dg.exp llvm/trunk/test/Transforms/SimplifyLibCalls/dg.exp llvm/trunk/test/Transforms/StripSymbols/dg.exp llvm/trunk/test/Transforms/TailCallElim/dg.exp llvm/trunk/test/Transforms/TailDup/dg.exp llvm/trunk/test/Verifier/dg.exp Modified: llvm/trunk/test/Analysis/Andersens/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/Andersens/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Analysis/Andersens/dg.exp (original) +++ llvm/trunk/test/Analysis/Andersens/dg.exp Tue May 20 16:00:03 2008 @@ -1,4 +1,4 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Analysis/BasicAA/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/BasicAA/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Analysis/BasicAA/dg.exp (original) +++ llvm/trunk/test/Analysis/BasicAA/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Analysis/Dominators/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/Dominators/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Analysis/Dominators/dg.exp (original) +++ llvm/trunk/test/Analysis/Dominators/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Analysis/GlobalsModRef/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/GlobalsModRef/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Analysis/GlobalsModRef/dg.exp (original) +++ llvm/trunk/test/Analysis/GlobalsModRef/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Analysis/LoadVN/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoadVN/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Analysis/LoadVN/dg.exp (original) +++ llvm/trunk/test/Analysis/LoadVN/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Analysis/LoopInfo/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopInfo/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Analysis/LoopInfo/dg.exp (original) +++ llvm/trunk/test/Analysis/LoopInfo/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Analysis/PostDominators/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/PostDominators/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Analysis/PostDominators/dg.exp (original) +++ llvm/trunk/test/Analysis/PostDominators/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Archive/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Archive/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Archive/dg.exp (original) +++ llvm/trunk/test/Archive/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Assembler/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Assembler/dg.exp (original) +++ llvm/trunk/test/Assembler/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Bitcode/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Bitcode/dg.exp (original) +++ llvm/trunk/test/Bitcode/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/C++Frontend/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/C++Frontend/dg.exp (original) +++ llvm/trunk/test/C++Frontend/dg.exp Tue May 20 16:00:03 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if [ llvm_gcc_supports c++ ] then { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] } Modified: llvm/trunk/test/CFrontend/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/CFrontend/dg.exp (original) +++ llvm/trunk/test/CFrontend/dg.exp Tue May 20 16:00:03 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if [ llvm_gcc_supports c ] then { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] } Modified: llvm/trunk/test/CodeGen/ARM/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/ARM/dg.exp (original) +++ llvm/trunk/test/CodeGen/ARM/dg.exp Tue May 20 16:00:03 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if { [llvm_supports_target ARM] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] } Modified: llvm/trunk/test/CodeGen/CBackend/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CBackend/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/CBackend/dg.exp (original) +++ llvm/trunk/test/CodeGen/CBackend/dg.exp Tue May 20 16:00:03 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if { [llvm_supports_target CBackend] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] } Modified: llvm/trunk/test/CodeGen/CellSPU/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CellSPU/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/CellSPU/dg.exp (original) +++ llvm/trunk/test/CodeGen/CellSPU/dg.exp Tue May 20 16:00:03 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if { [llvm_supports_target CellSPU] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] } Modified: llvm/trunk/test/CodeGen/Generic/GC/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/GC/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Generic/GC/dg.exp (original) +++ llvm/trunk/test/CodeGen/Generic/GC/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/CodeGen/Generic/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Generic/dg.exp (original) +++ llvm/trunk/test/CodeGen/Generic/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/CodeGen/IA64/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/IA64/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/IA64/dg.exp (original) +++ llvm/trunk/test/CodeGen/IA64/dg.exp Tue May 20 16:00:03 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if { [llvm_supports_target IA64] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] } Modified: llvm/trunk/test/CodeGen/PowerPC/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/PowerPC/dg.exp (original) +++ llvm/trunk/test/CodeGen/PowerPC/dg.exp Tue May 20 16:00:03 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if { [llvm_supports_target PowerPC] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] } Modified: llvm/trunk/test/CodeGen/SPARC/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/SPARC/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/SPARC/dg.exp (original) +++ llvm/trunk/test/CodeGen/SPARC/dg.exp Tue May 20 16:00:03 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if { [llvm_supports_target Sparc] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] } Modified: llvm/trunk/test/CodeGen/X86/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/dg.exp (original) +++ llvm/trunk/test/CodeGen/X86/dg.exp Tue May 20 16:00:03 2008 @@ -1,5 +1,5 @@ load_lib llvm.exp if { [llvm_supports_target X86] } { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] } Modified: llvm/trunk/test/DebugInfo/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/DebugInfo/dg.exp (original) +++ llvm/trunk/test/DebugInfo/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/ExecutionEngine/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/dg.exp (original) +++ llvm/trunk/test/ExecutionEngine/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Feature/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Feature/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Feature/dg.exp (original) +++ llvm/trunk/test/Feature/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Integer/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Integer/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Integer/dg.exp (original) +++ llvm/trunk/test/Integer/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Linker/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Linker/dg.exp (original) +++ llvm/trunk/test/Linker/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Other/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Other/dg.exp (original) +++ llvm/trunk/test/Other/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/ADCE/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ADCE/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/ADCE/dg.exp (original) +++ llvm/trunk/test/Transforms/ADCE/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/ArgumentPromotion/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ArgumentPromotion/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/ArgumentPromotion/dg.exp (original) +++ llvm/trunk/test/Transforms/ArgumentPromotion/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/BlockPlacement/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/BlockPlacement/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/BlockPlacement/dg.exp (original) +++ llvm/trunk/test/Transforms/BlockPlacement/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/CodeExtractor/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/CodeExtractor/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/CodeExtractor/dg.exp (original) +++ llvm/trunk/test/Transforms/CodeExtractor/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/ConstProp/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ConstProp/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/ConstProp/dg.exp (original) +++ llvm/trunk/test/Transforms/ConstProp/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/ConstantMerge/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ConstantMerge/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/ConstantMerge/dg.exp (original) +++ llvm/trunk/test/Transforms/ConstantMerge/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/DeadArgElim/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadArgElim/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/DeadArgElim/dg.exp (original) +++ llvm/trunk/test/Transforms/DeadArgElim/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/DeadStoreElimination/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/DeadStoreElimination/dg.exp (original) +++ llvm/trunk/test/Transforms/DeadStoreElimination/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/GCSE/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GCSE/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/GCSE/dg.exp (original) +++ llvm/trunk/test/Transforms/GCSE/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/GVN/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/GVN/dg.exp (original) +++ llvm/trunk/test/Transforms/GVN/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/GVNPRE/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVNPRE/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/GVNPRE/dg.exp (original) +++ llvm/trunk/test/Transforms/GVNPRE/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/GlobalDCE/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalDCE/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/GlobalDCE/dg.exp (original) +++ llvm/trunk/test/Transforms/GlobalDCE/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/GlobalOpt/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/GlobalOpt/dg.exp (original) +++ llvm/trunk/test/Transforms/GlobalOpt/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/IPConstantProp/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IPConstantProp/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/IPConstantProp/dg.exp (original) +++ llvm/trunk/test/Transforms/IPConstantProp/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/IndVarsSimplify/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarsSimplify/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/IndVarsSimplify/dg.exp (original) +++ llvm/trunk/test/Transforms/IndVarsSimplify/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/Inline/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Inline/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/Inline/dg.exp (original) +++ llvm/trunk/test/Transforms/Inline/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/InstCombine/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/dg.exp (original) +++ llvm/trunk/test/Transforms/InstCombine/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/Internalize/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Internalize/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/Internalize/dg.exp (original) +++ llvm/trunk/test/Transforms/Internalize/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/LCSSA/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LCSSA/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LCSSA/dg.exp (original) +++ llvm/trunk/test/Transforms/LCSSA/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/LICM/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LICM/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LICM/dg.exp (original) +++ llvm/trunk/test/Transforms/LICM/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/LoopDeletion/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopDeletion/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopDeletion/dg.exp (original) +++ llvm/trunk/test/Transforms/LoopDeletion/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/LoopIndexSplit/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopIndexSplit/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopIndexSplit/dg.exp (original) +++ llvm/trunk/test/Transforms/LoopIndexSplit/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/LoopRotate/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopRotate/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopRotate/dg.exp (original) +++ llvm/trunk/test/Transforms/LoopRotate/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/LoopSimplify/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopSimplify/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopSimplify/dg.exp (original) +++ llvm/trunk/test/Transforms/LoopSimplify/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/LoopStrengthReduce/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopStrengthReduce/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopStrengthReduce/dg.exp (original) +++ llvm/trunk/test/Transforms/LoopStrengthReduce/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/LoopUnroll/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopUnroll/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopUnroll/dg.exp (original) +++ llvm/trunk/test/Transforms/LoopUnroll/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/LoopUnswitch/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopUnswitch/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LoopUnswitch/dg.exp (original) +++ llvm/trunk/test/Transforms/LoopUnswitch/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/LowerInvoke/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LowerInvoke/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LowerInvoke/dg.exp (original) +++ llvm/trunk/test/Transforms/LowerInvoke/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/LowerSetJmp/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LowerSetJmp/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LowerSetJmp/dg.exp (original) +++ llvm/trunk/test/Transforms/LowerSetJmp/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/LowerSwitch/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LowerSwitch/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/LowerSwitch/dg.exp (original) +++ llvm/trunk/test/Transforms/LowerSwitch/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/Mem2Reg/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Mem2Reg/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/Mem2Reg/dg.exp (original) +++ llvm/trunk/test/Transforms/Mem2Reg/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/MemCpyOpt/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/MemCpyOpt/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/MemCpyOpt/dg.exp (original) +++ llvm/trunk/test/Transforms/MemCpyOpt/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/PredicateSimplifier/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/PredicateSimplifier/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/PredicateSimplifier/dg.exp (original) +++ llvm/trunk/test/Transforms/PredicateSimplifier/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/PruneEH/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/PruneEH/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/PruneEH/dg.exp (original) +++ llvm/trunk/test/Transforms/PruneEH/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/RaiseAllocations/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/RaiseAllocations/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/RaiseAllocations/dg.exp (original) +++ llvm/trunk/test/Transforms/RaiseAllocations/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/Reassociate/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Reassociate/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/Reassociate/dg.exp (original) +++ llvm/trunk/test/Transforms/Reassociate/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/SCCP/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SCCP/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/SCCP/dg.exp (original) +++ llvm/trunk/test/Transforms/SCCP/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/SRETPromotion/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SRETPromotion/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/SRETPromotion/dg.exp (original) +++ llvm/trunk/test/Transforms/SRETPromotion/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/ScalarRepl/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ScalarRepl/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/ScalarRepl/dg.exp (original) +++ llvm/trunk/test/Transforms/ScalarRepl/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/SimplifyCFG/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/SimplifyCFG/dg.exp (original) +++ llvm/trunk/test/Transforms/SimplifyCFG/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/SimplifyLibCalls/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyLibCalls/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/SimplifyLibCalls/dg.exp (original) +++ llvm/trunk/test/Transforms/SimplifyLibCalls/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/StripSymbols/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/StripSymbols/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/StripSymbols/dg.exp (original) +++ llvm/trunk/test/Transforms/StripSymbols/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/TailCallElim/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/TailCallElim/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/TailCallElim/dg.exp (original) +++ llvm/trunk/test/Transforms/TailCallElim/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Transforms/TailDup/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/TailDup/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Transforms/TailDup/dg.exp (original) +++ llvm/trunk/test/Transforms/TailDup/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] Modified: llvm/trunk/test/Verifier/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/dg.exp?rev=51349&r1=51348&r2=51349&view=diff ============================================================================== --- llvm/trunk/test/Verifier/dg.exp (original) +++ llvm/trunk/test/Verifier/dg.exp Tue May 20 16:00:03 2008 @@ -1,3 +1,3 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,tr}]] +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] From gohman at apple.com Tue May 20 16:01:13 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 May 2008 21:01:13 -0000 Subject: [llvm-commits] [llvm] r51350 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/sext-misc.ll Message-ID: <200805202101.m4KL1DPW007913@zion.cs.uiuc.edu> Author: djg Date: Tue May 20 16:01:12 2008 New Revision: 51350 URL: http://llvm.org/viewvc/llvm-project?rev=51350&view=rev Log: Port SelectionDAG's ComputeNumSignBits-using code to instcombine, now that instcombine also has ComputeNumSignBits. Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp llvm/trunk/test/Transforms/InstCombine/sext-misc.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51350&r1=51349&r2=51350&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Tue May 20 16:01:12 2008 @@ -2085,7 +2085,7 @@ case Instruction::AShr: Tmp = ComputeNumSignBits(U->getOperand(0), Depth+1); - // SRA X, C -> adds C sign bits. + // ashr X, C -> adds C sign bits. if (ConstantInt *C = dyn_cast(U->getOperand(1))) { Tmp += C->getZExtValue(); if (Tmp > TyBits) Tmp = TyBits; @@ -8195,6 +8195,33 @@ } } } + + // See if the value being truncated is already sign extended. If so, just + // eliminate the trunc/sext pair. + if (getOpcode(Src) == Instruction::Trunc) { + Value *Op = cast(Src)->getOperand(0); + unsigned OpBits = cast(Op->getType())->getBitWidth(); + unsigned MidBits = cast(Src->getType())->getBitWidth(); + unsigned DestBits = cast(CI.getType())->getBitWidth(); + unsigned NumSignBits = ComputeNumSignBits(Op); + + if (OpBits == DestBits) { + // Op is i32, Mid is i8, and Dest is i32. If Op has more than 24 sign + // bits, it is already ready. + if (NumSignBits > DestBits-MidBits) + return ReplaceInstUsesWith(CI, Op); + } else if (OpBits < DestBits) { + // Op is i32, Mid is i8, and Dest is i64. If Op has more than 24 sign + // bits, just sext from i32. + if (NumSignBits > OpBits-MidBits) + return new SExtInst(Op, CI.getType(), "tmp"); + } else { + // Op is i64, Mid is i8, and Dest is i32. If Op has more than 56 sign + // bits, just truncate to i32. + if (NumSignBits > OpBits-MidBits) + return new TruncInst(Op, CI.getType(), "tmp"); + } + } return 0; } Modified: llvm/trunk/test/Transforms/InstCombine/sext-misc.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/sext-misc.ll?rev=51350&r1=51349&r2=51350&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/sext-misc.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/sext-misc.ll Tue May 20 16:01:12 2008 @@ -43,3 +43,10 @@ %s = sext i32 %u to i64 ret i64 %s } +define i32 @woo(i8 %a, i32 %f, i1 %p, i32* %z) { + %d = ashr i32 %f, 24 + %e = select i1 %p, i32 %d, i32 0 + %s = trunc i32 %e to i16 + %n = sext i16 %s to i32 + ret i32 %n +} From gohman at apple.com Tue May 20 16:19:36 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 May 2008 21:19:36 -0000 Subject: [llvm-commits] [llvm] r51351 - /llvm/trunk/test/Transforms/InstCombine/sext-misc.ll Message-ID: <200805202119.m4KLJaOF008472@zion.cs.uiuc.edu> Author: djg Date: Tue May 20 16:19:36 2008 New Revision: 51351 URL: http://llvm.org/viewvc/llvm-project?rev=51351&view=rev Log: Oops, commit the version of this test that actually works. Modified: llvm/trunk/test/Transforms/InstCombine/sext-misc.ll Modified: llvm/trunk/test/Transforms/InstCombine/sext-misc.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/sext-misc.ll?rev=51351&r1=51350&r2=51351&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/sext-misc.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/sext-misc.ll Tue May 20 16:19:36 2008 @@ -44,7 +44,7 @@ ret i64 %s } define i32 @woo(i8 %a, i32 %f, i1 %p, i32* %z) { - %d = ashr i32 %f, 24 + %d = lshr i32 %f, 24 %e = select i1 %p, i32 %d, i32 0 %s = trunc i32 %e to i16 %n = sext i16 %s to i32 From dalej at apple.com Tue May 20 16:47:38 2008 From: dalej at apple.com (Dale Johannesen) Date: Tue, 20 May 2008 21:47:38 -0000 Subject: [llvm-commits] [test-suite] r51352 - in /test-suite/trunk/SingleSource: Regression/C++/EH/Makefile Regression/C++/Makefile UnitTests/Integer/Makefile UnitTests/SetjmpLongjmp/C++/Makefile Message-ID: <200805202147.m4KLlc70009203@zion.cs.uiuc.edu> Author: johannes Date: Tue May 20 16:47:38 2008 New Revision: 51352 URL: http://llvm.org/viewvc/llvm-project?rev=51352&view=rev Log: Move definition of LDFLAGS ahead of the include that uses it. Modified: test-suite/trunk/SingleSource/Regression/C++/EH/Makefile test-suite/trunk/SingleSource/Regression/C++/Makefile test-suite/trunk/SingleSource/UnitTests/Integer/Makefile test-suite/trunk/SingleSource/UnitTests/SetjmpLongjmp/C++/Makefile Modified: test-suite/trunk/SingleSource/Regression/C++/EH/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C%2B%2B/EH/Makefile?rev=51352&r1=51351&r2=51352&view=diff ============================================================================== --- test-suite/trunk/SingleSource/Regression/C++/EH/Makefile (original) +++ test-suite/trunk/SingleSource/Regression/C++/EH/Makefile Tue May 20 16:47:38 2008 @@ -1,6 +1,6 @@ LEVEL = ../../../.. REQUIRES_EH_SUPPORT = 1 -include $(LEVEL)/SingleSource/Makefile.singlesrc CFLAGS += -std=c99 LDFLAGS += -lstdc++ +include $(LEVEL)/SingleSource/Makefile.singlesrc Modified: test-suite/trunk/SingleSource/Regression/C++/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C%2B%2B/Makefile?rev=51352&r1=51351&r2=51352&view=diff ============================================================================== --- test-suite/trunk/SingleSource/Regression/C++/Makefile (original) +++ test-suite/trunk/SingleSource/Regression/C++/Makefile Tue May 20 16:47:38 2008 @@ -6,6 +6,6 @@ # LEVEL = ../../.. DIRS=EH -include $(LEVEL)/SingleSource/Makefile.singlesrc CFLAGS += -std=c99 LDFLAGS += -lstdc++ +include $(LEVEL)/SingleSource/Makefile.singlesrc Modified: test-suite/trunk/SingleSource/UnitTests/Integer/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Integer/Makefile?rev=51352&r1=51351&r2=51352&view=diff ============================================================================== --- test-suite/trunk/SingleSource/UnitTests/Integer/Makefile (original) +++ test-suite/trunk/SingleSource/UnitTests/Integer/Makefile Tue May 20 16:47:38 2008 @@ -32,9 +32,9 @@ USE_REFERENCE_OUTPUT := 1 -include $(LEVEL)/SingleSource/Makefile.singlesrc LDFLAGS += -lstdc++ ifeq (1,$(ENABLE_LARGE_INTEGERS)) CPPFLAGS += -DENABLE_LARGE_INTEGERS endif +include $(LEVEL)/SingleSource/Makefile.singlesrc Modified: test-suite/trunk/SingleSource/UnitTests/SetjmpLongjmp/C++/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/SetjmpLongjmp/C%2B%2B/Makefile?rev=51352&r1=51351&r2=51352&view=diff ============================================================================== --- test-suite/trunk/SingleSource/UnitTests/SetjmpLongjmp/C++/Makefile (original) +++ test-suite/trunk/SingleSource/UnitTests/SetjmpLongjmp/C++/Makefile Tue May 20 16:47:38 2008 @@ -1,5 +1,5 @@ # SingleSource/UnitTests/SetjmpLongjmp/Makefile LEVEL = ../../../.. REQUIRES_EH_SUPPORT = 1 -include $(LEVEL)/SingleSource/Makefile.singlesrc LDFLAGS += -lstdc++ +include $(LEVEL)/SingleSource/Makefile.singlesrc From dalej at apple.com Tue May 20 16:53:45 2008 From: dalej at apple.com (Dale Johannesen) Date: Tue, 20 May 2008 21:53:45 -0000 Subject: [llvm-commits] [test-suite] r51353 - in /test-suite/trunk/External/SPEC/CFP2006: 444.namd/Makefile 447.dealII/Makefile 450.soplex/Makefile 453.povray/Makefile Message-ID: <200805202153.m4KLrjeR009407@zion.cs.uiuc.edu> Author: johannes Date: Tue May 20 16:53:44 2008 New Revision: 51353 URL: http://llvm.org/viewvc/llvm-project?rev=51353&view=rev Log: Move LDFLAGS definition ahead of include that uses it. Modified: test-suite/trunk/External/SPEC/CFP2006/444.namd/Makefile test-suite/trunk/External/SPEC/CFP2006/447.dealII/Makefile test-suite/trunk/External/SPEC/CFP2006/450.soplex/Makefile test-suite/trunk/External/SPEC/CFP2006/453.povray/Makefile Modified: test-suite/trunk/External/SPEC/CFP2006/444.namd/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CFP2006/444.namd/Makefile?rev=51353&r1=51352&r2=51353&view=diff ============================================================================== --- test-suite/trunk/External/SPEC/CFP2006/444.namd/Makefile (original) +++ test-suite/trunk/External/SPEC/CFP2006/444.namd/Makefile Tue May 20 16:53:44 2008 @@ -8,10 +8,11 @@ FP_ABSTOLERANCE = 0.00001 -include ../../Makefile.spec2006 RUN_OPTIONS = --input namd.input --iterations 1 --output namd.out STDOUT_FILENAME := namd.out LDFLAGS = -lstdc++ -lm LIBS = -lm + +include ../../Makefile.spec2006 Modified: test-suite/trunk/External/SPEC/CFP2006/447.dealII/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CFP2006/447.dealII/Makefile?rev=51353&r1=51352&r2=51353&view=diff ============================================================================== --- test-suite/trunk/External/SPEC/CFP2006/447.dealII/Makefile (original) +++ test-suite/trunk/External/SPEC/CFP2006/447.dealII/Makefile Tue May 20 16:53:44 2008 @@ -13,8 +13,6 @@ -DBOOST_DISABLE_THREADS \ -I$(SPEC_BENCH_DIR)/src/include -include ../../Makefile.spec2006 - ifeq ($(RUN_TYPE),test) RUN_OPTIONS := 8 else @@ -25,3 +23,5 @@ LDFLAGS = -lstdc++ -lm LIBS = -lm + +include ../../Makefile.spec2006 Modified: test-suite/trunk/External/SPEC/CFP2006/450.soplex/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CFP2006/450.soplex/Makefile?rev=51353&r1=51352&r2=51353&view=diff ============================================================================== --- test-suite/trunk/External/SPEC/CFP2006/450.soplex/Makefile (original) +++ test-suite/trunk/External/SPEC/CFP2006/450.soplex/Makefile Tue May 20 16:53:44 2008 @@ -8,8 +8,6 @@ FP_ABSTOLERANCE = 1.0e-5 -include ../../Makefile.spec2006 - CPPFLAGS += -DNDEBUG ifeq ($(RUN_TYPE),test) @@ -24,3 +22,5 @@ LDFLAGS = -lstdc++ -lm LIBS = -lstdc++ -lm + +include ../../Makefile.spec2006 Modified: test-suite/trunk/External/SPEC/CFP2006/453.povray/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CFP2006/453.povray/Makefile?rev=51353&r1=51352&r2=51353&view=diff ============================================================================== --- test-suite/trunk/External/SPEC/CFP2006/453.povray/Makefile (original) +++ test-suite/trunk/External/SPEC/CFP2006/453.povray/Makefile Tue May 20 16:53:44 2008 @@ -8,8 +8,6 @@ FP_ABSTOLERANCE = 0 -include ../../Makefile.spec2006 - ifeq ($(RUN_TYPE),test) FP_TOLERANCE = 0.0002 RUN_OPTIONS = SPEC-benchmark-test @@ -22,3 +20,6 @@ LDFLAGS = -lstdc++ -lm LIBS = -lstdc++ -lm + +include ../../Makefile.spec2006 + From dalej at apple.com Tue May 20 17:00:33 2008 From: dalej at apple.com (Dale Johannesen) Date: Tue, 20 May 2008 22:00:33 -0000 Subject: [llvm-commits] [test-suite] r51354 - in /test-suite/trunk/External/SPEC/CINT2006: 471.omnetpp/Makefile 473.astar/Makefile 483.xalancbmk/Makefile Message-ID: <200805202200.m4KM0XOX009595@zion.cs.uiuc.edu> Author: johannes Date: Tue May 20 17:00:33 2008 New Revision: 51354 URL: http://llvm.org/viewvc/llvm-project?rev=51354&view=rev Log: Move LDFLAGS definition after include that uses it. Modified: test-suite/trunk/External/SPEC/CINT2006/471.omnetpp/Makefile test-suite/trunk/External/SPEC/CINT2006/473.astar/Makefile test-suite/trunk/External/SPEC/CINT2006/483.xalancbmk/Makefile Modified: test-suite/trunk/External/SPEC/CINT2006/471.omnetpp/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2006/471.omnetpp/Makefile?rev=51354&r1=51353&r2=51354&view=diff ============================================================================== --- test-suite/trunk/External/SPEC/CINT2006/471.omnetpp/Makefile (original) +++ test-suite/trunk/External/SPEC/CINT2006/471.omnetpp/Makefile Tue May 20 17:00:33 2008 @@ -56,14 +56,14 @@ -I$(SPEC_BENCH_DIR)/src \ -I$(SPEC_BENCH_DIR)/src/include -include ../../Makefile.spec2006 - RUN_OPTIONS = omnetpp.ini STDOUT_FILENAME := omnetpp.log LDFLAGS = -lstdc++ -lm LIBS = -lm +include ../../Makefile.spec2006 + ##===----------------------------------------------------------------------===## # Copy the source files to the working directory. Some files may have # the same names but are in different directories, so we add a prefix Modified: test-suite/trunk/External/SPEC/CINT2006/473.astar/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2006/473.astar/Makefile?rev=51354&r1=51353&r2=51354&view=diff ============================================================================== --- test-suite/trunk/External/SPEC/CINT2006/473.astar/Makefile (original) +++ test-suite/trunk/External/SPEC/CINT2006/473.astar/Makefile Tue May 20 17:00:33 2008 @@ -8,8 +8,6 @@ FP_TOLERANCE = 0.001 -include ../../Makefile.spec2006 - ifeq ($(ENDIAN),big) CPPFLAGS += -DSPEC_CPU_BIG_ENDIAN else @@ -26,3 +24,6 @@ LDFLAGS = -lstdc++ -lm LIBS = -lm + +include ../../Makefile.spec2006 + Modified: test-suite/trunk/External/SPEC/CINT2006/483.xalancbmk/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2006/483.xalancbmk/Makefile?rev=51354&r1=51353&r2=51354&view=diff ============================================================================== --- test-suite/trunk/External/SPEC/CINT2006/483.xalancbmk/Makefile (original) +++ test-suite/trunk/External/SPEC/CINT2006/483.xalancbmk/Makefile Tue May 20 17:00:33 2008 @@ -19,8 +19,6 @@ -I$(SPEC_BENCH_DIR)/src/xercesc/util/Transcoders/Iconv \ -I$(SPEC_BENCH_DIR)/src/xalanc/include -include ../../Makefile.spec2006 - ifeq ($(OS),Darwin) CPPFLAGS += -DSPEC_CPU_MACOSX endif @@ -35,3 +33,6 @@ LDFLAGS = -lstdc++ -lm LIBS = -lstdc++ -lm + +include ../../Makefile.spec2006 + From dalej at apple.com Tue May 20 17:01:21 2008 From: dalej at apple.com (Dale Johannesen) Date: Tue, 20 May 2008 22:01:21 -0000 Subject: [llvm-commits] [test-suite] r51355 - /test-suite/trunk/External/SPEC/CINT2000/252.eon/Makefile Message-ID: <200805202201.m4KM1Lcu009636@zion.cs.uiuc.edu> Author: johannes Date: Tue May 20 17:01:21 2008 New Revision: 51355 URL: http://llvm.org/viewvc/llvm-project?rev=51355&view=rev Log: Move LDFLAGS definition ahead of include that uses it. Modified: test-suite/trunk/External/SPEC/CINT2000/252.eon/Makefile Modified: test-suite/trunk/External/SPEC/CINT2000/252.eon/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/252.eon/Makefile?rev=51355&r1=51354&r2=51355&view=diff ============================================================================== --- test-suite/trunk/External/SPEC/CINT2000/252.eon/Makefile (original) +++ test-suite/trunk/External/SPEC/CINT2000/252.eon/Makefile Tue May 20 17:01:21 2008 @@ -60,7 +60,6 @@ mrInstance.cc mrMaterial.cc mrPhongAreaTriangleLuminaire.cc \ mrSolidTexture.cc mrSphere.cc mrSurface.cc mrSurfaceTexture.cc \ mrXYRectangle.cc mrXZRectangle.cc mrYZRectangle.cc myrand.cc) -include ../../Makefile.spec2000 # Yes, we know this is an old crufty C++ benchmark. Don't tell us about it GCC! CXXFLAGS += -fno-exceptions -Wno-deprecated -Wno-non-template-friend @@ -68,3 +67,5 @@ LDFLAGS = -lstdc++ -lm LIBS = -lm +include ../../Makefile.spec2000 + From sabre at nondot.org Tue May 20 17:05:28 2008 From: sabre at nondot.org (Chris Lattner) Date: Tue, 20 May 2008 22:05:28 -0000 Subject: [llvm-commits] [llvm] r51356 - in /llvm/trunk: lib/Analysis/AliasSetTracker.cpp test/Transforms/LICM/2008-05-20-AliasSetVAArg.ll Message-ID: <200805202205.m4KM5SLp009755@zion.cs.uiuc.edu> Author: lattner Date: Tue May 20 17:05:28 2008 New Revision: 51356 URL: http://llvm.org/viewvc/llvm-project?rev=51356&view=rev Log: Fix PR2346 by marking vaarg as volatile so that licm doesn't try to hoist them. Added: llvm/trunk/test/Transforms/LICM/2008-05-20-AliasSetVAArg.ll Modified: llvm/trunk/lib/Analysis/AliasSetTracker.cpp Modified: llvm/trunk/lib/Analysis/AliasSetTracker.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasSetTracker.cpp?rev=51356&r1=51355&r2=51356&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/AliasSetTracker.cpp (original) +++ llvm/trunk/lib/Analysis/AliasSetTracker.cpp Tue May 20 17:05:28 2008 @@ -294,7 +294,10 @@ bool AliasSetTracker::add(VAArgInst *VAAI) { bool NewPtr; - addPointer(VAAI->getOperand(0), ~0, AliasSet::ModRef, NewPtr); + AliasSet &AS = addPointer(VAAI->getOperand(0), ~0, AliasSet::ModRef, NewPtr); + + // Treat vaarg instructions as volatile (not to be moved). + AS.setVolatile(); return NewPtr; } Added: llvm/trunk/test/Transforms/LICM/2008-05-20-AliasSetVAArg.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LICM/2008-05-20-AliasSetVAArg.ll?rev=51356&view=auto ============================================================================== --- llvm/trunk/test/Transforms/LICM/2008-05-20-AliasSetVAArg.ll (added) +++ llvm/trunk/test/Transforms/LICM/2008-05-20-AliasSetVAArg.ll Tue May 20 17:05:28 2008 @@ -0,0 +1,30 @@ +; RUN: llvm-as < %s | opt -licm -disable-output +; PR2346 +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" +target triple = "i686-pc-linux-gnu" + %struct._zval_struct = type { %union._double, i32, i8, i8, i8, i8 } + %union._double = type { double } + +define i8* @zend_fetch_resource(%struct._zval_struct** %passed_id, i32 %default_id, i8* %resource_type_name, i32* %found_resource_type, i32 %num_resource_types, ...) { +entry: + br label %whilebody.i.i + +whilebody.i.i: ; preds = %whilebody.i.i, %entry + br i1 false, label %ifthen.i.i, label %whilebody.i.i + +ifthen.i.i: ; preds = %whilebody.i.i + br label %forcond + +forcond: ; preds = %forbody, %ifthen.i.i + br i1 false, label %forbody, label %afterfor + +forbody: ; preds = %forcond + va_arg i8** null, i32 ; :0 [#uses=0] + br i1 false, label %ifthen59, label %forcond + +ifthen59: ; preds = %forbody + unreachable + +afterfor: ; preds = %forcond + ret i8* null +} From ggreif at gmail.com Tue May 20 17:07:22 2008 From: ggreif at gmail.com (Gabor Greif) Date: Tue, 20 May 2008 22:07:22 -0000 Subject: [llvm-commits] [llvm] r51357 - in /llvm/trunk/test: Assembler/ Bitcode/ CodeGen/Generic/ ExecutionEngine/ Feature/ Linker/ Transforms/Inline/ Transforms/InstCombine/ Verifier/ Message-ID: <200805202207.m4KM7Pu2009933@zion.cs.uiuc.edu> Author: ggreif Date: Tue May 20 17:07:21 2008 New Revision: 51357 URL: http://llvm.org/viewvc/llvm-project?rev=51357&view=rev Log: Eliminate questionable syntax for stdin redirection. This probably also speeds things up a bit. Modified: llvm/trunk/test/Assembler/2002-01-24-BadSymbolTableAssert.ll llvm/trunk/test/Assembler/2002-01-24-ValueRefineAbsType.ll llvm/trunk/test/Assembler/2002-02-19-TypeParsing.ll llvm/trunk/test/Assembler/2002-03-08-NameCollision.ll llvm/trunk/test/Assembler/2002-03-08-NameCollision2.ll llvm/trunk/test/Assembler/2002-04-04-PureVirtMethCall.ll llvm/trunk/test/Assembler/2002-04-04-PureVirtMethCall2.ll llvm/trunk/test/Assembler/2002-04-05-TypeParsing.ll llvm/trunk/test/Assembler/2002-05-02-InvalidForwardRef.ll llvm/trunk/test/Assembler/2002-07-08-HugePerformanceProblem.ll llvm/trunk/test/Assembler/2002-07-25-ParserAssertionFailure.ll llvm/trunk/test/Assembler/2002-08-15-CastAmbiguity.ll llvm/trunk/test/Assembler/2002-08-15-ConstantExprProblem.ll llvm/trunk/test/Assembler/2002-08-15-UnresolvedGlobalReference.ll llvm/trunk/test/Assembler/2002-08-22-DominanceProblem.ll llvm/trunk/test/Assembler/2002-10-08-LargeArrayPerformance.ll llvm/trunk/test/Assembler/2002-10-15-NameClash.ll llvm/trunk/test/Assembler/2002-12-15-GlobalResolve.ll llvm/trunk/test/Assembler/2003-01-30-UnsignedString.ll llvm/trunk/test/Assembler/2003-04-25-UnresolvedGlobalReference.ll llvm/trunk/test/Assembler/2003-05-15-AssemblerProblem.ll llvm/trunk/test/Assembler/2003-05-15-SwitchBug.ll llvm/trunk/test/Assembler/2003-05-21-ConstantShiftExpr.ll llvm/trunk/test/Assembler/2003-05-21-EmptyStructTest.ll llvm/trunk/test/Assembler/2003-06-30-RecursiveTypeProblem.ll llvm/trunk/test/Assembler/2003-10-04-NotMergingGlobalConstants.ll llvm/trunk/test/Assembler/2003-12-30-TypeMapInvalidMemory.ll llvm/trunk/test/Assembler/2004-02-27-SelfUseAssertError.ll llvm/trunk/test/Assembler/2004-04-04-GetElementPtrIndexTypes.ll llvm/trunk/test/Assembler/2004-09-29-VerifierIsReallySlow.ll llvm/trunk/test/Assembler/2004-10-22-BCWriterUndefBug.ll llvm/trunk/test/Assembler/2004-11-28-InvalidTypeCrash.ll llvm/trunk/test/Assembler/2005-01-31-CallingAggregateFunction.ll llvm/trunk/test/Assembler/2007-01-02-Undefined-Arg-Type.ll llvm/trunk/test/Assembler/2007-01-05-Cmp-ConstExpr.ll llvm/trunk/test/Assembler/2007-01-16-CrashOnBadCast.ll llvm/trunk/test/Assembler/2007-01-16-CrashOnBadCast2.ll llvm/trunk/test/Assembler/2007-04-15-BadIntrinsic.ll llvm/trunk/test/Assembler/select.ll llvm/trunk/test/Bitcode/memcpy.ll llvm/trunk/test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll llvm/trunk/test/CodeGen/Generic/spillccr.ll llvm/trunk/test/ExecutionEngine/2002-12-16-ArgTest.ll llvm/trunk/test/ExecutionEngine/2003-01-04-ArgumentBug.ll llvm/trunk/test/ExecutionEngine/2003-01-04-LoopTest.ll llvm/trunk/test/ExecutionEngine/2003-01-04-PhiTest.ll llvm/trunk/test/ExecutionEngine/2003-01-09-SARTest.ll llvm/trunk/test/ExecutionEngine/2003-01-10-FUCOM.ll llvm/trunk/test/ExecutionEngine/2003-01-15-AlignmentTest.ll llvm/trunk/test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll llvm/trunk/test/ExecutionEngine/2003-06-04-bzip2-bug.ll llvm/trunk/test/ExecutionEngine/2003-06-05-PHIBug.ll llvm/trunk/test/ExecutionEngine/2003-08-15-AllocaAssertion.ll llvm/trunk/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll llvm/trunk/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll llvm/trunk/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll llvm/trunk/test/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll llvm/trunk/test/ExecutionEngine/2007-12-10-APIntLoadStore.ll llvm/trunk/test/ExecutionEngine/2007-12-14-BigEndian.ll llvm/trunk/test/ExecutionEngine/2007-12-14-LittleEndian.ll llvm/trunk/test/ExecutionEngine/hello.ll llvm/trunk/test/ExecutionEngine/hello2.ll llvm/trunk/test/ExecutionEngine/simplesttest.ll llvm/trunk/test/ExecutionEngine/simpletest.ll llvm/trunk/test/ExecutionEngine/test-branch.ll llvm/trunk/test/ExecutionEngine/test-call.ll llvm/trunk/test/ExecutionEngine/test-cast.ll llvm/trunk/test/ExecutionEngine/test-constantexpr.ll llvm/trunk/test/ExecutionEngine/test-fp.ll llvm/trunk/test/ExecutionEngine/test-loadstore.ll llvm/trunk/test/ExecutionEngine/test-logical.ll llvm/trunk/test/ExecutionEngine/test-loop.ll llvm/trunk/test/ExecutionEngine/test-malloc.ll llvm/trunk/test/ExecutionEngine/test-phi.ll llvm/trunk/test/ExecutionEngine/test-ret.ll llvm/trunk/test/ExecutionEngine/test-setcond-fp.ll llvm/trunk/test/ExecutionEngine/test-setcond-int.ll llvm/trunk/test/ExecutionEngine/test-shift.ll llvm/trunk/test/Feature/globalredefinition3.ll llvm/trunk/test/Linker/2003-01-30-LinkerRename.ll llvm/trunk/test/Linker/2003-04-21-Linkage.ll llvm/trunk/test/Linker/2003-04-23-LinkOnceLost.ll llvm/trunk/test/Linker/2003-04-26-NullPtrLinkProblem.ll llvm/trunk/test/Linker/2004-05-07-TypeResolution1.ll llvm/trunk/test/Linker/2006-01-19-ConstantPacked.ll llvm/trunk/test/Transforms/Inline/2007-12-19-InlineNoUnwind.ll llvm/trunk/test/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll llvm/trunk/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll llvm/trunk/test/Verifier/2008-01-11-VarargAttrs.ll llvm/trunk/test/Verifier/byval-1.ll llvm/trunk/test/Verifier/byval-2.ll llvm/trunk/test/Verifier/byval-4.ll llvm/trunk/test/Verifier/invoke-2.ll Modified: llvm/trunk/test/Assembler/2002-01-24-BadSymbolTableAssert.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-01-24-BadSymbolTableAssert.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-01-24-BadSymbolTableAssert.ll (original) +++ llvm/trunk/test/Assembler/2002-01-24-BadSymbolTableAssert.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f ; This testcase failed due to a bad assertion in SymbolTable.cpp, removed in ; the 1.20 revision. Basically the symbol table assumed that if there was an Modified: llvm/trunk/test/Assembler/2002-01-24-ValueRefineAbsType.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-01-24-ValueRefineAbsType.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-01-24-ValueRefineAbsType.ll (original) +++ llvm/trunk/test/Assembler/2002-01-24-ValueRefineAbsType.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f ; This testcase used to fail due to a lack of this diff in Value.cpp: ; diff -r1.16 Value.cpp Modified: llvm/trunk/test/Assembler/2002-02-19-TypeParsing.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-02-19-TypeParsing.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-02-19-TypeParsing.ll (original) +++ llvm/trunk/test/Assembler/2002-02-19-TypeParsing.ll Tue May 20 17:07:21 2008 @@ -1,3 +1,3 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f %Hosp = type { i32, i32, i32, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* }, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* }, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* }, { \2*, { i32, i32, i32, { [4 x \3], \2, \5, %Hosp, i32, i32 }* }*, \2* } } Modified: llvm/trunk/test/Assembler/2002-03-08-NameCollision.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-03-08-NameCollision.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-03-08-NameCollision.ll (original) +++ llvm/trunk/test/Assembler/2002-03-08-NameCollision.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f ; Method arguments were being checked for collisions at the global scope before ; the method object was created by the parser. Because of this, false Modified: llvm/trunk/test/Assembler/2002-03-08-NameCollision2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-03-08-NameCollision2.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-03-08-NameCollision2.ll (original) +++ llvm/trunk/test/Assembler/2002-03-08-NameCollision2.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f ; Another name collision problem. Here the problem was that if a forward ; declaration for a method was found, that this would cause spurious conflicts Modified: llvm/trunk/test/Assembler/2002-04-04-PureVirtMethCall.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-04-04-PureVirtMethCall.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-04-04-PureVirtMethCall.ll (original) +++ llvm/trunk/test/Assembler/2002-04-04-PureVirtMethCall.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f type { { \2 *, \4 ** }, { \2 *, \4 ** } Modified: llvm/trunk/test/Assembler/2002-04-04-PureVirtMethCall2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-04-04-PureVirtMethCall2.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-04-04-PureVirtMethCall2.ll (original) +++ llvm/trunk/test/Assembler/2002-04-04-PureVirtMethCall2.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f %t = type { { \2*, \2 }, { \2*, \2 } Modified: llvm/trunk/test/Assembler/2002-04-05-TypeParsing.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-04-05-TypeParsing.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-04-05-TypeParsing.ll (original) +++ llvm/trunk/test/Assembler/2002-04-05-TypeParsing.ll Tue May 20 17:07:21 2008 @@ -1,3 +1,3 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f %Hosp = type { { \2*, { \2, %Hosp }* }, { \2*, { \2, %Hosp }* } } Modified: llvm/trunk/test/Assembler/2002-05-02-InvalidForwardRef.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-05-02-InvalidForwardRef.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-05-02-InvalidForwardRef.ll (original) +++ llvm/trunk/test/Assembler/2002-05-02-InvalidForwardRef.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f ; It looks like the assembler is not forward resolving the function declaraion ; correctly. Modified: llvm/trunk/test/Assembler/2002-07-08-HugePerformanceProblem.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-07-08-HugePerformanceProblem.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-07-08-HugePerformanceProblem.ll (original) +++ llvm/trunk/test/Assembler/2002-07-08-HugePerformanceProblem.ll Tue May 20 17:07:21 2008 @@ -1,6 +1,6 @@ ; This file takes about 48 __MINUTES__ to assemble using as. This is WAY too ; long. The type resolution code needs to be sped up a lot. -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f %ALL_INTERSECTIONS_METHOD = type i32 (%OBJECT*, %RAY*, %ISTACK*)* %BBOX = type { %BBOX_VECT, %BBOX_VECT } %BBOX_TREE = type { i16, i16, %BBOX, %BBOX_TREE** } Modified: llvm/trunk/test/Assembler/2002-07-25-ParserAssertionFailure.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-07-25-ParserAssertionFailure.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-07-25-ParserAssertionFailure.ll (original) +++ llvm/trunk/test/Assembler/2002-07-25-ParserAssertionFailure.ll Tue May 20 17:07:21 2008 @@ -1,6 +1,6 @@ ; Make sure we don't get an assertion failure, even though this is a parse ; error -; RUN: not llvm-as < %s -o /dev/null -f |& grep {No arguments} +; RUN: not llvm-as %s -o /dev/null -f |& grep {No arguments} %ty = type void (i32) Modified: llvm/trunk/test/Assembler/2002-08-15-CastAmbiguity.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-08-15-CastAmbiguity.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-08-15-CastAmbiguity.ll (original) +++ llvm/trunk/test/Assembler/2002-08-15-CastAmbiguity.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f define void @test(i32 %X) { call void @test( i32 6 ) Modified: llvm/trunk/test/Assembler/2002-08-15-ConstantExprProblem.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-08-15-ConstantExprProblem.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-08-15-ConstantExprProblem.ll (original) +++ llvm/trunk/test/Assembler/2002-08-15-ConstantExprProblem.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f @.LC0 = internal global [12 x i8] c"hello world\00" ; <[12 x i8]*> [#uses=1] Modified: llvm/trunk/test/Assembler/2002-08-15-UnresolvedGlobalReference.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-08-15-UnresolvedGlobalReference.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-08-15-UnresolvedGlobalReference.ll (original) +++ llvm/trunk/test/Assembler/2002-08-15-UnresolvedGlobalReference.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f @.LC0 = internal global [12 x i8] c"hello world\00" ; <[12 x i8]*> [#uses=1] Modified: llvm/trunk/test/Assembler/2002-08-22-DominanceProblem.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-08-22-DominanceProblem.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-08-22-DominanceProblem.ll (original) +++ llvm/trunk/test/Assembler/2002-08-22-DominanceProblem.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f ; Dominance relationships is not calculated correctly for unreachable blocks, ; which causes the verifier to barf on this input. Modified: llvm/trunk/test/Assembler/2002-10-08-LargeArrayPerformance.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-10-08-LargeArrayPerformance.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-10-08-LargeArrayPerformance.ll (original) +++ llvm/trunk/test/Assembler/2002-10-08-LargeArrayPerformance.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f ; This testcase comes from the following really simple c file: ;; int foo[30000] ;;; We should not be soo slow for such a simple case! Modified: llvm/trunk/test/Assembler/2002-10-15-NameClash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-10-15-NameClash.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-10-15-NameClash.ll (original) +++ llvm/trunk/test/Assembler/2002-10-15-NameClash.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f declare i32 @"ArrayRef"([100 x i32] * %Array) Modified: llvm/trunk/test/Assembler/2002-12-15-GlobalResolve.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2002-12-15-GlobalResolve.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2002-12-15-GlobalResolve.ll (original) +++ llvm/trunk/test/Assembler/2002-12-15-GlobalResolve.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f @X = external global i32* @X1 = external global %T* Modified: llvm/trunk/test/Assembler/2003-01-30-UnsignedString.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2003-01-30-UnsignedString.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2003-01-30-UnsignedString.ll (original) +++ llvm/trunk/test/Assembler/2003-01-30-UnsignedString.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f @spell_order = global [4 x i8] c"\FF\00\F7\00" Modified: llvm/trunk/test/Assembler/2003-04-25-UnresolvedGlobalReference.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2003-04-25-UnresolvedGlobalReference.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2003-04-25-UnresolvedGlobalReference.ll (original) +++ llvm/trunk/test/Assembler/2003-04-25-UnresolvedGlobalReference.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f ; There should be absolutely no problem with this testcase. define i32 @test(i32 %arg1, i32 %arg2) { Modified: llvm/trunk/test/Assembler/2003-05-15-AssemblerProblem.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2003-05-15-AssemblerProblem.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2003-05-15-AssemblerProblem.ll (original) +++ llvm/trunk/test/Assembler/2003-05-15-AssemblerProblem.ll Tue May 20 17:07:21 2008 @@ -1,6 +1,6 @@ ; This bug was caused by two CPR's existing for the same global variable, ; colliding in the Module level CPR map. -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f define void @test() { call void (...)* bitcast (void (i16*, i32)* @AddString to void (...)*)( i16* null, i32 0 ) Modified: llvm/trunk/test/Assembler/2003-05-15-SwitchBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2003-05-15-SwitchBug.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2003-05-15-SwitchBug.ll (original) +++ llvm/trunk/test/Assembler/2003-05-15-SwitchBug.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f ; Check minimal switch statement Modified: llvm/trunk/test/Assembler/2003-05-21-ConstantShiftExpr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2003-05-21-ConstantShiftExpr.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2003-05-21-ConstantShiftExpr.ll (original) +++ llvm/trunk/test/Assembler/2003-05-21-ConstantShiftExpr.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f ; Test that shift instructions can be used in constant expressions. global i32 3670016 Modified: llvm/trunk/test/Assembler/2003-05-21-EmptyStructTest.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2003-05-21-EmptyStructTest.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2003-05-21-EmptyStructTest.ll (original) +++ llvm/trunk/test/Assembler/2003-05-21-EmptyStructTest.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f ; The old C front-end never generated empty structures, now the new one ; can. For some reason we never handled them in the parser. Weird. Modified: llvm/trunk/test/Assembler/2003-06-30-RecursiveTypeProblem.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2003-06-30-RecursiveTypeProblem.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2003-06-30-RecursiveTypeProblem.ll (original) +++ llvm/trunk/test/Assembler/2003-06-30-RecursiveTypeProblem.ll Tue May 20 17:07:21 2008 @@ -1,3 +1,3 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f %MidFnTy = type void (%MidFnTy*) Modified: llvm/trunk/test/Assembler/2003-10-04-NotMergingGlobalConstants.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2003-10-04-NotMergingGlobalConstants.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2003-10-04-NotMergingGlobalConstants.ll (original) +++ llvm/trunk/test/Assembler/2003-10-04-NotMergingGlobalConstants.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f %T = type i32 @X = global i32* null ; [#uses=0] Modified: llvm/trunk/test/Assembler/2003-12-30-TypeMapInvalidMemory.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2003-12-30-TypeMapInvalidMemory.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2003-12-30-TypeMapInvalidMemory.ll (original) +++ llvm/trunk/test/Assembler/2003-12-30-TypeMapInvalidMemory.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: not llvm-as < %s -o /dev/null -f |& grep {Undefined type remains} +; RUN: not llvm-as %s -o /dev/null -f |& grep {Undefined type remains} ; END. @d_reduction_0_dparser_gram = global { Modified: llvm/trunk/test/Assembler/2004-02-27-SelfUseAssertError.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2004-02-27-SelfUseAssertError.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2004-02-27-SelfUseAssertError.ll (original) +++ llvm/trunk/test/Assembler/2004-02-27-SelfUseAssertError.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f ; %inc2 uses it's own value, but that's ok, as it's unreachable! Modified: llvm/trunk/test/Assembler/2004-04-04-GetElementPtrIndexTypes.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2004-04-04-GetElementPtrIndexTypes.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2004-04-04-GetElementPtrIndexTypes.ll (original) +++ llvm/trunk/test/Assembler/2004-04-04-GetElementPtrIndexTypes.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f define i32* @t1({ float, i32 }* %X) { %W = getelementptr { float, i32 }* %X, i32 20, i32 1 ; [#uses=0] Modified: llvm/trunk/test/Assembler/2004-09-29-VerifierIsReallySlow.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2004-09-29-VerifierIsReallySlow.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2004-09-29-VerifierIsReallySlow.ll (original) +++ llvm/trunk/test/Assembler/2004-09-29-VerifierIsReallySlow.ll Tue May 20 17:07:21 2008 @@ -1,6 +1,6 @@ ; Check to see that the verifier does not take an outrageous amount of time on ; this testcase. -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f %"complex long double" = type { double, double } %"struct.std::dcomplex" = type { %"complex long double" } Modified: llvm/trunk/test/Assembler/2004-10-22-BCWriterUndefBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2004-10-22-BCWriterUndefBug.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2004-10-22-BCWriterUndefBug.ll (original) +++ llvm/trunk/test/Assembler/2004-10-22-BCWriterUndefBug.ll Tue May 20 17:07:21 2008 @@ -1,5 +1,5 @@ ;; The bytecode writer was trying to treat undef values as ConstantArray's when ;; they looked like strings. -;; RUN: llvm-as < %s -o /dev/null -f +;; RUN: llvm-as %s -o /dev/null -f @G = internal global [8 x i8] undef Modified: llvm/trunk/test/Assembler/2004-11-28-InvalidTypeCrash.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2004-11-28-InvalidTypeCrash.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2004-11-28-InvalidTypeCrash.ll (original) +++ llvm/trunk/test/Assembler/2004-11-28-InvalidTypeCrash.ll Tue May 20 17:07:21 2008 @@ -1,5 +1,5 @@ ; Test for PR463. This program is erroneous, but should not crash llvm-as. -; RUN: not llvm-as < %s -o /dev/null -f |& \ +; RUN: not llvm-as %s -o /dev/null -f |& \ ; RUN: grep {Cannot create a null initialized value of this type} @.FOO = internal global %struct.none zeroinitializer Modified: llvm/trunk/test/Assembler/2005-01-31-CallingAggregateFunction.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2005-01-31-CallingAggregateFunction.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2005-01-31-CallingAggregateFunction.ll (original) +++ llvm/trunk/test/Assembler/2005-01-31-CallingAggregateFunction.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f define void @test() { call {i32} @foo() Modified: llvm/trunk/test/Assembler/2007-01-02-Undefined-Arg-Type.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2007-01-02-Undefined-Arg-Type.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2007-01-02-Undefined-Arg-Type.ll (original) +++ llvm/trunk/test/Assembler/2007-01-02-Undefined-Arg-Type.ll Tue May 20 17:07:21 2008 @@ -1,5 +1,5 @@ ; The assembler should catch an undefined argument type . -; RUN: not llvm-as < %s -o /dev/null -f |& grep {Reference to abstract argument} +; RUN: not llvm-as %s -o /dev/null -f |& grep {Reference to abstract argument} ; %typedef.bc_struct = type opaque Modified: llvm/trunk/test/Assembler/2007-01-05-Cmp-ConstExpr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2007-01-05-Cmp-ConstExpr.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2007-01-05-Cmp-ConstExpr.ll (original) +++ llvm/trunk/test/Assembler/2007-01-05-Cmp-ConstExpr.ll Tue May 20 17:07:21 2008 @@ -1,5 +1,5 @@ ; Test Case for PR1080 -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f @str = internal constant [4 x i8] c"-ga\00" ; <[4 x i8]*> [#uses=2] Modified: llvm/trunk/test/Assembler/2007-01-16-CrashOnBadCast.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2007-01-16-CrashOnBadCast.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2007-01-16-CrashOnBadCast.ll (original) +++ llvm/trunk/test/Assembler/2007-01-16-CrashOnBadCast.ll Tue May 20 17:07:21 2008 @@ -1,5 +1,5 @@ ; PR1117 -; RUN: not llvm-as < %s -o /dev/null -f |& grep {invalid cast opcode for cast from} +; RUN: not llvm-as %s -o /dev/null -f |& grep {invalid cast opcode for cast from} define i8* @nada(i64 %X) { %result = trunc i64 %X to i8* Modified: llvm/trunk/test/Assembler/2007-01-16-CrashOnBadCast2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2007-01-16-CrashOnBadCast2.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2007-01-16-CrashOnBadCast2.ll (original) +++ llvm/trunk/test/Assembler/2007-01-16-CrashOnBadCast2.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ ; PR1117 -; RUN: not llvm-as < %s -o /dev/null -f |& grep {invalid cast opcode for cast from} +; RUN: not llvm-as %s -o /dev/null -f |& grep {invalid cast opcode for cast from} @X = constant i8* trunc (i64 0 to i8*) Modified: llvm/trunk/test/Assembler/2007-04-15-BadIntrinsic.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2007-04-15-BadIntrinsic.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/2007-04-15-BadIntrinsic.ll (original) +++ llvm/trunk/test/Assembler/2007-04-15-BadIntrinsic.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: not llvm-as < %s -o /dev/null -f |& grep {Call to invalid LLVM intrinsic} +; RUN: not llvm-as %s -o /dev/null -f |& grep {Call to invalid LLVM intrinsic} declare i32 @llvm.foobar(i32 %foo) Modified: llvm/trunk/test/Assembler/select.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/select.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Assembler/select.ll (original) +++ llvm/trunk/test/Assembler/select.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f define i32 @test(i1 %C, i32 %V1, i32 %V2) { Modified: llvm/trunk/test/Bitcode/memcpy.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/memcpy.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Bitcode/memcpy.ll (original) +++ llvm/trunk/test/Bitcode/memcpy.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f define void @test(i32* %P, i32* %Q) { entry: Modified: llvm/trunk/test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll (original) +++ llvm/trunk/test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o - | llc +; RUN: llvm-as %s -o - | llc ; This caused the backend to assert out with: ; SparcInstrInfo.cpp:103: failed assertion `0 && "Unexpected unsigned type"' Modified: llvm/trunk/test/CodeGen/Generic/spillccr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/spillccr.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/Generic/spillccr.ll (original) +++ llvm/trunk/test/CodeGen/Generic/spillccr.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o - | llc +; RUN: llvm-as %s -o - | llc ; July 6, 2002 -- LLC Regression test ; This test case checks if the integer CC register %xcc (or %ccr) Modified: llvm/trunk/test/ExecutionEngine/2002-12-16-ArgTest.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2002-12-16-ArgTest.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2002-12-16-ArgTest.ll (original) +++ llvm/trunk/test/ExecutionEngine/2002-12-16-ArgTest.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null @.LC0 = internal global [10 x i8] c"argc: %d\0A\00" ; <[10 x i8]*> [#uses=1] Modified: llvm/trunk/test/ExecutionEngine/2003-01-04-ArgumentBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2003-01-04-ArgumentBug.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2003-01-04-ArgumentBug.ll (original) +++ llvm/trunk/test/ExecutionEngine/2003-01-04-ArgumentBug.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @foo(i32 %X, i32 %Y, double %A) { Modified: llvm/trunk/test/ExecutionEngine/2003-01-04-LoopTest.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2003-01-04-LoopTest.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2003-01-04-LoopTest.ll (original) +++ llvm/trunk/test/ExecutionEngine/2003-01-04-LoopTest.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o %t.bc -f +; RUN: llvm-as %s -o %t.bc -f ; RUN: lli %t.bc > /dev/null define i32 @main() { Modified: llvm/trunk/test/ExecutionEngine/2003-01-04-PhiTest.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2003-01-04-PhiTest.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2003-01-04-PhiTest.ll (original) +++ llvm/trunk/test/ExecutionEngine/2003-01-04-PhiTest.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { Modified: llvm/trunk/test/ExecutionEngine/2003-01-09-SARTest.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2003-01-09-SARTest.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2003-01-09-SARTest.ll (original) +++ llvm/trunk/test/ExecutionEngine/2003-01-09-SARTest.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null ; We were accidentally inverting the signedness of right shifts. Whoops. Modified: llvm/trunk/test/ExecutionEngine/2003-01-10-FUCOM.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2003-01-10-FUCOM.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2003-01-10-FUCOM.ll (original) +++ llvm/trunk/test/ExecutionEngine/2003-01-10-FUCOM.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { Modified: llvm/trunk/test/ExecutionEngine/2003-01-15-AlignmentTest.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2003-01-15-AlignmentTest.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2003-01-15-AlignmentTest.ll (original) +++ llvm/trunk/test/ExecutionEngine/2003-01-15-AlignmentTest.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @bar(i8* %X) { Modified: llvm/trunk/test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll (original) +++ llvm/trunk/test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null target datalayout = "e-p:32:32" Modified: llvm/trunk/test/ExecutionEngine/2003-06-04-bzip2-bug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2003-06-04-bzip2-bug.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2003-06-04-bzip2-bug.ll (original) +++ llvm/trunk/test/ExecutionEngine/2003-06-04-bzip2-bug.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null ; Testcase distilled from 256.bzip2. Modified: llvm/trunk/test/ExecutionEngine/2003-06-05-PHIBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2003-06-05-PHIBug.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2003-06-05-PHIBug.ll (original) +++ llvm/trunk/test/ExecutionEngine/2003-06-05-PHIBug.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null ; Testcase distilled from 256.bzip2. Modified: llvm/trunk/test/ExecutionEngine/2003-08-15-AllocaAssertion.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2003-08-15-AllocaAssertion.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2003-08-15-AllocaAssertion.ll (original) +++ llvm/trunk/test/ExecutionEngine/2003-08-15-AllocaAssertion.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null ; This testcase failed to work because two variable sized allocas confused the Modified: llvm/trunk/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll (original) +++ llvm/trunk/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null ; Modified: llvm/trunk/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll (original) +++ llvm/trunk/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null ; This testcase exposes a bug in the local register allocator where it runs out Modified: llvm/trunk/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll (original) +++ llvm/trunk/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null @A = global i32 0 ; [#uses=1] Modified: llvm/trunk/test/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll (original) +++ llvm/trunk/test/ExecutionEngine/2004-12-04-LazyCompileFuncs.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli -debug-only=jit %t.bc |& not grep {Finished CodeGen of .*Function: F} @.str_1 = internal constant [7 x i8] c"IN F!\0A\00" ; <[7 x i8]*> [#uses=1] @.str_2 = internal constant [7 x i8] c"IN G!\0A\00" ; <[7 x i8]*> [#uses=1] Modified: llvm/trunk/test/ExecutionEngine/2007-12-10-APIntLoadStore.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2007-12-10-APIntLoadStore.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2007-12-10-APIntLoadStore.ll (original) +++ llvm/trunk/test/ExecutionEngine/2007-12-10-APIntLoadStore.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o - | lli -force-interpreter +; RUN: llvm-as %s -o - | lli -force-interpreter ; PR1836 define i32 @main() { Modified: llvm/trunk/test/ExecutionEngine/2007-12-14-BigEndian.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2007-12-14-BigEndian.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2007-12-14-BigEndian.ll (original) +++ llvm/trunk/test/ExecutionEngine/2007-12-14-BigEndian.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o - | lli -force-interpreter +; RUN: llvm-as %s -o - | lli -force-interpreter target datalayout = "E" Modified: llvm/trunk/test/ExecutionEngine/2007-12-14-LittleEndian.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/2007-12-14-LittleEndian.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/2007-12-14-LittleEndian.ll (original) +++ llvm/trunk/test/ExecutionEngine/2007-12-14-LittleEndian.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o - | lli -force-interpreter +; RUN: llvm-as %s -o - | lli -force-interpreter target datalayout = "e" Modified: llvm/trunk/test/ExecutionEngine/hello.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/hello.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/hello.ll (original) +++ llvm/trunk/test/ExecutionEngine/hello.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null @.LC0 = internal global [12 x i8] c"Hello World\00" ; <[12 x i8]*> [#uses=1] Modified: llvm/trunk/test/ExecutionEngine/hello2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/hello2.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/hello2.ll (original) +++ llvm/trunk/test/ExecutionEngine/hello2.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null @X = global i32 7 ; [#uses=0] Modified: llvm/trunk/test/ExecutionEngine/simplesttest.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/simplesttest.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/simplesttest.ll (original) +++ llvm/trunk/test/ExecutionEngine/simplesttest.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { Modified: llvm/trunk/test/ExecutionEngine/simpletest.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/simpletest.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/simpletest.ll (original) +++ llvm/trunk/test/ExecutionEngine/simpletest.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @bar() { Modified: llvm/trunk/test/ExecutionEngine/test-branch.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/test-branch.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/test-branch.ll (original) +++ llvm/trunk/test/ExecutionEngine/test-branch.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null ; test unconditional branch Modified: llvm/trunk/test/ExecutionEngine/test-call.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/test-call.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/test-call.ll (original) +++ llvm/trunk/test/ExecutionEngine/test-call.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null declare void @exit(i32) Modified: llvm/trunk/test/ExecutionEngine/test-cast.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/test-cast.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/test-cast.ll (original) +++ llvm/trunk/test/ExecutionEngine/test-cast.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @foo() { Modified: llvm/trunk/test/ExecutionEngine/test-constantexpr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/test-constantexpr.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/test-constantexpr.ll (original) +++ llvm/trunk/test/ExecutionEngine/test-constantexpr.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null ; This tests to make sure that we can evaluate weird constant expressions Modified: llvm/trunk/test/ExecutionEngine/test-fp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/test-fp.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/test-fp.ll (original) +++ llvm/trunk/test/ExecutionEngine/test-fp.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null define double @test(double* %DP, double %Arg) { Modified: llvm/trunk/test/ExecutionEngine/test-loadstore.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/test-loadstore.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/test-loadstore.ll (original) +++ llvm/trunk/test/ExecutionEngine/test-loadstore.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null define void @test(i8* %P, i16* %P.upgrd.1, i32* %P.upgrd.2, i64* %P.upgrd.3) { Modified: llvm/trunk/test/ExecutionEngine/test-logical.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/test-logical.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/test-logical.ll (original) +++ llvm/trunk/test/ExecutionEngine/test-logical.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { Modified: llvm/trunk/test/ExecutionEngine/test-loop.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/test-loop.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/test-loop.ll (original) +++ llvm/trunk/test/ExecutionEngine/test-loop.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { Modified: llvm/trunk/test/ExecutionEngine/test-malloc.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/test-malloc.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/test-malloc.ll (original) +++ llvm/trunk/test/ExecutionEngine/test-malloc.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { Modified: llvm/trunk/test/ExecutionEngine/test-phi.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/test-phi.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/test-phi.ll (original) +++ llvm/trunk/test/ExecutionEngine/test-phi.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null ; test phi node Modified: llvm/trunk/test/ExecutionEngine/test-ret.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/test-ret.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/test-ret.ll (original) +++ llvm/trunk/test/ExecutionEngine/test-ret.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null ; test return instructions Modified: llvm/trunk/test/ExecutionEngine/test-setcond-fp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/test-setcond-fp.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/test-setcond-fp.ll (original) +++ llvm/trunk/test/ExecutionEngine/test-setcond-fp.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null Modified: llvm/trunk/test/ExecutionEngine/test-setcond-int.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/test-setcond-int.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/test-setcond-int.ll (original) +++ llvm/trunk/test/ExecutionEngine/test-setcond-int.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { Modified: llvm/trunk/test/ExecutionEngine/test-shift.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/test-shift.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/ExecutionEngine/test-shift.ll (original) +++ llvm/trunk/test/ExecutionEngine/test-shift.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t.bc +; RUN: llvm-as %s -f -o %t.bc ; RUN: lli %t.bc > /dev/null define i32 @main() { Modified: llvm/trunk/test/Feature/globalredefinition3.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Feature/globalredefinition3.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Feature/globalredefinition3.ll (original) +++ llvm/trunk/test/Feature/globalredefinition3.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: not llvm-as < %s -o /dev/null -f |& grep \ +; RUN: not llvm-as %s -o /dev/null -f |& grep \ ; RUN: "Redefinition of global variable named 'B'" ; END. Modified: llvm/trunk/test/Linker/2003-01-30-LinkerRename.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2003-01-30-LinkerRename.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Linker/2003-01-30-LinkerRename.ll (original) +++ llvm/trunk/test/Linker/2003-01-30-LinkerRename.ll Tue May 20 17:07:21 2008 @@ -2,7 +2,7 @@ ; one... ; RUN: echo {define internal i32 @foo() \{ ret i32 7 \} } | llvm-as > %t.1.bc -; RUN: llvm-as < %s -o %t.2.bc -f +; RUN: llvm-as %s -o %t.2.bc -f ; RUN: llvm-link %t.1.bc %t.2.bc | llvm-dis | grep @foo() | grep -v internal define i32 @foo() { ret i32 0 } Modified: llvm/trunk/test/Linker/2003-04-21-Linkage.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2003-04-21-Linkage.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Linker/2003-04-21-Linkage.ll (original) +++ llvm/trunk/test/Linker/2003-04-21-Linkage.ll Tue May 20 17:07:21 2008 @@ -1,6 +1,6 @@ ; RUN: echo {@X = linkonce global i32 5 \ ; RUN: define linkonce i32 @foo() \{ ret i32 7 \} } | llvm-as > %t.1.bc -; RUN: llvm-as < %s -o %t.2.bc -f +; RUN: llvm-as %s -o %t.2.bc -f ; RUN: llvm-link %t.1.bc %t.2.bc @X = external global i32 Modified: llvm/trunk/test/Linker/2003-04-23-LinkOnceLost.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2003-04-23-LinkOnceLost.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Linker/2003-04-23-LinkOnceLost.ll (original) +++ llvm/trunk/test/Linker/2003-04-23-LinkOnceLost.ll Tue May 20 17:07:21 2008 @@ -3,7 +3,7 @@ ; RUN: echo { define linkonce void @foo() \{ ret void \} } | \ ; RUN: llvm-as -o %t.2.bc -f -; RUN: llvm-as < %s -o %t.1.bc -f +; RUN: llvm-as %s -o %t.1.bc -f ; RUN: llvm-link %t.1.bc %t.2.bc | llvm-dis | grep foo | grep linkonce declare void @foo() Modified: llvm/trunk/test/Linker/2003-04-26-NullPtrLinkProblem.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2003-04-26-NullPtrLinkProblem.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Linker/2003-04-26-NullPtrLinkProblem.ll (original) +++ llvm/trunk/test/Linker/2003-04-26-NullPtrLinkProblem.ll Tue May 20 17:07:21 2008 @@ -2,7 +2,7 @@ ; the same type to be created! ; RUN: echo {%T = type i32} | llvm-as > %t.2.bc -; RUN: llvm-as < %s -f > %t.1.bc +; RUN: llvm-as %s -f -o %t.1.bc ; RUN: llvm-link %t.1.bc %t.2.bc %T = type opaque Modified: llvm/trunk/test/Linker/2004-05-07-TypeResolution1.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2004-05-07-TypeResolution1.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Linker/2004-05-07-TypeResolution1.ll (original) +++ llvm/trunk/test/Linker/2004-05-07-TypeResolution1.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t1.bc +; RUN: llvm-as %s -f -o %t1.bc ; RUN: llvm-as < %p/2004-05-07-TypeResolution2.ll -o %t2.bc -f ; RUN: llvm-link -f -o %t3.bc %t1.bc %t2.bc Modified: llvm/trunk/test/Linker/2006-01-19-ConstantPacked.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Linker/2006-01-19-ConstantPacked.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Linker/2006-01-19-ConstantPacked.ll (original) +++ llvm/trunk/test/Linker/2006-01-19-ConstantPacked.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -f -o %t1.bc +; RUN: llvm-as %s -f -o %t1.bc ; RUN: llvm-link -f -o %t2.bc %t1.bc target datalayout = "E-p:32:32" Modified: llvm/trunk/test/Transforms/Inline/2007-12-19-InlineNoUnwind.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Inline/2007-12-19-InlineNoUnwind.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Transforms/Inline/2007-12-19-InlineNoUnwind.ll (original) +++ llvm/trunk/test/Transforms/Inline/2007-12-19-InlineNoUnwind.ll Tue May 20 17:07:21 2008 @@ -1,5 +1,5 @@ -; RUN: llvm-as < %s -o - | opt -inline | llvm-dis | grep nounwind -; RUN: llvm-as < %s -o - | opt -inline | llvm-dis | grep unreachable +; RUN: llvm-as %s -o - | opt -inline | llvm-dis | grep nounwind +; RUN: llvm-as %s -o - | opt -inline | llvm-dis | grep unreachable declare i1 @extern() Modified: llvm/trunk/test/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll Tue May 20 17:07:21 2008 @@ -9,7 +9,7 @@ ; be eliminated. In many cases the setCC is also eliminated based on the ; constant value and the range of the casted value. ; -; RUN: llvm-as < %s -o - | opt -instcombine | llvm-dis | \ +; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | \ ; RUN: notcast .*int ; END. define i1 @lt_signed_to_large_unsigned(i8 %SB) { Modified: llvm/trunk/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll Tue May 20 17:07:21 2008 @@ -1,5 +1,5 @@ ; The optimizer should be able to remove cast operation here. -; RUN: llvm-as < %s -o - | opt -instcombine | llvm-dis | \ +; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | \ ; RUN: not grep sext.*i32 define i1 @eq_signed_to_small_unsigned(i8 %SB) { Modified: llvm/trunk/test/Verifier/2008-01-11-VarargAttrs.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/2008-01-11-VarargAttrs.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Verifier/2008-01-11-VarargAttrs.ll (original) +++ llvm/trunk/test/Verifier/2008-01-11-VarargAttrs.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: not llvm-as < %s -o /dev/null +; RUN: not llvm-as %s -o /dev/null %struct = type { } Modified: llvm/trunk/test/Verifier/byval-1.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/byval-1.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Verifier/byval-1.ll (original) +++ llvm/trunk/test/Verifier/byval-1.ll Tue May 20 17:07:21 2008 @@ -1,2 +1,2 @@ -; RUN: not llvm-as < %s -o /dev/null -f +; RUN: not llvm-as %s -o /dev/null -f declare void @h(i32 byval %num) Modified: llvm/trunk/test/Verifier/byval-2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/byval-2.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Verifier/byval-2.ll (original) +++ llvm/trunk/test/Verifier/byval-2.ll Tue May 20 17:07:21 2008 @@ -1,3 +1,3 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f %s = type opaque declare void @h(%s* byval %num) Modified: llvm/trunk/test/Verifier/byval-4.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/byval-4.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Verifier/byval-4.ll (original) +++ llvm/trunk/test/Verifier/byval-4.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s -o /dev/null -f +; RUN: llvm-as %s -o /dev/null -f %struct.foo = type { i64 } declare void @h(%struct.foo* byval %num) Modified: llvm/trunk/test/Verifier/invoke-2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/invoke-2.ll?rev=51357&r1=51356&r2=51357&view=diff ============================================================================== --- llvm/trunk/test/Verifier/invoke-2.ll (original) +++ llvm/trunk/test/Verifier/invoke-2.ll Tue May 20 17:07:21 2008 @@ -1,4 +1,4 @@ -; RUN: not llvm-as < %s -f |& grep {not verify as correct} +; RUN: not llvm-as %s -f |& grep {not verify as correct} ; PR1042 define i32 @foo() { From gohman at apple.com Tue May 20 17:25:39 2008 From: gohman at apple.com (Dan Gohman) Date: Tue, 20 May 2008 15:25:39 -0700 Subject: [llvm-commits] [llvm] r51356 - in /llvm/trunk: lib/Analysis/AliasSetTracker.cpp test/Transforms/LICM/2008-05-20-AliasSetVAArg.ll In-Reply-To: <200805202205.m4KM5SLp009755@zion.cs.uiuc.edu> References: <200805202205.m4KM5SLp009755@zion.cs.uiuc.edu> Message-ID: On May 20, 2008, at 3:05 PM, Chris Lattner wrote: > Author: lattner > Date: Tue May 20 17:05:28 2008 > New Revision: 51356 > > URL: http://llvm.org/viewvc/llvm-project?rev=51356&view=rev > Log: > Fix PR2346 by marking vaarg as volatile so that licm doesn't try to > hoist them. vaarg was already marked as ModRef; why is that not sufficient? Wouldn't LICM have the same problem with a call that was known to ModRef a single memory location? Claiming that vaarg is volatile seems to be merely covering up a LICM bug. Dan From isanbard at gmail.com Tue May 20 18:54:28 2008 From: isanbard at gmail.com (Bill Wendling) Date: Tue, 20 May 2008 23:54:28 -0000 Subject: [llvm-commits] [llvm] r51358 - /llvm/trunk/include/llvm/System/Path.h Message-ID: <200805202354.m4KNsS2h012860@zion.cs.uiuc.edu> Author: void Date: Tue May 20 18:54:27 2008 New Revision: 51358 URL: http://llvm.org/viewvc/llvm-project?rev=51358&view=rev Log: Reverting r51218 because of breakage on PPC32. Modified: llvm/trunk/include/llvm/System/Path.h Modified: llvm/trunk/include/llvm/System/Path.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/System/Path.h?rev=51358&r1=51357&r2=51358&view=diff ============================================================================== --- llvm/trunk/include/llvm/System/Path.h (original) +++ llvm/trunk/include/llvm/System/Path.h Tue May 20 18:54:27 2008 @@ -19,7 +19,6 @@ #include #include #include -#include namespace llvm { namespace sys { @@ -207,14 +206,14 @@ /// @returns true if \p this and \p that refer to the same thing. /// @brief Equality Operator bool operator==(const Path &that) const { - return strcmp(path.c_str(), that.path.c_str()) == 0; + return path == that.path; } /// Compares \p this Path with \p that Path for inequality. /// @returns true if \p this and \p that refer to different things. /// @brief Inequality Operator bool operator!=(const Path &that) const { - return strcmp(path.c_str(), that.path.c_str()) != 0; + return path != that.path; } /// Determines if \p this Path is less than \p that Path. This is required @@ -224,7 +223,7 @@ /// @returns true if \p this path is lexicographically less than \p that. /// @brief Less Than Operator bool operator<(const Path& that) const { - return strcmp(path.c_str(), that.path.c_str()) < 0; + return path < that.path; } /// @} From dalej at apple.com Tue May 20 18:58:56 2008 From: dalej at apple.com (Dale Johannesen) Date: Tue, 20 May 2008 16:58:56 -0700 Subject: [llvm-commits] [llvm] r51358 - /llvm/trunk/include/llvm/System/Path.h In-Reply-To: <200805202354.m4KNsS2h012860@zion.cs.uiuc.edu> References: <200805202354.m4KNsS2h012860@zion.cs.uiuc.edu> Message-ID: On May 20, 2008, at 4:54 PM, Bill Wendling wrote: > Author: void > Date: Tue May 20 18:54:27 2008 > New Revision: 51358 > > URL: http://llvm.org/viewvc/llvm-project?rev=51358&view=rev > Log: > Reverting r51218 because of breakage on PPC32. It also fails for me on x86-32, btw. > Modified: > llvm/trunk/include/llvm/System/Path.h > > Modified: llvm/trunk/include/llvm/System/Path.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/System/Path.h?rev=51358&r1=51357&r2=51358&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/include/llvm/System/Path.h (original) > +++ llvm/trunk/include/llvm/System/Path.h Tue May 20 18:54:27 2008 > @@ -19,7 +19,6 @@ > #include > #include > #include > -#include > > namespace llvm { > namespace sys { > @@ -207,14 +206,14 @@ > /// @returns true if \p this and \p that refer to the same > thing. > /// @brief Equality Operator > bool operator==(const Path &that) const { > - return strcmp(path.c_str(), that.path.c_str()) == 0; > + return path == that.path; > } > > /// Compares \p this Path with \p that Path for inequality. > /// @returns true if \p this and \p that refer to different > things. > /// @brief Inequality Operator > bool operator!=(const Path &that) const { > - return strcmp(path.c_str(), that.path.c_str()) != 0; > + return path != that.path; > } > > /// Determines if \p this Path is less than \p that Path. This > is required > @@ -224,7 +223,7 @@ > /// @returns true if \p this path is lexicographically less > than \p that. > /// @brief Less Than Operator > bool operator<(const Path& that) const { > - return strcmp(path.c_str(), that.path.c_str()) < 0; > + return path < that.path; > } > > /// @} > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From dalej at apple.com Tue May 20 19:29:38 2008 From: dalej at apple.com (Dale Johannesen) Date: Tue, 20 May 2008 17:29:38 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r51257 - in /llvm-gcc-4.2/trunk/gcc: cgraphunit.c ipa-inline.c passes.c In-Reply-To: <200805201312.32955.baldrick@free.fr> References: <200805191642.m4JGgvVc013244@zion.cs.uiuc.edu> <19ACFAEF-F86D-41F0-BACC-7ECD1F794501@apple.com> <200805201312.32955.baldrick@free.fr> Message-ID: <7C9BB4B7-2ED0-41BC-B168-F473B5ADBC4F@apple.com> On May 20, 2008, at 4:12 AM, Duncan Sands wrote: > PS: It would be nice to build with -Werr on x86-linux, > but it's not feasible because Apple changes in i386.c > generate a bunch of warnings. I didn't dare touch that > mysterious stuff - can perhaps one of the Apple guys > take a look, thanks! There are no warnings building on Darwin. If you send the warning output I may be able to do something. From gohman at apple.com Tue May 20 19:54:13 2008 From: gohman at apple.com (Dan Gohman) Date: Wed, 21 May 2008 00:54:13 -0000 Subject: [llvm-commits] [llvm] r51359 - /llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200805210054.m4L0sDGi014396@zion.cs.uiuc.edu> Author: djg Date: Tue May 20 19:54:12 2008 New Revision: 51359 URL: http://llvm.org/viewvc/llvm-project?rev=51359&view=rev Log: When LSR is replacing an instruction, call ScalarEvolution::deleteValueFromRecords on it before doing the replaceAllUsesWith, because ScalarEvolution looks at the instruction's users to find SCEV references to the instruction's SCEV object in its internal maps. Move all of LSR's loop-related state clearing after processing the loop and before cleaning up dead PHI nodes. This eliminates all of LSR's SCEV references just before the calls to ScalarEvolution::deleteValueFromRecords so that when ScalarEvolution drops its own SCEV references, the reference counts will reach zero and the SCEVs will be deleted immediately. These changes fix some compiler aborts involving ScalarEvolution holding onto and reusing SCEV objects for instructions that have been deleted. No regression test unfortunately; because the symptoms were due to dangling pointers, reduced testcases ended up being fairly arbitrary. Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=51359&r1=51358&r2=51359&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Tue May 20 19:54:12 2008 @@ -237,8 +237,8 @@ if (Value *PNV = PN->hasConstantValue()) { if (Instruction *U = dyn_cast(PNV)) Insts.insert(U); - PN->replaceAllUsesWith(PNV); SE->deleteValueFromRecords(PN); + PN->replaceAllUsesWith(PNV); PN->eraseFromParent(); Changed = true; continue; @@ -1663,8 +1663,8 @@ // Remove the old compare instruction. The old indvar is probably dead too. DeadInsts.insert(cast(CondUse->OperandValToReplace)); - OldCond->replaceAllUsesWith(Cond); SE->deleteValueFromRecords(OldCond); + OldCond->replaceAllUsesWith(Cond); OldCond->eraseFromParent(); IVUsesByStride[*CondStride].Users.pop_back(); @@ -1782,7 +1782,7 @@ #endif // IVsByStride keeps IVs for one particular loop. - IVsByStride.clear(); + assert(IVsByStride.empty() && "Stale entries in IVsByStride?"); // Sort the StrideOrder so we process larger strides first. std::stable_sort(StrideOrder.begin(), StrideOrder.end(), StrideCompare()); @@ -1799,6 +1799,12 @@ StrengthReduceStridedIVUsers(SI->first, SI->second, L, HasOneStride); } + // We're done analyzing this loop; release all the state we built up for it. + CastedPointers.clear(); + IVUsesByStride.clear(); + IVsByStride.clear(); + StrideOrder.clear(); + // Clean up after ourselves if (!DeadInsts.empty()) { DeleteTriviallyDeadInstructions(DeadInsts); @@ -1826,8 +1832,8 @@ if (BO->hasOneUse() && PN == *(BO->use_begin())) { DeadInsts.insert(BO); // Break the cycle, then delete the PHI. - PN->replaceAllUsesWith(UndefValue::get(PN->getType())); SE->deleteValueFromRecords(PN); + PN->replaceAllUsesWith(UndefValue::get(PN->getType())); PN->eraseFromParent(); } } @@ -1836,8 +1842,5 @@ DeleteTriviallyDeadInstructions(DeadInsts); } - CastedPointers.clear(); - IVUsesByStride.clear(); - StrideOrder.clear(); return false; } From nicolas.geoffray at lip6.fr Wed May 21 02:47:17 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Wed, 21 May 2008 07:47:17 -0000 Subject: [llvm-commits] [vmkit] r51366 - /vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp Message-ID: <200805210747.m4L7lHmo002165@zion.cs.uiuc.edu> Author: geoffray Date: Wed May 21 02:47:16 2008 New Revision: 51366 URL: http://llvm.org/viewvc/llvm-project?rev=51366&view=rev Log: Use the virtual table to make meta virtual calls. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp?rev=51366&r1=51365&r2=51366&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp Wed May 21 02:47:16 2008 @@ -195,7 +195,7 @@ verifyNull(obj); \ JavaMethod* meth = obj->classOf->lookupMethod(name, type, false, true); \ \ - void* func = meth->compiledPtr();\ + void* func = (((void***)obj)[0])[meth->offset];\ return ((FUNC_TYPE_VIRTUAL_AP)signature->virtualCallAP())(vm, func, obj, ap);\ }\ \ From nicolas.geoffray at lip6.fr Wed May 21 03:34:58 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Wed, 21 May 2008 08:34:58 -0000 Subject: [llvm-commits] [vmkit] r51367 - in /vmkit/trunk/lib/JnJVM: Classpath/ClasspathVMClass.cpp VMCore/JavaClass.cpp VMCore/JavaClass.h VMCore/JavaInitialise.cpp VMCore/JavaJIT.cpp VMCore/Jnjvm.cpp VMCore/NativeUtil.cpp VMCore/VirtualTables.cpp Message-ID: <200805210834.m4L8Yxan003493@zion.cs.uiuc.edu> Author: geoffray Date: Wed May 21 03:34:58 2008 New Revision: 51367 URL: http://llvm.org/viewvc/llvm-project?rev=51367&view=rev Log: Attribut is not a gc-allocated class anymore. Make attribut lookup functions belong to Class, JavaMethod and JavaField. Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp?rev=51367&r1=51366&r2=51367&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp Wed May 21 03:34:58 2008 @@ -351,8 +351,7 @@ } static void resolveInnerOuterClasses(Class* cl) { - Attribut* attribut = Attribut::lookup(&cl->attributs, - Attribut::innerClassesAttribut); + Attribut* attribut = cl->lookupAttribut(Attribut::innerClassesAttribut); if (attribut != 0) { Reader* reader = attribut->toReader(JavaThread::get()->isolate, cl->bytes, attribut); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp?rev=51367&r1=51366&r2=51367&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp Wed May 21 03:34:58 2008 @@ -45,12 +45,6 @@ std::vector ClassArray::VirtualFieldsArray; std::vector ClassArray::StaticFieldsArray; -void Attribut::print(mvm::PrintBuffer* buf) const { - buf->write("Attribut<"); - buf->writeObj(name); - buf->write(">"); -} - void Attribut::derive(const UTF8* name, unsigned int length, const Reader* reader) { @@ -60,19 +54,45 @@ } -// TODO: Optimize -Attribut* Attribut::lookup(const std::vector >* vec, - const UTF8* key ) { - - for (uint32 i = 0; i < vec->size(); i++) { - Attribut* cur = vec->at(i); +Attribut* Class::lookupAttribut(const UTF8* key ) { + for (std::vector::iterator i = attributs.begin(), + e = attributs.end(); i!= e; ++i) { + Attribut* cur = *i; + if (cur->name->equals(key)) return cur; + } + + return 0; +} + +Attribut* JavaField::lookupAttribut(const UTF8* key ) { + for (std::vector::iterator i = attributs.begin(), + e = attributs.end(); i!= e;++i) { + Attribut* cur = *i; if (cur->name->equals(key)) return cur; } return 0; } +Attribut* JavaMethod::lookupAttribut(const UTF8* key ) { + for (std::vector::iterator i = attributs.begin(), + e = attributs.end(); i!= e; ++i) { + Attribut* cur = *i; + if (cur->name->equals(key)) return cur; + } + + return 0; +} + +void Class::destroyer(size_t sz) { + for (std::vector::iterator i = attributs.begin(), + e = attributs.end(); i!= e;) { + Attribut* cur = *i; + delete cur; + } + +} + Reader* Attribut::toReader(Jnjvm* vm, ArrayUInt8* array, Attribut* attr) { return vm_new(vm, Reader)(array, attr->start, attr->nbb); } @@ -398,8 +418,7 @@ void JavaField::initField(JavaObject* obj) { const AssessorDesc* funcs = signature->funcs; - Attribut* attribut = Attribut::lookup(&attributs, - Attribut::constantAttribut); + Attribut* attribut = lookupAttribut(Attribut::constantAttribut); if (!attribut) { JnjvmModule::InitField(this, obj); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h?rev=51367&r1=51366&r2=51367&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h Wed May 21 03:34:58 2008 @@ -45,16 +45,13 @@ }JavaState; -class Attribut : public mvm::Object { +class Attribut { public: - static VirtualTable* VT; const UTF8* name; unsigned int start; unsigned int nbb; void derive(const UTF8* name, unsigned int length, const Reader* reader); - static Attribut* lookup(const std::vector > * vec, - const UTF8* key); Reader* toReader(Jnjvm *vm, ArrayUInt8* array, Attribut* attr); static const UTF8* codeAttribut; @@ -64,8 +61,6 @@ static const UTF8* innerClassesAttribut; static const UTF8* sourceFileAttribut; - virtual void print(mvm::PrintBuffer *buf) const; - virtual void TRACER; }; class CommonClass : public mvm::Object { @@ -242,7 +237,7 @@ mvm::Code* codeVirtualTracer; mvm::Code* codeStaticTracer; JavaCtpInfo* ctpInfo; - std::vector > attributs; + std::vector attributs; std::vector innerClasses; Class* outerClass; uint32 innerAccess; @@ -253,8 +248,11 @@ JavaObject* doNew(Jnjvm* vm); virtual void print(mvm::PrintBuffer *buf) const; virtual void TRACER; + virtual void destroyer(size_t sz); JavaObject* operator()(Jnjvm* vm); + + Attribut* lookupAttribut(const UTF8* key); #ifndef MULTIPLE_VM JavaObject* _staticInstance; @@ -313,7 +311,7 @@ static VirtualTable* VT; unsigned int access; Signdef* signature; - std::vector > attributs; + std::vector attributs; std::vector > caches; Class* classDef; const UTF8* name; @@ -328,6 +326,7 @@ virtual void print(mvm::PrintBuffer *buf) const; virtual void TRACER; + Attribut* lookupAttribut(const UTF8* key); void* compiledPtr() { if (!code) return _compiledPtr(); @@ -396,7 +395,7 @@ const UTF8* name; Typedef* signature; const UTF8* type; - std::vector > attributs; + std::vector attributs; Class* classDef; uint64 ptrOffset; /// num - The index of the field in the field list. @@ -404,6 +403,7 @@ uint32 num; void initField(JavaObject* obj); + Attribut* lookupAttribut(const UTF8* key); virtual void print(mvm::PrintBuffer *buf) const; virtual void TRACER; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp?rev=51367&r1=51366&r2=51367&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp Wed May 21 03:34:58 2008 @@ -43,7 +43,6 @@ X::VT = ((void**)(void*)(&fake))[0]; } INIT(JavaArray); - INIT(Attribut); INIT(CommonClass); INIT(Class); INIT(ClassArray); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp?rev=51367&r1=51366&r2=51367&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp Wed May 21 03:34:58 2008 @@ -325,8 +325,7 @@ compilingMethod->printString()); - Attribut* codeAtt = Attribut::lookup(&compilingMethod->attributs, - Attribut::codeAttribut); + Attribut* codeAtt = compilingMethod->lookupAttribut(Attribut::codeAttribut); if (!codeAtt) { Jnjvm* vm = JavaThread::get()->isolate; @@ -479,8 +478,7 @@ compilingMethod->printString()); - Attribut* codeAtt = Attribut::lookup(&compilingMethod->attributs, - Attribut::codeAttribut); + Attribut* codeAtt = compilingMethod->lookupAttribut(Attribut::codeAttribut); if (!codeAtt) { Jnjvm* vm = JavaThread::get()->isolate; Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp?rev=51367&r1=51366&r2=51367&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp Wed May 21 03:34:58 2008 @@ -206,7 +206,7 @@ for (int i = 0; i < nba; i++) { const UTF8* attName = ctpInfo->UTF8At(reader->readU2()); unsigned int attLen = reader->readU4(); - Attribut* att = vm_new(this, Attribut); + Attribut* att = new Attribut(); att->derive(attName, attLen, reader); attr.push_back(att); reader->seek(attLen, Reader::SeekCur); Modified: vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp?rev=51367&r1=51366&r2=51367&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp Wed May 21 03:34:58 2008 @@ -396,8 +396,7 @@ } ArrayObject* NativeUtil::getExceptionTypes(JavaMethod* meth) { - Attribut* exceptionAtt = Attribut::lookup(&meth->attributs, - Attribut::exceptionsAttribut); + Attribut* exceptionAtt = meth->lookupAttribut(Attribut::exceptionsAttribut); if (exceptionAtt == 0) { return ArrayObject::acons(0, Classpath::classArrayClass, JavaThread::get()->isolate); Modified: vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp?rev=51367&r1=51366&r2=51367&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Wed May 21 03:34:58 2008 @@ -42,7 +42,6 @@ INIT(ArrayDouble); INIT(ArrayObject); INIT(UTF8); - INIT(Attribut); INIT(CommonClass); INIT(Class); INIT(ClassArray); @@ -81,11 +80,13 @@ #undef INIT void JavaArray::TRACER { - JavaObject::PARENT_TRACER; + classOf->MARK_AND_TRACE; + lockObj->MARK_AND_TRACE; } void ArrayObject::TRACER { - JavaObject::PARENT_TRACER; + classOf->MARK_AND_TRACE; + lockObj->MARK_AND_TRACE; for (sint32 i = 0; i < size; i++) { elements[i]->MARK_AND_TRACE; } @@ -93,7 +94,8 @@ #define ARRAYTRACER(name) \ void name::TRACER { \ - JavaObject::PARENT_TRACER; \ + classOf->MARK_AND_TRACE; \ + lockObj->MARK_AND_TRACE; \ } @@ -110,9 +112,6 @@ #undef ARRAYTRACER -void Attribut::TRACER { -} - #define TRACE_VECTOR(type,alloc,name) { \ for (std::vector >::iterator i = name.begin(), \ e = name.end(); i!= e; ++i) { \ @@ -132,7 +131,6 @@ _staticInstance->MARK_AND_TRACE; #endif ctpInfo->MARK_AND_TRACE; - TRACE_VECTOR(Attribut*, gc_allocator, attributs); codeStaticTracer->MARK_AND_TRACE; codeVirtualTracer->MARK_AND_TRACE; } @@ -142,13 +140,11 @@ } void JavaMethod::TRACER { - TRACE_VECTOR(Attribut*, gc_allocator, attributs); TRACE_VECTOR(Enveloppe*, gc_allocator, caches); code->MARK_AND_TRACE; } void JavaField::TRACER { - TRACE_VECTOR(Attribut*, gc_allocator, attributs); } void JavaCtpInfo::TRACER { From nicolas.geoffray at lip6.fr Wed May 21 05:32:56 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Wed, 21 May 2008 10:32:56 -0000 Subject: [llvm-commits] [vmkit] r51368 - /vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp Message-ID: <200805211032.m4LAWvi2007724@zion.cs.uiuc.edu> Author: geoffray Date: Wed May 21 05:32:55 2008 New Revision: 51368 URL: http://llvm.org/viewvc/llvm-project?rev=51368&view=rev Log: Use new lookupAttribut function. Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp?rev=51368&r1=51367&r2=51368&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMThrowable.cpp Wed May 21 05:32:55 2008 @@ -52,8 +52,7 @@ JavaObject* className = vm->UTF8ToStr(cl->name->internalToJava(vm, 0, cl->name->size)); JavaObject* sourceName = 0; - Attribut* sourceAtt = Attribut::lookup(&cl->attributs, - Attribut::sourceFileAttribut); + Attribut* sourceAtt = cl->lookupAttribut(Attribut::sourceFileAttribut); if (sourceAtt) { Reader* reader = sourceAtt->toReader(JavaThread::get()->isolate, cl->bytes, From matthijs at stdin.nl Wed May 21 05:47:33 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Wed, 21 May 2008 10:47:33 -0000 Subject: [llvm-commits] [test-suite] r51369 - /test-suite/trunk/RunSafely.sh Message-ID: <200805211047.m4LAlXrl008185@zion.cs.uiuc.edu> Author: matthijs Date: Wed May 21 05:47:32 2008 New Revision: 51369 URL: http://llvm.org/viewvc/llvm-project?rev=51369&view=rev Log: Run test-suite commands in (another) subshell. This ensures that the output of the program and the time command is properly separated. This used to work only on shells that have a builtin "time" command (such as bash). This change makes things work consistently among different shells (tested on bash, dash and FreeBSD sh) and should be POSIX compatible. A similar change is probably needed for the remote execution part, but someone who is using that should have a look at it. Modified: test-suite/trunk/RunSafely.sh Modified: test-suite/trunk/RunSafely.sh URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/RunSafely.sh?rev=51369&r1=51368&r2=51369&view=diff ============================================================================== --- test-suite/trunk/RunSafely.sh (original) +++ test-suite/trunk/RunSafely.sh Wed May 21 05:47:32 2008 @@ -105,7 +105,7 @@ fi if [ "x$RHOST" = x ] ; then - ( sh -c "$ULIMITCMD time -p $COMMAND >$OUTFILE 2>&1 < $INFILE; echo exit \$?" ) 2>&1 \ + ( sh -c "$ULIMITCMD time -p sh -c '$COMMAND >$OUTFILE 2>&1 < $INFILE; echo exit \$?'" ) 2>&1 \ | awk -- '\ BEGIN { cpu = 0.0; } /^user/ { cpu += $2; print; } From matthijs at stdin.nl Wed May 21 05:51:50 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Wed, 21 May 2008 12:51:50 +0200 Subject: [llvm-commits] [test-suite] r51369 - /test-suite/trunk/RunSafely.sh In-Reply-To: <200805211047.m4LAlXrl008185@zion.cs.uiuc.edu> References: <200805211047.m4LAlXrl008185@zion.cs.uiuc.edu> Message-ID: <20080521105150.GA13165@katherina.student.utwente.nl> Tanya, should this commit perhaps be included in the release? It makes the test-suite work on Ubuntu and BSD's. Or is the test-suite not included with a release? Gr. Matthijs On Wed, May 21, 2008 at 10:47:33AM -0000, Matthijs Kooijman wrote: > Author: matthijs > Date: Wed May 21 05:47:32 2008 > New Revision: 51369 > > URL: http://llvm.org/viewvc/llvm-project?rev=51369&view=rev > Log: > Run test-suite commands in (another) subshell. This ensures that the output of > the program and the time command is properly separated. This used to work only > on shells that have a builtin "time" command (such as bash). This change makes > things work consistently among different shells (tested on bash, dash and > FreeBSD sh) and should be POSIX compatible. > > A similar change is probably needed for the remote execution part, but someone > who is using that should have a look at it. > > > Modified: > test-suite/trunk/RunSafely.sh > > Modified: test-suite/trunk/RunSafely.sh > URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/RunSafely.sh?rev=51369&r1=51368&r2=51369&view=diff > > ============================================================================== > --- test-suite/trunk/RunSafely.sh (original) > +++ test-suite/trunk/RunSafely.sh Wed May 21 05:47:32 2008 > @@ -105,7 +105,7 @@ > fi > > if [ "x$RHOST" = x ] ; then > - ( sh -c "$ULIMITCMD time -p $COMMAND >$OUTFILE 2>&1 < $INFILE; echo exit \$?" ) 2>&1 \ > + ( sh -c "$ULIMITCMD time -p sh -c '$COMMAND >$OUTFILE 2>&1 < $INFILE; echo exit \$?'" ) 2>&1 \ > | awk -- '\ > BEGIN { cpu = 0.0; } > /^user/ { cpu += $2; print; } > > > _______________________________________________ > 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: Digital signature Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20080521/8ee6e630/attachment.bin From ggreif at gmail.com Wed May 21 09:07:30 2008 From: ggreif at gmail.com (Gabor Greif) Date: Wed, 21 May 2008 14:07:30 -0000 Subject: [llvm-commits] [llvm] r51372 - /llvm/trunk/lib/Analysis/ConstantFolding.cpp Message-ID: <200805211407.m4LE7UIl013915@zion.cs.uiuc.edu> Author: ggreif Date: Wed May 21 09:07:30 2008 New Revision: 51372 URL: http://llvm.org/viewvc/llvm-project?rev=51372&view=rev Log: suppress gcc3.4.6's warnings Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ConstantFolding.cpp?rev=51372&r1=51371&r2=51372&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ConstantFolding.cpp (original) +++ llvm/trunk/lib/Analysis/ConstantFolding.cpp Wed May 21 09:07:30 2008 @@ -602,6 +602,7 @@ if (Ty == Type::DoubleTy) return ConstantFP::get(APFloat(V)); assert(0 && "Can only constant fold float/double"); + return 0; // dummy return to suppress warning } static Constant *ConstantFoldBinaryFP(double (*NativeFP)(double, double), @@ -619,6 +620,7 @@ if (Ty == Type::DoubleTy) return ConstantFP::get(APFloat(V)); assert(0 && "Can only constant fold float/double"); + return 0; // dummy return to suppress warning } /// ConstantFoldCall - Attempt to constant fold a call to the specified function From nicolas.geoffray at lip6.fr Wed May 21 09:40:12 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Wed, 21 May 2008 14:40:12 -0000 Subject: [llvm-commits] [vmkit] r51373 - in /vmkit/trunk/lib/JnJVM: Classpath/ClasspathVMClass.cpp VMCore/JavaClass.cpp VMCore/JavaClass.h VMCore/JavaInitialise.cpp VMCore/JavaIsolate.cpp VMCore/JavaUpcalls.cpp VMCore/JavaUpcalls.h VMCore/Jnjvm.cpp VMCore/Jnjvm.h VMCore/JnjvmModule.cpp VMCore/JnjvmModule.h VMCore/LockedMap.h VMCore/VirtualTables.cpp Message-ID: <200805211440.m4LEeDAE015039@zion.cs.uiuc.edu> Author: geoffray Date: Wed May 21 09:40:12 2008 New Revision: 51373 URL: http://llvm.org/viewvc/llvm-project?rev=51373&view=rev Log: Methods and fields are now hashed in Class. Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.h vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp?rev=51373&r1=51372&r2=51373&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp Wed May 21 09:40:12 2008 @@ -83,12 +83,13 @@ if (cl->isArray || isInterface(cl->access)) { return (jobject)ArrayObject::acons(0, Classpath::constructorArrayClass, vm); } else { - std::vector meths = cl->virtualMethods; + CommonClass::method_map meths = cl->virtualMethods; std::vector res; - for (std::vector::iterator i = meths.begin(), e = meths.end(); + for (CommonClass::method_iterator i = meths.begin(), e = meths.end(); i != e; ++i) { - if ((*i)->name == Jnjvm::initName && (!publicOnly || isPublic((*i)->access))) { - res.push_back(*i); + JavaMethod* meth = i->second; + if (meth->name == Jnjvm::initName && (!publicOnly || isPublic(meth->access))) { + res.push_back(meth); } } @@ -121,19 +122,21 @@ if (cl->isArray) { return (jobject)ArrayObject::acons(0, Classpath::methodArrayClass, vm); } else { - std::vector meths = cl->virtualMethods; + CommonClass::method_map meths = cl->virtualMethods; std::vector res; - for (std::vector::iterator i = meths.begin(), e = meths.end(); + for (CommonClass::method_iterator i = meths.begin(), e = meths.end(); i != e; ++i) { - if ((*i)->name != Jnjvm::initName && (!publicOnly || isPublic((*i)->access))) { - res.push_back(*i); + JavaMethod* meth = i->second; + if (meth->name != Jnjvm::initName && (!publicOnly || isPublic(meth->access))) { + res.push_back(meth); } } meths = cl->staticMethods; - for (std::vector::iterator i = meths.begin(), e = meths.end(); + for (CommonClass::method_iterator i = meths.begin(), e = meths.end(); i != e; ++i) { - if ((*i)->name != Jnjvm::clinitName && (!publicOnly || isPublic((*i)->access))) { - res.push_back(*i); + JavaMethod* meth = i->second; + if (meth->name != Jnjvm::clinitName && (!publicOnly || isPublic(meth->access))) { + res.push_back(meth); } } @@ -299,19 +302,21 @@ if (cl->isArray) { return (jobject)ArrayObject::acons(0, Classpath::fieldArrayClass, vm); } else { - std::vector fields = cl->virtualFields; + CommonClass::field_map fields = cl->virtualFields; std::vector res; - for (std::vector::iterator i = fields.begin(), e = fields.end(); + for (CommonClass::field_iterator i = fields.begin(), e = fields.end(); i != e; ++i) { - if (!publicOnly || isPublic((*i)->access)) { - res.push_back(*i); + JavaField* field = i->second; + if (!publicOnly || isPublic(field->access)) { + res.push_back(field); } } fields = cl->staticFields; - for (std::vector::iterator i = fields.begin(), e = fields.end(); + for (CommonClass::field_iterator i = fields.begin(), e = fields.end(); i != e; ++i) { - if (!publicOnly || isPublic((*i)->access)) { - res.push_back(*i); + JavaField* field = i->second; + if (!publicOnly || isPublic(field->access)) { + res.push_back(field); } } Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp?rev=51373&r1=51372&r2=51373&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp Wed May 21 09:40:12 2008 @@ -40,10 +40,6 @@ CommonClass* ClassArray::SuperArray = 0; std::vector ClassArray::InterfacesArray; -std::vector ClassArray::VirtualMethodsArray; -std::vector ClassArray::StaticMethodsArray; -std::vector ClassArray::VirtualFieldsArray; -std::vector ClassArray::StaticFieldsArray; void Attribut::derive(const UTF8* name, unsigned int length, const Reader* reader) { @@ -230,20 +226,14 @@ const UTF8* type, bool isStatic, bool recurse) { - std::vector* meths = (isStatic? &staticMethods : - &virtualMethods); + FieldCmp CC(name, type); + method_map& map = isStatic ? staticMethods : virtualMethods; + method_iterator End = map.end(); + method_iterator I = map.find(CC); + if (I != End) return I->second; JavaMethod *cur = 0; - for (std::vector::iterator i = meths->begin(), - e = meths->end(); i!= e; i++) { - cur = *i; - if (cur->name->equals(name) && cur->type->equals(type)) { - return cur; - } - } - cur = 0; - if (recurse) { if (super) cur = super->lookupMethodDontThrow(name, type, isStatic, recurse); @@ -275,20 +265,14 @@ const UTF8* type, bool isStatic, bool recurse) { - std::vector* fields = (isStatic? &staticFields : &virtualFields); + FieldCmp CC(name, type); + field_map& map = isStatic ? staticFields : virtualFields; + field_iterator End = map.end(); + field_iterator I = map.find(CC); + if (I != End) return I->second; JavaField *cur = 0; - for (std::vector::iterator i = fields->begin(), - e = fields->end(); i!= e; i++) { - cur = *i; - if (cur->name->equals(name) && cur->type->equals(type)) { - return cur; - } - } - - cur = 0; - if (recurse) { if (super) cur = super->lookupFieldDontThrow(name, type, isStatic, recurse); @@ -504,3 +488,46 @@ } } #endif + + +JavaMethod* CommonClass::constructMethod(const UTF8* name, + const UTF8* type, uint32 access) { + method_map& map = isStatic(access) ? staticMethods : virtualMethods; + FieldCmp CC(name, type); + method_iterator End = map.end(); + method_iterator I = map.find(CC); + if (I == End) { + JavaMethod* method = vm_new(isolate, JavaMethod)(); + method->name = name; + method->type = type; + method->classDef = (Class*)this; + method->signature = (Signdef*)isolate->constructType(type); + method->code = 0; + method->access = access; + map.insert(std::make_pair(CC, method)); + return method; + } else { + return I->second; + } +} + +JavaField* CommonClass::constructField(const UTF8* name, + const UTF8* type, uint32 access) { + field_map& map = isStatic(access) ? staticFields : virtualFields; + FieldCmp CC(name, type); + field_iterator End = map.end(); + field_iterator I = map.find(CC); + if (I == End) { + JavaField* field = vm_new(isolate, JavaField)(); + field->name = name; + field->type = type; + field->classDef = (Class*)this; + field->signature = isolate->constructType(type); + field->ptrOffset = 0; + field->access = access; + map.insert(std::make_pair(CC, field)); + return field; + } else { + return I->second; + } +} Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h?rev=51373&r1=51372&r2=51373&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h Wed May 21 09:40:12 2008 @@ -10,6 +10,7 @@ #ifndef JNJVM_JAVA_CLASS_H #define JNJVM_JAVA_CLASS_H +#include #include #include "types.h" @@ -63,7 +64,24 @@ }; + class CommonClass : public mvm::Object { +private: + +class FieldCmp { +public: + const UTF8* name; + const UTF8* type; + + FieldCmp(const UTF8* n, const UTF8* t) : name(n), type(t) {} + + inline bool operator<(const FieldCmp &cmp) const { + if (name < cmp.name) return true; + else if (name > cmp.name) return false; + else return type < cmp.type; + } +}; + public: /// virtualSize - The size of instances of this class. @@ -133,21 +151,38 @@ JavaObject* delegatee; #endif - /// virtualMethods - List of all the virtual methods defined by this class. - /// This does not contain non-redefined super methods. - std::vector virtualMethods; - - /// staticMethods - List of all the static methods defined by this class. - /// - std::vector staticMethods; + typedef std::map, + gc_allocator > >::iterator + field_iterator; + + typedef std::map, + gc_allocator > > + field_map; + /// virtualFields - List of all the virtual fields defined in this class. /// This does not contain non-redefined super fields. - std::vector virtualFields; - + field_map virtualFields; + /// staticFields - List of all the static fields defined in this class. /// - std::vector staticFields; + field_map staticFields; + + typedef std::map, + gc_allocator > >::iterator + method_iterator; + + typedef std::map, + gc_allocator > > + method_map; + + /// virtualMethods - List of all the virtual methods defined by this class. + /// This does not contain non-redefined super methods. + method_map virtualMethods; + + /// staticMethods - List of all the static methods defined by this class. + /// + method_map staticMethods; /// display - The class hierarchy of supers for this class. /// @@ -157,6 +192,12 @@ /// display[depth - 1] contains the class. uint32 depth; + JavaMethod* constructMethod(const UTF8* name, const UTF8* type, + uint32 access); + + JavaField* constructField(const UTF8* name, const UTF8* type, + uint32 access); + static void printClassName(const UTF8* name, mvm::PrintBuffer* buf); void initialise(Jnjvm* isolate, bool array); @@ -297,10 +338,6 @@ static CommonClass* SuperArray; static std::vector InterfacesArray; - static std::vector VirtualMethodsArray; - static std::vector StaticMethodsArray; - static std::vector VirtualFieldsArray; - static std::vector StaticFieldsArray; }; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp?rev=51373&r1=51372&r2=51373&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp Wed May 21 09:40:12 2008 @@ -63,8 +63,6 @@ INIT(ZipArchive); INIT(UTF8Map); INIT(ClassMap); - INIT(FieldMap); - INIT(MethodMap); INIT(ZipFileMap); INIT(StringMap); INIT(jnjvm::TypeMap); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp?rev=51373&r1=51372&r2=51373&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp Wed May 21 09:40:12 2008 @@ -478,8 +478,6 @@ bootstrapVM->hashUTF8->copy(isolate->hashUTF8); isolate->hashStr = vm_new(isolate, StringMap)(); isolate->bootstrapClasses = callingVM->bootstrapClasses; - isolate->loadedMethods = vm_new(isolate, MethodMap)(); - isolate->loadedFields = vm_new(isolate, FieldMap)(); isolate->javaTypes = vm_new(isolate, TypeMap)(); isolate->globalRefsLock = mvm::Lock::allocNormal(); #ifdef MULTIPLE_VM @@ -532,8 +530,6 @@ isolate->hashUTF8 = vm_new(isolate, UTF8Map)(); isolate->hashStr = vm_new(isolate, StringMap)(); isolate->bootstrapClasses = vm_new(isolate, ClassMap)(); - isolate->loadedMethods = vm_new(isolate, MethodMap)(); - isolate->loadedFields = vm_new(isolate, FieldMap)(); isolate->jniEnv = &JNI_JNIEnvTable; isolate->javavmEnv = &JNI_JavaVMTable; isolate->globalRefsLock = mvm::Lock::allocNormal(); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp?rev=51373&r1=51372&r2=51373&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.cpp Wed May 21 09:40:12 2008 @@ -23,14 +23,14 @@ #include "JnjvmModule.h" #define COMPILE_METHODS(cl) \ - for (std::vector::iterator i = cl->virtualMethods.begin(), \ + for (CommonClass::method_iterator i = cl->virtualMethods.begin(), \ e = cl->virtualMethods.end(); i!= e; ++i) { \ - (*i)->compiledPtr(); \ + i->second->compiledPtr(); \ } \ \ - for (std::vector::iterator i = cl->staticMethods.begin(), \ + for (CommonClass::method_iterator i = cl->staticMethods.begin(), \ e = cl->staticMethods.end(); i!= e; ++i) { \ - (*i)->compiledPtr(); \ + i->second->compiledPtr(); \ } Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.h?rev=51373&r1=51372&r2=51373&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaUpcalls.h Wed May 21 09:40:12 2008 @@ -16,12 +16,12 @@ CommonClass::jnjvmClassLoader) #define UPCALL_FIELD(vm, cl, name, type, acc) \ - vm->constructField(UPCALL_CLASS(vm, cl), vm->asciizConstructUTF8(name), \ - vm->asciizConstructUTF8(type), acc) + UPCALL_CLASS(vm, cl)->constructField(vm->asciizConstructUTF8(name), \ + vm->asciizConstructUTF8(type), acc) #define UPCALL_METHOD(vm, cl, name, type, acc) \ - vm->constructMethod(UPCALL_CLASS(vm, cl), vm->asciizConstructUTF8(name), \ - vm->asciizConstructUTF8(type), acc) + UPCALL_CLASS(vm, cl)->constructMethod(vm->asciizConstructUTF8(name), \ + vm->asciizConstructUTF8(type), acc) #define UPCALL_ARRAY_CLASS(vm, name, depth) \ vm->constructArray( \ Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp?rev=51373&r1=51372&r2=51373&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp Wed May 21 09:40:12 2008 @@ -216,17 +216,17 @@ void Jnjvm::readFields(Class* cl, Reader* reader) { unsigned short int nbFields = reader->readU2(); JavaCtpInfo* ctpInfo = cl->ctpInfo; + uint32 sindex = 0; + uint32 vindex = 0; for (int i = 0; i < nbFields; i++) { - unsigned short int access = reader->readU2(); + uint16 access = reader->readU2(); const UTF8* name = ctpInfo->UTF8At(reader->readU2()); const UTF8* type = ctpInfo->UTF8At(reader->readU2()); - JavaField* field = constructField(cl, name, type, access); + JavaField* field = cl->constructField(name, type, access); + isStatic(access) ? + field->num = sindex++ : + field->num = vindex++; readAttributs(cl, reader, field->attributs); - if (isStatic(access)) { - cl->staticFields.push_back(field); - } else { - cl->virtualFields.push_back(field); - } } } @@ -234,17 +234,12 @@ unsigned short int nbMethods = reader->readU2(); JavaCtpInfo* ctpInfo = cl->ctpInfo; for (int i = 0; i < nbMethods; i++) { - unsigned short int access = reader->readU2(); + uint16 access = reader->readU2(); const UTF8* name = ctpInfo->UTF8At(reader->readU2()); const UTF8* type = ctpInfo->UTF8At(reader->readU2()); - JavaMethod* meth = constructMethod(cl, name, type, access); + JavaMethod* meth = cl->constructMethod(name, type, access); readAttributs(cl, reader, meth->attributs); - if (isStatic(access)) { - cl->staticMethods.push_back(meth); - } else { - cl->virtualMethods.push_back(meth); - } - } + } } void Jnjvm::readClass(Class* cl) { @@ -670,10 +665,6 @@ cl->_baseClass = 0; cl->super = ClassArray::SuperArray; cl->interfaces = ClassArray::InterfacesArray; - cl->virtualMethods = ClassArray::VirtualMethodsArray; - cl->staticMethods = ClassArray::StaticMethodsArray; - cl->virtualFields = ClassArray::VirtualFieldsArray; - cl->staticFields = ClassArray::StaticFieldsArray; cl->depth = 1; cl->display.push_back(ClassArray::SuperArray); cl->display.push_back(cl); @@ -756,49 +747,6 @@ } } -static JavaField* fieldDup(FieldCmp & cmp, Jnjvm *vm) { - JavaField* field = vm_new(vm, JavaField)(); - field->name = cmp.name; - field->type = cmp.type; - field->classDef = (Class*)cmp.classDef; - field->signature = vm->constructType(field->type); - field->ptrOffset = 0; - return field; -} - -JavaField* Jnjvm::constructField(Class* cl, const UTF8* name, const UTF8* type, - uint32 access){ - FieldCmp CC(name, cl, type, 0); - JavaField* f = loadedFields->lookupOrCreate(CC, this, fieldDup); - f->access = access; - return f; -} - -JavaField* Jnjvm::lookupField(CommonClass* cl, const UTF8* name, - const UTF8* type) { - FieldCmp CC(name, cl, type, 0); - JavaField* f = loadedFields->lookup(CC); - return f; -} - -static JavaMethod* methodDup(FieldCmp & cmp, Jnjvm *vm) { - JavaMethod* method = vm_new(vm, JavaMethod)(); - method->name = cmp.name; - method->type = cmp.type; - method->classDef = (Class*)cmp.classDef; - method->signature = (Signdef*)vm->constructType(method->type); - method->code = 0; - method->access = cmp.access; - return method; -} - -JavaMethod* Jnjvm::constructMethod(Class* cl, const UTF8* name, - const UTF8* type, uint32 access) { - FieldCmp CC(name, cl, type, access); - JavaMethod* f = loadedMethods->lookupOrCreate(CC, this, methodDup); - return f; -} - const UTF8* Jnjvm::asciizConstructUTF8(const char* asciiz) { return hashUTF8->lookupOrCreateAsciiz(this, asciiz); } Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h?rev=51373&r1=51372&r2=51373&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.h Wed May 21 09:40:12 2008 @@ -202,14 +202,9 @@ ArrayUInt8* openName(const UTF8* utf8); CommonClass* lookupClass(const UTF8* utf8, JavaObject* loader); - JavaField* lookupField(CommonClass* cl, const UTF8* name, const UTF8* type); ClassArray* constructArray(const UTF8* name, JavaObject* loader); Class* constructClass(const UTF8* name, JavaObject* loader); - JavaField* constructField(Class* cl, const UTF8* name, const UTF8* type, - uint32 access); - JavaMethod* constructMethod(Class* cl, const UTF8* name, const UTF8* type, - uint32 access); const UTF8* asciizConstructUTF8(const char* asciiz); const UTF8* readerConstructUTF8(const uint16* buf, uint32 len); JavaString* asciizToStr(const char* asciiz); @@ -249,8 +244,6 @@ UTF8Map * hashUTF8; StringMap * hashStr; ClassMap* bootstrapClasses; - MethodMap* loadedMethods; - FieldMap* loadedFields; TypeMap* javaTypes; #ifdef MULTIPLE_VM StaticInstanceMap* statics; Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=51373&r1=51372&r2=51373&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Wed May 21 09:40:12 2008 @@ -161,7 +161,7 @@ #ifndef WITHOUT_VTABLE VirtualTable* JnjvmModule::allocateVT(Class* cl, - std::vector::iterator meths) { + CommonClass::method_iterator meths) { if (meths == cl->virtualMethods.end()) { uint64 size = cl->virtualTableSize; VirtualTable* VT = (VirtualTable*)malloc(size * sizeof(void*)); @@ -173,7 +173,7 @@ } return VT; } else { - JavaMethod* meth = *meths; + JavaMethod* meth = meths->second; JavaMethod* parent = cl->super? cl->super->lookupMethodDontThrow(meth->name, meth->type, false, true) : 0; @@ -185,7 +185,7 @@ offset = parent->offset; meth->offset = parent->offset; } - VirtualTable* VT = allocateVT(cl, meths + 1); + VirtualTable* VT = allocateVT(cl, ++meths); LLVMMethodInfo* LMI = getMethodInfo(meth); Function* func = LMI->getMethod(); ExecutionEngine* EE = mvm::jit::executionEngine; @@ -235,7 +235,7 @@ #ifdef WITH_TRACER LLVMClassInfo* LCI = (LLVMClassInfo*)getClassInfo(cl); const Type* type = stat ? LCI->getStaticType() : LCI->getVirtualType(); - std::vector &fields = stat ? cl->staticFields : cl->virtualFields; + CommonClass::field_map fields = stat ? cl->staticFields : cl->virtualFields; Function* func = Function::Create(JnjvmModule::MarkAndTraceType, GlobalValue::ExternalLinkage, @@ -268,10 +268,10 @@ } #endif - for (std::vector::iterator i = fields.begin(), - e = fields.end(); i!= e; ++i) { - if ((*i)->signature->funcs->doTrace) { - LLVMFieldInfo* LFI = getFieldInfo(*i); + for (CommonClass::field_iterator i = fields.begin(), e = fields.end(); + i!= e; ++i) { + if (i->second->signature->funcs->doTrace) { + LLVMFieldInfo* LFI = getFieldInfo(i->second); std::vector args; //size = 2 args.push_back(zero); args.push_back(LFI->getOffset()); @@ -312,6 +312,8 @@ const Type* LLVMClassInfo::getVirtualType() { if (!virtualType) { std::vector fields; + JavaField* array[classDef->virtualFields.size()]; + if (classDef->super) { LLVMClassInfo* CLI = (LLVMClassInfo*)module->getClassInfo(classDef->super); @@ -320,13 +322,17 @@ fields.push_back(JnjvmModule::JavaObjectType->getContainedType(0)); } - uint32 index = 0; - for (std::vector::iterator i = classDef->virtualFields.begin(), + for (CommonClass::field_iterator i = classDef->virtualFields.begin(), e = classDef->virtualFields.end(); i!= e; ++i) { - uint8 id = (*i)->signature->funcs->numId; + JavaField* field = i->second; + array[field->num] = field; + } + + + for (uint32 index = 0; index < classDef->virtualFields.size(); ++index) { + uint8 id = array[index]->signature->funcs->numId; LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; fields.push_back(LAI.llvmType); - (*i)->num = index++; } StructType* structType = StructType::get(fields, false); @@ -334,9 +340,10 @@ const TargetData* targetData = mvm::jit::executionEngine->getTargetData(); const StructLayout* sl = targetData->getStructLayout(structType); - for (std::vector::iterator i = classDef->virtualFields.begin(), + for (CommonClass::field_iterator i = classDef->virtualFields.begin(), e = classDef->virtualFields.end(); i!= e; ++i) { - (*i)->ptrOffset = sl->getElementOffset((*i)->num + 1); + JavaField* field = i->second; + field->ptrOffset = sl->getElementOffset(field->num + 1); } VirtualTable* VT = module->makeVT((Class*)classDef, false); @@ -356,15 +363,20 @@ if (!staticType) { Class* cl = (Class*)classDef; std::vector fields; + JavaField* array[classDef->staticFields.size() + 1]; fields.push_back(JnjvmModule::JavaObjectType->getContainedType(0)); - uint32 index = 0; - for (std::vector::iterator i = classDef->staticFields.begin(), - e = classDef->staticFields.end(); i!= e; ++i) { - uint8 id = (*i)->signature->funcs->numId; + for (CommonClass::field_iterator i = classDef->staticFields.begin(), + e = classDef->staticFields.end(); i!= e; ++i) { + JavaField* field = i->second; + array[field->num] = field; + } + + for (uint32 index = 0; index < classDef->staticFields.size(); ++index) { + JavaField* field = array[index]; + uint8 id = field->signature->funcs->numId; LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; fields.push_back(LAI.llvmType); - (*i)->num = index++; } StructType* structType = StructType::get(fields, false); @@ -372,9 +384,10 @@ const TargetData* targetData = mvm::jit::executionEngine->getTargetData(); const StructLayout* sl = targetData->getStructLayout(structType); - for (std::vector::iterator i = classDef->staticFields.begin(), + for (CommonClass::field_iterator i = classDef->staticFields.begin(), e = classDef->staticFields.end(); i!= e; ++i) { - (*i)->ptrOffset = sl->getElementOffset((*i)->num + 1); + JavaField* field = i->second; + field->ptrOffset = sl->getElementOffset(field->num + 1); } @@ -389,10 +402,10 @@ (JavaObject*)classDef->isolate->allocateObject(cl->staticSize, cl->staticVT); val->initialise(classDef); - for (std::vector::iterator i = cl->staticFields.begin(), + for (CommonClass::field_iterator i = cl->staticFields.begin(), e = cl->staticFields.end(); i!= e; ++i) { - (*i)->initField(val); + i->second->initField(val); } cl->_staticInstance = val; Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h?rev=51373&r1=51372&r2=51373&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.h Wed May 21 09:40:12 2008 @@ -20,6 +20,8 @@ #include "llvm/Type.h" #include "llvm/Value.h" +#include "JavaClass.h" + namespace jnjvm { class CommonClass; @@ -248,7 +250,7 @@ field_iterator; VirtualTable* makeVT(Class* cl, bool stat); - VirtualTable* allocateVT(Class* cl, std::vector::iterator meths); + VirtualTable* allocateVT(Class* cl, CommonClass::method_iterator meths); public: Modified: vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h?rev=51373&r1=51372&r2=51373&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/LockedMap.h Wed May 21 09:40:12 2008 @@ -134,25 +134,6 @@ void insert(const UTF8* val); }; -class FieldCmp { -public: - const UTF8* name; - CommonClass* classDef; - const UTF8* type; - uint32_t access; - - FieldCmp(const UTF8* n, CommonClass* c, const UTF8* t, uint32 a) : name(n), classDef(c), - type(t), access(a) {} - - inline bool operator<(const FieldCmp &cmp) const { - if (name < cmp.name) return true; - else if (name > cmp.name) return false; - else if (classDef < cmp.classDef) return true; - else if (classDef > cmp.classDef) return false; - else return type < cmp.type; - } -}; - class ClassMap : public LockedMap { public: @@ -165,30 +146,6 @@ virtual void TRACER; }; -class FieldMap : - public LockedMap > { -public: - static VirtualTable* VT; - - FieldMap() { - lock = mvm::Lock::allocNormal(); - } - - virtual void TRACER; -}; - -class MethodMap : - public LockedMap > { -public: - static VirtualTable* VT; - - MethodMap() { - lock = mvm::Lock::allocNormal(); - } - - virtual void TRACER; -}; - struct ltstr { bool operator()(const char* s1, const char* s2) const Modified: vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp?rev=51373&r1=51372&r2=51373&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Wed May 21 09:40:12 2008 @@ -62,8 +62,6 @@ INIT(ZipArchive); INIT(UTF8Map); INIT(ClassMap); - INIT(FieldMap); - INIT(MethodMap); INIT(ZipFileMap); INIT(StringMap); INIT(TypeMap); @@ -122,6 +120,27 @@ #ifndef MULTIPLE_VM delegatee->MARK_AND_TRACE; #endif + + for (field_iterator i = virtualFields.begin(), e = virtualFields.end(); + i!= e; ++i) { + i->second->MARK_AND_TRACE; + } + + for (field_iterator i = staticFields.begin(), e = staticFields.end(); + i!= e; ++i) { + i->second->MARK_AND_TRACE; + } + + for (method_iterator i = staticMethods.begin(), e = staticMethods.end(); + i!= e; ++i) { + i->second->MARK_AND_TRACE; + } + + for (method_iterator i = virtualMethods.begin(), e = virtualMethods.end(); + i!= e; ++i) { + i->second->MARK_AND_TRACE; + } + } void Class::TRACER { @@ -204,8 +223,6 @@ hashUTF8->MARK_AND_TRACE; hashStr->MARK_AND_TRACE; bootstrapClasses->MARK_AND_TRACE; - loadedMethods->MARK_AND_TRACE; - loadedFields->MARK_AND_TRACE; javaTypes->MARK_AND_TRACE; TRACE_VECTOR(JavaObject*, gc_allocator, globalRefs); #ifdef MULTIPLE_VM @@ -259,19 +276,6 @@ } } -void FieldMap::TRACER { - for (iterator i = map.begin(), e = map.end(); i!= e; ++i) { - i->second->MARK_AND_TRACE; - } -} - - -void MethodMap::TRACER { - for (iterator i = map.begin(), e = map.end(); i!= e; ++i) { - i->second->MARK_AND_TRACE; - } -} - void ZipFileMap::TRACER { for (iterator i = map.begin(), e = map.end(); i!= e; ++i) { i->second->MARK_AND_TRACE; From nicolas.geoffray at lip6.fr Wed May 21 09:41:09 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Wed, 21 May 2008 14:41:09 -0000 Subject: [llvm-commits] [vmkit] r51374 - /vmkit/trunk/lib/Mvm/GCMmap2/gccollector.h Message-ID: <200805211441.m4LEfA9F015080@zion.cs.uiuc.edu> Author: geoffray Date: Wed May 21 09:41:09 2008 New Revision: 51374 URL: http://llvm.org/viewvc/llvm-project?rev=51374&view=rev Log: Perform the collection check before allocating. Modified: vmkit/trunk/lib/Mvm/GCMmap2/gccollector.h Modified: vmkit/trunk/lib/Mvm/GCMmap2/gccollector.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/Mvm/GCMmap2/gccollector.h?rev=51374&r1=51373&r2=51374&view=diff ============================================================================== --- vmkit/trunk/lib/Mvm/GCMmap2/gccollector.h (original) +++ vmkit/trunk/lib/Mvm/GCMmap2/gccollector.h Wed May 21 09:41:09 2008 @@ -165,6 +165,15 @@ STATIC inline void *gcmalloc(VirtualTable *vt, size_t n) { lock(); + + _since_last_collection -= n; + if(_enable_auto && (_since_last_collection <= 0)) { +#ifdef SERVICE_GC + ++gcTriggered; +#endif + collect_unprotect(); + } + register GCChunkNode *header = allocator->alloc_chunk(n + sizeof(gc_header), 1, current_mark & 1); #ifdef SERVICE_GC header->meta = this; @@ -176,13 +185,6 @@ register struct gc_header *p = header->chunk(); p->_XXX_vt = vt; - _since_last_collection -= n; - if(_enable_auto && (_since_last_collection <= 0)) { -#ifdef SERVICE_GC - ++gcTriggered; -#endif - collect_unprotect(); - } unlock(); return p->_2gc(); @@ -190,7 +192,7 @@ STATIC inline void *gcrealloc(void *ptr, size_t n) { lock(); - + GCPage *desc = GCHash::get(ptr); GCChunkNode *node = desc->o2node(ptr, GCChunkNode::maskCollectable); @@ -198,6 +200,16 @@ gcfatal("%p isn't a avalid object", ptr); size_t old_sz = node->nbb(); + + _since_last_collection -= (n - old_sz); + + if(_enable_auto && (_since_last_collection <= 0)) { +#ifdef SERVICE_GC + ++gcTriggered; +#endif + collect_unprotect(); + } + GCChunkNode *res = allocator->realloc_chunk(desc, node, n+sizeof(gc_header)); #ifdef SERVICE_GC res->meta = this; @@ -210,14 +222,6 @@ } gc_header *obj = res->chunk(); - _since_last_collection -= (n - old_sz); - - if(_enable_auto && (_since_last_collection <= 0)) { -#ifdef SERVICE_GC - ++gcTriggered; -#endif - collect_unprotect(); - } unlock(); return obj->_2gc(); From ggreif at gmail.com Wed May 21 09:48:25 2008 From: ggreif at gmail.com (Gabor Greif) Date: Wed, 21 May 2008 14:48:25 -0000 Subject: [llvm-commits] [llvm] r51375 - in /llvm/trunk/test: C++Frontend/ CFrontend/ Message-ID: <200805211448.m4LEmQuL015333@zion.cs.uiuc.edu> Author: ggreif Date: Wed May 21 09:48:24 2008 New Revision: 51375 URL: http://llvm.org/viewvc/llvm-project?rev=51375&view=rev Log: resurrect lost tests by renaming them to not end with .tr Added: llvm/trunk/test/C++Frontend/2003-08-24-Cleanup.cpp - copied unchanged from r51372, llvm/trunk/test/C++Frontend/2003-08-24-Cleanup.cpp.tr llvm/trunk/test/C++Frontend/2003-08-29-ArgPassingBug.cpp - copied unchanged from r51372, llvm/trunk/test/C++Frontend/2003-08-29-ArgPassingBug.cpp.tr llvm/trunk/test/C++Frontend/2003-10-21-InnerClass.cpp - copied unchanged from r51372, llvm/trunk/test/C++Frontend/2003-10-21-InnerClass.cpp.tr llvm/trunk/test/C++Frontend/2003-11-02-WeakLinkage.cpp - copied unchanged from r51372, llvm/trunk/test/C++Frontend/2003-11-02-WeakLinkage.cpp.tr llvm/trunk/test/C++Frontend/2003-11-08-ArrayAddress.cpp - copied unchanged from r51372, llvm/trunk/test/C++Frontend/2003-11-08-ArrayAddress.cpp.tr llvm/trunk/test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp - copied unchanged from r51372, llvm/trunk/test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr llvm/trunk/test/C++Frontend/2003-11-18-MemberInitializationCasting.cpp - copied unchanged from r51372, llvm/trunk/test/C++Frontend/2003-11-18-MemberInitializationCasting.cpp.tr llvm/trunk/test/C++Frontend/2004-01-11-DynamicInitializedConstant.cpp - copied unchanged from r51372, llvm/trunk/test/C++Frontend/2004-01-11-DynamicInitializedConstant.cpp.tr llvm/trunk/test/C++Frontend/2004-03-09-UnmangledBuiltinMethods.cpp - copied unchanged from r51372, llvm/trunk/test/C++Frontend/2004-03-09-UnmangledBuiltinMethods.cpp.tr llvm/trunk/test/C++Frontend/2004-09-27-DidntEmitTemplate.cpp - copied unchanged from r51372, llvm/trunk/test/C++Frontend/2004-09-27-DidntEmitTemplate.cpp.tr llvm/trunk/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c - copied unchanged from r51372, llvm/trunk/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr llvm/trunk/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c - copied unchanged from r51372, llvm/trunk/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c.tr llvm/trunk/test/CFrontend/2003-08-17-DeadCodeShortCircuit.c - copied unchanged from r51372, llvm/trunk/test/CFrontend/2003-08-17-DeadCodeShortCircuit.c.tr llvm/trunk/test/CFrontend/2003-11-03-AddrArrayElement.c - copied unchanged from r51372, llvm/trunk/test/CFrontend/2003-11-03-AddrArrayElement.c.tr llvm/trunk/test/CFrontend/2003-11-08-PointerSubNotGetelementptr.c - copied unchanged from r51372, llvm/trunk/test/CFrontend/2003-11-08-PointerSubNotGetelementptr.c.tr llvm/trunk/test/CFrontend/2003-11-13-TypeSafety.c - copied unchanged from r51372, llvm/trunk/test/CFrontend/2003-11-13-TypeSafety.c.tr llvm/trunk/test/CFrontend/2003-11-19-AddressOfRegister.c - copied unchanged from r51372, llvm/trunk/test/CFrontend/2003-11-19-AddressOfRegister.c.tr llvm/trunk/test/CFrontend/2003-12-14-ExternInlineSupport.c - copied unchanged from r51372, llvm/trunk/test/CFrontend/2003-12-14-ExternInlineSupport.c.tr llvm/trunk/test/CFrontend/2004-02-12-LargeAggregateCopy.c - copied unchanged from r51372, llvm/trunk/test/CFrontend/2004-02-12-LargeAggregateCopy.c.tr llvm/trunk/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c - copied unchanged from r51372, llvm/trunk/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c.tr llvm/trunk/test/CFrontend/2004-02-13-IllegalVararg.c - copied unchanged from r51372, llvm/trunk/test/CFrontend/2004-02-13-IllegalVararg.c.tr llvm/trunk/test/CFrontend/2004-02-20-Builtins.c - copied unchanged from r51372, llvm/trunk/test/CFrontend/2004-02-20-Builtins.c.tr llvm/trunk/test/CFrontend/2004-03-07-ExternalConstant.c - copied unchanged from r51372, llvm/trunk/test/CFrontend/2004-03-07-ExternalConstant.c.tr llvm/trunk/test/CFrontend/2004-06-17-UnorderedCompares.c - copied unchanged from r51372, llvm/trunk/test/CFrontend/2004-06-17-UnorderedCompares.c.tr llvm/trunk/test/CFrontend/2005-01-02-PointerDifference.c - copied unchanged from r51372, llvm/trunk/test/CFrontend/2005-01-02-PointerDifference.c.tr Removed: llvm/trunk/test/C++Frontend/2003-08-24-Cleanup.cpp.tr llvm/trunk/test/C++Frontend/2003-08-29-ArgPassingBug.cpp.tr llvm/trunk/test/C++Frontend/2003-10-21-InnerClass.cpp.tr llvm/trunk/test/C++Frontend/2003-11-02-WeakLinkage.cpp.tr llvm/trunk/test/C++Frontend/2003-11-08-ArrayAddress.cpp.tr llvm/trunk/test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr llvm/trunk/test/C++Frontend/2003-11-18-MemberInitializationCasting.cpp.tr llvm/trunk/test/C++Frontend/2004-01-11-DynamicInitializedConstant.cpp.tr llvm/trunk/test/C++Frontend/2004-03-09-UnmangledBuiltinMethods.cpp.tr llvm/trunk/test/C++Frontend/2004-09-27-DidntEmitTemplate.cpp.tr llvm/trunk/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr llvm/trunk/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c.tr llvm/trunk/test/CFrontend/2003-08-17-DeadCodeShortCircuit.c.tr llvm/trunk/test/CFrontend/2003-11-03-AddrArrayElement.c.tr llvm/trunk/test/CFrontend/2003-11-08-PointerSubNotGetelementptr.c.tr llvm/trunk/test/CFrontend/2003-11-13-TypeSafety.c.tr llvm/trunk/test/CFrontend/2003-11-19-AddressOfRegister.c.tr llvm/trunk/test/CFrontend/2003-12-14-ExternInlineSupport.c.tr llvm/trunk/test/CFrontend/2004-02-12-LargeAggregateCopy.c.tr llvm/trunk/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c.tr llvm/trunk/test/CFrontend/2004-02-13-IllegalVararg.c.tr llvm/trunk/test/CFrontend/2004-02-20-Builtins.c.tr llvm/trunk/test/CFrontend/2004-03-07-ExternalConstant.c.tr llvm/trunk/test/CFrontend/2004-06-17-UnorderedCompares.c.tr llvm/trunk/test/CFrontend/2005-01-02-PointerDifference.c.tr Removed: llvm/trunk/test/C++Frontend/2003-08-24-Cleanup.cpp.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/2003-08-24-Cleanup.cpp.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/C++Frontend/2003-08-24-Cleanup.cpp.tr (original) +++ llvm/trunk/test/C++Frontend/2003-08-24-Cleanup.cpp.tr (removed) @@ -1,10 +0,0 @@ -// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | grep unwind - -struct S { ~S(); }; - -int mightthrow(); - -int test() { - S s; - mightthrow(); -} Removed: llvm/trunk/test/C++Frontend/2003-08-29-ArgPassingBug.cpp.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/2003-08-29-ArgPassingBug.cpp.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/C++Frontend/2003-08-29-ArgPassingBug.cpp.tr (original) +++ llvm/trunk/test/C++Frontend/2003-08-29-ArgPassingBug.cpp.tr (removed) @@ -1,13 +0,0 @@ - -// RUN: %llvmgcc -xc++ -c -o /dev/null %s |& not grep WARNING - -struct iterator { - iterator(); - iterator(const iterator &I); -}; - -iterator foo(const iterator &I) { return I; } - -void test() { - foo(iterator()); -} Removed: llvm/trunk/test/C++Frontend/2003-10-21-InnerClass.cpp.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/2003-10-21-InnerClass.cpp.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/C++Frontend/2003-10-21-InnerClass.cpp.tr (original) +++ llvm/trunk/test/C++Frontend/2003-10-21-InnerClass.cpp.tr (removed) @@ -1,12 +0,0 @@ -// RUN: %llvmgcc -xc++ -S -o - %s | grep {struct.X::Y} -struct X { - - struct Y { - Y(); - }; - -}; - -X::Y::Y() { - -} Removed: llvm/trunk/test/C++Frontend/2003-11-02-WeakLinkage.cpp.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/2003-11-02-WeakLinkage.cpp.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/C++Frontend/2003-11-02-WeakLinkage.cpp.tr (original) +++ llvm/trunk/test/C++Frontend/2003-11-02-WeakLinkage.cpp.tr (removed) @@ -1,13 +0,0 @@ -// RUN: %llvmgcc -xc++ -S -o - %s | not grep weak -// The template should compile to linkonce linkage, not weak linkage. - -template -void thefunc(); - -template -inline void thefunc() {} - -void test() { - thefunc(); -} - Removed: llvm/trunk/test/C++Frontend/2003-11-08-ArrayAddress.cpp.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/2003-11-08-ArrayAddress.cpp.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/C++Frontend/2003-11-08-ArrayAddress.cpp.tr (original) +++ llvm/trunk/test/C++Frontend/2003-11-08-ArrayAddress.cpp.tr (removed) @@ -1,10 +0,0 @@ -// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | grep getelementptr - -struct foo { - int array[100]; - void *getAddr(unsigned i); -}; - -void *foo::getAddr(unsigned i) { - return &array[i]; -} Removed: llvm/trunk/test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/2003-11-09-ConstructorTypeSafety.cpp.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr (original) +++ llvm/trunk/test/C++Frontend/2003-11-09-ConstructorTypeSafety.cpp.tr (removed) @@ -1,21 +0,0 @@ -// The code generated for this testcase should be completely typesafe! -// RUN: %llvmgcc -xc++ -S -o - %s | llvm-as | opt -die | llvm-dis | \ -// RUN: notcast - -struct contained { - unsigned X; - contained(); -}; - -struct base { - unsigned A, B; -}; - -struct derived : public base { - contained _M_value_field; -}; - -int test() { - derived X; -} - Removed: llvm/trunk/test/C++Frontend/2003-11-18-MemberInitializationCasting.cpp.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/2003-11-18-MemberInitializationCasting.cpp.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/C++Frontend/2003-11-18-MemberInitializationCasting.cpp.tr (original) +++ llvm/trunk/test/C++Frontend/2003-11-18-MemberInitializationCasting.cpp.tr (removed) @@ -1,13 +0,0 @@ -// RUN: %llvmgcc -xc++ -S -o - %s | llvm-as | opt -die | llvm-dis | notcast - -struct A { - A() : i(0) {} - int getI() {return i;} - int i; -}; - -int f(int j) -{ - A a; - return j+a.getI(); -} Removed: llvm/trunk/test/C++Frontend/2004-01-11-DynamicInitializedConstant.cpp.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/2004-01-11-DynamicInitializedConstant.cpp.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/C++Frontend/2004-01-11-DynamicInitializedConstant.cpp.tr (original) +++ llvm/trunk/test/C++Frontend/2004-01-11-DynamicInitializedConstant.cpp.tr (removed) @@ -1,6 +0,0 @@ -// RUN: %llvmgcc -xc++ -S -o - %s | not grep { constant } - -extern int X; -const int Y = X; -const int* foo() { return &Y; } - Removed: llvm/trunk/test/C++Frontend/2004-03-09-UnmangledBuiltinMethods.cpp.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/2004-03-09-UnmangledBuiltinMethods.cpp.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/C++Frontend/2004-03-09-UnmangledBuiltinMethods.cpp.tr (original) +++ llvm/trunk/test/C++Frontend/2004-03-09-UnmangledBuiltinMethods.cpp.tr (removed) @@ -1,8 +0,0 @@ -// RUN: %llvmgcc -xc++ -c -o - %s | llvm-dis | grep _ZN11AccessFlags6strlenEv - -struct AccessFlags { - void strlen(); -}; - -void AccessFlags::strlen() { } - Removed: llvm/trunk/test/C++Frontend/2004-09-27-DidntEmitTemplate.cpp.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/2004-09-27-DidntEmitTemplate.cpp.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/C++Frontend/2004-09-27-DidntEmitTemplate.cpp.tr (original) +++ llvm/trunk/test/C++Frontend/2004-09-27-DidntEmitTemplate.cpp.tr (removed) @@ -1,23 +0,0 @@ -// RUN: %llvmgxx -xc++ %s -c -o - | llvm-dis | grep callDefaultCtor | \ -// RUN: not grep declare - -// This is a testcase for LLVM PR445, which was a problem where the -// instantiation of callDefaultCtor was not being emitted correctly. - -struct Pass {}; - -template -Pass *callDefaultCtor() { return new Pass(); } - -void foo(Pass *(*C)()); - -struct basic_string { - bool empty() const { return true; } -}; - - -bool foo2(basic_string &X) { - return X.empty(); -} -void baz() { foo(callDefaultCtor); } - Removed: llvm/trunk/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr (original) +++ llvm/trunk/test/CFrontend/2003-07-22-ArrayAccessTypeSafety.c.tr (removed) @@ -1,7 +0,0 @@ -/* RUN: %llvmgcc -xc %s -S -o - | grep -v alloca | not grep bitcast - */ - -void test(int* array, long long N) { - array[N] = N[array] = 33; -} - Removed: llvm/trunk/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c.tr (original) +++ llvm/trunk/test/CFrontend/2003-08-06-BuiltinSetjmpLongjmp.c.tr (removed) @@ -1,14 +0,0 @@ -/* RUN: %llvmgcc -xc %s -c -o - | llvm-dis | not grep __builtin_ - * - * __builtin_longjmp/setjmp should get transformed into llvm.setjmp/longjmp - * just like explicit setjmp/longjmp calls are. - */ - -void jumpaway(int *ptr) { - __builtin_longjmp(ptr,1); -} - -int main(void) { - __builtin_setjmp(0); - jumpaway(0); -} Removed: llvm/trunk/test/CFrontend/2003-08-17-DeadCodeShortCircuit.c.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2003-08-17-DeadCodeShortCircuit.c.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2003-08-17-DeadCodeShortCircuit.c.tr (original) +++ llvm/trunk/test/CFrontend/2003-08-17-DeadCodeShortCircuit.c.tr (removed) @@ -1,7 +0,0 @@ -// RUN: %llvmgcc -xc %s -c -o %t.o - -int test(_Bool pos, _Bool color) { - return 0; - return (pos && color); -} - Removed: llvm/trunk/test/CFrontend/2003-11-03-AddrArrayElement.c.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2003-11-03-AddrArrayElement.c.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2003-11-03-AddrArrayElement.c.tr (original) +++ llvm/trunk/test/CFrontend/2003-11-03-AddrArrayElement.c.tr (removed) @@ -1,11 +0,0 @@ -// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep getelementptr - -// This should be turned into a tasty getelementptr instruction, not a nasty -// series of casts and address arithmetic. - -char Global[100]; - -char *test1(unsigned i) { - return &Global[i]; -} - Removed: llvm/trunk/test/CFrontend/2003-11-08-PointerSubNotGetelementptr.c.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2003-11-08-PointerSubNotGetelementptr.c.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2003-11-08-PointerSubNotGetelementptr.c.tr (original) +++ llvm/trunk/test/CFrontend/2003-11-08-PointerSubNotGetelementptr.c.tr (removed) @@ -1,9 +0,0 @@ -// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep getelementptr - -char *test(char* C) { - return C-1; // Should turn into a GEP -} - -int *test2(int* I) { - return I-1; -} Removed: llvm/trunk/test/CFrontend/2003-11-13-TypeSafety.c.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2003-11-13-TypeSafety.c.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2003-11-13-TypeSafety.c.tr (original) +++ llvm/trunk/test/CFrontend/2003-11-13-TypeSafety.c.tr (removed) @@ -1,5 +0,0 @@ -// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep getelementptr - -int *test(int *X, int Y) { - return X + Y; -} Removed: llvm/trunk/test/CFrontend/2003-11-19-AddressOfRegister.c.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2003-11-19-AddressOfRegister.c.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2003-11-19-AddressOfRegister.c.tr (original) +++ llvm/trunk/test/CFrontend/2003-11-19-AddressOfRegister.c.tr (removed) @@ -1,12 +0,0 @@ -// RUN: %llvmgcc -xc %s -S -o /dev/null |& not grep warning - -struct item { - short delta[4]; -}; - -int TEST(int nt) { - register struct item *aa; - aa[nt].delta; - return 1; -} - Removed: llvm/trunk/test/CFrontend/2003-12-14-ExternInlineSupport.c.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2003-12-14-ExternInlineSupport.c.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2003-12-14-ExternInlineSupport.c.tr (original) +++ llvm/trunk/test/CFrontend/2003-12-14-ExternInlineSupport.c.tr (removed) @@ -1,3 +0,0 @@ -// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | not grep dead_function - -extern __inline__ void dead_function() {} Removed: llvm/trunk/test/CFrontend/2004-02-12-LargeAggregateCopy.c.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2004-02-12-LargeAggregateCopy.c.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2004-02-12-LargeAggregateCopy.c.tr (original) +++ llvm/trunk/test/CFrontend/2004-02-12-LargeAggregateCopy.c.tr (removed) @@ -1,8 +0,0 @@ -// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.memcpy - -struct X { int V[10000]; }; -struct X Global1, Global2; -void test() { - Global2 = Global1; -} - Removed: llvm/trunk/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c.tr (original) +++ llvm/trunk/test/CFrontend/2004-02-13-BuiltinFrameReturnAddress.c.tr (removed) @@ -1,8 +0,0 @@ -// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.*address | count 4 - -void *test1() { - return __builtin_return_address(1); -} -void *test2() { - return __builtin_frame_address(0); -} Removed: llvm/trunk/test/CFrontend/2004-02-13-IllegalVararg.c.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2004-02-13-IllegalVararg.c.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2004-02-13-IllegalVararg.c.tr (original) +++ llvm/trunk/test/CFrontend/2004-02-13-IllegalVararg.c.tr (removed) @@ -1,11 +0,0 @@ -// RUN: %llvmgcc -xc %s -c -o - | llc - -#include - -float test(int X, ...) { - va_list ap; - float F; - va_start(ap, X); - F = va_arg(ap, float); - return F; -} Removed: llvm/trunk/test/CFrontend/2004-02-20-Builtins.c.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2004-02-20-Builtins.c.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2004-02-20-Builtins.c.tr (original) +++ llvm/trunk/test/CFrontend/2004-02-20-Builtins.c.tr (removed) @@ -1,6 +0,0 @@ -// RUN: %llvmgcc -O3 -xc %s -c -o - | llvm-dis | not grep builtin - -void zsqrtxxx(float num) { - num = sqrt(num); -} - Removed: llvm/trunk/test/CFrontend/2004-03-07-ExternalConstant.c.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2004-03-07-ExternalConstant.c.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2004-03-07-ExternalConstant.c.tr (original) +++ llvm/trunk/test/CFrontend/2004-03-07-ExternalConstant.c.tr (removed) @@ -1,7 +0,0 @@ -// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep constant - -extern const int a[]; // 'a' should be marked constant even though it's external! -int foo () { - return a[0]; -} - Removed: llvm/trunk/test/CFrontend/2004-06-17-UnorderedCompares.c.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2004-06-17-UnorderedCompares.c.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2004-06-17-UnorderedCompares.c.tr (original) +++ llvm/trunk/test/CFrontend/2004-06-17-UnorderedCompares.c.tr (removed) @@ -1,21 +0,0 @@ -// RUN: %llvmgcc -xc -std=c99 %s -c -o - | llvm-dis | grep -v llvm.isunordered | not grep call - -#include - -_Bool A, B, C, D, E, F; -void TestF(float X, float Y) { - A = __builtin_isgreater(X, Y); - B = __builtin_isgreaterequal(X, Y); - C = __builtin_isless(X, Y); - D = __builtin_islessequal(X, Y); - E = __builtin_islessgreater(X, Y); - F = __builtin_isunordered(X, Y); -} -void TestD(double X, double Y) { - A = __builtin_isgreater(X, Y); - B = __builtin_isgreaterequal(X, Y); - C = __builtin_isless(X, Y); - D = __builtin_islessequal(X, Y); - E = __builtin_islessgreater(X, Y); - F = __builtin_isunordered(X, Y); -} Removed: llvm/trunk/test/CFrontend/2005-01-02-PointerDifference.c.tr URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2005-01-02-PointerDifference.c.tr?rev=51374&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2005-01-02-PointerDifference.c.tr (original) +++ llvm/trunk/test/CFrontend/2005-01-02-PointerDifference.c.tr (removed) @@ -1,3 +0,0 @@ -// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep -v div - -int Diff(int *P, int *Q) { return P-Q; } From nicolas.geoffray at lip6.fr Wed May 21 09:58:03 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Wed, 21 May 2008 14:58:03 -0000 Subject: [llvm-commits] [vmkit] r51376 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaClass.cpp JavaClass.h JavaConstantPool.cpp JavaConstantPool.h JavaInitialise.cpp VirtualTables.cpp Message-ID: <200805211458.m4LEw3FQ015694@zion.cs.uiuc.edu> Author: geoffray Date: Wed May 21 09:58:03 2008 New Revision: 51376 URL: http://llvm.org/viewvc/llvm-project?rev=51376&view=rev Log: Make JavaCtpInfo objects non gc-objects. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp?rev=51376&r1=51375&r2=51376&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp Wed May 21 09:58:03 2008 @@ -86,7 +86,7 @@ Attribut* cur = *i; delete cur; } - + delete ctpInfo; } Reader* Attribut::toReader(Jnjvm* vm, ArrayUInt8* array, Attribut* attr) { @@ -531,3 +531,4 @@ return I->second; } } + Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h?rev=51376&r1=51375&r2=51376&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h Wed May 21 09:58:03 2008 @@ -305,7 +305,7 @@ JavaObject* staticInstance(); void createStaticInstance(); #endif - + }; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp?rev=51376&r1=51375&r2=51376&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.cpp Wed May 21 09:58:03 2008 @@ -40,12 +40,6 @@ const uint32 JavaCtpInfo::ConstantNameAndType = 12; -void JavaCtpInfo::print(mvm::PrintBuffer* buf) { - buf->write("CtpInfoOf<"); - classDef->print(buf); - buf->write(">"); -} - static uint32 unimplemented(Jnjvm* vm, uint32 type, uint32 e, Reader* reader, sint32* ctpDef, void** ctpRes, uint8* ctpType) { JavaThread::get()->isolate->error(Jnjvm::ClassFormatError, @@ -202,7 +196,7 @@ void JavaCtpInfo::read(Jnjvm *vm, Class* cl, Reader* reader) { uint32 nbCtp = reader->readU2(); - JavaCtpInfo* res = vm_new(vm, JavaCtpInfo)(); + JavaCtpInfo* res = new JavaCtpInfo(); res->ctpRes = (void**)malloc(sizeof(void*)*nbCtp); res->ctpDef = (sint32*)malloc(sizeof(sint32)*nbCtp); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h?rev=51376&r1=51375&r2=51376&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaConstantPool.h Wed May 21 09:58:03 2008 @@ -26,9 +26,8 @@ typedef uint32 (*ctpReader)(Jnjvm*, uint32, uint32, Reader*, sint32*, void**, uint8*); -class JavaCtpInfo : public mvm::Object { +class JavaCtpInfo { public: - static VirtualTable* VT; Class* classDef; void** ctpRes; sint32* ctpDef; @@ -47,9 +46,6 @@ static const uint32 ConstantInterfaceMethodref; static const uint32 ConstantNameAndType; - virtual void print(mvm::PrintBuffer* buf); - virtual void TRACER; - static ctpReader funcsReader[16]; static uint32 CtpReaderClass(Jnjvm* vm, uint32 type, uint32 e, Reader* reader, Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp?rev=51376&r1=51375&r2=51376&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp Wed May 21 09:58:03 2008 @@ -48,7 +48,6 @@ INIT(ClassArray); INIT(JavaMethod); INIT(JavaField); - INIT(JavaCtpInfo); INIT(JavaCond); INIT(LockObj); INIT(JavaObject); Modified: vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp?rev=51376&r1=51375&r2=51376&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Wed May 21 09:58:03 2008 @@ -47,7 +47,6 @@ INIT(ClassArray); INIT(JavaMethod); INIT(JavaField); - INIT(JavaCtpInfo); INIT(JavaCond); INIT(LockObj); INIT(JavaObject); @@ -149,7 +148,6 @@ #ifndef MULTIPLE_VM _staticInstance->MARK_AND_TRACE; #endif - ctpInfo->MARK_AND_TRACE; codeStaticTracer->MARK_AND_TRACE; codeVirtualTracer->MARK_AND_TRACE; } @@ -166,11 +164,6 @@ void JavaField::TRACER { } -void JavaCtpInfo::TRACER { - // Everything is hashed in the constant pool, - // do not trace them here -} - void JavaCond::TRACER { // FIXME: do I need this? TRACE_VECTOR(JavaThread*, std::allocator, threads); From nicolas.geoffray at lip6.fr Wed May 21 10:48:35 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Wed, 21 May 2008 15:48:35 -0000 Subject: [llvm-commits] [vmkit] r51378 - in /vmkit/trunk/lib/JnJVM: LLVMRuntime/runtime-default.ll VMCore/JavaBacktrace.cpp VMCore/JavaCache.cpp VMCore/JavaCache.h VMCore/JavaClass.cpp VMCore/JavaClass.h VMCore/JavaJIT.cpp VMCore/JavaRuntimeJIT.cpp VMCore/VirtualTables.cpp Message-ID: <200805211548.m4LFmZno017433@zion.cs.uiuc.edu> Author: geoffray Date: Wed May 21 10:48:35 2008 New Revision: 51378 URL: http://llvm.org/viewvc/llvm-project?rev=51378&view=rev Log: CacheNode, Enveloppe, JavaField and JavaMethod are now non-gc classes. Modified: vmkit/trunk/lib/JnJVM/LLVMRuntime/runtime-default.ll vmkit/trunk/lib/JnJVM/VMCore/JavaBacktrace.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaCache.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaCache.h vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Modified: vmkit/trunk/lib/JnJVM/LLVMRuntime/runtime-default.ll URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/LLVMRuntime/runtime-default.ll?rev=51378&r1=51377&r2=51378&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/LLVMRuntime/runtime-default.ll (original) +++ vmkit/trunk/lib/JnJVM/LLVMRuntime/runtime-default.ll Wed May 21 10:48:35 2008 @@ -29,11 +29,11 @@ %ArrayUInt8 = type { %JavaObject, i32, [0 x i8] } ;;; The CacheNode type. The second field is the last called method -%CacheNode = type { %VT, i8*, %JavaClass*, %CacheNode*, %Enveloppe* } +%CacheNode = type { i8*, %JavaClass*, %CacheNode*, %Enveloppe* } ;;; The Enveloppe type, which contains the first cache and all the info ;;; to lookup in the constant pool. -%Enveloppe = type { %VT, %CacheNode*, i8*, i8*, i32 } +%Enveloppe = type { %CacheNode*, i8*, i8*, i32 } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaBacktrace.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaBacktrace.cpp?rev=51378&r1=51377&r2=51378&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaBacktrace.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaBacktrace.cpp Wed May 21 10:48:35 2008 @@ -30,7 +30,7 @@ if (val) { mvm::Method* m = val->method(); mvm::Object* meth = m->definition(); - if (meth && meth->getVirtualTable() == JavaMethod::VT) { + if (meth) { return (JavaMethod*)meth; } } @@ -63,7 +63,7 @@ if (code) { mvm::Method* m = code->method(); mvm::Object* meth = m->definition(); - if (meth && meth->getVirtualTable() == JavaMethod::VT) { + if (meth) { printf("; %p in %s\n", ips[n - 1], meth->printString()); } else if (m->llvmFunction) { printf("; %p in %s\n", ips[n - 1], @@ -96,7 +96,7 @@ if (code) { mvm::Method* m = code->method(); mvm::Object* meth = m->definition(); - if (meth && meth->getVirtualTable() == JavaMethod::VT) { + if (meth) { if (i == 1) { return ((JavaMethod*)meth)->classDef; } else { @@ -118,7 +118,7 @@ if (code) { mvm::Method* m = code->method(); mvm::Object* meth = m->definition(); - if (meth && meth->getVirtualTable() == JavaMethod::VT) { + if (meth) { if (i == 1) { return ((JavaMethod*)meth)->classDef; } else { Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaCache.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaCache.cpp?rev=51378&r1=51377&r2=51378&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaCache.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaCache.cpp Wed May 21 10:48:35 2008 @@ -26,19 +26,15 @@ using namespace jnjvm; -void Enveloppe::destroyer(size_t sz) { +Enveloppe::~Enveloppe() { delete cacheLock; -} - -void CacheNode::print(mvm::PrintBuffer* buf) const { - buf->write("CacheNode<"); - buf->write(" in "); - enveloppe->print(buf); - buf->write(">"); -} - -void Enveloppe::print(mvm::PrintBuffer* buf) const { - buf->write("Enveloppe<>"); + CacheNode* cache = firstCache; + CacheNode* next = firstCache; + while(next) { + next = cache->next; + delete cache; + cache = next; + } } void CacheNode::initialise() { @@ -48,8 +44,8 @@ } Enveloppe* Enveloppe::allocate(JavaCtpInfo* ctp, uint32 index) { - Enveloppe* enveloppe = vm_new(ctp->classDef->isolate, Enveloppe)(); - enveloppe->firstCache = vm_new(ctp->classDef->isolate, CacheNode)(); + Enveloppe* enveloppe = new Enveloppe(); + enveloppe->firstCache = new CacheNode(); enveloppe->firstCache->initialise(); enveloppe->firstCache->enveloppe = enveloppe; enveloppe->cacheLock = mvm::Lock::allocNormal(); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaCache.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaCache.h?rev=51378&r1=51377&r2=51378&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaCache.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaCache.h Wed May 21 10:48:35 2008 @@ -22,11 +22,8 @@ class Enveloppe; class JavaCtpInfo; -class CacheNode : public mvm::Object { +class CacheNode { public: - static VirtualTable* VT; - virtual void print(mvm::PrintBuffer* buf) const; - virtual void TRACER; void* methPtr; Class* lastCible; @@ -37,13 +34,10 @@ }; -class Enveloppe : public mvm::Object { +class Enveloppe { public: - static VirtualTable* VT; - virtual void TRACER; - virtual void print(mvm::PrintBuffer* buf) const; - virtual void destroyer(size_t sz); - + + ~Enveloppe(); CacheNode *firstCache; JavaCtpInfo* ctpInfo; mvm::Lock* cacheLock; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp?rev=51378&r1=51377&r2=51378&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp Wed May 21 10:48:35 2008 @@ -15,6 +15,7 @@ #include "types.h" #include "JavaArray.h" +#include "JavaCache.h" #include "JavaClass.h" #include "JavaConstantPool.h" #include "JavaJIT.h" @@ -82,13 +83,61 @@ void Class::destroyer(size_t sz) { for (std::vector::iterator i = attributs.begin(), - e = attributs.end(); i!= e;) { + e = attributs.end(); i!= e; ++i) { Attribut* cur = *i; delete cur; } + + for (field_iterator i = staticFields.begin(), + e = staticFields.end(); i!= e; ++i) { + JavaField* cur = i->second; + delete cur; + } + + for (field_iterator i = virtualFields.begin(), + e = virtualFields.end(); i!= e; ++i) { + JavaField* cur = i->second; + delete cur; + } + + for (method_iterator i = virtualMethods.begin(), + e = virtualMethods.end(); i!= e; ++i) { + JavaMethod* cur = i->second; + delete cur; + } + + for (method_iterator i = staticMethods.begin(), + e = staticMethods.end(); i!= e; ++i) { + JavaMethod* cur = i->second; + delete cur; + } + delete ctpInfo; } +JavaField::~JavaField() { + for (std::vector::iterator i = attributs.begin(), + e = attributs.end(); i!= e; ++i) { + Attribut* cur = *i; + delete cur; + } +} + +JavaMethod::~JavaMethod() { + + for (std::vector::iterator i = attributs.begin(), + e = attributs.end(); i!= e; ++i) { + Attribut* cur = *i; + delete cur; + } + + for (std::vector::iterator i = caches.begin(), + e = caches.end(); i!= e; ++i) { + Enveloppe* cur = *i; + delete cur; + } +} + Reader* Attribut::toReader(Jnjvm* vm, ArrayUInt8* array, Attribut* attr) { return vm_new(vm, Reader)(array, attr->start, attr->nbb); } @@ -191,7 +240,7 @@ mvm::Code* temp = (mvm::Code*)(classDef->isolate->GC->begOf(val)); #endif if (temp) { - temp->method()->definition(this); + temp->method()->definition((mvm::Object*)this); } code = (mvm::Code*)val; classDef->release(); @@ -202,13 +251,16 @@ } } -void JavaMethod::print(mvm::PrintBuffer* buf) const { +const char* JavaMethod::printString() const { + mvm::PrintBuffer *buf= mvm::PrintBuffer::alloc(); buf->write("JavaMethod<"); signature->printWithSign(classDef, name, buf); buf->write(">"); + return buf->contents()->cString(); } -void JavaField::print(mvm::PrintBuffer* buf) const { +const char* JavaField::printString() const { + mvm::PrintBuffer *buf= mvm::PrintBuffer::alloc(); buf->write("JavaField<"); if (isStatic(access)) buf->write("static "); @@ -220,6 +272,7 @@ buf->write("::"); name->print(buf); buf->write(">"); + return buf->contents()->cString(); } JavaMethod* CommonClass::lookupMethodDontThrow(const UTF8* name, @@ -497,13 +550,15 @@ method_iterator End = map.end(); method_iterator I = map.find(CC); if (I == End) { - JavaMethod* method = vm_new(isolate, JavaMethod)(); + JavaMethod* method = new JavaMethod(); method->name = name; method->type = type; method->classDef = (Class*)this; method->signature = (Signdef*)isolate->constructType(type); method->code = 0; method->access = access; + method->canBeInlined = false; + method->offset = 0; map.insert(std::make_pair(CC, method)); return method; } else { @@ -518,7 +573,7 @@ field_iterator End = map.end(); field_iterator I = map.find(CC); if (I == End) { - JavaField* field = vm_new(isolate, JavaField)(); + JavaField* field = new JavaField(); field->name = name; field->type = type; field->classDef = (Class*)this; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h?rev=51378&r1=51377&r2=51378&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h Wed May 21 10:48:35 2008 @@ -341,15 +341,15 @@ }; -class JavaMethod : public mvm::Object { +class JavaMethod { private: void* _compiledPtr(); public: - static VirtualTable* VT; + ~JavaMethod(); unsigned int access; Signdef* signature; std::vector attributs; - std::vector > caches; + std::vector caches; Class* classDef; const UTF8* name; const UTF8* type; @@ -360,9 +360,6 @@ /// uint32 offset; - virtual void print(mvm::PrintBuffer *buf) const; - virtual void TRACER; - Attribut* lookupAttribut(const UTF8* key); void* compiledPtr() { @@ -423,11 +420,13 @@ double invokeDoubleStatic(Jnjvm* vm, ...); sint64 invokeLongStatic(Jnjvm* vm, ...); JavaObject* invokeJavaObjectStatic(Jnjvm* vm, ...); + + const char* printString() const; }; -class JavaField : public mvm::Object { +class JavaField { public: - static VirtualTable* VT; + ~JavaField(); unsigned int access; const UTF8* name; Typedef* signature; @@ -441,10 +440,8 @@ void initField(JavaObject* obj); Attribut* lookupAttribut(const UTF8* key); + const char* printString() const; - virtual void print(mvm::PrintBuffer *buf) const; - virtual void TRACER; - #define GETVIRTUALFIELD(TYPE, TYPE_NAME) \ TYPE getVirtual##TYPE_NAME##Field(JavaObject* obj) { \ assert(classDef->isReady()); \ Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp?rev=51378&r1=51377&r2=51378&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp Wed May 21 10:48:35 2008 @@ -1848,7 +1848,6 @@ Value* zero = mvm::jit::constantZero; Value* one = mvm::jit::constantOne; - Value* two = mvm::jit::constantTwo; Value* llvmEnv = ConstantExpr::getIntToPtr(ConstantInt::get(Type::Int64Ty, @@ -1860,7 +1859,7 @@ std::vector args1; args1.push_back(zero); - args1.push_back(one); + args1.push_back(zero); Value* cachePtr = GetElementPtrInst::Create(llvmEnv, args1.begin(), args1.end(), "", currentBlock); Value* cache = new LoadInst(cachePtr, "", currentBlock); @@ -1869,7 +1868,7 @@ currentBlock); std::vector args3; args3.push_back(zero); - args3.push_back(two); + args3.push_back(one); Value* lastCiblePtr = GetElementPtrInst::Create(cache, args3.begin(), args3.end(), "", currentBlock); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp?rev=51378&r1=51377&r2=51378&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaRuntimeJIT.cpp Wed May 21 10:48:35 2008 @@ -63,7 +63,7 @@ if (!rcache) { JavaMethod* dmeth = ocl->lookupMethod(utf8, sign->keyName, false, true); if (cache->methPtr) { - rcache = vm_new(ctpInfo->classDef->isolate, CacheNode)(); + rcache = new CacheNode(); rcache->initialise(); rcache->enveloppe = enveloppe; } else { Modified: vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp?rev=51378&r1=51377&r2=51378&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Wed May 21 10:48:35 2008 @@ -45,8 +45,6 @@ INIT(CommonClass); INIT(Class); INIT(ClassArray); - INIT(JavaMethod); - INIT(JavaField); INIT(JavaCond); INIT(LockObj); INIT(JavaObject); @@ -67,8 +65,6 @@ INIT(StaticInstanceMap); INIT(JavaIsolate); INIT(JavaString); - INIT(CacheNode); - INIT(Enveloppe); INIT(DelegateeMap); #ifdef SERVICE_VM INIT(ServiceDomain); @@ -120,24 +116,16 @@ delegatee->MARK_AND_TRACE; #endif - for (field_iterator i = virtualFields.begin(), e = virtualFields.end(); - i!= e; ++i) { - i->second->MARK_AND_TRACE; - } - - for (field_iterator i = staticFields.begin(), e = staticFields.end(); - i!= e; ++i) { - i->second->MARK_AND_TRACE; - } - for (method_iterator i = staticMethods.begin(), e = staticMethods.end(); i!= e; ++i) { - i->second->MARK_AND_TRACE; + mvm::Code* c = i->second->code; + if (c) c->MARK_AND_TRACE; } for (method_iterator i = virtualMethods.begin(), e = virtualMethods.end(); i!= e; ++i) { - i->second->MARK_AND_TRACE; + mvm::Code* c = i->second->code; + if (c) c->MARK_AND_TRACE; } } @@ -156,14 +144,6 @@ CommonClass::PARENT_TRACER; } -void JavaMethod::TRACER { - TRACE_VECTOR(Enveloppe*, gc_allocator, caches); - code->MARK_AND_TRACE; -} - -void JavaField::TRACER { -} - void JavaCond::TRACER { // FIXME: do I need this? TRACE_VECTOR(JavaThread*, std::allocator, threads); @@ -245,18 +225,6 @@ void JavaString::TRACER { } -void CacheNode::TRACER { - ((mvm::Object*)methPtr)->MARK_AND_TRACE; - lastCible->MARK_AND_TRACE; - next->MARK_AND_TRACE; - enveloppe->MARK_AND_TRACE; -} - -void Enveloppe::TRACER { - firstCache->MARK_AND_TRACE; - //cacheLock->MARK_AND_TRACE; -} - void UTF8Map::TRACER { for (iterator i = map.begin(), e = map.end(); i!= e; ++i) { i->second->MARK_AND_TRACE; From nicolas.geoffray at lip6.fr Wed May 21 11:03:59 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Wed, 21 May 2008 16:03:59 -0000 Subject: [llvm-commits] [vmkit] r51382 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaInitialise.cpp JavaTypes.cpp JavaTypes.h VirtualTables.cpp Message-ID: <200805211603.m4LG3xj3017961@zion.cs.uiuc.edu> Author: geoffray Date: Wed May 21 11:03:58 2008 New Revision: 51382 URL: http://llvm.org/viewvc/llvm-project?rev=51382&view=rev Log: Make AssessorDesc a non-gc class. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp?rev=51382&r1=51381&r2=51382&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp Wed May 21 11:03:58 2008 @@ -46,13 +46,10 @@ INIT(CommonClass); INIT(Class); INIT(ClassArray); - INIT(JavaMethod); - INIT(JavaField); INIT(JavaCond); INIT(LockObj); INIT(JavaObject); INIT(JavaThread); - INIT(AssessorDesc); INIT(Typedef); INIT(Signdef); INIT(ThreadSystem); @@ -67,8 +64,6 @@ INIT(jnjvm::TypeMap); INIT(JavaIsolate); INIT(JavaString); - INIT(CacheNode); - INIT(Enveloppe); #ifdef SERVICE_VM INIT(ServiceDomain); #endif Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp?rev=51382&r1=51381&r2=51382&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp Wed May 21 11:03:58 2008 @@ -57,7 +57,7 @@ Jnjvm* vm, uint8 nid, const char* assocName, ClassArray* cl, arrayCtor_t ctor) { - AssessorDesc* res = vm_new(vm, AssessorDesc)(); + AssessorDesc* res = new AssessorDesc(); res->numId = nid; res->doTrace = dt; res->byteId = bid; @@ -136,25 +136,14 @@ 0, 0, (arrayCtor_t)ArrayObject::acons); - mvm::Object::pushRoot((mvm::Object*)dParg); - mvm::Object::pushRoot((mvm::Object*)dPard); - mvm::Object::pushRoot((mvm::Object*)dVoid); - mvm::Object::pushRoot((mvm::Object*)dBool); - mvm::Object::pushRoot((mvm::Object*)dByte); - mvm::Object::pushRoot((mvm::Object*)dChar); - mvm::Object::pushRoot((mvm::Object*)dShort); - mvm::Object::pushRoot((mvm::Object*)dInt); - mvm::Object::pushRoot((mvm::Object*)dFloat); - mvm::Object::pushRoot((mvm::Object*)dLong); - mvm::Object::pushRoot((mvm::Object*)dDouble); - mvm::Object::pushRoot((mvm::Object*)dTab); - mvm::Object::pushRoot((mvm::Object*)dRef); } -void AssessorDesc::print(mvm::PrintBuffer* buf) const { +const char* AssessorDesc::printString() const { + mvm::PrintBuffer *buf= mvm::PrintBuffer::alloc(); buf->write("AssessorDescriptor<"); buf->write(asciizName); buf->write(">"); + return buf->contents()->cString(); } static void typeError(const UTF8* name, short int l) { Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h?rev=51382&r1=51381&r2=51382&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h Wed May 21 11:03:58 2008 @@ -43,7 +43,7 @@ typedef JavaArray* (*arrayCtor_t)(uint32 len, CommonClass* cl, Jnjvm* vm); -class AssessorDesc : public mvm::Object { +class AssessorDesc { public: static VirtualTable *VT; static const char I_TAB; @@ -98,8 +98,7 @@ static void initialise(Jnjvm* vm); - virtual void print(mvm::PrintBuffer* buf) const; - virtual void TRACER; + const char* printString() const; static void analyseIntern(const UTF8* name, uint32 pos, uint32 meth, AssessorDesc*& ass, Modified: vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp?rev=51382&r1=51381&r2=51382&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Wed May 21 11:03:58 2008 @@ -49,7 +49,6 @@ INIT(LockObj); INIT(JavaObject); INIT(JavaThread); - INIT(AssessorDesc); INIT(Typedef); INIT(Signdef); INIT(ThreadSystem); @@ -87,7 +86,6 @@ #define ARRAYTRACER(name) \ void name::TRACER { \ - classOf->MARK_AND_TRACE; \ lockObj->MARK_AND_TRACE; \ } @@ -175,9 +173,6 @@ pendingException->MARK_AND_TRACE; } -void AssessorDesc::TRACER { -} - void Typedef::TRACER { } From nicolas.geoffray at lip6.fr Wed May 21 11:11:16 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Wed, 21 May 2008 16:11:16 -0000 Subject: [llvm-commits] [vmkit] r51383 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaInitialise.cpp JavaIsolate.cpp JavaIsolate.h VirtualTables.cpp Message-ID: <200805211611.m4LGBHWI018152@zion.cs.uiuc.edu> Author: geoffray Date: Wed May 21 11:11:16 2008 New Revision: 51383 URL: http://llvm.org/viewvc/llvm-project?rev=51383&view=rev Log: ThreadSystem is now a non-gc class. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp?rev=51383&r1=51382&r2=51383&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaInitialise.cpp Wed May 21 11:11:16 2008 @@ -52,7 +52,6 @@ INIT(JavaThread); INIT(Typedef); INIT(Signdef); - INIT(ThreadSystem); INIT(Jnjvm); INIT(Reader); INIT(ZipFile); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp?rev=51383&r1=51382&r2=51383&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.cpp Wed May 21 11:11:16 2008 @@ -295,22 +295,12 @@ } -void ThreadSystem::print(mvm::PrintBuffer* buf) const { - buf->write("ThreadSystem<>"); -} - void JavaIsolate::print(mvm::PrintBuffer* buf) const { buf->write("Java isolate: "); buf->write(name); } -void ThreadSystem::initialise() { - nonDaemonThreads = 1; - nonDaemonLock = mvm::Lock::allocNormal(); - nonDaemonVar = mvm::Cond::allocCond(); -} - JavaObject* JavaIsolate::loadAppClassLoader() { if (appClassLoader == 0) { appClassLoader = Classpath::getSystemClassLoader->invokeJavaObjectStatic(this); @@ -466,8 +456,7 @@ isolate->bootstrapThread->baseSP = baseSP; JavaThread::threadKey->set(isolate->bootstrapThread); - isolate->threadSystem = vm_new(isolate, ThreadSystem)(); - isolate->threadSystem->initialise(); + isolate->threadSystem = new ThreadSystem(); isolate->name = "isolate"; isolate->appClassLoader = 0; isolate->jniEnv = &JNI_JNIEnvTable; @@ -541,8 +530,7 @@ #endif #if defined(SERVICE_VM) || !defined(MULTIPLE_VM) - isolate->threadSystem = vm_new(isolate, ThreadSystem)(); - isolate->threadSystem->initialise(); + isolate->threadSystem = new ThreadSystem(); #endif return isolate; @@ -550,4 +538,5 @@ void JavaIsolate::destroyer(size_t sz) { Jnjvm::destroyer(sz); + delete threadSystem; } Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h?rev=51383&r1=51382&r2=51383&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaIsolate.h Wed May 21 11:11:16 2008 @@ -26,17 +26,23 @@ class JavaObject; class ThreadSystem; -class ThreadSystem : public mvm::Object { +class ThreadSystem { public: - static VirtualTable* VT; uint16 nonDaemonThreads; mvm::Lock* nonDaemonLock; mvm::Cond* nonDaemonVar; + + ThreadSystem() { + nonDaemonThreads = 1; + nonDaemonLock = mvm::Lock::allocNormal(); + nonDaemonVar = mvm::Cond::allocCond(); + } + + ~ThreadSystem() { + delete nonDaemonLock; + delete nonDaemonVar; + } - virtual void print(mvm::PrintBuffer* buf) const; - virtual void TRACER; - - void initialise(); }; class JavaIsolate : public Jnjvm { Modified: vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp?rev=51383&r1=51382&r2=51383&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Wed May 21 11:11:16 2008 @@ -51,7 +51,6 @@ INIT(JavaThread); INIT(Typedef); INIT(Signdef); - INIT(ThreadSystem); INIT(Jnjvm); INIT(Reader); INIT(ZipFile); @@ -183,9 +182,6 @@ _virtualCallAP->MARK_AND_TRACE; } -void ThreadSystem::TRACER { -} - void Jnjvm::TRACER { appClassLoader->MARK_AND_TRACE; hashUTF8->MARK_AND_TRACE; @@ -213,7 +209,6 @@ void JavaIsolate::TRACER { Jnjvm::PARENT_TRACER; - threadSystem->MARK_AND_TRACE; bootstrapThread->MARK_AND_TRACE; } From natebegeman at mac.com Wed May 21 11:34:48 2008 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 21 May 2008 16:34:48 -0000 Subject: [llvm-commits] [llvm] r51384 - in /llvm/trunk: include/llvm/ExecutionEngine/ExecutionEngine.h lib/ExecutionEngine/ExecutionEngine.cpp lib/ExecutionEngine/JIT/JIT.cpp lib/ExecutionEngine/JIT/JIT.h Message-ID: <200805211634.m4LGYm1h018874@zion.cs.uiuc.edu> Author: sampo Date: Wed May 21 11:34:48 2008 New Revision: 51384 URL: http://llvm.org/viewvc/llvm-project?rev=51384&view=rev Log: Fix a couple issues with the JIT and multiple modules: 1. The "JITState" object creates a PassManager with the ModuleProvider that the jit is created with. If the ModuleProvider is removed and deleted, the PassManager is invalid. 2. The Global maps in the JIT were not invalidated with a ModuleProvider was removed. This could lead to a case where the Module would be freed, and a new Module with Globals at the same addresses could return invalid results. Modified: llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp llvm/trunk/lib/ExecutionEngine/JIT/JIT.h Modified: llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h?rev=51384&r1=51383&r2=51384&view=diff ============================================================================== --- llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h (original) +++ llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h Wed May 21 11:34:48 2008 @@ -126,7 +126,7 @@ /// addModuleProvider - Add a ModuleProvider to the list of modules that we /// can JIT from. Note that this takes ownership of the ModuleProvider: when /// the ExecutionEngine is destroyed, it destroys the MP as well. - void addModuleProvider(ModuleProvider *P) { + virtual void addModuleProvider(ModuleProvider *P) { Modules.push_back(P); } @@ -137,7 +137,8 @@ /// removeModuleProvider - Remove a ModuleProvider from the list of modules. /// Release module from ModuleProvider. - Module* removeModuleProvider(ModuleProvider *P, std::string *ErrInfo = 0); + virtual Module* removeModuleProvider(ModuleProvider *P, + std::string *ErrInfo = 0); /// FindFunctionNamed - Search all of the active modules to find the one that /// defines FnName. This is very slow operation and shouldn't be used for @@ -174,6 +175,10 @@ /// use in dynamic compilation scenarios when you want to move globals void clearAllGlobalMappings(); + /// clearGlobalMappingsFromModule - Clear all global mappings that came from a + /// particular module, because it has been removed from the JIT. + void clearGlobalMappingsFromModule(Module *M); + /// updateGlobalMapping - Replace an existing mapping for GV with a new /// address. This updates both maps as required. If "Addr" is null, the /// entry for the global is removed from the mappings. This returns the old Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=51384&r1=51383&r2=51384&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Wed May 21 11:34:48 2008 @@ -59,6 +59,7 @@ ModuleProvider *MP = *I; if (MP == P) { Modules.erase(I); + clearGlobalMappingsFromModule(MP->getModule()); return MP->releaseModule(ErrInfo); } } @@ -106,6 +107,22 @@ state.getGlobalAddressReverseMap(locked).clear(); } +/// clearGlobalMappingsFromModule - Clear all global mappings that came from a +/// particular module, because it has been removed from the JIT. +void ExecutionEngine::clearGlobalMappingsFromModule(Module *M) { + MutexGuard locked(lock); + + for (Module::iterator FI = M->begin(), FE = M->end(); FI != FE; ++FI) { + state.getGlobalAddressMap(locked).erase(FI); + state.getGlobalAddressReverseMap(locked).erase(FI); + } + for (Module::global_iterator GI = M->global_begin(), GE = M->global_end(); + GI != GE; ++GI) { + state.getGlobalAddressMap(locked).erase(GI); + state.getGlobalAddressReverseMap(locked).erase(GI); + } +} + /// updateGlobalMapping - Replace an existing mapping for GV with a new /// address. This updates both maps as required. If "Addr" is null, the /// entry for the global is removed from the mappings. Modified: llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp?rev=51384&r1=51383&r2=51384&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp Wed May 21 11:34:48 2008 @@ -91,15 +91,17 @@ JIT::JIT(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji, JITMemoryManager *JMM) - : ExecutionEngine(MP), TM(tm), TJI(tji), jitstate(MP) { + : ExecutionEngine(MP), TM(tm), TJI(tji) { setTargetData(TM.getTargetData()); + jitstate = new JITState(MP); + // Initialize MCE MCE = createEmitter(*this, JMM); // Add target data MutexGuard locked(lock); - FunctionPassManager &PM = jitstate.getPM(locked); + FunctionPassManager &PM = jitstate->getPM(locked); PM.add(new TargetData(*TM.getTargetData())); // Turn the machine code intermediate representation into bytes in memory that @@ -114,10 +116,54 @@ } JIT::~JIT() { + delete jitstate; delete MCE; delete &TM; } +/// addModuleProvider - Add a new ModuleProvider to the JIT. If we previously +/// removed the last ModuleProvider, we need re-initialize jitstate with a valid +/// ModuleProvider. +void JIT::addModuleProvider(ModuleProvider *MP) { + MutexGuard locked(lock); + + if (Modules.empty()) { + assert(!jitstate && "jitstate should be NULL if Modules vector is empty!"); + + jitstate = new JITState(MP); + + FunctionPassManager &PM = jitstate->getPM(locked); + PM.add(new TargetData(*TM.getTargetData())); + + // Turn the machine code intermediate representation into bytes in memory + // that may be executed. + if (TM.addPassesToEmitMachineCode(PM, *MCE, false /*fast*/)) { + cerr << "Target does not support machine code emission!\n"; + abort(); + } + + // Initialize passes. + PM.doInitialization(); + } + + ExecutionEngine::addModuleProvider(MP); +} + +/// removeModuleProvider - If we are removing the last ModuleProvider, +/// invalidate the jitstate since the PassManager it contains references a +/// released ModuleProvider. +Module *JIT::removeModuleProvider(ModuleProvider *MP, std::string *E) { + Module *result = ExecutionEngine::removeModuleProvider(MP, E); + + MutexGuard locked(lock); + if (Modules.empty()) { + delete jitstate; + jitstate = 0; + } + + return result; +} + /// run - Start execution with the specified function and arguments. /// GenericValue JIT::runFunction(Function *F, @@ -289,15 +335,15 @@ // JIT the function isAlreadyCodeGenerating = true; - jitstate.getPM(locked).run(*F); + jitstate->getPM(locked).run(*F); isAlreadyCodeGenerating = false; // If the function referred to a global variable that had not yet been // emitted, it allocates memory for the global, but doesn't emit it yet. Emit // all of these globals now. - while (!jitstate.getPendingGlobals(locked).empty()) { - const GlobalVariable *GV = jitstate.getPendingGlobals(locked).back(); - jitstate.getPendingGlobals(locked).pop_back(); + while (!jitstate->getPendingGlobals(locked).empty()) { + const GlobalVariable *GV = jitstate->getPendingGlobals(locked).back(); + jitstate->getPendingGlobals(locked).pop_back(); EmitGlobalVariable(GV); } } @@ -387,7 +433,7 @@ unsigned MisAligned = ((intptr_t)Ptr & (A-1)); Ptr = (char*)Ptr + (MisAligned ? (A-MisAligned) : 0); } - jitstate.getPendingGlobals(locked).push_back(GV); + jitstate->getPendingGlobals(locked).push_back(GV); } addGlobalMapping(GV, Ptr); return Ptr; Modified: llvm/trunk/lib/ExecutionEngine/JIT/JIT.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JIT.h?rev=51384&r1=51383&r2=51384&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/JIT/JIT.h (original) +++ llvm/trunk/lib/ExecutionEngine/JIT/JIT.h Wed May 21 11:34:48 2008 @@ -54,7 +54,7 @@ TargetJITInfo &TJI; // The JITInfo for the target we are compiling to MachineCodeEmitter *MCE; // MCE object - JITState jitstate; + JITState *jitstate; JIT(ModuleProvider *MP, TargetMachine &tm, TargetJITInfo &tji, JITMemoryManager *JMM); @@ -76,6 +76,10 @@ return createJIT(MP, Err, 0); } + virtual void addModuleProvider(ModuleProvider *MP); + virtual Module *removeModuleProvider(ModuleProvider *MP, + std::string *ErrInfo = 0); + /// run - Start execution with the specified function and arguments. /// virtual GenericValue runFunction(Function *F, From tonic at nondot.org Wed May 21 11:54:13 2008 From: tonic at nondot.org (Tanya M. Lattner) Date: Wed, 21 May 2008 09:54:13 -0700 (PDT) Subject: [llvm-commits] [test-suite] r51369 - /test-suite/trunk/RunSafely.sh In-Reply-To: <20080521105150.GA13165@katherina.student.utwente.nl> References: <200805211047.m4LAlXrl008185@zion.cs.uiuc.edu> <20080521105150.GA13165@katherina.student.utwente.nl> Message-ID: Yes, it can be merged in. -Tanya On Wed, 21 May 2008, Matthijs Kooijman wrote: > Tanya, > > should this commit perhaps be included in the release? It makes the > test-suite work on Ubuntu and BSD's. Or is the test-suite not included with a > release? > > Gr. > > Matthijs > > On Wed, May 21, 2008 at 10:47:33AM -0000, Matthijs Kooijman wrote: >> Author: matthijs >> Date: Wed May 21 05:47:32 2008 >> New Revision: 51369 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=51369&view=rev >> Log: >> Run test-suite commands in (another) subshell. This ensures that the output of >> the program and the time command is properly separated. This used to work only >> on shells that have a builtin "time" command (such as bash). This change makes >> things work consistently among different shells (tested on bash, dash and >> FreeBSD sh) and should be POSIX compatible. >> >> A similar change is probably needed for the remote execution part, but someone >> who is using that should have a look at it. >> >> >> Modified: >> test-suite/trunk/RunSafely.sh >> >> Modified: test-suite/trunk/RunSafely.sh >> URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/RunSafely.sh?rev=51369&r1=51368&r2=51369&view=diff >> >> ============================================================================== >> --- test-suite/trunk/RunSafely.sh (original) >> +++ test-suite/trunk/RunSafely.sh Wed May 21 05:47:32 2008 >> @@ -105,7 +105,7 @@ >> fi >> >> if [ "x$RHOST" = x ] ; then >> - ( sh -c "$ULIMITCMD time -p $COMMAND >$OUTFILE 2>&1 < $INFILE; echo exit \$?" ) 2>&1 \ >> + ( sh -c "$ULIMITCMD time -p sh -c '$COMMAND >$OUTFILE 2>&1 < $INFILE; echo exit \$?'" ) 2>&1 \ >> | awk -- '\ >> BEGIN { cpu = 0.0; } >> /^user/ { cpu += $2; print; } >> >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >> > From tonic at nondot.org Wed May 21 11:54:41 2008 From: tonic at nondot.org (Tanya M. Lattner) Date: Wed, 21 May 2008 09:54:41 -0700 (PDT) Subject: [llvm-commits] [test-suite] r51369 - /test-suite/trunk/RunSafely.sh In-Reply-To: References: <200805211047.m4LAlXrl008185@zion.cs.uiuc.edu> <20080521105150.GA13165@katherina.student.utwente.nl> Message-ID: Meaning.. i will merge it in. Thanks! -Tanya On Wed, 21 May 2008, Tanya M. Lattner wrote: > > Yes, it can be merged in. > > -Tanya > > On Wed, 21 May 2008, Matthijs Kooijman wrote: > >> Tanya, >> >> should this commit perhaps be included in the release? It makes the >> test-suite work on Ubuntu and BSD's. Or is the test-suite not included >> with a >> release? >> >> Gr. >> >> Matthijs >> >> On Wed, May 21, 2008 at 10:47:33AM -0000, Matthijs Kooijman wrote: >> > Author: matthijs >> > Date: Wed May 21 05:47:32 2008 >> > New Revision: 51369 >> > >> > URL: http://llvm.org/viewvc/llvm-project?rev=51369&view=rev >> > Log: >> > Run test-suite commands in (another) subshell. This ensures that the >> > output of >> > the program and the time command is properly separated. This used to >> > work only >> > on shells that have a builtin "time" command (such as bash). This change >> > makes >> > things work consistently among different shells (tested on bash, dash >> > and >> > FreeBSD sh) and should be POSIX compatible. >> > >> > A similar change is probably needed for the remote execution part, but >> > someone >> > who is using that should have a look at it. >> > >> > >> > Modified: >> > test-suite/trunk/RunSafely.sh >> > >> > Modified: test-suite/trunk/RunSafely.sh >> > URL: >> > http://llvm.org/viewvc/llvm-project/test-suite/trunk/RunSafely.sh?rev=51369&r1=51368&r2=51369&view=diff >> > >> > ============================================================================== >> > --- test-suite/trunk/RunSafely.sh (original) >> > +++ test-suite/trunk/RunSafely.sh Wed May 21 05:47:32 2008 >> > @@ -105,7 +105,7 @@ >> > fi >> > >> > if [ "x$RHOST" = x ] ; then >> > - ( sh -c "$ULIMITCMD time -p $COMMAND >$OUTFILE 2>&1 < $INFILE; echo >> > exit \$?" ) 2>&1 \ >> > + ( sh -c "$ULIMITCMD time -p sh -c '$COMMAND >$OUTFILE 2>&1 < $INFILE; >> > echo exit \$?'" ) 2>&1 \ >> > | awk -- '\ >> > BEGIN { cpu = 0.0; } >> > /^user/ { cpu += $2; print; } >> > >> > >> > _______________________________________________ >> > 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 May 21 13:20:22 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 21 May 2008 18:20:22 -0000 Subject: [llvm-commits] [llvm] r51386 - /llvm/trunk/tools/lli/lli.cpp Message-ID: <200805211820.m4LIKNgq022319@zion.cs.uiuc.edu> Author: evancheng Date: Wed May 21 13:20:21 2008 New Revision: 51386 URL: http://llvm.org/viewvc/llvm-project?rev=51386&view=rev Log: Rename -no-lazy to -disable-lazy-compilation. Modified: llvm/trunk/tools/lli/lli.cpp Modified: llvm/trunk/tools/lli/lli.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/lli.cpp?rev=51386&r1=51385&r2=51386&view=diff ============================================================================== --- llvm/trunk/tools/lli/lli.cpp (original) +++ llvm/trunk/tools/lli/lli.cpp Wed May 21 13:20:21 2008 @@ -54,7 +54,7 @@ cl::desc("Disable emission of core files if possible")); cl::opt - NoLazyCompilation("no-lazy", + NoLazyCompilation("disable-lazy-compilation", cl::desc("Disable JIT lazy compilation"), cl::init(false)); } From ggreif at gmail.com Wed May 21 13:30:15 2008 From: ggreif at gmail.com (Gabor Greif) Date: Wed, 21 May 2008 18:30:15 -0000 Subject: [llvm-commits] [llvm] r51387 - in /llvm/trunk/docs/tutorial: LangImpl3.html OCamlLangImpl3.html Message-ID: <200805211830.m4LIUFcB022630@zion.cs.uiuc.edu> Author: ggreif Date: Wed May 21 13:30:15 2008 New Revision: 51387 URL: http://llvm.org/viewvc/llvm-project?rev=51387&view=rev Log: adapt to new API Modified: llvm/trunk/docs/tutorial/LangImpl3.html llvm/trunk/docs/tutorial/OCamlLangImpl3.html Modified: llvm/trunk/docs/tutorial/LangImpl3.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl3.html?rev=51387&r1=51386&r2=51387&view=diff ============================================================================== --- llvm/trunk/docs/tutorial/LangImpl3.html (original) +++ llvm/trunk/docs/tutorial/LangImpl3.html Wed May 21 13:30:15 2008 @@ -166,7 +166,7 @@ constants of Arbitrary Precision). This code basically just creates and returns a ConstantFP. Note that in the LLVM IR that constants are all uniqued together and shared. For this reason, the API -uses "the foo::get(..)" idiom instead of "new foo(..)" or "foo::create(..)".

    +uses "the foo::get(..)" idiom instead of "new foo(..)" or "foo::Create(..)".

    
    Modified: llvm/trunk/docs/tutorial/OCamlLangImpl3.html
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/OCamlLangImpl3.html?rev=51387&r1=51386&r2=51387&view=diff
    
    ==============================================================================
    --- llvm/trunk/docs/tutorial/OCamlLangImpl3.html (original)
    +++ llvm/trunk/docs/tutorial/OCamlLangImpl3.html Wed May 21 13:30:15 2008
    @@ -148,7 +148,7 @@
     constants of Arbitrary Precision).  This code basically just
     creates and returns a ConstantFP.  Note that in the LLVM IR
     that constants are all uniqued together and shared.  For this reason, the API
    -uses "the foo::get(..)" idiom instead of "new foo(..)" or "foo::create(..)".

    +uses "the foo::get(..)" idiom instead of "new foo(..)" or "foo::Create(..)".

    
    
    
    
    From evan.cheng at apple.com  Wed May 21 13:32:03 2008
    From: evan.cheng at apple.com (Evan Cheng)
    Date: Wed, 21 May 2008 18:32:03 -0000
    Subject: [llvm-commits] [llvm] r51388 -
     /llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp
    Message-ID: <200805211832.m4LIW3Vk022691@zion.cs.uiuc.edu>
    
    Author: evancheng
    Date: Wed May 21 13:32:03 2008
    New Revision: 51388
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51388&view=rev
    Log:
    Revert from this tag.
    
    Modified:
        llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp
    
    Modified: llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp?rev=51388&r1=51387&r2=51388&view=diff
    
    ==============================================================================
    --- llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp (original)
    +++ llvm/tags/Apple/llvmCore-2030-04/lib/Target/X86/X86CodeEmitter.cpp Wed May 21 13:32:03 2008
    @@ -117,7 +117,6 @@
       II = ((X86TargetMachine&)TM).getInstrInfo();
       TD = ((X86TargetMachine&)TM).getTargetData();
       Is64BitMode = TM.getSubtarget().is64Bit();
    -  IsPIC = TM.getRelocationModel() == Reloc::PIC_;
       
       do {
         DOUT << "JITTing function '" << MF.getFunction()->getName() << "'\n";
    
    
    
    
    From ggreif at gmail.com  Wed May 21 13:32:45 2008
    From: ggreif at gmail.com (Gabor Greif)
    Date: Wed, 21 May 2008 18:32:45 -0000
    Subject: [llvm-commits] [llvm-gcc-4.2] r51389 -
    	/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
    Message-ID: <200805211832.m4LIWjgb022723@zion.cs.uiuc.edu>
    
    Author: ggreif
    Date: Wed May 21 13:32:45 2008
    New Revision: 51389
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51389&view=rev
    Log:
    adapt to new API
    
    Modified:
        llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
    
    Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=51389&r1=51388&r2=51389&view=diff
    
    ==============================================================================
    --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
    +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Wed May 21 13:32:45 2008
    @@ -1160,7 +1160,7 @@
           return CI->getOperand(0);
       // Do an end-run around the builder's folding logic.
       // TODO: introduce a new builder class that does target specific folding.
    -  Value *Result = Builder.Insert(CastInst::create(Instruction::CastOps(opcode),
    +  Value *Result = Builder.Insert(CastInst::Create(Instruction::CastOps(opcode),
                                                       V, Ty, V->getNameStart()));
     
       // If this is a constantexpr, fold the instruction with
    @@ -1247,7 +1247,7 @@
         // alloc instructions before.  It doesn't matter what this instruction is,
         // it is dead.  This allows us to insert allocas in order without having to
         // scan for an insertion point. Use BitCast for int -> int
    -    AllocaInsertionPoint = CastInst::create(Instruction::BitCast,
    +    AllocaInsertionPoint = CastInst::Create(Instruction::BitCast,
           Constant::getNullValue(Type::Int32Ty), Type::Int32Ty, "alloca point");
         // Insert it as the first instruction in the entry block.
         Fn->begin()->getInstList().insert(Fn->begin()->begin(),
    
    
    
    
    From ggreif at gmail.com  Wed May 21 13:57:33 2008
    From: ggreif at gmail.com (Gabor Greif)
    Date: Wed, 21 May 2008 18:57:33 -0000
    Subject: [llvm-commits] [llvm] r51390 - /llvm/trunk/include/llvm/InstrTypes.h
    Message-ID: <200805211857.m4LIvXWi023500@zion.cs.uiuc.edu>
    
    Author: ggreif
    Date: Wed May 21 13:57:33 2008
    New Revision: 51390
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51390&view=rev
    Log:
    update a comment
    
    Modified:
        llvm/trunk/include/llvm/InstrTypes.h
    
    Modified: llvm/trunk/include/llvm/InstrTypes.h
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InstrTypes.h?rev=51390&r1=51389&r2=51390&view=diff
    
    ==============================================================================
    --- llvm/trunk/include/llvm/InstrTypes.h (original)
    +++ llvm/trunk/include/llvm/InstrTypes.h Wed May 21 13:57:33 2008
    @@ -169,7 +169,7 @@
                                     const std::string &Name,
                                     BasicBlock *InsertAtEnd);
     
    -  /// Create* - These methods just forward to create, and are useful when you
    +  /// Create* - These methods just forward to Create, and are useful when you
       /// statically know what type of instruction you're going to create.  These
       /// helpers just save some typing.
     #define HANDLE_BINARY_INST(N, OPC, CLASS) \
    
    
    
    
    From isanbard at gmail.com  Wed May 21 16:20:07 2008
    From: isanbard at gmail.com (Bill Wendling)
    Date: Wed, 21 May 2008 21:20:07 -0000
    Subject: [llvm-commits] [llvm] r51393 - in /llvm/trunk:
     include/llvm/System/Path.h lib/System/Path.cpp
    Message-ID: <200805212120.m4LLK7vs028350@zion.cs.uiuc.edu>
    
    Author: void
    Date: Wed May 21 16:20:07 2008
    New Revision: 51393
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51393&view=rev
    Log:
    Follow-up to the reverting of r51218. This puts the checks out-of-line. Because
    they aren't in the header file, systems with a  header file that isn't
    64-bit clean shouldn't warn if #including Path.h and specifying
    -Wshorten-64-to-32.
    
    Modified:
        llvm/trunk/include/llvm/System/Path.h
        llvm/trunk/lib/System/Path.cpp
    
    Modified: llvm/trunk/include/llvm/System/Path.h
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/System/Path.h?rev=51393&r1=51392&r2=51393&view=diff
    
    ==============================================================================
    --- llvm/trunk/include/llvm/System/Path.h (original)
    +++ llvm/trunk/include/llvm/System/Path.h Wed May 21 16:20:07 2008
    @@ -205,16 +205,12 @@
           /// Compares \p this Path with \p that Path for equality.
           /// @returns true if \p this and \p that refer to the same thing.
           /// @brief Equality Operator
    -      bool operator==(const Path &that) const {
    -        return path == that.path;
    -      }
    +      bool operator==(const Path &that) const;
     
           /// Compares \p this Path with \p that Path for inequality.
           /// @returns true if \p this and \p that refer to different things.
           /// @brief Inequality Operator
    -      bool operator!=(const Path &that) const {
    -        return path != that.path;
    -      }
    +      bool operator!=(const Path &that) const;
     
           /// Determines if \p this Path is less than \p that Path. This is required
           /// so that Path objects can be placed into ordered collections (e.g.
    @@ -222,9 +218,7 @@
           /// the std::string::compare method.
           /// @returns true if \p this path is lexicographically less than \p that.
           /// @brief Less Than Operator
    -      bool operator<(const Path& that) const {
    -        return path < that.path;
    -      }
    +      bool operator<(const Path& that) const;
     
         /// @}
         /// @name Path Accessors
    
    Modified: llvm/trunk/lib/System/Path.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Path.cpp?rev=51393&r1=51392&r2=51393&view=diff
    
    ==============================================================================
    --- llvm/trunk/lib/System/Path.cpp (original)
    +++ llvm/trunk/lib/System/Path.cpp Wed May 21 16:20:07 2008
    @@ -24,6 +24,18 @@
     //===          independent code.
     //===----------------------------------------------------------------------===//
     
    +bool Path::operator==(const Path &that) const {
    +  return path == that.path;
    +}
    +
    +bool Path::operator!=(const Path &that) const {
    +  return path != that.path;
    +}
    +
    +bool Path::operator<(const Path& that) const {
    +  return path < that.path;
    +}
    +
     std::ostream& llvm::operator<<(std::ostream &strm, const sys::Path &aPath) {
       strm << aPath.toString();
       return strm;
    
    
    
    
    From evan.cheng at apple.com  Wed May 21 17:34:14 2008
    From: evan.cheng at apple.com (Evan Cheng)
    Date: Wed, 21 May 2008 22:34:14 -0000
    Subject: [llvm-commits] [llvm] r51394 - in /llvm/trunk:
     lib/CodeGen/SimpleRegisterCoalescing.cpp
     test/CodeGen/X86/2008-05-21-CoalescerBug.ll
    Message-ID: <200805212234.m4LMYEu3030567@zion.cs.uiuc.edu>
    
    Author: evancheng
    Date: Wed May 21 17:34:12 2008
    New Revision: 51394
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51394&view=rev
    Log:
    Fix PR2343. An *interesting* coalescer bug.
    
    BB1:                                                                                                                                                  
      vr1025 = copy vr1024                                                                                                                                
      ..                                                                                                                                                  
    BB2:                                                                                                                                                  
      vr1024 = op                                                                                                                                         
             = op vr1025                                                                                                                                     
      
    
    Even though vr1025 is copied from vr1024, it's not safe to coalesced them since live range of vr1025 intersects the def of vr1024. This happens when vr1025 is assigned the value of the previous iteration of vr1024 in the loop.
    
    Added:
        llvm/trunk/test/CodeGen/X86/2008-05-21-CoalescerBug.ll
    Modified:
        llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
    
    Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=51394&r1=51393&r2=51394&view=diff
    
    ==============================================================================
    --- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
    +++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Wed May 21 17:34:12 2008
    @@ -1322,7 +1322,20 @@
             // Copy from the RHS?
             if (!RangeIsDefinedByCopyFromReg(LHS, LHSIt, RHS.reg))
               return false;    // Nope, bail out.
    -        
    +
    +        if (LHSIt->contains(RHSIt->valno->def))
    +          // Here is an interesting situation:
    +          // BB1:
    +          //   vr1025 = copy vr1024
    +          //   ..
    +          // BB2:
    +          //   vr1024 = op 
    +          //          = vr1025
    +          // Even though vr1025 is copied from vr1024, it's not safe to
    +          // coalesced them since live range of vr1025 intersects the
    +          // def of vr1024. This happens because vr1025 is assigned the
    +          // value of the previous iteration of vr1024.
    +          return false;
             EliminatedLHSVals.push_back(LHSIt->valno);
           }
           
    @@ -1348,6 +1361,19 @@
               // Otherwise, if this is a copy from the RHS, mark it as being merged
               // in.
               if (RangeIsDefinedByCopyFromReg(LHS, LHSIt, RHS.reg)) {
    +            if (LHSIt->contains(RHSIt->valno->def))
    +              // Here is an interesting situation:
    +              // BB1:
    +              //   vr1025 = copy vr1024
    +              //   ..
    +              // BB2:
    +              //   vr1024 = op 
    +              //          = vr1025
    +              // Even though vr1025 is copied from vr1024, it's not safe to
    +              // coalesced them since live range of vr1025 intersects the
    +              // def of vr1024. This happens because vr1025 is assigned the
    +              // value of the previous iteration of vr1024.
    +              return false;
                 EliminatedLHSVals.push_back(LHSIt->valno);
     
                 // We know this entire LHS live range is okay, so skip it now.
    
    Added: llvm/trunk/test/CodeGen/X86/2008-05-21-CoalescerBug.ll
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-05-21-CoalescerBug.ll?rev=51394&view=auto
    
    ==============================================================================
    --- llvm/trunk/test/CodeGen/X86/2008-05-21-CoalescerBug.ll (added)
    +++ llvm/trunk/test/CodeGen/X86/2008-05-21-CoalescerBug.ll Wed May 21 17:34:12 2008
    @@ -0,0 +1,97 @@
    +; RUN: llvm-as < %s | llc -march=x86 -fast | grep mov | count 4
    +; PR2343
    +
    +	%llvm.dbg.anchor.type = type { i32, i32 }
    +	%struct.CUMULATIVE_ARGS = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
    +	%struct.VEC_basic_block_base = type { i32, i32, [1 x %struct.basic_block_def*] }
    +	%struct.VEC_basic_block_gc = type { %struct.VEC_basic_block_base }
    +	%struct.VEC_edge_base = type { i32, i32, [1 x %struct.edge_def*] }
    +	%struct.VEC_edge_gc = type { %struct.VEC_edge_base }
    +	%struct.VEC_rtx_base = type { i32, i32, [1 x %struct.rtx_def*] }
    +	%struct.VEC_rtx_gc = type { %struct.VEC_rtx_base }
    +	%struct.VEC_temp_slot_p_base = type { i32, i32, [1 x %struct.temp_slot*] }
    +	%struct.VEC_temp_slot_p_gc = type { %struct.VEC_temp_slot_p_base }
    +	%struct.VEC_tree_base = type { i32, i32, [1 x %struct.tree_node*] }
    +	%struct.VEC_tree_gc = type { %struct.VEC_tree_base }
    +	%struct.__sbuf = type { i8*, i32 }
    +	%struct._obstack_chunk = type { i8*, %struct._obstack_chunk*, [4 x i8] }
    +	%struct.basic_block_def = type { %struct.tree_node*, %struct.VEC_edge_gc*, %struct.VEC_edge_gc*, i8*, %struct.loop*, [2 x %struct.et_node*], %struct.basic_block_def*, %struct.basic_block_def*, %struct.basic_block_il_dependent, %struct.tree_node*, %struct.edge_prediction*, i64, i32, i32, i32, i32 }
    +	%struct.basic_block_il_dependent = type { %struct.rtl_bb_info* }
    +	%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.block_symbol = type { [3 x %struct.cfg_stats_d], %struct.object_block*, i64 }
    +	%struct.cfg_stats_d = type { i32 }
    +	%struct.control_flow_graph = type { %struct.basic_block_def*, %struct.basic_block_def*, %struct.VEC_basic_block_gc*, i32, i32, i32, %struct.VEC_basic_block_gc*, i32 }
    +	%struct.def_optype_d = type { %struct.def_optype_d*, %struct.tree_node** }
    +	%struct.edge_def = type { %struct.basic_block_def*, %struct.basic_block_def*, %struct.edge_def_insns, i8*, %struct.__sbuf*, 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.emit_status = type { i32, i32, %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack*, i32, %struct.__sbuf, 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.control_flow_graph*, %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.VEC_temp_slot_p_gc*, %struct.temp_slot*, %struct.var_refs_queue*, i32, i32, i32, i32, %struct.machine_function*, i32, i32, %struct.language_function*, %struct.htab*, %struct.rtx_def*, i32, i32, i32, %struct.__sbuf, %struct.VEC_tree_gc*, %struct.tree_node*, i8*, i8*, i8*, i8*, i8*, %struct.tree_node*, i8, i8, i8, i8, i8, i8 }
    +	%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.language_function = type opaque
    +	%struct.loop = type { i32, %struct.basic_block_def*, %struct.basic_block_def*, %llvm.dbg.anchor.type, i32, i32, i32, i32, %struct.loop**, i32, %struct.loop*, %struct.loop*, %struct.loop*, %struct.loop*, i8*, %struct.tree_node*, %struct.tree_node*, %struct.nb_iter_bound*, %struct.edge_def*, i32 }
    +	%struct.machine_function = type opaque
    +	%struct.maydef_optype_d = type { %struct.maydef_optype_d*, %struct.tree_node*, %struct.tree_node*, %struct.ssa_use_operand_d }
    +	%struct.nb_iter_bound = type { %struct.tree_node*, %struct.tree_node*, %struct.nb_iter_bound* }
    +	%struct.object_block = type { %struct.section*, i32, i64, %struct.VEC_rtx_gc*, %struct.VEC_rtx_gc* }
    +	%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.rtl_bb_info = type { %struct.rtx_def*, %struct.rtx_def*, %struct.bitmap_head_def*, %struct.bitmap_head_def*, %struct.rtx_def*, %struct.rtx_def*, i32 }
    +	%struct.rtx_def = type { i16, i8, i8, %struct.u }
    +	%struct.section = type { %struct.unnamed_section }
    +	%struct.sequence_stack = type { %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack* }
    +	%struct.ssa_use_operand_d = type { %struct.ssa_use_operand_d*, %struct.ssa_use_operand_d*, %struct.tree_node*, %struct.tree_node** }
    +	%struct.stmt_ann_d = type { %struct.tree_ann_common_d, i8, %struct.basic_block_def*, %struct.stmt_operands_d, %struct.bitmap_head_def*, i32, i8* }
    +	%struct.stmt_operands_d = type { %struct.def_optype_d*, %struct.use_optype_d*, %struct.maydef_optype_d*, %struct.vuse_optype_d*, %struct.maydef_optype_d* }
    +	%struct.temp_slot = type opaque
    +	%struct.tree_ann_common_d = type { i32, i8*, %struct.tree_node* }
    +	%struct.tree_ann_d = type { %struct.stmt_ann_d }
    +	%struct.tree_common = type { %struct.tree_node*, %struct.tree_node*, %struct.tree_ann_d*, i8, i8, i8, i8, i8 }
    +	%struct.tree_decl_common = type { %struct.tree_decl_minimal, %struct.tree_node*, i8, i8, i8, i8, i8, i32, %struct.tree_decl_u1, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, i64, %struct.lang_decl* }
    +	%struct.tree_decl_minimal = type { %struct.tree_common, %struct.__sbuf, i32, %struct.tree_node*, %struct.tree_node* }
    +	%struct.tree_decl_non_common = type { %struct.tree_decl_with_vis, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node* }
    +	%struct.tree_decl_u1 = type { i64 }
    +	%struct.tree_decl_with_rtl = type { %struct.tree_decl_common, %struct.rtx_def*, i32 }
    +	%struct.tree_decl_with_vis = type { %struct.tree_decl_with_rtl, %struct.tree_node*, %struct.tree_node*, i8, i8, i8 }
    +	%struct.tree_function_decl = type { %struct.tree_decl_non_common, i8, i8, i64, %struct.function* }
    +	%struct.tree_node = type { %struct.tree_function_decl }
    +	%struct.u = type { %struct.block_symbol }
    +	%struct.unnamed_section = type { %struct.cfg_stats_d, void (i8*)*, i8*, %struct.section* }
    +	%struct.use_optype_d = type { %struct.use_optype_d*, %struct.ssa_use_operand_d }
    +	%struct.var_refs_queue = type { %struct.rtx_def*, i32, i32, %struct.var_refs_queue* }
    +	%struct.varasm_status = type opaque
    +	%struct.vuse_optype_d = type { %struct.vuse_optype_d*, %struct.tree_node*, %struct.ssa_use_operand_d }
    + at llvm.used = appending global [1 x i8*] [ i8* bitcast (%struct.edge_def* (%struct.edge_def*, %struct.basic_block_def*)* @tree_redirect_edge_and_branch to i8*) ], section "llvm.metadata"		; <[1 x i8*]*> [#uses=0]
    +
    +define %struct.edge_def* @tree_redirect_edge_and_branch(%struct.edge_def* %e1, %struct.basic_block_def* %dest2) nounwind  {
    +entry:
    +	br label %bb497
    +
    +bb483:		; preds = %bb497
    +	%tmp496 = load %struct.tree_node** null, align 4		; <%struct.tree_node*> [#uses=1]
    +	br label %bb497
    +
    +bb497:		; preds = %bb483, %entry
    +	%cases.0 = phi %struct.tree_node* [ %tmp496, %bb483 ], [ null, %entry ]		; <%struct.tree_node*> [#uses=1]
    +	%last.0 = phi %struct.tree_node* [ %cases.0, %bb483 ], [ undef, %entry ]		; <%struct.tree_node*> [#uses=1]
    +	br i1 false, label %bb483, label %bb502
    +
    +bb502:		; preds = %bb497
    +	br i1 false, label %bb507, label %bb841
    +
    +bb507:		; preds = %bb502
    +	%tmp517 = getelementptr %struct.tree_node* %last.0, i32 0, i32 0		; <%struct.tree_function_decl*> [#uses=1]
    +	%tmp517518 = bitcast %struct.tree_function_decl* %tmp517 to %struct.tree_common*		; <%struct.tree_common*> [#uses=1]
    +	%tmp519 = getelementptr %struct.tree_common* %tmp517518, i32 0, i32 0		; <%struct.tree_node**> [#uses=1]
    +	store %struct.tree_node* null, %struct.tree_node** %tmp519, align 4
    +	br label %bb841
    +
    +bb841:		; preds = %bb507, %bb502
    +	unreachable
    +}
    
    
    
    
    From gohman at apple.com  Wed May 21 18:35:54 2008
    From: gohman at apple.com (Dan Gohman)
    Date: Wed, 21 May 2008 23:35:54 -0000
    Subject: [llvm-commits] [llvm] r51396 - /llvm/trunk/include/llvm/Type.h
    Message-ID: <200805212335.m4LNZsLK032347@zion.cs.uiuc.edu>
    
    Author: djg
    Date: Wed May 21 18:35:53 2008
    New Revision: 51396
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51396&view=rev
    Log:
    Add a Type::isSingleValueType method. This will be used by code
    that currently uses Type::isFirstClassType and depends on it
    returning false for struct or array types.
    
    This commit doesn't change the behavior of Type::isFirstClassType.
    
    Modified:
        llvm/trunk/include/llvm/Type.h
    
    Modified: llvm/trunk/include/llvm/Type.h
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Type.h?rev=51396&r1=51395&r2=51396&view=diff
    
    ==============================================================================
    --- llvm/trunk/include/llvm/Type.h (original)
    +++ llvm/trunk/include/llvm/Type.h Wed May 21 18:35:53 2008
    @@ -212,9 +212,19 @@
       inline bool isPrimitiveType() const { return ID <= LastPrimitiveTyID; }
       inline bool isDerivedType()   const { return ID >= FirstDerivedTyID; }
     
    -  /// isFirstClassType - Return true if the value is holdable in a register.
    +  /// isFirstClassType - Return true if the type is "first class", meaning it
    +  /// is a valid type for a Value.
       ///
       inline bool isFirstClassType() const {
    +    // Coming soon: first-class struct and array types...
    +    return isSingleValueType();
    +  }
    +
    +  /// isSingleValueType - Return true if the type is a valid type for a
    +  /// virtual register in codegen.  This includes all first-class types
    +  /// except struct and array types.
    +  ///
    +  inline bool isSingleValueType() const {
         return (ID != VoidTyID && ID <= LastPrimitiveTyID) ||
                 ID == IntegerTyID || ID == PointerTyID || ID == VectorTyID;
       }
    
    
    
    
    From evan.cheng at apple.com  Wed May 21 18:47:48 2008
    From: evan.cheng at apple.com (Evan Cheng)
    Date: Wed, 21 May 2008 23:47:48 -0000
    Subject: [llvm-commits] [llvm-gcc-4.2] r51397 - in /llvm-gcc-4.2/trunk/gcc:
    	ipa-inline.c passes.c
    Message-ID: <200805212347.m4LNln2m032657@zion.cs.uiuc.edu>
    
    Author: evancheng
    Date: Wed May 21 18:47:48 2008
    New Revision: 51397
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51397&view=rev
    Log:
    Revert Duncan's ipa related changes for now. This is causing significant performance regressions, e.g. WebKit.
    
    Modified:
        llvm-gcc-4.2/trunk/gcc/ipa-inline.c
        llvm-gcc-4.2/trunk/gcc/passes.c
    
    Modified: llvm-gcc-4.2/trunk/gcc/ipa-inline.c
    URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/ipa-inline.c?rev=51397&r1=51396&r2=51397&view=diff
    
    ==============================================================================
    --- llvm-gcc-4.2/trunk/gcc/ipa-inline.c (original)
    +++ llvm-gcc-4.2/trunk/gcc/ipa-inline.c Wed May 21 18:47:48 2008
    @@ -941,11 +941,7 @@
     	/* At the moment, no IPA passes change function bodies before inlining.
     	   Save some time by not recomputing function body sizes if early inlining
     	   already did so.  */
    -        /* LLVM local begin - Don't rely on pass_early_ipa_inline being run.  */
    -#ifndef ENABLE_LLVM
     	if (!flag_early_inlining)
    -#endif
    -        /* LLVM local end */
     	  node->local.self_insns = node->global.insns
     	     = estimate_num_insns (node->decl);
     
    @@ -1032,19 +1028,9 @@
     		 overall_insns - old_insns);
         }
     
    -  /* LLVM local begin */
    -#ifdef ENABLE_LLVM
    -  if (0)
    -#endif
    -  /* LLVM local end*/
       if (!flag_really_no_inline)
         cgraph_decide_inlining_of_small_functions ();
     
    -  /* LLVM local begin */
    -#ifdef ENABLE_LLVM
    -  if (0)
    -#endif
    -  /* LLVM local end*/
       if (!flag_really_no_inline
           && flag_inline_functions_called_once)
         {
    @@ -1162,11 +1148,6 @@
           }
     
       /* Now do the automatic inlining.  */
    -  /* LLVM local begin */
    -#ifdef ENABLE_LLVM
    -  if (0)
    -#endif
    -  /* LLVM local end */
       if (!flag_really_no_inline)
         for (e = node->callees; e; e = e->next_callee)
           if (e->callee->local.inlinable
    
    Modified: llvm-gcc-4.2/trunk/gcc/passes.c
    URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/passes.c?rev=51397&r1=51396&r2=51397&view=diff
    
    ==============================================================================
    --- llvm-gcc-4.2/trunk/gcc/passes.c (original)
    +++ llvm-gcc-4.2/trunk/gcc/passes.c Wed May 21 18:47:48 2008
    @@ -481,20 +481,18 @@
     #define NEXT_PASS(PASS)  (p = next_pass_1 (p, &PASS))
       /* Interprocedural optimization passes.  */
       p = &all_ipa_passes;
    -  /* LLVM local begin */
    -#ifndef ENABLE_LLVM
       NEXT_PASS (pass_early_ipa_inline);
       NEXT_PASS (pass_early_local_passes);
       NEXT_PASS (pass_ipa_cp);
    -#endif
    -  NEXT_PASS (pass_ipa_inline); /* LLVM: inline functions marked always_inline */
    +  NEXT_PASS (pass_ipa_inline);
    +/* LLVM LOCAL begin */
     #ifndef ENABLE_LLVM
       NEXT_PASS (pass_ipa_reference);
       NEXT_PASS (pass_ipa_pure_const); 
       NEXT_PASS (pass_ipa_type_escape);
       NEXT_PASS (pass_ipa_pta);
     #endif
    -  /* LLVM local end */
    +/* LLVM LOCAL end */
       *p = NULL;
     
       /* All passes needed to lower the function into shape optimizers can
    @@ -506,9 +504,9 @@
       NEXT_PASS (pass_lower_cf);
       NEXT_PASS (pass_lower_eh);
       NEXT_PASS (pass_build_cfg);
    +  NEXT_PASS (pass_lower_complex_O0);
       /* LLVM LOCAL begin */
     #ifndef ENABLE_LLVM
    -  NEXT_PASS (pass_lower_complex_O0);
       NEXT_PASS (pass_lower_vector);
     #endif
       /* LLVM LOCAL end */
    @@ -520,6 +518,16 @@
       /* LLVM LOCAL end */
       *p = NULL;
     
    +  p = &pass_early_local_passes.sub;
    +  /* LLVM LOCAL begin */
    +#ifndef ENABLE_LLVM
    +  NEXT_PASS (pass_tree_profile);
    +#endif
    +  /* LLVM LOCAL end */
    +  NEXT_PASS (pass_cleanup_cfg);
    +  NEXT_PASS (pass_rebuild_cgraph_edges);
    +  *p = NULL;
    +
       /* LLVM LOCAL begin */
     #ifdef ENABLE_LLVM
       p = &all_extra_lowering_passes;
    @@ -531,14 +539,6 @@
     #endif
       /* LLVM LOCAL end */
     
    -  /* LLVM LOCAL begin - Do not pull in symbols. */
    -#ifndef ENABLE_LLVM
    -  p = &pass_early_local_passes.sub;
    -  NEXT_PASS (pass_tree_profile);
    -  NEXT_PASS (pass_cleanup_cfg);
    -  NEXT_PASS (pass_rebuild_cgraph_edges);
    -  *p = NULL;
    -
       p = &all_passes;
       NEXT_PASS (pass_fixup_cfg);
       NEXT_PASS (pass_init_datastructures);
    @@ -684,6 +684,8 @@
       NEXT_PASS (pass_dce_loop);
       *p = NULL;
     
    +  /* LLVM LOCAL begin */
    +#ifndef ENABLE_LLVM
       p = &pass_loop2.sub;
       NEXT_PASS (pass_rtl_loop_init);
       NEXT_PASS (pass_rtl_move_loop_invariants);
    @@ -759,7 +761,7 @@
       NEXT_PASS (pass_final);
       *p = NULL;
     #endif
    -  /* LLVM local end */
    +  /* LLVM LOCAL end */
     
     #undef NEXT_PASS
     
    @@ -773,12 +775,11 @@
       register_dump_files (all_extra_lowering_passes, false,
     		       PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh
     		       | PROP_cfg);
    -#else
    +#endif
    +  /* LLVM LOCAL end */
       register_dump_files (all_passes, false,
     		       PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh
     		       | PROP_cfg);
    -#endif
    -  /* LLVM LOCAL end */
     }
     
     static unsigned int last_verified;
    
    
    
    
    From sabre at nondot.org  Wed May 21 19:53:38 2008
    From: sabre at nondot.org (Chris Lattner)
    Date: Thu, 22 May 2008 00:53:38 -0000
    Subject: [llvm-commits] [llvm] r51399 -
    	/llvm/trunk/lib/Transforms/Scalar/LICM.cpp
    Message-ID: <200805220053.m4M0rcj0001943@zion.cs.uiuc.edu>
    
    Author: lattner
    Date: Wed May 21 19:53:38 2008
    New Revision: 51399
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51399&view=rev
    Log:
    Use 'continue' to reduce nesting in this loop.  No functionality change.
    
    Modified:
        llvm/trunk/lib/Transforms/Scalar/LICM.cpp
    
    Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=51399&r1=51398&r2=51399&view=diff
    
    ==============================================================================
    --- llvm/trunk/lib/Transforms/Scalar/LICM.cpp (original)
    +++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp Wed May 21 19:53:38 2008
    @@ -787,72 +787,69 @@
         // We can promote this alias set if it has a store, if it is a "Must" alias
         // set, if the pointer is loop invariant, and if we are not eliminating any
         // volatile loads or stores.
    -    if (!AS.isForwardingAliasSet() && AS.isMod() && AS.isMustAlias() &&
    -        !AS.isVolatile() && CurLoop->isLoopInvariant(AS.begin()->first)) {
    -      assert(!AS.empty() &&
    -             "Must alias set should have at least one pointer element in it!");
    -      Value *V = AS.begin()->first;
    -
    -      // Check that all of the pointers in the alias set have the same type.  We
    -      // cannot (yet) promote a memory location that is loaded and stored in
    -      // different sizes.
    +    if (AS.isForwardingAliasSet() || !AS.isMod() || !AS.isMustAlias() ||
    +        AS.isVolatile() || !CurLoop->isLoopInvariant(AS.begin()->first))
    +      continue;
    +    
    +    assert(!AS.empty() &&
    +           "Must alias set should have at least one pointer element in it!");
    +    Value *V = AS.begin()->first;
    +
    +    // Check that all of the pointers in the alias set have the same type.  We
    +    // cannot (yet) promote a memory location that is loaded and stored in
    +    // different sizes.
    +    {
           bool PointerOk = true;
           for (AliasSet::iterator I = AS.begin(), E = AS.end(); I != E; ++I)
             if (V->getType() != I->first->getType()) {
               PointerOk = false;
               break;
             }
    +      if (!PointerOk)
    +        continue;
    +    }
     
    -      // If one use of value V inside the loop is safe then it is OK to promote 
    -      // this value. On the otherside if there is not any unsafe use inside the
    -      // loop then also it is OK to promote this value. Otherwise it is
    -      // unsafe to promote this value.
    -      if (PointerOk) {
    -        bool oneSafeUse = false;
    -        bool oneUnsafeUse = false;
    -        for(Value::use_iterator UI = V->use_begin(), UE = V->use_end();
    -            UI != UE; ++UI) {
    -          Instruction *Use = dyn_cast(*UI);
    -          if (!Use || !CurLoop->contains(Use->getParent()))
    -            continue;
    -          for (SmallVector::iterator 
    -                 ExitI = LoopExits.begin(), ExitE = LoopExits.end();
    -               ExitI != ExitE; ++ExitI) {
    -            Instruction *Ex = *ExitI;
    -            if (!isa(Use) && DT->dominates(Use, Ex)) {
    -              oneSafeUse = true;
    -              break;
    -            }
    -            else 
    -              oneUnsafeUse = true;
    -          }
    +    // If one use of value V inside the loop is safe then it is OK to promote 
    +    // this value. On the otherside if there is not any unsafe use inside the
    +    // loop then also it is OK to promote this value. Otherwise it is
    +    // unsafe to promote this value.
    +    bool oneSafeUse = false;
    +    bool oneUnsafeUse = false;
    +    for(Value::use_iterator UI = V->use_begin(), UE = V->use_end();
    +        UI != UE; ++UI) {
    +      Instruction *Use = dyn_cast(*UI);
    +      if (!Use || !CurLoop->contains(Use->getParent()))
    +        continue;
    +      
    +      for (SmallVector::iterator 
    +             ExitI = LoopExits.begin(), ExitE = LoopExits.end();
    +           ExitI != ExitE; ++ExitI) {
    +        Instruction *Ex = *ExitI;
    +        if (!isa(Use) && DT->dominates(Use, Ex)) {
    +          oneSafeUse = true;
    +          break;
    +        } else 
    +          oneUnsafeUse = true;
    +      }
     
    -          if (oneSafeUse)
    -            break;
    -        }
    +      if (oneSafeUse)
    +        break;
    +    }
     
    -        if (oneSafeUse)
    -          PointerOk = true;
    -        else if (!oneUnsafeUse)
    -          PointerOk = true;
    -        else
    -          PointerOk = false;
    -      }
    -      
    -      if (PointerOk) {
    -        const Type *Ty = cast(V->getType())->getElementType();
    -        AllocaInst *AI = new AllocaInst(Ty, 0, V->getName()+".tmp", FnStart);
    -        PromotedValues.push_back(std::make_pair(AI, V));
    +    if (!oneSafeUse && oneUnsafeUse)
    +      continue;
    +    
    +    const Type *Ty = cast(V->getType())->getElementType();
    +    AllocaInst *AI = new AllocaInst(Ty, 0, V->getName()+".tmp", FnStart);
    +    PromotedValues.push_back(std::make_pair(AI, V));
     
    -        // Update the AST and alias analysis.
    -        CurAST->copyValue(V, AI);
    +    // Update the AST and alias analysis.
    +    CurAST->copyValue(V, AI);
     
    -        for (AliasSet::iterator I = AS.begin(), E = AS.end(); I != E; ++I)
    -          ValueToAllocaMap.insert(std::make_pair(I->first, AI));
    +    for (AliasSet::iterator I = AS.begin(), E = AS.end(); I != E; ++I)
    +      ValueToAllocaMap.insert(std::make_pair(I->first, AI));
     
    -        DOUT << "LICM: Promoting value: " << *V << "\n";
    -      }
    -    }
    +    DOUT << "LICM: Promoting value: " << *V << "\n";
       }
     }
     
    
    
    
    
    From isanbard at gmail.com  Wed May 21 19:55:13 2008
    From: isanbard at gmail.com (Bill Wendling)
    Date: Thu, 22 May 2008 00:55:13 -0000
    Subject: [llvm-commits] [llvm] r51400 - /llvm/tags/Apple/llvmCore-2044/
    Message-ID: <200805220055.m4M0tDN6001995@zion.cs.uiuc.edu>
    
    Author: void
    Date: Wed May 21 19:55:13 2008
    New Revision: 51400
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51400&view=rev
    Log:
    Creating llvmCore-2044 branch
    
    Added:
        llvm/tags/Apple/llvmCore-2044/
          - copied from r51399, llvm/trunk/
    
    
    
    From isanbard at gmail.com  Wed May 21 19:55:19 2008
    From: isanbard at gmail.com (Bill Wendling)
    Date: Thu, 22 May 2008 00:55:19 -0000
    Subject: [llvm-commits] [llvm-gcc-4.2] r51401 -
    	/llvm-gcc-4.2/tags/Apple/llvmgcc42-2044/
    Message-ID: <200805220055.m4M0tJVi002009@zion.cs.uiuc.edu>
    
    Author: void
    Date: Wed May 21 19:55:19 2008
    New Revision: 51401
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51401&view=rev
    Log:
    Creating llvmgcc42-2044 branch
    
    Added:
        llvm-gcc-4.2/tags/Apple/llvmgcc42-2044/
          - copied from r51400, llvm-gcc-4.2/trunk/
    
    
    
    From sabre at nondot.org  Wed May 21 22:06:17 2008
    From: sabre at nondot.org (Chris Lattner)
    Date: Thu, 22 May 2008 03:06:17 -0000
    Subject: [llvm-commits] [llvm] r51405 - /llvm/trunk/docs/DeveloperPolicy.html
    Message-ID: <200805220306.m4M36Hd7005731@zion.cs.uiuc.edu>
    
    Author: lattner
    Date: Wed May 21 22:06:14 2008
    New Revision: 51405
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51405&view=rev
    Log:
    minor edits
    
    Modified:
        llvm/trunk/docs/DeveloperPolicy.html
    
    Modified: llvm/trunk/docs/DeveloperPolicy.html
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/DeveloperPolicy.html?rev=51405&r1=51404&r2=51405&view=diff
    
    ==============================================================================
    --- llvm/trunk/docs/DeveloperPolicy.html (original)
    +++ llvm/trunk/docs/DeveloperPolicy.html Wed May 21 22:06:14 2008
    @@ -468,11 +468,6 @@
       decisions about LLVM.  The goal of the LLVM project is to always keep the code
       open and licensed under a very liberal license.

    -

    When contributing code, you also affirm that you are legally entitled to - grant this copyright, personally or on behalf of your employer. If the code - belongs to some other entity, please raise this issue with the oversight - group before the code is committed.

    -
    @@ -527,9 +522,11 @@ arbitrary purposes (including commercial use).

    When contributing code, we expect contributors to notify us of any potential - for patent-related trouble with their changes. If you own the rights to a + for patent-related trouble with their changes. If you or your employer + own the rights to a patent and would like to contribute code to LLVM that relies on it, we - require that you sign an agreement that allows any other user of LLVM to + require that + the copyright owner sign an agreement that allows any other user of LLVM to freely use your patent. Please contact the oversight group for more details.

    @@ -544,6 +541,11 @@ the entire software base can be managed by a single copyright holder. This implies that any contributions can be licensed under the license that the project uses.

    + +

    When contributing code, you also affirm that you are legally entitled to + grant this copyright, personally or on behalf of your employer. If the code + belongs to some other entity, please raise this issue with the oversight + group before the code is committed.

    From sabre at nondot.org Wed May 21 22:22:44 2008 From: sabre at nondot.org (Chris Lattner) Date: Thu, 22 May 2008 03:22:44 -0000 Subject: [llvm-commits] [llvm] r51406 - /llvm/trunk/lib/Transforms/Scalar/LICM.cpp Message-ID: <200805220322.m4M3MiLE006394@zion.cs.uiuc.edu> Author: lattner Date: Wed May 21 22:22:42 2008 New Revision: 51406 URL: http://llvm.org/viewvc/llvm-project?rev=51406&view=rev Log: rewrite the validity checking for memory promotion to be simpler, more aggressive, and more correct. Verify that we only attempt to promote loads and stores. Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=51406&r1=51405&r2=51406&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LICM.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp Wed May 21 22:22:42 2008 @@ -726,30 +726,32 @@ // want to insert one copy of the code in each exit block, though the loop may // exit to the same block more than once. // - std::set ProcessedBlocks; + SmallPtrSet ProcessedBlocks; SmallVector ExitBlocks; CurLoop->getExitBlocks(ExitBlocks); - for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i) - if (ProcessedBlocks.insert(ExitBlocks[i]).second) { - // Copy all of the allocas into their memory locations. - BasicBlock::iterator BI = ExitBlocks[i]->begin(); - while (isa(*BI)) - ++BI; // Skip over all of the phi nodes in the block. - Instruction *InsertPos = BI; - unsigned PVN = 0; - for (unsigned i = 0, e = PromotedValues.size(); i != e; ++i) { - // Load from the alloca. - LoadInst *LI = new LoadInst(PromotedValues[i].first, "", InsertPos); - - // If this is a pointer type, update alias info appropriately. - if (isa(LI->getType())) - CurAST->copyValue(PointerValueNumbers[PVN++], LI); + for (unsigned i = 0, e = ExitBlocks.size(); i != e; ++i) { + if (!ProcessedBlocks.insert(ExitBlocks[i])) + continue; + + // Copy all of the allocas into their memory locations. + BasicBlock::iterator BI = ExitBlocks[i]->begin(); + while (isa(*BI)) + ++BI; // Skip over all of the phi nodes in the block. + Instruction *InsertPos = BI; + unsigned PVN = 0; + for (unsigned i = 0, e = PromotedValues.size(); i != e; ++i) { + // Load from the alloca. + LoadInst *LI = new LoadInst(PromotedValues[i].first, "", InsertPos); + + // If this is a pointer type, update alias info appropriately. + if (isa(LI->getType())) + CurAST->copyValue(PointerValueNumbers[PVN++], LI); - // Store into the memory we promoted. - new StoreInst(LI, PromotedValues[i].second, InsertPos); - } + // Store into the memory we promoted. + new StoreInst(LI, PromotedValues[i].second, InsertPos); } + } // Now that we have done the deed, use the mem2reg functionality to promote // all of the new allocas we just created into real SSA registers. @@ -771,14 +773,8 @@ std::map &ValueToAllocaMap) { Instruction *FnStart = CurLoop->getHeader()->getParent()->begin()->begin(); - SmallVector LoopExits; - SmallVector Blocks; - CurLoop->getExitingBlocks(Blocks); - for (SmallVector::iterator BI = Blocks.begin(), - BE = Blocks.end(); BI != BE; ++BI) { - BasicBlock *BB = *BI; - LoopExits.push_back(BB->getTerminator()); - } + SmallVector ExitingBlocks; + CurLoop->getExitingBlocks(ExitingBlocks); // Loop over all of the alias sets in the tracker object. for (AliasSetTracker::iterator I = CurAST->begin(), E = CurAST->end(); @@ -809,34 +805,41 @@ continue; } - // If one use of value V inside the loop is safe then it is OK to promote - // this value. On the otherside if there is not any unsafe use inside the - // loop then also it is OK to promote this value. Otherwise it is - // unsafe to promote this value. - bool oneSafeUse = false; - bool oneUnsafeUse = false; - for(Value::use_iterator UI = V->use_begin(), UE = V->use_end(); - UI != UE; ++UI) { + // It isn't safe to promote a load/store from the loop if the load/store is + // conditional. For example, turning: + // + // for () { if (c) *P += 1; } + // + // into: + // + // tmp = *P; for () { if (c) tmp +=1; } *P = tmp; + // + // is not safe, because *P may only be valid to access if 'c' is true. + // + // It is safe to promote P if all uses are direct load/stores and if at + // least one is guaranteed to be executed. + bool GuaranteedToExecute = false; + bool InvalidInst = false; + for (Value::use_iterator UI = V->use_begin(), UE = V->use_end(); + UI != UE; ++UI) { + // Ignore instructions not in this loop. Instruction *Use = dyn_cast(*UI); if (!Use || !CurLoop->contains(Use->getParent())) continue; - - for (SmallVector::iterator - ExitI = LoopExits.begin(), ExitE = LoopExits.end(); - ExitI != ExitE; ++ExitI) { - Instruction *Ex = *ExitI; - if (!isa(Use) && DT->dominates(Use, Ex)) { - oneSafeUse = true; - break; - } else - oneUnsafeUse = true; - } - if (oneSafeUse) + if (!isa(Use) && !isa(Use)) { + InvalidInst = true; break; + } + + if (!GuaranteedToExecute) + GuaranteedToExecute = isSafeToExecuteUnconditionally(*Use); } - if (!oneSafeUse && oneUnsafeUse) + // If there is an non-load/store instruction in the loop, we can't promote + // it. If there isn't a guaranteed-to-execute instruction, we can't + // promote. + if (InvalidInst || !GuaranteedToExecute) continue; const Type *Ty = cast(V->getType())->getElementType(); From sabre at nondot.org Wed May 21 22:23:06 2008 From: sabre at nondot.org (Chris Lattner) Date: Thu, 22 May 2008 03:23:06 -0000 Subject: [llvm-commits] [llvm] r51407 - /llvm/trunk/lib/Analysis/AliasSetTracker.cpp Message-ID: <200805220323.m4M3N6t0006415@zion.cs.uiuc.edu> Author: lattner Date: Wed May 21 22:23:06 2008 New Revision: 51407 URL: http://llvm.org/viewvc/llvm-project?rev=51407&view=rev Log: Free and vaarg are not really volatile. Modified: llvm/trunk/lib/Analysis/AliasSetTracker.cpp Modified: llvm/trunk/lib/Analysis/AliasSetTracker.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasSetTracker.cpp?rev=51407&r1=51406&r2=51407&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/AliasSetTracker.cpp (original) +++ llvm/trunk/lib/Analysis/AliasSetTracker.cpp Wed May 21 22:23:06 2008 @@ -284,20 +284,13 @@ bool AliasSetTracker::add(FreeInst *FI) { bool NewPtr; - AliasSet &AS = addPointer(FI->getOperand(0), ~0, - AliasSet::Mods, NewPtr); - - // Free operations are volatile ops (cannot be moved). - AS.setVolatile(); + addPointer(FI->getOperand(0), ~0, AliasSet::Mods, NewPtr); return NewPtr; } bool AliasSetTracker::add(VAArgInst *VAAI) { bool NewPtr; - AliasSet &AS = addPointer(VAAI->getOperand(0), ~0, AliasSet::ModRef, NewPtr); - - // Treat vaarg instructions as volatile (not to be moved). - AS.setVolatile(); + addPointer(VAAI->getOperand(0), ~0, AliasSet::ModRef, NewPtr); return NewPtr; } From clattner at apple.com Wed May 21 23:22:29 2008 From: clattner at apple.com (Chris Lattner) Date: Wed, 21 May 2008 21:22:29 -0700 Subject: [llvm-commits] [llvm] r51356 - in /llvm/trunk: lib/Analysis/AliasSetTracker.cpp test/Transforms/LICM/2008-05-20-AliasSetVAArg.ll In-Reply-To: References: <200805202205.m4KM5SLp009755@zion.cs.uiuc.edu> Message-ID: On May 20, 2008, at 3:25 PM, Dan Gohman wrote: > > On May 20, 2008, at 3:05 PM, Chris Lattner wrote: > >> Author: lattner >> Date: Tue May 20 17:05:28 2008 >> New Revision: 51356 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=51356&view=rev >> Log: >> Fix PR2346 by marking vaarg as volatile so that licm doesn't try to >> hoist them. > > vaarg was already marked as ModRef; why is that not sufficient? > Wouldn't > LICM have the same problem with a call that was known to ModRef a > single memory location? Claiming that vaarg is volatile seems to be > merely covering up a LICM bug. Good point, fixed! -chris From sabre at nondot.org Wed May 21 23:45:22 2008 From: sabre at nondot.org (Chris Lattner) Date: Thu, 22 May 2008 04:45:22 -0000 Subject: [llvm-commits] [llvm] r51408 - /llvm/trunk/test/CodeGen/X86/asm-indirect-mem.ll Message-ID: <200805220445.m4M4jMNi008537@zion.cs.uiuc.edu> Author: lattner Date: Wed May 21 23:45:22 2008 New Revision: 51408 URL: http://llvm.org/viewvc/llvm-project?rev=51408&view=rev Log: testcase for PR2267 Added: llvm/trunk/test/CodeGen/X86/asm-indirect-mem.ll Added: llvm/trunk/test/CodeGen/X86/asm-indirect-mem.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/asm-indirect-mem.ll?rev=51408&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/asm-indirect-mem.ll (added) +++ llvm/trunk/test/CodeGen/X86/asm-indirect-mem.ll Wed May 21 23:45:22 2008 @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llc +; PR2267 +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" +target triple = "i386-apple-darwin8" + +define void @atomic_store_rel_int(i32* %p, i32 %v) nounwind { +entry: + %asmtmp = tail call i32 asm sideeffect "xchgl $1,$0", "=*m,=r,*m,1,~{dirflag},~{fpsr},~{flags}"( i32* %p, i32* %p, i32 %v ) nounwind ; [#uses=0] + ret void +} + From sabre at nondot.org Wed May 21 23:46:38 2008 From: sabre at nondot.org (Chris Lattner) Date: Thu, 22 May 2008 04:46:38 -0000 Subject: [llvm-commits] [llvm] r51409 - /llvm/trunk/lib/VMCore/InlineAsm.cpp Message-ID: <200805220446.m4M4kc6P008586@zion.cs.uiuc.edu> Author: lattner Date: Wed May 21 23:46:38 2008 New Revision: 51409 URL: http://llvm.org/viewvc/llvm-project?rev=51409&view=rev Log: Fix PR2267, by allowing indirect outputs to be intermixed with normal outputs. Testcase here: test/CodeGen/X86/asm-indirect-mem.ll Modified: llvm/trunk/lib/VMCore/InlineAsm.cpp Modified: llvm/trunk/lib/VMCore/InlineAsm.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/InlineAsm.cpp?rev=51409&r1=51408&r2=51409&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/InlineAsm.cpp (original) +++ llvm/trunk/lib/VMCore/InlineAsm.cpp Wed May 21 23:46:38 2008 @@ -183,15 +183,18 @@ if (Constraints.empty() && !ConstStr.empty()) return false; unsigned NumOutputs = 0, NumInputs = 0, NumClobbers = 0; + unsigned NumIndirect = 0; for (unsigned i = 0, e = Constraints.size(); i != e; ++i) { switch (Constraints[i].Type) { case InlineAsm::isOutput: + if ((NumInputs-NumIndirect) != 0 || NumClobbers != 0) + return false; // outputs before inputs and clobbers. if (!Constraints[i].isIndirect) { - if (NumInputs || NumClobbers) return false; // outputs come first. ++NumOutputs; break; } + ++NumIndirect; // FALLTHROUGH for Indirect Outputs. case InlineAsm::isInput: if (NumClobbers) return false; // inputs before clobbers. From tonic at nondot.org Wed May 21 23:52:53 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 04:52:53 -0000 Subject: [llvm-commits] [llvm] r51410 - /llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td Message-ID: <200805220452.m4M4qsBC008826@zion.cs.uiuc.edu> Author: tbrethou Date: Wed May 21 23:52:53 2008 New Revision: 51410 URL: http://llvm.org/viewvc/llvm-project?rev=51410&view=rev Log: Merge from mainline. Fix one more encoding bug. Modified: llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td Modified: llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td?rev=51410&r1=51409&r2=51410&view=diff ============================================================================== --- llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td Wed May 21 23:52:53 2008 @@ -1886,7 +1886,7 @@ int_x86_sse2_psrl_w, int_x86_sse2_psrli_w>; defm PSRLD : PDI_binop_rmi_int<0xD2, 0x72, MRM2r, "psrld", int_x86_sse2_psrl_d, int_x86_sse2_psrli_d>; -defm PSRLQ : PDI_binop_rmi_int<0xD3, 0x72, MRM2r, "psrlq", +defm PSRLQ : PDI_binop_rmi_int<0xD3, 0x73, MRM2r, "psrlq", int_x86_sse2_psrl_q, int_x86_sse2_psrli_q>; defm PSRAW : PDI_binop_rmi_int<0xE1, 0x71, MRM4r, "psraw", From tonic at nondot.org Wed May 21 23:56:31 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 04:56:31 -0000 Subject: [llvm-commits] [llvm] r51411 - /llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td Message-ID: <200805220456.m4M4uVgp008946@zion.cs.uiuc.edu> Author: tbrethou Date: Wed May 21 23:56:31 2008 New Revision: 51411 URL: http://llvm.org/viewvc/llvm-project?rev=51411&view=rev Log: Merge from mainline. Fix and encoding error in the psrad xmm, imm8 instruction. Modified: llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td Modified: llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td?rev=51411&r1=51410&r2=51411&view=diff ============================================================================== --- llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td Wed May 21 23:56:31 2008 @@ -1891,7 +1891,7 @@ defm PSRAW : PDI_binop_rmi_int<0xE1, 0x71, MRM4r, "psraw", int_x86_sse2_psra_w, int_x86_sse2_psrai_w>; -defm PSRAD : PDI_binop_rmi_int<0xE2, 0x71, MRM4r, "psrad", +defm PSRAD : PDI_binop_rmi_int<0xE2, 0x72, MRM4r, "psrad", int_x86_sse2_psra_d, int_x86_sse2_psrai_d>; // 128-bit logical shifts. From tonic at nondot.org Wed May 21 23:58:33 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 04:58:33 -0000 Subject: [llvm-commits] [llvm] r51412 - /llvm/branches/release_23/lib/Analysis/ConstantFolding.cpp Message-ID: <200805220458.m4M4wYUr009023@zion.cs.uiuc.edu> Author: tbrethou Date: Wed May 21 23:58:33 2008 New Revision: 51412 URL: http://llvm.org/viewvc/llvm-project?rev=51412&view=rev Log: Merge from mainline. uppress gcc3.4.6's warnings Modified: llvm/branches/release_23/lib/Analysis/ConstantFolding.cpp Modified: llvm/branches/release_23/lib/Analysis/ConstantFolding.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_23/lib/Analysis/ConstantFolding.cpp?rev=51412&r1=51411&r2=51412&view=diff ============================================================================== --- llvm/branches/release_23/lib/Analysis/ConstantFolding.cpp (original) +++ llvm/branches/release_23/lib/Analysis/ConstantFolding.cpp Wed May 21 23:58:33 2008 @@ -602,6 +602,7 @@ if (Ty == Type::DoubleTy) return ConstantFP::get(APFloat(V)); assert(0 && "Can only constant fold float/double"); + return 0; // dummy return to suppress warning } static Constant *ConstantFoldBinaryFP(double (*NativeFP)(double, double), @@ -619,6 +620,7 @@ if (Ty == Type::DoubleTy) return ConstantFP::get(APFloat(V)); assert(0 && "Can only constant fold float/double"); + return 0; // dummy return to suppress warning } /// ConstantFoldCall - Attempt to constant fold a call to the specified function From tonic at nondot.org Thu May 22 00:10:20 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 05:10:20 -0000 Subject: [llvm-commits] [llvm] r51413 - /llvm/branches/release_23/test/LLVMC/dg.exp Message-ID: <200805220510.m4M5AKdK009401@zion.cs.uiuc.edu> Author: tbrethou Date: Thu May 22 00:10:20 2008 New Revision: 51413 URL: http://llvm.org/viewvc/llvm-project?rev=51413&view=rev Log: Merge from mainline. Check if llvm-gcc is available before running tests. Patch by Matthijs Kooijman! Modified: llvm/branches/release_23/test/LLVMC/dg.exp Modified: llvm/branches/release_23/test/LLVMC/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_23/test/LLVMC/dg.exp?rev=51413&r1=51412&r2=51413&view=diff ============================================================================== --- llvm/branches/release_23/test/LLVMC/dg.exp (original) +++ llvm/branches/release_23/test/LLVMC/dg.exp Thu May 22 00:10:20 2008 @@ -1,3 +1,10 @@ load_lib llvm.exp -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{c,cpp}]] +if [ llvm_gcc_supports c ] then { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{c}]] +} + +if [ llvm_gcc_supports c++ ] then { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{cpp}]] +} + From tonic at nondot.org Thu May 22 00:11:45 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 05:11:45 -0000 Subject: [llvm-commits] [test-suite] r51414 - /test-suite/branches/release_23/RunSafely.sh Message-ID: <200805220511.m4M5BjnB009451@zion.cs.uiuc.edu> Author: tbrethou Date: Thu May 22 00:11:45 2008 New Revision: 51414 URL: http://llvm.org/viewvc/llvm-project?rev=51414&view=rev Log: Merge from mainline. Modified: test-suite/branches/release_23/RunSafely.sh Modified: test-suite/branches/release_23/RunSafely.sh URL: http://llvm.org/viewvc/llvm-project/test-suite/branches/release_23/RunSafely.sh?rev=51414&r1=51413&r2=51414&view=diff ============================================================================== --- test-suite/branches/release_23/RunSafely.sh (original) +++ test-suite/branches/release_23/RunSafely.sh Thu May 22 00:11:45 2008 @@ -105,7 +105,7 @@ fi if [ "x$RHOST" = x ] ; then - ( sh -c "$ULIMITCMD time -p $COMMAND >$OUTFILE 2>&1 < $INFILE; echo exit \$?" ) 2>&1 \ + ( sh -c "$ULIMITCMD time -p sh -c '$COMMAND >$OUTFILE 2>&1 < $INFILE; echo exit \$?'" ) 2>&1 \ | awk -- '\ BEGIN { cpu = 0.0; } /^user/ { cpu += $2; print; } From tonic at nondot.org Thu May 22 00:16:47 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 05:16:47 -0000 Subject: [llvm-commits] [llvm] r51415 - /llvm/branches/release_23/lib/VMCore/InlineAsm.cpp Message-ID: <200805220516.m4M5GlXq009596@zion.cs.uiuc.edu> Author: tbrethou Date: Thu May 22 00:16:47 2008 New Revision: 51415 URL: http://llvm.org/viewvc/llvm-project?rev=51415&view=rev Log: Merge from mainline. Fix PR2267, by allowing indirect outputs to be intermixed with normal outputs. Testcase here: test/CodeGen/X86/asm-indirect-mem.ll Modified: llvm/branches/release_23/lib/VMCore/InlineAsm.cpp Modified: llvm/branches/release_23/lib/VMCore/InlineAsm.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_23/lib/VMCore/InlineAsm.cpp?rev=51415&r1=51414&r2=51415&view=diff ============================================================================== --- llvm/branches/release_23/lib/VMCore/InlineAsm.cpp (original) +++ llvm/branches/release_23/lib/VMCore/InlineAsm.cpp Thu May 22 00:16:47 2008 @@ -183,15 +183,18 @@ if (Constraints.empty() && !ConstStr.empty()) return false; unsigned NumOutputs = 0, NumInputs = 0, NumClobbers = 0; + unsigned NumIndirect = 0; for (unsigned i = 0, e = Constraints.size(); i != e; ++i) { switch (Constraints[i].Type) { case InlineAsm::isOutput: + if ((NumInputs-NumIndirect) != 0 || NumClobbers != 0) + return false; // outputs before inputs and clobbers. if (!Constraints[i].isIndirect) { - if (NumInputs || NumClobbers) return false; // outputs come first. ++NumOutputs; break; } + ++NumIndirect; // FALLTHROUGH for Indirect Outputs. case InlineAsm::isInput: if (NumClobbers) return false; // inputs before clobbers. From tonic at nondot.org Thu May 22 00:20:32 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 05:20:32 -0000 Subject: [llvm-commits] [llvm] r51416 - /llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td Message-ID: <200805220520.m4M5KW2M009832@zion.cs.uiuc.edu> Author: tbrethou Date: Thu May 22 00:20:31 2008 New Revision: 51416 URL: http://llvm.org/viewvc/llvm-project?rev=51416&view=rev Log: Merge from mainline. Modified: llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td Modified: llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td?rev=51416&r1=51415&r2=51416&view=diff ============================================================================== --- llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/branches/release_23/lib/Target/X86/X86InstrSSE.td Thu May 22 00:20:31 2008 @@ -1015,7 +1015,7 @@ [(set VR128:$dst, (v4f32 (X86vzmovl (v4f32 (scalar_to_vector (loadf32 addr:$src))))))]>; -def : Pat<(v4f32 (X86vzmovl (memopv4f32 addr:$src))), +def : Pat<(v4f32 (X86vzmovl (loadv4f32 addr:$src))), (MOVZSS2PSrm addr:$src)>; //===----------------------------------------------------------------------===// @@ -2273,7 +2273,9 @@ (v2f64 (X86vzmovl (v2f64 (scalar_to_vector (loadf64 addr:$src))))))]>; -def : Pat<(v2f64 (X86vzmovl (memopv2f64 addr:$src))), +def : Pat<(v2f64 (X86vzmovl (loadv2f64 addr:$src))), + (MOVZSD2PDrm addr:$src)>; +def : Pat<(v2f64 (X86vzmovl (bc_v2f64 (loadv4f32 addr:$src)))), (MOVZSD2PDrm addr:$src)>; def : Pat<(v2f64 (X86vzload addr:$src)), (MOVZSD2PDrm addr:$src)>; } @@ -2315,13 +2317,17 @@ [(set VR128:$dst, (v2i64 (X86vzmovl (v2i64 VR128:$src))))]>, XS, Requires<[HasSSE2]>; -let AddedComplexity = 20 in +let AddedComplexity = 20 in { def MOVZPQILo2PQIrm : I<0x7E, MRMSrcMem, (outs VR128:$dst), (ins i128mem:$src), "movq\t{$src, $dst|$dst, $src}", [(set VR128:$dst, (v2i64 (X86vzmovl - (memopv2i64 addr:$src))))]>, + (loadv2i64 addr:$src))))]>, XS, Requires<[HasSSE2]>; +def : Pat<(v2i64 (X86vzmovl (bc_v2i64 (loadv4i32 addr:$src)))), + (MOVZPQILo2PQIrm addr:$src)>; +} + //===----------------------------------------------------------------------===// // SSE3 Instructions //===----------------------------------------------------------------------===// From tonic at nondot.org Thu May 22 00:24:59 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 05:24:59 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r51417 - /llvm-gcc-4.2/branches/release_23/gcc/config/freebsd-spec.h Message-ID: <200805220525.m4M5P0GU010100@zion.cs.uiuc.edu> Author: tbrethou Date: Thu May 22 00:24:59 2008 New Revision: 51417 URL: http://llvm.org/viewvc/llvm-project?rev=51417&view=rev Log: Merge from mainline. Modified: llvm-gcc-4.2/branches/release_23/gcc/config/freebsd-spec.h Modified: llvm-gcc-4.2/branches/release_23/gcc/config/freebsd-spec.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/release_23/gcc/config/freebsd-spec.h?rev=51417&r1=51416&r2=51417&view=diff ============================================================================== --- llvm-gcc-4.2/branches/release_23/gcc/config/freebsd-spec.h (original) +++ llvm-gcc-4.2/branches/release_23/gcc/config/freebsd-spec.h Thu May 22 00:24:59 2008 @@ -48,8 +48,6 @@ || !strcmp ((STR), "soname") || !strcmp ((STR), "defsym") \ || !strcmp ((STR), "assert") || !strcmp ((STR), "dynamic-linker")) -/* LLVM LOCAL begin */ -#ifndef ENABLE_LLVM #define FBSD_TARGET_OS_CPP_BUILTINS() \ do \ { \ @@ -62,32 +60,6 @@ FBSD_TARGET_CPU_CPP_BUILTINS(); \ } \ while (0) -#else -#define FBSD_TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - if (FBSD_MAJOR == 7) \ - builtin_define ("__FreeBSD__=7"); \ - else if (FBSD_MAJOR == 6) \ - builtin_define ("__FreeBSD__=6"); \ - else if (FBSD_MAJOR == 5) \ - builtin_define ("__FreeBSD__=5"); \ - else if (FBSD_MAJOR == 4) \ - builtin_define ("__FreeBSD__=4"); \ - else if (FBSD_MAJOR == 3) \ - builtin_define ("__FreeBSD__=3"); \ - else \ - builtin_define ("__FreeBSD__"); \ - builtin_define_std ("unix"); \ - builtin_define ("__KPRINTF_ATTRIBUTE__"); \ - builtin_assert ("system=unix"); \ - builtin_assert ("system=bsd"); \ - builtin_assert ("system=FreeBSD"); \ - FBSD_TARGET_CPU_CPP_BUILTINS(); \ - } \ - while (0) -#endif -/* LLVM LOCAL end */ /* Define the default FreeBSD-specific per-CPU hook code. */ #define FBSD_TARGET_CPU_CPP_BUILTINS() do {} while (0) From tonic at nondot.org Thu May 22 00:29:32 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 05:29:32 -0000 Subject: [llvm-commits] [test-suite] r51418 - in /test-suite/branches/release_23: External/SPEC/CFP2006/444.namd/ External/SPEC/CFP2006/447.dealII/ External/SPEC/CFP2006/450.soplex/ External/SPEC/CFP2006/453.povray/ External/SPEC/CINT2000/252.eon/ External/SPEC/CINT2006/471.omnetpp/ External/SPEC/CINT2006/473.astar/ External/SPEC/CINT2006/483.xalancbmk/ SingleSource/Regression/C++/ SingleSource/Regression/C++/EH/ SingleSource/UnitTests/Integer/ SingleSource/UnitTests/SetjmpLongjmp/C++/ Message-ID: <200805220529.m4M5TXBc010344@zion.cs.uiuc.edu> Author: tbrethou Date: Thu May 22 00:29:32 2008 New Revision: 51418 URL: http://llvm.org/viewvc/llvm-project?rev=51418&view=rev Log: Merge from mainline. Move definition of LDFLAGS ahead of the include that uses it. Modified: test-suite/branches/release_23/External/SPEC/CFP2006/444.namd/Makefile test-suite/branches/release_23/External/SPEC/CFP2006/447.dealII/Makefile test-suite/branches/release_23/External/SPEC/CFP2006/450.soplex/Makefile test-suite/branches/release_23/External/SPEC/CFP2006/453.povray/Makefile test-suite/branches/release_23/External/SPEC/CINT2000/252.eon/Makefile test-suite/branches/release_23/External/SPEC/CINT2006/471.omnetpp/Makefile test-suite/branches/release_23/External/SPEC/CINT2006/473.astar/Makefile test-suite/branches/release_23/External/SPEC/CINT2006/483.xalancbmk/Makefile test-suite/branches/release_23/SingleSource/Regression/C++/EH/Makefile test-suite/branches/release_23/SingleSource/Regression/C++/Makefile test-suite/branches/release_23/SingleSource/UnitTests/Integer/Makefile test-suite/branches/release_23/SingleSource/UnitTests/SetjmpLongjmp/C++/Makefile Modified: test-suite/branches/release_23/External/SPEC/CFP2006/444.namd/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/branches/release_23/External/SPEC/CFP2006/444.namd/Makefile?rev=51418&r1=51417&r2=51418&view=diff ============================================================================== --- test-suite/branches/release_23/External/SPEC/CFP2006/444.namd/Makefile (original) +++ test-suite/branches/release_23/External/SPEC/CFP2006/444.namd/Makefile Thu May 22 00:29:32 2008 @@ -8,10 +8,11 @@ FP_ABSTOLERANCE = 0.00001 -include ../../Makefile.spec2006 RUN_OPTIONS = --input namd.input --iterations 1 --output namd.out STDOUT_FILENAME := namd.out LDFLAGS = -lstdc++ -lm LIBS = -lm + +include ../../Makefile.spec2006 Modified: test-suite/branches/release_23/External/SPEC/CFP2006/447.dealII/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/branches/release_23/External/SPEC/CFP2006/447.dealII/Makefile?rev=51418&r1=51417&r2=51418&view=diff ============================================================================== --- test-suite/branches/release_23/External/SPEC/CFP2006/447.dealII/Makefile (original) +++ test-suite/branches/release_23/External/SPEC/CFP2006/447.dealII/Makefile Thu May 22 00:29:32 2008 @@ -13,8 +13,6 @@ -DBOOST_DISABLE_THREADS \ -I$(SPEC_BENCH_DIR)/src/include -include ../../Makefile.spec2006 - ifeq ($(RUN_TYPE),test) RUN_OPTIONS := 8 else @@ -25,3 +23,5 @@ LDFLAGS = -lstdc++ -lm LIBS = -lm + +include ../../Makefile.spec2006 Modified: test-suite/branches/release_23/External/SPEC/CFP2006/450.soplex/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/branches/release_23/External/SPEC/CFP2006/450.soplex/Makefile?rev=51418&r1=51417&r2=51418&view=diff ============================================================================== --- test-suite/branches/release_23/External/SPEC/CFP2006/450.soplex/Makefile (original) +++ test-suite/branches/release_23/External/SPEC/CFP2006/450.soplex/Makefile Thu May 22 00:29:32 2008 @@ -8,8 +8,6 @@ FP_ABSTOLERANCE = 1.0e-5 -include ../../Makefile.spec2006 - CPPFLAGS += -DNDEBUG ifeq ($(RUN_TYPE),test) @@ -24,3 +22,5 @@ LDFLAGS = -lstdc++ -lm LIBS = -lstdc++ -lm + +include ../../Makefile.spec2006 Modified: test-suite/branches/release_23/External/SPEC/CFP2006/453.povray/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/branches/release_23/External/SPEC/CFP2006/453.povray/Makefile?rev=51418&r1=51417&r2=51418&view=diff ============================================================================== --- test-suite/branches/release_23/External/SPEC/CFP2006/453.povray/Makefile (original) +++ test-suite/branches/release_23/External/SPEC/CFP2006/453.povray/Makefile Thu May 22 00:29:32 2008 @@ -8,8 +8,6 @@ FP_ABSTOLERANCE = 0 -include ../../Makefile.spec2006 - ifeq ($(RUN_TYPE),test) FP_TOLERANCE = 0.0002 RUN_OPTIONS = SPEC-benchmark-test @@ -22,3 +20,6 @@ LDFLAGS = -lstdc++ -lm LIBS = -lstdc++ -lm + +include ../../Makefile.spec2006 + Modified: test-suite/branches/release_23/External/SPEC/CINT2000/252.eon/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/branches/release_23/External/SPEC/CINT2000/252.eon/Makefile?rev=51418&r1=51417&r2=51418&view=diff ============================================================================== --- test-suite/branches/release_23/External/SPEC/CINT2000/252.eon/Makefile (original) +++ test-suite/branches/release_23/External/SPEC/CINT2000/252.eon/Makefile Thu May 22 00:29:32 2008 @@ -60,7 +60,6 @@ mrInstance.cc mrMaterial.cc mrPhongAreaTriangleLuminaire.cc \ mrSolidTexture.cc mrSphere.cc mrSurface.cc mrSurfaceTexture.cc \ mrXYRectangle.cc mrXZRectangle.cc mrYZRectangle.cc myrand.cc) -include ../../Makefile.spec2000 # Yes, we know this is an old crufty C++ benchmark. Don't tell us about it GCC! CXXFLAGS += -fno-exceptions -Wno-deprecated -Wno-non-template-friend @@ -68,3 +67,5 @@ LDFLAGS = -lstdc++ -lm LIBS = -lm +include ../../Makefile.spec2000 + Modified: test-suite/branches/release_23/External/SPEC/CINT2006/471.omnetpp/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/branches/release_23/External/SPEC/CINT2006/471.omnetpp/Makefile?rev=51418&r1=51417&r2=51418&view=diff ============================================================================== --- test-suite/branches/release_23/External/SPEC/CINT2006/471.omnetpp/Makefile (original) +++ test-suite/branches/release_23/External/SPEC/CINT2006/471.omnetpp/Makefile Thu May 22 00:29:32 2008 @@ -56,14 +56,14 @@ -I$(SPEC_BENCH_DIR)/src \ -I$(SPEC_BENCH_DIR)/src/include -include ../../Makefile.spec2006 - RUN_OPTIONS = omnetpp.ini STDOUT_FILENAME := omnetpp.log LDFLAGS = -lstdc++ -lm LIBS = -lm +include ../../Makefile.spec2006 + ##===----------------------------------------------------------------------===## # Copy the source files to the working directory. Some files may have # the same names but are in different directories, so we add a prefix Modified: test-suite/branches/release_23/External/SPEC/CINT2006/473.astar/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/branches/release_23/External/SPEC/CINT2006/473.astar/Makefile?rev=51418&r1=51417&r2=51418&view=diff ============================================================================== --- test-suite/branches/release_23/External/SPEC/CINT2006/473.astar/Makefile (original) +++ test-suite/branches/release_23/External/SPEC/CINT2006/473.astar/Makefile Thu May 22 00:29:32 2008 @@ -8,8 +8,6 @@ FP_TOLERANCE = 0.001 -include ../../Makefile.spec2006 - ifeq ($(ENDIAN),big) CPPFLAGS += -DSPEC_CPU_BIG_ENDIAN else @@ -26,3 +24,6 @@ LDFLAGS = -lstdc++ -lm LIBS = -lm + +include ../../Makefile.spec2006 + Modified: test-suite/branches/release_23/External/SPEC/CINT2006/483.xalancbmk/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/branches/release_23/External/SPEC/CINT2006/483.xalancbmk/Makefile?rev=51418&r1=51417&r2=51418&view=diff ============================================================================== --- test-suite/branches/release_23/External/SPEC/CINT2006/483.xalancbmk/Makefile (original) +++ test-suite/branches/release_23/External/SPEC/CINT2006/483.xalancbmk/Makefile Thu May 22 00:29:32 2008 @@ -19,8 +19,6 @@ -I$(SPEC_BENCH_DIR)/src/xercesc/util/Transcoders/Iconv \ -I$(SPEC_BENCH_DIR)/src/xalanc/include -include ../../Makefile.spec2006 - ifeq ($(OS),Darwin) CPPFLAGS += -DSPEC_CPU_MACOSX endif @@ -35,3 +33,6 @@ LDFLAGS = -lstdc++ -lm LIBS = -lstdc++ -lm + +include ../../Makefile.spec2006 + Modified: test-suite/branches/release_23/SingleSource/Regression/C++/EH/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/branches/release_23/SingleSource/Regression/C%2B%2B/EH/Makefile?rev=51418&r1=51417&r2=51418&view=diff ============================================================================== --- test-suite/branches/release_23/SingleSource/Regression/C++/EH/Makefile (original) +++ test-suite/branches/release_23/SingleSource/Regression/C++/EH/Makefile Thu May 22 00:29:32 2008 @@ -1,6 +1,6 @@ LEVEL = ../../../.. REQUIRES_EH_SUPPORT = 1 -include $(LEVEL)/SingleSource/Makefile.singlesrc CFLAGS += -std=c99 LDFLAGS += -lstdc++ +include $(LEVEL)/SingleSource/Makefile.singlesrc Modified: test-suite/branches/release_23/SingleSource/Regression/C++/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/branches/release_23/SingleSource/Regression/C%2B%2B/Makefile?rev=51418&r1=51417&r2=51418&view=diff ============================================================================== --- test-suite/branches/release_23/SingleSource/Regression/C++/Makefile (original) +++ test-suite/branches/release_23/SingleSource/Regression/C++/Makefile Thu May 22 00:29:32 2008 @@ -6,6 +6,6 @@ # LEVEL = ../../.. DIRS=EH -include $(LEVEL)/SingleSource/Makefile.singlesrc CFLAGS += -std=c99 LDFLAGS += -lstdc++ +include $(LEVEL)/SingleSource/Makefile.singlesrc Modified: test-suite/branches/release_23/SingleSource/UnitTests/Integer/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/branches/release_23/SingleSource/UnitTests/Integer/Makefile?rev=51418&r1=51417&r2=51418&view=diff ============================================================================== --- test-suite/branches/release_23/SingleSource/UnitTests/Integer/Makefile (original) +++ test-suite/branches/release_23/SingleSource/UnitTests/Integer/Makefile Thu May 22 00:29:32 2008 @@ -32,9 +32,9 @@ USE_REFERENCE_OUTPUT := 1 -include $(LEVEL)/SingleSource/Makefile.singlesrc LDFLAGS += -lstdc++ ifeq (1,$(ENABLE_LARGE_INTEGERS)) CPPFLAGS += -DENABLE_LARGE_INTEGERS endif +include $(LEVEL)/SingleSource/Makefile.singlesrc Modified: test-suite/branches/release_23/SingleSource/UnitTests/SetjmpLongjmp/C++/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/branches/release_23/SingleSource/UnitTests/SetjmpLongjmp/C%2B%2B/Makefile?rev=51418&r1=51417&r2=51418&view=diff ============================================================================== --- test-suite/branches/release_23/SingleSource/UnitTests/SetjmpLongjmp/C++/Makefile (original) +++ test-suite/branches/release_23/SingleSource/UnitTests/SetjmpLongjmp/C++/Makefile Thu May 22 00:29:32 2008 @@ -1,5 +1,5 @@ # SingleSource/UnitTests/SetjmpLongjmp/Makefile LEVEL = ../../../.. REQUIRES_EH_SUPPORT = 1 -include $(LEVEL)/SingleSource/Makefile.singlesrc LDFLAGS += -lstdc++ +include $(LEVEL)/SingleSource/Makefile.singlesrc From tonic at nondot.org Thu May 22 01:02:55 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 06:02:55 -0000 Subject: [llvm-commits] [llvm] r51419 - /llvm/branches/release_23/test/C++Frontend/2008-02-13-sret.cpp Message-ID: <200805220602.m4M62u9l011339@zion.cs.uiuc.edu> Author: tbrethou Date: Thu May 22 01:02:55 2008 New Revision: 51419 URL: http://llvm.org/viewvc/llvm-project?rev=51419&view=rev Log: Merge from mainline. Modified: llvm/branches/release_23/test/C++Frontend/2008-02-13-sret.cpp Modified: llvm/branches/release_23/test/C++Frontend/2008-02-13-sret.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_23/test/C%2B%2BFrontend/2008-02-13-sret.cpp?rev=51419&r1=51418&r2=51419&view=diff ============================================================================== --- llvm/branches/release_23/test/C++Frontend/2008-02-13-sret.cpp (original) +++ llvm/branches/release_23/test/C++Frontend/2008-02-13-sret.cpp Thu May 22 01:02:55 2008 @@ -1,5 +1,4 @@ -// RUN: %llvmgxx -S -O0 -m32 -emit-llvm %s -o - | grep {retval\\|memtmp} | \ -// RUN: grep S242 | grep {i32 1} | count 1 +// RUN: %llvmgxx -S -O1 -m32 -emit-llvm %s -o - | grep {store i32} | count 1 // Test that all 8 bytes of ret in check242 are copied, and only 4 bytes of // ret in check93 are copied (the same LLVM struct is used for both). From baldrick at free.fr Thu May 22 01:10:14 2008 From: baldrick at free.fr (Duncan Sands) Date: Thu, 22 May 2008 08:10:14 +0200 Subject: [llvm-commits] [llvm] r51419 - /llvm/branches/release_23/test/C++Frontend/2008-02-13-sret.cpp In-Reply-To: <200805220602.m4M62u9l011339@zion.cs.uiuc.edu> References: <200805220602.m4M62u9l011339@zion.cs.uiuc.edu> Message-ID: <200805220810.14821.baldrick@free.fr> Hi Tanya, I think you should also apply r51167: r51167 | johannes | 2008-05-16 00:23:54 +0200 (Fri, 16 May 2008) | 4 lines Remove the S92 code, which really has nothing to do with what the test is testing; makes it pass again on ppc32. From sabre at nondot.org Thu May 22 01:19:38 2008 From: sabre at nondot.org (Chris Lattner) Date: Thu, 22 May 2008 06:19:38 -0000 Subject: [llvm-commits] [llvm] r51420 - in /llvm/trunk: lib/Target/CBackend/CBackend.cpp test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll Message-ID: <200805220619.m4M6Jce1011890@zion.cs.uiuc.edu> Author: lattner Date: Thu May 22 01:19:37 2008 New Revision: 51420 URL: http://llvm.org/viewvc/llvm-project?rev=51420&view=rev Log: Add support for multiple-return values in inline asm. This should get inline asm working as well as it did previously with the CBE with the new MRV support for inline asm. Added: llvm/trunk/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=51420&r1=51419&r2=51420&view=diff ============================================================================== --- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original) +++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Thu May 22 01:19:37 2008 @@ -2598,11 +2598,8 @@ } void CWriter::visitCallInst(CallInst &I) { - //check if we have inline asm - if (isInlineAsm(I)) { - visitInlineAsm(I); - return; - } + if (isa(I.getOperand(0))) + return visitInlineAsm(I); bool WroteCallee = false; @@ -2920,53 +2917,64 @@ InlineAsm* as = cast(CI.getOperand(0)); std::vector Constraints = as->ParseConstraints(); std::vector > Input; - std::vector > Output; + std::vector > > Output; std::string Clobber; - int count = CI.getType() == Type::VoidTy ? 1 : 0; + unsigned ValueCount = 0; + + std::vector > ResultVals; + if (CI.getType() == Type::VoidTy) + ; + else if (const StructType *ST = dyn_cast(CI.getType())) { + for (unsigned i = 0, e = ST->getNumElements(); i != e; ++i) + ResultVals.push_back(std::make_pair(&CI, (int)i)); + } else { + ResultVals.push_back(std::make_pair(&CI, -1)); + } + for (std::vector::iterator I = Constraints.begin(), E = Constraints.end(); I != E; ++I) { assert(I->Codes.size() == 1 && "Too many asm constraint codes to handle"); - std::string c = - InterpretASMConstraint(*I); - switch(I->Type) { - default: - assert(0 && "Unknown asm constraint"); - break; + std::string C = InterpretASMConstraint(*I); + if (C.empty()) continue; + + switch (I->Type) { + default: assert(0 && "Unknown asm constraint"); case InlineAsm::isInput: { - if (c.size()) { - Input.push_back(std::make_pair(c, count ? CI.getOperand(count) : &CI)); - ++count; //consume arg - } + assert(ValueCount >= ResultVals.size() && "Input can't refer to result"); + Value *V = CI.getOperand(ValueCount-ResultVals.size()); + Input.push_back(std::make_pair(C, V)); break; } case InlineAsm::isOutput: { - if (c.size()) { - Output.push_back(std::make_pair("="+((I->isEarlyClobber ? "&" : "")+c), - count ? CI.getOperand(count) : &CI)); - ++count; //consume arg - } - break; - } - case InlineAsm::isClobber: { - if (c.size()) - Clobber += ",\"" + c + "\""; + std::pair V; + if (ValueCount < ResultVals.size()) + V = ResultVals[ValueCount]; + else + V = std::make_pair(CI.getOperand(ValueCount-ResultVals.size()), -1); + Output.push_back(std::make_pair("="+((I->isEarlyClobber ? "&" : "")+C), + V)); break; } + case InlineAsm::isClobber: + Clobber += ",\"" + C + "\""; + continue; // Not an actual argument. } + ++ValueCount; // Consumes an argument. } - //fix up the asm string for gcc + // Fix up the asm string for gcc. std::string asmstr = gccifyAsm(as->getAsmString()); Out << "__asm__ volatile (\"" << asmstr << "\"\n"; Out << " :"; - for (std::vector >::iterator I =Output.begin(), - E = Output.end(); I != E; ++I) { - Out << "\"" << I->first << "\"("; - writeOperandRaw(I->second); + for (unsigned i = 0, e = Output.size(); i != e; ++i) { + if (i) + Out << ", "; + Out << "\"" << Output[i].first << "\"("; + writeOperandRaw(Output[i].second.first); + if (Output[i].second.second != -1) + Out << ".field" << Output[i].second.second; // Multiple retvals. Out << ")"; - if (I + 1 != E) - Out << ","; } Out << "\n :"; for (std::vector >::iterator I = Input.begin(), Added: llvm/trunk/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll?rev=51420&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll (added) +++ llvm/trunk/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll Thu May 22 01:19:37 2008 @@ -0,0 +1,19 @@ +; RUN: llvm-as < %s | llc -march=c + +declare {i32, i32} @foo() + +define i32 @test() { + %A = call {i32, i32} @foo() + %B = getresult {i32, i32} %A, 0 + %C = getresult {i32, i32} %A, 1 + %D = add i32 %B, %C + ret i32 %D +} + +define i32 @test2() { + %A = call {i32, i32} asm sideeffect "...", "={cx},={di},~{dirflag},~{fpsr},~{flags},~{memory}"() + %B = getresult {i32, i32} %A, 0 + %C = getresult {i32, i32} %A, 1 + %D = add i32 %B, %C + ret i32 %D +} From tonic at nondot.org Thu May 22 01:22:16 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 06:22:16 -0000 Subject: [llvm-commits] [llvm] r51421 - /llvm/branches/release_23/test/C++Frontend/2008-02-13-sret.cpp Message-ID: <200805220622.m4M6MGP0011985@zion.cs.uiuc.edu> Author: tbrethou Date: Thu May 22 01:22:16 2008 New Revision: 51421 URL: http://llvm.org/viewvc/llvm-project?rev=51421&view=rev Log: Merge from mainline. Modified: llvm/branches/release_23/test/C++Frontend/2008-02-13-sret.cpp Modified: llvm/branches/release_23/test/C++Frontend/2008-02-13-sret.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_23/test/C%2B%2BFrontend/2008-02-13-sret.cpp?rev=51421&r1=51420&r2=51421&view=diff ============================================================================== --- llvm/branches/release_23/test/C++Frontend/2008-02-13-sret.cpp (original) +++ llvm/branches/release_23/test/C++Frontend/2008-02-13-sret.cpp Thu May 22 01:22:16 2008 @@ -6,13 +6,6 @@ typedef __builtin_va_list va_list; typedef unsigned long size_t; void *memset(void *, int, size_t); -struct S92 { int a:14; } ; - extern struct S92 s92; - - struct S92 check92 () { struct S92 ret; - memset (&ret, 0, sizeof (ret)); - ret.a = s92.a; - return ret; } struct S93 { __attribute__((aligned (8))) void * a; } ; extern struct S93 s93; From tonic at nondot.org Thu May 22 01:24:07 2008 From: tonic at nondot.org (Tanya Lattner) Date: Wed, 21 May 2008 23:24:07 -0700 Subject: [llvm-commits] [llvm] r51419 - /llvm/branches/release_23/test/C++Frontend/2008-02-13-sret.cpp In-Reply-To: <200805220810.14821.baldrick@free.fr> References: <200805220602.m4M62u9l011339@zion.cs.uiuc.edu> <200805220810.14821.baldrick@free.fr> Message-ID: Done. On May 21, 2008, at 11:10 PM, Duncan Sands wrote: > Hi Tanya, I think you should also apply r51167: > > r51167 | johannes | 2008-05-16 00:23:54 +0200 (Fri, 16 May 2008) | > 4 lines > > Remove the S92 code, which really has nothing to do > with what the test is testing; makes it pass again on ppc32. From sabre at nondot.org Thu May 22 01:29:39 2008 From: sabre at nondot.org (Chris Lattner) Date: Thu, 22 May 2008 06:29:39 -0000 Subject: [llvm-commits] [llvm] r51422 - /llvm/trunk/lib/Target/CBackend/CBackend.cpp Message-ID: <200805220629.m4M6TdE2012184@zion.cs.uiuc.edu> Author: lattner Date: Thu May 22 01:29:38 2008 New Revision: 51422 URL: http://llvm.org/viewvc/llvm-project?rev=51422&view=rev Log: fix an off-by-one error in my previous patch, don't treat the callee as a incoming arg. Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=51422&r1=51421&r2=51422&view=diff ============================================================================== --- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original) +++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Thu May 22 01:29:38 2008 @@ -2941,7 +2941,7 @@ default: assert(0 && "Unknown asm constraint"); case InlineAsm::isInput: { assert(ValueCount >= ResultVals.size() && "Input can't refer to result"); - Value *V = CI.getOperand(ValueCount-ResultVals.size()); + Value *V = CI.getOperand(ValueCount-ResultVals.size()+1); Input.push_back(std::make_pair(C, V)); break; } @@ -2950,7 +2950,7 @@ if (ValueCount < ResultVals.size()) V = ResultVals[ValueCount]; else - V = std::make_pair(CI.getOperand(ValueCount-ResultVals.size()), -1); + V = std::make_pair(CI.getOperand(ValueCount-ResultVals.size()+1), -1); Output.push_back(std::make_pair("="+((I->isEarlyClobber ? "&" : "")+C), V)); break; @@ -2970,20 +2970,19 @@ for (unsigned i = 0, e = Output.size(); i != e; ++i) { if (i) Out << ", "; - Out << "\"" << Output[i].first << "\"("; - writeOperandRaw(Output[i].second.first); + Out << "\"" << Output[i].first << "\"(" + << GetValueName(Output[i].second.first); if (Output[i].second.second != -1) Out << ".field" << Output[i].second.second; // Multiple retvals. Out << ")"; } Out << "\n :"; - for (std::vector >::iterator I = Input.begin(), - E = Input.end(); I != E; ++I) { - Out << "\"" << I->first << "\"("; - writeOperandRaw(I->second); + for (unsigned i = 0, e = Input.size(); i != e; ++i) { + if (i) + Out << ", "; + Out << "\"" << Input[i].first << "\"("; + writeOperand(Input[i].second); Out << ")"; - if (I + 1 != E) - Out << ","; } if (Clobber.size()) Out << "\n :" << Clobber.substr(1); From baldrick at free.fr Thu May 22 01:31:29 2008 From: baldrick at free.fr (Duncan Sands) Date: Thu, 22 May 2008 08:31:29 +0200 Subject: [llvm-commits] [llvm] r51134 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2003-11-13-ConstExprCastCall.ll test/Transforms/InstCombine/fp-ret-bitcast.ll In-Reply-To: <33E479E1-2158-4AE6-B151-60D187AA4486@apple.com> References: <200805142245.m4EMjLeT027312@zion.cs.uiuc.edu> <200805161716.03658.baldrick@free.fr> <33E479E1-2158-4AE6-B151-60D187AA4486@apple.com> Message-ID: <200805220831.29672.baldrick@free.fr> Hi Chris, > >>> in your example you can see the function definition (and not just > >>> a declaration), so doing the transform only when you have the > >>> declaration of the callee to hand would be ok for this example. > >> > >> Ah right, good call. For declarations, I think the only cases that > >> matter are things like simplifylibcalls, when the libcall didn't have > >> the right prototype. I'm not sure how much this matters. > > > > maybe those would be cleaned by my globalopt transform :) > > Why put this in globalopt? The form that changes the call is is a > local/peephole xform, and instcombine is run much more often. > > >>> PS: I just chucked some code into GlobalOpt that teaches it to > >>> change > >>> the type of a declaration if the only use is a bitcast to a function > >>> type. It seems to work! This transforms the objc testcase to: > >> > >> The problem is that this objc function can return float, double, and > >> long double depend on the callee :) > > > > If it is called in several different ways in the same module then > > indeed > > there's not much you can do. Still, I can't help feeling this > > transform > > is useful since I can imagine that quite often people have code in > > which > > some bogus declaration is used but each call calls it in the > > "correct" way. > > I don't see the compelling reason to do this. What use case does it > help? the main reason was that it amused me to write this! You are right that it is essentially useless: while it does fire during the gcc build, it does so very very rarely. How about I change the instcombine transform to only change calls when the declaration of the callee is visible, and leave it at that? Ciao, Duncan. From clattner at apple.com Thu May 22 01:35:45 2008 From: clattner at apple.com (Chris Lattner) Date: Wed, 21 May 2008 23:35:45 -0700 Subject: [llvm-commits] [llvm] r51134 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2003-11-13-ConstExprCastCall.ll test/Transforms/InstCombine/fp-ret-bitcast.ll In-Reply-To: <200805220831.29672.baldrick@free.fr> References: <200805142245.m4EMjLeT027312@zion.cs.uiuc.edu> <200805161716.03658.baldrick@free.fr> <33E479E1-2158-4AE6-B151-60D187AA4486@apple.com> <200805220831.29672.baldrick@free.fr> Message-ID: <1D264DCA-5A0A-428D-A967-F06B49BA8B1E@apple.com> On May 21, 2008, at 11:31 PM, Duncan Sands wrote: >>> If it is called in several different ways in the same module then >>> indeed >>> there's not much you can do. Still, I can't help feeling this >>> transform >>> is useful since I can imagine that quite often people have code in >>> which >>> some bogus declaration is used but each call calls it in the >>> "correct" way. >> >> I don't see the compelling reason to do this. What use case does it >> help? > > the main reason was that it amused me to write this! You are right > that it is essentially useless: while it does fire during the gcc > build, it does so very very rarely. How about I change the > instcombine > transform to only change calls when the declaration of the callee is > visible, and leave it at that? Seems reasonable to me. Please watch the testers for any perf regressions the day after though. -Chris From ggreif at gmail.com Thu May 22 01:43:33 2008 From: ggreif at gmail.com (Gabor Greif) Date: Thu, 22 May 2008 06:43:33 -0000 Subject: [llvm-commits] [llvm] r51423 - /llvm/trunk/lib/Analysis/ConstantFolding.cpp Message-ID: <200805220643.m4M6hXue012616@zion.cs.uiuc.edu> Author: ggreif Date: Thu May 22 01:43:33 2008 New Revision: 51423 URL: http://llvm.org/viewvc/llvm-project?rev=51423&view=rev Log: Rewrite operand loops to use iterators. This shrinks .o file (at gcc4.0.1 -O3 x86) substantially (>500 bytes). Reason still unknown. Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ConstantFolding.cpp?rev=51423&r1=51422&r2=51423&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ConstantFolding.cpp (original) +++ llvm/trunk/lib/Analysis/ConstantFolding.cpp Thu May 22 01:43:33 2008 @@ -65,8 +65,9 @@ // Otherwise, add any offset that our operands provide. gep_type_iterator GTI = gep_type_begin(CE); - for (unsigned i = 1, e = CE->getNumOperands(); i != e; ++i, ++GTI) { - ConstantInt *CI = dyn_cast(CE->getOperand(i)); + for (User::const_op_iterator i = CE->op_begin() + 1, e = CE->op_end(); + i != e; ++i, ++GTI) { + ConstantInt *CI = dyn_cast(*i); if (!CI) return false; // Index isn't a simple constant? if (CI->getZExtValue() == 0) continue; // Not adding anything. @@ -297,8 +298,8 @@ // Scan the operand list, checking to see if they are all constants, if so, // hand off to ConstantFoldInstOperands. SmallVector Ops; - for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i) - if (Constant *Op = dyn_cast(I->getOperand(i))) + for (User::op_iterator i = I->op_begin(), e = I->op_end(); i != e; ++i) + if (Constant *Op = dyn_cast(*i)) Ops.push_back(Op); else return 0; // All operands not constant! From baldrick at free.fr Thu May 22 02:56:33 2008 From: baldrick at free.fr (Duncan Sands) Date: Thu, 22 May 2008 09:56:33 +0200 Subject: [llvm-commits] =?iso-8859-1?q?=5Bllvm-gcc-4=2E2=5D_r51257_-_in=09?= =?iso-8859-1?q?/llvm-gcc-4=2E2/trunk/gcc=3A_cgraphunit=2Ec_ipa-inline=2Ec?= =?iso-8859-1?q?_passes=2Ec?= In-Reply-To: <7C9BB4B7-2ED0-41BC-B168-F473B5ADBC4F@apple.com> References: <200805191642.m4JGgvVc013244@zion.cs.uiuc.edu> <200805201312.32955.baldrick@free.fr> <7C9BB4B7-2ED0-41BC-B168-F473B5ADBC4F@apple.com> Message-ID: <200805220956.33606.baldrick@free.fr> Thanks for the offer Dale! Warnings below. On Wednesday 21 May 2008 02:29:38 Dale Johannesen wrote: > On May 20, 2008, at 4:12 AM, Duncan Sands wrote: > > PS: It would be nice to build with -Werr on x86-linux, > > but it's not feasible because Apple changes in i386.c > > generate a bunch of warnings. I didn't dare touch that > > mysterious stuff - can perhaps one of the Apple guys > > take a look, thanks! > > There are no warnings building on Darwin. If you send the warning > output I may be able to do something. This is the complete list, but it's the second one, (B), I had in mind in my email. (A) build/genrecog ../../gcc-4.2.llvm/gcc/config/i386/i386.md \^M insn-conditions.md > tmp-recog.c^M ../../gcc-4.2.llvm/gcc/config/i386/i386.md:19280: warning: operand 1 missing mode?^M (B) gcc -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.2.llvm/gcc -I../../gcc-4.2.llvm/gcc/. -I../../gcc-4.2.llvm/gcc/../include -I../../gcc-4.2.llvm/gcc/../libcpp/include -I../../gcc-4.2.llvm/gcc/../libdecnumber -I../libdecnumber -I.../include -I.../llvm/include -DENABLE_LLVM -I.../../llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS \^M ../../gcc-4.2.llvm/gcc/config/i386/i386.c -o i386.o^M ../../gcc-4.2.llvm/gcc/config/i386/i386.c: In function 'ix86_expand_convert_uns_DI2DF_sse':^M ../../gcc-4.2.llvm/gcc/config/i386/i386.c:10321: warning: large integer implicitly truncated to unsigned type^M ../../gcc-4.2.llvm/gcc/config/i386/i386.c: In function 'ix86_expand_convert_sign_DI2DF_sse':^M ../../gcc-4.2.llvm/gcc/config/i386/i386.c:10428: warning: large integer implicitly truncated to unsigned type^M (C) gcc -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.2.llvm/gcc -I../../gcc-4.2.llvm/gcc/. -I../../gcc-4.2.llvm/gcc/../include -I../../gcc-4.2.llvm/gcc/../libcpp/include -I../../gcc-4.2.llvm/gcc/../libdecnumber -I../libdecnumber -I.../include -I.../llvm/include -DENABLE_LLVM -I.../../llvm/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS \^M -DTARGET_MACHINE=\"i686-pc-linux-gnu\" \^M -c ../../gcc-4.2.llvm/gcc/collect2.c -o collect2.o^M ../../gcc-4.2.llvm/gcc/objc/objc-act.c: In function 'objc_init':^M ../../gcc-4.2.llvm/gcc/objc/objc-act.c:715: warning: empty body in an if-statement^M (D) build/genchecksum cc1obj-dummy > cc1obj-checksum.c^M echo | .../gcc/xgcc -B.../gcc/ -B.../i686-pc-linux-gnu/bin/ -B.../i686-pc-linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include -isystem .../i686-pc-linux-gnu/sys-include -E -dM - | \^M sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \^M -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \^M sort -u > tmp-macro_list^M cc1: warning: unrecognized gcc debugging option: M^M (E) .../gcc/xgcc -B.../gcc/ -B.../i686-pc-linux-gnu/bin/ -B.../i686-pc-linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include -isystem .../i686-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-4.2.llvm/libgfortran -I. -iquote../../../gcc-4.2.llvm/libgfortran/io -I../../../gcc-4.2.llvm/libgfortran/../gcc -I../../../gcc-4.2.llvm/libgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -O2 -g -O2 -c ../../../gcc-4.2.llvm/libgfortran/runtime/string.c -o string.o^M ../../../gcc-4.2.llvm/libgfortran/runtime/string.c: In function 'compare0':^M ../../../gcc-4.2.llvm/libgfortran/runtime/string.c:47: warning: comparison between signed and unsigned^M (F) .../gcc/xgcc -shared-libgcc -B.../gcc -nostdinc++ -L..i686-pc-linux-gnu/libstdc++-v3/src -L..i686-pc-linux-gnu/libstdc++-v3/src/.libs -B.../i686-pc-linux-gnu/bin/ -B.../i686-pc-linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include -isystem .../i686-pc-linux-gnu/sys-include -I.../libstdc++-v3/../gcc -I..i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu -I..i686-pc-linux-gnu/libstdc++-v3/include -I.../libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -g -O2 -D_GNU_SOURCE -c ../../../../gcc-4.2.llvm/libstdc++-v3/libsupc++/eh_call.cc -o eh_call.o^M .../libstdc++-v3/../gcc/unwind-pe.h:74: warning: 'unsigned int size_of_encoded_value(unsigned char)' defined but not used^M (G) .../gcc/xgcc -B.../gcc/ -B.../i686-pc-linux-gnu/bin/ -B.../i686-pc-linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include -isystem .../i686-pc-linux-gnu/sys-include -fgnu-runtime -c -I. -I.../libobjc -O2 -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing -fexceptions -I.../libobjc/objc -I.../libobjc/../gcc -I.../libobjc/../gcc/config -I../.././gcc -I.../libobjc/../include .../libobjc/Object.m -o Object.o^M .../libobjc/Object.m: In function '-[Object compare:]':^M .../libobjc/Object.m:124: warning: comparison of distinct pointer types lacks a cast^M (H) .../gcc/xgcc -B.../gcc/ -B.../i686-pc-linux-gnu/bin/ -B.../i686-pc-linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include -isystem .../i686-pc-linux-gnu/sys-include -c -I. -I.../libobjc -O2 -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing -fexceptions -I.../libobjc/objc -I.../libobjc/../gcc -I.../libobjc/../gcc/config -I../.././gcc -I.../libobjc/../include .../libobjc/thr.c -o thr.o^M .../libobjc/thr.c: In function '__objc_thread_detach_function':^M .../libobjc/thr.c:117: warning: 'noreturn' function does return^M (I) .../gcc/xgcc -B.../gcc/ -B.../i686-pc-linux-gnu/bin/ -B.../i686-pc-linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include -isystem .../i686-pc-linux-gnu/sys-include -c -I. -I.../libobjc -O2 -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing -fexceptions -I.../libobjc/objc -I.../libobjc/../gcc -I.../libobjc/../gcc/config -I../.././gcc -I.../libobjc/../include .../libobjc/sendmsg.c -o sendmsg.o^M .../libobjc/sendmsg.c:44:1: warning: "rtx" redefined^M In file included from .../libobjc/sendmsg.c:33:^M .../libobjc/../gcc/coretypes.h:75:1: warning: this is the location of the previous definition^M From nicolas.geoffray at lip6.fr Thu May 22 04:29:18 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 22 May 2008 09:29:18 -0000 Subject: [llvm-commits] [vmkit] r51426 - /vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp Message-ID: <200805220929.m4M9TIFX026388@zion.cs.uiuc.edu> Author: geoffray Date: Thu May 22 04:29:18 2008 New Revision: 51426 URL: http://llvm.org/viewvc/llvm-project?rev=51426&view=rev Log: Reintroduce line erroneously removed from last patch. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp?rev=51426&r1=51425&r2=51426&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp Thu May 22 04:29:18 2008 @@ -64,6 +64,7 @@ res->nbb = nb; res->nbw = nw; res->asciizName = name; + res->UTF8Name = vm->asciizConstructUTF8(name); res->arrayCtor = ctor; res->arrayClass = cl; From nicolas.geoffray at lip6.fr Thu May 22 04:27:58 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Thu, 22 May 2008 09:27:58 -0000 Subject: [llvm-commits] [vmkit] r51425 - in /vmkit/trunk/lib/JnJVM/VMCore: JavaClass.cpp JavaClass.h JavaTypes.cpp JavaTypes.h Jnjvm.cpp Message-ID: <200805220927.m4M9Rwen026343@zion.cs.uiuc.edu> Author: geoffray Date: Thu May 22 04:27:57 2008 New Revision: 51425 URL: http://llvm.org/viewvc/llvm-project?rev=51425&view=rev Log: Primitive classes should not be hashed. Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp?rev=51425&r1=51424&r2=51425&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp Thu May 22 04:27:57 2008 @@ -182,17 +182,42 @@ buf->write(">"); } -void CommonClass::initialise(Jnjvm* isolate, bool isArray) { +CommonClass::CommonClass(Jnjvm* vm, const UTF8* n, bool isArray) { + name = n; this->lockVar = mvm::Lock::allocRecursive(); this->condVar = mvm::Cond::allocCond(); this->status = hashed; - this->isolate = isolate; + this->isolate = vm; this->isArray = isArray; + this->isPrimitive = false; #ifndef MULTIPLE_VM this->delegatee = 0; #endif } +Class::Class(Jnjvm* vm, const UTF8* n) : CommonClass(vm, n, false) { + classLoader = 0; + bytes = 0; + super = 0; + ctpInfo = 0; +#ifndef MULTIPLE_VM + _staticInstance = 0; +#endif +} + +ClassArray::ClassArray(Jnjvm* vm, const UTF8* n) : CommonClass(vm, n, true) { + classLoader = 0; + _funcs = 0; + _baseClass = 0; + super = ClassArray::SuperArray; + interfaces = ClassArray::InterfacesArray; + depth = 1; + display.push_back(ClassArray::SuperArray); + display.push_back(this); + access = ACC_FINAL | ACC_ABSTRACT; + status = loaded; +} + void Class::print(mvm::PrintBuffer* buf) const { buf->write("Class<"); printClassName(name, buf); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h?rev=51425&r1=51424&r2=51425&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h Thu May 22 04:27:57 2008 @@ -102,7 +102,11 @@ /// isArray - Is the class an array class? /// - uint8 isArray; + bool isArray; + + /// isPrimitive - Is the class a primitive class? + /// + bool isPrimitive; /// name - The name of the class. /// @@ -199,7 +203,6 @@ uint32 access); static void printClassName(const UTF8* name, mvm::PrintBuffer* buf); - void initialise(Jnjvm* isolate, bool array); void aquire() { lockVar->lock(); @@ -264,6 +267,10 @@ return status >= resolved; } + CommonClass(Jnjvm* vm, const UTF8* name, bool isArray); + /// Empty constructor for VT + CommonClass() {} + static VirtualTable* VT; static const int MaxDisplay; static JavaObject* jnjvmClassLoader; @@ -306,6 +313,10 @@ void createStaticInstance(); #endif + /// Empty constructor for VT + Class() {} + Class(Jnjvm* vm, const UTF8* name); + }; @@ -328,6 +339,10 @@ resolveComponent(); return _funcs; } + + /// Empty constructor for VT + ClassArray() {} + ClassArray(Jnjvm* vm, const UTF8* name); static JavaObject* arrayLoader(Jnjvm* isolate, const UTF8* name, JavaObject* loader, unsigned int start, Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp?rev=51425&r1=51424&r2=51425&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp Thu May 22 04:27:57 2008 @@ -52,19 +52,18 @@ AssessorDesc* AssessorDesc::dTab = 0; AssessorDesc* AssessorDesc::dRef = 0; -AssessorDesc* AssessorDesc::allocate(bool dt, char bid, uint32 nb, uint32 nw, - const char* name, const char* className, - Jnjvm* vm, uint8 nid, - const char* assocName, ClassArray* cl, - arrayCtor_t ctor) { - AssessorDesc* res = new AssessorDesc(); +AssessorDesc::AssessorDesc(bool dt, char bid, uint32 nb, uint32 nw, + const char* name, + Jnjvm* vm, uint8 nid, + const char* assocName, ClassArray* cl, + arrayCtor_t ctor) { + AssessorDesc* res = this; res->numId = nid; res->doTrace = dt; res->byteId = bid; res->nbb = nb; res->nbw = nw; res->asciizName = name; - res->UTF8Name = vm->asciizConstructUTF8(name); res->arrayCtor = ctor; res->arrayClass = cl; @@ -74,65 +73,64 @@ res->assocClassName = 0; if (bid != I_PARG && bid != I_PARD && bid != I_REF && bid != I_TAB) { - res->classType = vm->constructClass(vm->asciizConstructUTF8(className), - CommonClass::jnjvmClassLoader); + res->classType = new CommonClass(vm, res->UTF8Name, false); res->classType->status = ready; + res->classType->isPrimitive = true; res->classType->access = ACC_ABSTRACT | ACC_FINAL | ACC_PUBLIC; } else { res->classType = 0; } - return res; } void AssessorDesc::initialise(Jnjvm* vm) { - dParg = AssessorDesc::allocate(false, I_PARG, 0, 0, "(", "(", vm, -1, 0, 0, + dParg = new AssessorDesc(false, I_PARG, 0, 0, "(", vm, -1, 0, 0, 0); - dPard = AssessorDesc::allocate(false, I_PARD, 0, 0, ")", ")", vm, -1, 0, 0, + dPard = new AssessorDesc(false, I_PARD, 0, 0, ")", vm, -1, 0, 0, 0); - dVoid = AssessorDesc::allocate(false, I_VOID, 0, 0, "void", "*** void ***", + dVoid = new AssessorDesc(false, I_VOID, 0, 0, "void", vm, VOID_ID, "java/lang/Void", 0, 0); - dBool = AssessorDesc::allocate(false, I_BOOL, 1, 1, "boolean", - "*** boolean ***", vm, + dBool = new AssessorDesc(false, I_BOOL, 1, 1, "boolean", + vm, BOOL_ID, "java/lang/Boolean", JavaArray::ofBool, (arrayCtor_t)ArrayUInt8::acons); - dByte = AssessorDesc::allocate(false, I_BYTE, 1, 1, "byte", "*** byte ***", + dByte = new AssessorDesc(false, I_BYTE, 1, 1, "byte", vm, BYTE_ID, "java/lang/Byte", JavaArray::ofByte, (arrayCtor_t)ArraySInt8::acons); - dChar = AssessorDesc::allocate(false, I_CHAR, 2, 1, "char", "*** char ***", + dChar = new AssessorDesc(false, I_CHAR, 2, 1, "char", vm, CHAR_ID, "java/lang/Character", JavaArray::ofChar, (arrayCtor_t)ArrayUInt16::acons); - dShort = AssessorDesc::allocate(false, I_SHORT, 2, 1, "short", - "*** short ***", vm, SHORT_ID, + dShort = new AssessorDesc(false, I_SHORT, 2, 1, "short", + vm, SHORT_ID, "java/lang/Short", JavaArray::ofShort, (arrayCtor_t)ArraySInt16::acons); - dInt = AssessorDesc::allocate(false, I_INT, 4, 1, "int", "*** int ***", vm, + dInt = new AssessorDesc(false, I_INT, 4, 1, "int", vm, INT_ID, "java/lang/Integer", JavaArray::ofInt, (arrayCtor_t)ArraySInt32::acons); - dFloat = AssessorDesc::allocate(false, I_FLOAT, 4, 1, "float", - "*** float ***", vm, + dFloat = new AssessorDesc(false, I_FLOAT, 4, 1, "float", + vm, FLOAT_ID, "java/lang/Float", JavaArray::ofFloat, (arrayCtor_t)ArrayFloat::acons); - dLong = AssessorDesc::allocate(false, I_LONG, 8, 2, "long", "*** long ***", + dLong = new AssessorDesc(false, I_LONG, 8, 2, "long", vm, LONG_ID, "java/lang/Long", JavaArray::ofLong, (arrayCtor_t)ArrayLong::acons); - dDouble = AssessorDesc::allocate(false, I_DOUBLE, 8, 2, "double", - "*** double ***", vm, + dDouble = new AssessorDesc(false, I_DOUBLE, 8, 2, "double", + vm, DOUBLE_ID, "java/lang/Double", JavaArray::ofDouble, (arrayCtor_t)ArrayDouble::acons); - dTab = AssessorDesc::allocate(true, I_TAB, sizeof(void*), 1, "array", "array", + dTab = new AssessorDesc(true, I_TAB, sizeof(void*), 1, "array", vm, ARRAY_ID, 0, 0, (arrayCtor_t)ArrayObject::acons); - dRef = AssessorDesc::allocate(true, I_REF, sizeof(void*), 1, "reference", - "reference", vm, OBJECT_ID, + dRef = new AssessorDesc(true, I_REF, sizeof(void*), 1, "reference", + vm, OBJECT_ID, 0, 0, (arrayCtor_t)ArrayObject::acons); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h?rev=51425&r1=51424&r2=51425&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h Thu May 22 04:27:57 2008 @@ -89,11 +89,11 @@ static AssessorDesc* dTab; static AssessorDesc* dRef; - static AssessorDesc* allocate(bool dt, char bid, uint32 nb, uint32 nw, - const char* name, const char* className, - Jnjvm* vm, uint8 nid, - const char* assocName, ClassArray* cl, - arrayCtor_t ctor); + AssessorDesc(bool dt, char bid, uint32 nb, uint32 nw, + const char* name, + Jnjvm* vm, uint8 nid, + const char* assocName, ClassArray* cl, + arrayCtor_t ctor); static void initialise(Jnjvm* vm); Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp?rev=51425&r1=51424&r2=51425&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp Thu May 22 04:27:57 2008 @@ -657,19 +657,7 @@ } static CommonClass* arrayDup(const UTF8*& name, Jnjvm *vm) { - ClassArray* cl = vm_new(vm, ClassArray)(); - cl->initialise(vm, true); - cl->name = name; - cl->classLoader = 0; - cl->_funcs = 0; - cl->_baseClass = 0; - cl->super = ClassArray::SuperArray; - cl->interfaces = ClassArray::InterfacesArray; - cl->depth = 1; - cl->display.push_back(ClassArray::SuperArray); - cl->display.push_back(cl); - cl->access = ACC_FINAL | ACC_ABSTRACT; - cl->status = loaded; + ClassArray* cl = vm_new(vm, ClassArray)(vm, name); return cl; } @@ -706,16 +694,7 @@ static CommonClass* classDup(const UTF8*& name, Jnjvm *vm) { - Class* cl = vm_new(vm, Class)(); - cl->initialise(vm, false); - cl->name = name; - cl->classLoader = 0; - cl->bytes = 0; -#ifndef MULTIPLE_VM - cl->_staticInstance = 0; -#endif - cl->super = 0; - cl->ctpInfo = 0; + Class* cl = vm_new(vm, Class)(vm, name); return cl; } From matthijs at stdin.nl Thu May 22 05:44:05 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Thu, 22 May 2008 10:44:05 -0000 Subject: [llvm-commits] [test-suite] r51427 - /test-suite/trunk/HTMLColDiff.pl Message-ID: <200805221044.m4MAi5fD028562@zion.cs.uiuc.edu> Author: matthijs Date: Thu May 22 05:44:04 2008 New Revision: 51427 URL: http://llvm.org/viewvc/llvm-project?rev=51427&view=rev Log: Largely rewrite HTMLColDiff.pl, a utility that was meant to show differences between to text files containing tables. The script is now aimed at nightly.report.txt files. Simply run the nightly test twice (before and after applying and compiling a patch, for example) and save the report.nightly.txt files and pass them to the script. Changes include: * Outputting HTML instead of text-with--tags, which actually gets shown properly in a browser (it's not a full HTML page yet, though). * Properly handle the use | as a field seperator. * Not only mark that a field is different, but also show the old value and the percentile difference. Also colour the field depending on if it's an increase or decrease. * Add some usage information (run ./HTMLColDiff.pl to see it). * Use alternating background colours for rows for clarity. * Highlight changes that are above a given threshold (both relative and absolute differences). * Hide changes that are below a given threshold. * Exclude rows that don't have useful changes at all. The last three points can be controlled through commandline options. Modified: test-suite/trunk/HTMLColDiff.pl Modified: test-suite/trunk/HTMLColDiff.pl URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/HTMLColDiff.pl?rev=51427&r1=51426&r2=51427&view=diff ============================================================================== --- test-suite/trunk/HTMLColDiff.pl (original) +++ test-suite/trunk/HTMLColDiff.pl Thu May 22 05:44:04 2008 @@ -1,13 +1,63 @@ #!/usr/bin/perl -w +use strict; + # htmlcoldiff - Diff two files (specified on the command line) laid out in # columns. Output a copy of the second file with differences from the first # hi-lighted in bold (with HTML tags). This assumes that the first column of # the file is an identifier that keys two rows of the files together. # -$Input1 = $ARGV[0]; -$Input2 = $ARGV[1]; +# Don't show changes smaller than 1% by default +my $showThreshold = 1; +# Highlight changes larger than 5% by default +my $highlightThreshold = 5; +# Don't highlight changes that have a smaller absolute difference than this +my $highlightAbsDiff = .05; +# Don't show rows that have no changes shown +my $excludeNoShow = 0; +# Don't show rows that have no changes highlighted. +my $excludeNoHighlight = 0; + +my $Input1 = 0; +my $Input2 = 0; + +my $usage = "You should specify two filenames\n\n"; +$usage .= "Usage: ./HTMLColDiff.pl [-t showThreshold] [-T highlightThreshold] [-A absDiff] [-x] [-X] report.nightly.txt.a report.nightly.txt.b\n\n"; +$usage .= "Where showThreshold and highlightThreshold are the amount of change needed to a value to be shown or highlighted resp. (in percent) and absDiff is the minimum amount of absolute difference for a highlight. "; +$usage .= "When -x is specified, any rows that have no changes shown (per the -t option) are excluded. When -X is specified, any rows that have no highlights (per the -T options) are excluded.\n\n"; +$usage .= "The default options are -t $showThreshold -T $highlightThreshold -A $highlightAbsDiff\n"; + +while (@ARGV) { + if ($ARGV[0] eq "-t") { + shift; + $showThreshold = int($ARGV[0]); + } elsif ($ARGV[0] eq "-T") { + shift; + $highlightThreshold = int($ARGV[0]); + } elsif ($ARGV[0] eq "-A") { + shift; + $highlightAbsDiff = $ARGV[0]; + } elsif ($ARGV[0] eq "-x") { + $excludeNoShow = 1; + } elsif ($ARGV[0] eq "-X") { + $excludeNoHighlight = 1; + } else { + if (!$Input1) { + $Input1 = $ARGV[0]; + } elsif (!$Input2) { + $Input2 = $ARGV[0]; + } else { + warn("Extra filename found: " . $ARGV[0]); + } + } + shift; +} + +if (!$Input1 || !$Input2) { + warn($usage); + exit 1; +} open(INPUT1, $Input1) or die "Couldn't open '$Input1'!"; open(INPUT2, $Input2) or die "Couldn't open '$Input2'!"; @@ -18,47 +68,128 @@ # Convert the first file from an array of lines to a hash from the key to the # whole line. - -foreach $Line (@File1) { - my $Key = (split /\s+/, $Line, 2)[0]; +my %File1Map; +foreach my $Line (@File1) { + my $Key = (split /[\s|]+/, $Line, 2)[0]; $File1Map{$Key} = $Line; #print "Map '$Key' => '$Line'\n"; } +print("

    Showing differences between $Input1 and $Input2

    "); +print("

    "); +if ($showThreshold == 0) { + print "Showing all changes. "; +} else { + print "Hiding changes smaller than $showThreshold%. "; +} +print "Highlighting changes larger than $highlightThreshold%."; +print "

    \n"; +if ($excludeNoHighlight) { + print ("

    Excluding rows that have no highlighted cells

    \n"); +} elsif ($excludeNoShow) { + print ("

    Excluding rows that have no significant difference

    \n"); +} + +print "\n"; + # Loop over the second file, outputting it, surrounding field with tags if # they differ from the first file. -foreach $Line (@File2) { - my @Fields = split /(\s+)/, $Line; # Keep the seperators as well... +my $LineNo = -1; +foreach my $Line (@File2) { + # Try to remove spaces from the headers. This is a bit of a hack, really... + $Line =~ s/([^ ]) (codegen|compile)/$1\ $2/g; + + my @Fields = split /([\s|]+)/, $Line; # Keep the seperators as well... my $Key = $Fields[0]; my $CompareLine = $File1Map{$Key}; - my @FieldsCompare = split /\s+/, $CompareLine; # Do not keep seperators + + # Try to remove spaces from the headers. This is a bit of a hack, really... + $CompareLine =~ s/([^ ]) (codegen|compile)/$1 $2/g; + + my @FieldsCompare = split /[\s|]+/, $CompareLine; # Do not keep seperators # Loop over all of the Fields, outputting them with an optional tag... my $FieldNo = 0; - foreach $Field (@Fields) { - if ($Field =~ /\s+/) { # If it's a seperator, just output it - print $Field; + + # Give the header row a different colour and then alternate betwen + # grey and white every two rows. + my $RowColour; + if ($LineNo == -1) { + $RowColour = "#FFCC99"; + } elsif (($LineNo / 2) % 2) { + $RowColour = "#CCCCCC"; + } else { + $RowColour = "#FFFFFF"; + } + my $row = "\n"; + # Always show the first row, but exclude rows that don't have any + # changes or highlights if those options are enabled. + if ($LineNo == -1 || (!$excludeNoHighlight || $highlightCells) && (!$excludeNoShow || $showCells)) { + print $row; + } + $LineNo++; } +print "
    "; + my $showCells = 0; + my $highlightCells = 0; + foreach my $Field (@Fields) { + if ($Field =~ /[\s|]+/) { # If it's a seperator, just output it + #print $Field; + $row .= ""; } else { # If it's not a seperator, diff it... - my $Hilight = 0; + my $Show = 0; + my $Highlight = 0; + my $Colour = 0; if (@FieldsCompare > $FieldNo) { my $FieldComp = $FieldsCompare[$FieldNo]; - if ($Field =~ /[0-9]+\.[0-9]+/ && $FieldComp =~ /[0-9]+\.[0-9]+/ && - $Field != 0) { # Handle floating point numbers special - # They are only highlighted if they change by 20% or more... - my $Change = $FieldComp/$Field; - $Hilight = 1 if ($Change > 1.3333 || $Change < 0.666); + if ($Field =~ /^[0-9.]+$/ && $FieldComp =~ /^[0-9.]+$/ && + $FieldComp != 0 && $Field ne $FieldComp) { # Handle numbers special + + # How much did the field change? + my $Change = $Field/$FieldComp; + + # Check to see if the change is really small, don't show it + # then. + $Show = 1 if ($Change > 1 + ($showThreshold / 100) + || $Change < 1 - ($showThreshold / 100)); + + # Highlight the change if it is large enough, both relatively + # and absolutely + $Highlight = 1 if ($Change > 1 + ($highlightThreshold / 100) + || $Change < 1 - ($highlightThreshold / 100)); + $Highlight = 0 if (abs($Field - $FieldComp) < $highlightAbsDiff); + + # Show and colour changes if the change is large enough + if ($Show) { + my $Percent = sprintf("%+.2f%%", ($Change-1)*100); + $Field = "$FieldComp => $Field ($Percent)"; + $Colour = ($Change > 1 ? "red" : "green"); + } } elsif ($Field ne $FieldComp) { - $Hilight = 1; + # Always show but never highlight changes in non-numeric + # fields + $Show = 1; + $Field = "$FieldComp => $FieldComp"; } } + # Remove spaces, we don't want wrapping inside cells + $Field =~ s/ /\ /g; + $row .= "" if $Highlight; + $row .= "" if $Colour; + $row .= $Field; + $row .= "" if $Colour; + $row .= "" if $Highlight; + + + # Keep track that at least one cell was shown/highlighted in this + # row. + $highlightCells = 1 if ($Highlight); + $showCells = 1 if ($Show); - print "" if $Hilight; - print $Field; - print "" if $Hilight; $FieldNo++; } } + $row .= "
    \n"; From matthijs at stdin.nl Thu May 22 07:22:33 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Thu, 22 May 2008 12:22:33 -0000 Subject: [llvm-commits] [test-suite] r51428 - /test-suite/trunk/HTMLColDiff.pl Message-ID: <200805221222.m4MCMXTN031434@zion.cs.uiuc.edu> Author: matthijs Date: Thu May 22 07:22:32 2008 New Revision: 51428 URL: http://llvm.org/viewvc/llvm-project?rev=51428&view=rev Log: Fix row colouring. Modified: test-suite/trunk/HTMLColDiff.pl Modified: test-suite/trunk/HTMLColDiff.pl URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/HTMLColDiff.pl?rev=51428&r1=51427&r2=51428&view=diff ============================================================================== --- test-suite/trunk/HTMLColDiff.pl (original) +++ test-suite/trunk/HTMLColDiff.pl Thu May 22 07:22:32 2008 @@ -189,7 +189,7 @@ # changes or highlights if those options are enabled. if ($LineNo == -1 || (!$excludeNoHighlight || $highlightCells) && (!$excludeNoShow || $showCells)) { print $row; + $LineNo++; } - $LineNo++; } print "\n"; From gabor at mac.com Thu May 22 08:00:09 2008 From: gabor at mac.com (Gabor Greif) Date: Thu, 22 May 2008 15:00:09 +0200 Subject: [llvm-commits] [PATCH] suppress warnings about operator delete (branches/release_23) Message-ID: <0F537C7A-6F19-49C3-888D-5BB4139D2403@mac.com> Hi Morten, here is a patch with your feedback, can you please apply it to a clean User.h and retest? Please reply to the list and to Tanya with the result. Tanya, I shall apply a similar patch to trunk, and in case Morten indicates success, would you please apply the attached patch to branches/release_23? Thanks for the readiness to help!!! Cheers, Gabor -------------- next part -------------- A non-text attachment was scrubbed... Name: User.h.diff Type: application/octet-stream Size: 551 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20080522/057e75d8/attachment.obj From ggreif at gmail.com Thu May 22 08:16:42 2008 From: ggreif at gmail.com (Gabor Greif) Date: Thu, 22 May 2008 13:16:42 -0000 Subject: [llvm-commits] [llvm] r51429 - /llvm/trunk/include/llvm/User.h Message-ID: <200805221316.m4MDGgHq000499@zion.cs.uiuc.edu> Author: ggreif Date: Thu May 22 08:16:42 2008 New Revision: 51429 URL: http://llvm.org/viewvc/llvm-project?rev=51429&view=rev Log: Suppress warnings about missing placement delete. This should now be std-conformant even if compiled with exceptions on. Modified: llvm/trunk/include/llvm/User.h Modified: llvm/trunk/include/llvm/User.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/User.h?rev=51429&r1=51428&r2=51429&view=diff ============================================================================== --- llvm/trunk/include/llvm/User.h (original) +++ llvm/trunk/include/llvm/User.h Thu May 22 08:16:42 2008 @@ -242,7 +242,12 @@ ~User() { Use::zap(OperandList, OperandList + NumOperands); } + /// operator delete - free memory allocated for User and Use objects void operator delete(void *Usr); + /// placement delete - required by std, but never called. + void operator delete(void*, unsigned) { + assert(0 && "Constructor throws?"); + } template Use &Op() { return OperandTraits::op_begin(this)[Idx]; } From baldrick at free.fr Thu May 22 09:31:19 2008 From: baldrick at free.fr (Duncan Sands) Date: Thu, 22 May 2008 14:31:19 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r51430 - in /llvm-gcc-4.2/trunk/gcc: ipa-inline.c passes.c Message-ID: <200805221431.m4MEVJt9002642@zion.cs.uiuc.edu> Author: baldrick Date: Thu May 22 09:31:18 2008 New Revision: 51430 URL: http://llvm.org/viewvc/llvm-project?rev=51430&view=rev Log: Turn off all gcc optimizations again, except for the gcc inliner. Before the inliner was left on too, but only enabled for always_inline functions. This time it is completely enabled. My testing shows that the WebKit slowdown (PR2353) was due to disabling the inliner, and not due to turning off the other gcc optimization passes. As for why the gcc inliner helps so much here - well, that still remains to be analysed. Modified: llvm-gcc-4.2/trunk/gcc/ipa-inline.c llvm-gcc-4.2/trunk/gcc/passes.c Modified: llvm-gcc-4.2/trunk/gcc/ipa-inline.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/ipa-inline.c?rev=51430&r1=51429&r2=51430&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/ipa-inline.c (original) +++ llvm-gcc-4.2/trunk/gcc/ipa-inline.c Thu May 22 09:31:18 2008 @@ -941,7 +941,11 @@ /* At the moment, no IPA passes change function bodies before inlining. Save some time by not recomputing function body sizes if early inlining already did so. */ + /* LLVM local begin - Don't rely on pass_early_ipa_inline being run. */ +#ifndef ENABLE_LLVM if (!flag_early_inlining) +#endif + /* LLVM local end */ node->local.self_insns = node->global.insns = estimate_num_insns (node->decl); @@ -1028,9 +1032,19 @@ overall_insns - old_insns); } + /* LLVM local begin */ +#ifdef ENABLE_LLVM + if (1) /* FIXME: 1 should be 0 some day, see PR2353. */ +#endif + /* LLVM local end*/ if (!flag_really_no_inline) cgraph_decide_inlining_of_small_functions (); + /* LLVM local begin */ +#ifdef ENABLE_LLVM + if (1) /* FIXME: 1 should be 0 some day, see PR2353. */ +#endif + /* LLVM local end*/ if (!flag_really_no_inline && flag_inline_functions_called_once) { @@ -1148,6 +1162,11 @@ } /* Now do the automatic inlining. */ + /* LLVM local begin */ +#ifdef ENABLE_LLVM + if (1) /* FIXME: 1 should be 0 some day, see PR2353. */ +#endif + /* LLVM local end */ if (!flag_really_no_inline) for (e = node->callees; e; e = e->next_callee) if (e->callee->local.inlinable Modified: llvm-gcc-4.2/trunk/gcc/passes.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/passes.c?rev=51430&r1=51429&r2=51430&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/passes.c (original) +++ llvm-gcc-4.2/trunk/gcc/passes.c Thu May 22 09:31:18 2008 @@ -481,18 +481,20 @@ #define NEXT_PASS(PASS) (p = next_pass_1 (p, &PASS)) /* Interprocedural optimization passes. */ p = &all_ipa_passes; + /* LLVM local begin */ +#ifndef ENABLE_LLVM NEXT_PASS (pass_early_ipa_inline); NEXT_PASS (pass_early_local_passes); NEXT_PASS (pass_ipa_cp); - NEXT_PASS (pass_ipa_inline); -/* LLVM LOCAL begin */ +#endif + NEXT_PASS (pass_ipa_inline); /* LLVM: inline functions marked always_inline */ #ifndef ENABLE_LLVM NEXT_PASS (pass_ipa_reference); NEXT_PASS (pass_ipa_pure_const); NEXT_PASS (pass_ipa_type_escape); NEXT_PASS (pass_ipa_pta); #endif -/* LLVM LOCAL end */ + /* LLVM local end */ *p = NULL; /* All passes needed to lower the function into shape optimizers can @@ -504,9 +506,9 @@ NEXT_PASS (pass_lower_cf); NEXT_PASS (pass_lower_eh); NEXT_PASS (pass_build_cfg); - NEXT_PASS (pass_lower_complex_O0); /* LLVM LOCAL begin */ #ifndef ENABLE_LLVM + NEXT_PASS (pass_lower_complex_O0); NEXT_PASS (pass_lower_vector); #endif /* LLVM LOCAL end */ @@ -518,16 +520,6 @@ /* LLVM LOCAL end */ *p = NULL; - p = &pass_early_local_passes.sub; - /* LLVM LOCAL begin */ -#ifndef ENABLE_LLVM - NEXT_PASS (pass_tree_profile); -#endif - /* LLVM LOCAL end */ - NEXT_PASS (pass_cleanup_cfg); - NEXT_PASS (pass_rebuild_cgraph_edges); - *p = NULL; - /* LLVM LOCAL begin */ #ifdef ENABLE_LLVM p = &all_extra_lowering_passes; @@ -539,6 +531,14 @@ #endif /* LLVM LOCAL end */ + /* LLVM LOCAL begin - Do not pull in symbols. */ +#ifndef ENABLE_LLVM + p = &pass_early_local_passes.sub; + NEXT_PASS (pass_tree_profile); + NEXT_PASS (pass_cleanup_cfg); + NEXT_PASS (pass_rebuild_cgraph_edges); + *p = NULL; + p = &all_passes; NEXT_PASS (pass_fixup_cfg); NEXT_PASS (pass_init_datastructures); @@ -684,8 +684,6 @@ NEXT_PASS (pass_dce_loop); *p = NULL; - /* LLVM LOCAL begin */ -#ifndef ENABLE_LLVM p = &pass_loop2.sub; NEXT_PASS (pass_rtl_loop_init); NEXT_PASS (pass_rtl_move_loop_invariants); @@ -761,7 +759,7 @@ NEXT_PASS (pass_final); *p = NULL; #endif - /* LLVM LOCAL end */ + /* LLVM local end */ #undef NEXT_PASS @@ -775,11 +773,12 @@ register_dump_files (all_extra_lowering_passes, false, PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_cfg); -#endif - /* LLVM LOCAL end */ +#else register_dump_files (all_passes, false, PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_cfg); +#endif + /* LLVM LOCAL end */ } static unsigned int last_verified; From morten at hue.no Thu May 22 08:17:29 2008 From: morten at hue.no (Morten Ofstad) Date: Thu, 22 May 2008 15:17:29 +0200 Subject: [llvm-commits] [PATCH] suppress warnings about operator delete (branches/release_23) In-Reply-To: <0F537C7A-6F19-49C3-888D-5BB4139D2403@mac.com> References: <0F537C7A-6F19-49C3-888D-5BB4139D2403@mac.com> Message-ID: <48357269.6050503@hue.no> Gabor Greif wrote: > Hi Morten, > > here is a patch with your feedback, can you please apply it > to a clean User.h and retest? This patch works perfectly. m. > Please reply to the list and to Tanya with the result. > > Tanya, I shall apply a similar patch to trunk, > and in case Morten indicates success, would you > please apply the attached patch to branches/release_23? > > Thanks for the readiness to help!!! > > Cheers, > > Gabor > From matthijs at stdin.nl Thu May 22 11:07:42 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Thu, 22 May 2008 18:07:42 +0200 Subject: [llvm-commits] [PATCH] Restructure a part of SimplifyCFG In-Reply-To: <7BADC278-B804-4978-A398-5C605C57CFF6@apple.com> References: <20080516141445.GK8631@katherina.student.utwente.nl> <7BADC278-B804-4978-A398-5C605C57CFF6@apple.com> Message-ID: <20080522160742.GH13165@katherina.student.utwente.nl> Hi All, > The patch looks great to me, if it passes tests, please apply. I've pulled the patch through the (nightly) test bench a few times and there were no extra failed tests. I also couldn't find any reproducible performance degradations in the llc and jit runs. It does seem that some of the cbe tests suffer some degradation, but I'm not sure how important that is. In the particular case I looked at, the code was only restructured a little bit, but the removal of a loop preheader resulted in a single do { } while(1) structure in the output where there used to be two. I guess this throws off gcc's optimizer when recompiling the C code. I'll do a last full test run tonight (to do one thorough check of llc performance) and commit tomorrow morning. Gr. Matthijs -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20080522/4d757c11/attachment.bin From tonic at nondot.org Thu May 22 11:46:24 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 11:46:24 -0500 Subject: [llvm-commits] CVS: llvm-www/devmtg/index.php register.php students.php talk.php Message-ID: <200805221646.m4MGkO1f006880@zion.cs.uiuc.edu> Changes in directory llvm-www/devmtg: index.php added (r1.1) register.php added (r1.1) students.php added (r1.1) talk.php added (r1.1) --- Log message: New developer meeting main page and various forms. --- Diffs of the changes: (+828 -0) index.php | 142 ++++++++++++++++++++++++++++++++ register.php | 210 ++++++++++++++++++++++++++++++++++++++++++++++++ students.php | 257 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ talk.php | 219 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 828 insertions(+) Index: llvm-www/devmtg/index.php diff -c /dev/null llvm-www/devmtg/index.php:1.1 *** /dev/null Thu May 22 11:45:59 2008 --- llvm-www/devmtg/index.php Thu May 22 11:45:49 2008 *************** *** 0 **** --- 1,142 ---- + +
    LLVM Developers' Meeting
    + +
    +
      +
    1. Registration
    2. +
    3. Attendees
    4. +
    5. Agenda
    6. +
    7. Getting There
    8. +
    9. Student Funding
    10. +
    +
    +
      +
    • What: The second general meeting of LLVM Developers and Users. +
    • +
    • Why: To get acquainted, learn how LLVM is used, and exchange + ideas.
    • +
    • When: August 1, 2008
    • +
    • Where: Apple Campus (4 Infinite Loop, Cupertino, CA)
    • +
    +
    + +

    SPONSORED BY: Apple, Google, Adobe, UIUC

    + +

    The meeting serves as a forum for both LLVM + developers and users to get acquainted, to learn how LLVM is used, and to + exchange ideas about LLVM and its (potential) applications. More broadly, we + believe the event will be of particular interest to the following people:

    + +
      +
    • Active LLVM developers and users.
    • +
    • Anyone interested in using LLVM.
    • +
    • Compiler, programming language, and runtime enthusiasts.
    • +
    • Those interested in using compiler technology in novel and interesting ways.
    • +
    + +

    Beyond discussing the core LLVM compiler infrastructure, this year's meeting + will also dedicate a significant amount of attention to clang, LLVM's new frontend for + C-based languages (see information on the meeting's agenda + for more information).

    + +
    Registration
    + +

    Register NOW!

    + +

    Attendance is free and open to everyone, but we ask that everyone planning on + attending to register so that we get a rough + estimate of attendance.

    + +

    We also ask that everyone planning on attending register (including + speakers). This gives us an accurate tally of how many people will be there.

    + +

    Important: If you previously emailed the meeting organizers an email + indicating your interest in coming, we politely ask you that you also register + through the registration form.

    + + +
    +

    This table lists all attendees that have expressed interest in attending this year's conference.

    + + + '; + $count++; + } + ?> +
    NameOrganization
    '; + print $row['firstName']; + print ' '; + print $row['lastName']; + print ''; + print $row['organization']; + print '
    +

    Total Confirmed:

    +

    If your name is misspelled, or organization affiliation isn't correct, please email us, and we'll correct it. +

    + +
    Agenda
    + +

    Volunteer to give a talk!

    + +

    The meeting is tentatively scheduled between 8:00 AM and 5:00 PM Pacific Time.

    + +

    The schedule of talks has not yet been decided. If you are interested in + speaking, please let + us know what topic you'd like to present.

    + +
    Getting There
    + +

    The meeting will be held in building Infinite + Loop 4 at Apple Inc.'s campus. The conference center is publicly accessible + to non-Apple employees, and can be reached by taking the stairs up one floor + from the foyer on the ground level. + +

    Parking
    + +

    All outside parking on the Infinite Loop is accessible to all visitors. You + do not need a special parking permit.

    + +
    Travel
    + +

    Cupertino is located in Silicon Valley, about 45 minutes south by car from + San Francisco.

    + +

    Three major airports service the San Francisco Bay Area:

    + + + +
    Lodging
    + +

    We have blocked a discounted rate at the XXX and XXX. Please reserve your + room early, as the special rate is no long available for reservations made after + XXX.

    + +
    Student Funding
    +

    We have a small amount of funding available to students who need assitance attending the LLVM Developers' meeting. A student may recieve partial or full funding if they agree to give a short talk and write up a blog entry of their experience. Preference is given to students who are active contributers to LLVM or clang.

    + +

    If you require financial assistance and are enrolled as a student at the time of the meeting, please submit a funding request.

    + + Index: llvm-www/devmtg/register.php diff -c /dev/null llvm-www/devmtg/register.php:1.1 *** /dev/null Thu May 22 11:46:24 2008 --- llvm-www/devmtg/register.php Thu May 22 11:45:49 2008 *************** *** 0 **** --- 1,210 ---- + '; + + $body .= '

    Name: ' . $_POST['first'] . ' ' . $_POST['last'] . '

    '; + $body .= '

    Organization: ' . $_POST['org'] . '

    '; + $body .= '

    Email: ' . $_POST['email'] . '

    '; + + if($_POST['attendBefore'] == 0) + $attendBefore = 'No'; + else + $attendBefore = 'Yes'; + + $body .= '

    Attended Before: ' . $attendBefore . '

    '; + + if($_POST['friday'] == 0) + $friday = 'No'; + else + $friday = 'Yes'; + + $body .= '

    Attend dinner?: ' . $friday . '

    '; + + + if($_POST['meal'] == 0) + $meal = 'No'; + else + $meal = 'Yes'; + + $body .= '

    Vegetarian Meal: ' . $meal . '

    '; + + + $body .= "

    Interests: " . $_POST['comments'] . '

    '; + $body .= ''; + + $headers = 'From: tonic at nondot.org' . "\r\n"; + $headers .= 'Content-Type: text/html; charset="iso-8859-1"'."\n"; + mail($to, $subject, $body, $headers); + + } + + + function processForm() { + if($_POST['attendBefore'] == 0) + $attend = 2; + else + $attend = 1; + + if ($_POST['friday'] == 0) + $friday = 2; + else + $friday = 1; + + if ($_POST['meal'] == 0) + $meal = 2; + else + $meal = 1; + + $sql = "INSERT into attendees (lastName, firstName, organization, email, location, attendBefore, fridayDinner, mealVeg, comments) VALUES('$_POST[last]', '$_POST[first]', '$_POST[org]', '$_POST[email]', '$_POST[location]','$attend', '$friday', '$meal', '$_POST[comments]')"; + mysql_query($sql) or die(mysql_error()); + print 'Congratulations! You are now registered for the 2008 LLVM Developers\' Meeting.

    Please sign up for the LLVM Developers\' Meeting mailing list to receive announcements about the event.

    '; + notify(); + } + + function validateForm() { + $errors = array(); + + // First name must be set. + if ($_POST['first'] == "") + array_push($errors, "First name must be provided"); + + if ($_POST['last'] == "") { + array_push($errors, "Last name must be provided"); + } + if ($_POST['email'] == "") + array_push($errors, "Email must be provided"); + + if ($_POST['org'] == "") + array_push($errors, "Organization must be provided"); + + if ($_POST['location']=="") + array_push($errors, "Location name must be provided"); + + if ($_POST['comments'] == "") + array_push($errors, "Please specify interests."); + + return $errors; + } + + // Print single line text box. + function inputText($element_name, $size, $maxLength, $values) { + print ''; + } + + // Print text area. + function inputTextarea($element_name, $row, $column, $values) { + print ''; + } + + // Print radio box. + function inputRadiocheck($element_name, + $values, $element_value) { + print ''; + } + + function showForm($errors) { + + if($errors) { + print ''; + print '

    Errors:

    '; + print'
      '; + foreach ($errors as $i) { + print '
    • '; + print $i; + print '
    • '; + } + print '
    '; + } + + print '
    '; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
    First Name: '; + inputText("first", 50, 50, $_POST); + print '
    Last Name: '; + inputText("last", 50, 50, $_POST); + print'
    Email: '; + inputText("email", 50, 75, $_POST); + print '
    Organization: '; + inputText("org", 50, 100, $_POST); + print '
    Location: '; + inputText("location", 50, 100, $_POST); + print '
    '; + print '

    Require vegetarian meals: '; + inputRadioCheck("meal", $_POST, 0); + print ' No '; + inputRadioCheck("meal", $_POST, 1); + print ' Yes

    '; + print '

    Would you attend a group dinner afterwards?'; + inputRadioCheck("friday", $_POST, 0); + print ' No '; + inputRadioCheck("friday", $_POST, 1); + print ' Yes

    '; + print '

    Have you attended a LLVM developers\' meeting before?'; + inputRadioCheck("attendBefore", $_POST, 0); + print ' No '; + inputRadioCheck("attendBefore", $_POST, 1); + print ' Yes

    '; + print '

    What are you most interested in learning at the LLVM developers\' meeting? '; + print '(i.e. general optimizations, llvm internals, clang, backend, not sure, etc)

    '; + print '

    '; + inputTextArea("comments", 5, 60, $_POST); + print '

    '; + print '

    '; + print ''; + print '
    '; + } + ?> + +
    LLVM Developers' Meeting - Registration
    + + + + Index: llvm-www/devmtg/students.php diff -c /dev/null llvm-www/devmtg/students.php:1.1 *** /dev/null Thu May 22 11:46:24 2008 --- llvm-www/devmtg/students.php Thu May 22 11:45:49 2008 *************** *** 0 **** --- 1,257 ---- + '; + + $body .= '

    Name: ' . $_POST['first'] . ' ' . $_POST['last'] . '

    '; + $body .= '

    School: ' . $_POST['school'] . '

    '; + $body .= '

    Email: ' . $_POST['email'] . '

    '; + $body .= '

    Location: ' . $_POST['location'] . '

    '; + + if($_POST['level'] == 1) + $level = "Undergraduate"; + else + $level = "Graduate"; + + $body .= '

    Level: ' . $level . '

    '; + + if($_POST['type'] == 1) + $type = "Partial"; + else + $type = "Full"; + + + $body .= "

    Funding Level: " . $type . '

    '; + + $body .= '

    Estimated airfare cost: ' . $_POST['airfare'] . '

    '; + $body .= '

    Estimated loding cost: ' . $_POST['lodging'] . '

    '; + $body .= '

    Estimated other costs: ' . $_POST['other'] . '

    '; + $body .= '

    Reasons for needing funding: ' . $_POST['comments'] . '

    '; + + $body .= ''; + + $headers = 'From: tonic at nondot.org' . "\r\n"; + $headers .= 'Content-Type: text/html; charset="iso-8859-1"'."\n"; + mail($to, $subject, $body, $headers); + + } + + + function processForm() { + $sql = "INSERT into students (lastName, firstName, school, email, level, location, airfare, lodging, other, type, comments) VALUES('$_POST[last]', '$_POST[first]', '$_POST[school]', '$_POST[email]', '$_POST[level]', '$_POST[location]','$_POST[airfare]', '$_POST[lodging]', '$_POST[other]', '$_POST[type]', '$_POST[comments]')"; + mysql_query($sql) or die(mysql_error()); + print 'Your request for funding to attend the LLVM Developers\' Meeting has been submitted. We will contact you once funds have been allocated.

    Please sign up for the LLVM Developers\' Meeting mailing list to receive announcements about the event.

    '; + notify(); + } + + function validateForm() { + $errors = array(); + + // First name must be set. + if ($_POST['first'] == "") + array_push($errors, "First name must be provided"); + + if ($_POST['last'] == "") { + array_push($errors, "Last name must be provided"); + } + if ($_POST['email'] == "") + array_push($errors, "Email must be provided"); + + if ($_POST['school'] == "") + array_push($errors, "School must be provided"); + + if ($_POST['location']=="") + array_push($errors, "Location must be provided"); + + if ($_POST['airfare'] == "") + array_push($errors, "Estimate airfare expense must be provided"); + else { + if ($_POST['airfare'] != strval(intval($_POST['airfare']))) { + array_push($errors, "Estimate airfare expense must be an integer"); + } + } + + + if ($_POST['lodging'] == "") + array_push($errors, "Estimate lodging expense must be provided"); + else { + if ($_POST['lodging'] != strval(intval($_POST['lodging']))) { + array_push($errors, "Estimate lodging expense must be an integer"); + } + } + + if ($_POST['other'] == "") + array_push($errors, "Estimate other expense must be provided"); + else { + if ($_POST['other'] != strval(intval($_POST['other']))) { + array_push($errors, "Estimate other expense must be an integer"); + } + } + + if ($_POST['comments'] == "") + array_push($errors, "Please provide reasons for needing funding"); + + if ($_POST['level'] == "") + array_push($errors, "Please select type of student"); + + if ($_POST['type'] == "") + array_push($errors, "Please select type of support"); + + return $errors; + } + + // Print single line text box. + function inputText($element_name, $size, $maxLength, $values) { + print ''; + } + + // Print text area. + function inputTextarea($element_name, $row, $column, $values) { + print ''; + } + + // Print radio box. + function inputRadiocheck($element_name, + $values, $element_value) { + print ''; + } + + // Specific to our length drop down list. + function inputList($name, $values) { + print ''; + } + + function showForm($errors) { + + if($errors) { + print ''; + print '

    Errors:

    '; + print'
      '; + foreach ($errors as $i) { + print '
    • '; + print $i; + print '
    • '; + } + print '
    '; + } + + print '
    '; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
    First Name: '; + inputText("first", 50, 50, $_POST); + print '
    Last Name: '; + inputText("last", 50, 50, $_POST); + print'
    Email: '; + inputText("email", 50, 75, $_POST); + print '
    School: '; + inputText("school", 50, 100, $_POST); + print '
    Location: '; + inputText("location", 50, 100, $_POST); + print '
    Estimated airfare: '; + inputText("airfare", 50, 100, $_POST); + print '
    Estimated lodging: '; + inputText("lodging", 50, 100, $_POST); + print '
    Estimated other expenses: '; + inputText("other", 50, 100, $_POST); + print '
    '; + print '

    Type of student: '; + inputRadioCheck("level", $_POST, 1); + print ' Undergraduate '; + inputRadioCheck("level", $_POST, 2); + print ' Graduate

    '; + print '

    Amount of funding : '; + inputRadioCheck("type", $_POST, 1); + print ' Partial '; + inputRadioCheck("type", $_POST, 2); + print ' Full

    '; + + print '

    Reasons for needing funding:

    '; + print '

    '; + inputTextArea("comments", 10, 60, $_POST); + print '

    '; + print '

    '; + print ''; + print '
    '; + } + ?> + +
    LLVM Developers' Meeting - Student Funding Request
    + + + + Index: llvm-www/devmtg/talk.php diff -c /dev/null llvm-www/devmtg/talk.php:1.1 *** /dev/null Thu May 22 11:46:24 2008 --- llvm-www/devmtg/talk.php Thu May 22 11:45:49 2008 *************** *** 0 **** --- 1,219 ---- + '; + + $body .= '

    Name: ' . $_POST['first'] . ' ' . $_POST['last'] . '

    '; + $body .= '

    Organization: ' . $_POST['org'] . '

    '; + $body .= '

    Email: ' . $_POST['email'] . '

    '; + $body .= '

    Phone: ' . $_POST['phone'] . '

    '; + $body .= '

    Title: ' . $_POST['title'] . '

    '; + $body .= "

    Summary: " . $_POST['summary'] . '

    '; + + if($_POST['min'] == 1) + $min =20; + else if ($_POST['min'] == 2) + $min = 30; + else if($_POST['min'] == 3) + $min = 45; + else if($_POST['min'] == 4) + $min = 60; + + $body .= '

    Min Length: ' . $min . ' minutes

    '; + + if($_POST['max'] == 1) + $max =20; + else if ($_POST['max'] == 2) + $max = 30; + else if($_POST['max'] == 3) + $max = 45; + else if($_POST['max'] == 4) + $max = 60; + + $body .= '

    Max Length: ' . $max . ' minutes

    '; + + $body .= ''; + + $headers = 'From: tonic at nondot.org' . "\r\n"; + $headers .= 'Content-Type: text/html; charset="iso-8859-1"'."\n"; + mail($to, $subject, $body, $headers); + + } + + + function processForm() { + $sql = "INSERT into presenters (lastName, firstName, organization, email, phone, title, summary, minLength, maxLength) VALUES('$_POST[last]', '$_POST[first]', '$_POST[org]', '$_POST[email]', '$_POST[phone]', '$_POST[title]', '$_POST[summary]','$_POST[min]', '$_POST[max]')"; + mysql_query($sql) or die(mysql_error()); + print 'Congratulations! Your talk proposal for the LLVM Developers\' Meeting has been submitted. We will contact you once the agenda has been finalized.

    Please sign up for the LLVM Developers\' Meeting mailing list to receive announcements about the event.

    '; + notify(); + } + + function validateForm() { + $errors = array(); + + // First name must be set. + if ($_POST['first'] == "") + array_push($errors, "First name must be provided"); + + if ($_POST['last'] == "") { + array_push($errors, "Last name must be provided"); + } + if ($_POST['email'] == "") + array_push($errors, "Email must be provided"); + + if ($_POST['org'] == "") + array_push($errors, "Organization must be provided"); + + if ($_POST['phone']=="") + array_push($errors, "Phone number must be provided"); + + if ($_POST['title'] == "") + array_push($errors, "Please provide talk title"); + + if ($_POST['summary'] == "") + array_push($errors, "Please provide talk summary"); + + + return $errors; + } + + // Print single line text box. + function inputText($element_name, $size, $maxLength, $values) { + print ''; + } + + // Print text area. + function inputTextarea($element_name, $row, $column, $values) { + print ''; + } + + // Print radio box. + function inputRadiocheck($element_name, + $values, $element_value) { + print ''; + } + + // Specific to our length drop down list. + function inputList($name, $values) { + print ''; + } + + function showForm($errors) { + + if($errors) { + print ''; + print '

    Errors:

    '; + print'
      '; + foreach ($errors as $i) { + print '
    • '; + print $i; + print '
    • '; + } + print '
    '; + } + + print '
    '; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
    First Name: '; + inputText("first", 50, 50, $_POST); + print '
    Last Name: '; + inputText("last", 50, 50, $_POST); + print'
    Email: '; + inputText("email", 50, 75, $_POST); + print '
    Organization: '; + inputText("org", 50, 100, $_POST); + print '
    Phone: '; + inputText("phone", 50, 100, $_POST); + print '
    '; + print '

    Mininum talk length: '; + inputList('min', $_POST); + print '

    Maximum talk length: '; + inputList('max', $_POST); + print '

    Talk Title:

    '; + print '

    '; + inputTextArea("title", 5, 60, $_POST); + print '

    '; + print '

    Talk Summary:

    '; + print '

    '; + inputTextArea("summary", 10, 60, $_POST); + print '

    '; + print '

    '; + print ''; + print '
    '; + } + ?> + +
    LLVM Developers' Meeting - Talk Proposal
    + + + + From tonic at nondot.org Thu May 22 11:55:48 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 11:55:48 -0500 Subject: [llvm-commits] CVS: llvm-www/devmtg/index.php Message-ID: <200805221655.m4MGtmPQ007260@zion.cs.uiuc.edu> Changes in directory llvm-www/devmtg: index.php updated: 1.1 -> 1.2 --- Log message: Add hotel information. --- Diffs of the changes: (+16 -3) index.php | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) Index: llvm-www/devmtg/index.php diff -u llvm-www/devmtg/index.php:1.1 llvm-www/devmtg/index.php:1.2 --- llvm-www/devmtg/index.php:1.1 Thu May 22 11:45:49 2008 +++ llvm-www/devmtg/index.php Thu May 22 11:55:30 2008 @@ -128,9 +128,22 @@
    Lodging
    -

    We have blocked a discounted rate at the XXX and XXX. Please reserve your -room early, as the special rate is no long available for reservations made after -XXX.

    +

    We will be securing a special rate and hotel room block. We will post this here and on the +mailing list.

    + +

    The following hotels are within walking distance of the Apple Campus:

    + +

    Cupertino Inn
    +10889 N De Anza Blvd
    +Cupertino, CA 95014
    +(408) 996-7700
    +

    + +

    Cypress Hotel
    +10050 S De Anza Blvd
    +Cupertino, CA 95014
    +(408) 253-8900
    +

    Student Funding

    We have a small amount of funding available to students who need assitance attending the LLVM Developers' meeting. A student may recieve partial or full funding if they agree to give a short talk and write up a blog entry of their experience. Preference is given to students who are active contributers to LLVM or clang.

    From clattner at apple.com Thu May 22 12:18:53 2008 From: clattner at apple.com (Chris Lattner) Date: Thu, 22 May 2008 10:18:53 -0700 Subject: [llvm-commits] [PATCH] Restructure a part of SimplifyCFG In-Reply-To: <20080522160742.GH13165@katherina.student.utwente.nl> References: <20080516141445.GK8631@katherina.student.utwente.nl> <7BADC278-B804-4978-A398-5C605C57CFF6@apple.com> <20080522160742.GH13165@katherina.student.utwente.nl> Message-ID: On May 22, 2008, at 9:07 AM, Matthijs Kooijman wrote: > Hi All, > >> The patch looks great to me, if it passes tests, please apply. > I've pulled the patch through the (nightly) test bench a few times > and there were no > extra failed tests. I also couldn't find any reproducible performance > degradations in the llc and jit runs. > > It does seem that some of the cbe tests suffer some degradation, but > I'm not > sure how important that is. In the particular case I looked at, the > code was > only restructured a little bit, but the removal of a loop preheader > resulted > in a single do { } while(1) structure in the output where there used > to be > two. I guess this throws off gcc's optimizer when recompiling the C > code. > > I'll do a last full test run tonight (to do one thorough check of llc > performance) and commit tomorrow morning. Sounds great. Don't worry too much about CBE performance. It can depend on all sorts of random things in your host C compiler. The CBE needs to be mostly correct because we use it for bugpoint, but perf isn't so important. Thanks Matthijs! -Chris From dalej at apple.com Thu May 22 13:09:35 2008 From: dalej at apple.com (Dale Johannesen) Date: Thu, 22 May 2008 18:09:35 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r51434 - /llvm-gcc-4.2/trunk/gcc/config/i386/i386.md Message-ID: <200805221809.m4MI9Zne010038@zion.cs.uiuc.edu> Author: johannes Date: Thu May 22 13:09:33 2008 New Revision: 51434 URL: http://llvm.org/viewvc/llvm-project?rev=51434&view=rev Log: Remove a warning. Modified: llvm-gcc-4.2/trunk/gcc/config/i386/i386.md Modified: llvm-gcc-4.2/trunk/gcc/config/i386/i386.md URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/i386.md?rev=51434&r1=51433&r2=51434&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/i386/i386.md (original) +++ llvm-gcc-4.2/trunk/gcc/config/i386/i386.md Thu May 22 13:09:33 2008 @@ -19236,7 +19236,7 @@ (define_insn "x86_movdicc_0_m1_rex64" [(set (match_operand:DI 0 "register_operand" "=r") - (if_then_else:DI (match_operand 1 "ix86_carry_flag_operator" "") + (if_then_else:DI (match_operand:DI 1 "ix86_carry_flag_operator" "") (const_int -1) (const_int 0))) (clobber (reg:CC FLAGS_REG))] @@ -19279,7 +19279,7 @@ (define_insn "x86_movsicc_0_m1" [(set (match_operand:SI 0 "register_operand" "=r") - (if_then_else:SI (match_operand 1 "ix86_carry_flag_operator" "") + (if_then_else:SI (match_operand:SI 1 "ix86_carry_flag_operator" "") (const_int -1) (const_int 0))) (clobber (reg:CC FLAGS_REG))] From tonic at nondot.org Thu May 22 13:29:19 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 13:29:19 -0500 Subject: [llvm-commits] CVS: llvm-www/devmtg/index.php Message-ID: <200805221829.m4MITJkg010871@zion.cs.uiuc.edu> Changes in directory llvm-www/devmtg: index.php updated: 1.2 -> 1.3 --- Log message: Add link to mailing list. --- Diffs of the changes: (+3 -0) index.php | 3 +++ 1 files changed, 3 insertions(+) Index: llvm-www/devmtg/index.php diff -u llvm-www/devmtg/index.php:1.2 llvm-www/devmtg/index.php:1.3 --- llvm-www/devmtg/index.php:1.2 Thu May 22 11:55:30 2008 +++ llvm-www/devmtg/index.php Thu May 22 13:28:45 2008 @@ -49,6 +49,9 @@ C-based languages (see information on the meeting's agenda for more information).

    +

    Please sign up for the LLVM Developers' Meeting mailing list +to be sent updates regarding the meeting.

    +
    Registration

    Register NOW!

    From dalej at apple.com Thu May 22 13:30:40 2008 From: dalej at apple.com (Dale Johannesen) Date: Thu, 22 May 2008 11:30:40 -0700 Subject: [llvm-commits] [llvm-gcc-4.2] r51257 - in /llvm-gcc-4.2/trunk/gcc: cgraphunit.c ipa-inline.c passes.c In-Reply-To: <200805220956.33606.baldrick@free.fr> References: <200805191642.m4JGgvVc013244@zion.cs.uiuc.edu> <200805201312.32955.baldrick@free.fr> <7C9BB4B7-2ED0-41BC-B168-F473B5ADBC4F@apple.com> <200805220956.33606.baldrick@free.fr> Message-ID: <666596DB-6C36-4F3B-8E69-2851ADD64243@apple.com> On May 22, 2008, at 12:56 AM, Duncan Sands wrote: > (A) > build/genrecog ../../gcc-4.2.llvm/gcc/config/i386/i386.md \^M > insn-conditions.md > tmp-recog.c^M > ../../gcc-4.2.llvm/gcc/config/i386/i386.md:19280: warning: operand 1 > missing mode?^M Fixed. > (B) > gcc -c -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict- > prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno- > variadic-macros -Wno-overlength-strings -Wold-style-definition - > Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -I. -I. - > I../../gcc-4.2.llvm/gcc -I../../gcc-4.2.llvm/gcc/. -I../../ > gcc-4.2.llvm/gcc/../include -I../../gcc-4.2.llvm/gcc/../libcpp/ > include -I../../gcc-4.2.llvm/gcc/../libdecnumber -I../libdecnumber - > I.../include -I.../llvm/include -DENABLE_LLVM -I.../../llvm/include > -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS \^M > ../../gcc-4.2.llvm/gcc/config/i386/i386.c -o i386.o^M > ../../gcc-4.2.llvm/gcc/config/i386/i386.c: In function > 'ix86_expand_convert_uns_DI2DF_sse':^M > ../../gcc-4.2.llvm/gcc/config/i386/i386.c:10321: warning: large > integer implicitly truncated to unsigned type^M > ../../gcc-4.2.llvm/gcc/config/i386/i386.c: In function > 'ix86_expand_convert_sign_DI2DF_sse':^M > ../../gcc-4.2.llvm/gcc/config/i386/i386.c:10428: warning: large > integer implicitly truncated to unsigned type^M The code is written assuming HOST_WIDE_INT is 64 bits, and it seems to be 32 on Linux x86. I don't understand gcc's floating point representation well enough to fix that properly; however, I'm pretty sure that code is never executed when llvm-gcc is used. So we can just comment out that code when building for LLVM. I'll test that out. Alternatively you can build with HOST_WIDE_INT==64 bits on x86 Linux (which can be done by adding need_64bit_hwint in config.gcc). > (C) > gcc -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes > -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros - > Wno-overlength-strings -Wold-style-definition -Wmissing-format- > attribute -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.2.llvm/ > gcc -I../../gcc-4.2.llvm/gcc/. -I../../gcc-4.2.llvm/gcc/../include - > I../../gcc-4.2.llvm/gcc/../libcpp/include -I../../gcc-4.2.llvm/ > gcc/../libdecnumber -I../libdecnumber -I.../include -I.../llvm/ > include -DENABLE_LLVM -I.../../llvm/include -D_DEBUG -D_GNU_SOURCE > -D__STDC_LIMIT_MACROS \^M > -DTARGET_MACHINE=\"i686-pc-linux-gnu\" \^M > -c ../../gcc-4.2.llvm/gcc/collect2.c -o collect2.o^M > ../../gcc-4.2.llvm/gcc/objc/objc-act.c: In function 'objc_init':^M > ../../gcc-4.2.llvm/gcc/objc/objc-act.c:715: warning: empty body in > an if-statement^M I don't see an obvious way to fix the source. That code is warning about the use of ObjC2 features, which currently don't work anywhere but darwin; so it would be reasonable to enable that warning for Linux targets IMO (in fact, I'm not sure why this wasn't made the default). You can do this by defining OBJC_WARN_OBJC2_FEATURES along the lines of the one in config/darwin.h in some appropriate header. > (D) > build/genchecksum cc1obj-dummy > cc1obj-checksum.c^M > echo | .../gcc/xgcc -B.../gcc/ -B.../i686-pc-linux-gnu/bin/ -B.../ > i686-pc-linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include - > isystem .../i686-pc-linux-gnu/sys-include -E -dM - | \^M > sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \^M > -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \^M > sort -u > tmp-macro_list^M > cc1: warning: unrecognized gcc debugging option: M^M Darwin simply compiles cc1obj-checksum.c using gcc; we don't use whatever script is doing the above. And we don't build the libraries in (E) through (I), so you're on your own there. > (E) > .../gcc/xgcc -B.../gcc/ -B.../i686-pc-linux-gnu/bin/ -B.../i686-pc- > linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include -isystem .../ > i686-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I../../../ > gcc-4.2.llvm/libgfortran -I. -iquote../../../gcc-4.2.llvm/ > libgfortran/io -I../../../gcc-4.2.llvm/libgfortran/../gcc -I../../../ > gcc-4.2.llvm/libgfortran/../gcc/config -I../.././gcc -D_GNU_SOURCE - > std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style- > definition -Wextra -Wwrite-strings -O2 -g -O2 -c ../../../ > gcc-4.2.llvm/libgfortran/runtime/string.c -o string.o^M > ../../../gcc-4.2.llvm/libgfortran/runtime/string.c: In function > 'compare0':^M > ../../../gcc-4.2.llvm/libgfortran/runtime/string.c:47: warning: > comparison between signed and unsigned^M > > (F) > .../gcc/xgcc -shared-libgcc -B.../gcc -nostdinc++ -L..i686-pc-linux- > gnu/libstdc++-v3/src -L..i686-pc-linux-gnu/libstdc++-v3/src/.libs - > B.../i686-pc-linux-gnu/bin/ -B.../i686-pc-linux-gnu/lib/ - > isystem .../i686-pc-linux-gnu/include -isystem .../i686-pc-linux-gnu/ > sys-include -I.../libstdc++-v3/../gcc -I..i686-pc-linux-gnu/libstdc+ > +-v3/include/i686-pc-linux-gnu -I..i686-pc-linux-gnu/libstdc++-v3/ > include -I.../libstdc++-v3/libsupc++ -fno-implicit-templates -Wall - > Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once - > ffunction-sections -fdata-sections -g -O2 -D_GNU_SOURCE - > c ../../../../gcc-4.2.llvm/libstdc++-v3/libsupc++/eh_call.cc -o > eh_call.o^M > .../libstdc++-v3/../gcc/unwind-pe.h:74: warning: 'unsigned int > size_of_encoded_value(unsigned char)' defined but not used^M > > (G) > .../gcc/xgcc -B.../gcc/ -B.../i686-pc-linux-gnu/bin/ -B.../i686-pc- > linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include -isystem .../ > i686-pc-linux-gnu/sys-include -fgnu-runtime -c -I. -I.../libobjc -O2 > -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -DIN_GCC - > DIN_TARGET_LIBS -fno-strict-aliasing -fexceptions -I.../libobjc/objc > -I.../libobjc/../gcc -I.../libobjc/../gcc/config -I../.././gcc -I.../ > libobjc/../include .../libobjc/Object.m -o Object.o^M > .../libobjc/Object.m: In function '-[Object compare:]':^M > .../libobjc/Object.m:124: warning: comparison of distinct pointer > types lacks a cast^M > > (H) > .../gcc/xgcc -B.../gcc/ -B.../i686-pc-linux-gnu/bin/ -B.../i686-pc- > linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include -isystem .../ > i686-pc-linux-gnu/sys-include -c -I. -I.../libobjc -O2 -g -O2 -W - > Wall -Wwrite-strings -Wstrict-prototypes -DIN_GCC -DIN_TARGET_LIBS - > fno-strict-aliasing -fexceptions -I.../libobjc/objc -I.../libobjc/../ > gcc -I.../libobjc/../gcc/config -I../.././gcc -I.../libobjc/../ > include .../libobjc/thr.c -o thr.o^M > .../libobjc/thr.c: In function '__objc_thread_detach_function':^M > .../libobjc/thr.c:117: warning: 'noreturn' function does return^M > > (I) > .../gcc/xgcc -B.../gcc/ -B.../i686-pc-linux-gnu/bin/ -B.../i686-pc- > linux-gnu/lib/ -isystem .../i686-pc-linux-gnu/include -isystem .../ > i686-pc-linux-gnu/sys-include -c -I. -I.../libobjc -O2 -g -O2 -W - > Wall -Wwrite-strings -Wstrict-prototypes -DIN_GCC -DIN_TARGET_LIBS - > fno-strict-aliasing -fexceptions -I.../libobjc/objc -I.../libobjc/../ > gcc -I.../libobjc/../gcc/config -I../.././gcc -I.../libobjc/../ > include .../libobjc/sendmsg.c -o sendmsg.o^M > .../libobjc/sendmsg.c:44:1: warning: "rtx" redefined^M > In file included from .../libobjc/sendmsg.c:33:^M > .../libobjc/../gcc/coretypes.h:75:1: warning: this is the location > of the previous definition^M From tonic at nondot.org Thu May 22 13:38:07 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 13:38:07 -0500 Subject: [llvm-commits] CVS: llvm-www/devmtg/index.php Message-ID: <200805221838.m4MIc7Z1011294@zion.cs.uiuc.edu> Changes in directory llvm-www/devmtg: index.php updated: 1.3 -> 1.4 --- Log message: Remove extra "to"s. --- Diffs of the changes: (+1 -1) index.php | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/devmtg/index.php diff -u llvm-www/devmtg/index.php:1.3 llvm-www/devmtg/index.php:1.4 --- llvm-www/devmtg/index.php:1.3 Thu May 22 13:28:45 2008 +++ llvm-www/devmtg/index.php Thu May 22 13:37:48 2008 @@ -32,7 +32,7 @@

    SPONSORED BY: Apple, Google, Adobe, UIUC

    The meeting serves as a forum for both LLVM -developers and users to get acquainted, to learn how LLVM is used, and to +developers and users to get acquainted, learn how LLVM is used, and exchange ideas about LLVM and its (potential) applications. More broadly, we believe the event will be of particular interest to the following people:

    From tonic at nondot.org Thu May 22 13:40:01 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 13:40:01 -0500 Subject: [llvm-commits] CVS: llvm-www/devmtg/index.php Message-ID: <200805221840.m4MIe1l1011369@zion.cs.uiuc.edu> Changes in directory llvm-www/devmtg: index.php updated: 1.4 -> 1.5 --- Log message: Fix two typos. --- Diffs of the changes: (+1 -1) index.php | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/devmtg/index.php diff -u llvm-www/devmtg/index.php:1.4 llvm-www/devmtg/index.php:1.5 --- llvm-www/devmtg/index.php:1.4 Thu May 22 13:37:48 2008 +++ llvm-www/devmtg/index.php Thu May 22 13:39:43 2008 @@ -149,7 +149,7 @@

    Student Funding
    -

    We have a small amount of funding available to students who need assitance attending the LLVM Developers' meeting. A student may recieve partial or full funding if they agree to give a short talk and write up a blog entry of their experience. Preference is given to students who are active contributers to LLVM or clang.

    +

    We have a small amount of funding available to students who need assitance attending the LLVM Developers' meeting. A student may receive partial or full funding if they agree to give a short talk and write up a blog entry of their experience. Preference is given to students who are active contributors to LLVM or clang.

    If you require financial assistance and are enrolled as a student at the time of the meeting, please submit a funding request.

    From tonic at nondot.org Thu May 22 13:42:06 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 13:42:06 -0500 Subject: [llvm-commits] CVS: llvm-www/devmtg/index.php Message-ID: <200805221842.m4MIg6j3011461@zion.cs.uiuc.edu> Changes in directory llvm-www/devmtg: index.php updated: 1.5 -> 1.6 --- Log message: Fix wording and spelling mistakes. --- Diffs of the changes: (+2 -2) index.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-www/devmtg/index.php diff -u llvm-www/devmtg/index.php:1.5 llvm-www/devmtg/index.php:1.6 --- llvm-www/devmtg/index.php:1.5 Thu May 22 13:39:43 2008 +++ llvm-www/devmtg/index.php Thu May 22 13:41:48 2008 @@ -98,7 +98,7 @@

    The meeting is tentatively scheduled between 8:00 AM and 5:00 PM Pacific Time.

    -

    The schedule of talks has not yet been decided. If you are interested in +

    The schedule of talks has not yet been determined. If you are interested in speaking, please let us know what topic you'd like to present.

    @@ -149,7 +149,7 @@

    Student Funding
    -

    We have a small amount of funding available to students who need assitance attending the LLVM Developers' meeting. A student may receive partial or full funding if they agree to give a short talk and write up a blog entry of their experience. Preference is given to students who are active contributors to LLVM or clang.

    +

    We have a small amount of funding available to students who need assistance attending the LLVM Developers' meeting. A student may receive partial or full funding if they agree to give a short talk and write up a blog entry of their experience. Preference is given to students who are active contributors to LLVM or clang.

    If you require financial assistance and are enrolled as a student at the time of the meeting, please submit a funding request.

    From evan.cheng at apple.com Thu May 22 13:56:56 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 22 May 2008 18:56:56 -0000 Subject: [llvm-commits] [llvm] r51435 - in /llvm/trunk: lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/vec_set-I.ll Message-ID: <200805221856.m4MIuvQe011892@zion.cs.uiuc.edu> Author: evancheng Date: Thu May 22 13:56:56 2008 New Revision: 51435 URL: http://llvm.org/viewvc/llvm-project?rev=51435&view=rev Log: Add missing patterns. Added: llvm/trunk/test/CodeGen/X86/vec_set-I.ll Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=51435&r1=51434&r2=51435&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Thu May 22 13:56:56 2008 @@ -2351,6 +2351,12 @@ [(set VR128:$dst, (v4i32 (X86vzmovl (v4i32 (scalar_to_vector (loadi32 addr:$src))))))]>; + +def : Pat<(v4i32 (X86vzmovl (loadv4i32 addr:$src))), + (MOVZDI2PDIrm addr:$src)>; +def : Pat<(v4i32 (X86vzmovl (bc_v4i32 (loadv4f32 addr:$src)))), + (MOVZDI2PDIrm addr:$src)>; + def MOVZQI2PQIrm : I<0x7E, MRMSrcMem, (outs VR128:$dst), (ins i64mem:$src), "movq\t{$src, $dst|$dst, $src}", [(set VR128:$dst, @@ -2358,6 +2364,10 @@ (loadi64 addr:$src))))))]>, XS, Requires<[HasSSE2]>; +def : Pat<(v2i64 (X86vzmovl (loadv2i64 addr:$src))), + (MOVZQI2PQIrm addr:$src)>; +def : Pat<(v2i64 (X86vzmovl (bc_v2i64 (loadv4f32 addr:$src)))), + (MOVZQI2PQIrm addr:$src)>; def : Pat<(v2i64 (X86vzload addr:$src)), (MOVZQI2PQIrm addr:$src)>; } Added: llvm/trunk/test/CodeGen/X86/vec_set-I.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_set-I.ll?rev=51435&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/vec_set-I.ll (added) +++ llvm/trunk/test/CodeGen/X86/vec_set-I.ll Thu May 22 13:56:56 2008 @@ -0,0 +1,10 @@ +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movd +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep xorp + +define void @t1() nounwind { + %tmp298.i.i = load <4 x float>* null, align 16 + %tmp304.i.i = bitcast <4 x float> %tmp298.i.i to <4 x i32> + %tmp305.i.i = and <4 x i32> %tmp304.i.i, < i32 -1, i32 0, i32 0, i32 0 > + store <4 x i32> %tmp305.i.i, <4 x i32>* null, align 16 + unreachable +} From ggreif at gmail.com Thu May 22 14:24:54 2008 From: ggreif at gmail.com (Gabor Greif) Date: Thu, 22 May 2008 19:24:54 -0000 Subject: [llvm-commits] [llvm] r51436 - in /llvm/trunk/lib/Analysis: ConstantFolding.cpp LoadValueNumbering.cpp Message-ID: <200805221924.m4MJOtMZ012713@zion.cs.uiuc.edu> Author: ggreif Date: Thu May 22 14:24:54 2008 New Revision: 51436 URL: http://llvm.org/viewvc/llvm-project?rev=51436&view=rev Log: transform more loops to iterator form, detabify Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp llvm/trunk/lib/Analysis/LoadValueNumbering.cpp Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ConstantFolding.cpp?rev=51436&r1=51435&r2=51436&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ConstantFolding.cpp (original) +++ llvm/trunk/lib/Analysis/ConstantFolding.cpp Thu May 22 14:24:54 2008 @@ -66,7 +66,7 @@ // Otherwise, add any offset that our operands provide. gep_type_iterator GTI = gep_type_begin(CE); for (User::const_op_iterator i = CE->op_begin() + 1, e = CE->op_end(); - i != e; ++i, ++GTI) { + i != e; ++i, ++GTI) { ConstantInt *CI = dyn_cast(*i); if (!CI) return false; // Index isn't a simple constant? if (CI->getZExtValue() == 0) continue; // Not adding anything. Modified: llvm/trunk/lib/Analysis/LoadValueNumbering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoadValueNumbering.cpp?rev=51436&r1=51435&r2=51436&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/LoadValueNumbering.cpp (original) +++ llvm/trunk/lib/Analysis/LoadValueNumbering.cpp Thu May 22 14:24:54 2008 @@ -158,10 +158,10 @@ // global. In particular, we would prefer to have an argument or instruction // operand to chase the def-use chains of. Value *Op = CF; - for (unsigned i = 1, e = CI->getNumOperands(); i != e; ++i) - if (isa(CI->getOperand(i)) || - isa(CI->getOperand(i))) { - Op = CI->getOperand(i); + for (User::op_iterator i = CI->op_begin() + 1, e = CI->op_end(); i != e; ++i) + if (isa(*i) || + isa(*i)) { + Op = *i; break; } @@ -176,8 +176,9 @@ C->getOperand(0) == CI->getOperand(0) && C->getParent()->getParent() == CIFunc && C != CI) { bool AllOperandsEqual = true; - for (unsigned i = 1, e = CI->getNumOperands(); i != e; ++i) - if (C->getOperand(i) != CI->getOperand(i)) { + for (User::op_iterator i = CI->op_begin() + 1, j = C->op_begin() + 1, + e = CI->op_end(); i != e; ++i, ++j) + if (*j != *i) { AllOperandsEqual = false; break; } From tonic at nondot.org Thu May 22 15:08:59 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 15:08:59 -0500 Subject: [llvm-commits] CVS: llvm-www/devmtg/index.php Message-ID: <200805222008.m4MK8x4f013907@zion.cs.uiuc.edu> Changes in directory llvm-www/devmtg: index.php updated: 1.6 -> 1.7 --- Log message: Add registration and talk deadlines. --- Diffs of the changes: (+2 -2) index.php | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm-www/devmtg/index.php diff -u llvm-www/devmtg/index.php:1.6 llvm-www/devmtg/index.php:1.7 --- llvm-www/devmtg/index.php:1.6 Thu May 22 13:41:48 2008 +++ llvm-www/devmtg/index.php Thu May 22 15:08:40 2008 @@ -54,7 +54,7 @@
    Registration
    -

    Register NOW!

    +

    Register NOW! (Registration deadline is July 20, 2008)

    Attendance is free and open to everyone, but we ask that everyone planning on attending to register so that we get a rough @@ -94,7 +94,7 @@

    Agenda
    -

    Volunteer to give a talk!

    +

    Volunteer to give a talk! (All talk proposals must be received by June 30, 2008)

    The meeting is tentatively scheduled between 8:00 AM and 5:00 PM Pacific Time.

    From tonic at nondot.org Thu May 22 15:12:23 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 15:12:23 -0500 Subject: [llvm-commits] CVS: llvm-www/devmtg/register.php Message-ID: <200805222012.m4MKCNN3014024@zion.cs.uiuc.edu> Changes in directory llvm-www/devmtg: register.php updated: 1.1 -> 1.2 --- Log message: Try to get sidebar width somewhat correct. --- Diffs of the changes: (+1 -1) register.php | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/devmtg/register.php diff -u llvm-www/devmtg/register.php:1.1 llvm-www/devmtg/register.php:1.2 --- llvm-www/devmtg/register.php:1.1 Thu May 22 11:45:49 2008 +++ llvm-www/devmtg/register.php Thu May 22 15:12:05 2008 @@ -137,7 +137,7 @@ } print '
    '; -print ''; +print '
    '; print ''; print '
    First Name: '; inputText("first", 50, 50, $_POST); From tonic at nondot.org Thu May 22 15:12:55 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 15:12:55 -0500 Subject: [llvm-commits] CVS: llvm-www/devmtg/talk.php Message-ID: <200805222012.m4MKCtUw014065@zion.cs.uiuc.edu> Changes in directory llvm-www/devmtg: talk.php updated: 1.1 -> 1.2 --- Log message: Set table width. --- Diffs of the changes: (+1 -1) talk.php | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/devmtg/talk.php diff -u llvm-www/devmtg/talk.php:1.1 llvm-www/devmtg/talk.php:1.2 --- llvm-www/devmtg/talk.php:1.1 Thu May 22 11:45:49 2008 +++ llvm-www/devmtg/talk.php Thu May 22 15:12:36 2008 @@ -154,7 +154,7 @@ } print ''; -print ''; +print '
    '; print ''; print ''; print ''; -print ''; print ''; From tonic at nondot.org Thu May 22 16:50:42 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 16:50:42 -0500 Subject: [llvm-commits] CVS: llvm-www/devmtg/index.php Message-ID: <200805222150.m4MLog5r018557@zion.cs.uiuc.edu> Changes in directory llvm-www/devmtg: index.php updated: 1.9 -> 1.10 --- Log message: Fix typo. --- Diffs of the changes: (+1 -1) index.php | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/devmtg/index.php diff -u llvm-www/devmtg/index.php:1.9 llvm-www/devmtg/index.php:1.10 --- llvm-www/devmtg/index.php:1.9 Thu May 22 16:48:31 2008 +++ llvm-www/devmtg/index.php Thu May 22 16:50:23 2008 @@ -56,7 +56,7 @@
    Questions?
    -

    If you have any questions, please feel free to <contact the LLVM Developers' Meeting organizers.

    +

    If you have any questions, please feel free to contact the LLVM Developers' Meeting organizers.

    Registration
    From gohman at apple.com Thu May 22 17:24:27 2008 From: gohman at apple.com (Dan Gohman) Date: Thu, 22 May 2008 22:24:27 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r51447 - in /llvm-gcc-4.2/trunk/gcc: config/i386/llvm-i386.cpp llvm-abi.h llvm-backend.cpp llvm-convert.cpp Message-ID: <200805222224.m4MMOR6X020504@zion.cs.uiuc.edu> Author: djg Date: Thu May 22 17:24:27 2008 New Revision: 51447 URL: http://llvm.org/viewvc/llvm-project?rev=51447&view=rev Log: Change uses of llvm::Type::isFirstClassType to use the new llvm::Type::isSingleValueType. Currently these two functions have the same behavior, but soon isFirstClassType will return true for struct and array types. llvm-gcc may some day want to use of isFirstClassType for some of these some day as an optimization, but it'll require some consideration. Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp llvm-gcc-4.2/trunk/gcc/llvm-abi.h llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp?rev=51447&r1=51446&r2=51447&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Thu May 22 17:24:27 2008 @@ -872,7 +872,7 @@ const Type *ETy = STy->getElementType(i); if (const ArrayType *ATy = dyn_cast(ETy)) ETy = ATy->getElementType(); - if (!ETy->isFirstClassType() && ETy->getTypeID() != Type::X86_FP80TyID) + if (!ETy->isSingleValueType() && ETy->getTypeID() != Type::X86_FP80TyID) return false; if (ETy->isInteger()) foundInt = true; @@ -1142,7 +1142,7 @@ const Type *DestElemType = DestTy->getElementType(DNO); // Directly access first class values using getresult. - if (DestElemType->isFirstClassType()) { + if (DestElemType->isSingleValueType()) { Value *GEP = Builder.CreateStructGEP(Dest, DNO, "mrv_gep"); GetResultInst *GR = Builder.CreateGetResult(Src, SNO, "mrv_gr"); Builder.CreateStore(GR, GEP, isVolatile); Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-abi.h?rev=51447&r1=51446&r2=51447&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-abi.h (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-abi.h Thu May 22 17:24:27 2008 @@ -363,7 +363,7 @@ C.HandleScalarShadowArgument(PointerType::getUnqual(Ty), false); else C.HandleScalarResult(Ty); - } else if (Ty->isFirstClassType() || Ty == Type::VoidTy) { + } else if (Ty->isSingleValueType() || Ty == Type::VoidTy) { // Return scalar values normally. C.HandleScalarResult(Ty); } else if (doNotUseShadowReturn(type, fn)) { @@ -417,7 +417,7 @@ C.HandleScalarArgument(Ty, type); ScalarElts.push_back(Ty); } - } else if (Ty->isFirstClassType()) { + } else if (Ty->isSingleValueType()) { C.HandleScalarArgument(Ty, type); ScalarElts.push_back(Ty); } else if (LLVM_SHOULD_PASS_AGGREGATE_IN_MIXED_REGS(type, Ty, Elts)) { Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=51447&r1=51446&r2=51447&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Thu May 22 17:24:27 2008 @@ -1078,7 +1078,7 @@ #endif else if (DECL_INITIAL(decl) != 0 && TREE_STATIC(decl)) error("global register variable has initial value"); - else if (!Ty->isFirstClassType()) + else if (!Ty->isSingleValueType()) sorry("%JLLVM cannot handle register variable %qD, report a bug", decl, decl); else { Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=51447&r1=51446&r2=51447&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Thu May 22 17:24:27 2008 @@ -709,7 +709,7 @@ const Type *ArgTy = ConvertType(TREE_TYPE(Args)); bool isInvRef = isPassedByInvisibleReference(TREE_TYPE(Args)); if (isInvRef || - (!ArgTy->isFirstClassType() && + (!ArgTy->isSingleValueType() && isPassedByVal(TREE_TYPE(Args), ArgTy, ScalarArgs))) { // If the value is passed by 'invisible reference' or 'byval reference', // the l-value for the argument IS the argument itself. @@ -1296,7 +1296,7 @@ unsigned Alignment = std::min(DestLoc.Alignment, SrcLoc.Alignment); - if (ElTy->isFirstClassType()) { + if (ElTy->isSingleValueType()) { LoadInst *V = Builder.CreateLoad(SrcLoc.Ptr, SrcLoc.Volatile, "tmp"); StoreInst *S = Builder.CreateStore(V, DestLoc.Ptr, DestLoc.Volatile); V->setAlignment(Alignment); @@ -1330,7 +1330,7 @@ /// CountAggregateElements - Return the number of elements in the specified type /// that will need to be loaded/stored if we copy this by explicit accesses. static unsigned CountAggregateElements(const Type *Ty) { - if (Ty->isFirstClassType()) return 1; + if (Ty->isSingleValueType()) return 1; if (const StructType *STy = dyn_cast(Ty)) { unsigned NumElts = 0; @@ -1381,7 +1381,7 @@ static void ZeroAggregate(MemRef DestLoc, IRBuilder &Builder) { const Type *ElTy = cast(DestLoc.Ptr->getType())->getElementType(); - if (ElTy->isFirstClassType()) { + if (ElTy->isSingleValueType()) { StoreInst *St = Builder.CreateStore(Constant::getNullValue(ElTy), DestLoc.Ptr, DestLoc.Volatile); St->setAlignment(DestLoc.Alignment); @@ -2648,7 +2648,7 @@ const Type *ArgTy = ConvertType(TREE_TYPE(TREE_VALUE(arg))); // Push the argument. - if (ArgTy->isFirstClassType()) { + if (ArgTy->isSingleValueType()) { // A scalar - push the value. Client.pushValue(Emit(TREE_VALUE(arg), 0)); } else { @@ -2836,7 +2836,7 @@ if (!LV.isBitfield()) { const Type *ValTy = ConvertType(TREE_TYPE(rhs)); - if (ValTy->isFirstClassType()) { + if (ValTy->isSingleValueType()) { // Non-bitfield, scalar value. Just emit a store. Value *RHS = Emit(rhs, 0); // Convert RHS to the right type if we can, otherwise convert the pointer. @@ -3200,7 +3200,7 @@ return EmitPtrBinOp(exp, Opc); // Pointer arithmetic! if (isa(Ty)) return EmitComplexBinOp(exp, DestLoc); - assert(Ty->isFirstClassType() && DestLoc == 0 && + assert(Ty->isSingleValueType() && DestLoc == 0 && "Bad binary operation!"); Value *LHS = Emit(TREE_OPERAND(exp, 0), 0); @@ -3617,7 +3617,7 @@ // If there was an error, return something bogus. if (ValidateRegisterVariable(decl)) { - if (Ty->isFirstClassType()) + if (Ty->isSingleValueType()) return UndefValue::get(Ty); return 0; // Just don't copy something into DestLoc. } @@ -3920,7 +3920,7 @@ cast(Dest.Ptr->getType())->getElementType(); assert(!Dest.isBitfield() && "Cannot assign into a bitfield!"); - if (!AllowsMem && DestValTy->isFirstClassType()) { // Reg dest -> asm return + if (!AllowsMem && DestValTy->isSingleValueType()) { // Reg dest -> asm return StoreCallResultAddrs.push_back(Dest.Ptr); ConstraintStr += ",="; ConstraintStr += SimplifiedConstraint; @@ -3955,7 +3955,7 @@ const Type *LLVMTy = ConvertType(type); Value *Op = 0; - if (LLVMTy->isFirstClassType()) { + if (LLVMTy->isSingleValueType()) { if (TREE_CODE(Val)==ADDR_EXPR && TREE_CODE(TREE_OPERAND(Val,0))==LABEL_DECL) { // Emit the label, but do not assume it is going to be the target @@ -4247,7 +4247,7 @@ error("%Hunsupported target builtin %<%s%> used", &EXPR_LOCATION(exp), BuiltinName); const Type *ResTy = ConvertType(TREE_TYPE(exp)); - if (ResTy->isFirstClassType()) + if (ResTy->isSingleValueType()) Result = UndefValue::get(ResTy); return true; } @@ -5694,7 +5694,7 @@ return BuildVector(BuildVecOps); } - assert(!Ty->isFirstClassType() && "Constructor for scalar type??"); + assert(!Ty->isSingleValueType() && "Constructor for scalar type??"); // Start out with the value zero'd out. EmitAggregateZero(*DestLoc, type); @@ -5722,7 +5722,7 @@ if (!tree_purpose) return 0; // Not actually initialized? - if (!ConvertType(TREE_TYPE(tree_purpose))->isFirstClassType()) { + if (!ConvertType(TREE_TYPE(tree_purpose))->isSingleValueType()) { Value *V = Emit(tree_value, DestLoc); assert(V == 0 && "Aggregate value returned in a register?"); } else { @@ -5927,7 +5927,7 @@ bool TyIsSigned = !TYPE_UNSIGNED(TREE_TYPE(exp)); // If this is a structure-to-structure cast, just return the uncasted value. - if (!Elt->getType()->isFirstClassType() || !Ty->isFirstClassType()) + if (!Elt->getType()->isSingleValueType() || !Ty->isSingleValueType()) return Elt; // Elt and Ty can be integer, float or pointer here: need generalized cast From gohman at apple.com Thu May 22 17:30:10 2008 From: gohman at apple.com (Dan Gohman) Date: Thu, 22 May 2008 22:30:10 -0000 Subject: [llvm-commits] [llvm] r51448 - /llvm/trunk/lib/AsmParser/LLLexer.cpp Message-ID: <200805222230.m4MMUAe3020860@zion.cs.uiuc.edu> Author: djg Date: Thu May 22 17:30:09 2008 New Revision: 51448 URL: http://llvm.org/viewvc/llvm-project?rev=51448&view=rev Log: Recognize the "default" keyword, which is documented in LangRef.html and supported in the grammar, in the lexer. Modified: llvm/trunk/lib/AsmParser/LLLexer.cpp Modified: llvm/trunk/lib/AsmParser/LLLexer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLLexer.cpp?rev=51448&r1=51447&r2=51448&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/LLLexer.cpp (original) +++ llvm/trunk/lib/AsmParser/LLLexer.cpp Thu May 22 17:30:09 2008 @@ -452,6 +452,7 @@ KEYWORD("dllimport", DLLIMPORT); KEYWORD("dllexport", DLLEXPORT); KEYWORD("common", COMMON); + KEYWORD("default", DEFAULT); KEYWORD("hidden", HIDDEN); KEYWORD("protected", PROTECTED); KEYWORD("extern_weak", EXTERN_WEAK); From tonic at nondot.org Thu May 22 17:38:02 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 17:38:02 -0500 Subject: [llvm-commits] CVS: llvm-www/www-index.html Message-ID: <200805222238.m4MMc2sE021330@zion.cs.uiuc.edu> Changes in directory llvm-www: www-index.html updated: 1.155 -> 1.156 --- Log message: Update link to devmtg. --- Diffs of the changes: (+1 -1) www-index.html | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/www-index.html diff -u llvm-www/www-index.html:1.155 llvm-www/www-index.html:1.156 --- llvm-www/www-index.html:1.155 Wed Apr 16 17:38:02 2008 +++ llvm-www/www-index.html Thu May 22 17:37:43 2008 @@ -133,7 +133,7 @@
    Upcoming Meeting
    -

    We are planning this year's developer meeting. Please provide input and let us know if you are interested in attending.

    +

    We are planning this year's developer meeting. Please provide input and let us know if you are interested in attending.


    From tonic at nondot.org Thu May 22 17:39:57 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 17:39:57 -0500 Subject: [llvm-commits] CVS: llvm-www/header.incl Message-ID: <200805222239.m4MMdvpG021479@zion.cs.uiuc.edu> Changes in directory llvm-www: header.incl updated: 1.66 -> 1.67 --- Log message: Update link. --- Diffs of the changes: (+1 -1) header.incl | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/header.incl diff -u llvm-www/header.incl:1.66 llvm-www/header.incl:1.67 --- llvm-www/header.incl:1.66 Tue Feb 12 01:29:47 2008 +++ llvm-www/header.incl Thu May 22 17:39:39 2008 @@ -92,7 +92,7 @@ Developer Mtgs From gohman at apple.com Thu May 22 17:45:03 2008 From: gohman at apple.com (Dan Gohman) Date: Thu, 22 May 2008 22:45:03 -0000 Subject: [llvm-commits] [llvm] r51449 - /llvm/trunk/utils/llvm.grm Message-ID: <200805222245.m4MMj3we021788@zion.cs.uiuc.edu> Author: djg Date: Thu May 22 17:45:03 2008 New Revision: 51449 URL: http://llvm.org/viewvc/llvm-project?rev=51449&view=rev Log: Add a polygen grammar definition for LLVM assembly language. Added: llvm/trunk/utils/llvm.grm Added: llvm/trunk/utils/llvm.grm URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm.grm?rev=51449&view=auto ============================================================================== --- llvm/trunk/utils/llvm.grm (added) +++ llvm/trunk/utils/llvm.grm Thu May 22 17:45:03 2008 @@ -0,0 +1,376 @@ +(* + +polygen grammar for LLVM assembly language. + +This file defines an LLVM assembly language grammar for polygen, +which is a tool for generating random text based on a grammar. +It is strictly syntax-based, and makes no attempt to generate +IR that is semantically valid. Most of the IR produced doesn't +pass the Verifier. + +*) + +I ::= "title: LLVM assembly language\n" + ^ "status: experimental\n" + ^ "audience: LLVM developers\n" +; + +S ::= Module ; + +(* +Define rules for non-keyword tokens. This is currently just a bunch +of hacks. They don't cover many valid forms of tokens, and they also +generate some invalid forms of tokens. The LLVM parser has custom +C++ code to lex these; custom C++ code for emitting them would be +convenient, but polygen doesn't support that. +*) +NonZeroDecimalDigit ::= 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ; +DecimalDigit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ; +DecimalDigitSeq ::= DecimalDigit [^ DecimalDigitSeq ]; +HexDigit ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 + | a | b | c | d | e | f ; +HexDigitSeq ::= HexDigit [^ HexDigitSeq ]; +StringChar ::= a | b | c | d | e | f | g | h | i | j | k | l | m + | n | o | p | q | r | s | t | u | v | w | x | y | z ; +StringConstantSeq ::= StringChar [^ StringConstantSeq ]; +StringConstant ::= StringChar [^ StringConstantSeq ]; +EUINT64VAL ::= NonZeroDecimalDigit [^ DecimalDigitSeq ]; +ESINT64VAL ::= [ "-" ] ^ EUINT64VAL ; +EUAPINTVAL ::= EUINT64VAL ; +ESAPINTVAL ::= ESINT64VAL ; +LOCALVALID ::= "%" ^ DecimalDigitSeq ; +GLOBALVALID ::= "@" ^ DecimalDigitSeq ; +INTTYPE ::= "i" ^ EUINT64VAL ; +GLOBALVAR ::= "@" ^ StringConstant ; +LOCALVAR ::= "%" ^ StringConstant ; +STRINGCONSTANT ::= "\"" ^ StringConstant ^ "\"" ; +ATSTRINGCONSTANT ::= "@" ^ STRINGCONSTANT ; +PCTSTRINGCONSTANT ::= "%" ^ STRINGCONSTANT ; +LABELSTR ::= StringConstant ; +FPVAL ::= ESAPINTVAL ^ "." ^ EUAPINTVAL | "0x" ^ HexDigitSeq ; + +(* +The rest of this file is derived directly from llvmAsmParser.y. +*) + +ArithmeticOps ::= add | sub | mul | udiv | sdiv | fdiv | urem | srem | frem ; +LogicalOps ::= shl | lshr | ashr | and | or | xor; +CastOps ::= trunc | zext | sext | fptrunc | fpext | bitcast | + uitofp | sitofp | fptoui | fptosi | inttoptr | ptrtoint ; + +IPredicates ::= eq | ne | slt | sgt | sle | sge | ult | ugt | ule | uge ; + +FPredicates ::= oeq | one | olt | ogt | ole | oge | ord | uno | ueq | une + | ult | ugt | ule | uge | true | false ; + +IntType ::= INTTYPE; +FPType ::= float | double | "ppc_fp128" | fp128 | "x86_fp80"; + +LocalName ::= LOCALVAR | STRINGCONSTANT | PCTSTRINGCONSTANT ; +OptLocalName ::= LocalName | _ ; + +OptAddrSpace ::= - addrspace "(" ^ EUINT64VAL ^ ")" | _ ; + +OptLocalAssign ::= LocalName "=" | _ ; + +GlobalName ::= GLOBALVAR | ATSTRINGCONSTANT ; + +OptGlobalAssign ::= GlobalAssign | _ ; + +GlobalAssign ::= GlobalName "=" ; + +GVInternalLinkage + ::= + internal + | weak + | linkonce + | appending + | dllexport + | common + ; + +GVExternalLinkage + ::= dllimport + | "extern_weak" + | + external + ; + +GVVisibilityStyle + ::= + _ + | default + | hidden + | protected + ; + +FunctionDeclareLinkage + ::= + _ + | dllimport + | "extern_weak" + ; + +FunctionDefineLinkage + ::= + _ + | internal + | linkonce + | weak + | dllexport + ; + +AliasLinkage ::= + _ | weak | internal ; + +OptCallingConv ::= + _ | + ccc | + fastcc | + coldcc | + "x86_stdcallcc" | + "x86_fastcallcc" | + cc EUINT64VAL ; + +ParamAttr ::= zeroext + | zext + | signext + | sext + | inreg + | sret + | noalias + | byval + | nest + | align EUINT64VAL + ; + +OptParamAttrs ::= + _ | OptParamAttrs ParamAttr ; + +FuncAttr ::= noreturn + | nounwind + | zeroext + | signext + | readnone + | readonly + ; + +OptFuncAttrs ::= + _ | OptFuncAttrs FuncAttr ; + +OptGC ::= + _ | gc STRINGCONSTANT ; + +OptAlign ::= + _ | align EUINT64VAL ; +OptCAlign ::= + _ | ^ "," align EUINT64VAL ; + +SectionString ::= section STRINGCONSTANT ; + +OptSection ::= + _ | SectionString ; + +GlobalVarAttributes ::= + _ | ^ "," GlobalVarAttribute GlobalVarAttributes ; +GlobalVarAttribute ::= SectionString | align EUINT64VAL ; + +PrimType ::= INTTYPE | float | double | "ppc_fp128" | fp128 | "x86_fp80" + | - label ; + +Types + ::= opaque + | PrimType + | Types OptAddrSpace ^ "*" + | SymbolicValueRef + | "\\" ^ EUINT64VAL + | Types "(" ^ ArgTypeListI ^ ")" OptFuncAttrs + | void "(" ^ ArgTypeListI ^ ")" OptFuncAttrs + | "[" ^ EUINT64VAL "x" Types ^ "]" + | "<" ^ EUINT64VAL "x" Types ^ ">" + | "{" TypeListI "}" + | "{" "}" + | "<" ^ "{" TypeListI "}" ^ ">" + | "<" ^ "{" "}" ^ ">" + ; + +ArgType ::= Types OptParamAttrs ; + +ResultTypes ::= Types | void ; + +ArgTypeList ::= ArgType | ArgTypeList ^ "," ArgType ; + +ArgTypeListI ::= ArgTypeList | ArgTypeList ^ "," "..." | "..." | _ ; + +TypeListI ::= Types | TypeListI ^ "," Types ; + +ConstVal::= Types "[" ^ ConstVector ^ "]" + | Types "[" "]" + | Types "c" ^ STRINGCONSTANT + | Types "<" ^ ConstVector ^ ">" + | Types "{" ConstVector "}" + | Types "{" "}" + | Types "<" ^ "{" ConstVector "}" ^ ">" + | Types "<" ^ "{" "}" ^ ">" + | Types null + | Types undef + | Types SymbolicValueRef + | Types ConstExpr + | Types zeroinitializer + | IntType ESINT64VAL + | IntType ESAPINTVAL + | IntType EUINT64VAL + | IntType EUAPINTVAL + | INTTYPE true + | INTTYPE false + | FPType FPVAL ; + +ConstExpr::= CastOps "(" ^ ConstVal to Types ^ ")" + | getelementptr "(" ^ ConstVal IndexList ^ ")" + | select "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")" + | ArithmeticOps "(" ^ ConstVal ^ "," ConstVal ^ ")" + | LogicalOps "(" ^ ConstVal ^ "," ConstVal ^ ")" + | icmp IPredicates "(" ^ ConstVal ^ "," ConstVal ^ ")" + | fcmp FPredicates "(" ^ ConstVal ^ "," ConstVal ^ ")" + | vicmp IPredicates "(" ^ ConstVal ^ "," ConstVal ^ ")" + | vfcmp FPredicates "(" ^ ConstVal ^ "," ConstVal ^ ")" + | extractelement "(" ^ ConstVal ^ "," ConstVal ^ ")" + | insertelement "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")" + | shufflevector "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")" ; + +ConstVector ::= ConstVector ^ "," ConstVal | ConstVal ; + +GlobalType ::= global | constant ; + +ThreadLocal ::= - "thread_local" | _ ; + +AliaseeRef ::= ResultTypes SymbolicValueRef + | bitcast "(" ^ AliaseeRef to Types ^ ")" ; + +Module ::= +++ DefinitionList | --- _ ; + +DefinitionList ::= - Definition | + DefinitionList Definition ; + +Definition + ::= ^ ( +++++ define Function + | declare FunctionProto + | - module asm AsmBlock + | OptLocalAssign type Types + | OptLocalAssign type void + | OptGlobalAssign GVVisibilityStyle ThreadLocal GlobalType ConstVal + OptAddrSpace GlobalVarAttributes + | OptGlobalAssign GVInternalLinkage GVVisibilityStyle ThreadLocal GlobalType + ConstVal OptAddrSpace GlobalVarAttributes + | OptGlobalAssign GVExternalLinkage GVVisibilityStyle ThreadLocal GlobalType + Types OptAddrSpace GlobalVarAttributes + | OptGlobalAssign GVVisibilityStyle alias AliasLinkage AliaseeRef + | target TargetDefinition + | deplibs "=" LibrariesDefinition + ) ^ "\n"; + +AsmBlock ::= STRINGCONSTANT ; + +TargetDefinition ::= triple "=" STRINGCONSTANT + | datalayout "=" STRINGCONSTANT ; + +LibrariesDefinition ::= "[" LibList "]"; + +LibList ::= LibList ^ "," STRINGCONSTANT | STRINGCONSTANT | _ ; + +ArgListH ::= ArgListH ^ "," Types OptParamAttrs OptLocalName + | Types OptParamAttrs OptLocalName ; + +ArgList ::= ArgListH | ArgListH ^ "," "..." | "..." | _ ; + +FunctionHeaderH ::= OptCallingConv ResultTypes GlobalName "(" ^ ArgList ^ ")" + OptFuncAttrs OptSection OptAlign OptGC ; + +BEGIN ::= ( begin | "{" ) ^ "\n"; + +FunctionHeader ::= + FunctionDefineLinkage GVVisibilityStyle FunctionHeaderH BEGIN ; + +END ::= ^ ( end | "}" ) ^ "\n"; + +Function ::= BasicBlockList END ; + +FunctionProto ::= FunctionDeclareLinkage GVVisibilityStyle FunctionHeaderH ; + +OptSideEffect ::= _ | sideeffect ; + +ConstValueRef ::= ESINT64VAL + | EUINT64VAL + | FPVAL + | true + | false + | null + | undef + | zeroinitializer + | "<" ConstVector ">" + | ConstExpr + | asm OptSideEffect STRINGCONSTANT ^ "," STRINGCONSTANT ; + +SymbolicValueRef ::= LOCALVALID + | GLOBALVALID + | LocalName + | GlobalName ; + +ValueRef ::= SymbolicValueRef | ConstValueRef; + +ResolvedVal ::= Types ValueRef ; + +ReturnedVal ::= ResolvedVal | ReturnedVal ^ "," ResolvedVal ; + +BasicBlockList ::= BasicBlockList BasicBlock | FunctionHeader BasicBlock ; + +BasicBlock ::= InstructionList OptLocalAssign BBTerminatorInst ; + +InstructionList ::= +++ InstructionList Inst + | - _ + | ^ LABELSTR ^ ":\n" ; + +BBTerminatorInst ::= ^ " " ^ + ( ret ReturnedVal + | ret void + | br label ValueRef + | br INTTYPE ValueRef ^ "," label ValueRef ^ "," label ValueRef + | switch IntType ValueRef ^ "," label ValueRef "[" JumpTable "]" + | switch IntType ValueRef ^ "," label ValueRef "[" "]" + | invoke OptCallingConv ResultTypes ValueRef "(" ^ ParamList ^ ")" OptFuncAttrs + to label ValueRef unwind label ValueRef + | unwind + | unreachable ) ^ "\n"; + +JumpTable ::= JumpTable IntType ConstValueRef ^ "," label ValueRef + | IntType ConstValueRef ^ "," label ValueRef ; + +Inst ::= ^ " " ^ OptLocalAssign InstVal ^ "\n"; + +PHIList ::= Types "[" ValueRef ^ "," ValueRef "]" + | PHIList ^ "," "[" ValueRef ^ "," ValueRef "]" ; + +ParamList ::= Types OptParamAttrs ValueRef OptParamAttrs + | label OptParamAttrs ValueRef OptParamAttrs + | ParamList ^ "," Types OptParamAttrs ValueRef OptParamAttrs + | ParamList ^ "," label OptParamAttrs ValueRef OptParamAttrs + | - _ ; + +IndexList ::= _ | IndexList ^ "," ResolvedVal ; + +OptTailCall ::= tail call | call ; + +InstVal ::= + ArithmeticOps Types ValueRef ^ "," ValueRef + | LogicalOps Types ValueRef ^ "," ValueRef + | icmp IPredicates Types ValueRef ^ "," ValueRef + | fcmp FPredicates Types ValueRef ^ "," ValueRef + | vicmp IPredicates Types ValueRef ^ "," ValueRef + | vfcmp FPredicates Types ValueRef ^ "," ValueRef + | CastOps ResolvedVal to Types + | select ResolvedVal ^ "," ResolvedVal ^ "," ResolvedVal + | vaarg ResolvedVal ^ "," Types + | extractelement ResolvedVal ^ "," ResolvedVal + | insertelement ResolvedVal ^ "," ResolvedVal ^ "," ResolvedVal + | shufflevector ResolvedVal ^ "," ResolvedVal ^ "," ResolvedVal + | phi PHIList + | OptTailCall OptCallingConv ResultTypes ValueRef "(" ^ ParamList ^ ")" + OptFuncAttrs + | MemoryInst ; + +OptVolatile ::= - volatile | _ ; + +MemoryInst ::= malloc Types OptCAlign + | malloc Types ^ "," INTTYPE ValueRef OptCAlign + | alloca Types OptCAlign + | alloca Types ^ "," INTTYPE ValueRef OptCAlign + | free ResolvedVal + | OptVolatile load Types ValueRef OptCAlign + | OptVolatile store ResolvedVal ^ "," Types ValueRef OptCAlign + | getresult Types ValueRef ^ "," EUINT64VAL + | getelementptr Types ValueRef IndexList ; From tonic at nondot.org Thu May 22 18:24:51 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 18:24:51 -0500 Subject: [llvm-commits] CVS: llvm-www/devmtg/index.php Message-ID: <200805222324.m4MNOpID024385@zion.cs.uiuc.edu> Changes in directory llvm-www/devmtg: index.php updated: 1.10 -> 1.11 --- Log message: Fix ordering of attendees. --- Diffs of the changes: (+1 -1) index.php | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-www/devmtg/index.php diff -u llvm-www/devmtg/index.php:1.10 llvm-www/devmtg/index.php:1.11 --- llvm-www/devmtg/index.php:1.10 Thu May 22 16:50:23 2008 +++ llvm-www/devmtg/index.php Thu May 22 18:24:30 2008 @@ -79,7 +79,7 @@
    First Name: '; inputText("first", 50, 50, $_POST); From tonic at nondot.org Thu May 22 15:50:33 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 20:50:33 -0000 Subject: [llvm-commits] [llvm] r51437 - in /llvm/branches/release_23: lib/Target/CBackend/CBackend.cpp test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll Message-ID: <200805222050.m4MKoYXO015373@zion.cs.uiuc.edu> Author: tbrethou Date: Thu May 22 15:50:33 2008 New Revision: 51437 URL: http://llvm.org/viewvc/llvm-project?rev=51437&view=rev Log: Merge from mainline. Add support for multiple-return values in inline asm. This should get inline asm working as well as it did previously with the CBE with the new MRV support for inline asm. Added: llvm/branches/release_23/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll - copied unchanged from r51420, llvm/trunk/test/CodeGen/CBackend/2008-05-21-MRV-InlineAsm.ll Modified: llvm/branches/release_23/lib/Target/CBackend/CBackend.cpp Modified: llvm/branches/release_23/lib/Target/CBackend/CBackend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_23/lib/Target/CBackend/CBackend.cpp?rev=51437&r1=51436&r2=51437&view=diff ============================================================================== --- llvm/branches/release_23/lib/Target/CBackend/CBackend.cpp (original) +++ llvm/branches/release_23/lib/Target/CBackend/CBackend.cpp Thu May 22 15:50:33 2008 @@ -2592,11 +2592,8 @@ } void CWriter::visitCallInst(CallInst &I) { - //check if we have inline asm - if (isInlineAsm(I)) { - visitInlineAsm(I); - return; - } + if (isa(I.getOperand(0))) + return visitInlineAsm(I); bool WroteCallee = false; @@ -2914,53 +2911,64 @@ InlineAsm* as = cast(CI.getOperand(0)); std::vector Constraints = as->ParseConstraints(); std::vector > Input; - std::vector > Output; + std::vector > > Output; std::string Clobber; - int count = CI.getType() == Type::VoidTy ? 1 : 0; + unsigned ValueCount = 0; + + std::vector > ResultVals; + if (CI.getType() == Type::VoidTy) + ; + else if (const StructType *ST = dyn_cast(CI.getType())) { + for (unsigned i = 0, e = ST->getNumElements(); i != e; ++i) + ResultVals.push_back(std::make_pair(&CI, (int)i)); + } else { + ResultVals.push_back(std::make_pair(&CI, -1)); + } + for (std::vector::iterator I = Constraints.begin(), E = Constraints.end(); I != E; ++I) { assert(I->Codes.size() == 1 && "Too many asm constraint codes to handle"); - std::string c = - InterpretASMConstraint(*I); - switch(I->Type) { - default: - assert(0 && "Unknown asm constraint"); - break; + std::string C = InterpretASMConstraint(*I); + if (C.empty()) continue; + + switch (I->Type) { + default: assert(0 && "Unknown asm constraint"); case InlineAsm::isInput: { - if (c.size()) { - Input.push_back(std::make_pair(c, count ? CI.getOperand(count) : &CI)); - ++count; //consume arg - } + assert(ValueCount >= ResultVals.size() && "Input can't refer to result"); + Value *V = CI.getOperand(ValueCount-ResultVals.size()); + Input.push_back(std::make_pair(C, V)); break; } case InlineAsm::isOutput: { - if (c.size()) { - Output.push_back(std::make_pair("="+((I->isEarlyClobber ? "&" : "")+c), - count ? CI.getOperand(count) : &CI)); - ++count; //consume arg - } - break; - } - case InlineAsm::isClobber: { - if (c.size()) - Clobber += ",\"" + c + "\""; + std::pair V; + if (ValueCount < ResultVals.size()) + V = ResultVals[ValueCount]; + else + V = std::make_pair(CI.getOperand(ValueCount-ResultVals.size()), -1); + Output.push_back(std::make_pair("="+((I->isEarlyClobber ? "&" : "")+C), + V)); break; } + case InlineAsm::isClobber: + Clobber += ",\"" + C + "\""; + continue; // Not an actual argument. } + ++ValueCount; // Consumes an argument. } - //fix up the asm string for gcc + // Fix up the asm string for gcc. std::string asmstr = gccifyAsm(as->getAsmString()); Out << "__asm__ volatile (\"" << asmstr << "\"\n"; Out << " :"; - for (std::vector >::iterator I =Output.begin(), - E = Output.end(); I != E; ++I) { - Out << "\"" << I->first << "\"("; - writeOperandRaw(I->second); + for (unsigned i = 0, e = Output.size(); i != e; ++i) { + if (i) + Out << ", "; + Out << "\"" << Output[i].first << "\"("; + writeOperandRaw(Output[i].second.first); + if (Output[i].second.second != -1) + Out << ".field" << Output[i].second.second; // Multiple retvals. Out << ")"; - if (I + 1 != E) - Out << ","; } Out << "\n :"; for (std::vector >::iterator I = Input.begin(), From tonic at nondot.org Thu May 22 15:51:09 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 20:51:09 -0000 Subject: [llvm-commits] [llvm] r51438 - /llvm/branches/release_23/lib/Target/CBackend/CBackend.cpp Message-ID: <200805222051.m4MKp9At015413@zion.cs.uiuc.edu> Author: tbrethou Date: Thu May 22 15:51:09 2008 New Revision: 51438 URL: http://llvm.org/viewvc/llvm-project?rev=51438&view=rev Log: Merge from mainline. fix an off-by-one error in my previous patch, don't treat the callee as a incoming arg. Modified: llvm/branches/release_23/lib/Target/CBackend/CBackend.cpp Modified: llvm/branches/release_23/lib/Target/CBackend/CBackend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_23/lib/Target/CBackend/CBackend.cpp?rev=51438&r1=51437&r2=51438&view=diff ============================================================================== --- llvm/branches/release_23/lib/Target/CBackend/CBackend.cpp (original) +++ llvm/branches/release_23/lib/Target/CBackend/CBackend.cpp Thu May 22 15:51:09 2008 @@ -2935,7 +2935,7 @@ default: assert(0 && "Unknown asm constraint"); case InlineAsm::isInput: { assert(ValueCount >= ResultVals.size() && "Input can't refer to result"); - Value *V = CI.getOperand(ValueCount-ResultVals.size()); + Value *V = CI.getOperand(ValueCount-ResultVals.size()+1); Input.push_back(std::make_pair(C, V)); break; } @@ -2944,7 +2944,7 @@ if (ValueCount < ResultVals.size()) V = ResultVals[ValueCount]; else - V = std::make_pair(CI.getOperand(ValueCount-ResultVals.size()), -1); + V = std::make_pair(CI.getOperand(ValueCount-ResultVals.size()+1), -1); Output.push_back(std::make_pair("="+((I->isEarlyClobber ? "&" : "")+C), V)); break; @@ -2964,20 +2964,19 @@ for (unsigned i = 0, e = Output.size(); i != e; ++i) { if (i) Out << ", "; - Out << "\"" << Output[i].first << "\"("; - writeOperandRaw(Output[i].second.first); + Out << "\"" << Output[i].first << "\"(" + << GetValueName(Output[i].second.first); if (Output[i].second.second != -1) Out << ".field" << Output[i].second.second; // Multiple retvals. Out << ")"; } Out << "\n :"; - for (std::vector >::iterator I = Input.begin(), - E = Input.end(); I != E; ++I) { - Out << "\"" << I->first << "\"("; - writeOperandRaw(I->second); + for (unsigned i = 0, e = Input.size(); i != e; ++i) { + if (i) + Out << ", "; + Out << "\"" << Input[i].first << "\"("; + writeOperand(Input[i].second); Out << ")"; - if (I + 1 != E) - Out << ","; } if (Clobber.size()) Out << "\n :" << Clobber.substr(1); From tonic at nondot.org Thu May 22 16:05:34 2008 From: tonic at nondot.org (Tanya M. Lattner) Date: Thu, 22 May 2008 14:05:34 -0700 (PDT) Subject: [llvm-commits] [PATCH] suppress warnings about operator delete (branches/release_23) In-Reply-To: <0F537C7A-6F19-49C3-888D-5BB4139D2403@mac.com> References: <0F537C7A-6F19-49C3-888D-5BB4139D2403@mac.com> Message-ID: > Tanya, I shall apply a similar patch to trunk, > and in case Morten indicates success, would you > please apply the attached patch to branches/release_23? This is not a problem in the release branch (no delete function). -Tanya > > Thanks for the readiness to help!!! > > Cheers, > > Gabor > > From greened at obbligato.org Thu May 22 16:12:22 2008 From: greened at obbligato.org (David Greene) Date: Thu, 22 May 2008 21:12:22 -0000 Subject: [llvm-commits] [llvm] r51439 - /llvm/trunk/lib/CodeGen/VirtRegMap.cpp Message-ID: <200805222112.m4MLCM3O016174@zion.cs.uiuc.edu> Author: greened Date: Thu May 22 16:12:21 2008 New Revision: 51439 URL: http://llvm.org/viewvc/llvm-project?rev=51439&view=rev Log: Don't attempt to update SpillSlotToUsesMap for stack slots that aren't generated by the spiller. Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/VirtRegMap.cpp?rev=51439&r1=51438&r2=51439&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/VirtRegMap.cpp (original) +++ llvm/trunk/lib/CodeGen/VirtRegMap.cpp Thu May 22 16:12:21 2008 @@ -147,8 +147,14 @@ void VirtRegMap::addSpillSlotUse(int FI, MachineInstr *MI) { if (!MF.getFrameInfo()->isFixedObjectIndex(FI)) { - assert(FI >= 0 && "Spill slot index should not be negative!"); - SpillSlotToUsesMap[FI-LowSpillSlot].insert(MI); + // If FI < LowSpillSlot, this stack reference was produced by + // instruction selection and is not a spill + if (FI >= LowSpillSlot) { + assert(FI >= 0 && "Spill slot index should not be negative!"); + assert(FI-LowSpillSlot < SpillSlotToUsesMap.size() + && "Invalid spill slot"); + SpillSlotToUsesMap[FI-LowSpillSlot].insert(MI); + } } } @@ -179,6 +185,12 @@ int FI = MO.getIndex(); if (MF.getFrameInfo()->isFixedObjectIndex(FI)) continue; + // This stack reference was produced by instruction selection and + // is not a spill + if (FI < LowSpillSlot) + continue; + assert(FI-LowSpillSlot < SpillSlotToUsesMap.size() + && "Invalid spill slot"); SpillSlotToUsesMap[FI-LowSpillSlot].erase(MI); } MI2VirtMap.erase(MI); From greened at obbligato.org Thu May 22 16:16:33 2008 From: greened at obbligato.org (David Greene) Date: Thu, 22 May 2008 21:16:33 -0000 Subject: [llvm-commits] [llvm] r51440 - /llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <200805222116.m4MLGXFM016613@zion.cs.uiuc.edu> Author: greened Date: Thu May 22 16:16:33 2008 New Revision: 51440 URL: http://llvm.org/viewvc/llvm-project?rev=51440&view=rev Log: When rewriting defs and uses after spilling, don't set the weight of a live interval to infinity if the instruction being rewritten is an original remat def instruction. We were only checking against the clone of the remat def which doesn't actually appear in the IR at all. Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=51440&r1=51439&r2=51440&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original) +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Thu May 22 16:16:33 2008 @@ -1150,7 +1150,9 @@ } MachineBasicBlock *MBB = MI->getParent(); - if (ImpUse && MI != ReMatDefMI) { + // ReMatDefMI is a clone and not in the IR at all, so check + // RefMatOrigDefMI too. + if (ImpUse && MI != ReMatDefMI && MI != ReMatOrigDefMI) { // Re-matting an instruction with virtual register use. Update the // register interval's spill weight to HUGE_VALF to prevent it from // being spilled. From evan.cheng at apple.com Thu May 22 16:19:19 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 22 May 2008 21:19:19 -0000 Subject: [llvm-commits] [llvm] r51441 - in /llvm/trunk/test/CodeGen/X86: memcpy-2.ll memset.ll Message-ID: <200805222119.m4MLJKu4016736@zion.cs.uiuc.edu> Author: evancheng Date: Thu May 22 16:19:19 2008 New Revision: 51441 URL: http://llvm.org/viewvc/llvm-project?rev=51441&view=rev Log: Add a couple of test cases. Added: llvm/trunk/test/CodeGen/X86/memcpy-2.ll llvm/trunk/test/CodeGen/X86/memset.ll Added: llvm/trunk/test/CodeGen/X86/memcpy-2.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/memcpy-2.ll?rev=51441&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/memcpy-2.ll (added) +++ llvm/trunk/test/CodeGen/X86/memcpy-2.ll Thu May 22 16:19:19 2008 @@ -0,0 +1,15 @@ +; RUN: llvm-as < %s | llc -march=x86 -mattr=-sse | grep mov | count 7 +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse | grep mov | count 5 + + %struct.ParmT = type { [25 x i8], i8, i8* } + at .str12 = internal constant [25 x i8] c"image\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00" ; <[25 x i8]*> [#uses=1] + +declare void @llvm.memcpy.i32(i8*, i8*, i32, i32) nounwind + +define void @t(i32 %argc, i8** %argv) nounwind { +entry: + %parms.i = alloca [13 x %struct.ParmT] ; <[13 x %struct.ParmT]*> [#uses=1] + %parms1.i = getelementptr [13 x %struct.ParmT]* %parms.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1] + call void @llvm.memcpy.i32( i8* %parms1.i, i8* getelementptr ([25 x i8]* @.str12, i32 0, i32 0), i32 25, i32 1 ) nounwind + unreachable +} Added: llvm/trunk/test/CodeGen/X86/memset.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/memset.ll?rev=51441&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/memset.ll (added) +++ llvm/trunk/test/CodeGen/X86/memset.ll Thu May 22 16:19:19 2008 @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | llc -march=x86 -mattr=-sse | grep mov | count 9 +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse | grep mov | count 3 + + %struct.x = type { i16, i16 } + +define void @t() nounwind { +entry: + %up_mvd = alloca [8 x %struct.x] ; <[8 x %struct.x]*> [#uses=2] + %up_mvd116 = getelementptr [8 x %struct.x]* %up_mvd, i32 0, i32 0 ; <%struct.x*> [#uses=1] + %tmp110117 = bitcast [8 x %struct.x]* %up_mvd to i8* ; [#uses=1] + call void @llvm.memset.i64( i8* %tmp110117, i8 0, i64 32, i32 8 ) + call void @foo( %struct.x* %up_mvd116 ) nounwind + ret void +} + +declare void @foo(%struct.x*) + +declare void @llvm.memset.i64(i8*, i8, i64, i32) nounwind From kremenek at apple.com Thu May 22 16:21:59 2008 From: kremenek at apple.com (Ted Kremenek) Date: Thu, 22 May 2008 21:21:59 -0000 Subject: [llvm-commits] [llvm] r51442 - /llvm/tags/checker/checker-30/ Message-ID: <200805222121.m4MLLxj5016887@zion.cs.uiuc.edu> Author: kremenek Date: Thu May 22 16:21:59 2008 New Revision: 51442 URL: http://llvm.org/viewvc/llvm-project?rev=51442&view=rev Log: Tagging checker-30. Added: llvm/tags/checker/checker-30/ - copied from r51441, llvm/trunk/ From tonic at nondot.org Thu May 22 16:28:01 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 21:28:01 -0000 Subject: [llvm-commits] [llvm] r51444 - /llvm/branches/release_23/include/llvm/User.h Message-ID: <200805222128.m4MLS16F017259@zion.cs.uiuc.edu> Author: tbrethou Date: Thu May 22 16:28:01 2008 New Revision: 51444 URL: http://llvm.org/viewvc/llvm-project?rev=51444&view=rev Log: Merge from mainline. Modified: llvm/branches/release_23/include/llvm/User.h Modified: llvm/branches/release_23/include/llvm/User.h URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_23/include/llvm/User.h?rev=51444&r1=51443&r2=51444&view=diff ============================================================================== --- llvm/branches/release_23/include/llvm/User.h (original) +++ llvm/branches/release_23/include/llvm/User.h Thu May 22 16:28:01 2008 @@ -46,6 +46,11 @@ : Value(Ty, vty), OperandList(OpList), NumOperands(NumOps) {} public: + /// placement delete - required by std, but never called. + void operator delete(void*, size_t) { + assert(0 && "Constructor throws?"); + } + Value *getOperand(unsigned i) const { assert(i < NumOperands && "getOperand() out of range!"); return OperandList[i]; From dalej at apple.com Thu May 22 16:45:32 2008 From: dalej at apple.com (Dale Johannesen) Date: Thu, 22 May 2008 21:45:32 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r51445 - /llvm-gcc-4.2/trunk/gcc/config/i386/i386.c Message-ID: <200805222145.m4MLjWDk018182@zion.cs.uiuc.edu> Author: johannes Date: Thu May 22 16:45:31 2008 New Revision: 51445 URL: http://llvm.org/viewvc/llvm-project?rev=51445&view=rev Log: Comment out some code that's not executed in llvm-gcc; this was causing warnings on some targets. Modified: llvm-gcc-4.2/trunk/gcc/config/i386/i386.c Modified: llvm-gcc-4.2/trunk/gcc/config/i386/i386.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/i386.c?rev=51445&r1=51444&r2=51445&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/i386/i386.c (original) +++ llvm-gcc-4.2/trunk/gcc/config/i386/i386.c Thu May 22 16:45:31 2008 @@ -10146,6 +10146,10 @@ rtx int_result_xmm; rtx v_rtx; rtx incoming_value; +#ifdef ENABLE_LLVM + gcc_assert(0 && "rtx floating point conversion?"); + return 0; +#endif cfun->uses_vector = 1; @@ -10155,8 +10159,11 @@ real_from_integer (&rvt_int_two31, SFmode, 0x80000000ULL, 0ULL, 1); int_two31_as_fp = const_double_from_real_value (rvt_int_two31, SFmode); +#ifndef ENABLE_LLVM + /* This warns if HOST_WIDE_INT < 64. */ real_from_integer (&rvt_int_two32, SFmode, (HOST_WIDE_INT)0x100000000ULL, 0ULL, 1); +#endif int_two32_as_fp = const_double_from_real_value (rvt_int_two32, SFmode); incoming_value = force_reg (GET_MODE (operands[1]), operands[1]); @@ -10283,6 +10290,11 @@ rtx biases, exponents; rtvec biases_rtvec, exponents_rtvec; +#ifdef ENABLE_LLVM + gcc_assert(0 && "rtx floating point conversion?"); + return 0; +#endif + cfun->uses_vector = 1; gcc_assert (ix86_preferred_stack_boundary >= 128); @@ -10317,8 +10329,11 @@ gen_rtx_SUBREG (V2DFmode, int_xmm, 0)); /* Integral versions of the DFmode 'exponents' above. */ +#ifndef ENABLE_LLVM + /* These get warnings if HOST_WIDE_INT < 64 */ REAL_VALUE_FROM_INT (bias_lo_rvt, 0x00000000000000ULL, 0x100000ULL, DFmode); REAL_VALUE_FROM_INT (bias_hi_rvt, 0x10000000000000ULL, 0x000000ULL, DFmode); +#endif bias_lo_rtx = CONST_DOUBLE_FROM_REAL_VALUE (bias_lo_rvt, DFmode); bias_hi_rtx = CONST_DOUBLE_FROM_REAL_VALUE (bias_hi_rvt, DFmode); biases_rtvec = gen_rtvec (2, bias_lo_rtx, bias_hi_rtx); @@ -10415,6 +10430,10 @@ rtx int_two32_as_fp, int_two32_as_fp_vec; rtx target = operands[0]; rtx input = force_reg (DImode, operands[1]); +#ifdef ENABLE_LLVM + gcc_assert(0 && "rtx floating point conversion?"); + return 0; +#endif gcc_assert (ix86_preferred_stack_boundary >= 128); gcc_assert (GET_MODE (input) == DImode); @@ -10425,7 +10444,10 @@ emit_insn (gen_sse2_cvtsi2sd (fp_value_hi_xmm, fp_value_hi_xmm, gen_rtx_SUBREG (SImode, input, 4))); +#ifndef ENABLE_LLVM + /* This gets warnings when HOST_WIDE_INT < 64 */ real_from_integer (&rvt_int_two32, DFmode, 0x100000000ULL, 0ULL, 1); +#endif int_two32_as_fp = const_double_from_real_value (rvt_int_two32, DFmode); rvt_int_two32_vec = gen_rtx_CONST_VECTOR (V2DFmode, gen_2_4_rtvec (2, int_two32_as_fp, DFmode)); From tonic at nondot.org Thu May 22 16:48:49 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 16:48:49 -0500 Subject: [llvm-commits] CVS: llvm-www/devmtg/index.php Message-ID: <200805222148.m4MLmn14018410@zion.cs.uiuc.edu> Changes in directory llvm-www/devmtg: index.php updated: 1.8 -> 1.9 --- Log message: Add new line. --- Diffs of the changes: (+2 -1) index.php | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm-www/devmtg/index.php diff -u llvm-www/devmtg/index.php:1.8 llvm-www/devmtg/index.php:1.9 --- llvm-www/devmtg/index.php:1.8 Thu May 22 16:47:54 2008 +++ llvm-www/devmtg/index.php Thu May 22 16:48:31 2008 @@ -55,7 +55,8 @@ to be sent updates regarding the meeting.

    Questions?
    -If you have any questions, please feel free to <contact the LLVM Developers' Meeting organizers. + +

    If you have any questions, please feel free to <contact the LLVM Developers' Meeting organizers.

    Registration
    From tonic at nondot.org Thu May 22 16:49:00 2008 From: tonic at nondot.org (Tanya Lattner) Date: Thu, 22 May 2008 16:49:00 -0500 Subject: [llvm-commits] CVS: llvm-www/devmtg/index.php register.php Message-ID: <200805222149.m4MLn0wh018424@zion.cs.uiuc.edu> Changes in directory llvm-www/devmtg: index.php updated: 1.7 -> 1.8 register.php updated: 1.2 -> 1.3 --- Log message: Clarify location. Add link to mailing list and organizers. --- Diffs of the changes: (+6 -1) index.php | 5 +++++ register.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) Index: llvm-www/devmtg/index.php diff -u llvm-www/devmtg/index.php:1.7 llvm-www/devmtg/index.php:1.8 --- llvm-www/devmtg/index.php:1.7 Thu May 22 15:08:40 2008 +++ llvm-www/devmtg/index.php Thu May 22 16:47:54 2008 @@ -49,9 +49,14 @@ C-based languages (see information on the meeting's agenda for more information).

    +
    Mailing List
    +

    Please sign up for the LLVM Developers' Meeting mailing list to be sent updates regarding the meeting.

    +
    Questions?
    +If you have any questions, please feel free to <contact the LLVM Developers' Meeting organizers. +
    Registration

    Register NOW! (Registration deadline is July 20, 2008)

    Index: llvm-www/devmtg/register.php diff -u llvm-www/devmtg/register.php:1.2 llvm-www/devmtg/register.php:1.3 --- llvm-www/devmtg/register.php:1.2 Thu May 22 15:12:05 2008 +++ llvm-www/devmtg/register.php Thu May 22 16:47:54 2008 @@ -156,7 +156,7 @@ inputText("org", 50, 100, $_POST); print '
    Location: '; +print 'Where are you located? (City/State/Country): '; inputText("location", 50, 100, $_POST); print '
    Author: johannes Date: Thu May 22 18:41:35 2008 New Revision: 51451 URL: http://llvm.org/viewvc/llvm-project?rev=51451&view=rev Log: Some tests are now failing due to disabling some of the -fdump options. Deal with this. Modified: llvm-gcc-4.2/trunk/gcc/testsuite/g++.dg/gomp/macro-3.C llvm-gcc-4.2/trunk/gcc/testsuite/g++.dg/vect/vect.exp llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/gomp/macro-3.c Modified: llvm-gcc-4.2/trunk/gcc/testsuite/g++.dg/gomp/macro-3.C URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/g%2B%2B.dg/gomp/macro-3.C?rev=51451&r1=51450&r2=51451&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/testsuite/g++.dg/gomp/macro-3.C (original) +++ llvm-gcc-4.2/trunk/gcc/testsuite/g++.dg/gomp/macro-3.C Thu May 22 18:41:35 2008 @@ -1,5 +1,6 @@ // PR preprocessor/27746 // { dg-do compile } +// { dg-require-fdump "" } // { dg-options "-fopenmp -fdump-tree-omplower" } #define omp FOO Modified: llvm-gcc-4.2/trunk/gcc/testsuite/g++.dg/vect/vect.exp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/g%2B%2B.dg/vect/vect.exp?rev=51451&r1=51450&r2=51451&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/testsuite/g++.dg/vect/vect.exp (original) +++ llvm-gcc-4.2/trunk/gcc/testsuite/g++.dg/vect/vect.exp Thu May 22 18:41:35 2008 @@ -39,9 +39,16 @@ set DEFAULT_VECTCFLAGS "" # These flags are used for all targets. -lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" \ - "-ftree-vectorizer-verbose=4" "-fdump-tree-vect-stats" - +# LLVM LOCAL begin tree-vect-stats dump is disabled +# Seems to be useless for test purposes, so just disable it. +if { [ is_llvm ] } { + lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" \ + "-ftree-vectorizer-verbose=4" +} else { + lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" \ + "-ftree-vectorizer-verbose=4" "-fdump-tree-vect-stats" +} +# LLVM LOCAL end # Skip these tests for targets that do not support generating vector # code. Set additional target-dependent vector flags, which can be # overridden by using dg-options in individual tests. Modified: llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/gomp/macro-3.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/gomp/macro-3.c?rev=51451&r1=51450&r2=51451&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/gomp/macro-3.c (original) +++ llvm-gcc-4.2/trunk/gcc/testsuite/gcc.dg/gomp/macro-3.c Thu May 22 18:41:35 2008 @@ -1,5 +1,6 @@ /* PR preprocessor/27746 */ /* { dg-do compile } */ +/* { dg-require-fdump "" } */ /* { dg-options "-fopenmp -fdump-tree-omplower" } */ #define omp FOO From gohman at apple.com Thu May 22 18:43:22 2008 From: gohman at apple.com (Dan Gohman) Date: Thu, 22 May 2008 23:43:22 -0000 Subject: [llvm-commits] [llvm] r51452 - /llvm/trunk/lib/Analysis/IPA/Andersens.cpp Message-ID: <200805222343.m4MNhMkI025855@zion.cs.uiuc.edu> Author: djg Date: Thu May 22 18:43:22 2008 New Revision: 51452 URL: http://llvm.org/viewvc/llvm-project?rev=51452&view=rev Log: Use isSingleValueType instead of isFirstClassType to exclude struct and array types. Modified: llvm/trunk/lib/Analysis/IPA/Andersens.cpp Modified: llvm/trunk/lib/Analysis/IPA/Andersens.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/Andersens.cpp?rev=51452&r1=51451&r2=51452&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/IPA/Andersens.cpp (original) +++ llvm/trunk/lib/Analysis/IPA/Andersens.cpp Thu May 22 18:43:22 2008 @@ -863,7 +863,7 @@ /// object N, which contains values indicated by C. void Andersens::AddGlobalInitializerConstraints(unsigned NodeIndex, Constant *C) { - if (C->getType()->isFirstClassType()) { + if (C->getType()->isSingleValueType()) { if (isa(C->getType())) Constraints.push_back(Constraint(Constraint::Copy, NodeIndex, getNodeForConstantPointer(C))); From evan.cheng at apple.com Thu May 22 18:55:24 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 22 May 2008 23:55:24 -0000 Subject: [llvm-commits] [llvm] r51455 - /llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Message-ID: <200805222355.m4MNtOOW026566@zion.cs.uiuc.edu> Author: evancheng Date: Thu May 22 18:55:24 2008 New Revision: 51455 URL: http://llvm.org/viewvc/llvm-project?rev=51455&view=rev Log: X86CodeEmitter should not set PIC style to None at initialization time. This will break codegen if relocation model is changed to PIC_ later. Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Modified: llvm/trunk/lib/Target/X86/X86TargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetMachine.cpp?rev=51455&r1=51454&r2=51455&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original) +++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Thu May 22 18:55:24 2008 @@ -180,10 +180,8 @@ bool X86TargetMachine::addCodeEmitter(PassManagerBase &PM, bool Fast, bool DumpAsm, MachineCodeEmitter &MCE) { // FIXME: Move this to TargetJITInfo! - if (DefRelocModel == Reloc::Default) { + if (DefRelocModel == Reloc::Default) setRelocationModel(Reloc::Static); - Subtarget.setPICStyle(PICStyle::None); - } // JIT cannot ensure globals are placed in the lower 4G of address. if (Subtarget.is64Bit()) From gohman at apple.com Thu May 22 19:12:03 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 00:12:03 -0000 Subject: [llvm-commits] [llvm] r51456 - in /llvm/trunk/lib/Transforms: IPO/StructRetPromotion.cpp Scalar/ScalarReplAggregates.cpp Message-ID: <200805230012.m4N0C356027628@zion.cs.uiuc.edu> Author: djg Date: Thu May 22 19:12:03 2008 New Revision: 51456 URL: http://llvm.org/viewvc/llvm-project?rev=51456&view=rev Log: Use isSingleValueType instead of isFirstClassType to exclude struct and array types. Modified: llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp Modified: llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp?rev=51456&r1=51455&r2=51456&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp Thu May 22 19:12:03 2008 @@ -339,7 +339,7 @@ unsigned Num = STy->getNumElements(); for (unsigned i = 0; i < Num; i++) { const Type *Ty = STy->getElementType(i); - if (!Ty->isFirstClassType() && Ty != Type::VoidTy) + if (!Ty->isSingleValueType() && Ty != Type::VoidTy) return true; } return false; Modified: llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp?rev=51456&r1=51455&r2=51456&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp Thu May 22 19:12:03 2008 @@ -643,7 +643,7 @@ const Type *EltTy =cast(EltPtr->getType())->getElementType(); // If we got down to a scalar, insert a load or store as appropriate. - if (EltTy->isFirstClassType()) { + if (EltTy->isSingleValueType()) { if (isa(MI) || isa(MI)) { Value *Elt = new LoadInst(SROADest ? OtherElt : EltPtr, "tmp", MI); From dalej at apple.com Thu May 22 19:15:11 2008 From: dalej at apple.com (Dale Johannesen) Date: Fri, 23 May 2008 00:15:11 -0000 Subject: [llvm-commits] [llvm] r51457 - /llvm/trunk/tools/lto2/LTOModule.cpp Message-ID: <200805230015.m4N0FBw3027828@zion.cs.uiuc.edu> Author: johannes Date: Thu May 22 19:15:10 2008 New Revision: 51457 URL: http://llvm.org/viewvc/llvm-project?rev=51457&view=rev Log: Make LTO expect common and weak to be represented differently. Reading .bc files from before that change will no longer work. Modified: llvm/trunk/tools/lto2/LTOModule.cpp Modified: llvm/trunk/tools/lto2/LTOModule.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto2/LTOModule.cpp?rev=51457&r1=51456&r2=51457&view=diff ============================================================================== --- llvm/trunk/tools/lto2/LTOModule.cpp (original) +++ llvm/trunk/tools/lto2/LTOModule.cpp Thu May 22 19:15:10 2008 @@ -191,17 +191,7 @@ // set definition part if ( def->hasWeakLinkage() || def->hasLinkOnceLinkage() ) { - // lvm bitcode does not differenciate between weak def data - // and tentative definitions! - // HACK HACK HACK - // C++ does not use tentative definitions, but does use weak symbols - // so guess that anything that looks like a C++ symbol is weak and others - // are tentative definitions - if ( (strncmp(symbolName, "__Z", 3) == 0) ) - attr |= LTO_SYMBOL_DEFINITION_WEAK; - else { - attr |= LTO_SYMBOL_DEFINITION_TENTATIVE; - } + attr |= LTO_SYMBOL_DEFINITION_WEAK; } else if ( def->hasCommonLinkage()) { attr |= LTO_SYMBOL_DEFINITION_TENTATIVE; From dalej at apple.com Thu May 22 19:17:00 2008 From: dalej at apple.com (Dale Johannesen) Date: Fri, 23 May 2008 00:17:00 -0000 Subject: [llvm-commits] [llvm] r51458 - /llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Message-ID: <200805230017.m4N0H0Qk027968@zion.cs.uiuc.edu> Author: johannes Date: Thu May 22 19:16:59 2008 New Revision: 51458 URL: http://llvm.org/viewvc/llvm-project?rev=51458&view=rev Log: Put const weak stuff in appropriate section on Darwin. g++.dg/abi/key2.C Modified: llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Modified: llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp?rev=51458&r1=51457&r2=51458&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Thu May 22 19:16:59 2008 @@ -251,7 +251,15 @@ if (Subtarget->isTargetDarwin()) { O << "\t.globl " << name << "\n" << TAI->getWeakDefDirective() << name << "\n"; - SwitchToDataSection("\t.section __DATA,__datacoal_nt,coalesced", I); + if (!I->isConstant()) + SwitchToDataSection("\t.section __DATA,__datacoal_nt,coalesced", I); + else { + const ArrayType *AT = dyn_cast(Type); + if (AT && AT->getElementType()==Type::Int8Ty) + SwitchToDataSection("\t.section __TEXT,__const_coal,coalesced", I); + else + SwitchToDataSection("\t.section __DATA,__const_coal,coalesced", I); + } } else if (Subtarget->isTargetCygMing()) { std::string SectionName(".section\t.data$linkonce." + name + From gohman at apple.com Thu May 22 19:17:26 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 00:17:26 -0000 Subject: [llvm-commits] [llvm] r51459 - in /llvm/trunk/lib: CodeGen/MachOWriter.cpp Transforms/IPO/ArgumentPromotion.cpp Transforms/IPO/GlobalOpt.cpp Message-ID: <200805230017.m4N0HRMH028045@zion.cs.uiuc.edu> Author: djg Date: Thu May 22 19:17:26 2008 New Revision: 51459 URL: http://llvm.org/viewvc/llvm-project?rev=51459&view=rev Log: Use isSingleValueType instead of isFirstClassType to exclude struct and array types. Modified: llvm/trunk/lib/CodeGen/MachOWriter.cpp llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Modified: llvm/trunk/lib/CodeGen/MachOWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachOWriter.cpp?rev=51459&r1=51458&r2=51459&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachOWriter.cpp (original) +++ llvm/trunk/lib/CodeGen/MachOWriter.cpp Thu May 22 19:17:26 2008 @@ -840,7 +840,7 @@ abort(); break; } - } else if (PC->getType()->isFirstClassType()) { + } else if (PC->getType()->isSingleValueType()) { unsigned char *ptr = (unsigned char *)PA; switch (PC->getType()->getTypeID()) { case Type::IntegerTyID: { Modified: llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp?rev=51459&r1=51458&r2=51459&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Thu May 22 19:17:26 2008 @@ -154,10 +154,10 @@ << PtrArg->getName() << "' because it would require adding more " << "than " << maxElements << " arguments to the function.\n"; } else { - // If all the elements are first class types, we can promote it. + // If all the elements are single-value types, we can promote it. bool AllSimple = true; for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) - if (!STy->getElementType(i)->isFirstClassType()) { + if (!STy->getElementType(i)->isSingleValueType()) { AllSimple = false; break; } Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp?rev=51459&r1=51458&r2=51459&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Thu May 22 19:17:26 2008 @@ -1493,11 +1493,11 @@ // this global a local variable) we replace the global with a local alloca // in this function. // - // NOTE: It doesn't make sense to promote non first class types since we + // NOTE: It doesn't make sense to promote non single-value types since we // are just replacing static memory to stack memory. if (!GS.HasMultipleAccessingFunctions && GS.AccessingFunction && !GS.HasNonInstructionUser && - GV->getType()->getElementType()->isFirstClassType() && + GV->getType()->getElementType()->isSingleValueType() && GS.AccessingFunction->getName() == "main" && GS.AccessingFunction->hasExternalLinkage()) { DOUT << "LOCALIZING GLOBAL: " << *GV; @@ -1548,7 +1548,7 @@ ++NumMarked; return true; - } else if (!GV->getInitializer()->getType()->isFirstClassType()) { + } else if (!GV->getInitializer()->getType()->isSingleValueType()) { if (GlobalVariable *FirstNewGV = SRAGlobal(GV, getAnalysis())) { GVI = FirstNewGV; // Don't skip the newly produced globals! From gohman at apple.com Thu May 22 19:34:05 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 00:34:05 -0000 Subject: [llvm-commits] [llvm] r51460 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Message-ID: <200805230034.m4N0Y5PE029133@zion.cs.uiuc.edu> Author: djg Date: Thu May 22 19:34:04 2008 New Revision: 51460 URL: http://llvm.org/viewvc/llvm-project?rev=51460&view=rev Log: Use isSingleValueType instead of isFirstClassType to exclude struct and array types. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=51460&r1=51459&r2=51460&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu May 22 19:34:04 2008 @@ -3937,9 +3937,9 @@ if (OpInfo.isIndirect) OpTy = cast(OpTy)->getElementType(); - // If OpTy is not a first-class value, it may be a struct/union that we + // If OpTy is not a single value, it may be a struct/union that we // can tile with integers. - if (!OpTy->isFirstClassType() && OpTy->isSized()) { + if (!OpTy->isSingleValueType() && OpTy->isSized()) { unsigned BitSize = TD->getTypeSizeInBits(OpTy); switch (BitSize) { default: break; From gohman at apple.com Thu May 22 19:36:11 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 00:36:11 -0000 Subject: [llvm-commits] [llvm] r51461 - in /llvm/trunk: include/llvm/Instructions.h lib/VMCore/Constants.cpp lib/VMCore/Instructions.cpp Message-ID: <200805230036.m4N0aCiJ029271@zion.cs.uiuc.edu> Author: djg Date: Thu May 22 19:36:11 2008 New Revision: 51461 URL: http://llvm.org/viewvc/llvm-project?rev=51461&view=rev Log: Add more IR support for the new extractvalue and insertvalue instructions. Modified: llvm/trunk/include/llvm/Instructions.h llvm/trunk/lib/VMCore/Constants.cpp llvm/trunk/lib/VMCore/Instructions.cpp Modified: llvm/trunk/include/llvm/Instructions.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=51461&r1=51460&r2=51461&view=diff ============================================================================== --- llvm/trunk/include/llvm/Instructions.h (original) +++ llvm/trunk/include/llvm/Instructions.h Thu May 22 19:36:11 2008 @@ -1689,8 +1689,42 @@ struct OperandTraits : VariadicOperandTraits<1> { }; +template +ExtractValueInst::ExtractValueInst(Value *Agg, + InputIterator IdxBegin, + InputIterator IdxEnd, + unsigned Values, + const std::string &Name, + Instruction *InsertBefore) + : Instruction(checkType(getIndexedType(Agg->getType(), IdxBegin, IdxEnd)), + ExtractValue, + OperandTraits::op_end(this) - Values, + Values, InsertBefore) { + init(Agg, IdxBegin, IdxEnd, Name, + typename std::iterator_traits::iterator_category()); +} +template +ExtractValueInst::ExtractValueInst(Value *Agg, + InputIterator IdxBegin, + InputIterator IdxEnd, + unsigned Values, + const std::string &Name, + BasicBlock *InsertAtEnd) + : Instruction(PointerType::get(checkType( + getIndexedType(Agg->getType(), + IdxBegin, IdxEnd)), + cast(Agg->getType()) + ->getAddressSpace()), + ExtractValue, + OperandTraits::op_end(this) - Values, + Values, InsertAtEnd) { + init(Agg, IdxBegin, IdxEnd, Name, + typename std::iterator_traits::iterator_category()); +} + DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ExtractValueInst, Value) + //===----------------------------------------------------------------------===// // InsertValueInst Class //===----------------------------------------------------------------------===// @@ -1840,6 +1874,44 @@ struct OperandTraits : VariadicOperandTraits<2> { }; +template +InsertValueInst::InsertValueInst(Value *Agg, + Value *Val, + InputIterator IdxBegin, + InputIterator IdxEnd, + unsigned Values, + const std::string &Name, + Instruction *InsertBefore) + : Instruction(checkType(ExtractValueInst::getIndexedType( + Agg->getType(), + IdxBegin, IdxEnd)), + InsertValue, + OperandTraits::op_end(this) - Values, + Values, InsertBefore) { + init(Agg, Val, IdxBegin, IdxEnd, Name, + typename std::iterator_traits::iterator_category()); +} +template +InsertValueInst::InsertValueInst(Value *Agg, + Value *Val, + InputIterator IdxBegin, + InputIterator IdxEnd, + unsigned Values, + const std::string &Name, + BasicBlock *InsertAtEnd) + : Instruction(PointerType::get(checkType( + ExtractValueInst::getIndexedType( + Val->getType(), + IdxBegin, IdxEnd)), + cast(Val->getType()) + ->getAddressSpace()), + InsertValue, + OperandTraits::op_end(this) - Values, + Values, InsertAtEnd) { + init(Agg, Val, IdxBegin, IdxEnd, Name, + typename std::iterator_traits::iterator_category()); +} + DEFINE_TRANSPARENT_OPERAND_ACCESSORS(InsertValueInst, Value) //===----------------------------------------------------------------------===// Modified: llvm/trunk/lib/VMCore/Constants.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Constants.cpp?rev=51461&r1=51460&r2=51461&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Constants.cpp (original) +++ llvm/trunk/lib/VMCore/Constants.cpp Thu May 22 19:36:11 2008 @@ -2308,8 +2308,8 @@ if (Constant *FC = ConstantFoldInsertValue(Agg, Val, Idxs, NumIdx)) return FC; // Fold a few common cases... - assert(isa(Agg->getType()) && - "Non-pointer type for constant InsertValue expression"); + assert(Agg->getType()->isFirstClassType() && + "Non-first-class type for constant InsertValue expression"); // Look up the constant in the table first to ensure uniqueness std::vector ArgVec; ArgVec.reserve(NumIdx+2); @@ -2323,13 +2323,13 @@ Constant *ConstantExpr::getInsertValue(Constant *Agg, Constant *Val, Constant* const *IdxList, unsigned NumIdx) { - assert((isa(Agg->getType()) || isa(Agg->getType()) || - isa(Agg->getType())) && - "Tried to create insertelement operation on non-aggregate type!"); + assert(Agg->getType()->isFirstClassType() && + "Tried to create insertelement operation on non-first-class type!"); - const Type *ReqTy = + const Type *ReqTy = Agg->getType(); + const Type *ValTy = ExtractValueInst::getIndexedType(Agg->getType(), IdxList, IdxList+NumIdx); - assert(ReqTy && "insertvalue indices invalid!"); + assert(ValTy == Val->getType() && "insertvalue indices invalid!"); return getInsertValueTy(ReqTy, Agg, Val, IdxList, NumIdx); } @@ -2342,8 +2342,8 @@ if (Constant *FC = ConstantFoldExtractValue(Agg, Idxs, NumIdx)) return FC; // Fold a few common cases... - assert(isa(Agg->getType()) && - "Non-pointer type for constant ExtractValue expression"); + assert(Agg->getType()->isFirstClassType() && + "Non-first-class type for constant extractvalue expression"); // Look up the constant in the table first to ensure uniqueness std::vector ArgVec; ArgVec.reserve(NumIdx+1); @@ -2356,9 +2356,8 @@ Constant *ConstantExpr::getExtractValue(Constant *Agg, Constant* const *IdxList, unsigned NumIdx) { - assert((isa(Agg->getType()) || isa(Agg->getType()) || - isa(Agg->getType())) && - "Tried to create extractelement operation on non-aggregate type!"); + assert(Agg->getType()->isFirstClassType() && + "Tried to create extractelement operation on non-first-class type!"); const Type *ReqTy = ExtractValueInst::getIndexedType(Agg->getType(), IdxList, IdxList+NumIdx); Modified: llvm/trunk/lib/VMCore/Instructions.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=51461&r1=51460&r2=51461&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Instructions.cpp (original) +++ llvm/trunk/lib/VMCore/Instructions.cpp Thu May 22 19:36:11 2008 @@ -1333,9 +1333,69 @@ } //===----------------------------------------------------------------------===// +// InsertValueInst Class +//===----------------------------------------------------------------------===// + +void InsertValueInst::init(Value *Agg, Value *Val, Value* const *Idx, unsigned NumIdx) { + assert(NumOperands == 1+NumIdx && "NumOperands not initialized?"); + Use *OL = OperandList; + OL[0].init(Agg, this); + OL[1].init(Val, this); + + for (unsigned i = 0; i != NumIdx; ++i) + OL[i+2].init(Idx[i], this); +} + +void InsertValueInst::init(Value *Agg, Value *Val, Value *Idx) { + assert(NumOperands == 3 && "NumOperands not initialized?"); + Use *OL = OperandList; + OL[0].init(Agg, this); + OL[1].init(Val, this); + OL[2].init(Idx, this); +} + +InsertValueInst::InsertValueInst(const InsertValueInst &IVI) + : Instruction(reinterpret_cast(IVI.getType()), InsertValue, + OperandTraits::op_end(this) + - IVI.getNumOperands(), + IVI.getNumOperands()) { + Use *OL = OperandList; + Use *IVIOL = IVI.OperandList; + for (unsigned i = 0, E = NumOperands; i != E; ++i) + OL[i].init(IVIOL[i], this); +} + +//===----------------------------------------------------------------------===// // ExtractValueInst Class //===----------------------------------------------------------------------===// +void ExtractValueInst::init(Value *Agg, Value* const *Idx, unsigned NumIdx) { + assert(NumOperands == 1+NumIdx && "NumOperands not initialized?"); + Use *OL = OperandList; + OL[0].init(Agg, this); + + for (unsigned i = 0; i != NumIdx; ++i) + OL[i+1].init(Idx[i], this); +} + +void ExtractValueInst::init(Value *Agg, Value *Idx) { + assert(NumOperands == 2 && "NumOperands not initialized?"); + Use *OL = OperandList; + OL[0].init(Agg, this); + OL[1].init(Idx, this); +} + +ExtractValueInst::ExtractValueInst(const ExtractValueInst &EVI) + : Instruction(reinterpret_cast(EVI.getType()), ExtractValue, + OperandTraits::op_end(this) + - EVI.getNumOperands(), + EVI.getNumOperands()) { + Use *OL = OperandList; + Use *EVIOL = EVI.OperandList; + for (unsigned i = 0, E = NumOperands; i != E; ++i) + OL[i].init(EVIOL[i], this); +} + // getIndexedType - Returns the type of the element that would be extracted // with an extractvalue instruction with the specified parameters. // @@ -2809,6 +2869,14 @@ return new VICmpInst(getPredicate(), Op<0>(), Op<1>()); } +ExtractValueInst *ExtractValueInst::clone() const { + return new(getNumOperands()) ExtractValueInst(*this); +} +InsertValueInst *InsertValueInst::clone() const { + return new(getNumOperands()) InsertValueInst(*this); +} + + MallocInst *MallocInst::clone() const { return new MallocInst(*this); } AllocaInst *AllocaInst::clone() const { return new AllocaInst(*this); } FreeInst *FreeInst::clone() const { return new FreeInst(getOperand(0)); } From evan.cheng at apple.com Thu May 22 19:37:07 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 23 May 2008 00:37:07 -0000 Subject: [llvm-commits] [llvm] r51462 - in /llvm/trunk: lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll Message-ID: <200805230037.m4N0b7iC029343@zion.cs.uiuc.edu> Author: evancheng Date: Thu May 22 19:37:07 2008 New Revision: 51462 URL: http://llvm.org/viewvc/llvm-project?rev=51462&view=rev Log: Bug: rcpps can only folds a load if the address is 16-byte aligned. Fixed many 'ps' load folding patterns in X86InstrSSE.td which are missing the proper alignment checks. Also fixed some 80 col. violations. Added: llvm/trunk/test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=51462&r1=51461&r2=51462&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Thu May 22 19:37:07 2008 @@ -542,31 +542,36 @@ } // Scalar operation, reg+mem. - def SSrm : SSI; // Vector operation, reg+reg. - def PSrr : PSI { let isCommutable = Commutable; } // Vector operation, reg+mem. - def PSrm : PSI; + [(set VR128:$dst, (OpNode VR128:$src1, (memopv4f32 addr:$src2)))]>; // Intrinsic operation, reg+reg. - def SSrr_Int : SSI { let isCommutable = Commutable; } // Intrinsic operation, reg+mem. - def SSrm_Int : SSI; @@ -603,46 +608,53 @@ } // Scalar operation, reg+mem. - def SSrm : SSI; // Vector operation, reg+reg. - def PSrr : PSI { let isCommutable = Commutable; } // Vector operation, reg+mem. - def PSrm : PSI; + [(set VR128:$dst, (OpNode VR128:$src1, (memopv4f32 addr:$src2)))]>; // Intrinsic operation, reg+reg. - def SSrr_Int : SSI { let isCommutable = Commutable; } // Intrinsic operation, reg+mem. - def SSrm_Int : SSI; // Vector intrinsic operation, reg+reg. - def PSrr_Int : PSI { let isCommutable = Commutable; } // Vector intrinsic operation, reg+mem. - def PSrm_Int : PSI; + [(set VR128:$dst, (V4F32Int VR128:$src1, (memopv4f32 addr:$src2)))]>; } } @@ -805,7 +817,7 @@ // Vector intrinsic operation, mem def PSm_Int : PSI; + [(set VR128:$dst, (V4F32Int (memopv4f32 addr:$src)))]>; } // Square root. @@ -880,7 +892,7 @@ (outs VR128:$dst), (ins VR128:$src1, f128mem:$src, SSECC:$cc), "cmp${cc}ps\t{$src, $dst|$dst, $src}", [(set VR128:$dst, (int_x86_sse_cmp_ps VR128:$src1, - (load addr:$src), imm:$cc))]>; + (memop addr:$src), imm:$cc))]>; } def : Pat<(v4i32 (vsetcc (v4f32 VR128:$src1), VR128:$src2, cond:$cc)), (CMPPSrri VR128:$src1, VR128:$src2, (SSE_CC_imm cond:$cc))>; @@ -1101,14 +1113,14 @@ def Int_CVTPD2PIrm : PDI<0x2D, MRMSrcMem, (outs VR64:$dst), (ins f128mem:$src), "cvtpd2pi\t{$src, $dst|$dst, $src}", [(set VR64:$dst, (int_x86_sse_cvtpd2pi - (load addr:$src)))]>; + (memop addr:$src)))]>; def Int_CVTTPD2PIrr: PDI<0x2C, MRMSrcReg, (outs VR64:$dst), (ins VR128:$src), "cvttpd2pi\t{$src, $dst|$dst, $src}", [(set VR64:$dst, (int_x86_sse_cvttpd2pi VR128:$src))]>; def Int_CVTTPD2PIrm: PDI<0x2C, MRMSrcMem, (outs VR64:$dst), (ins f128mem:$src), "cvttpd2pi\t{$src, $dst|$dst, $src}", [(set VR64:$dst, (int_x86_sse_cvttpd2pi - (load addr:$src)))]>; + (memop addr:$src)))]>; def Int_CVTPI2PDrr : PDI<0x2A, MRMSrcReg, (outs VR128:$dst), (ins VR64:$src), "cvtpi2pd\t{$src, $dst|$dst, $src}", [(set VR128:$dst, (int_x86_sse_cvtpi2pd VR64:$src))]>; @@ -1331,46 +1343,54 @@ } // Scalar operation, reg+mem. - def SDrm : SDI; // Vector operation, reg+reg. - def PDrr : PDI { let isCommutable = Commutable; } // Vector operation, reg+mem. - def PDrm : PDI; + [(set VR128:$dst, (OpNode VR128:$src1, (memopv2f64 addr:$src2)))]>; // Intrinsic operation, reg+reg. - def SDrr_Int : SDI { let isCommutable = Commutable; } // Intrinsic operation, reg+mem. - def SDrm_Int : SDI; // Vector intrinsic operation, reg+reg. - def PDrr_Int : PDI { let isCommutable = Commutable; } // Vector intrinsic operation, reg+mem. - def PDrm_Int : PDI; + [(set VR128:$dst, (V2F64Int VR128:$src1, + (memopv2f64 addr:$src2)))]>; } } @@ -1475,7 +1495,7 @@ def Int_CVTPS2DQrm : PDI<0x5B, MRMSrcMem, (outs VR128:$dst), (ins f128mem:$src), "cvtps2dq\t{$src, $dst|$dst, $src}", [(set VR128:$dst, (int_x86_sse2_cvtps2dq - (load addr:$src)))]>; + (memop addr:$src)))]>; // SSE2 packed instructions with XS prefix def Int_CVTTPS2DQrr : I<0x5B, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src), "cvttps2dq\t{$src, $dst|$dst, $src}", @@ -1484,7 +1504,7 @@ def Int_CVTTPS2DQrm : I<0x5B, MRMSrcMem, (outs VR128:$dst), (ins f128mem:$src), "cvttps2dq\t{$src, $dst|$dst, $src}", [(set VR128:$dst, (int_x86_sse2_cvttps2dq - (load addr:$src)))]>, + (memop addr:$src)))]>, XS, Requires<[HasSSE2]>; // SSE2 packed instructions with XD prefix @@ -1495,7 +1515,7 @@ def Int_CVTPD2DQrm : I<0xE6, MRMSrcMem, (outs VR128:$dst), (ins f128mem:$src), "cvtpd2dq\t{$src, $dst|$dst, $src}", [(set VR128:$dst, (int_x86_sse2_cvtpd2dq - (load addr:$src)))]>, + (memop addr:$src)))]>, XD, Requires<[HasSSE2]>; def Int_CVTTPD2DQrr : PDI<0xE6, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src), @@ -1504,7 +1524,7 @@ def Int_CVTTPD2DQrm : PDI<0xE6, MRMSrcMem, (outs VR128:$dst),(ins f128mem:$src), "cvttpd2dq\t{$src, $dst|$dst, $src}", [(set VR128:$dst, (int_x86_sse2_cvttpd2dq - (load addr:$src)))]>; + (memop addr:$src)))]>; // SSE2 instructions without OpSize prefix def Int_CVTPS2PDrr : I<0x5A, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src), @@ -1523,7 +1543,7 @@ def Int_CVTPD2PSrm : PDI<0x5A, MRMSrcReg, (outs VR128:$dst), (ins f128mem:$src), "cvtpd2ps\t{$src, $dst|$dst, $src}", [(set VR128:$dst, (int_x86_sse2_cvtpd2ps - (load addr:$src)))]>; + (memop addr:$src)))]>; // Match intrinsics which expect XMM operand(s). // Aliases for intrinsics @@ -1627,7 +1647,7 @@ // Vector intrinsic operation, mem def PDm_Int : PDI; + [(set VR128:$dst, (V2F64Int (memopv2f64 addr:$src)))]>; } // Square root. @@ -1701,7 +1721,7 @@ (outs VR128:$dst), (ins VR128:$src1, f128mem:$src, SSECC:$cc), "cmp${cc}pd\t{$src, $dst|$dst, $src}", [(set VR128:$dst, (int_x86_sse2_cmp_pd VR128:$src1, - (load addr:$src), imm:$cc))]>; + (memop addr:$src), imm:$cc))]>; } def : Pat<(v2i64 (vsetcc (v2f64 VR128:$src1), VR128:$src2, cond:$cc)), (CMPPDrri VR128:$src1, VR128:$src2, (SSE_CC_imm cond:$cc))>; @@ -2441,7 +2461,7 @@ (outs VR128:$dst), (ins VR128:$src1, f128mem:$src2), "addsubps\t{$src2, $dst|$dst, $src2}", [(set VR128:$dst, (int_x86_sse3_addsub_ps VR128:$src1, - (load addr:$src2)))]>; + (memop addr:$src2)))]>; def ADDSUBPDrr : S3I<0xD0, MRMSrcReg, (outs VR128:$dst), (ins VR128:$src1, VR128:$src2), "addsubpd\t{$src2, $dst|$dst, $src2}", @@ -2451,7 +2471,7 @@ (outs VR128:$dst), (ins VR128:$src1, f128mem:$src2), "addsubpd\t{$src2, $dst|$dst, $src2}", [(set VR128:$dst, (int_x86_sse3_addsub_pd VR128:$src1, - (load addr:$src2)))]>; + (memop addr:$src2)))]>; } def LDDQUrm : S3DI<0xF0, MRMSrcMem, (outs VR128:$dst), (ins i128mem:$src), @@ -2466,7 +2486,7 @@ class S3D_Intrm o, string OpcodeStr, Intrinsic IntId> : S3DI; + [(set VR128:$dst, (v4f32 (IntId VR128:$src1, (memop addr:$src2))))]>; class S3_Intrr o, string OpcodeStr, Intrinsic IntId> : S3I o, string OpcodeStr, Intrinsic IntId> : S3I; + [(set VR128:$dst, (v2f64 (IntId VR128:$src1, (memopv2f64 addr:$src2))))]>; let Constraints = "$src1 = $dst" in { def HADDPSrr : S3D_Intrr<0x7C, "haddps", int_x86_sse3_hadd_ps>; @@ -2944,29 +2964,29 @@ let AddedComplexity = 20 in { // vector_shuffle v1, (load v2) <4, 5, 2, 3> using MOVLPS // vector_shuffle v1, (load v2) <0, 1, 4, 5> using MOVHPS -def : Pat<(v4f32 (vector_shuffle VR128:$src1, (memopv4f32 addr:$src2), +def : Pat<(v4f32 (vector_shuffle VR128:$src1, (memop addr:$src2), MOVLP_shuffle_mask)), (MOVLPSrm VR128:$src1, addr:$src2)>, Requires<[HasSSE1]>; -def : Pat<(v2f64 (vector_shuffle VR128:$src1, (memopv2f64 addr:$src2), +def : Pat<(v2f64 (vector_shuffle VR128:$src1, (memop addr:$src2), MOVLP_shuffle_mask)), (MOVLPDrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; -def : Pat<(v4f32 (vector_shuffle VR128:$src1, (memopv4f32 addr:$src2), +def : Pat<(v4f32 (vector_shuffle VR128:$src1, (memop addr:$src2), MOVHP_shuffle_mask)), (MOVHPSrm VR128:$src1, addr:$src2)>, Requires<[HasSSE1]>; -def : Pat<(v2f64 (vector_shuffle VR128:$src1, (memopv2f64 addr:$src2), +def : Pat<(v2f64 (vector_shuffle VR128:$src1, (memop addr:$src2), MOVHP_shuffle_mask)), (MOVHPDrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; def : Pat<(v4i32 (vector_shuffle VR128:$src1, (bc_v4i32 (memopv2i64 addr:$src2)), MOVLP_shuffle_mask)), (MOVLPSrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; -def : Pat<(v2i64 (vector_shuffle VR128:$src1, (memopv2i64 addr:$src2), +def : Pat<(v2i64 (vector_shuffle VR128:$src1, (memop addr:$src2), MOVLP_shuffle_mask)), (MOVLPDrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; def : Pat<(v4i32 (vector_shuffle VR128:$src1, (bc_v4i32 (memopv2i64 addr:$src2)), MOVHP_shuffle_mask)), (MOVHPSrm VR128:$src1, addr:$src2)>, Requires<[HasSSE1]>; -def : Pat<(v2i64 (vector_shuffle VR128:$src1, (memopv2i64 addr:$src2), +def : Pat<(v2i64 (vector_shuffle VR128:$src1, (memop addr:$src2), MOVLP_shuffle_mask)), (MOVLPDrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; } @@ -3007,24 +3027,24 @@ def : Pat<(int_x86_sse2_shuf_pd VR128:$src1, VR128:$src2, imm:$src3), (v2f64 (SHUFPDrri VR128:$src1, VR128:$src2, imm:$src3))>, Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_shuf_pd VR128:$src1, (load addr:$src2), imm:$src3), +def : Pat<(int_x86_sse2_shuf_pd VR128:$src1, (memop addr:$src2),imm:$src3), (v2f64 (SHUFPDrmi VR128:$src1, addr:$src2, imm:$src3))>, Requires<[HasSSE2]>; def : Pat<(int_x86_sse2_unpckh_pd VR128:$src1, VR128:$src2), (v2f64 (UNPCKHPDrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_unpckh_pd VR128:$src1, (load addr:$src2)), +def : Pat<(int_x86_sse2_unpckh_pd VR128:$src1, (memop addr:$src2)), (v2f64 (UNPCKHPDrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; def : Pat<(int_x86_sse2_unpckl_pd VR128:$src1, VR128:$src2), (v2f64 (UNPCKLPDrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_unpckl_pd VR128:$src1, (load addr:$src2)), +def : Pat<(int_x86_sse2_unpckl_pd VR128:$src1, (memop addr:$src2)), (v2f64 (UNPCKLPDrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; def : Pat<(int_x86_sse2_punpckh_qdq VR128:$src1, VR128:$src2), (v2i64 (PUNPCKHQDQrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_punpckh_qdq VR128:$src1, (load addr:$src2)), +def : Pat<(int_x86_sse2_punpckh_qdq VR128:$src1, (memop addr:$src2)), (v2i64 (PUNPCKHQDQrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; def : Pat<(int_x86_sse2_punpckl_qdq VR128:$src1, VR128:$src2), (v2i64 (PUNPCKLQDQrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_punpckl_qdq VR128:$src1, (load addr:$src2)), +def : Pat<(int_x86_sse2_punpckl_qdq VR128:$src1, (memop addr:$src2)), (PUNPCKLQDQrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; // Some special case pandn patterns. @@ -3039,13 +3059,13 @@ (PANDNrr VR128:$src1, VR128:$src2)>, Requires<[HasSSE2]>; def : Pat<(v2i64 (and (xor VR128:$src1, (bc_v2i64 (v4i32 immAllOnesV))), - (memopv2i64 addr:$src2))), + (memop addr:$src2))), (PANDNrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; def : Pat<(v2i64 (and (xor VR128:$src1, (bc_v2i64 (v8i16 immAllOnesV))), - (memopv2i64 addr:$src2))), + (memop addr:$src2))), (PANDNrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; def : Pat<(v2i64 (and (xor VR128:$src1, (bc_v2i64 (v16i8 immAllOnesV))), - (memopv2i64 addr:$src2))), + (memop addr:$src2))), (PANDNrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; // vector -> vector casts @@ -3121,7 +3141,8 @@ (outs VR128:$dst), (ins f128mem:$src1, i32i8imm:$src2), !strconcat(OpcodeStr, "ps\t{$src2, $src1, $dst|$dst, $src1, $src2}"), - [(set VR128:$dst, (V4F32Int (load addr:$src1),imm:$src2))]>, + [(set VR128:$dst, + (V4F32Int (memopv4f32 addr:$src1),imm:$src2))]>, OpSize; // Intrinsic operation, reg. @@ -3153,7 +3174,8 @@ (outs VR128:$dst), (ins f128mem:$src1, i32i8imm:$src2), !strconcat(OpcodeStr, "pd\t{$src2, $src1, $dst|$dst, $src1, $src2}"), - [(set VR128:$dst, (V2F64Int (load addr:$src1),imm:$src2))]>, + [(set VR128:$dst, + (V2F64Int (memopv2f64 addr:$src1),imm:$src2))]>, OpSize; } @@ -3246,12 +3268,12 @@ (ins VR128:$src1, i128mem:$src2), !strconcat(OpcodeStr, "\t{$src2, $dst|$dst, $src2}"), [(set VR128:$dst, - (OpNode VR128:$src1, (memopv4i32 addr:$src2)))]>, OpSize; + (OpNode VR128:$src1, (memop addr:$src2)))]>, OpSize; def rm_int : SS48I, + (IntId128 VR128:$src1, (memop addr:$src2)))]>, OpSize; } } Added: llvm/trunk/test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll?rev=51462&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll (added) +++ llvm/trunk/test/CodeGen/X86/2008-05-22-FoldUnalignedLoad.ll Thu May 22 19:37:07 2008 @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movups | count 2 + +define void @a(<4 x float>* %x) nounwind { +entry: + %tmp2 = load <4 x float>* %x, align 1 + %inv = call <4 x float> @llvm.x86.sse.rcp.ps(<4 x float> %tmp2) + store <4 x float> %inv, <4 x float>* %x, align 1 + ret void +} + +declare <4 x float> @llvm.x86.sse.rcp.ps(<4 x float>) From dalej at apple.com Thu May 22 20:01:32 2008 From: dalej at apple.com (Dale Johannesen) Date: Fri, 23 May 2008 01:01:32 -0000 Subject: [llvm-commits] [llvm] r51464 - /llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Message-ID: <200805230101.m4N11WMZ030907@zion.cs.uiuc.edu> Author: johannes Date: Thu May 22 20:01:31 2008 New Revision: 51464 URL: http://llvm.org/viewvc/llvm-project?rev=51464&view=rev Log: Allow for switch with no cases. Was causing fault in gcc.dg/pr27531-1.c. Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=51464&r1=51463&r2=51464&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Thu May 22 20:01:31 2008 @@ -1379,6 +1379,8 @@ if (!getValueState(BI->getCondition()).isUndefined()) continue; } else if (SwitchInst *SI = dyn_cast(TI)) { + if (SI->getNumSuccessors()<2) // no cases + continue; if (!getValueState(SI->getCondition()).isUndefined()) continue; } else { From isanbard at gmail.com Thu May 22 20:29:08 2008 From: isanbard at gmail.com (Bill Wendling) Date: Fri, 23 May 2008 01:29:08 -0000 Subject: [llvm-commits] [llvm] r51465 - /llvm/trunk/lib/CodeGen/VirtRegMap.cpp Message-ID: <200805230129.m4N1T90A032686@zion.cs.uiuc.edu> Author: void Date: Thu May 22 20:29:08 2008 New Revision: 51465 URL: http://llvm.org/viewvc/llvm-project?rev=51465&view=rev Log: Remove warnings about comparison between signed and unsigned expressions. Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp Modified: llvm/trunk/lib/CodeGen/VirtRegMap.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/VirtRegMap.cpp?rev=51465&r1=51464&r2=51465&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/VirtRegMap.cpp (original) +++ llvm/trunk/lib/CodeGen/VirtRegMap.cpp Thu May 22 20:29:08 2008 @@ -151,7 +151,7 @@ // instruction selection and is not a spill if (FI >= LowSpillSlot) { assert(FI >= 0 && "Spill slot index should not be negative!"); - assert(FI-LowSpillSlot < SpillSlotToUsesMap.size() + assert((unsigned)FI-LowSpillSlot < SpillSlotToUsesMap.size() && "Invalid spill slot"); SpillSlotToUsesMap[FI-LowSpillSlot].insert(MI); } @@ -189,7 +189,7 @@ // is not a spill if (FI < LowSpillSlot) continue; - assert(FI-LowSpillSlot < SpillSlotToUsesMap.size() + assert((unsigned)FI-LowSpillSlot < SpillSlotToUsesMap.size() && "Invalid spill slot"); SpillSlotToUsesMap[FI-LowSpillSlot].erase(MI); } From gohman at apple.com Thu May 22 20:52:21 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 01:52:21 -0000 Subject: [llvm-commits] [llvm] r51467 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200805230152.m4N1qLv7001758@zion.cs.uiuc.edu> Author: djg Date: Thu May 22 20:52:21 2008 New Revision: 51467 URL: http://llvm.org/viewvc/llvm-project?rev=51467&view=rev Log: Use isSingleValueType instead of isFirstClassType to exclude struct and array types. Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51467&r1=51466&r2=51467&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Thu May 22 20:52:21 2008 @@ -9030,7 +9030,7 @@ if (SrcETy->isSized() && TD->getTypeStoreSize(SrcETy) == Size) { // The SrcETy might be something like {{{double}}} or [1 x double]. Rip // down through these levels if so. - while (!SrcETy->isFirstClassType()) { + while (!SrcETy->isSingleValueType()) { if (const StructType *STy = dyn_cast(SrcETy)) { if (STy->getNumElements() == 1) SrcETy = STy->getElementType(0); @@ -9045,7 +9045,7 @@ break; } - if (SrcETy->isFirstClassType()) + if (SrcETy->isSingleValueType()) NewPtrTy = PointerType::getUnqual(SrcETy); } } From gohman at apple.com Thu May 22 20:55:30 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 01:55:30 -0000 Subject: [llvm-commits] [llvm] r51468 - in /llvm/trunk: include/llvm/Bitcode/LLVMBitCodes.h include/llvm/Type.h lib/AsmParser/LLLexer.cpp lib/AsmParser/llvmAsmParser.cpp.cvs lib/AsmParser/llvmAsmParser.h.cvs lib/AsmParser/llvmAsmParser.y lib/AsmParser/llvmAsmParser.y.cvs lib/Bitcode/Reader/BitcodeReader.cpp lib/Bitcode/Writer/BitcodeWriter.cpp lib/Bitcode/Writer/ValueEnumerator.cpp test/Assembler/insertextractvalue.ll test/Verifier/2006-07-11-StoreStruct.ll utils/llvm.grm Message-ID: <200805230155.m4N1tVrR001980@zion.cs.uiuc.edu> Author: djg Date: Thu May 22 20:55:30 2008 New Revision: 51468 URL: http://llvm.org/viewvc/llvm-project?rev=51468&view=rev Log: Make structs and arrays first-class types, and add assembly and bitcode support for the extractvalue and insertvalue instructions and constant expressions. Note that this does not yet include CodeGen support. Added: llvm/trunk/test/Assembler/insertextractvalue.ll Modified: llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h llvm/trunk/include/llvm/Type.h llvm/trunk/lib/AsmParser/LLLexer.cpp llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs llvm/trunk/lib/AsmParser/llvmAsmParser.y llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp llvm/trunk/test/Verifier/2006-07-11-StoreStruct.ll llvm/trunk/utils/llvm.grm Modified: llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h?rev=51468&r1=51467&r2=51468&view=diff ============================================================================== --- llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h (original) +++ llvm/trunk/include/llvm/Bitcode/LLVMBitCodes.h Thu May 22 20:55:30 2008 @@ -125,7 +125,9 @@ CST_CODE_CE_INSERTELT = 15, // CE_INSERTELT: [opval, opval, opval] CST_CODE_CE_SHUFFLEVEC = 16, // CE_SHUFFLEVEC: [opval, opval, opval] CST_CODE_CE_CMP = 17, // CE_CMP: [opty, opval, opval, pred] - CST_CODE_INLINEASM = 18 // INLINEASM: [sideeffect,asmstr,conststr] + CST_CODE_INLINEASM = 18, // INLINEASM: [sideeffect,asmstr,conststr] + CST_CODE_CE_EXTRACTVAL = 19, // CE_EXTRACTVAL: [n x operands] + CST_CODE_CE_INSERTVAL = 20 // CE_INSERTVAL: [n x operands] }; /// CastOpcodes - These are values used in the bitcode files to encode which @@ -202,7 +204,9 @@ // this is so information only available in the pointer type (e.g. address // spaces) is retained. FUNC_CODE_INST_STORE2 = 24, // STORE: [ptrty,ptr,val, align, vol] - FUNC_CODE_INST_GETRESULT = 25 // GETRESULT: [ty, opval, n] + FUNC_CODE_INST_GETRESULT = 25, // GETRESULT: [ty, opval, n] + FUNC_CODE_INST_EXTRACTVAL = 26, // EXTRACTVAL: [n x operands] + FUNC_CODE_INST_INSERTVAL = 27 // INSERTVAL: [n x operands] }; } // End bitc namespace } // End llvm namespace Modified: llvm/trunk/include/llvm/Type.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Type.h?rev=51468&r1=51467&r2=51468&view=diff ============================================================================== --- llvm/trunk/include/llvm/Type.h (original) +++ llvm/trunk/include/llvm/Type.h Thu May 22 20:55:30 2008 @@ -216,8 +216,8 @@ /// is a valid type for a Value. /// inline bool isFirstClassType() const { - // Coming soon: first-class struct and array types... - return isSingleValueType(); + return isSingleValueType() || + ID == StructTyID || ID == ArrayTyID; } /// isSingleValueType - Return true if the type is a valid type for a Modified: llvm/trunk/lib/AsmParser/LLLexer.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLLexer.cpp?rev=51468&r1=51467&r2=51468&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/LLLexer.cpp (original) +++ llvm/trunk/lib/AsmParser/LLLexer.cpp Thu May 22 20:55:30 2008 @@ -605,6 +605,8 @@ INSTKEYWORD("insertelement", OtherOpVal, InsertElement, INSERTELEMENT); INSTKEYWORD("shufflevector", OtherOpVal, ShuffleVector, SHUFFLEVECTOR); INSTKEYWORD("getresult", OtherOpVal, GetResult, GETRESULT); + INSTKEYWORD("extractvalue", OtherOpVal, ExtractValue, EXTRACTVALUE); + INSTKEYWORD("insertvalue", OtherOpVal, InsertValue, INSERTVALUE); #undef INSTKEYWORD // Check for [us]0x[0-9A-Fa-f]+ which are Hexadecimal constant generated by Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs?rev=51468&r1=51467&r2=51468&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.cpp.cvs Thu May 22 20:55:30 2008 @@ -210,21 +210,23 @@ INSERTELEMENT = 391, SHUFFLEVECTOR = 392, GETRESULT = 393, - SIGNEXT = 394, - ZEROEXT = 395, - NORETURN = 396, - INREG = 397, - SRET = 398, - NOUNWIND = 399, - NOALIAS = 400, - BYVAL = 401, - NEST = 402, - READNONE = 403, - READONLY = 404, - GC = 405, - DEFAULT = 406, - HIDDEN = 407, - PROTECTED = 408 + EXTRACTVALUE = 394, + INSERTVALUE = 395, + SIGNEXT = 396, + ZEROEXT = 397, + NORETURN = 398, + INREG = 399, + SRET = 400, + NOUNWIND = 401, + NOALIAS = 402, + BYVAL = 403, + NEST = 404, + READNONE = 405, + READONLY = 406, + GC = 407, + DEFAULT = 408, + HIDDEN = 409, + PROTECTED = 410 }; #endif /* Tokens. */ @@ -364,27 +366,29 @@ #define INSERTELEMENT 391 #define SHUFFLEVECTOR 392 #define GETRESULT 393 -#define SIGNEXT 394 -#define ZEROEXT 395 -#define NORETURN 396 -#define INREG 397 -#define SRET 398 -#define NOUNWIND 399 -#define NOALIAS 400 -#define BYVAL 401 -#define NEST 402 -#define READNONE 403 -#define READONLY 404 -#define GC 405 -#define DEFAULT 406 -#define HIDDEN 407 -#define PROTECTED 408 +#define EXTRACTVALUE 394 +#define INSERTVALUE 395 +#define SIGNEXT 396 +#define ZEROEXT 397 +#define NORETURN 398 +#define INREG 399 +#define SRET 400 +#define NOUNWIND 401 +#define NOALIAS 402 +#define BYVAL 403 +#define NEST 404 +#define READNONE 405 +#define READONLY 406 +#define GC 407 +#define DEFAULT 408 +#define HIDDEN 409 +#define PROTECTED 410 /* Copy the first part of user declarations. */ -#line 14 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 14 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -849,7 +853,7 @@ if (TriggerError) return 0; if (!Ty->isFirstClassType() && !isa(Ty)) { - GenerateError("Invalid use of a composite type"); + GenerateError("Invalid use of a non-first-class type"); return 0; } @@ -1340,7 +1344,7 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 949 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 949 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -1388,7 +1392,7 @@ llvm::FCmpInst::Predicate FPredicate; } /* Line 193 of yacc.c. */ -#line 1392 "llvmAsmParser.tab.c" +#line 1396 "llvmAsmParser.tab.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -1401,7 +1405,7 @@ /* Line 216 of yacc.c. */ -#line 1405 "llvmAsmParser.tab.c" +#line 1409 "llvmAsmParser.tab.c" #ifdef short # undef short @@ -1616,20 +1620,20 @@ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 44 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 2040 +#define YYLAST 2144 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 168 +#define YYNTOKENS 170 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 85 /* YYNRULES -- Number of rules. */ -#define YYNRULES 327 +#define YYNRULES 331 /* YYNRULES -- Number of states. */ -#define YYNSTATES 656 +#define YYNSTATES 679 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 408 +#define YYMAXUTOK 410 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -1641,15 +1645,15 @@ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 154, 155, 158, 2, 157, 2, 2, 2, 2, 2, + 156, 157, 160, 2, 159, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 163, 156, 164, 2, 2, 2, 2, 2, 2, 2, + 165, 158, 166, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 160, 159, 162, 2, 2, 2, 2, 2, 167, + 2, 162, 161, 164, 2, 2, 2, 2, 2, 169, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 161, 2, 2, 165, 2, 166, 2, 2, 2, 2, + 163, 2, 2, 167, 2, 168, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1677,7 +1681,8 @@ 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153 + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155 }; #if YYDEBUG @@ -1705,25 +1710,26 @@ 375, 380, 384, 388, 393, 398, 402, 409, 415, 418, 421, 424, 427, 430, 433, 436, 439, 442, 445, 448, 451, 458, 464, 473, 480, 487, 495, 503, 511, 519, - 526, 535, 544, 548, 550, 552, 554, 556, 557, 560, - 567, 569, 570, 572, 575, 576, 580, 581, 585, 589, - 593, 597, 598, 607, 608, 618, 619, 629, 635, 638, - 642, 644, 648, 652, 656, 660, 662, 663, 669, 673, - 675, 679, 681, 682, 693, 695, 697, 702, 704, 706, - 709, 713, 714, 716, 718, 720, 722, 724, 726, 728, - 730, 732, 736, 738, 744, 746, 748, 750, 752, 754, - 756, 759, 761, 765, 768, 771, 775, 778, 779, 781, - 784, 787, 791, 801, 811, 820, 835, 837, 839, 846, - 852, 855, 862, 870, 875, 880, 887, 894, 895, 896, - 900, 903, 905, 911, 917, 924, 931, 938, 945, 950, - 957, 962, 967, 974, 981, 984, 993, 995, 997, 998, - 1002, 1009, 1013, 1020, 1023, 1029, 1037, 1043 + 526, 535, 544, 550, 558, 562, 564, 566, 568, 570, + 571, 574, 581, 583, 584, 586, 589, 590, 594, 595, + 599, 603, 607, 611, 612, 621, 622, 632, 633, 643, + 649, 652, 656, 658, 662, 666, 670, 674, 676, 677, + 683, 687, 689, 693, 695, 696, 707, 709, 711, 716, + 718, 720, 723, 727, 728, 730, 732, 734, 736, 738, + 740, 742, 744, 746, 750, 752, 758, 760, 762, 764, + 766, 768, 770, 773, 775, 779, 782, 785, 789, 792, + 793, 795, 798, 801, 805, 815, 825, 834, 849, 851, + 853, 860, 866, 869, 876, 884, 889, 894, 901, 908, + 909, 910, 914, 917, 919, 925, 931, 938, 945, 952, + 959, 964, 971, 976, 981, 988, 995, 998, 1007, 1009, + 1011, 1012, 1016, 1023, 1027, 1034, 1037, 1043, 1051, 1057, + 1062, 1067 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 214, 0, -1, 75, -1, 76, -1, 77, -1, 78, + 216, 0, -1, 75, -1, 76, -1, 77, -1, 78, -1, 79, -1, 80, -1, 81, -1, 82, -1, 83, -1, 87, -1, 88, -1, 89, -1, 84, -1, 85, -1, 86, -1, 120, -1, 121, -1, 122, -1, 123, @@ -1735,137 +1741,141 @@ -1, 111, -1, 112, -1, 113, -1, 100, -1, 101, -1, 102, -1, 103, -1, 26, -1, 27, -1, 11, -1, 12, -1, 13, -1, 16, -1, 15, -1, 14, - -1, 19, -1, 22, -1, 24, -1, 176, -1, -1, - 55, 154, 4, 155, -1, -1, 176, 156, -1, -1, - 20, -1, 23, -1, 182, -1, -1, 180, 156, -1, + -1, 19, -1, 22, -1, 24, -1, 178, -1, -1, + 55, 156, 4, 157, -1, -1, 178, 158, -1, -1, + 20, -1, 23, -1, 184, -1, -1, 182, 158, -1, 42, -1, 44, -1, 43, -1, 45, -1, 47, -1, - 49, -1, 46, -1, 48, -1, 51, -1, -1, 151, - -1, 152, -1, 153, -1, -1, 46, -1, 48, -1, + 49, -1, 46, -1, 48, -1, 51, -1, -1, 153, + -1, 154, -1, 155, -1, -1, 46, -1, 48, -1, -1, 42, -1, 43, -1, 44, -1, 47, -1, -1, 44, -1, 42, -1, -1, 63, -1, 64, -1, 65, - -1, 66, -1, 67, -1, 62, 4, -1, 140, -1, - 121, -1, 139, -1, 122, -1, 142, -1, 143, -1, - 145, -1, 146, -1, 147, -1, 54, 4, -1, -1, - 191, 190, -1, 141, -1, 144, -1, 140, -1, 139, - -1, 148, -1, 149, -1, -1, 193, 192, -1, -1, - 150, 22, -1, -1, 54, 4, -1, -1, 157, 54, - 4, -1, 34, 22, -1, -1, 197, -1, -1, 157, - 200, 199, -1, 197, -1, 54, 4, -1, 11, -1, + -1, 66, -1, 67, -1, 62, 4, -1, 142, -1, + 121, -1, 141, -1, 122, -1, 144, -1, 145, -1, + 147, -1, 148, -1, 149, -1, 54, 4, -1, -1, + 193, 192, -1, 143, -1, 146, -1, 142, -1, 141, + -1, 150, -1, 151, -1, -1, 195, 194, -1, -1, + 152, 22, -1, -1, 54, 4, -1, -1, 159, 54, + 4, -1, 34, 22, -1, -1, 199, -1, -1, 159, + 202, 201, -1, 199, -1, 54, 4, -1, 11, -1, 12, -1, 13, -1, 16, -1, 15, -1, 14, -1, - 17, -1, 50, -1, 201, -1, 202, 178, 158, -1, - 236, -1, 159, 4, -1, 202, 154, 206, 155, 193, - -1, 10, 154, 206, 155, 193, -1, 160, 4, 161, - 202, 162, -1, 163, 4, 161, 202, 164, -1, 165, - 207, 166, -1, 165, 166, -1, 163, 165, 207, 166, - 164, -1, 163, 165, 166, 164, -1, 202, 191, -1, - 202, -1, 10, -1, 203, -1, 205, 157, 203, -1, - 205, -1, 205, 157, 39, -1, 39, -1, -1, 202, - -1, 207, 157, 202, -1, 202, 160, 210, 162, -1, - 202, 160, 162, -1, 202, 167, 22, -1, 202, 163, - 210, 164, -1, 202, 165, 210, 166, -1, 202, 165, - 166, -1, 202, 163, 165, 210, 166, 164, -1, 202, - 163, 165, 166, 164, -1, 202, 40, -1, 202, 41, - -1, 202, 236, -1, 202, 209, -1, 202, 25, -1, - 174, 3, -1, 174, 5, -1, 174, 4, -1, 174, - 6, -1, 11, 26, -1, 11, 27, -1, 175, 9, - -1, 171, 154, 208, 38, 202, 155, -1, 119, 154, - 208, 248, 155, -1, 133, 154, 208, 157, 208, 157, - 208, 155, -1, 169, 154, 208, 157, 208, 155, -1, - 170, 154, 208, 157, 208, 155, -1, 90, 172, 154, - 208, 157, 208, 155, -1, 91, 173, 154, 208, 157, - 208, 155, -1, 92, 172, 154, 208, 157, 208, 155, - -1, 93, 173, 154, 208, 157, 208, 155, -1, 135, - 154, 208, 157, 208, 155, -1, 136, 154, 208, 157, - 208, 157, 208, 155, -1, 137, 154, 208, 157, 208, - 157, 208, 155, -1, 210, 157, 208, -1, 208, -1, - 32, -1, 33, -1, 37, -1, -1, 204, 236, -1, - 125, 154, 213, 38, 202, 155, -1, 215, -1, -1, - 216, -1, 215, 216, -1, -1, 31, 217, 232, -1, - -1, 30, 218, 233, -1, 60, 59, 222, -1, 179, - 18, 202, -1, 179, 18, 10, -1, -1, 181, 185, - 212, 211, 208, 178, 219, 199, -1, -1, 181, 183, - 185, 212, 211, 208, 178, 220, 199, -1, -1, 181, - 184, 185, 212, 211, 202, 178, 221, 199, -1, 181, - 185, 35, 188, 213, -1, 52, 223, -1, 56, 156, - 224, -1, 22, -1, 53, 156, 22, -1, 68, 156, - 22, -1, 160, 225, 162, -1, 225, 157, 22, -1, - 22, -1, -1, 226, 157, 202, 191, 177, -1, 202, - 191, 177, -1, 226, -1, 226, 157, 39, -1, 39, - -1, -1, 189, 204, 180, 154, 227, 155, 193, 198, - 195, 194, -1, 28, -1, 165, -1, 187, 185, 228, - 229, -1, 29, -1, 166, -1, 240, 231, -1, 186, - 185, 228, -1, -1, 61, -1, 3, -1, 4, -1, - 9, -1, 26, -1, 27, -1, 40, -1, 41, -1, - 25, -1, 163, 210, 164, -1, 209, -1, 59, 234, - 22, 157, 22, -1, 7, -1, 8, -1, 176, -1, - 180, -1, 236, -1, 235, -1, 202, 237, -1, 238, - -1, 239, 157, 238, -1, 240, 241, -1, 230, 241, - -1, 242, 179, 243, -1, 242, 245, -1, -1, 21, - -1, 69, 239, -1, 69, 10, -1, 70, 17, 237, - -1, 70, 11, 237, 157, 17, 237, 157, 17, 237, - -1, 71, 174, 237, 157, 17, 237, 160, 244, 162, - -1, 71, 174, 237, 157, 17, 237, 160, 162, -1, - 72, 189, 204, 237, 154, 247, 155, 193, 38, 17, - 237, 73, 17, 237, -1, 73, -1, 74, -1, 244, - 174, 235, 157, 17, 237, -1, 174, 235, 157, 17, - 237, -1, 179, 250, -1, 202, 160, 237, 157, 237, - 162, -1, 246, 157, 160, 237, 157, 237, 162, -1, - 202, 191, 237, 191, -1, 17, 191, 237, 191, -1, - 247, 157, 202, 191, 237, 191, -1, 247, 157, 17, - 191, 237, 191, -1, -1, -1, 248, 157, 238, -1, - 58, 57, -1, 57, -1, 169, 202, 237, 157, 237, - -1, 170, 202, 237, 157, 237, -1, 90, 172, 202, - 237, 157, 237, -1, 91, 173, 202, 237, 157, 237, - -1, 92, 172, 202, 237, 157, 237, -1, 93, 173, - 202, 237, 157, 237, -1, 171, 238, 38, 202, -1, - 133, 238, 157, 238, 157, 238, -1, 134, 238, 157, - 202, -1, 135, 238, 157, 238, -1, 136, 238, 157, - 238, 157, 238, -1, 137, 238, 157, 238, 157, 238, - -1, 132, 246, -1, 249, 189, 204, 237, 154, 247, - 155, 193, -1, 252, -1, 36, -1, -1, 114, 202, - 196, -1, 114, 202, 157, 11, 237, 196, -1, 115, - 202, 196, -1, 115, 202, 157, 11, 237, 196, -1, - 116, 238, -1, 251, 117, 202, 237, 196, -1, 251, - 118, 238, 157, 202, 237, 196, -1, 138, 202, 237, - 157, 4, -1, 119, 202, 237, 248, -1 + 17, -1, 50, -1, 203, -1, 204, 180, 160, -1, + 238, -1, 161, 4, -1, 204, 156, 208, 157, 195, + -1, 10, 156, 208, 157, 195, -1, 162, 4, 163, + 204, 164, -1, 165, 4, 163, 204, 166, -1, 167, + 209, 168, -1, 167, 168, -1, 165, 167, 209, 168, + 166, -1, 165, 167, 168, 166, -1, 204, 193, -1, + 204, -1, 10, -1, 205, -1, 207, 159, 205, -1, + 207, -1, 207, 159, 39, -1, 39, -1, -1, 204, + -1, 209, 159, 204, -1, 204, 162, 212, 164, -1, + 204, 162, 164, -1, 204, 169, 22, -1, 204, 165, + 212, 166, -1, 204, 167, 212, 168, -1, 204, 167, + 168, -1, 204, 165, 167, 212, 168, 166, -1, 204, + 165, 167, 168, 166, -1, 204, 40, -1, 204, 41, + -1, 204, 238, -1, 204, 211, -1, 204, 25, -1, + 176, 3, -1, 176, 5, -1, 176, 4, -1, 176, + 6, -1, 11, 26, -1, 11, 27, -1, 177, 9, + -1, 173, 156, 210, 38, 204, 157, -1, 119, 156, + 210, 250, 157, -1, 133, 156, 210, 159, 210, 159, + 210, 157, -1, 171, 156, 210, 159, 210, 157, -1, + 172, 156, 210, 159, 210, 157, -1, 90, 174, 156, + 210, 159, 210, 157, -1, 91, 175, 156, 210, 159, + 210, 157, -1, 92, 174, 156, 210, 159, 210, 157, + -1, 93, 175, 156, 210, 159, 210, 157, -1, 135, + 156, 210, 159, 210, 157, -1, 136, 156, 210, 159, + 210, 159, 210, 157, -1, 137, 156, 210, 159, 210, + 159, 210, 157, -1, 139, 156, 210, 250, 157, -1, + 140, 156, 210, 159, 210, 250, 157, -1, 212, 159, + 210, -1, 210, -1, 32, -1, 33, -1, 37, -1, + -1, 206, 238, -1, 125, 156, 215, 38, 204, 157, + -1, 217, -1, -1, 218, -1, 217, 218, -1, -1, + 31, 219, 234, -1, -1, 30, 220, 235, -1, 60, + 59, 224, -1, 181, 18, 204, -1, 181, 18, 10, + -1, -1, 183, 187, 214, 213, 210, 180, 221, 201, + -1, -1, 183, 185, 187, 214, 213, 210, 180, 222, + 201, -1, -1, 183, 186, 187, 214, 213, 204, 180, + 223, 201, -1, 183, 187, 35, 190, 215, -1, 52, + 225, -1, 56, 158, 226, -1, 22, -1, 53, 158, + 22, -1, 68, 158, 22, -1, 162, 227, 164, -1, + 227, 159, 22, -1, 22, -1, -1, 228, 159, 204, + 193, 179, -1, 204, 193, 179, -1, 228, -1, 228, + 159, 39, -1, 39, -1, -1, 191, 206, 182, 156, + 229, 157, 195, 200, 197, 196, -1, 28, -1, 167, + -1, 189, 187, 230, 231, -1, 29, -1, 168, -1, + 242, 233, -1, 188, 187, 230, -1, -1, 61, -1, + 3, -1, 4, -1, 9, -1, 26, -1, 27, -1, + 40, -1, 41, -1, 25, -1, 165, 212, 166, -1, + 211, -1, 59, 236, 22, 159, 22, -1, 7, -1, + 8, -1, 178, -1, 182, -1, 238, -1, 237, -1, + 204, 239, -1, 240, -1, 241, 159, 240, -1, 242, + 243, -1, 232, 243, -1, 244, 181, 245, -1, 244, + 247, -1, -1, 21, -1, 69, 241, -1, 69, 10, + -1, 70, 17, 239, -1, 70, 11, 239, 159, 17, + 239, 159, 17, 239, -1, 71, 176, 239, 159, 17, + 239, 162, 246, 164, -1, 71, 176, 239, 159, 17, + 239, 162, 164, -1, 72, 191, 206, 239, 156, 249, + 157, 195, 38, 17, 239, 73, 17, 239, -1, 73, + -1, 74, -1, 246, 176, 237, 159, 17, 239, -1, + 176, 237, 159, 17, 239, -1, 181, 252, -1, 204, + 162, 239, 159, 239, 164, -1, 248, 159, 162, 239, + 159, 239, 164, -1, 204, 193, 239, 193, -1, 17, + 193, 239, 193, -1, 249, 159, 204, 193, 239, 193, + -1, 249, 159, 17, 193, 239, 193, -1, -1, -1, + 250, 159, 240, -1, 58, 57, -1, 57, -1, 171, + 204, 239, 159, 239, -1, 172, 204, 239, 159, 239, + -1, 90, 174, 204, 239, 159, 239, -1, 91, 175, + 204, 239, 159, 239, -1, 92, 174, 204, 239, 159, + 239, -1, 93, 175, 204, 239, 159, 239, -1, 173, + 240, 38, 204, -1, 133, 240, 159, 240, 159, 240, + -1, 134, 240, 159, 204, -1, 135, 240, 159, 240, + -1, 136, 240, 159, 240, 159, 240, -1, 137, 240, + 159, 240, 159, 240, -1, 132, 248, -1, 251, 191, + 206, 239, 156, 249, 157, 195, -1, 254, -1, 36, + -1, -1, 114, 204, 198, -1, 114, 204, 159, 11, + 239, 198, -1, 115, 204, 198, -1, 115, 204, 159, + 11, 239, 198, -1, 116, 240, -1, 253, 117, 204, + 239, 198, -1, 253, 118, 240, 159, 204, 239, 198, + -1, 138, 204, 239, 159, 4, -1, 119, 204, 239, + 250, -1, 139, 204, 239, 250, -1, 140, 204, 239, + 159, 204, 239, 250, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, 1111, - 1111, 1112, 1112, 1112, 1112, 1112, 1112, 1113, 1113, 1113, - 1113, 1113, 1113, 1114, 1114, 1114, 1114, 1114, 1114, 1117, - 1117, 1118, 1118, 1119, 1119, 1120, 1120, 1121, 1121, 1125, - 1125, 1126, 1126, 1127, 1127, 1128, 1128, 1129, 1129, 1130, - 1130, 1131, 1131, 1132, 1133, 1138, 1139, 1139, 1139, 1139, - 1139, 1141, 1141, 1141, 1142, 1142, 1144, 1145, 1149, 1153, - 1158, 1158, 1160, 1161, 1166, 1172, 1173, 1174, 1175, 1176, - 1177, 1181, 1182, 1183, 1187, 1188, 1189, 1190, 1194, 1195, - 1196, 1200, 1201, 1202, 1203, 1204, 1208, 1209, 1210, 1213, - 1214, 1215, 1216, 1217, 1218, 1219, 1226, 1227, 1228, 1229, - 1230, 1231, 1232, 1233, 1234, 1235, 1239, 1240, 1245, 1246, - 1247, 1248, 1249, 1250, 1253, 1254, 1259, 1260, 1267, 1268, - 1274, 1275, 1284, 1292, 1293, 1298, 1299, 1300, 1305, 1318, - 1318, 1318, 1318, 1318, 1318, 1318, 1321, 1325, 1329, 1336, - 1341, 1349, 1378, 1403, 1408, 1418, 1428, 1432, 1442, 1449, - 1458, 1465, 1470, 1475, 1482, 1483, 1490, 1497, 1505, 1511, - 1523, 1551, 1567, 1594, 1622, 1648, 1668, 1694, 1714, 1726, - 1733, 1799, 1809, 1819, 1825, 1835, 1841, 1851, 1856, 1861, - 1874, 1886, 1907, 1915, 1921, 1932, 1937, 1942, 1947, 1952, - 1958, 1964, 1973, 1977, 1985, 1985, 1988, 1988, 1991, 2003, - 2024, 2029, 2037, 2038, 2042, 2042, 2046, 2046, 2049, 2052, - 2076, 2088, 2087, 2099, 2098, 2108, 2107, 2118, 2158, 2161, - 2167, 2177, 2181, 2186, 2188, 2193, 2198, 2207, 2217, 2228, - 2232, 2241, 2250, 2255, 2384, 2384, 2386, 2395, 2395, 2397, - 2402, 2414, 2418, 2423, 2427, 2431, 2435, 2439, 2443, 2447, - 2451, 2455, 2480, 2484, 2494, 2498, 2502, 2507, 2514, 2514, - 2520, 2529, 2534, 2539, 2543, 2552, 2561, 2570, 2574, 2582, - 2589, 2593, 2598, 2608, 2627, 2636, 2722, 2726, 2733, 2744, - 2757, 2767, 2778, 2788, 2799, 2807, 2817, 2824, 2827, 2828, - 2835, 2839, 2844, 2860, 2877, 2891, 2905, 2919, 2933, 2945, - 2953, 2960, 2966, 2972, 2978, 2993, 3083, 3088, 3092, 3099, - 3106, 3114, 3121, 3129, 3137, 3151, 3168, 3176 + 0, 1112, 1112, 1112, 1112, 1112, 1112, 1112, 1112, 1112, + 1112, 1113, 1113, 1113, 1113, 1113, 1113, 1114, 1114, 1114, + 1114, 1114, 1114, 1115, 1115, 1115, 1115, 1115, 1115, 1118, + 1118, 1119, 1119, 1120, 1120, 1121, 1121, 1122, 1122, 1126, + 1126, 1127, 1127, 1128, 1128, 1129, 1129, 1130, 1130, 1131, + 1131, 1132, 1132, 1133, 1134, 1139, 1140, 1140, 1140, 1140, + 1140, 1142, 1142, 1142, 1143, 1143, 1145, 1146, 1150, 1154, + 1159, 1159, 1161, 1162, 1167, 1173, 1174, 1175, 1176, 1177, + 1178, 1182, 1183, 1184, 1188, 1189, 1190, 1191, 1195, 1196, + 1197, 1201, 1202, 1203, 1204, 1205, 1209, 1210, 1211, 1214, + 1215, 1216, 1217, 1218, 1219, 1220, 1227, 1228, 1229, 1230, + 1231, 1232, 1233, 1234, 1235, 1236, 1240, 1241, 1246, 1247, + 1248, 1249, 1250, 1251, 1254, 1255, 1260, 1261, 1268, 1269, + 1275, 1276, 1285, 1293, 1294, 1299, 1300, 1301, 1306, 1319, + 1319, 1319, 1319, 1319, 1319, 1319, 1322, 1326, 1330, 1337, + 1342, 1350, 1379, 1404, 1409, 1419, 1429, 1433, 1443, 1450, + 1459, 1466, 1471, 1476, 1483, 1484, 1491, 1498, 1506, 1512, + 1524, 1552, 1568, 1595, 1623, 1649, 1669, 1695, 1715, 1727, + 1734, 1800, 1810, 1820, 1826, 1836, 1842, 1852, 1857, 1862, + 1875, 1887, 1908, 1916, 1922, 1933, 1938, 1943, 1948, 1953, + 1959, 1965, 1971, 1992, 2016, 2020, 2028, 2028, 2031, 2031, + 2034, 2046, 2067, 2072, 2080, 2081, 2085, 2085, 2089, 2089, + 2092, 2095, 2119, 2131, 2130, 2142, 2141, 2151, 2150, 2161, + 2201, 2204, 2210, 2220, 2224, 2229, 2231, 2236, 2241, 2250, + 2260, 2271, 2275, 2284, 2293, 2298, 2427, 2427, 2429, 2438, + 2438, 2440, 2445, 2457, 2461, 2466, 2470, 2474, 2478, 2482, + 2486, 2490, 2494, 2498, 2523, 2527, 2537, 2541, 2545, 2550, + 2557, 2557, 2563, 2572, 2577, 2582, 2586, 2595, 2604, 2613, + 2617, 2625, 2632, 2636, 2641, 2651, 2670, 2679, 2765, 2769, + 2776, 2787, 2800, 2810, 2821, 2831, 2842, 2850, 2860, 2867, + 2870, 2871, 2878, 2882, 2887, 2903, 2920, 2934, 2948, 2962, + 2976, 2988, 2996, 3003, 3009, 3015, 3021, 3036, 3126, 3131, + 3135, 3142, 3149, 3157, 3164, 3172, 3180, 3194, 3211, 3219, + 3234, 3249 }; #endif @@ -1895,18 +1905,18 @@ "TRUNC", "ZEXT", "SEXT", "FPTRUNC", "FPEXT", "BITCAST", "UITOFP", "SITOFP", "FPTOUI", "FPTOSI", "INTTOPTR", "PTRTOINT", "PHI_TOK", "SELECT", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", - "GETRESULT", "SIGNEXT", "ZEROEXT", "NORETURN", "INREG", "SRET", - "NOUNWIND", "NOALIAS", "BYVAL", "NEST", "READNONE", "READONLY", "GC", - "DEFAULT", "HIDDEN", "PROTECTED", "'('", "')'", "'='", "','", "'*'", - "'\\\\'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", "'}'", "'c'", - "$accept", "ArithmeticOps", "LogicalOps", "CastOps", "IPredicates", - "FPredicates", "IntType", "FPType", "LocalName", "OptLocalName", - "OptAddrSpace", "OptLocalAssign", "GlobalName", "OptGlobalAssign", - "GlobalAssign", "GVInternalLinkage", "GVExternalLinkage", - "GVVisibilityStyle", "FunctionDeclareLinkage", "FunctionDefineLinkage", - "AliasLinkage", "OptCallingConv", "ParamAttr", "OptParamAttrs", - "FuncAttr", "OptFuncAttrs", "OptGC", "OptAlign", "OptCAlign", - "SectionString", "OptSection", "GlobalVarAttributes", + "GETRESULT", "EXTRACTVALUE", "INSERTVALUE", "SIGNEXT", "ZEROEXT", + "NORETURN", "INREG", "SRET", "NOUNWIND", "NOALIAS", "BYVAL", "NEST", + "READNONE", "READONLY", "GC", "DEFAULT", "HIDDEN", "PROTECTED", "'('", + "')'", "'='", "','", "'*'", "'\\\\'", "'['", "'x'", "']'", "'<'", "'>'", + "'{'", "'}'", "'c'", "$accept", "ArithmeticOps", "LogicalOps", "CastOps", + "IPredicates", "FPredicates", "IntType", "FPType", "LocalName", + "OptLocalName", "OptAddrSpace", "OptLocalAssign", "GlobalName", + "OptGlobalAssign", "GlobalAssign", "GVInternalLinkage", + "GVExternalLinkage", "GVVisibilityStyle", "FunctionDeclareLinkage", + "FunctionDefineLinkage", "AliasLinkage", "OptCallingConv", "ParamAttr", + "OptParamAttrs", "FuncAttr", "OptFuncAttrs", "OptGC", "OptAlign", + "OptCAlign", "SectionString", "OptSection", "GlobalVarAttributes", "GlobalVarAttribute", "PrimType", "Types", "ArgType", "ResultTypes", "ArgTypeList", "ArgTypeListI", "TypeListI", "ConstVal", "ConstExpr", "ConstVector", "GlobalType", "ThreadLocal", "AliaseeRef", "Module", @@ -1941,47 +1951,48 @@ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 40, 41, 61, 44, 42, 92, - 91, 120, 93, 60, 62, 123, 125, 99 + 405, 406, 407, 408, 409, 410, 40, 41, 61, 44, + 42, 92, 91, 120, 93, 60, 62, 123, 125, 99 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 168, 169, 169, 169, 169, 169, 169, 169, 169, - 169, 170, 170, 170, 170, 170, 170, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 172, - 172, 172, 172, 172, 172, 172, 172, 172, 172, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 174, 175, 175, 175, 175, - 175, 176, 176, 176, 177, 177, 178, 178, 179, 179, - 180, 180, 181, 181, 182, 183, 183, 183, 183, 183, - 183, 184, 184, 184, 185, 185, 185, 185, 186, 186, - 186, 187, 187, 187, 187, 187, 188, 188, 188, 189, - 189, 189, 189, 189, 189, 189, 190, 190, 190, 190, - 190, 190, 190, 190, 190, 190, 191, 191, 192, 192, - 192, 192, 192, 192, 193, 193, 194, 194, 195, 195, - 196, 196, 197, 198, 198, 199, 199, 200, 200, 201, - 201, 201, 201, 201, 201, 201, 202, 202, 202, 202, - 202, 202, 202, 202, 202, 202, 202, 202, 202, 203, - 204, 204, 205, 205, 206, 206, 206, 206, 207, 207, - 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, - 208, 208, 208, 208, 208, 208, 208, 208, 208, 208, - 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - 209, 209, 210, 210, 211, 211, 212, 212, 213, 213, - 214, 214, 215, 215, 217, 216, 218, 216, 216, 216, - 216, 219, 216, 220, 216, 221, 216, 216, 216, 216, - 222, 223, 223, 224, 225, 225, 225, 226, 226, 227, - 227, 227, 227, 228, 229, 229, 230, 231, 231, 232, - 233, 234, 234, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 235, 236, 236, 236, 236, 237, 237, - 238, 239, 239, 240, 240, 241, 242, 242, 242, 243, - 243, 243, 243, 243, 243, 243, 243, 243, 244, 244, - 245, 246, 246, 247, 247, 247, 247, 247, 248, 248, - 249, 249, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 250, 251, 251, 252, - 252, 252, 252, 252, 252, 252, 252, 252 + 0, 170, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 172, 172, 172, 172, 172, 172, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 174, + 174, 174, 174, 174, 174, 174, 174, 174, 174, 175, + 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, + 175, 175, 175, 175, 175, 176, 177, 177, 177, 177, + 177, 178, 178, 178, 179, 179, 180, 180, 181, 181, + 182, 182, 183, 183, 184, 185, 185, 185, 185, 185, + 185, 186, 186, 186, 187, 187, 187, 187, 188, 188, + 188, 189, 189, 189, 189, 189, 190, 190, 190, 191, + 191, 191, 191, 191, 191, 191, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 193, 193, 194, 194, + 194, 194, 194, 194, 195, 195, 196, 196, 197, 197, + 198, 198, 199, 200, 200, 201, 201, 202, 202, 203, + 203, 203, 203, 203, 203, 203, 204, 204, 204, 204, + 204, 204, 204, 204, 204, 204, 204, 204, 204, 205, + 206, 206, 207, 207, 208, 208, 208, 208, 209, 209, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, + 211, 211, 211, 211, 211, 211, 211, 211, 211, 211, + 211, 211, 211, 211, 212, 212, 213, 213, 214, 214, + 215, 215, 216, 216, 217, 217, 219, 218, 220, 218, + 218, 218, 218, 221, 218, 222, 218, 223, 218, 218, + 218, 218, 224, 225, 225, 226, 227, 227, 227, 228, + 228, 229, 229, 229, 229, 230, 231, 231, 232, 233, + 233, 234, 235, 236, 236, 237, 237, 237, 237, 237, + 237, 237, 237, 237, 237, 237, 238, 238, 238, 238, + 239, 239, 240, 241, 241, 242, 242, 243, 244, 244, + 244, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 246, 246, 247, 248, 248, 249, 249, 249, 249, 249, + 250, 250, 251, 251, 252, 252, 252, 252, 252, 252, + 252, 252, 252, 252, 252, 252, 252, 252, 252, 253, + 253, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -2007,19 +2018,20 @@ 4, 3, 3, 4, 4, 3, 6, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 5, 8, 6, 6, 7, 7, 7, 7, 6, - 8, 8, 3, 1, 1, 1, 1, 0, 2, 6, - 1, 0, 1, 2, 0, 3, 0, 3, 3, 3, - 3, 0, 8, 0, 9, 0, 9, 5, 2, 3, - 1, 3, 3, 3, 3, 1, 0, 5, 3, 1, - 3, 1, 0, 10, 1, 1, 4, 1, 1, 2, - 3, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 3, 1, 5, 1, 1, 1, 1, 1, 1, - 2, 1, 3, 2, 2, 3, 2, 0, 1, 2, - 2, 3, 9, 9, 8, 14, 1, 1, 6, 5, - 2, 6, 7, 4, 4, 6, 6, 0, 0, 3, - 2, 1, 5, 5, 6, 6, 6, 6, 4, 6, - 4, 4, 6, 6, 2, 8, 1, 1, 0, 3, - 6, 3, 6, 2, 5, 7, 5, 4 + 8, 8, 5, 7, 3, 1, 1, 1, 1, 0, + 2, 6, 1, 0, 1, 2, 0, 3, 0, 3, + 3, 3, 3, 0, 8, 0, 9, 0, 9, 5, + 2, 3, 1, 3, 3, 3, 3, 1, 0, 5, + 3, 1, 3, 1, 0, 10, 1, 1, 4, 1, + 1, 2, 3, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 1, 5, 1, 1, 1, 1, + 1, 1, 2, 1, 3, 2, 2, 3, 2, 0, + 1, 2, 2, 3, 9, 9, 8, 14, 1, 1, + 6, 5, 2, 6, 7, 4, 4, 6, 6, 0, + 0, 3, 2, 1, 5, 5, 6, 6, 6, 6, + 4, 6, 4, 4, 6, 6, 2, 8, 1, 1, + 0, 3, 6, 3, 6, 2, 5, 7, 5, 4, + 4, 7 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -2027,596 +2039,620 @@ means the default is an error. */ static const yytype_uint16 yydefact[] = { - 73, 61, 70, 62, 71, 63, 216, 214, 0, 0, - 0, 0, 0, 0, 84, 72, 0, 73, 212, 88, - 91, 0, 0, 228, 0, 0, 68, 0, 74, 75, + 73, 61, 70, 62, 71, 63, 218, 216, 0, 0, + 0, 0, 0, 0, 84, 72, 0, 73, 214, 88, + 91, 0, 0, 230, 0, 0, 68, 0, 74, 75, 77, 76, 78, 81, 79, 82, 80, 83, 85, 86, - 87, 84, 84, 207, 1, 213, 89, 90, 84, 217, - 92, 93, 94, 95, 84, 277, 215, 277, 0, 0, - 236, 229, 230, 218, 264, 265, 220, 139, 140, 141, - 144, 143, 142, 145, 146, 0, 0, 0, 0, 266, - 267, 147, 219, 149, 207, 207, 96, 206, 0, 99, - 99, 278, 274, 69, 247, 248, 249, 273, 231, 232, - 235, 0, 167, 150, 0, 0, 0, 0, 156, 168, - 0, 0, 167, 0, 0, 0, 98, 97, 0, 204, - 205, 0, 0, 100, 101, 102, 103, 104, 0, 250, - 0, 318, 276, 0, 233, 166, 116, 162, 164, 0, + 87, 84, 84, 209, 1, 215, 89, 90, 84, 219, + 92, 93, 94, 95, 84, 279, 217, 279, 0, 0, + 238, 231, 232, 220, 266, 267, 222, 139, 140, 141, + 144, 143, 142, 145, 146, 0, 0, 0, 0, 268, + 269, 147, 221, 149, 209, 209, 96, 208, 0, 99, + 99, 280, 276, 69, 249, 250, 251, 275, 233, 234, + 237, 0, 167, 150, 0, 0, 0, 0, 156, 168, + 0, 0, 167, 0, 0, 0, 98, 97, 0, 206, + 207, 0, 0, 100, 101, 102, 103, 104, 0, 252, + 0, 320, 278, 0, 235, 166, 116, 162, 164, 0, 0, 0, 0, 0, 0, 155, 0, 0, 148, 0, - 0, 161, 0, 160, 0, 227, 139, 140, 141, 144, - 143, 142, 0, 0, 67, 67, 105, 0, 244, 245, - 246, 317, 301, 0, 0, 0, 0, 99, 286, 287, + 0, 161, 0, 160, 0, 229, 139, 140, 141, 144, + 143, 142, 0, 0, 67, 67, 105, 0, 246, 247, + 248, 319, 303, 0, 0, 0, 0, 99, 288, 289, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 15, 16, 11, 12, 13, 0, 0, 0, 0, 0, 0, 0, 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 275, 99, 290, 0, 316, - 234, 159, 0, 124, 67, 67, 158, 0, 169, 0, - 124, 67, 67, 0, 208, 187, 188, 183, 185, 184, - 186, 189, 182, 178, 179, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 277, 99, 292, + 0, 318, 236, 159, 0, 124, 67, 67, 158, 0, + 169, 0, 124, 67, 67, 0, 210, 187, 188, 183, + 185, 184, 186, 189, 182, 178, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 181, 180, 221, 0, 300, 280, 67, 271, 279, - 0, 0, 55, 0, 0, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 0, 53, 54, 49, 50, - 51, 52, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 0, 0, 0, 130, 130, 323, 67, 67, - 314, 0, 0, 0, 0, 0, 67, 67, 67, 0, - 0, 0, 0, 0, 107, 109, 108, 106, 110, 111, - 112, 113, 114, 117, 165, 163, 152, 153, 154, 157, - 66, 151, 223, 225, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 171, 203, 0, 0, 0, 175, - 0, 172, 0, 0, 0, 135, 242, 253, 254, 255, - 260, 256, 257, 258, 259, 251, 0, 262, 269, 268, - 270, 0, 0, 281, 0, 0, 67, 67, 67, 67, - 0, 319, 0, 321, 298, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 67, 0, 115, + 0, 0, 0, 0, 0, 181, 180, 223, 0, 302, + 282, 67, 273, 281, 0, 0, 55, 0, 0, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 0, + 53, 54, 49, 50, 51, 52, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 48, 0, 0, 0, 130, + 130, 325, 67, 67, 316, 0, 0, 0, 0, 0, + 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, + 107, 109, 108, 106, 110, 111, 112, 113, 114, 117, + 165, 163, 152, 153, 154, 157, 66, 151, 225, 227, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 171, 205, 0, 0, 0, 175, 0, 172, + 0, 0, 0, 135, 244, 255, 256, 257, 262, 258, + 259, 260, 261, 253, 0, 264, 271, 270, 272, 0, + 0, 283, 0, 0, 67, 67, 67, 67, 0, 321, + 0, 323, 300, 0, 0, 0, 0, 0, 0, 0, + 0, 300, 0, 0, 0, 0, 0, 67, 0, 115, 121, 120, 118, 119, 122, 123, 125, 135, 135, 0, - 0, 0, 0, 0, 298, 0, 0, 0, 0, 0, - 170, 156, 168, 0, 173, 174, 0, 0, 0, 0, - 222, 241, 116, 239, 0, 252, 0, 0, 272, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, - 0, 0, 0, 310, 311, 0, 0, 0, 0, 0, - 308, 0, 130, 0, 224, 226, 67, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 202, 177, 0, 0, - 0, 0, 0, 0, 137, 135, 65, 0, 124, 0, - 261, 0, 0, 297, 0, 0, 0, 0, 130, 131, - 130, 0, 0, 0, 0, 0, 0, 326, 302, 303, - 297, 0, 324, 67, 209, 0, 0, 0, 0, 191, - 0, 0, 0, 0, 176, 0, 0, 67, 132, 138, - 136, 64, 238, 240, 116, 133, 0, 0, 0, 116, - 116, 0, 304, 305, 306, 307, 320, 322, 299, 0, - 0, 309, 312, 313, 0, 130, 0, 0, 0, 0, - 0, 199, 0, 0, 193, 194, 190, 65, 134, 128, - 263, 0, 0, 0, 0, 124, 0, 291, 0, 124, - 325, 195, 196, 197, 198, 0, 0, 0, 237, 0, - 126, 0, 284, 0, 0, 107, 109, 116, 116, 0, - 116, 116, 292, 315, 192, 200, 201, 129, 0, 243, - 282, 0, 283, 0, 294, 293, 0, 0, 0, 127, - 0, 0, 0, 116, 116, 0, 0, 0, 296, 295, - 289, 0, 0, 288, 0, 285 + 0, 0, 0, 0, 300, 0, 0, 0, 0, 300, + 0, 0, 170, 156, 168, 0, 173, 174, 0, 0, + 0, 0, 224, 243, 116, 241, 0, 254, 0, 0, + 274, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 329, 0, 0, 0, 312, 313, 0, 0, 0, + 330, 0, 0, 0, 310, 0, 130, 0, 226, 228, + 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 204, 177, 0, 0, 0, 0, 0, 0, + 137, 135, 65, 0, 124, 0, 263, 0, 0, 299, + 0, 0, 0, 0, 130, 131, 130, 0, 0, 0, + 0, 0, 0, 328, 67, 304, 305, 299, 0, 326, + 67, 211, 0, 0, 0, 0, 191, 0, 0, 0, + 0, 202, 300, 176, 0, 0, 67, 132, 138, 136, + 64, 240, 242, 116, 133, 0, 0, 0, 116, 116, + 0, 306, 307, 308, 309, 322, 324, 301, 0, 0, + 311, 314, 315, 300, 0, 130, 0, 0, 0, 0, + 0, 199, 0, 0, 0, 193, 194, 190, 65, 134, + 128, 265, 0, 0, 0, 0, 124, 0, 293, 0, + 331, 124, 327, 195, 196, 197, 198, 0, 0, 0, + 203, 239, 0, 126, 0, 286, 0, 0, 107, 109, + 116, 116, 0, 116, 116, 294, 317, 192, 200, 201, + 129, 0, 245, 284, 0, 285, 0, 296, 295, 0, + 0, 0, 127, 0, 0, 0, 116, 116, 0, 0, + 0, 298, 297, 291, 0, 0, 290, 0, 287 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 268, 269, 270, 295, 312, 162, 163, 79, 552, + -1, 272, 273, 274, 299, 316, 162, 163, 79, 571, 113, 12, 80, 14, 15, 41, 42, 43, 48, 54, - 118, 128, 343, 231, 426, 346, 629, 610, 401, 504, - 589, 450, 505, 81, 164, 137, 154, 138, 139, 110, - 365, 387, 366, 121, 88, 155, 16, 17, 18, 20, - 19, 375, 427, 428, 63, 23, 61, 101, 453, 454, - 129, 170, 55, 96, 56, 49, 456, 388, 83, 390, - 278, 279, 57, 92, 93, 225, 614, 132, 320, 561, - 469, 226, 227, 228, 229 + 118, 128, 349, 233, 436, 352, 652, 633, 409, 520, + 610, 462, 521, 81, 164, 137, 154, 138, 139, 110, + 373, 395, 374, 121, 88, 155, 16, 17, 18, 20, + 19, 383, 437, 438, 63, 23, 61, 101, 465, 466, + 129, 170, 55, 96, 56, 49, 468, 396, 83, 398, + 282, 283, 57, 92, 93, 227, 637, 132, 324, 580, + 481, 228, 229, 230, 231 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -560 +#define YYPACT_NINF -578 static const yytype_int16 yypact[] = { - 590, -560, -560, -560, -560, -560, -560, -560, 9, -119, - 23, -66, 80, -43, -1, -560, 132, 897, -560, 131, - 219, 16, 43, -560, 48, 203, -560, 1564, -560, -560, - -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, - -560, -6, -6, 230, -560, -560, -560, -560, -6, -560, - -560, -560, -560, -560, -6, 211, -560, -10, 223, 234, - 246, -560, -560, -560, -560, -560, 119, -560, -560, -560, - -560, -560, -560, -560, -560, 289, 296, 2, 227, -560, - -560, -560, 3, -560, 266, 266, 247, -560, 34, 121, - 121, -560, -560, 233, -560, -560, -560, -560, -560, -560, - -560, 67, 1400, -560, 146, 151, 830, 119, -560, 3, - -102, 171, 1400, 159, 34, 34, -560, -560, 1441, -560, - -560, 1682, 322, -560, -560, -560, -560, -560, 1723, -560, - -16, 1902, -560, 306, -560, -560, 3, -560, 172, 176, - 1741, 1741, 168, -101, 1741, -560, 332, 182, -560, 1682, - 1741, 119, 184, 3, 252, -560, 102, 335, 339, 340, - 343, 345, 106, 346, 1164, 303, -560, 213, -560, -560, - -560, -560, -560, 302, 1764, 52, 349, 121, -560, -560, - -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, - -560, -560, -560, -560, -560, 591, 440, 591, 440, 1741, - 1741, 1741, 1741, -560, -560, -560, -560, -560, -560, -560, - -560, -560, -560, -560, -560, 1741, 1741, 1741, 1741, 1741, - 1741, 1741, 1741, 1741, 1741, -560, 121, -560, 36, -560, - -560, 200, 1461, -560, -20, -37, -560, 198, 3, 215, - -560, 303, 4, 1441, -560, -560, -560, -560, -560, -560, - -560, -560, -560, -560, -560, 591, 440, 591, 440, 217, - 218, 220, 222, 224, 1482, 1782, 1061, 351, 225, 226, - 237, -560, -560, -560, 240, -560, 119, 742, -560, 231, - 884, 884, -560, 884, 1723, -560, -560, -560, -560, -560, - -560, -560, -560, -560, -560, 1741, -560, -560, -560, -560, - -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, - -560, -560, 1741, 1741, 1741, -21, 24, -560, 742, -35, - 238, 241, 249, 254, 255, 256, 742, 742, 742, 366, - 1723, 1741, 1741, 373, -560, -560, -560, -560, -560, -560, - -560, -560, -560, -560, -560, -560, 175, -560, -560, -560, - -560, 175, -560, 159, 371, 260, 261, 262, 263, 1682, - 1682, 1682, 1682, 1682, -560, -560, 91, 1105, -96, -560, - -69, -560, 1682, 1682, 1682, 264, 1502, -560, -560, -560, - -560, -560, -560, -560, -560, 359, 1682, -560, -560, -560, - -560, 1741, 265, -560, 267, 884, 742, 742, 742, 742, - 21, -560, 40, -560, -560, 884, 272, 1741, 1741, 1741, - 1741, 1741, 268, 269, 270, 1741, 884, 742, 276, -560, - -560, -560, -560, -560, -560, -560, -560, 264, 264, 1741, - 1682, 1682, 1682, 1682, -560, 277, 280, 281, 282, 1682, - -560, 259, 1015, -62, -560, -560, 287, 290, 408, 19, - -560, -560, 3, 291, 294, -560, 428, -61, -560, 434, - 435, 299, 297, 301, 304, 305, 884, 452, 884, 307, - 308, 884, 311, 3, -560, 312, 313, 455, 884, 884, - 3, 309, 319, 1741, -560, -560, -15, 320, 325, 326, - 327, 137, 1682, 1682, 1682, 1682, -560, -560, 321, 1682, - 1682, 1741, 438, 482, -560, 264, 386, 1523, -560, 334, - -560, 884, 884, 1805, 884, 884, 884, 884, 319, -560, - 319, 1741, 884, 336, 1741, 1741, 1741, -560, -560, -560, - 1805, 443, -560, 742, -560, 1682, 1682, 1682, 1682, -560, - 337, 347, 344, 348, -560, 354, 355, 15, -560, -560, - -560, -560, -560, -560, 3, -18, 470, 356, 352, 5, - 3, 156, -560, -560, -560, -560, -560, -560, -560, 341, - 884, -560, -560, -560, 163, 319, 360, 362, 365, 369, - 1682, -560, 1682, 1682, -560, -560, -560, 386, -560, 457, - -560, 497, -7, 577, 577, -560, 1846, -560, 372, -560, - -560, -560, -560, -560, -560, 380, 382, 383, -560, 517, - 404, 884, -560, 1307, -2, 401, 402, -560, -560, 82, - 5, 3, -560, 175, -560, -560, -560, -560, 540, -560, - -560, 406, -560, 1307, 200, 200, 547, 577, 577, -560, - 548, 409, 884, -560, -560, 884, 551, 496, 200, 200, - -560, 884, 554, -560, 884, -560 + 348, -578, -578, -578, -578, -578, -578, -578, 42, -145, + -8, -70, 59, -15, -2, -578, 154, 1288, -578, 155, + 317, 4, 24, -578, -4, 157, -578, 1678, -578, -578, + -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, + -578, 133, 133, 203, -578, -578, -578, -578, 133, -578, + -578, -578, -578, -578, 133, 183, -578, -5, 191, 194, + 204, -578, -578, -578, -578, -578, 73, -578, -578, -578, + -578, -578, -578, -578, -578, 235, 238, 11, 244, -578, + -578, -578, 87, -578, 212, 212, 261, -578, 100, 321, + 321, -578, -578, 250, -578, -578, -578, -578, -578, -578, + -578, -47, 50, -578, 102, 107, 787, 73, -578, 87, + -81, 141, 50, 129, 100, 100, -578, -578, 1362, -578, + -578, 1722, 303, -578, -578, -578, -578, -578, 1780, -578, + -17, 2004, -578, 302, -578, -578, 87, -578, 173, 189, + 1840, 1840, 181, -61, 1840, -578, 346, 200, -578, 1722, + 1840, 73, 195, 87, 294, -578, 79, 360, 365, 371, + 372, 385, 272, 388, 1425, 343, -578, 30, -578, -578, + -578, -578, -578, 344, 1858, 220, 391, 321, -578, -578, + -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, + -578, -578, -578, -578, -578, 668, 443, 668, 443, 1840, + 1840, 1840, 1840, -578, -578, -578, -578, -578, -578, -578, + -578, -578, -578, -578, -578, 1840, 1840, 1840, 1840, 1840, + 1840, 1840, 1840, 1840, 1840, 1840, 1840, -578, 321, -578, + 53, -578, -578, 178, 1560, -578, -20, -27, -578, 241, + 87, 253, -578, 343, 16, 1362, -578, -578, -578, -578, + -578, -578, -578, -578, -578, -578, -578, 668, 443, 668, + 443, 258, 264, 268, 275, 278, 280, 281, 1601, 1887, + 1046, 395, 282, 284, 287, -578, -578, -578, 288, -578, + 73, 996, -578, 266, 1140, 1140, -578, 1140, 1780, -578, + -578, -578, -578, -578, -578, -578, -578, -578, -578, 1840, + -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, + -578, -578, -578, -578, -578, -578, 1840, 1840, 1840, 68, + 85, -578, 996, -25, 271, 286, 289, 290, 291, 299, + 996, 996, 996, 996, 996, 408, 1780, 1840, 1840, 455, + -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, + -578, -578, 188, -578, -578, -578, -578, 188, -578, 129, + 409, 304, 305, 306, 308, 1722, 1722, 1722, 1722, 1722, + 1722, 1722, -578, -578, 89, 1087, -58, -578, -48, -578, + 1722, 1722, 1722, 313, 1619, -578, -578, -578, -578, -578, + -578, -578, -578, 412, 1722, -578, -578, -578, -578, 1840, + 315, -578, 316, 1140, 996, 996, 996, 996, 27, -578, + 37, -578, -578, 1140, 322, 1840, 1840, 1840, 1840, 1840, + 319, -578, 324, 326, 327, 1840, 1140, 996, 329, -578, + -578, -578, -578, -578, -578, -578, -578, 313, 313, 1840, + 1722, 1722, 1722, 1722, -578, 330, 331, 333, 335, -578, + 336, 1722, -578, 332, 1274, -40, -578, -578, 337, 341, + 463, 21, -578, -578, 87, 345, 349, -578, 480, 22, + -578, 488, 490, 352, 350, 351, 353, 354, 1140, 513, + 1140, 359, 361, 1140, 364, 87, -578, 366, 373, 515, + 359, 1840, 1140, 1140, 87, 368, 375, 1840, -578, -578, + -1, 376, 377, 380, 381, 147, 1722, 1722, 1722, 1722, + 176, 1722, -578, -578, 392, 1722, 1722, 1840, 519, 538, + -578, 313, 274, 1660, -578, 398, -578, 1140, 1140, 1905, + 1140, 1140, 1140, 1140, 375, -578, 375, 1840, 1140, 400, + 1840, 1840, 1840, -578, 996, -578, -578, 1905, 506, -578, + 996, -578, 1722, 1722, 1722, 1722, -578, 402, 405, 406, + 407, -578, -578, -578, 410, 413, 49, -578, -578, -578, + -578, -578, -578, 87, -16, 547, 414, 419, 90, 87, + 206, -578, -578, -578, -578, -578, -578, -578, 411, 1140, + -578, -578, -578, -578, 269, 375, 415, 417, 425, 427, + 1722, -578, 1722, 1722, 276, -578, -578, -578, 274, -578, + 517, -578, 568, 1, 849, 849, -578, 1946, -578, 422, + 359, -578, -578, -578, -578, -578, -578, 430, 431, 432, + -578, -578, 586, 444, 1140, -578, 621, 3, 442, 447, + -578, -578, 18, 90, 87, -578, 188, -578, -578, -578, + -578, 577, -578, -578, 441, -578, 621, 178, 178, 587, + 849, 849, -578, 588, 448, 1140, -578, -578, 1140, 589, + 539, 178, 178, -578, 1140, 594, -578, 1140, -578 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -560, 441, 442, 444, -174, -167, -173, -560, 0, -13, - -141, 483, 13, -560, -560, -560, -560, 30, -560, -560, - -560, -139, -560, -416, -560, -238, -560, -560, -311, 22, - -560, -406, -560, -560, -26, 350, -120, -560, 471, 485, - -64, -157, -251, 100, 194, 363, -560, -560, 571, -560, - -560, -560, -560, -560, -560, -560, -560, -560, -560, -560, - 499, -560, -560, -560, -560, -560, -560, -559, -115, 162, - -191, -560, -560, 535, -560, -560, -560, -560, -560, 63, - 160, -560, -560, -560, -560 + -578, 482, 484, 485, -163, -161, -174, -578, 0, 12, + -97, 525, 10, -578, -578, -578, -578, 267, -578, -578, + -578, -138, -578, -457, -578, -239, -578, -578, -311, 45, + -578, -412, -578, -578, -26, 387, -122, -578, 510, 521, + 86, -159, -237, 222, 257, 383, -578, -578, 612, -578, + -578, -578, -578, -578, -578, -578, -578, -578, -578, -578, + 541, -578, -578, -578, -578, -578, -578, -577, -51, 246, + -197, -578, -578, 575, -578, -578, -578, -578, -578, 88, + -413, -578, -578, -578, -578 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -212 +#define YYTABLE_NINF -214 static const yytype_int16 yytable[] = { - 11, 82, 351, 283, 282, 403, 105, 271, 167, 282, - 317, 91, 168, 13, 368, 370, 502, 11, 111, 94, - 111, 484, 485, 313, 273, 321, 322, 323, 324, 325, - 13, 314, 466, 329, 111, 111, 506, 24, 284, 244, - 111, 29, 30, 31, 32, 33, 34, 35, 36, 272, - 37, 468, 109, 502, 631, 144, 144, 165, 111, 111, - -145, 439, 21, 280, 145, 237, 119, 120, 444, 281, - 111, 84, 85, 503, 641, 467, 136, 22, 89, 111, - 109, 355, 25, 357, 90, 241, 136, 330, 439, 356, - 26, 358, 153, 11, 467, 439, 439, 445, 27, 550, - 352, 353, 153, 510, 498, -55, -55, -55, -55, 247, - 248, 249, 250, 28, 234, 235, 443, 112, 238, 112, - 636, 420, 421, 422, 242, 405, 423, 348, 245, 246, - 424, 425, 44, 112, 112, 457, 400, -67, 587, 112, - 534, 418, 347, 593, 594, 38, 39, 40, 277, 169, - 38, 39, 40, 331, 332, 612, 95, 112, 112, -145, - 632, -67, 389, -145, 395, 389, 389, 106, 389, 112, - 586, 532, 58, 315, 316, 277, 318, 46, 112, 47, - 274, 402, -67, 122, 123, 124, 125, 126, 127, 319, - 277, 277, 277, 277, 277, 326, 327, 328, 277, 59, - 458, 634, 635, 389, 637, 638, 136, 566, 60, 567, - 416, 389, 389, 389, 149, 150, 472, 153, 474, 475, - 476, 420, 421, 422, 133, 62, 423, 648, 649, 134, - 424, 425, 91, 2, 64, 65, 4, 107, 67, 68, - 69, 70, 71, 72, 73, 98, 1, 2, 439, 3, - 4, 5, 1, 440, 333, 3, 99, 5, 153, 64, - 65, 50, 51, 52, 600, 86, 53, 87, 100, 396, - 555, 1, 2, 102, 3, 4, 5, 74, 114, 115, - 389, 389, 389, 389, 389, 271, 397, 398, 399, 116, - 389, 117, 539, 103, 521, 434, 435, 436, 437, 438, - 104, 389, 389, 87, 153, 417, 277, 140, 446, 447, - 448, 595, 141, 596, 420, 421, 422, 148, 599, 423, - 596, 334, 335, 424, 425, 146, 166, 272, 230, 232, - 568, 233, 236, 571, 572, 573, 239, 240, 243, 336, - 337, 442, 338, 339, -56, 340, 341, 342, -57, -60, - 452, 389, -59, 389, -58, 251, 389, 619, 111, 275, - 282, 623, 349, 389, 389, 277, 487, 488, 489, 490, - 350, 359, 360, 371, 361, 496, 362, 419, 363, 372, - 373, 277, 473, 277, 277, 277, 75, 76, 391, 480, - 77, 374, 78, 108, 376, 406, 389, 389, 407, 389, - 389, 389, 389, 486, 415, 1, 408, 389, 3, 429, - 5, 409, 410, 411, 430, 431, 432, 433, 389, 613, - 455, 449, 459, 497, 460, 477, 478, 479, 540, 541, - 542, 543, 471, 483, 492, 545, 546, 493, 494, 495, - 333, 633, 392, 393, 499, 394, 501, 500, 507, 508, - 509, 511, 512, 513, 514, 389, 519, 533, 515, 527, - 548, 516, 517, 530, 521, 522, 296, 297, 524, 525, - 526, 576, 577, 578, 579, 547, 531, 535, 389, 389, - 404, 554, 536, 537, 538, 544, 549, 560, 412, 413, - 414, 556, 590, 570, 580, 277, 389, 467, 277, 277, - 277, 582, 581, 597, 560, 583, 551, 334, 335, 584, - 585, 609, 592, 591, 611, 601, 605, 602, 606, 607, - 603, 627, 389, 389, 604, 336, 337, 389, 338, 339, - 389, 340, 341, 342, 622, 624, 389, 625, 626, 389, - 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, - 308, 309, 310, 311, 628, -18, -19, 461, 462, 463, - 464, 465, 639, 640, 642, 645, 646, 470, 651, 652, - 621, 654, 222, 223, 608, 224, 131, 588, 481, 482, - 377, 378, 345, 147, 64, 65, 379, 551, 45, 130, - -211, 143, 97, 574, 491, 0, 1, 2, 0, 3, - 4, 5, 380, 381, 382, 0, 354, 0, -69, 1, - 2, 0, 3, 4, 5, 0, 0, 383, 384, 0, - 6, 7, 0, 0, 0, 0, 0, 0, 518, 0, - 520, 333, 0, 523, 0, 0, 385, 0, 0, 0, - 528, 529, 8, 0, 0, 0, 9, 0, 0, 0, - 10, 0, 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 255, 256, 257, - 258, 0, 0, 557, 558, 0, 562, 563, 564, 565, - 0, 0, 0, 0, 569, 285, 286, 287, 288, 289, - 290, 291, 292, 293, 294, 575, 259, 203, 615, 616, - 206, 207, 208, 209, 210, 211, 212, 213, 214, 0, - 260, 0, 261, 262, 263, 0, 336, 337, 0, 338, - 339, 0, 340, 341, 342, 0, 0, 0, 0, 0, - 0, 0, 598, 0, 0, 0, 0, 0, 0, 0, - 386, 0, 0, 0, 0, 377, 378, 0, 0, 64, - 65, 379, 0, 0, 0, 617, 618, 0, 0, 0, - 0, 1, 2, 0, 3, 4, 5, 380, 381, 382, - 0, 0, 0, 630, 0, 0, 0, 0, 0, 0, - 0, 0, 383, 384, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 111, 0, 643, - 644, 385, 0, 0, 647, 0, 0, 650, 0, 0, - 0, 0, 0, 653, 0, 0, 655, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 255, 256, 257, 258, 0, 64, 65, 0, - 107, 67, 68, 69, 70, 71, 72, 73, 0, 1, - 2, 0, 3, 4, 5, 0, 0, 0, 0, 0, - 0, 259, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 0, 260, 0, 261, 262, 263, - 74, 0, 0, 0, 0, 0, 0, 377, 378, 0, - 0, 64, 65, 379, 0, 0, 112, -210, 0, 0, - 0, 0, 0, 1, 2, 386, 3, 4, 5, 380, - 381, 382, 0, 0, 0, -69, 1, 2, 0, 3, - 4, 5, 0, 0, 383, 384, 0, 6, 7, 0, + 11, 82, 287, 357, 321, 275, 167, 522, 490, 411, + 13, 168, 286, 24, 286, 105, 91, 11, 518, 325, + 326, 327, 328, 329, 94, 498, 499, 13, 111, 335, + 111, 505, 376, 378, 317, 111, 510, 318, 478, 288, + 29, 30, 31, 32, 33, 34, 35, 36, 480, 37, + 2, 25, 109, 4, 111, 518, 659, 64, 65, 654, + 107, 67, 68, 69, 70, 71, 72, 73, 277, 1, + 2, 111, 3, 4, 5, 519, 136, 27, 144, 664, + 109, 479, -55, -55, -55, -55, 136, 145, 26, 135, + 336, 479, 153, 11, 361, 21, 363, 362, 144, 364, + 74, 451, 153, 246, 111, 247, 248, 239, 456, 569, + 22, 451, 133, 276, 236, 237, 608, 134, 240, 451, + 457, 614, 615, 111, 244, 430, 431, 432, 514, 112, + 433, 112, 119, 120, 434, 435, 112, 413, 455, 354, + 111, 428, 111, 28, 353, -145, 358, 359, 281, 604, + 169, 38, 39, 40, 44, 112, 551, 469, 60, 430, + 431, 432, 58, 95, 433, 635, 403, 655, 434, 435, + 337, 338, 112, 319, 320, 281, 322, 278, 106, 62, + 620, 451, 59, 657, 658, 549, 660, 661, 526, 323, + 281, 281, 281, 281, 281, 330, 331, 332, 333, 334, + 281, 46, 470, 47, 91, 112, 607, 165, 136, 671, + 672, 75, 76, 98, 426, 77, 99, 78, 484, 153, + 486, 487, 488, 585, 112, 586, 100, 408, -67, 102, + 397, 284, 339, 397, 397, 243, 397, 285, 86, 103, + 87, 112, 104, 112, 410, -67, -145, -67, 451, 87, + -145, 64, 65, 452, 107, 67, 68, 69, 70, 71, + 72, 73, 153, 1, 2, 140, 3, 4, 5, 1, + 141, 397, 3, 404, 5, 249, 250, 251, 252, 397, + 397, 397, 397, 397, 622, 574, 38, 39, 40, 148, + 405, 406, 407, 1, 74, 275, 3, 146, 5, 340, + 341, 64, 65, 116, 556, 117, 537, 166, 84, 85, + 153, 427, 281, 1, 2, 89, 3, 4, 5, 342, + 343, 90, 344, 345, 232, 346, 347, 348, 339, 430, + 431, 432, 234, 561, 433, 537, 149, 150, 434, 435, + 587, 114, 115, 590, 591, 592, 235, 238, -213, 454, + 241, 245, 397, 397, 397, 397, 397, 242, 464, 50, + 51, 52, 397, 616, 53, 617, -69, 1, 2, -56, + 3, 4, 5, 281, -57, 397, 397, 642, 6, 7, + -60, -59, 646, 122, 123, 124, 125, 126, 127, 281, + 485, 281, 281, 281, -58, 340, 341, 253, 111, 494, + 8, 279, 286, 276, 9, 75, 76, 355, 10, 77, + 356, 78, 108, 500, 365, 342, 343, 379, 344, 345, + 366, 346, 347, 348, 367, 399, 621, 397, 617, 397, + 414, 368, 397, 630, 369, 537, 370, 371, 380, 636, + 381, 397, 397, 382, 384, 415, 425, 439, 416, 417, + 418, 444, 445, 446, 447, 448, 449, 450, 419, 429, + 440, 441, 442, 656, 443, 544, 458, 459, 460, 300, + 301, 550, 461, 467, 471, 472, 397, 397, 489, 397, + 397, 397, 397, 491, 483, 492, 493, 397, 497, 506, + 507, 566, 508, 397, 509, 511, 515, 573, 513, 397, + 516, 517, 525, 579, 523, 527, 524, 528, 529, 530, + 531, 281, 532, 533, 281, 281, 281, 535, 537, 543, + 538, 579, 570, 540, 547, 541, 501, 502, 503, 504, + 400, 401, 542, 402, 548, 552, 553, 512, 397, 554, + 555, 567, 568, 302, 303, 304, 305, 306, 307, 308, + 309, 310, 311, 312, 313, 314, 315, 575, 563, 589, + 479, 600, 601, 397, 397, 602, 603, 605, 412, 611, + 606, 632, 623, 612, 624, 618, 420, 421, 422, 423, + 424, 613, 625, 397, 626, 634, 645, 647, 648, 649, + 650, 644, 557, 558, 559, 560, 651, 562, -18, 662, + 663, 564, 565, -19, 665, 668, 674, 669, 570, 397, + 397, 677, 675, 224, 397, 225, 226, 397, 131, 609, + 631, 351, 147, 397, 385, 386, 397, 143, 360, 45, + 387, 130, 97, 0, 0, 594, 0, 0, 596, 597, + 598, 599, 0, 0, 0, 0, 388, 389, 390, 473, + 474, 475, 476, 477, 0, 0, 0, 0, 0, 482, + 0, 391, 392, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 495, 496, 0, 0, 0, 0, 0, 0, + 393, 0, 0, 0, 0, 0, 627, 0, 628, 629, + 0, 0, 0, 0, 0, 0, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 257, 258, 259, 260, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 534, 0, 536, 0, 0, 539, + 0, 0, 0, 0, 0, 0, 0, 0, 545, 546, + 261, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 0, 262, 0, 263, 264, 265, 0, + 266, 267, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 0, 576, 577, 0, 581, 582, 583, 584, + 0, 0, 0, 0, 588, 0, 394, 0, 0, 0, + 593, 0, 0, 0, 64, 65, 595, 107, 67, 68, + 69, 70, 71, 72, 73, 0, 1, 2, 0, 3, + 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 385, 0, 0, 0, 0, 0, 8, - 0, 0, 0, 9, 0, 0, 0, 10, 0, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 255, 256, 257, 258, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, - 76, 0, 0, 77, 0, 78, 142, 0, 0, 0, - 0, 0, 0, 259, 203, 204, 205, 206, 207, 208, - 209, 210, 211, 212, 213, 214, 0, 260, 0, 261, - 262, 263, 64, 65, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 0, 3, 4, 5, - 252, 0, 0, 0, 0, 0, 0, 386, 0, 0, - 0, 0, 0, 0, 0, 253, 254, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 64, 65, - 111, 107, 156, 157, 158, 159, 160, 161, 73, 0, - 1, 2, 0, 3, 4, 5, 0, 0, 0, 0, - 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 255, 256, 257, 258, 0, - 0, 74, 64, 65, 0, 107, 156, 157, 158, 159, - 160, 161, 73, 0, 1, 2, 0, 3, 4, 5, - 0, 0, 0, 0, 259, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 0, 260, 0, - 261, 262, 263, 0, 0, 74, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 112, - 0, 64, 65, -67, 0, 264, 0, 0, 265, 0, - 266, 0, 267, 1, 2, 0, 3, 4, 5, 252, + 0, 0, 0, 0, 0, 619, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 253, 254, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, - 75, 76, 0, 0, 77, 0, 78, 369, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 255, 256, 257, 258, 0, 0, - 0, 0, 0, 0, 75, 76, 0, 0, 77, 0, - 78, 441, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 259, 203, 204, 205, 206, 207, 208, - 209, 210, 211, 212, 213, 214, 0, 260, 0, 261, - 262, 263, 0, 0, 0, 0, 0, 0, 0, 0, - 377, 378, 0, 0, 0, 0, 379, 0, 112, 0, - 0, 0, 0, 0, 264, 0, 0, 265, 0, 266, - 0, 267, 380, 381, 382, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 383, 384, 0, + 0, 0, 385, 386, 0, 0, 64, 65, 387, 0, + 640, 641, 0, 0, 0, 0, 0, 0, 1, 2, + 0, 3, 4, 5, 388, 389, 390, 0, 0, 0, + 653, 0, 0, 0, 0, 0, 0, 0, 0, 391, + 392, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 339, 0, 0, 666, 667, 393, 0, + 0, 670, 0, 0, 673, 0, 0, 0, 0, 0, + 676, 0, 0, 678, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 257, + 258, 259, 260, 0, 0, 0, 0, 0, 75, 76, + 0, 0, 77, 0, 78, 142, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 261, 203, + 638, 639, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 0, 262, 0, 263, 264, 265, 0, 266, 267, + 342, 343, 0, 344, 345, 0, 346, 347, 348, 385, + 386, 0, 0, 64, 65, 387, 0, 0, 0, 0, + 0, 0, 0, 0, 394, 1, 2, 0, 3, 4, + 5, 388, 389, 390, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 391, 392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 385, 0, 0, 0, + 0, 111, 0, 64, 65, 393, 107, 156, 157, 158, + 159, 160, 161, 73, 0, 1, 2, 0, 3, 4, + 5, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, 192, 193, 194, 257, 258, 259, 260, + 0, 0, 0, 0, 64, 65, 74, 107, 156, 157, + 158, 159, 160, 161, 73, 0, 1, 2, 0, 3, + 4, 5, 0, 0, 0, 261, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 0, 262, + 0, 263, 264, 265, 0, 266, 267, 74, 0, 0, + 0, 0, 0, 385, 386, 0, 0, 64, 65, 387, + 0, 0, 112, 0, 0, 0, 0, 0, 0, 1, + 2, 394, 3, 4, 5, 388, 389, 390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 255, 256, 257, - 258, 0, 0, 0, 0, 0, 0, 64, 65, 0, - 107, 67, 68, 69, 70, 71, 72, 73, 0, 1, - 2, 0, 3, 4, 5, 0, 259, 203, 204, 205, - 206, 207, 208, 209, 210, 211, 212, 213, 214, 135, - 260, 0, 261, 262, 263, 0, 0, 0, 64, 65, - 74, 151, 67, 68, 69, 70, 71, 72, 73, 0, - 1, 2, 0, 3, 4, 5, 0, 0, 64, 65, - 386, 107, 67, 68, 69, 70, 71, 72, 73, 0, - 1, 2, 0, 3, 4, 5, 0, 0, 0, 64, - 65, 74, 107, 156, 157, 158, 159, 160, 161, 73, - 344, 1, 2, 0, 3, 4, 5, 0, 0, 64, - 65, 74, 107, 67, 68, 69, 70, 71, 72, 73, + 391, 392, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 393, + 0, 0, 0, 0, 0, 0, 0, 75, 76, 0, + 0, 77, 0, 78, 377, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 257, 258, 259, 260, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 75, 76, + 0, 0, 77, 0, 78, 453, 0, 0, 0, 261, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 214, 0, 262, 0, 263, 264, 265, 0, 266, + 267, 64, 65, 0, 0, 0, 0, 0, -212, 0, + 0, 0, 0, 1, 2, 0, 3, 4, 5, 254, + 0, 0, 0, 0, 0, 394, -69, 1, 2, 0, + 3, 4, 5, 0, 255, 256, 0, 0, 6, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8, 0, 0, 0, 9, 0, 0, 0, 10, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 257, 258, 259, 260, 0, 64, + 65, 0, 151, 67, 68, 69, 70, 71, 72, 73, 0, 1, 2, 0, 3, 4, 5, 0, 0, 0, - 64, 65, 74, 107, 67, 68, 69, 70, 71, 72, - 73, 451, 1, 2, 0, 3, 4, 5, 0, 0, - 0, 0, 74, 0, 0, 0, 0, 0, 0, 75, - 76, 0, 553, 77, 0, 78, 152, 0, 0, 0, - 0, 64, 65, 74, 66, 67, 68, 69, 70, 71, - 72, 73, 0, 1, 2, 0, 3, 4, 5, 0, + 0, 0, 0, 261, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 0, 262, 0, 263, + 264, 265, 74, 266, 267, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 75, 76, 0, 0, 77, 0, 78, 0, 0, 0, - 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, - 75, 76, 0, 0, 77, 0, 78, 0, 0, 0, + 112, 0, 64, 65, -67, 0, 268, 0, 0, 269, + 0, 270, 0, 271, 1, 2, 0, 3, 4, 5, + 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 255, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 75, 76, 0, 364, 77, 0, 78, 0, 0, + 111, 0, 0, 0, 0, 0, 0, 152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 75, 76, 0, 0, 77, 0, 78, 0, 0, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 257, 258, 259, 260, 0, + 0, 0, 0, 75, 76, 0, 0, 77, 0, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 75, 76, 0, 0, 77, 0, 78, 64, + 0, 0, 0, 0, 261, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 0, 262, 0, + 263, 264, 265, 0, 266, 267, 0, 64, 65, 0, + 107, 67, 68, 69, 70, 71, 72, 73, 0, 1, + 2, 112, 3, 4, 5, 0, 0, 268, 0, 0, + 269, 0, 270, 0, 271, 0, 0, 0, 0, 350, + 0, 0, 0, 0, 0, 0, 0, 0, 64, 65, + 74, 107, 156, 157, 158, 159, 160, 161, 73, 0, + 1, 2, 0, 3, 4, 5, 64, 65, 0, 107, + 67, 68, 69, 70, 71, 72, 73, 0, 1, 2, + 0, 3, 4, 5, 0, 0, 0, 0, 0, 0, + 0, 74, 0, 0, 0, 0, 0, 0, 463, 0, + 0, 0, 0, 0, 0, 0, 0, 64, 65, 74, + 107, 67, 68, 69, 70, 71, 72, 73, 0, 1, + 2, 0, 3, 4, 5, 64, 65, 0, 66, 67, + 68, 69, 70, 71, 72, 73, 0, 1, 2, 572, + 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, + 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 75, 76, 0, 0, 77, 0, 78, 74, 64, 65, 0, 107, 156, 157, 158, 159, 160, 161, 73, 0, 1, 2, 0, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 75, 76, 0, 0, 77, 0, 78, - 64, 65, 74, 151, 67, 68, 69, 70, 71, 72, - 73, 0, 1, 2, 0, 3, 4, 5, 64, 65, - 0, 107, 67, 68, 69, 70, 71, 72, 73, 0, - 1, 2, 0, 3, 4, 5, 0, 0, 0, 0, - 0, 64, 65, 74, 276, 67, 68, 69, 70, 71, - 72, 73, 0, 1, 2, 0, 3, 4, 5, 64, - 65, 74, 107, 156, 157, 158, 159, 160, 161, 73, - 0, 1, 2, 0, 3, 4, 5, 0, 0, 0, - 0, 0, 64, 65, 74, 107, 67, 68, 69, 70, - 71, 72, 559, 0, 1, 2, 0, 3, 4, 5, + 0, 0, 75, 76, 0, 372, 77, 0, 78, 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, + 75, 76, 0, 0, 77, 0, 78, 64, 65, 0, + 151, 67, 68, 69, 70, 71, 72, 73, 0, 1, + 2, 0, 3, 4, 5, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 75, 76, 0, 0, 77, 0, 78, 0, 0, + 74, 0, 0, 0, 0, 0, 0, 0, 0, 75, + 76, 0, 0, 77, 0, 78, 0, 64, 65, 0, + 107, 67, 68, 69, 70, 71, 72, 73, 0, 1, + 2, 0, 3, 4, 5, 64, 65, 0, 280, 67, + 68, 69, 70, 71, 72, 73, 0, 1, 2, 0, + 3, 4, 5, 75, 76, 0, 0, 77, 0, 78, + 74, 0, 0, 0, 64, 65, 0, 107, 156, 157, + 158, 159, 160, 161, 73, 0, 1, 2, 74, 3, + 4, 5, 64, 65, 0, 107, 67, 68, 69, 70, + 71, 72, 578, 0, 1, 2, 0, 3, 4, 5, + 0, 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 75, 76, 0, 0, 77, 0, 78, 0, 0, 0, 0, 0, 64, 65, 74, 107, 67, 68, 69, - 70, 71, 72, 620, 0, 1, 2, 0, 3, 4, + 70, 71, 72, 643, 0, 1, 2, 0, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 75, 76, 0, 0, 77, 0, 78, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, - 75, 76, 0, 0, 77, 0, 78, 0, 0, 0, + 0, 75, 76, 0, 0, 77, 0, 78, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, + 76, 0, 0, 77, 0, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 75, 76, 0, 0, 77, 0, 78, - 0, 0, 0, 0, 0, 0, 0, 0, 171, 0, - 0, 75, 76, 0, 0, 77, 0, 367, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 172, - 173, 0, 0, 0, 75, 76, 0, 0, 77, 0, - 78, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 75, 76, 0, 0, 77, - 0, 78, 0, 0, 0, 0, 199, 200, 201, 0, - 0, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221 + 171, 0, 0, 0, 0, 0, 0, 0, 75, 76, + 0, 0, 77, 0, 375, 0, 0, 0, 0, 0, + 0, 172, 173, 0, 0, 0, 75, 76, 0, 0, + 77, 0, 78, 174, 175, 176, 177, 178, 179, 180, + 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, 194, 195, 196, 197, 198, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 75, 76, 0, + 0, 77, 0, 78, 0, 0, 0, 0, 199, 200, + 201, 0, 0, 202, 203, 204, 205, 206, 207, 208, + 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, + 219, 220, 221, 222, 223 }; static const yytype_int16 yycheck[] = { - 0, 27, 240, 176, 11, 316, 4, 164, 128, 11, - 201, 21, 28, 0, 265, 266, 34, 17, 55, 29, - 55, 427, 428, 197, 165, 216, 217, 218, 219, 220, - 17, 198, 11, 224, 55, 55, 452, 156, 177, 154, - 55, 42, 43, 44, 45, 46, 47, 48, 49, 164, - 51, 11, 78, 34, 613, 157, 157, 121, 55, 55, - 55, 157, 53, 11, 166, 166, 32, 33, 164, 17, - 55, 41, 42, 54, 633, 54, 102, 68, 48, 55, - 106, 255, 59, 257, 54, 149, 112, 226, 157, 256, - 156, 258, 118, 93, 54, 157, 157, 166, 18, 505, - 241, 242, 128, 164, 166, 3, 4, 5, 6, 3, - 4, 5, 6, 156, 140, 141, 367, 154, 144, 154, - 38, 139, 140, 141, 150, 160, 144, 164, 26, 27, - 148, 149, 0, 154, 154, 386, 157, 158, 554, 154, - 155, 332, 162, 559, 560, 151, 152, 153, 174, 165, - 151, 152, 153, 117, 118, 162, 166, 154, 154, 154, - 162, 158, 277, 158, 284, 280, 281, 165, 283, 154, - 155, 482, 156, 199, 200, 201, 202, 46, 154, 48, - 167, 157, 158, 62, 63, 64, 65, 66, 67, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 156, - 391, 617, 618, 318, 620, 621, 232, 518, 160, 520, - 330, 326, 327, 328, 114, 115, 407, 243, 409, 410, - 411, 139, 140, 141, 157, 22, 144, 643, 644, 162, - 148, 149, 21, 20, 7, 8, 23, 10, 11, 12, - 13, 14, 15, 16, 17, 22, 19, 20, 157, 22, - 23, 24, 19, 162, 54, 22, 22, 24, 284, 7, - 8, 42, 43, 44, 575, 35, 47, 37, 22, 295, - 508, 19, 20, 154, 22, 23, 24, 50, 84, 85, - 395, 396, 397, 398, 399, 442, 312, 313, 314, 42, - 405, 44, 155, 4, 157, 359, 360, 361, 362, 363, - 4, 416, 417, 37, 330, 331, 332, 161, 372, 373, - 374, 155, 161, 157, 139, 140, 141, 158, 155, 144, - 157, 121, 122, 148, 149, 154, 4, 442, 22, 157, - 521, 155, 164, 524, 525, 526, 4, 155, 154, 139, - 140, 367, 142, 143, 9, 145, 146, 147, 9, 9, - 376, 466, 9, 468, 9, 9, 471, 595, 55, 57, - 11, 599, 164, 478, 479, 391, 430, 431, 432, 433, - 155, 154, 154, 22, 154, 439, 154, 4, 154, 154, - 154, 407, 408, 409, 410, 411, 159, 160, 157, 415, - 163, 154, 165, 166, 154, 157, 511, 512, 157, 514, - 515, 516, 517, 429, 38, 19, 157, 522, 22, 38, - 24, 157, 157, 157, 154, 154, 154, 154, 533, 592, - 61, 157, 157, 164, 157, 157, 157, 157, 492, 493, - 494, 495, 160, 157, 157, 499, 500, 157, 157, 157, - 54, 614, 280, 281, 157, 283, 38, 157, 157, 155, - 22, 17, 17, 154, 157, 570, 4, 483, 157, 4, - 22, 157, 157, 154, 157, 157, 26, 27, 157, 157, - 157, 535, 536, 537, 538, 501, 157, 157, 593, 594, - 318, 507, 157, 157, 157, 164, 4, 513, 326, 327, - 328, 157, 22, 157, 157, 521, 611, 54, 524, 525, - 526, 157, 155, 162, 530, 157, 506, 121, 122, 155, - 155, 54, 160, 157, 17, 155, 580, 155, 582, 583, - 155, 4, 637, 638, 155, 139, 140, 642, 142, 143, - 645, 145, 146, 147, 162, 155, 651, 155, 155, 654, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 150, 154, 154, 395, 396, 397, - 398, 399, 22, 157, 17, 17, 157, 405, 17, 73, - 596, 17, 131, 131, 587, 131, 93, 555, 416, 417, - 3, 4, 232, 112, 7, 8, 9, 587, 17, 90, - 0, 106, 57, 530, 434, -1, 19, 20, -1, 22, - 23, 24, 25, 26, 27, -1, 243, -1, 18, 19, - 20, -1, 22, 23, 24, -1, -1, 40, 41, -1, - 30, 31, -1, -1, -1, -1, -1, -1, 466, -1, - 468, 54, -1, 471, -1, -1, 59, -1, -1, -1, - 478, 479, 52, -1, -1, -1, 56, -1, -1, -1, - 60, -1, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, -1, -1, 511, 512, -1, 514, 515, 516, 517, - -1, -1, -1, -1, 522, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 533, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, -1, - 133, -1, 135, 136, 137, -1, 139, 140, -1, 142, - 143, -1, 145, 146, 147, -1, -1, -1, -1, -1, - -1, -1, 570, -1, -1, -1, -1, -1, -1, -1, - 163, -1, -1, -1, -1, 3, 4, -1, -1, 7, - 8, 9, -1, -1, -1, 593, 594, -1, -1, -1, - -1, 19, 20, -1, 22, 23, 24, 25, 26, 27, - -1, -1, -1, 611, -1, -1, -1, -1, -1, -1, - -1, -1, 40, 41, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 55, -1, 637, - 638, 59, -1, -1, 642, -1, -1, 645, -1, -1, - -1, -1, -1, 651, -1, -1, 654, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, -1, 7, 8, -1, - 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, - 20, -1, 22, 23, 24, -1, -1, -1, -1, -1, - -1, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, -1, 133, -1, 135, 136, 137, - 50, -1, -1, -1, -1, -1, -1, 3, 4, -1, - -1, 7, 8, 9, -1, -1, 154, 0, -1, -1, - -1, -1, -1, 19, 20, 163, 22, 23, 24, 25, - 26, 27, -1, -1, -1, 18, 19, 20, -1, 22, - 23, 24, -1, -1, 40, 41, -1, 30, 31, -1, + 0, 27, 176, 242, 201, 164, 128, 464, 421, 320, + 0, 28, 11, 158, 11, 4, 21, 17, 34, 216, + 217, 218, 219, 220, 29, 437, 438, 17, 55, 226, + 55, 444, 269, 270, 197, 55, 449, 198, 11, 177, + 42, 43, 44, 45, 46, 47, 48, 49, 11, 51, + 20, 59, 78, 23, 55, 34, 38, 7, 8, 636, + 10, 11, 12, 13, 14, 15, 16, 17, 165, 19, + 20, 55, 22, 23, 24, 54, 102, 18, 159, 656, + 106, 54, 3, 4, 5, 6, 112, 168, 158, 39, + 228, 54, 118, 93, 257, 53, 259, 258, 159, 260, + 50, 159, 128, 154, 55, 26, 27, 168, 166, 521, + 68, 159, 159, 164, 140, 141, 573, 164, 144, 159, + 168, 578, 579, 55, 150, 141, 142, 143, 168, 156, + 146, 156, 32, 33, 150, 151, 156, 162, 375, 166, + 55, 338, 55, 158, 164, 55, 243, 244, 174, 562, + 167, 153, 154, 155, 0, 156, 157, 394, 162, 141, + 142, 143, 158, 168, 146, 164, 288, 164, 150, 151, + 117, 118, 156, 199, 200, 201, 202, 167, 167, 22, + 593, 159, 158, 640, 641, 496, 643, 644, 166, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 46, 399, 48, 21, 156, 157, 121, 234, 666, + 667, 161, 162, 22, 336, 165, 22, 167, 415, 245, + 417, 418, 419, 534, 156, 536, 22, 159, 160, 156, + 281, 11, 54, 284, 285, 149, 287, 17, 35, 4, + 37, 156, 4, 156, 159, 160, 156, 160, 159, 37, + 160, 7, 8, 164, 10, 11, 12, 13, 14, 15, + 16, 17, 288, 19, 20, 163, 22, 23, 24, 19, + 163, 322, 22, 299, 24, 3, 4, 5, 6, 330, + 331, 332, 333, 334, 595, 524, 153, 154, 155, 160, + 316, 317, 318, 19, 50, 454, 22, 156, 24, 121, + 122, 7, 8, 42, 157, 44, 159, 4, 41, 42, + 336, 337, 338, 19, 20, 48, 22, 23, 24, 141, + 142, 54, 144, 145, 22, 147, 148, 149, 54, 141, + 142, 143, 159, 157, 146, 159, 114, 115, 150, 151, + 537, 84, 85, 540, 541, 542, 157, 166, 0, 375, + 4, 156, 403, 404, 405, 406, 407, 157, 384, 42, + 43, 44, 413, 157, 47, 159, 18, 19, 20, 9, + 22, 23, 24, 399, 9, 426, 427, 616, 30, 31, + 9, 9, 621, 62, 63, 64, 65, 66, 67, 415, + 416, 417, 418, 419, 9, 121, 122, 9, 55, 425, + 52, 57, 11, 454, 56, 161, 162, 166, 60, 165, + 157, 167, 168, 439, 156, 141, 142, 22, 144, 145, + 156, 147, 148, 149, 156, 159, 157, 478, 159, 480, + 159, 156, 483, 157, 156, 159, 156, 156, 156, 613, + 156, 492, 493, 156, 156, 159, 38, 38, 159, 159, + 159, 365, 366, 367, 368, 369, 370, 371, 159, 4, + 156, 156, 156, 637, 156, 491, 380, 381, 382, 26, + 27, 497, 159, 61, 159, 159, 527, 528, 159, 530, + 531, 532, 533, 159, 162, 159, 159, 538, 159, 159, + 159, 517, 159, 544, 159, 159, 159, 523, 166, 550, + 159, 38, 22, 529, 159, 17, 157, 17, 156, 159, + 159, 537, 159, 159, 540, 541, 542, 4, 159, 4, + 159, 547, 522, 159, 156, 159, 440, 441, 442, 443, + 284, 285, 159, 287, 159, 159, 159, 451, 589, 159, + 159, 22, 4, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 159, 166, 159, + 54, 159, 157, 614, 615, 159, 159, 157, 322, 22, + 157, 54, 157, 159, 157, 164, 330, 331, 332, 333, + 334, 162, 157, 634, 157, 17, 164, 157, 157, 157, + 4, 617, 506, 507, 508, 509, 152, 511, 156, 22, + 159, 515, 516, 156, 17, 17, 17, 159, 608, 660, + 661, 17, 73, 131, 665, 131, 131, 668, 93, 574, + 608, 234, 112, 674, 3, 4, 677, 106, 245, 17, + 9, 90, 57, -1, -1, 547, -1, -1, 552, 553, + 554, 555, -1, -1, -1, -1, 25, 26, 27, 403, + 404, 405, 406, 407, -1, -1, -1, -1, -1, 413, + -1, 40, 41, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 426, 427, -1, -1, -1, -1, -1, -1, + 59, -1, -1, -1, -1, -1, 600, -1, 602, 603, + -1, -1, -1, -1, -1, -1, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, 92, 93, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 478, -1, 480, -1, -1, 483, + -1, -1, -1, -1, -1, -1, -1, -1, 492, 493, + 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, + 129, 130, 131, -1, 133, -1, 135, 136, 137, -1, + 139, 140, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, -1, 527, 528, -1, 530, 531, 532, 533, + -1, -1, -1, -1, 538, -1, 165, -1, -1, -1, + 544, -1, -1, -1, 7, 8, 550, 10, 11, 12, + 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, + 23, 24, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 589, -1, 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 59, -1, -1, -1, -1, -1, 52, - -1, -1, -1, 56, -1, -1, -1, 60, -1, 75, + -1, -1, 3, 4, -1, -1, 7, 8, 9, -1, + 614, 615, -1, -1, -1, -1, -1, -1, 19, 20, + -1, 22, 23, 24, 25, 26, 27, -1, -1, -1, + 634, -1, -1, -1, -1, -1, -1, -1, -1, 40, + 41, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 54, -1, -1, 660, 661, 59, -1, + -1, 665, -1, -1, 668, -1, -1, -1, -1, -1, + 674, -1, -1, 677, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, 92, 93, -1, -1, -1, -1, -1, 161, 162, + -1, -1, 165, -1, 167, 168, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 119, 120, + 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, + 131, -1, 133, -1, 135, 136, 137, -1, 139, 140, + 141, 142, -1, 144, 145, -1, 147, 148, 149, 3, + 4, -1, -1, 7, 8, 9, -1, -1, -1, -1, + -1, -1, -1, -1, 165, 19, 20, -1, 22, 23, + 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 40, 41, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 55, -1, 7, 8, 59, 10, 11, 12, 13, + 14, 15, 16, 17, -1, 19, 20, -1, 22, 23, + 24, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + -1, -1, -1, -1, 7, 8, 50, 10, 11, 12, + 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, + 23, 24, -1, -1, -1, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, -1, 133, + -1, 135, 136, 137, -1, 139, 140, 50, -1, -1, + -1, -1, -1, 3, 4, -1, -1, 7, 8, 9, + -1, -1, 156, -1, -1, -1, -1, -1, -1, 19, + 20, 165, 22, 23, 24, 25, 26, 27, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 40, 41, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 59, + -1, -1, -1, -1, -1, -1, -1, 161, 162, -1, + -1, 165, -1, 167, 168, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 161, 162, + -1, -1, 165, -1, 167, 168, -1, -1, -1, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, -1, 133, -1, 135, 136, 137, -1, 139, + 140, 7, 8, -1, -1, -1, -1, -1, 0, -1, + -1, -1, -1, 19, 20, -1, 22, 23, 24, 25, + -1, -1, -1, -1, -1, 165, 18, 19, 20, -1, + 22, 23, 24, -1, 40, 41, -1, -1, 30, 31, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 52, -1, -1, -1, 56, -1, -1, -1, 60, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 159, - 160, -1, -1, 163, -1, 165, 166, -1, -1, -1, + 86, 87, 88, 89, 90, 91, 92, 93, -1, 7, + 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, + -1, 19, 20, -1, 22, 23, 24, -1, -1, -1, -1, -1, -1, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, -1, 133, -1, 135, - 136, 137, 7, 8, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 19, 20, -1, 22, 23, 24, - 25, -1, -1, -1, -1, -1, -1, 163, -1, -1, + 136, 137, 50, 139, 140, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 156, -1, 7, 8, 160, -1, 162, -1, -1, 165, + -1, 167, -1, 169, 19, 20, -1, 22, 23, 24, + 25, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, 41, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 7, 8, - 55, 10, 11, 12, 13, 14, 15, 16, 17, -1, - 19, 20, -1, 22, 23, 24, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 55, -1, -1, -1, -1, -1, -1, 125, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, -1, - -1, 50, 7, 8, -1, 10, 11, 12, 13, 14, - 15, 16, 17, -1, 19, 20, -1, 22, 23, 24, + -1, -1, -1, 161, 162, -1, -1, 165, -1, 167, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, -1, 133, -1, - 135, 136, 137, -1, -1, 50, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 154, - -1, 7, 8, 158, -1, 160, -1, -1, 163, -1, - 165, -1, 167, 19, 20, -1, 22, 23, 24, 25, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 40, 41, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 55, - 159, 160, -1, -1, 163, -1, 165, 166, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, -1, -1, - -1, -1, -1, -1, 159, 160, -1, -1, 163, -1, - 165, 166, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, -1, 133, -1, 135, - 136, 137, -1, -1, -1, -1, -1, -1, -1, -1, - 3, 4, -1, -1, -1, -1, 9, -1, 154, -1, - -1, -1, -1, -1, 160, -1, -1, 163, -1, 165, - -1, 167, 25, 26, 27, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 40, 41, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 59, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, -1, -1, -1, -1, -1, -1, 7, 8, -1, + 135, 136, 137, -1, 139, 140, -1, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, - 20, -1, 22, 23, 24, -1, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 39, - 133, -1, 135, 136, 137, -1, -1, -1, 7, 8, + 20, 156, 22, 23, 24, -1, -1, 162, -1, -1, + 165, -1, 167, -1, 169, -1, -1, -1, -1, 39, + -1, -1, -1, -1, -1, -1, -1, -1, 7, 8, 50, 10, 11, 12, 13, 14, 15, 16, 17, -1, - 19, 20, -1, 22, 23, 24, -1, -1, 7, 8, - 163, 10, 11, 12, 13, 14, 15, 16, 17, -1, - 19, 20, -1, 22, 23, 24, -1, -1, -1, 7, - 8, 50, 10, 11, 12, 13, 14, 15, 16, 17, - 39, 19, 20, -1, 22, 23, 24, -1, -1, 7, - 8, 50, 10, 11, 12, 13, 14, 15, 16, 17, - -1, 19, 20, -1, 22, 23, 24, -1, -1, -1, - 7, 8, 50, 10, 11, 12, 13, 14, 15, 16, - 17, 39, 19, 20, -1, 22, 23, 24, -1, -1, - -1, -1, 50, -1, -1, -1, -1, -1, -1, 159, - 160, -1, 39, 163, -1, 165, 125, -1, -1, -1, - -1, 7, 8, 50, 10, 11, 12, 13, 14, 15, - 16, 17, -1, 19, 20, -1, 22, 23, 24, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 159, 160, -1, -1, 163, -1, 165, -1, -1, -1, - -1, -1, -1, -1, 50, -1, -1, -1, -1, -1, - 159, 160, -1, -1, 163, -1, 165, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 159, 160, -1, 162, 163, -1, 165, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 159, 160, -1, -1, 163, -1, 165, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 159, 160, -1, -1, 163, -1, 165, 7, + 19, 20, -1, 22, 23, 24, 7, 8, -1, 10, + 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, + -1, 22, 23, 24, -1, -1, -1, -1, -1, -1, + -1, 50, -1, -1, -1, -1, -1, -1, 39, -1, + -1, -1, -1, -1, -1, -1, -1, 7, 8, 50, + 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, + 20, -1, 22, 23, 24, 7, 8, -1, 10, 11, + 12, 13, 14, 15, 16, 17, -1, 19, 20, 39, + 22, 23, 24, -1, -1, -1, -1, -1, -1, -1, + 50, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 161, 162, -1, -1, 165, -1, 167, 50, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, 23, 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 159, 160, -1, -1, 163, -1, 165, - 7, 8, 50, 10, 11, 12, 13, 14, 15, 16, - 17, -1, 19, 20, -1, 22, 23, 24, 7, 8, - -1, 10, 11, 12, 13, 14, 15, 16, 17, -1, - 19, 20, -1, 22, 23, 24, -1, -1, -1, -1, - -1, 7, 8, 50, 10, 11, 12, 13, 14, 15, - 16, 17, -1, 19, 20, -1, 22, 23, 24, 7, - 8, 50, 10, 11, 12, 13, 14, 15, 16, 17, - -1, 19, 20, -1, 22, 23, 24, -1, -1, -1, - -1, -1, 7, 8, 50, 10, 11, 12, 13, 14, - 15, 16, 17, -1, 19, 20, -1, 22, 23, 24, + -1, -1, 161, 162, -1, 164, 165, -1, 167, -1, -1, -1, 50, -1, -1, -1, -1, -1, -1, -1, - -1, 159, 160, -1, -1, 163, -1, 165, -1, -1, + 161, 162, -1, -1, 165, -1, 167, 7, 8, -1, + 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, + 20, -1, 22, 23, 24, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 161, 162, -1, -1, 165, -1, 167, -1, -1, + 50, -1, -1, -1, -1, -1, -1, -1, -1, 161, + 162, -1, -1, 165, -1, 167, -1, 7, 8, -1, + 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, + 20, -1, 22, 23, 24, 7, 8, -1, 10, 11, + 12, 13, 14, 15, 16, 17, -1, 19, 20, -1, + 22, 23, 24, 161, 162, -1, -1, 165, -1, 167, + 50, -1, -1, -1, 7, 8, -1, 10, 11, 12, + 13, 14, 15, 16, 17, -1, 19, 20, 50, 22, + 23, 24, 7, 8, -1, 10, 11, 12, 13, 14, + 15, 16, 17, -1, 19, 20, -1, 22, 23, 24, + -1, -1, -1, -1, -1, -1, -1, 50, -1, -1, + -1, 161, 162, -1, -1, 165, -1, 167, -1, -1, -1, -1, -1, 7, 8, 50, 10, 11, 12, 13, 14, 15, 16, 17, -1, 19, 20, -1, 22, 23, 24, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 159, 160, -1, -1, 163, -1, 165, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 50, -1, -1, -1, - 159, 160, -1, -1, 163, -1, 165, -1, -1, -1, + -1, 161, 162, -1, -1, 165, -1, 167, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 161, + 162, -1, -1, 165, -1, 167, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 159, 160, -1, -1, 163, -1, 165, - -1, -1, -1, -1, -1, -1, -1, -1, 36, -1, - -1, 159, 160, -1, -1, 163, -1, 165, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 57, - 58, -1, -1, -1, 159, 160, -1, -1, 163, -1, - 165, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 159, 160, -1, -1, 163, - -1, 165, -1, -1, -1, -1, 114, 115, 116, -1, - -1, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138 + 36, -1, -1, -1, -1, -1, -1, -1, 161, 162, + -1, -1, 165, -1, 167, -1, -1, -1, -1, -1, + -1, 57, 58, -1, -1, -1, 161, 162, -1, -1, + 165, -1, 167, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 161, 162, -1, + -1, 165, -1, 167, -1, -1, -1, -1, 114, 115, + 116, -1, -1, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -2624,71 +2660,73 @@ static const yytype_uint8 yystos[] = { 0, 19, 20, 22, 23, 24, 30, 31, 52, 56, - 60, 176, 179, 180, 181, 182, 214, 215, 216, 218, - 217, 53, 68, 223, 156, 59, 156, 18, 156, 42, - 43, 44, 45, 46, 47, 48, 49, 51, 151, 152, - 153, 183, 184, 185, 0, 216, 46, 48, 186, 233, - 42, 43, 44, 47, 187, 230, 232, 240, 156, 156, - 160, 224, 22, 222, 7, 8, 10, 11, 12, 13, - 14, 15, 16, 17, 50, 159, 160, 163, 165, 176, - 180, 201, 202, 236, 185, 185, 35, 37, 212, 185, - 185, 21, 241, 242, 29, 166, 231, 241, 22, 22, - 22, 225, 154, 4, 4, 4, 165, 10, 166, 202, - 207, 55, 154, 178, 212, 212, 42, 44, 188, 32, - 33, 211, 62, 63, 64, 65, 66, 67, 189, 228, - 228, 179, 245, 157, 162, 39, 202, 203, 205, 206, - 161, 161, 166, 207, 157, 166, 154, 206, 158, 211, - 211, 10, 125, 202, 204, 213, 11, 12, 13, 14, - 15, 16, 174, 175, 202, 208, 4, 204, 28, 165, - 229, 36, 57, 58, 69, 70, 71, 72, 73, 74, + 60, 178, 181, 182, 183, 184, 216, 217, 218, 220, + 219, 53, 68, 225, 158, 59, 158, 18, 158, 42, + 43, 44, 45, 46, 47, 48, 49, 51, 153, 154, + 155, 185, 186, 187, 0, 218, 46, 48, 188, 235, + 42, 43, 44, 47, 189, 232, 234, 242, 158, 158, + 162, 226, 22, 224, 7, 8, 10, 11, 12, 13, + 14, 15, 16, 17, 50, 161, 162, 165, 167, 178, + 182, 203, 204, 238, 187, 187, 35, 37, 214, 187, + 187, 21, 243, 244, 29, 168, 233, 243, 22, 22, + 22, 227, 156, 4, 4, 4, 167, 10, 168, 204, + 209, 55, 156, 180, 214, 214, 42, 44, 190, 32, + 33, 213, 62, 63, 64, 65, 66, 67, 191, 230, + 230, 181, 247, 159, 164, 39, 204, 205, 207, 208, + 163, 163, 168, 209, 159, 168, 156, 208, 160, 213, + 213, 10, 125, 204, 206, 215, 11, 12, 13, 14, + 15, 16, 176, 177, 204, 210, 4, 206, 28, 167, + 231, 36, 57, 58, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 114, 115, 116, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 169, 170, 171, 243, 249, 250, 251, 252, - 22, 191, 157, 155, 202, 202, 164, 166, 202, 4, - 155, 208, 202, 154, 236, 26, 27, 3, 4, 5, - 6, 9, 25, 40, 41, 90, 91, 92, 93, 119, - 133, 135, 136, 137, 160, 163, 165, 167, 169, 170, - 171, 209, 236, 178, 180, 57, 10, 202, 238, 239, - 11, 17, 11, 174, 189, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 172, 26, 27, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 173, 172, 173, 202, 202, 238, 202, 202, - 246, 238, 238, 238, 238, 238, 202, 202, 202, 238, - 189, 117, 118, 54, 121, 122, 139, 140, 142, 143, - 145, 146, 147, 190, 39, 203, 193, 162, 164, 164, - 155, 193, 178, 178, 213, 172, 173, 172, 173, 154, - 154, 154, 154, 154, 162, 208, 210, 165, 210, 166, - 210, 22, 154, 154, 154, 219, 154, 3, 4, 9, - 25, 26, 27, 40, 41, 59, 163, 209, 235, 236, - 237, 157, 237, 237, 237, 204, 202, 202, 202, 202, - 157, 196, 157, 196, 237, 160, 157, 157, 157, 157, - 157, 157, 237, 237, 237, 38, 204, 202, 238, 4, - 139, 140, 141, 144, 148, 149, 192, 220, 221, 38, - 154, 154, 154, 154, 208, 208, 208, 208, 208, 157, - 162, 166, 202, 210, 164, 166, 208, 208, 208, 157, - 199, 39, 202, 226, 227, 61, 234, 210, 238, 157, - 157, 237, 237, 237, 237, 237, 11, 54, 11, 248, - 237, 160, 238, 202, 238, 238, 238, 157, 157, 157, - 202, 237, 237, 157, 199, 199, 202, 208, 208, 208, - 208, 248, 157, 157, 157, 157, 208, 164, 166, 157, - 157, 38, 34, 54, 197, 200, 191, 157, 155, 22, - 164, 17, 17, 154, 157, 157, 157, 157, 237, 4, - 237, 157, 157, 237, 157, 157, 157, 4, 237, 237, - 154, 157, 196, 202, 155, 157, 157, 157, 157, 155, - 208, 208, 208, 208, 164, 208, 208, 202, 22, 4, - 199, 176, 177, 39, 202, 193, 157, 237, 237, 17, - 202, 247, 237, 237, 237, 237, 196, 196, 238, 237, - 157, 238, 238, 238, 247, 237, 208, 208, 208, 208, - 157, 155, 157, 157, 155, 155, 155, 191, 197, 198, - 22, 157, 160, 191, 191, 155, 157, 162, 237, 155, - 196, 155, 155, 155, 155, 208, 208, 208, 177, 54, - 195, 17, 162, 174, 244, 121, 122, 237, 237, 193, - 17, 202, 162, 193, 155, 155, 155, 4, 150, 194, - 237, 235, 162, 174, 191, 191, 38, 191, 191, 22, - 157, 235, 17, 237, 237, 17, 157, 237, 191, 191, - 237, 17, 73, 237, 17, 237 + 137, 138, 139, 140, 171, 172, 173, 245, 251, 252, + 253, 254, 22, 193, 159, 157, 204, 204, 166, 168, + 204, 4, 157, 210, 204, 156, 238, 26, 27, 3, + 4, 5, 6, 9, 25, 40, 41, 90, 91, 92, + 93, 119, 133, 135, 136, 137, 139, 140, 162, 165, + 167, 169, 171, 172, 173, 211, 238, 180, 182, 57, + 10, 204, 240, 241, 11, 17, 11, 176, 191, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 174, + 26, 27, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 175, 174, 175, 204, + 204, 240, 204, 204, 248, 240, 240, 240, 240, 240, + 204, 204, 204, 204, 204, 240, 191, 117, 118, 54, + 121, 122, 141, 142, 144, 145, 147, 148, 149, 192, + 39, 205, 195, 164, 166, 166, 157, 195, 180, 180, + 215, 174, 175, 174, 175, 156, 156, 156, 156, 156, + 156, 156, 164, 210, 212, 167, 212, 168, 212, 22, + 156, 156, 156, 221, 156, 3, 4, 9, 25, 26, + 27, 40, 41, 59, 165, 211, 237, 238, 239, 159, + 239, 239, 239, 206, 204, 204, 204, 204, 159, 198, + 159, 198, 239, 162, 159, 159, 159, 159, 159, 159, + 239, 239, 239, 239, 239, 38, 206, 204, 240, 4, + 141, 142, 143, 146, 150, 151, 194, 222, 223, 38, + 156, 156, 156, 156, 210, 210, 210, 210, 210, 210, + 210, 159, 164, 168, 204, 212, 166, 168, 210, 210, + 210, 159, 201, 39, 204, 228, 229, 61, 236, 212, + 240, 159, 159, 239, 239, 239, 239, 239, 11, 54, + 11, 250, 239, 162, 240, 204, 240, 240, 240, 159, + 250, 159, 159, 159, 204, 239, 239, 159, 201, 201, + 204, 210, 210, 210, 210, 250, 159, 159, 159, 159, + 250, 159, 210, 166, 168, 159, 159, 38, 34, 54, + 199, 202, 193, 159, 157, 22, 166, 17, 17, 156, + 159, 159, 159, 159, 239, 4, 239, 159, 159, 239, + 159, 159, 159, 4, 204, 239, 239, 156, 159, 198, + 204, 157, 159, 159, 159, 159, 157, 210, 210, 210, + 210, 157, 210, 166, 210, 210, 204, 22, 4, 201, + 178, 179, 39, 204, 195, 159, 239, 239, 17, 204, + 249, 239, 239, 239, 239, 198, 198, 240, 239, 159, + 240, 240, 240, 239, 249, 239, 210, 210, 210, 210, + 159, 157, 159, 159, 250, 157, 157, 157, 193, 199, + 200, 22, 159, 162, 193, 193, 157, 159, 164, 239, + 250, 157, 198, 157, 157, 157, 157, 210, 210, 210, + 157, 179, 54, 197, 17, 164, 176, 246, 121, 122, + 239, 239, 195, 17, 204, 164, 195, 157, 157, 157, + 4, 152, 196, 239, 237, 164, 176, 193, 193, 38, + 193, 193, 22, 159, 237, 17, 239, 239, 17, 159, + 239, 193, 193, 239, 17, 73, 239, 17, 239 }; #define yyerrok (yyerrstatus = 0) @@ -3503,152 +3541,152 @@ switch (yyn) { case 29: -#line 1117 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1118 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_EQ; ;} break; case 30: -#line 1117 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1118 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_NE; ;} break; case 31: -#line 1118 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1119 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLT; ;} break; case 32: -#line 1118 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1119 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGT; ;} break; case 33: -#line 1119 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1120 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SLE; ;} break; case 34: -#line 1119 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1120 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_SGE; ;} break; case 35: -#line 1120 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1121 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULT; ;} break; case 36: -#line 1120 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1121 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGT; ;} break; case 37: -#line 1121 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1122 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_ULE; ;} break; case 38: -#line 1121 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1122 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.IPredicate) = ICmpInst::ICMP_UGE; ;} break; case 39: -#line 1125 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1126 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OEQ; ;} break; case 40: -#line 1125 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1126 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ONE; ;} break; case 41: -#line 1126 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1127 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLT; ;} break; case 42: -#line 1126 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1127 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGT; ;} break; case 43: -#line 1127 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1128 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OLE; ;} break; case 44: -#line 1127 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1128 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_OGE; ;} break; case 45: -#line 1128 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1129 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ORD; ;} break; case 46: -#line 1128 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1129 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNO; ;} break; case 47: -#line 1129 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1130 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UEQ; ;} break; case 48: -#line 1129 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1130 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UNE; ;} break; case 49: -#line 1130 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1131 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULT; ;} break; case 50: -#line 1130 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1131 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGT; ;} break; case 51: -#line 1131 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1132 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_ULE; ;} break; case 52: -#line 1131 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1132 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_UGE; ;} break; case 53: -#line 1132 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1133 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_TRUE; ;} break; case 54: -#line 1133 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1134 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FPredicate) = FCmpInst::FCMP_FALSE; ;} break; case 65: -#line 1142 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1143 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 66: -#line 1144 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1145 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=(yyvsp[(3) - (4)].UInt64Val); ;} break; case 67: -#line 1145 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1146 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal)=0; ;} break; case 68: -#line 1149 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1150 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR @@ -3656,7 +3694,7 @@ break; case 69: -#line 1153 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1154 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR @@ -3664,7 +3702,7 @@ break; case 73: -#line 1161 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1162 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; CHECK_FOR_ERROR @@ -3672,7 +3710,7 @@ break; case 74: -#line 1166 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1167 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (2)].StrVal); CHECK_FOR_ERROR @@ -3680,157 +3718,157 @@ break; case 75: -#line 1172 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1173 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 76: -#line 1173 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1174 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 77: -#line 1174 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1175 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 78: -#line 1175 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1176 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::AppendingLinkage; ;} break; case 79: -#line 1176 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1177 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 80: -#line 1177 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1178 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::CommonLinkage; ;} break; case 81: -#line 1181 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1182 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 82: -#line 1182 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1183 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 83: -#line 1183 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1184 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 84: -#line 1187 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1188 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; case 85: -#line 1188 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1189 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::DefaultVisibility; ;} break; case 86: -#line 1189 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1190 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::HiddenVisibility; ;} break; case 87: -#line 1190 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1191 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Visibility) = GlobalValue::ProtectedVisibility; ;} break; case 88: -#line 1194 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1195 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 89: -#line 1195 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1196 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLImportLinkage; ;} break; case 90: -#line 1196 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1197 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalWeakLinkage; ;} break; case 91: -#line 1200 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1201 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 92: -#line 1201 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1202 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 93: -#line 1202 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1203 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::LinkOnceLinkage; ;} break; case 94: -#line 1203 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1204 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 95: -#line 1204 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1205 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::DLLExportLinkage; ;} break; case 96: -#line 1208 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1209 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::ExternalLinkage; ;} break; case 97: -#line 1209 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1210 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::WeakLinkage; ;} break; case 98: -#line 1210 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1211 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.Linkage) = GlobalValue::InternalLinkage; ;} break; case 99: -#line 1213 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1214 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; case 100: -#line 1214 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1215 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::C; ;} break; case 101: -#line 1215 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1216 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Fast; ;} break; case 102: -#line 1216 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1217 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::Cold; ;} break; case 103: -#line 1217 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1218 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_StdCall; ;} break; case 104: -#line 1218 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1219 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = CallingConv::X86_FastCall; ;} break; case 105: -#line 1219 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1220 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((unsigned)(yyvsp[(2) - (2)].UInt64Val) != (yyvsp[(2) - (2)].UInt64Val)) GEN_ERROR("Calling conv too large"); @@ -3840,129 +3878,129 @@ break; case 106: -#line 1226 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1227 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ZExt; ;} break; case 107: -#line 1227 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1228 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ZExt; ;} break; case 108: -#line 1228 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1229 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::SExt; ;} break; case 109: -#line 1229 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1230 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::SExt; ;} break; case 110: -#line 1230 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1231 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::InReg; ;} break; case 111: -#line 1231 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1232 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::StructRet; ;} break; case 112: -#line 1232 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1233 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::NoAlias; ;} break; case 113: -#line 1233 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1234 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ByVal; ;} break; case 114: -#line 1234 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1235 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::Nest; ;} break; case 115: -#line 1235 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1236 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::constructAlignmentFromInt((yyvsp[(2) - (2)].UInt64Val)); ;} break; case 116: -#line 1239 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1240 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::None; ;} break; case 117: -#line 1240 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1241 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = (yyvsp[(1) - (2)].ParamAttrs) | (yyvsp[(2) - (2)].ParamAttrs); ;} break; case 118: -#line 1245 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1246 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::NoReturn; ;} break; case 119: -#line 1246 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1247 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::NoUnwind; ;} break; case 120: -#line 1247 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1248 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ZExt; ;} break; case 121: -#line 1248 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1249 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::SExt; ;} break; case 122: -#line 1249 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1250 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ReadNone; ;} break; case 123: -#line 1250 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1251 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::ReadOnly; ;} break; case 124: -#line 1253 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1254 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = ParamAttr::None; ;} break; case 125: -#line 1254 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1255 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamAttrs) = (yyvsp[(1) - (2)].ParamAttrs) | (yyvsp[(2) - (2)].ParamAttrs); ;} break; case 126: -#line 1259 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1260 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 127: -#line 1260 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1261 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(2) - (2)].StrVal); ;} break; case 128: -#line 1267 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1268 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; case 129: -#line 1268 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1269 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(2) - (2)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -3972,12 +4010,12 @@ break; case 130: -#line 1274 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1275 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = 0; ;} break; case 131: -#line 1275 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1276 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.UIntVal) = (yyvsp[(3) - (3)].UInt64Val); if ((yyval.UIntVal) != 0 && !isPowerOf2_32((yyval.UIntVal))) @@ -3987,7 +4025,7 @@ break; case 132: -#line 1284 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1285 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { for (unsigned i = 0, e = (yyvsp[(2) - (2)].StrVal)->length(); i != e; ++i) if ((*(yyvsp[(2) - (2)].StrVal))[i] == '"' || (*(yyvsp[(2) - (2)].StrVal))[i] == '\\') @@ -3998,27 +4036,27 @@ break; case 133: -#line 1292 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1293 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = 0; ;} break; case 134: -#line 1293 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1294 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.StrVal) = (yyvsp[(1) - (1)].StrVal); ;} break; case 135: -#line 1298 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1299 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; case 136: -#line 1299 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1300 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" {;} break; case 137: -#line 1300 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1301 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV->setSection(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -4027,7 +4065,7 @@ break; case 138: -#line 1305 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1306 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(2) - (2)].UInt64Val) != 0 && !isPowerOf2_32((yyvsp[(2) - (2)].UInt64Val))) GEN_ERROR("Alignment must be a power of two"); @@ -4037,7 +4075,7 @@ break; case 146: -#line 1321 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1322 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(OpaqueType::get()); CHECK_FOR_ERROR @@ -4045,7 +4083,7 @@ break; case 147: -#line 1325 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1326 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder((yyvsp[(1) - (1)].PrimType)); CHECK_FOR_ERROR @@ -4053,7 +4091,7 @@ break; case 148: -#line 1329 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1330 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Pointer type? if (*(yyvsp[(1) - (3)].TypeVal) == Type::LabelTy) GEN_ERROR("Cannot form a pointer to a basic block"); @@ -4064,7 +4102,7 @@ break; case 149: -#line 1336 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1337 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Named types are also simple types... const Type* tmp = getTypeVal((yyvsp[(1) - (1)].ValIDVal)); CHECK_FOR_ERROR @@ -4073,7 +4111,7 @@ break; case 150: -#line 1341 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1342 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Type UpReference if ((yyvsp[(2) - (2)].UInt64Val) > (uint64_t)~0U) GEN_ERROR("Value out of range"); OpaqueType *OT = OpaqueType::get(); // Use temporary placeholder @@ -4085,7 +4123,7 @@ break; case 151: -#line 1349 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1350 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4118,7 +4156,7 @@ break; case 152: -#line 1378 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1379 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4146,7 +4184,7 @@ break; case 153: -#line 1403 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1404 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Sized array type? (yyval.TypeVal) = new PATypeHolder(HandleUpRefs(ArrayType::get(*(yyvsp[(4) - (5)].TypeVal), (unsigned)(yyvsp[(2) - (5)].UInt64Val)))); delete (yyvsp[(4) - (5)].TypeVal); @@ -4155,7 +4193,7 @@ break; case 154: -#line 1408 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1409 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Vector type? const llvm::Type* ElemTy = (yyvsp[(4) - (5)].TypeVal)->get(); if ((unsigned)(yyvsp[(2) - (5)].UInt64Val) != (yyvsp[(2) - (5)].UInt64Val)) @@ -4169,7 +4207,7 @@ break; case 155: -#line 1418 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1419 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Structure type? std::vector Elements; for (std::list::iterator I = (yyvsp[(2) - (3)].TypeList)->begin(), @@ -4183,7 +4221,7 @@ break; case 156: -#line 1428 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1429 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector())); CHECK_FOR_ERROR @@ -4191,7 +4229,7 @@ break; case 157: -#line 1432 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1433 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { std::vector Elements; for (std::list::iterator I = (yyvsp[(3) - (5)].TypeList)->begin(), @@ -4205,7 +4243,7 @@ break; case 158: -#line 1442 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1443 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty structure type? (yyval.TypeVal) = new PATypeHolder(StructType::get(std::vector(), true)); CHECK_FOR_ERROR @@ -4213,7 +4251,7 @@ break; case 159: -#line 1449 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1450 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Allow but ignore attributes on function types; this permits auto-upgrade. // FIXME: remove in LLVM 3.0. @@ -4223,7 +4261,7 @@ break; case 160: -#line 1458 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1459 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (1)].TypeVal))->getDescription()); @@ -4234,14 +4272,14 @@ break; case 161: -#line 1465 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1466 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeVal) = new PATypeHolder(Type::VoidTy); ;} break; case 162: -#line 1470 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1471 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); (yyval.TypeWithAttrsList)->push_back((yyvsp[(1) - (1)].TypeWithAttrs)); @@ -4250,7 +4288,7 @@ break; case 163: -#line 1475 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1476 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList))->push_back((yyvsp[(3) - (3)].TypeWithAttrs)); CHECK_FOR_ERROR @@ -4258,7 +4296,7 @@ break; case 165: -#line 1483 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1484 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList)=(yyvsp[(1) - (3)].TypeWithAttrsList); TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None; @@ -4269,7 +4307,7 @@ break; case 166: -#line 1490 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1491 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList; TypeWithAttrs TWA; TWA.Attrs = ParamAttr::None; @@ -4280,7 +4318,7 @@ break; case 167: -#line 1497 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1498 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeWithAttrsList) = new TypeWithAttrsList(); CHECK_FOR_ERROR @@ -4288,7 +4326,7 @@ break; case 168: -#line 1505 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1506 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TypeList) = new std::list(); (yyval.TypeList)->push_back(*(yyvsp[(1) - (1)].TypeVal)); @@ -4298,7 +4336,7 @@ break; case 169: -#line 1511 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1512 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.TypeList)=(yyvsp[(1) - (3)].TypeList))->push_back(*(yyvsp[(3) - (3)].TypeVal)); delete (yyvsp[(3) - (3)].TypeVal); @@ -4307,7 +4345,7 @@ break; case 170: -#line 1523 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1524 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4339,7 +4377,7 @@ break; case 171: -#line 1551 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1552 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4359,7 +4397,7 @@ break; case 172: -#line 1567 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1568 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4390,7 +4428,7 @@ break; case 173: -#line 1594 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1595 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized arr if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (4)].TypeVal))->getDescription()); @@ -4422,7 +4460,7 @@ break; case 174: -#line 1622 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1623 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (4)].TypeVal)->get()); if (STy == 0) @@ -4452,7 +4490,7 @@ break; case 175: -#line 1648 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1649 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -4476,7 +4514,7 @@ break; case 176: -#line 1668 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1669 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { const StructType *STy = dyn_cast((yyvsp[(1) - (6)].TypeVal)->get()); if (STy == 0) @@ -4506,7 +4544,7 @@ break; case 177: -#line 1694 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1695 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (5)].TypeVal))->getDescription()); @@ -4530,7 +4568,7 @@ break; case 178: -#line 1714 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1715 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4546,7 +4584,7 @@ break; case 179: -#line 1726 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1727 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4557,7 +4595,7 @@ break; case 180: -#line 1733 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1734 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4627,7 +4665,7 @@ break; case 181: -#line 1799 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1800 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4641,7 +4679,7 @@ break; case 182: -#line 1809 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1810 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -4655,7 +4693,7 @@ break; case 183: -#line 1819 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1820 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].SInt64Val))) GEN_ERROR("Constant value doesn't fit in type"); @@ -4665,7 +4703,7 @@ break; case 184: -#line 1825 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1826 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth(); if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) { @@ -4679,7 +4717,7 @@ break; case 185: -#line 1835 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1836 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // integral constants if (!ConstantInt::isValueValidForType((yyvsp[(1) - (2)].PrimType), (yyvsp[(2) - (2)].UInt64Val))) GEN_ERROR("Constant value doesn't fit in type"); @@ -4689,7 +4727,7 @@ break; case 186: -#line 1841 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1842 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // arbitrary precision integer constants uint32_t BitWidth = cast((yyvsp[(1) - (2)].PrimType))->getBitWidth(); if ((yyvsp[(2) - (2)].APIntVal)->getBitWidth() > BitWidth) { @@ -4703,7 +4741,7 @@ break; case 187: -#line 1851 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1852 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants assert(cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() == 1 && "Not Bool?"); (yyval.ConstVal) = ConstantInt::getTrue(); @@ -4712,7 +4750,7 @@ break; case 188: -#line 1856 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1857 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Boolean constants assert(cast((yyvsp[(1) - (2)].PrimType))->getBitWidth() == 1 && "Not Bool?"); (yyval.ConstVal) = ConstantInt::getFalse(); @@ -4721,7 +4759,7 @@ break; case 189: -#line 1861 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1862 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Floating point constants if (!ConstantFP::isValueValidForType((yyvsp[(1) - (2)].PrimType), *(yyvsp[(2) - (2)].FPVal))) GEN_ERROR("Floating point constant invalid for type"); @@ -4736,7 +4774,7 @@ break; case 190: -#line 1874 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1875 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (6)].TypeVal))->getDescription()); @@ -4752,7 +4790,7 @@ break; case 191: -#line 1886 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1887 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(3) - (5)].ConstVal)->getType())) GEN_ERROR("GetElementPtr requires a pointer operand"); @@ -4777,7 +4815,7 @@ break; case 192: -#line 1907 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1908 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (8)].ConstVal)->getType() != Type::Int1Ty) GEN_ERROR("Select condition must be of boolean type"); @@ -4789,7 +4827,7 @@ break; case 193: -#line 1915 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1916 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Binary operator types must match"); @@ -4799,7 +4837,7 @@ break; case 194: -#line 1921 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1922 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(3) - (6)].ConstVal)->getType() != (yyvsp[(5) - (6)].ConstVal)->getType()) GEN_ERROR("Logical operator types must match"); @@ -4814,7 +4852,7 @@ break; case 195: -#line 1932 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1933 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("icmp operand types must match"); @@ -4823,7 +4861,7 @@ break; case 196: -#line 1937 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1938 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("fcmp operand types must match"); @@ -4832,7 +4870,7 @@ break; case 197: -#line 1942 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1943 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vicmp operand types must match"); @@ -4841,7 +4879,7 @@ break; case 198: -#line 1947 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1948 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(4) - (7)].ConstVal)->getType() != (yyvsp[(6) - (7)].ConstVal)->getType()) GEN_ERROR("vfcmp operand types must match"); @@ -4850,7 +4888,7 @@ break; case 199: -#line 1952 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1953 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(3) - (6)].ConstVal), (yyvsp[(5) - (6)].ConstVal))) GEN_ERROR("Invalid extractelement operands"); @@ -4860,7 +4898,7 @@ break; case 200: -#line 1958 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1959 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid insertelement operands"); @@ -4870,7 +4908,7 @@ break; case 201: -#line 1964 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1965 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(3) - (8)].ConstVal), (yyvsp[(5) - (8)].ConstVal), (yyvsp[(7) - (8)].ConstVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -4880,15 +4918,65 @@ break; case 202: -#line 1973 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1971 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { - ((yyval.ConstVector) = (yyvsp[(1) - (3)].ConstVector))->push_back((yyvsp[(3) - (3)].ConstVal)); + if (!isa((yyvsp[(3) - (5)].ConstVal)->getType()) && !isa((yyvsp[(3) - (5)].ConstVal)->getType())) + GEN_ERROR("ExtractValue requires an aggregate operand"); + + const Type *IdxTy = + ExtractValueInst::getIndexedType((yyvsp[(3) - (5)].ConstVal)->getType(), (yyvsp[(4) - (5)].ValueList)->begin(), (yyvsp[(4) - (5)].ValueList)->end()); + if (!IdxTy) + GEN_ERROR("Index list invalid for constant extractvalue"); + + SmallVector IdxVec; + for (unsigned i = 0, e = (yyvsp[(4) - (5)].ValueList)->size(); i != e; ++i) + if (Constant *C = dyn_cast((*(yyvsp[(4) - (5)].ValueList))[i])) + IdxVec.push_back(C); + else + GEN_ERROR("Indices to constant extractvalue must be constants"); + + delete (yyvsp[(4) - (5)].ValueList); + + (yyval.ConstVal) = ConstantExpr::getExtractValue((yyvsp[(3) - (5)].ConstVal), &IdxVec[0], IdxVec.size()); CHECK_FOR_ERROR ;} break; case 203: -#line 1977 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 1992 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!isa((yyvsp[(3) - (7)].ConstVal)->getType()) && !isa((yyvsp[(3) - (7)].ConstVal)->getType())) + GEN_ERROR("InsertValue requires an aggregate operand"); + + const Type *IdxTy = + ExtractValueInst::getIndexedType((yyvsp[(3) - (7)].ConstVal)->getType(), (yyvsp[(6) - (7)].ValueList)->begin(), (yyvsp[(6) - (7)].ValueList)->end()); + if (IdxTy != (yyvsp[(5) - (7)].ConstVal)->getType()) + GEN_ERROR("Index list invalid for constant insertvalue"); + + SmallVector IdxVec; + for (unsigned i = 0, e = (yyvsp[(6) - (7)].ValueList)->size(); i != e; ++i) + if (Constant *C = dyn_cast((*(yyvsp[(6) - (7)].ValueList))[i])) + IdxVec.push_back(C); + else + GEN_ERROR("Indices to constant insertvalue must be constants"); + + delete (yyvsp[(6) - (7)].ValueList); + + (yyval.ConstVal) = ConstantExpr::getInsertValue((yyvsp[(3) - (7)].ConstVal), (yyvsp[(5) - (7)].ConstVal), &IdxVec[0], IdxVec.size()); + CHECK_FOR_ERROR + ;} + break; + + case 204: +#line 2016 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + { + ((yyval.ConstVector) = (yyvsp[(1) - (3)].ConstVector))->push_back((yyvsp[(3) - (3)].ConstVal)); + CHECK_FOR_ERROR + ;} + break; + + case 205: +#line 2020 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ConstVector) = new std::vector(); (yyval.ConstVector)->push_back((yyvsp[(1) - (1)].ConstVal)); @@ -4896,28 +4984,28 @@ ;} break; - case 204: -#line 1985 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 206: +#line 2028 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; - case 205: -#line 1985 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 207: +#line 2028 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; - case 206: -#line 1988 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 208: +#line 2031 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; ;} break; - case 207: -#line 1988 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 209: +#line 2031 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; ;} break; - case 208: -#line 1991 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 210: +#line 2034 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { const Type* VTy = (yyvsp[(1) - (2)].TypeVal)->get(); Value *V = getVal(VTy, (yyvsp[(2) - (2)].ValIDVal)); @@ -4932,8 +5020,8 @@ ;} break; - case 209: -#line 2003 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 211: +#line 2046 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { Constant *Val = (yyvsp[(3) - (6)].ConstVal); const Type *DestTy = (yyvsp[(5) - (6)].TypeVal)->get(); @@ -4948,8 +5036,8 @@ ;} break; - case 210: -#line 2024 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 212: +#line 2067 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -4957,8 +5045,8 @@ ;} break; - case 211: -#line 2029 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 213: +#line 2072 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ModuleVal) = ParserResult = CurModule.CurrentModule; CurModule.ModuleDone(); @@ -4966,40 +5054,40 @@ ;} break; - case 214: -#line 2042 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 216: +#line 2085 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = false; ;} break; - case 215: -#line 2042 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 217: +#line 2085 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.FunctionDone(); CHECK_FOR_ERROR ;} break; - case 216: -#line 2046 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 218: +#line 2089 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.isDeclare = true; ;} break; - case 217: -#line 2046 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 219: +#line 2089 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 218: -#line 2049 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 220: +#line 2092 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 219: -#line 2052 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 221: +#line 2095 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (3)].TypeVal))->getDescription()); @@ -5026,8 +5114,8 @@ ;} break; - case 220: -#line 2076 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 222: +#line 2119 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { ResolveTypeTo((yyvsp[(1) - (3)].StrVal), (yyvsp[(3) - (3)].PrimType)); @@ -5041,8 +5129,8 @@ ;} break; - case 221: -#line 2088 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 223: +#line 2131 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { /* "Externally Visible" Linkage */ if ((yyvsp[(5) - (6)].ConstVal) == 0) @@ -5053,15 +5141,15 @@ ;} break; - case 222: -#line 2095 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 224: +#line 2138 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; - case 223: -#line 2099 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 225: +#line 2142 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(6) - (7)].ConstVal) == 0) GEN_ERROR("Global value initializer is not a constant"); @@ -5070,15 +5158,15 @@ ;} break; - case 224: -#line 2104 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 226: +#line 2147 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; ;} break; - case 225: -#line 2108 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 227: +#line 2151 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(6) - (7)].TypeVal))->getDescription()); @@ -5088,16 +5176,16 @@ ;} break; - case 226: -#line 2114 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 228: +#line 2157 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurGV = 0; CHECK_FOR_ERROR ;} break; - case 227: -#line 2118 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 229: +#line 2161 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { std::string Name; if ((yyvsp[(1) - (5)].StrVal)) { @@ -5140,22 +5228,22 @@ ;} break; - case 228: -#line 2158 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 230: +#line 2201 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 229: -#line 2161 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 231: +#line 2204 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 230: -#line 2167 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 232: +#line 2210 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { const std::string &AsmSoFar = CurModule.CurrentModule->getModuleInlineAsm(); if (AsmSoFar.empty()) @@ -5167,24 +5255,24 @@ ;} break; - case 231: -#line 2177 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 233: +#line 2220 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setTargetTriple(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); ;} break; - case 232: -#line 2181 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 234: +#line 2224 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->setDataLayout(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); ;} break; - case 234: -#line 2188 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 236: +#line 2231 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(3) - (3)].StrVal)); delete (yyvsp[(3) - (3)].StrVal); @@ -5192,8 +5280,8 @@ ;} break; - case 235: -#line 2193 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 237: +#line 2236 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurModule.CurrentModule->addLibrary(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5201,15 +5289,15 @@ ;} break; - case 236: -#line 2198 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 238: +#line 2241 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CHECK_FOR_ERROR ;} break; - case 237: -#line 2207 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 239: +#line 2250 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -5222,8 +5310,8 @@ ;} break; - case 238: -#line 2217 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 240: +#line 2260 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (3)].TypeVal))->getDescription()); @@ -5236,16 +5324,16 @@ ;} break; - case 239: -#line 2228 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 241: +#line 2271 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (1)].ArgList); CHECK_FOR_ERROR ;} break; - case 240: -#line 2232 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 242: +#line 2275 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = (yyvsp[(1) - (3)].ArgList); struct ArgListEntry E; @@ -5257,8 +5345,8 @@ ;} break; - case 241: -#line 2241 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 243: +#line 2284 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = new ArgListType; struct ArgListEntry E; @@ -5270,16 +5358,16 @@ ;} break; - case 242: -#line 2250 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 244: +#line 2293 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ArgList) = 0; CHECK_FOR_ERROR ;} break; - case 243: -#line 2256 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 245: +#line 2299 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { std::string FunctionName(*(yyvsp[(3) - (10)].StrVal)); delete (yyvsp[(3) - (10)].StrVal); // Free strdup'd memory! @@ -5409,8 +5497,8 @@ ;} break; - case 246: -#line 2386 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 248: +#line 2429 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = CurFun.CurrentFunction; @@ -5421,16 +5509,16 @@ ;} break; - case 249: -#line 2397 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 251: +#line 2440 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR ;} break; - case 250: -#line 2402 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 252: +#line 2445 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { CurFun.CurrentFunction->setLinkage((yyvsp[(1) - (3)].Linkage)); CurFun.CurrentFunction->setVisibility((yyvsp[(2) - (3)].Visibility)); @@ -5440,88 +5528,88 @@ ;} break; - case 251: -#line 2414 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 253: +#line 2457 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 252: -#line 2418 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 254: +#line 2461 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 253: -#line 2423 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 255: +#line 2466 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // A reference to a direct constant (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].SInt64Val)); CHECK_FOR_ERROR ;} break; - case 254: -#line 2427 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 256: +#line 2470 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].UInt64Val)); CHECK_FOR_ERROR ;} break; - case 255: -#line 2431 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 257: +#line 2474 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Perhaps it's an FP constant? (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].FPVal)); CHECK_FOR_ERROR ;} break; - case 256: -#line 2435 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 258: +#line 2478 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getTrue()); CHECK_FOR_ERROR ;} break; - case 257: -#line 2439 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 259: +#line 2482 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create(ConstantInt::getFalse()); CHECK_FOR_ERROR ;} break; - case 258: -#line 2443 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 260: +#line 2486 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createNull(); CHECK_FOR_ERROR ;} break; - case 259: -#line 2447 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 261: +#line 2490 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createUndef(); CHECK_FOR_ERROR ;} break; - case 260: -#line 2451 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 262: +#line 2494 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // A vector zero constant. (yyval.ValIDVal) = ValID::createZeroInit(); CHECK_FOR_ERROR ;} break; - case 261: -#line 2455 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 263: +#line 2498 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Nonempty unsized packed vector const Type *ETy = (*(yyvsp[(2) - (3)].ConstVector))[0]->getType(); int NumElements = (yyvsp[(2) - (3)].ConstVector)->size(); @@ -5549,16 +5637,16 @@ ;} break; - case 262: -#line 2480 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 264: +#line 2523 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::create((yyvsp[(1) - (1)].ConstVal)); CHECK_FOR_ERROR ;} break; - case 263: -#line 2484 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 265: +#line 2527 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createInlineAsm(*(yyvsp[(3) - (5)].StrVal), *(yyvsp[(5) - (5)].StrVal), (yyvsp[(2) - (5)].BoolVal)); delete (yyvsp[(3) - (5)].StrVal); @@ -5567,24 +5655,24 @@ ;} break; - case 264: -#line 2494 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 266: +#line 2537 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it an integer reference...? (yyval.ValIDVal) = ValID::createLocalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR ;} break; - case 265: -#line 2498 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 267: +#line 2541 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValIDVal) = ValID::createGlobalID((yyvsp[(1) - (1)].UIntVal)); CHECK_FOR_ERROR ;} break; - case 266: -#line 2502 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 268: +#line 2545 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5592,8 +5680,8 @@ ;} break; - case 267: -#line 2507 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 269: +#line 2550 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Is it a named reference...? (yyval.ValIDVal) = ValID::createGlobalName(*(yyvsp[(1) - (1)].StrVal)); delete (yyvsp[(1) - (1)].StrVal); @@ -5601,8 +5689,8 @@ ;} break; - case 270: -#line 2520 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 272: +#line 2563 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (2)].TypeVal))->getDescription()); @@ -5612,8 +5700,8 @@ ;} break; - case 271: -#line 2529 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 273: +#line 2572 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); (yyval.ValueList)->push_back((yyvsp[(1) - (1)].ValueVal)); @@ -5621,32 +5709,32 @@ ;} break; - case 272: -#line 2534 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 274: +#line 2577 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { ((yyval.ValueList)=(yyvsp[(1) - (3)].ValueList))->push_back((yyvsp[(3) - (3)].ValueVal)); CHECK_FOR_ERROR ;} break; - case 273: -#line 2539 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 275: +#line 2582 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR ;} break; - case 274: -#line 2543 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 276: +#line 2586 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Do not allow functions with 0 basic blocks (yyval.FunctionVal) = (yyvsp[(1) - (2)].FunctionVal); CHECK_FOR_ERROR ;} break; - case 275: -#line 2552 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 277: +#line 2595 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { setValueName((yyvsp[(3) - (3)].TermInstVal), (yyvsp[(2) - (3)].StrVal)); CHECK_FOR_ERROR @@ -5657,8 +5745,8 @@ ;} break; - case 276: -#line 2561 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 278: +#line 2604 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (CastInst *CI1 = dyn_cast((yyvsp[(2) - (2)].InstVal))) if (CastInst *CI2 = dyn_cast(CI1->getOperand(0))) @@ -5670,16 +5758,16 @@ ;} break; - case 277: -#line 2570 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 279: +#line 2613 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Empty space between instruction lists (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalID(CurFun.NextValNum)); CHECK_FOR_ERROR ;} break; - case 278: -#line 2574 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 280: +#line 2617 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Labelled (named) basic block (yyval.BasicBlockVal) = defineBBVal(ValID::createLocalName(*(yyvsp[(1) - (1)].StrVal))); delete (yyvsp[(1) - (1)].StrVal); @@ -5688,8 +5776,8 @@ ;} break; - case 279: -#line 2582 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 281: +#line 2625 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with a result... ValueList &VL = *(yyvsp[(2) - (2)].ValueList); assert(!VL.empty() && "Invalid ret operands!"); @@ -5699,16 +5787,16 @@ ;} break; - case 280: -#line 2589 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 282: +#line 2632 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Return with no result... (yyval.TermInstVal) = ReturnInst::Create(); CHECK_FOR_ERROR ;} break; - case 281: -#line 2593 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 283: +#line 2636 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Unconditional Branch... BasicBlock* tmpBB = getBBVal((yyvsp[(3) - (3)].ValIDVal)); CHECK_FOR_ERROR @@ -5716,8 +5804,8 @@ ;} break; - case 282: -#line 2598 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 284: +#line 2641 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { assert(cast((yyvsp[(2) - (9)].PrimType))->getBitWidth() == 1 && "Not Bool?"); BasicBlock* tmpBBA = getBBVal((yyvsp[(6) - (9)].ValIDVal)); @@ -5730,8 +5818,8 @@ ;} break; - case 283: -#line 2608 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 285: +#line 2651 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (9)].PrimType), (yyvsp[(3) - (9)].ValIDVal)); CHECK_FOR_ERROR @@ -5753,8 +5841,8 @@ ;} break; - case 284: -#line 2627 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 286: +#line 2670 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { Value* tmpVal = getVal((yyvsp[(2) - (8)].PrimType), (yyvsp[(3) - (8)].ValIDVal)); CHECK_FOR_ERROR @@ -5766,8 +5854,8 @@ ;} break; - case 285: -#line 2637 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 287: +#line 2680 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -5855,24 +5943,24 @@ ;} break; - case 286: -#line 2722 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 288: +#line 2765 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnwindInst(); CHECK_FOR_ERROR ;} break; - case 287: -#line 2726 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 289: +#line 2769 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.TermInstVal) = new UnreachableInst(); CHECK_FOR_ERROR ;} break; - case 288: -#line 2733 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 290: +#line 2776 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = (yyvsp[(1) - (6)].JumpTable); Constant *V = cast(getExistingVal((yyvsp[(2) - (6)].PrimType), (yyvsp[(3) - (6)].ValIDVal))); @@ -5886,8 +5974,8 @@ ;} break; - case 289: -#line 2744 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 291: +#line 2787 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.JumpTable) = new std::vector >(); Constant *V = cast(getExistingVal((yyvsp[(1) - (5)].PrimType), (yyvsp[(2) - (5)].ValIDVal))); @@ -5902,8 +5990,8 @@ ;} break; - case 290: -#line 2757 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 292: +#line 2800 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Is this definition named?? if so, assign the name... setValueName((yyvsp[(2) - (2)].InstVal), (yyvsp[(1) - (2)].StrVal)); @@ -5914,8 +6002,8 @@ ;} break; - case 291: -#line 2767 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 293: +#line 2810 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Used for PHI nodes if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(1) - (6)].TypeVal))->getDescription()); @@ -5929,8 +6017,8 @@ ;} break; - case 292: -#line 2778 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 294: +#line 2821 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.PHIList) = (yyvsp[(1) - (7)].PHIList); Value* tmpVal = getVal((yyvsp[(1) - (7)].PHIList)->front().first->getType(), (yyvsp[(4) - (7)].ValIDVal)); @@ -5941,8 +6029,8 @@ ;} break; - case 293: -#line 2788 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 295: +#line 2831 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -5956,8 +6044,8 @@ ;} break; - case 294: -#line 2799 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 296: +#line 2842 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0 // Labels are only valid in ASMs @@ -5968,8 +6056,8 @@ ;} break; - case 295: -#line 2807 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 297: +#line 2850 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0 if (!UpRefs.empty()) @@ -5982,8 +6070,8 @@ ;} break; - case 296: -#line 2817 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 298: +#line 2860 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // FIXME: Remove trailing OptParamAttrs in LLVM 3.0, it was a mistake in 2.0 (yyval.ParamList) = (yyvsp[(1) - (6)].ParamList); @@ -5993,18 +6081,18 @@ ;} break; - case 297: -#line 2824 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 299: +#line 2867 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ParamList) = new ParamList(); ;} break; - case 298: -#line 2827 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 300: +#line 2870 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = new std::vector(); ;} break; - case 299: -#line 2828 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 301: +#line 2871 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.ValueList) = (yyvsp[(1) - (3)].ValueList); (yyval.ValueList)->push_back((yyvsp[(3) - (3)].ValueVal)); @@ -6012,24 +6100,24 @@ ;} break; - case 300: -#line 2835 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 302: +#line 2878 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 301: -#line 2839 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 303: +#line 2882 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 302: -#line 2844 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 304: +#line 2887 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6041,15 +6129,15 @@ CHECK_FOR_ERROR Value* val2 = getVal(*(yyvsp[(2) - (5)].TypeVal), (yyvsp[(5) - (5)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::create((yyvsp[(1) - (5)].BinaryOpVal), val1, val2); + (yyval.InstVal) = BinaryOperator::Create((yyvsp[(1) - (5)].BinaryOpVal), val1, val2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null"); delete (yyvsp[(2) - (5)].TypeVal); ;} break; - case 303: -#line 2860 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 305: +#line 2903 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (5)].TypeVal))->getDescription()); @@ -6062,15 +6150,15 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[(2) - (5)].TypeVal), (yyvsp[(5) - (5)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = BinaryOperator::create((yyvsp[(1) - (5)].BinaryOpVal), tmpVal1, tmpVal2); + (yyval.InstVal) = BinaryOperator::Create((yyvsp[(1) - (5)].BinaryOpVal), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("binary operator returned null"); delete (yyvsp[(2) - (5)].TypeVal); ;} break; - case 304: -#line 2877 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 306: +#line 2920 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6080,15 +6168,15 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(6) - (6)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].IPredicate), tmpVal1, tmpVal2); + (yyval.InstVal) = CmpInst::Create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].IPredicate), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("icmp operator returned null"); delete (yyvsp[(3) - (6)].TypeVal); ;} break; - case 305: -#line 2891 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 307: +#line 2934 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6098,15 +6186,15 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(6) - (6)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].FPredicate), tmpVal1, tmpVal2); + (yyval.InstVal) = CmpInst::Create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].FPredicate), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("fcmp operator returned null"); delete (yyvsp[(3) - (6)].TypeVal); ;} break; - case 306: -#line 2905 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 308: +#line 2948 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6116,15 +6204,15 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(6) - (6)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].IPredicate), tmpVal1, tmpVal2); + (yyval.InstVal) = CmpInst::Create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].IPredicate), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("icmp operator returned null"); delete (yyvsp[(3) - (6)].TypeVal); ;} break; - case 307: -#line 2919 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 309: +#line 2962 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (6)].TypeVal))->getDescription()); @@ -6134,15 +6222,15 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*(yyvsp[(3) - (6)].TypeVal), (yyvsp[(6) - (6)].ValIDVal)); CHECK_FOR_ERROR - (yyval.InstVal) = CmpInst::create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].FPredicate), tmpVal1, tmpVal2); + (yyval.InstVal) = CmpInst::Create((yyvsp[(1) - (6)].OtherOpVal), (yyvsp[(2) - (6)].FPredicate), tmpVal1, tmpVal2); if ((yyval.InstVal) == 0) GEN_ERROR("fcmp operator returned null"); delete (yyvsp[(3) - (6)].TypeVal); ;} break; - case 308: -#line 2933 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 310: +#line 2976 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6152,13 +6240,13 @@ GEN_ERROR("invalid cast opcode for cast from '" + Val->getType()->getDescription() + "' to '" + DestTy->getDescription() + "'"); - (yyval.InstVal) = CastInst::create((yyvsp[(1) - (4)].CastOpVal), Val, DestTy); + (yyval.InstVal) = CastInst::Create((yyvsp[(1) - (4)].CastOpVal), Val, DestTy); delete (yyvsp[(4) - (4)].TypeVal); ;} break; - case 309: -#line 2945 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 311: +#line 2988 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if ((yyvsp[(2) - (6)].ValueVal)->getType() != Type::Int1Ty) GEN_ERROR("select condition must be boolean"); @@ -6169,8 +6257,8 @@ ;} break; - case 310: -#line 2953 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 312: +#line 2996 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(4) - (4)].TypeVal))->getDescription()); @@ -6180,8 +6268,8 @@ ;} break; - case 311: -#line 2960 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 313: +#line 3003 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ExtractElementInst::isValidOperands((yyvsp[(2) - (4)].ValueVal), (yyvsp[(4) - (4)].ValueVal))) GEN_ERROR("Invalid extractelement operands"); @@ -6190,8 +6278,8 @@ ;} break; - case 312: -#line 2966 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 314: +#line 3009 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!InsertElementInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid insertelement operands"); @@ -6200,8 +6288,8 @@ ;} break; - case 313: -#line 2972 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 315: +#line 3015 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!ShuffleVectorInst::isValidOperands((yyvsp[(2) - (6)].ValueVal), (yyvsp[(4) - (6)].ValueVal), (yyvsp[(6) - (6)].ValueVal))) GEN_ERROR("Invalid shufflevector operands"); @@ -6210,8 +6298,8 @@ ;} break; - case 314: -#line 2978 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 316: +#line 3021 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { const Type *Ty = (yyvsp[(2) - (2)].PHIList)->front().first->getType(); if (!Ty->isFirstClassType()) @@ -6229,8 +6317,8 @@ ;} break; - case 315: -#line 2994 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 317: +#line 3037 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { // Handle the short syntax @@ -6322,32 +6410,32 @@ ;} break; - case 316: -#line 3083 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 318: +#line 3126 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.InstVal) = (yyvsp[(1) - (1)].InstVal); CHECK_FOR_ERROR ;} break; - case 317: -#line 3088 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 319: +#line 3131 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = true; CHECK_FOR_ERROR ;} break; - case 318: -#line 3092 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 320: +#line 3135 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { (yyval.BoolVal) = false; CHECK_FOR_ERROR ;} break; - case 319: -#line 3099 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 321: +#line 3142 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6357,8 +6445,8 @@ ;} break; - case 320: -#line 3106 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 322: +#line 3149 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6369,8 +6457,8 @@ ;} break; - case 321: -#line 3114 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 323: +#line 3157 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (3)].TypeVal))->getDescription()); @@ -6380,8 +6468,8 @@ ;} break; - case 322: -#line 3121 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 324: +#line 3164 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (6)].TypeVal))->getDescription()); @@ -6392,8 +6480,8 @@ ;} break; - case 323: -#line 3129 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 325: +#line 3172 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!isa((yyvsp[(2) - (2)].ValueVal)->getType())) GEN_ERROR("Trying to free nonpointer type " + @@ -6403,8 +6491,8 @@ ;} break; - case 324: -#line 3137 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 326: +#line 3180 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(3) - (5)].TypeVal))->getDescription()); @@ -6421,8 +6509,8 @@ ;} break; - case 325: -#line 3151 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 327: +#line 3194 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(5) - (7)].TypeVal))->getDescription()); @@ -6442,8 +6530,8 @@ ;} break; - case 326: -#line 3168 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 328: +#line 3211 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { Value *TmpVal = getVal((yyvsp[(2) - (5)].TypeVal)->get(), (yyvsp[(3) - (5)].ValIDVal)); if (!GetResultInst::isValidOperands(TmpVal, (yyvsp[(5) - (5)].UInt64Val))) @@ -6454,8 +6542,8 @@ ;} break; - case 327: -#line 3176 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + case 329: +#line 3219 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()); @@ -6473,9 +6561,49 @@ ;} break; + case 330: +#line 3234 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!UpRefs.empty()) + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()); + if (!isa((yyvsp[(2) - (4)].TypeVal)->get()) && !isa((yyvsp[(2) - (4)].TypeVal)->get())) + GEN_ERROR("extractvalue insn requires an aggregate operand"); + + if (!ExtractValueInst::getIndexedType(*(yyvsp[(2) - (4)].TypeVal), (yyvsp[(4) - (4)].ValueList)->begin(), (yyvsp[(4) - (4)].ValueList)->end())) + GEN_ERROR("Invalid extractvalue indices for type '" + + (*(yyvsp[(2) - (4)].TypeVal))->getDescription()+ "'"); + Value* tmpVal = getVal(*(yyvsp[(2) - (4)].TypeVal), (yyvsp[(3) - (4)].ValIDVal)); + CHECK_FOR_ERROR + (yyval.InstVal) = ExtractValueInst::Create(tmpVal, (yyvsp[(4) - (4)].ValueList)->begin(), (yyvsp[(4) - (4)].ValueList)->end()); + delete (yyvsp[(2) - (4)].TypeVal); + delete (yyvsp[(4) - (4)].ValueList); + ;} + break; + + case 331: +#line 3249 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" + { + if (!UpRefs.empty()) + GEN_ERROR("Invalid upreference in type: " + (*(yyvsp[(2) - (7)].TypeVal))->getDescription()); + if (!isa((yyvsp[(2) - (7)].TypeVal)->get()) && !isa((yyvsp[(2) - (7)].TypeVal)->get())) + GEN_ERROR("extractvalue insn requires an aggregate operand"); + + if (ExtractValueInst::getIndexedType(*(yyvsp[(2) - (7)].TypeVal), (yyvsp[(7) - (7)].ValueList)->begin(), (yyvsp[(7) - (7)].ValueList)->end()) != (yyvsp[(5) - (7)].TypeVal)->get()) + GEN_ERROR("Invalid insertvalue indices for type '" + + (*(yyvsp[(2) - (7)].TypeVal))->getDescription()+ "'"); + Value* aggVal = getVal(*(yyvsp[(2) - (7)].TypeVal), (yyvsp[(3) - (7)].ValIDVal)); + Value* tmpVal = getVal(*(yyvsp[(5) - (7)].TypeVal), (yyvsp[(6) - (7)].ValIDVal)); + CHECK_FOR_ERROR + (yyval.InstVal) = InsertValueInst::Create(aggVal, tmpVal, (yyvsp[(7) - (7)].ValueList)->begin(), (yyvsp[(7) - (7)].ValueList)->end()); + delete (yyvsp[(2) - (7)].TypeVal); + delete (yyvsp[(5) - (7)].TypeVal); + delete (yyvsp[(7) - (7)].ValueList); + ;} + break; + /* Line 1267 of yacc.c. */ -#line 6479 "llvmAsmParser.tab.c" +#line 6607 "llvmAsmParser.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -6689,7 +6817,7 @@ } -#line 3193 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 3268 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" // common code from the two 'RunVMAsmParser' functions Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs?rev=51468&r1=51467&r2=51468&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.h.cvs Thu May 22 20:55:30 2008 @@ -175,21 +175,23 @@ INSERTELEMENT = 391, SHUFFLEVECTOR = 392, GETRESULT = 393, - SIGNEXT = 394, - ZEROEXT = 395, - NORETURN = 396, - INREG = 397, - SRET = 398, - NOUNWIND = 399, - NOALIAS = 400, - BYVAL = 401, - NEST = 402, - READNONE = 403, - READONLY = 404, - GC = 405, - DEFAULT = 406, - HIDDEN = 407, - PROTECTED = 408 + EXTRACTVALUE = 394, + INSERTVALUE = 395, + SIGNEXT = 396, + ZEROEXT = 397, + NORETURN = 398, + INREG = 399, + SRET = 400, + NOUNWIND = 401, + NOALIAS = 402, + BYVAL = 403, + NEST = 404, + READNONE = 405, + READONLY = 406, + GC = 407, + DEFAULT = 408, + HIDDEN = 409, + PROTECTED = 410 }; #endif /* Tokens. */ @@ -329,28 +331,30 @@ #define INSERTELEMENT 391 #define SHUFFLEVECTOR 392 #define GETRESULT 393 -#define SIGNEXT 394 -#define ZEROEXT 395 -#define NORETURN 396 -#define INREG 397 -#define SRET 398 -#define NOUNWIND 399 -#define NOALIAS 400 -#define BYVAL 401 -#define NEST 402 -#define READNONE 403 -#define READONLY 404 -#define GC 405 -#define DEFAULT 406 -#define HIDDEN 407 -#define PROTECTED 408 +#define EXTRACTVALUE 394 +#define INSERTVALUE 395 +#define SIGNEXT 396 +#define ZEROEXT 397 +#define NORETURN 398 +#define INREG 399 +#define SRET 400 +#define NOUNWIND 401 +#define NOALIAS 402 +#define BYVAL 403 +#define NEST 404 +#define READNONE 405 +#define READONLY 406 +#define GC 407 +#define DEFAULT 408 +#define HIDDEN 409 +#define PROTECTED 410 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 949 "/Volumes/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" +#line 949 "/Users/gohman/LLVM/llvm/lib/AsmParser/llvmAsmParser.y" { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -398,7 +402,7 @@ llvm::FCmpInst::Predicate FPredicate; } /* Line 1529 of yacc.c. */ -#line 402 "llvmAsmParser.tab.h" +#line 406 "llvmAsmParser.tab.h" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=51468&r1=51467&r2=51468&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Thu May 22 20:55:30 2008 @@ -475,7 +475,7 @@ if (TriggerError) return 0; if (!Ty->isFirstClassType() && !isa(Ty)) { - GenerateError("Invalid use of a composite type"); + GenerateError("Invalid use of a non-first-class type"); return 0; } @@ -1093,6 +1093,7 @@ %token PHI_TOK SELECT VAARG %token EXTRACTELEMENT INSERTELEMENT SHUFFLEVECTOR %token GETRESULT +%token EXTRACTVALUE INSERTVALUE // Function Attributes %token SIGNEXT ZEROEXT NORETURN INREG SRET NOUNWIND NOALIAS BYVAL NEST @@ -1966,6 +1967,48 @@ GEN_ERROR("Invalid shufflevector operands"); $$ = ConstantExpr::getShuffleVector($3, $5, $7); CHECK_FOR_ERROR + } + | EXTRACTVALUE '(' ConstVal IndexList ')' { + if (!isa($3->getType()) && !isa($3->getType())) + GEN_ERROR("ExtractValue requires an aggregate operand"); + + const Type *IdxTy = + ExtractValueInst::getIndexedType($3->getType(), $4->begin(), $4->end()); + if (!IdxTy) + GEN_ERROR("Index list invalid for constant extractvalue"); + + SmallVector IdxVec; + for (unsigned i = 0, e = $4->size(); i != e; ++i) + if (Constant *C = dyn_cast((*$4)[i])) + IdxVec.push_back(C); + else + GEN_ERROR("Indices to constant extractvalue must be constants"); + + delete $4; + + $$ = ConstantExpr::getExtractValue($3, &IdxVec[0], IdxVec.size()); + CHECK_FOR_ERROR + } + | INSERTVALUE '(' ConstVal ',' ConstVal IndexList ')' { + if (!isa($3->getType()) && !isa($3->getType())) + GEN_ERROR("InsertValue requires an aggregate operand"); + + const Type *IdxTy = + ExtractValueInst::getIndexedType($3->getType(), $6->begin(), $6->end()); + if (IdxTy != $5->getType()) + GEN_ERROR("Index list invalid for constant insertvalue"); + + SmallVector IdxVec; + for (unsigned i = 0, e = $6->size(); i != e; ++i) + if (Constant *C = dyn_cast((*$6)[i])) + IdxVec.push_back(C); + else + GEN_ERROR("Indices to constant insertvalue must be constants"); + + delete $6; + + $$ = ConstantExpr::getInsertValue($3, $5, &IdxVec[0], IdxVec.size()); + CHECK_FOR_ERROR }; @@ -3165,7 +3208,7 @@ $$ = new StoreInst($3, tmpVal, $1, $7); delete $5; } -| GETRESULT Types ValueRef ',' EUINT64VAL { + | GETRESULT Types ValueRef ',' EUINT64VAL { Value *TmpVal = getVal($2->get(), $3); if (!GetResultInst::isValidOperands(TmpVal, $5)) GEN_ERROR("Invalid getresult operands"); @@ -3187,6 +3230,38 @@ $$ = GetElementPtrInst::Create(tmpVal, $4->begin(), $4->end()); delete $2; delete $4; + } + | EXTRACTVALUE Types ValueRef IndexList { + if (!UpRefs.empty()) + GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription()); + if (!isa($2->get()) && !isa($2->get())) + GEN_ERROR("extractvalue insn requires an aggregate operand"); + + if (!ExtractValueInst::getIndexedType(*$2, $4->begin(), $4->end())) + GEN_ERROR("Invalid extractvalue indices for type '" + + (*$2)->getDescription()+ "'"); + Value* tmpVal = getVal(*$2, $3); + CHECK_FOR_ERROR + $$ = ExtractValueInst::Create(tmpVal, $4->begin(), $4->end()); + delete $2; + delete $4; + } + | INSERTVALUE Types ValueRef ',' Types ValueRef IndexList { + if (!UpRefs.empty()) + GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription()); + if (!isa($2->get()) && !isa($2->get())) + GEN_ERROR("extractvalue insn requires an aggregate operand"); + + if (ExtractValueInst::getIndexedType(*$2, $7->begin(), $7->end()) != $5->get()) + GEN_ERROR("Invalid insertvalue indices for type '" + + (*$2)->getDescription()+ "'"); + Value* aggVal = getVal(*$2, $3); + Value* tmpVal = getVal(*$5, $6); + CHECK_FOR_ERROR + $$ = InsertValueInst::Create(aggVal, tmpVal, $7->begin(), $7->end()); + delete $2; + delete $5; + delete $7; }; Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs?rev=51468&r1=51467&r2=51468&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y.cvs Thu May 22 20:55:30 2008 @@ -475,7 +475,7 @@ if (TriggerError) return 0; if (!Ty->isFirstClassType() && !isa(Ty)) { - GenerateError("Invalid use of a composite type"); + GenerateError("Invalid use of a non-first-class type"); return 0; } @@ -1093,6 +1093,7 @@ %token PHI_TOK SELECT VAARG %token EXTRACTELEMENT INSERTELEMENT SHUFFLEVECTOR %token GETRESULT +%token EXTRACTVALUE INSERTVALUE // Function Attributes %token SIGNEXT ZEROEXT NORETURN INREG SRET NOUNWIND NOALIAS BYVAL NEST @@ -1966,6 +1967,48 @@ GEN_ERROR("Invalid shufflevector operands"); $$ = ConstantExpr::getShuffleVector($3, $5, $7); CHECK_FOR_ERROR + } + | EXTRACTVALUE '(' ConstVal IndexList ')' { + if (!isa($3->getType()) && !isa($3->getType())) + GEN_ERROR("ExtractValue requires an aggregate operand"); + + const Type *IdxTy = + ExtractValueInst::getIndexedType($3->getType(), $4->begin(), $4->end()); + if (!IdxTy) + GEN_ERROR("Index list invalid for constant extractvalue"); + + SmallVector IdxVec; + for (unsigned i = 0, e = $4->size(); i != e; ++i) + if (Constant *C = dyn_cast((*$4)[i])) + IdxVec.push_back(C); + else + GEN_ERROR("Indices to constant extractvalue must be constants"); + + delete $4; + + $$ = ConstantExpr::getExtractValue($3, &IdxVec[0], IdxVec.size()); + CHECK_FOR_ERROR + } + | INSERTVALUE '(' ConstVal ',' ConstVal IndexList ')' { + if (!isa($3->getType()) && !isa($3->getType())) + GEN_ERROR("InsertValue requires an aggregate operand"); + + const Type *IdxTy = + ExtractValueInst::getIndexedType($3->getType(), $6->begin(), $6->end()); + if (IdxTy != $5->getType()) + GEN_ERROR("Index list invalid for constant insertvalue"); + + SmallVector IdxVec; + for (unsigned i = 0, e = $6->size(); i != e; ++i) + if (Constant *C = dyn_cast((*$6)[i])) + IdxVec.push_back(C); + else + GEN_ERROR("Indices to constant insertvalue must be constants"); + + delete $6; + + $$ = ConstantExpr::getInsertValue($3, $5, &IdxVec[0], IdxVec.size()); + CHECK_FOR_ERROR }; @@ -2852,7 +2895,7 @@ CHECK_FOR_ERROR Value* val2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1, val1, val2); + $$ = BinaryOperator::Create($1, val1, val2); if ($$ == 0) GEN_ERROR("binary operator returned null"); delete $2; @@ -2869,7 +2912,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$2, $5); CHECK_FOR_ERROR - $$ = BinaryOperator::create($1, tmpVal1, tmpVal2); + $$ = BinaryOperator::Create($1, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("binary operator returned null"); delete $2; @@ -2883,7 +2926,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$3, $6); CHECK_FOR_ERROR - $$ = CmpInst::create($1, $2, tmpVal1, tmpVal2); + $$ = CmpInst::Create($1, $2, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("icmp operator returned null"); delete $3; @@ -2897,7 +2940,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$3, $6); CHECK_FOR_ERROR - $$ = CmpInst::create($1, $2, tmpVal1, tmpVal2); + $$ = CmpInst::Create($1, $2, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("fcmp operator returned null"); delete $3; @@ -2911,7 +2954,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$3, $6); CHECK_FOR_ERROR - $$ = CmpInst::create($1, $2, tmpVal1, tmpVal2); + $$ = CmpInst::Create($1, $2, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("icmp operator returned null"); delete $3; @@ -2925,7 +2968,7 @@ CHECK_FOR_ERROR Value* tmpVal2 = getVal(*$3, $6); CHECK_FOR_ERROR - $$ = CmpInst::create($1, $2, tmpVal1, tmpVal2); + $$ = CmpInst::Create($1, $2, tmpVal1, tmpVal2); if ($$ == 0) GEN_ERROR("fcmp operator returned null"); delete $3; @@ -2939,7 +2982,7 @@ GEN_ERROR("invalid cast opcode for cast from '" + Val->getType()->getDescription() + "' to '" + DestTy->getDescription() + "'"); - $$ = CastInst::create($1, Val, DestTy); + $$ = CastInst::Create($1, Val, DestTy); delete $4; } | SELECT ResolvedVal ',' ResolvedVal ',' ResolvedVal { @@ -3165,7 +3208,7 @@ $$ = new StoreInst($3, tmpVal, $1, $7); delete $5; } -| GETRESULT Types ValueRef ',' EUINT64VAL { + | GETRESULT Types ValueRef ',' EUINT64VAL { Value *TmpVal = getVal($2->get(), $3); if (!GetResultInst::isValidOperands(TmpVal, $5)) GEN_ERROR("Invalid getresult operands"); @@ -3187,6 +3230,38 @@ $$ = GetElementPtrInst::Create(tmpVal, $4->begin(), $4->end()); delete $2; delete $4; + } + | EXTRACTVALUE Types ValueRef IndexList { + if (!UpRefs.empty()) + GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription()); + if (!isa($2->get()) && !isa($2->get())) + GEN_ERROR("extractvalue insn requires an aggregate operand"); + + if (!ExtractValueInst::getIndexedType(*$2, $4->begin(), $4->end())) + GEN_ERROR("Invalid extractvalue indices for type '" + + (*$2)->getDescription()+ "'"); + Value* tmpVal = getVal(*$2, $3); + CHECK_FOR_ERROR + $$ = ExtractValueInst::Create(tmpVal, $4->begin(), $4->end()); + delete $2; + delete $4; + } + | INSERTVALUE Types ValueRef ',' Types ValueRef IndexList { + if (!UpRefs.empty()) + GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription()); + if (!isa($2->get()) && !isa($2->get())) + GEN_ERROR("extractvalue insn requires an aggregate operand"); + + if (ExtractValueInst::getIndexedType(*$2, $7->begin(), $7->end()) != $5->get()) + GEN_ERROR("Invalid insertvalue indices for type '" + + (*$2)->getDescription()+ "'"); + Value* aggVal = getVal(*$2, $3); + Value* tmpVal = getVal(*$5, $6); + CHECK_FOR_ERROR + $$ = InsertValueInst::Create(aggVal, tmpVal, $7->begin(), $7->end()); + delete $2; + delete $5; + delete $7; }; Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=51468&r1=51467&r2=51468&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original) +++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Thu May 22 20:55:30 2008 @@ -770,6 +770,29 @@ V = ConstantExpr::getGetElementPtr(Elts[0], &Elts[1], Elts.size()-1); break; } + case bitc::CST_CODE_CE_EXTRACTVAL: { // CE_EXTRACTVAL: [n x operands] + if (Record.size() & 1) return Error("Invalid CE_EXTRACTVAL record"); + SmallVector Elts; + for (unsigned i = 0, e = Record.size(); i != e; i += 2) { + const Type *ElTy = getTypeByID(Record[i]); + if (!ElTy) return Error("Invalid CE_EXTRACTVAL record"); + Elts.push_back(ValueList.getConstantFwdRef(Record[i+1], ElTy)); + } + V = ConstantExpr::getExtractValue(Elts[0], &Elts[1], Elts.size()-1); + break; + } + case bitc::CST_CODE_CE_INSERTVAL: { // CE_INSERTVAL: [n x operands] + if (Record.size() & 1) return Error("Invalid CE_INSERTVAL record"); + SmallVector Elts; + for (unsigned i = 0, e = Record.size(); i != e; i += 2) { + const Type *ElTy = getTypeByID(Record[i]); + if (!ElTy) return Error("Invalid CE_INSERTVAL record"); + Elts.push_back(ValueList.getConstantFwdRef(Record[i+1], ElTy)); + } + V = ConstantExpr::getInsertValue(Elts[0], Elts[1], + &Elts[2], Elts.size()-1); + break; + } case bitc::CST_CODE_CE_SELECT: // CE_SELECT: [opval#, opval#, opval#] if (Record.size() < 3) return Error("Invalid CE_SELECT record"); V = ConstantExpr::getSelect(ValueList.getConstantFwdRef(Record[0], @@ -1301,6 +1324,47 @@ break; } + case bitc::FUNC_CODE_INST_EXTRACTVAL: { // EXTRACTVAL: [n x operands] + unsigned OpNum = 0; + Value *Agg; + if (getValueTypePair(Record, OpNum, NextValueNo, Agg)) + return Error("Invalid EXTRACTVAL record"); + + SmallVector EXTRACTVALIdx; + while (OpNum != Record.size()) { + Value *Op; + if (getValueTypePair(Record, OpNum, NextValueNo, Op)) + return Error("Invalid EXTRACTVAL record"); + EXTRACTVALIdx.push_back(Op); + } + + I = ExtractValueInst::Create(Agg, + EXTRACTVALIdx.begin(), EXTRACTVALIdx.end()); + break; + } + + case bitc::FUNC_CODE_INST_INSERTVAL: { // INSERTVAL: [n x operands] + unsigned OpNum = 0; + Value *Agg; + if (getValueTypePair(Record, OpNum, NextValueNo, Agg)) + return Error("Invalid INSERTVAL record"); + Value *Val; + if (getValueTypePair(Record, OpNum, NextValueNo, Val)) + return Error("Invalid INSERTVAL record"); + + SmallVector INSERTVALIdx; + while (OpNum != Record.size()) { + Value *Op; + if (getValueTypePair(Record, OpNum, NextValueNo, Op)) + return Error("Invalid INSERTVAL record"); + INSERTVALIdx.push_back(Op); + } + + I = InsertValueInst::Create(Agg, Val, + INSERTVALIdx.begin(), INSERTVALIdx.end()); + break; + } + case bitc::FUNC_CODE_INST_SELECT: { // SELECT: [opval, ty, opval, opval] unsigned OpNum = 0; Value *TrueVal, *FalseVal, *Cond; Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=51468&r1=51467&r2=51468&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original) +++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Thu May 22 20:55:30 2008 @@ -610,6 +610,20 @@ Record.push_back(VE.getValueID(C->getOperand(i))); } break; + case Instruction::ExtractValue: + Code = bitc::CST_CODE_CE_EXTRACTVAL; + for (unsigned i = 0, e = CE->getNumOperands(); i != e; ++i) { + Record.push_back(VE.getTypeID(C->getOperand(i)->getType())); + Record.push_back(VE.getValueID(C->getOperand(i))); + } + break; + case Instruction::InsertValue: + Code = bitc::CST_CODE_CE_INSERTVAL; + for (unsigned i = 0, e = CE->getNumOperands(); i != e; ++i) { + Record.push_back(VE.getTypeID(C->getOperand(i)->getType())); + Record.push_back(VE.getValueID(C->getOperand(i))); + } + break; case Instruction::Select: Code = bitc::CST_CODE_CE_SELECT; Record.push_back(VE.getValueID(C->getOperand(0))); @@ -718,6 +732,16 @@ for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) PushValueAndType(I.getOperand(i), InstID, Vals, VE); break; + case Instruction::ExtractValue: + Code = bitc::FUNC_CODE_INST_EXTRACTVAL; + for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) + PushValueAndType(I.getOperand(i), InstID, Vals, VE); + break; + case Instruction::InsertValue: + Code = bitc::FUNC_CODE_INST_INSERTVAL; + for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) + PushValueAndType(I.getOperand(i), InstID, Vals, VE); + break; case Instruction::Select: Code = bitc::FUNC_CODE_INST_SELECT; PushValueAndType(I.getOperand(1), InstID, Vals, VE); Modified: llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp?rev=51468&r1=51467&r2=51468&view=diff ============================================================================== --- llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp (original) +++ llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp Thu May 22 20:55:30 2008 @@ -21,9 +21,9 @@ #include using namespace llvm; -static bool isFirstClassType(const std::pair &P) { - return P.first->isFirstClassType(); +static bool isSingleValueType(const std::pair &P) { + return P.first->isSingleValueType(); } static bool isIntegerValue(const std::pair &V) { @@ -103,10 +103,10 @@ // in the table (have low bit-width). std::stable_sort(Types.begin(), Types.end(), CompareByFrequency); - // Partition the Type ID's so that the first-class types occur before the + // Partition the Type ID's so that the single-value types occur before the // aggregate types. This allows the aggregate types to be dropped from the // type table after parsing the global variable initializers. - std::partition(Types.begin(), Types.end(), isFirstClassType); + std::partition(Types.begin(), Types.end(), isSingleValueType); // Now that we rearranged the type table, rebuild TypeMap. for (unsigned i = 0, e = Types.size(); i != e; ++i) @@ -264,11 +264,11 @@ /// there are none, return -1. int ValueEnumerator::PurgeAggregateValues() { // If there are no aggregate values at the end of the list, return -1. - if (Values.empty() || Values.back().first->getType()->isFirstClassType()) + if (Values.empty() || Values.back().first->getType()->isSingleValueType()) return -1; // Otherwise, remove aggregate values... - while (!Values.empty() && !Values.back().first->getType()->isFirstClassType()) + while (!Values.empty() && !Values.back().first->getType()->isSingleValueType()) Values.pop_back(); // ... and return the new size. Added: llvm/trunk/test/Assembler/insertextractvalue.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/insertextractvalue.ll?rev=51468&view=auto ============================================================================== --- llvm/trunk/test/Assembler/insertextractvalue.ll (added) +++ llvm/trunk/test/Assembler/insertextractvalue.ll Thu May 22 20:55:30 2008 @@ -0,0 +1,13 @@ +; RUN: llvm-as < %s + +;define float @foo({{i32},{float, double}}* %p) { + ;%t = load {{i32},{float, double}}* %p + ;%s = extractvalue {{i32},{float, double}} %t, i32 1, i32 0 + ;%r = insertvalue {{i32},{float, double}} %t, double 2.0, i32 1, i32 1 + ;store {{i32},{float, double}} %r, {{i32},{float, double}}* %p + ;ret float %s +;} +define float @bar({{i32},{float, double}}* %p) { + store {{i32},{float, double}} insertvalue ({{i32},{float, double}}{{i32}{i32 4},{float, double}{float 4.0, double 5.0}}, double 20.0, i32 1, i32 1), {{i32},{float, double}}* %p + ret float extractvalue ({{i32},{float, double}}{{i32}{i32 3},{float, double}{float 7.0, double 9.0}}, i32 1, i32 0) +} Modified: llvm/trunk/test/Verifier/2006-07-11-StoreStruct.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Verifier/2006-07-11-StoreStruct.ll?rev=51468&r1=51467&r2=51468&view=diff ============================================================================== --- llvm/trunk/test/Verifier/2006-07-11-StoreStruct.ll (original) +++ llvm/trunk/test/Verifier/2006-07-11-StoreStruct.ll Thu May 22 20:55:30 2008 @@ -1,5 +1,7 @@ -; RUN: not llvm-as < %s |& grep {Instruction operands must be first-class} -; PR826 +; RUN: llvm-as < %s |& not grep {Instruction operands must be first-class} + +; This previously was for PR826, but structs are now first-class so +; the following is now valid. %struct_4 = type { i32 } Modified: llvm/trunk/utils/llvm.grm URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm.grm?rev=51468&r1=51467&r2=51468&view=diff ============================================================================== --- llvm/trunk/utils/llvm.grm (original) +++ llvm/trunk/utils/llvm.grm Thu May 22 20:55:30 2008 @@ -222,7 +222,9 @@ | vfcmp FPredicates "(" ^ ConstVal ^ "," ConstVal ^ ")" | extractelement "(" ^ ConstVal ^ "," ConstVal ^ ")" | insertelement "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")" - | shufflevector "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")" ; + | shufflevector "(" ^ ConstVal ^ "," ConstVal ^ "," ConstVal ^ ")" + | extractvalue "(" ^ ConstVal IndexList ^ ")" + | insertvalue "(" ^ ConstVal ^ "," ConstVal IndexList ^ ")" ; ConstVector ::= ConstVector ^ "," ConstVal | ConstVal ; @@ -373,4 +375,6 @@ | OptVolatile load Types ValueRef OptCAlign | OptVolatile store ResolvedVal ^ "," Types ValueRef OptCAlign | getresult Types ValueRef ^ "," EUINT64VAL - | getelementptr Types ValueRef IndexList ; + | getelementptr Types ValueRef IndexList + | extractvalue Types ValueRef IndexList + | insertvalue Types ValueRef ^ "," Types ValueRef IndexList ; From gohman at apple.com Thu May 22 21:28:02 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 02:28:02 -0000 Subject: [llvm-commits] [llvm] r51469 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/add-sitofp.ll Message-ID: <200805230228.m4N2S2XR004085@zion.cs.uiuc.edu> Author: djg Date: Thu May 22 21:28:01 2008 New Revision: 51469 URL: http://llvm.org/viewvc/llvm-project?rev=51469&view=rev Log: Generalize the new code in instcombine's ComputeNumSignBits for handling and/or to handle more cases (such as this add-sitofp.ll testcase), and port it to selectiondag's ComputeNumSignBits. Added: llvm/trunk/test/Transforms/InstCombine/add-sitofp.ll Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=51469&r1=51468&r2=51469&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu May 22 21:28:01 2008 @@ -1628,6 +1628,7 @@ assert(MVT::isInteger(VT) && "Invalid VT!"); unsigned VTBits = MVT::getSizeInBits(VT); unsigned Tmp, Tmp2; + unsigned FirstAnswer = 1; if (Depth == 6) return 1; // Limit search depth. @@ -1683,11 +1684,16 @@ case ISD::AND: case ISD::OR: case ISD::XOR: // NOT is handled here. - // Logical binary ops preserve the number of sign bits. + // Logical binary ops preserve the number of sign bits at the worst. Tmp = ComputeNumSignBits(Op.getOperand(0), Depth+1); - if (Tmp == 1) return 1; // Early out. - Tmp2 = ComputeNumSignBits(Op.getOperand(1), Depth+1); - return std::min(Tmp, Tmp2); + if (Tmp != 1) { + Tmp2 = ComputeNumSignBits(Op.getOperand(1), Depth+1); + FirstAnswer = std::min(Tmp, Tmp2); + // We computed what we know about the sign bits as our first + // answer. Now proceed to the generic code that uses + // ComputeMaskedBits, and pick whichever answer is better. + } + break; case ISD::SELECT: Tmp = ComputeNumSignBits(Op.getOperand(1), Depth+1); @@ -1801,7 +1807,7 @@ Op.getOpcode() == ISD::INTRINSIC_W_CHAIN || Op.getOpcode() == ISD::INTRINSIC_VOID) { unsigned NumBits = TLI.ComputeNumSignBitsForTargetNode(Op, Depth); - if (NumBits > 1) return NumBits; + if (NumBits > 1) FirstAnswer = std::max(FirstAnswer, NumBits); } // Finally, if we can prove that the top bits of the result are 0's or 1's, @@ -1816,7 +1822,7 @@ Mask = KnownOne; } else { // Nothing known. - return 1; + return FirstAnswer; } // Okay, we know that the sign bit in Mask is set. Use CLZ to determine @@ -1825,7 +1831,7 @@ Mask <<= Mask.getBitWidth()-VTBits; // Return # leading zeros. We use 'min' here in case Val was zero before // shifting. We don't want to return '64' as for an i32 "0". - return std::min(VTBits, Mask.countLeadingZeros()); + return std::max(FirstAnswer, std::min(VTBits, Mask.countLeadingZeros())); } Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51469&r1=51468&r2=51469&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Thu May 22 21:28:01 2008 @@ -2072,6 +2072,7 @@ const IntegerType *Ty = cast(V->getType()); unsigned TyBits = Ty->getBitWidth(); unsigned Tmp, Tmp2; + unsigned FirstAnswer = 1; if (Depth == 6) return 1; // Limit search depth. @@ -2101,54 +2102,18 @@ } break; case Instruction::And: - // Logical binary ops preserve the number of sign bits at the worst. - Tmp = ComputeNumSignBits(U->getOperand(0), Depth+1); - if (Tmp != 1) { - Tmp2 = ComputeNumSignBits(U->getOperand(1), Depth+1); - Tmp = std::min(Tmp, Tmp2); - } - - // X & C has sign bits equal to C if C's top bits are zeros. - if (ConstantInt *C = dyn_cast(U->getOperand(1))) { - // See what bits are known to be zero on the output. - APInt KnownZero(TyBits, 0), KnownOne(TyBits, 0); - APInt Mask = APInt::getAllOnesValue(TyBits); - ComputeMaskedBits(U->getOperand(0), Mask, KnownZero, KnownOne, Depth+1); - - KnownZero |= ~C->getValue(); - // If we know that we have leading zeros, we know we have at least that - // many sign bits. - Tmp = std::max(Tmp, KnownZero.countLeadingOnes()); - } - return Tmp; - case Instruction::Or: + case Instruction::Xor: // NOT is handled here. // Logical binary ops preserve the number of sign bits at the worst. Tmp = ComputeNumSignBits(U->getOperand(0), Depth+1); if (Tmp != 1) { Tmp2 = ComputeNumSignBits(U->getOperand(1), Depth+1); - Tmp = std::min(Tmp, Tmp2); + FirstAnswer = std::min(Tmp, Tmp2); + // We computed what we know about the sign bits as our first + // answer. Now proceed to the generic code that uses + // ComputeMaskedBits, and pick whichever answer is better. } - // X & C has sign bits equal to C if C's top bits are zeros. - if (ConstantInt *C = dyn_cast(U->getOperand(1))) { - // See what bits are known to be one on the output. - APInt KnownZero(TyBits, 0), KnownOne(TyBits, 0); - APInt Mask = APInt::getAllOnesValue(TyBits); - ComputeMaskedBits(U->getOperand(0), Mask, KnownZero, KnownOne, Depth+1); - - KnownOne |= C->getValue(); - // If we know that we have leading ones, we know we have at least that - // many sign bits. - Tmp = std::max(Tmp, KnownOne.countLeadingOnes()); - } - return Tmp; - - case Instruction::Xor: // NOT is handled here. - // Logical binary ops preserve the number of sign bits. - Tmp = ComputeNumSignBits(U->getOperand(0), Depth+1); - if (Tmp == 1) return 1; // Early out. - Tmp2 = ComputeNumSignBits(U->getOperand(1), Depth+1); - return std::min(Tmp, Tmp2); + break; case Instruction::Select: Tmp = ComputeNumSignBits(U->getOperand(1), Depth+1); @@ -2232,7 +2197,7 @@ Mask = KnownOne; } else { // Nothing known. - return 1; + return FirstAnswer; } // Okay, we know that the sign bit in Mask is set. Use CLZ to determine @@ -2241,7 +2206,7 @@ Mask <<= Mask.getBitWidth()-TyBits; // Return # leading zeros. We use 'min' here in case Val was zero before // shifting. We don't want to return '64' as for an i32 "0". - return std::min(TyBits, Mask.countLeadingZeros()); + return std::max(FirstAnswer, std::min(TyBits, Mask.countLeadingZeros())); } Added: llvm/trunk/test/Transforms/InstCombine/add-sitofp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/add-sitofp.ll?rev=51469&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/add-sitofp.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/add-sitofp.ll Thu May 22 21:28:01 2008 @@ -0,0 +1,9 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {add i32} + +define double @x(i32 %a, i32 %b) nounwind { + %m = lshr i32 %a, 24 + %n = and i32 %m, %b + %o = sitofp i32 %n to double + %p = add double %o, 1.0 + ret double %p +} From nicholas at mxc.ca Thu May 22 22:26:49 2008 From: nicholas at mxc.ca (Nick Lewycky) Date: Fri, 23 May 2008 03:26:49 -0000 Subject: [llvm-commits] [llvm] r51471 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2008-05-22-IDivVector.ll Message-ID: <200805230326.m4N3Qn9H007938@zion.cs.uiuc.edu> Author: nicholas Date: Thu May 22 22:26:47 2008 New Revision: 51471 URL: http://llvm.org/viewvc/llvm-project?rev=51471&view=rev Log: Fix a recently added optimization to not crash on vectors. Added: llvm/trunk/test/Transforms/InstCombine/2008-05-22-IDivVector.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51471&r1=51470&r2=51471&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Thu May 22 22:26:47 2008 @@ -3276,8 +3276,16 @@ Value *Op0 = I.getOperand(0), *Op1 = I.getOperand(1); // (sdiv X, X) --> 1 (udiv X, X) --> 1 - if (Op0 == Op1) - return ReplaceInstUsesWith(I, ConstantInt::get(I.getType(), 1)); + if (Op0 == Op1) { + if (const VectorType *Ty = dyn_cast(I.getType())) { + ConstantInt *CI = ConstantInt::get(Ty->getElementType(), 1); + std::vector Elts(Ty->getNumElements(), CI); + return ReplaceInstUsesWith(I, ConstantVector::get(Elts)); + } + + ConstantInt *CI = ConstantInt::get(I.getType(), 1); + return ReplaceInstUsesWith(I, CI); + } if (Instruction *Common = commonDivTransforms(I)) return Common; Added: llvm/trunk/test/Transforms/InstCombine/2008-05-22-IDivVector.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2008-05-22-IDivVector.ll?rev=51471&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/2008-05-22-IDivVector.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/2008-05-22-IDivVector.ll Thu May 22 22:26:47 2008 @@ -0,0 +1,6 @@ +; RUN: llvm-as < %s | opt -instcombine -disable-output + +define <3 x i8> @f(<3 x i8> %i) { + %A = sdiv <3 x i8> %i, %i + ret <3 x i8> %A +} From asl at math.spbu.ru Thu May 22 22:49:50 2008 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Fri, 23 May 2008 07:49:50 +0400 Subject: [llvm-commits] [llvm] r51458 - /llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp In-Reply-To: <200805230017.m4N0H0Qk027968@zion.cs.uiuc.edu> References: <200805230017.m4N0H0Qk027968@zion.cs.uiuc.edu> Message-ID: <1211514590.5835.25.camel@localhost> Hello, Dale > + SwitchToDataSection("\t.section __TEXT,__const_coal,coalesced", I); Is this correct? __TEXT section? -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University. From nicholas at mxc.ca Thu May 22 23:14:51 2008 From: nicholas at mxc.ca (Nick Lewycky) Date: Fri, 23 May 2008 04:14:51 -0000 Subject: [llvm-commits] [llvm] r51472 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll Message-ID: <200805230414.m4N4EqgX009609@zion.cs.uiuc.edu> Author: nicholas Date: Thu May 22 23:14:51 2008 New Revision: 51472 URL: http://llvm.org/viewvc/llvm-project?rev=51472&view=rev Log: Implement X + X for vectors. Added: llvm/trunk/test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51472&r1=51471&r2=51472&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Thu May 22 23:14:51 2008 @@ -2292,14 +2292,22 @@ namespace { -// AddRHS - Implements: X + X --> X << 1 +// AddRHS - Implements: X + X --> X << 1 and X + X --> X * 2 for vectors struct AddRHS { Value *RHS; AddRHS(Value *rhs) : RHS(rhs) {} bool shouldApply(Value *LHS) const { return LHS == RHS; } Instruction *apply(BinaryOperator &Add) const { - return BinaryOperator::CreateShl(Add.getOperand(0), - ConstantInt::get(Add.getType(), 1)); + if (Add.getType()->getTypeID() == Type::VectorTyID) { + const VectorType *VTy = cast(Add.getType()); + ConstantInt *CI = ConstantInt::get(VTy->getElementType(), 2); + std::vector Elts(VTy->getNumElements(), CI); + return BinaryOperator::CreateMul(Add.getOperand(0), + ConstantVector::get(Elts)); + } else { + return BinaryOperator::CreateShl(Add.getOperand(0), + ConstantInt::get(Add.getType(), 1)); + } } }; @@ -2627,8 +2635,8 @@ } } - // X + X --> X << 1 - if (I.getType()->isInteger() && I.getType() != Type::Int1Ty) { + // X + X --> X << 1 and X + X --> X * 2 for vectors + if (I.getType()->isIntOrIntVector() && I.getType() != Type::Int1Ty) { if (Instruction *Result = AssociativeOpt(I, AddRHS(RHS))) return Result; if (Instruction *RHSI = dyn_cast(RHS)) { Added: llvm/trunk/test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll?rev=51472&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll Thu May 22 23:14:51 2008 @@ -0,0 +1,6 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep mul + +define <3 x i8> @f(<3 x i8> %i) { + %A = add <3 x i8> %i, %i + ret <3 x i8> %A +} From clattner at apple.com Thu May 22 23:25:14 2008 From: clattner at apple.com (Chris Lattner) Date: Thu, 22 May 2008 21:25:14 -0700 Subject: [llvm-commits] [llvm] r51472 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll In-Reply-To: <200805230414.m4N4EqgX009609@zion.cs.uiuc.edu> References: <200805230414.m4N4EqgX009609@zion.cs.uiuc.edu> Message-ID: On May 22, 2008, at 9:14 PM, Nick Lewycky wrote: > Author: nicholas > Date: Thu May 22 23:14:51 2008 > New Revision: 51472 > > URL: http://llvm.org/viewvc/llvm-project?rev=51472&view=rev > Log: > Implement X + X for vectors. Is the code generator turning this back into x+x? If not, this is a major pessimization. What does: define <4 x i32> @f(<4 x i32> %i) nounwind { %A = add <4 x i32> %i, %i ret <4 x i32> %A } compile into? Without your patch I get: _f: paddd %xmm0, %xmm0 ret -Chris From clattner at apple.com Thu May 22 23:26:54 2008 From: clattner at apple.com (Chris Lattner) Date: Thu, 22 May 2008 21:26:54 -0700 Subject: [llvm-commits] [llvm] r51472 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll In-Reply-To: References: <200805230414.m4N4EqgX009609@zion.cs.uiuc.edu> Message-ID: <8DF5849B-BD1F-44C4-A0BC-748E2B3AAABA@apple.com> On May 22, 2008, at 9:25 PM, Chris Lattner wrote: > > On May 22, 2008, at 9:14 PM, Nick Lewycky wrote: > >> Author: nicholas >> Date: Thu May 22 23:14:51 2008 >> New Revision: 51472 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=51472&view=rev >> Log: >> Implement X + X for vectors. > > Is the code generator turning this back into x+x? If not, this is a > major pessimization. What does: > > define <4 x i32> @f(<4 x i32> %i) nounwind { > %A = add <4 x i32> %i, %i > ret <4 x i32> %A > } > > compile into? Without your patch I get: > > _f: > paddd %xmm0, %xmm0 > ret Please revert. Your patch optimizes this into: LCPI1_0: ## <4 x i32> .long 2 .long 2 .long 2 .long 2 .text .align 4,0x90 .globl _f _f: pshufd $3, %xmm0, %xmm1 movd %xmm1, %eax imull LCPI1_0+12, %eax movd %eax, %xmm1 pshufd $1, %xmm0, %xmm2 movd %xmm2, %eax imull LCPI1_0+4, %eax movd %eax, %xmm2 punpckldq %xmm1, %xmm2 movd %xmm0, %eax imull LCPI1_0, %eax movd %eax, %xmm1 movhlps %xmm0, %xmm0 movd %xmm0, %eax imull LCPI1_0+8, %eax movd %eax, %xmm0 punpckldq %xmm0, %xmm1 movaps %xmm1, %xmm0 punpckldq %xmm2, %xmm0 ret From sabre at nondot.org Thu May 22 23:29:54 2008 From: sabre at nondot.org (Chris Lattner) Date: Fri, 23 May 2008 04:29:54 -0000 Subject: [llvm-commits] [llvm] r51473 - /llvm/trunk/lib/Target/X86/README-SSE.txt Message-ID: <200805230429.m4N4Ts0p010026@zion.cs.uiuc.edu> Author: lattner Date: Thu May 22 23:29:53 2008 New Revision: 51473 URL: http://llvm.org/viewvc/llvm-project?rev=51473&view=rev Log: we compile multiply-by-constant into horrible code. Doesn't sse4 have some instruction for doing this? Modified: llvm/trunk/lib/Target/X86/README-SSE.txt Modified: llvm/trunk/lib/Target/X86/README-SSE.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README-SSE.txt?rev=51473&r1=51472&r2=51473&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/README-SSE.txt (original) +++ llvm/trunk/lib/Target/X86/README-SSE.txt Thu May 22 23:29:53 2008 @@ -807,3 +807,41 @@ //===---------------------------------------------------------------------===// +We compile vector multiply-by-constant into poor code: + +define <4 x i32> @f(<4 x i32> %i) nounwind { + %A = mul <4 x i32> %i, < i32 10, i32 10, i32 10, i32 10 > + ret <4 x i32> %A +} + +Compiles into: + +LCPI1_0: ## <4 x i32> + .long 10 + .long 10 + .long 10 + .long 10 + .text + .align 4,0x90 + .globl _f +_f: + pshufd $3, %xmm0, %xmm1 + movd %xmm1, %eax + imull LCPI1_0+12, %eax + movd %eax, %xmm1 + pshufd $1, %xmm0, %xmm2 + movd %xmm2, %eax + imull LCPI1_0+4, %eax + movd %eax, %xmm2 + punpckldq %xmm1, %xmm2 + movd %xmm0, %eax + imull LCPI1_0, %eax + movd %eax, %xmm1 + movhlps %xmm0, %xmm0 + movd %xmm0, %eax + imull LCPI1_0+8, %eax + movd %eax, %xmm0 + punpckldq %xmm0, %xmm1 + movaps %xmm1, %xmm0 + punpckldq %xmm2, %xmm0 + ret From nicholas at mxc.ca Thu May 22 23:30:22 2008 From: nicholas at mxc.ca (Nick Lewycky) Date: Thu, 22 May 2008 21:30:22 -0700 Subject: [llvm-commits] [llvm] r51472 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll In-Reply-To: References: <200805230414.m4N4EqgX009609@zion.cs.uiuc.edu> Message-ID: <4836485E.4070508@mxc.ca> Chris Lattner wrote: > On May 22, 2008, at 9:14 PM, Nick Lewycky wrote: > >> Author: nicholas >> Date: Thu May 22 23:14:51 2008 >> New Revision: 51472 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=51472&view=rev >> Log: >> Implement X + X for vectors. > > Is the code generator turning this back into x+x? If not, this is a > major pessimization. What does: > > define <4 x i32> @f(<4 x i32> %i) nounwind { > %A = add <4 x i32> %i, %i > ret <4 x i32> %A > } > > compile into? Without your patch I get: > > _f: > paddd %xmm0, %xmm0 > ret Good grief. I don't even want to paste what it turns into. I'll revert the patch and move it to a README, I guess. Nick From nicholas at mxc.ca Thu May 22 23:34:58 2008 From: nicholas at mxc.ca (Nick Lewycky) Date: Fri, 23 May 2008 04:34:58 -0000 Subject: [llvm-commits] [llvm] r51474 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll Message-ID: <200805230434.m4N4Ywkm010168@zion.cs.uiuc.edu> Author: nicholas Date: Thu May 22 23:34:58 2008 New Revision: 51474 URL: http://llvm.org/viewvc/llvm-project?rev=51474&view=rev Log: Revert X + X --> X * 2 optz'n which pessimizes heavily on x86. Removed: llvm/trunk/test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51474&r1=51473&r2=51474&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Thu May 22 23:34:58 2008 @@ -2292,22 +2292,14 @@ namespace { -// AddRHS - Implements: X + X --> X << 1 and X + X --> X * 2 for vectors +// AddRHS - Implements: X + X --> X << 1 struct AddRHS { Value *RHS; AddRHS(Value *rhs) : RHS(rhs) {} bool shouldApply(Value *LHS) const { return LHS == RHS; } Instruction *apply(BinaryOperator &Add) const { - if (Add.getType()->getTypeID() == Type::VectorTyID) { - const VectorType *VTy = cast(Add.getType()); - ConstantInt *CI = ConstantInt::get(VTy->getElementType(), 2); - std::vector Elts(VTy->getNumElements(), CI); - return BinaryOperator::CreateMul(Add.getOperand(0), - ConstantVector::get(Elts)); - } else { - return BinaryOperator::CreateShl(Add.getOperand(0), - ConstantInt::get(Add.getType(), 1)); - } + return BinaryOperator::CreateShl(Add.getOperand(0), + ConstantInt::get(Add.getType(), 1)); } }; @@ -2635,8 +2627,8 @@ } } - // X + X --> X << 1 and X + X --> X * 2 for vectors - if (I.getType()->isIntOrIntVector() && I.getType() != Type::Int1Ty) { + // X + X --> X + if (I.getType()->isInteger() && I.getType() != Type::Int1Ty) { if (Instruction *Result = AssociativeOpt(I, AddRHS(RHS))) return Result; if (Instruction *RHSI = dyn_cast(RHS)) { Removed: llvm/trunk/test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll?rev=51473&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll (original) +++ llvm/trunk/test/Transforms/InstCombine/2008-05-22-FoldAddIVec.ll (removed) @@ -1,6 +0,0 @@ -; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep mul - -define <3 x i8> @f(<3 x i8> %i) { - %A = add <3 x i8> %i, %i - ret <3 x i8> %A -} From nicholas at mxc.ca Thu May 22 23:39:38 2008 From: nicholas at mxc.ca (Nick Lewycky) Date: Fri, 23 May 2008 04:39:38 -0000 Subject: [llvm-commits] [llvm] r51475 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200805230439.m4N4dcge010282@zion.cs.uiuc.edu> Author: nicholas Date: Thu May 22 23:39:38 2008 New Revision: 51475 URL: http://llvm.org/viewvc/llvm-project?rev=51475&view=rev Log: Typo. Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51475&r1=51474&r2=51475&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Thu May 22 23:39:38 2008 @@ -2627,7 +2627,7 @@ } } - // X + X --> X + // X + X --> X << 1 if (I.getType()->isInteger() && I.getType() != Type::Int1Ty) { if (Instruction *Result = AssociativeOpt(I, AddRHS(RHS))) return Result; From nicholas at mxc.ca Thu May 22 23:54:45 2008 From: nicholas at mxc.ca (Nick Lewycky) Date: Fri, 23 May 2008 04:54:45 -0000 Subject: [llvm-commits] [llvm] r51476 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2008-05-22-NegValVector.ll Message-ID: <200805230454.m4N4sjdA010798@zion.cs.uiuc.edu> Author: nicholas Date: Thu May 22 23:54:45 2008 New Revision: 51476 URL: http://llvm.org/viewvc/llvm-project?rev=51476&view=rev Log: Constant integer vectors may also be negated. Added: llvm/trunk/test/Transforms/InstCombine/2008-05-22-NegValVector.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51476&r1=51475&r2=51476&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Thu May 22 23:54:45 2008 @@ -550,6 +550,11 @@ // Constants can be considered to be negated values if they can be folded. if (ConstantInt *C = dyn_cast(V)) return ConstantExpr::getNeg(C); + + if (ConstantVector *C = dyn_cast(V)) + if (C->getType()->getElementType()->isInteger()) + return ConstantExpr::getNeg(C); + return 0; } Added: llvm/trunk/test/Transforms/InstCombine/2008-05-22-NegValVector.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2008-05-22-NegValVector.ll?rev=51476&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/2008-05-22-NegValVector.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/2008-05-22-NegValVector.ll Thu May 22 23:54:45 2008 @@ -0,0 +1,8 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep sub + +define <3 x i8> @f(<3 x i8> %a) { + %A = sub <3 x i8> zeroinitializer, %a + %B = mul <3 x i8> %A, + ret <3 x i8> %B +} + From matthijs at stdin.nl Fri May 23 02:57:04 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Fri, 23 May 2008 07:57:04 -0000 Subject: [llvm-commits] [llvm] r51477 - /llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Message-ID: <200805230757.m4N7v472024117@zion.cs.uiuc.edu> Author: matthijs Date: Fri May 23 02:57:02 2008 New Revision: 51477 URL: http://llvm.org/viewvc/llvm-project?rev=51477&view=rev Log: Indent fix. Modified: llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Modified: llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp?rev=51477&r1=51476&r2=51477&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Fri May 23 02:57:02 2008 @@ -75,8 +75,8 @@ Function *DoPromotion(Function *F, SmallPtrSet &ArgsToPromote, SmallPtrSet &ByValArgsToTransform); - /// The maximum number of elements to expand, or 0 for unlimited. - unsigned maxElements; + /// The maximum number of elements to expand, or 0 for unlimited. + unsigned maxElements; }; } From matthijs at stdin.nl Fri May 23 04:09:58 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Fri, 23 May 2008 11:09:58 +0200 Subject: [llvm-commits] [PATCH] Restructure a part of SimplifyCFG In-Reply-To: <20080516141445.GK8631@katherina.student.utwente.nl> References: <20080516141445.GK8631@katherina.student.utwente.nl> Message-ID: <20080523090958.GJ13165@katherina.student.utwente.nl> Committed. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20080523/5ba83df6/attachment.bin From matthijs at stdin.nl Fri May 23 04:09:42 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Fri, 23 May 2008 09:09:42 -0000 Subject: [llvm-commits] [llvm] r51478 - in /llvm/trunk: lib/Transforms/Utils/SimplifyCFG.cpp test/Transforms/SimplifyCFG/2008-05-16-PHIBlockMerge.ll Message-ID: <200805230909.m4N99gS5026515@zion.cs.uiuc.edu> Author: matthijs Date: Fri May 23 04:09:41 2008 New Revision: 51478 URL: http://llvm.org/viewvc/llvm-project?rev=51478&view=rev Log: Restucture a part of the SimplifyCFG pass and include a testcase. The SimplifyCFG pass looks at basic blocks that contain only phi nodes, followed by an unconditional branch. In a lot of cases, such a block (BB) can be merged into their successor (Succ). This merging is performed by TryToSimplifyUncondBranchFromEmptyBlock. It does this by taking all phi nodes in the succesor block Succ and expanding them to include the predecessors of BB. Furthermore, any phi nodes in BB are moved to Succ and expanded to include the predecessors of Succ as well. Before attempting this merge, CanPropagatePredecessorsForPHIs checks to see if all phi nodes can be properly merged. All functional changes are made to this function, only comments were updated in TryToSimplifyUncondBranchFromEmptyBlock. In the original code, CanPropagatePredecessorsForPHIs looks quite convoluted and more like stack of checks added to handle different kinds of situations than a comprehensive check. In particular the first check in the function did some value checking for the case that BB and Succ have a common predecessor, while the last check in the function simply rejected all cases where BB and Succ have a common predecessor. The first check was still useful in the case that BB did not contain any phi nodes at all, though, so it was not completely useless. Now, CanPropagatePredecessorsForPHIs is restructured to to look a lot more similar to the code that actually performs the merge. Both functions now look at the same phi nodes in about the same order. Any conflicts (phi nodes with different values for the same source) that could arise from merging or moving phi nodes are detected. If no conflicts are found, the merge can happen. Apart from only restructuring the checks, two main changes in functionality happened. Firstly, the old code rejected blocks with common predecessors in most cases. The new code performs some extra checks so common predecessors can be handled in a lot of cases. Wherever common predecessors still pose problems, the blocks are left untouched. Secondly, the old code rejected the merge when values (phi nodes) from BB were used in any other place than Succ. However, it does not seem that there is any situation that would require this check. Even more, this can be proven. Consider that BB is a block containing of a single phi node "%a" and a branch to Succ. Now, since the definition of %a will dominate all of its uses, BB will dominate all blocks that use %a. Furthermore, since the branch from BB to Succ is unconditional, Succ will also dominate all uses of %a. Now, assume that one predecessor of Succ is not dominated by BB (and thus not dominated by Succ). Since at least one use of %a (but in reality all of them) is reachable from Succ, you could end up at a use of %a without passing through it's definition in BB (by coming from X through Succ). This is a contradiction, meaning that our original assumption is wrong. Thus, all predecessors of Succ must also be dominated by BB (and thus also by Succ). This means that moving the phi node %a from BB to Succ does not pose any problems when the two blocks are merged, and any use checks are not needed. Added: llvm/trunk/test/Transforms/SimplifyCFG/2008-05-16-PHIBlockMerge.ll Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=51478&r1=51477&r2=51478&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Fri May 23 04:09:41 2008 @@ -80,63 +80,93 @@ static bool CanPropagatePredecessorsForPHIs(BasicBlock *BB, BasicBlock *Succ) { assert(*succ_begin(BB) == Succ && "Succ is not successor of BB!"); - // Check to see if one of the predecessors of BB is already a predecessor of - // Succ. If so, we cannot do the transformation if there are any PHI nodes - // with incompatible values coming in from the two edges! - // - if (isa(Succ->front())) { - SmallPtrSet BBPreds(pred_begin(BB), pred_end(BB)); - for (pred_iterator PI = pred_begin(Succ), PE = pred_end(Succ); - PI != PE; ++PI) - 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) { - PHINode *PN = cast(I); - // Loop up the entries in the PHI node for BB and for *PI if the - // values coming in are non-equal, we cannot merge these two blocks - // (instead we should insert a conditional move or something, then - // merge the blocks). - if (PN->getIncomingValueForBlock(BB) != - PN->getIncomingValueForBlock(*PI)) - return false; // Values are not equal... + DOUT << "Looking to fold " << BB->getNameStart() << " into " + << Succ->getNameStart() << "\n"; + // Shortcut, if there is only a single predecessor is must be BB and merging + // is always safe + if (Succ->getSinglePredecessor()) return true; + + typedef SmallPtrSet InstrSet; + InstrSet BBPHIs; + + // Make a list of all phi nodes in BB + BasicBlock::iterator BBI = BB->begin(); + while (isa(*BBI)) BBPHIs.insert(BBI++); + + // Make a list of the predecessors of BB + typedef SmallPtrSet BlockSet; + BlockSet BBPreds(pred_begin(BB), pred_end(BB)); + + // Use that list to make another list of common predecessors of BB and Succ + BlockSet CommonPreds; + for (pred_iterator PI = pred_begin(Succ), PE = pred_end(Succ); + PI != PE; ++PI) + if (BBPreds.count(*PI)) + CommonPreds.insert(*PI); + + // Shortcut, if there are no common predecessors, merging is always safe + if (CommonPreds.begin() == CommonPreds.end()) + return true; + + // Look at all the phi nodes in Succ, to see if they present a conflict when + // merging these blocks + for (BasicBlock::iterator I = Succ->begin(); isa(I); ++I) { + PHINode *PN = cast(I); + + // If the incoming value from BB is again a PHINode in + // BB which has the same incoming value for *PI as PN does, we can + // merge the phi nodes and then the blocks can still be merged + PHINode *BBPN = dyn_cast(PN->getIncomingValueForBlock(BB)); + if (BBPN && BBPN->getParent() == BB) { + for (BlockSet::iterator PI = CommonPreds.begin(), PE = CommonPreds.end(); + PI != PE; PI++) { + if (BBPN->getIncomingValueForBlock(*PI) + != PN->getIncomingValueForBlock(*PI)) { + DOUT << "Can't fold, phi node " << *PN->getNameStart() << " in " + << Succ->getNameStart() << " is conflicting with " + << BBPN->getNameStart() << " with regard to common predecessor " + << (*PI)->getNameStart() << "\n"; + return false; + } + } + // Remove this phinode from the list of phis in BB, since it has been + // handled. + BBPHIs.erase(BBPN); + } else { + Value* Val = PN->getIncomingValueForBlock(BB); + for (BlockSet::iterator PI = CommonPreds.begin(), PE = CommonPreds.end(); + PI != PE; PI++) { + // See if the incoming value for the common predecessor is equal to the + // one for BB, in which case this phi node will not prevent the merging + // of the block. + if (Val != PN->getIncomingValueForBlock(*PI)) { + DOUT << "Can't fold, phi node " << *PN->getNameStart() << " in " + << Succ->getNameStart() << " is conflicting with regard to common " + << "predecessor " << (*PI)->getNameStart() << "\n"; + return false; } } - } - - // Finally, if BB has PHI nodes that are used by things other than the PHIs in - // Succ and Succ has predecessors that are not Succ and not Pred, we cannot - // fold these blocks, as we don't know whether BB dominates Succ or not to - // update the PHI nodes correctly. - if (!isa(BB->begin()) || Succ->getSinglePredecessor()) return true; - - // If the predecessors of Succ are only BB, handle it. - bool IsSafe = true; - for (pred_iterator PI = pred_begin(Succ), E = pred_end(Succ); PI != E; ++PI) - if (*PI != BB) { - IsSafe = false; - break; } - if (IsSafe) return true; - - // If the PHI nodes in BB are only used by instructions in Succ, we are ok if - // BB and Succ have no common predecessors. - for (BasicBlock::iterator I = BB->begin(); isa(I); ++I) { - PHINode *PN = cast(I); - for (Value::use_iterator UI = PN->use_begin(), E = PN->use_end(); UI != E; - ++UI) - if (cast(*UI)->getParent() != Succ) + } + + // If there are any other phi nodes in BB that don't have a phi node in Succ + // to merge with, they must be moved to Succ completely. However, for any + // predecessors of Succ, branches will be added to the phi node that just + // point to itself. So, for any common predecessors, this must not cause + // conflicts. + for (InstrSet::iterator I = BBPHIs.begin(), E = BBPHIs.end(); + I != E; I++) { + PHINode *PN = cast(*I); + for (BlockSet::iterator PI = CommonPreds.begin(), PE = CommonPreds.end(); + PI != PE; PI++) + if (PN->getIncomingValueForBlock(*PI) != PN) { + DOUT << "Can't fold, phi node " << *PN->getNameStart() << " in " + << BB->getNameStart() << " is conflicting with regard to common " + << "predecessor " << (*PI)->getNameStart() << "\n"; return false; + } } - - // 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. - 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; - + return true; } @@ -145,11 +175,8 @@ /// branch. If possible, eliminate BB. static bool TryToSimplifyUncondBranchFromEmptyBlock(BasicBlock *BB, BasicBlock *Succ) { - // If our successor has PHI nodes, then we need to update them to include - // entries for BB's predecessors, not for BB itself. Be careful though, - // if this transformation fails (returns true) then we cannot do this - // transformation! - // + // Check to see if merging these blocks would cause conflicts for any of the + // phi nodes in BB or Succ. If not, we can safely merge. if (!CanPropagatePredecessorsForPHIs(BB, Succ)) return false; DOUT << "Killing Trivial BB: \n" << *BB; @@ -171,6 +198,11 @@ if (isa(OldVal) && cast(OldVal)->getParent() == BB) { PHINode *OldValPN = cast(OldVal); for (unsigned i = 0, e = OldValPN->getNumIncomingValues(); i != e; ++i) + // Note that, since we are merging phi nodes and BB and Succ might + // have common predecessors, we could end up with a phi node with + // identical incoming branches. This will be cleaned up later (and + // will trigger asserts if we try to clean it up now, without also + // simplifying the corresponding conditional branch). PN->addIncoming(OldValPN->getIncomingValue(i), OldValPN->getIncomingBlock(i)); } else { @@ -193,19 +225,21 @@ // users of the PHI nodes. PN->eraseFromParent(); } else { - // The instruction is alive, so this means that Succ must have - // *ONLY* had BB as a predecessor, and the PHI node is still valid - // now. Simply move it into Succ, because we know that BB - // strictly dominated Succ. + // The instruction is alive, so this means that BB must dominate all + // predecessors of Succ (Since all uses of the PN are after its + // definition, so in Succ or a block dominated by Succ. If a predecessor + // of Succ would not be dominated by BB, PN would violate the def before + // use SSA demand). Therefore, we can simply move the phi node to the + // next block. Succ->getInstList().splice(Succ->begin(), BB->getInstList(), BB->begin()); // We need to add new entries for the PHI node to account for // predecessors of Succ that the PHI node does not take into - // account. At this point, since we know that BB dominated succ, - // this means that we should any newly added incoming edges should - // use the PHI node as the value for these edges, because they are - // loop back edges. + // account. At this point, since we know that BB dominated succ and all + // of its predecessors, this means that we should any newly added + // incoming edges should use the PHI node itself as the value for these + // edges, because they are loop back edges. for (unsigned i = 0, e = OldSuccPreds.size(); i != e; ++i) if (OldSuccPreds[i] != BB) PN->addIncoming(PN, OldSuccPreds[i]); Added: llvm/trunk/test/Transforms/SimplifyCFG/2008-05-16-PHIBlockMerge.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SimplifyCFG/2008-05-16-PHIBlockMerge.ll?rev=51478&view=auto ============================================================================== --- llvm/trunk/test/Transforms/SimplifyCFG/2008-05-16-PHIBlockMerge.ll (added) +++ llvm/trunk/test/Transforms/SimplifyCFG/2008-05-16-PHIBlockMerge.ll Fri May 23 04:09:41 2008 @@ -0,0 +1,131 @@ +; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis > %t +; RUN: not grep {^BB.tomerge} %t +; RUN grep {^BB.nomerge} %t | count 2 + +; ModuleID = '' +declare i1 @foo() + +declare i1 @bar(i32) + +; This function can't be merged +define void @a() { +entry: + br label %BB.nomerge + +BB.nomerge: ; preds = %Common, %entry + ; This phi has a conflicting value (0) with below phi (2), so blocks + ; can't be merged. + %a = phi i32 [ 1, %entry ], [ 0, %Common ] ; [#uses=1] + br label %Succ + +Succ: ; preds = %Common, %BB.nomerge + %b = phi i32 [ %a, %BB.nomerge ], [ 2, %Common ] ; [#uses=0] + %conde = call i1 @foo( ) ; [#uses=1] + br i1 %conde, label %Common, label %Exit + +Common: ; preds = %Succ + %cond = call i1 @foo( ) ; [#uses=1] + br i1 %cond, label %BB.nomerge, label %Succ + +Exit: ; preds = %Succ + ret void +} + +; This function can't be merged +define void @b() { +entry: + br label %BB.nomerge + +BB.nomerge: ; preds = %Common, %entry + br label %Succ + +Succ: ; preds = %Common, %BB.nomerge + ; This phi has confliction values for Common and (through BB) Common, + ; blocks can't be merged + %b = phi i32 [ 1, %BB.nomerge ], [ 2, %Common ] ; [#uses=0] + %conde = call i1 @foo( ) ; [#uses=1] + br i1 %conde, label %Common, label %Exit + +Common: ; preds = %Succ + %cond = call i1 @foo( ) ; [#uses=1] + br i1 %cond, label %BB.nomerge, label %Succ + +Exit: ; preds = %Succ + ret void +} + +; This function can be merged +define void @c() { +entry: + br label %BB.tomerge + +BB.tomerge: ; preds = %Common, %entry + br label %Succ + +Succ: ; preds = %Common, %BB.tomerge, %Pre-Exit + ; This phi has identical values for Common and (through BB) Common, + ; blocks can't be merged + %b = phi i32 [ 1, %BB.tomerge ], [ 1, %Common ], [ 2, %Pre-Exit ] + %conde = call i1 @foo( ) ; [#uses=1] + br i1 %conde, label %Common, label %Pre-Exit + +Common: ; preds = %Succ + %cond = call i1 @foo( ) ; [#uses=1] + br i1 %cond, label %BB.tomerge, label %Succ + +Pre-Exit: ; preds = %Succ + ; This adds a backedge, so the %b phi node gets a third branch and is + ; not completely trivial + %cond2 = call i1 @foo( ) ; [#uses=1] + br i1 %cond2, label %Succ, label %Exit + +Exit: ; preds = %Pre-Exit + ret void +} + +; This function can be merged +define void @d() { +entry: + br label %BB.tomerge + +BB.tomerge: ; preds = %Common, %entry + ; This phi has a matching value (0) with below phi (0), so blocks + ; can be merged. + %a = phi i32 [ 1, %entry ], [ 0, %Common ] ; [#uses=1] + br label %Succ + +Succ: ; preds = %Common, %BB.tomerge + %b = phi i32 [ %a, %BB.tomerge ], [ 0, %Common ] ; [#uses=0] + %conde = call i1 @foo( ) ; [#uses=1] + br i1 %conde, label %Common, label %Exit + +Common: ; preds = %Succ + %cond = call i1 @foo( ) ; [#uses=1] + br i1 %cond, label %BB.tomerge, label %Succ + +Exit: ; preds = %Succ + ret void +} + +; This function can be merged +define void @e() { +entry: + br label %BB.tomerge + +BB.tomerge: ; preds = %Use, %entry + ; This phi is used somewhere else than Succ, but this should not prevent + ; merging this block + %a = phi i32 [ 1, %entry ], [ 0, %Use ] ; [#uses=1] + br label %Succ + +Succ: ; preds = %BB.tomerge + %conde = call i1 @foo( ) ; [#uses=1] + br i1 %conde, label %Use, label %Exit + +Use: ; preds = %Succ + %cond = call i1 @bar( i32 %a ) ; [#uses=1] + br i1 %cond, label %BB.tomerge, label %Exit + +Exit: ; preds = %Use, %Succ + ret void +} From matthijs at stdin.nl Fri May 23 06:45:19 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Fri, 23 May 2008 11:45:19 -0000 Subject: [llvm-commits] [llvm] r51480 - /llvm/trunk/docs/TestingGuide.html Message-ID: <200805231145.m4NBjKMu031483@zion.cs.uiuc.edu> Author: matthijs Date: Fri May 23 06:45:18 2008 New Revision: 51480 URL: http://llvm.org/viewvc/llvm-project?rev=51480&view=rev Log: Restructure the testing documentation. I've tried to make the distinction between the DejaGNU tests and the test-suite more clear, added a small section about generating output from the test-suite, removed some duplication and fixed some wordings. Most of the changes are text movements, however. Modified: llvm/trunk/docs/TestingGuide.html Modified: llvm/trunk/docs/TestingGuide.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/TestingGuide.html?rev=51480&r1=51479&r2=51480&view=diff ============================================================================== --- llvm/trunk/docs/TestingGuide.html (original) +++ llvm/trunk/docs/TestingGuide.html Fri May 23 06:45:18 2008 @@ -14,20 +14,33 @@
    1. Overview
    2. Requirements
    3. -
    4. Quick Start
    5. LLVM Test Suite Organization
    6. -
    7. LLVM Test Suite Tree
    8. -
    9. DejaGNU Structure
    10. -
    11. llvm-test Structure
    12. -
    13. Running the LLVM Tests +
    14. Quick Start +
    15. +
    16. DejaGNU Structure + +
    17. +
    18. llvm-test Structure
    19. +
    20. Running the LLVM Tests + +
    21. Running the nightly tester
    @@ -101,19 +114,93 @@ + + + +
    + +

    The LLVM test suite contains two major categories of tests: code +fragments and whole programs. Code fragments are in the llvm module +under the llvm/test directory. The whole programs +test suite is in the llvm-test module under the main directory.

    + +
    + + + + + +
    + +

    Code fragments are small pieces of code that test a specific feature of LLVM +or trigger a specific bug in LLVM. They are usually written in LLVM assembly +language, but can be written in other languages if the test targets a particular +language front end. These tests are driven by the DejaGNU testing framework, +which is hidden behind a few simple makefiles.

    + +

    These code fragments are not complete programs. The code generated from them is +never executed to determine correct behavior.

    + +

    These code fragment tests are located in the llvm/test +directory.

    + +

    Typically when a bug is found in LLVM, a regression test containing +just enough code to reproduce the problem should be written and placed +somewhere underneath this directory. In most cases, this will be a small +piece of LLVM assembly language code, often distilled from an actual +application or benchmark.

    + +
    + + + + + +
    + +

    The llvm-test suite contains whole programs, which are pieces of +code which can be compiled and linked into a stand-alone program that can be +executed. These programs are generally written in high level languages such as +C or C++, but sometimes they are written straight in LLVM assembly.

    + +

    These programs are compiled and then executed using several different +methods (native compiler, LLVM C backend, LLVM JIT, LLVM native code generation, +etc). The output of these programs is compared to ensure that LLVM is compiling +the program correctly.

    + +

    In addition to compiling and executing programs, whole program tests serve as +a way of benchmarking LLVM performance, both in terms of the efficiency of the +programs generated as well as the speed with which LLVM compiles, optimizes, and +generates code.

    + +

    All "whole program" tests are located in the test-suite Subversion +module.

    + +
    + +
    -

    The tests are located in two separate Subversion modules. The basic feature - and regression tests are in the main "llvm" module under the directory - llvm/test. A more comprehensive test suite that includes whole +

    The tests are located in two separate Subversion modules. The code fragment + DejaGNU tests are in the main "llvm" module under the directory + llvm/test (so you get these tests for free with the main llvm tree). + The more comprehensive llvm-test suite that includes whole programs in C and C++ is in the test-suite module. This module should -be checked out to the llvm/projects directory as llvm-test (for -historical purpose). When you configure the llvm module, +be checked out to the llvm/projects directory as llvm-test (don't use +another name, for then the test suite will be run every time you run +make in the main llvm directory). +When you configure the llvm module, the llvm-test directory will be automatically configured. Alternatively, you can configure the test-suite module manually.

    + + + +

    To run all of the simple tests in LLVM using DejaGNU, use the master Makefile in the llvm/test directory:

    @@ -137,7 +224,7 @@
    -% gmake -C llvm/test TESTSUITE=Regression/Transforms
    +% gmake TESTSUITE=Transforms check
     
    @@ -145,8 +232,21 @@ must have run the complete testsuite before you can specify a subdirectory.

    +

    To run only a single test, set TESTONE to its path (relative to +llvm/test) and make the check-one target:

    + +
    +
    +% gmake TESTONE=Feature/basictest.ll check-one
    +
    +
    + + + + +

    To run the comprehensive test suite (tests that compile and execute whole -programs), run the llvm-test tests:

    +programs), first checkout and setup the test-suite module:

    @@ -154,88 +254,49 @@
     % svn co http://llvm.org/svn/llvm-project/test-suite/trunk llvm-test
     % cd ..
     % ./configure --with-llvmgccdir=$LLVM_GCC_DIR
    -% cd projects/llvm-test
    -% gmake
     

    where $LLVM_GCC_DIR is the directory where you installed llvm-gcc, not it's src or obj dir.

    -
    - - - - - -
    - -

    The LLVM test suite contains two major categories of tests: code -fragments and whole programs. Code fragments are in the llvm module -under the llvm/test directory. The whole programs -test suite is in the llvm-test module under the main directory.

    +

    Then, run the entire test suite by running make in the llvm-test +directory:

    +
    +
    +% cd projects/llvm-test
    +% gmake
    +
    - - - - -
    - -

    Code fragments are small pieces of code that test a specific feature of LLVM -or trigger a specific bug in LLVM. They are usually written in LLVM assembly -language, but can be written in other languages if the test targets a particular -language front end.

    - -

    Code fragments are not complete programs, and they are never executed to -determine correct behavior.

    - -

    These code fragment tests are located in the llvm/test/Features and -llvm/test/Regression directories.

    +

    Usually, running the "nightly" set of tests is a good idea, and you can also +let it generate a report by running:

    +
    +
    +% cd projects/llvm-test
    +% gmake TEST=nightly report report.html
    +
    - - - - -
    - -

    Whole Programs are pieces of code which can be compiled and linked into a -stand-alone program that can be executed. These programs are generally written -in high level languages such as C or C++, but sometimes they are written -straight in LLVM assembly.

    - -

    These programs are compiled and then executed using several different -methods (native compiler, LLVM C backend, LLVM JIT, LLVM native code generation, -etc). The output of these programs is compared to ensure that LLVM is compiling -the program correctly.

    - -

    In addition to compiling and executing programs, whole program tests serve as -a way of benchmarking LLVM performance, both in terms of the efficiency of the -programs generated as well as the speed with which LLVM compiles, optimizes, and -generates code.

    - -

    All "whole program" tests are located in the test-suite Subversion -module.

    +

    Any of the above commands can also be run in a subdirectory of +projects/llvm-test to run the specified test only on the programs in +that subdirectory.

    - + -
    +

    The LLVM DejaGNU tests are driven by DejaGNU together with GNU Make and are + located in the llvm/test directory. -

    Each type of test in the LLVM test suite has its own directory. The major -subtrees of the test suite directory tree are as follows:

    - -
      -
    • llvm/test

      This directory contains a large array of small tests that exercise various features of LLVM and to ensure that regressions do not occur. The directory is broken into several sub-directories, each focused on a particular area of LLVM. A few of the important ones are:

      +
      • Analysis: checks Analysis passes.
      • Archive: checks the Archive library.
      • @@ -248,55 +309,13 @@ transforms to ensure they make the right transformations.
      • Verifier: tests the IR verifier.
      -

      Typically when a bug is found in LLVM, a regression test containing - just enough code to reproduce the problem should be written and placed - somewhere underneath this directory. In most cases, this will be a small - piece of LLVM assembly language code, often distilled from an actual - application or benchmark.

    • - -
    • test-suite -

      The test-suite module contains programs that can be compiled -with LLVM and executed. These programs are compiled using the native compiler -and various LLVM backends. The output from the program compiled with the -native compiler is assumed correct; the results from the other programs are -compared to the native program output and pass if they match.

      - -

      In addition for testing correctness, the llvm-test directory also -performs timing tests of various LLVM optimizations. It also records -compilation times for the compilers and the JIT. This information can be -used to compare the effectiveness of LLVM's optimizations and code -generation.

    • - -
    • llvm-test/SingleSource -

      The SingleSource directory contains test programs that are only a single -source file in size. These are usually small benchmark programs or small -programs that calculate a particular value. Several such programs are grouped -together in each directory.

    • - -
    • llvm-test/MultiSource -

      The MultiSource directory contains subdirectories which contain entire -programs with multiple source files. Large benchmarks and whole applications -go here.

    • - -
    • llvm-test/External -

      The External directory contains Makefiles for building code that is external -to (i.e., not distributed with) LLVM. The most prominent members of this -directory are the SPEC 95 and SPEC 2000 benchmark suites. The presence and -location of these external programs is configured by the llvm-test -configure script.

    • - -
    - - - -
    -

    The LLVM test suite is partially driven by DejaGNU and partially driven by - GNU Make. Specifically, the Features and Regression tests are all driven by - DejaGNU. The llvm-test module is currently driven by a set of - Makefiles.

    + + + +

    The DejaGNU structure is very simple, but does require some information to be set. This information is gathered via configure and is written to a file, site.exp in llvm/test. The llvm/test @@ -305,7 +324,9 @@

    In order for DejaGNU to work, each directory of tests must have a dg.exp file. DejaGNU looks for this file to determine how to run the tests. This file is just a Tcl script and it can do anything you want, but - we've standardized it for the LLVM regression tests. It simply loads a Tcl + we've standardized it for the LLVM regression tests. If you're adding a + directory of tests, just copy dg.exp from another directory to get + running. The standard dg.exp simply loads a Tcl library (test/lib/llvm.exp) and calls the llvm_runtests function defined in that library with a list of file names to run. The names are obtained by using Tcl's glob command. Any directory that contains only @@ -334,7 +355,7 @@ line to be concatenated with the next one. In this way you can build up long pipelines of commands without making huge line lengths. The lines ending in \ are concatenated until a RUN line that doesn't end in \ is - found. This concatenated set or RUN lines then constitutes one execution. + found. This concatenated set of RUN lines then constitutes one execution. Tcl will substitute variables and arrange for the pipeline to be executed. If any process in the pipeline fails, the entire line (and test case) fails too.

    @@ -434,7 +455,8 @@
    - + +

    With a RUN line there are a number of substitutions that are permitted. In general, any Tcl variable that is available in the substitute @@ -543,9 +565,12 @@

    +

    To make RUN line writing easier, there are several shell scripts located - in the llvm/test/Scripts directory. For example:

    + in the llvm/test/Scripts directory. This directory is in the PATH + when running tests, so you can just call these scripts using their name. For + example:

    ignore
    This script runs its arguments and then always returns 0. This is useful @@ -585,7 +610,7 @@

    To make the output more useful, the llvm_runtest function wil scan the lines of the test case for ones that contain a pattern that matches PR[0-9]+. This is the syntax for specifying a PR (Problem Report) number that - is related to the test case. The numer after "PR" specifies the LLVM bugzilla + is related to the test case. The number after "PR" specifies the LLVM bugzilla number. When a PR number is specified, it will be used in the pass/fail reporting. This is useful to quickly get some context when a test fails.

    @@ -599,66 +624,75 @@
    -
    llvm-test +
    -

    As mentioned previously, the llvm-test module provides three types -of tests: MultiSource, SingleSource, and External. Each tree is then subdivided -into several categories, including applications, benchmarks, regression tests, -code that is strange grammatically, etc. These organizations should be -relatively self explanatory.

    +

    The test-suite module contains a number of programs that can be compiled +with LLVM and executed. These programs are compiled using the native compiler +and various LLVM backends. The output from the program compiled with the +native compiler is assumed correct; the results from the other programs are +compared to the native program output and pass if they match.

    -

    In addition to the regular "whole program" tests, the llvm-test -module also provides a mechanism for compiling the programs in different ways. -If the variable TEST is defined on the gmake command line, the test system will -include a Makefile named TEST.<value of TEST variable>.Makefile. -This Makefile can modify build rules to yield different results.

    +

    When executing tests, it is usually a good idea to start out with a subset of +the available tests or programs. This makes test run times smaller at first and +later on this is useful to investigate individual test failures. To run some +test only on a subset of programs, simply change directory to the programs you +want tested and run gmake there. Alternatively, you can run a different +test using the TEST variable to change what tests or run on the +selected programs (see below for more info).

    -

    For example, the LLVM nightly tester uses TEST.nightly.Makefile to -create the nightly test reports. To run the nightly tests, run gmake -TEST=nightly.

    +

    In addition for testing correctness, the llvm-test directory also +performs timing tests of various LLVM optimizations. It also records +compilation times for the compilers and the JIT. This information can be +used to compare the effectiveness of LLVM's optimizations and code +generation.

    -

    There are several TEST Makefiles available in the tree. Some of them are -designed for internal LLVM research and will not work outside of the LLVM -research group. They may still be valuable, however, as a guide to writing your -own TEST Makefile for any optimization or analysis passes that you develop with -LLVM.

    +

    llvm-test tests are divided into three types of tests: MultiSource, +SingleSource, and External.

    -

    Note, when configuring the llvm-test module, you might want to -specify the following configuration options:

    -
    -
    --enable-spec2000 -
    --enable-spec2000=<directory> -
    - Enable the use of SPEC2000 when testing LLVM. This is disabled by default - (unless configure finds SPEC2000 installed). By specifying - directory, you can tell configure where to find the SPEC2000 - benchmarks. If directory is left unspecified, configure - uses the default value - /home/vadve/shared/benchmarks/speccpu2000/benchspec. -

    +

      +
    • llvm-test/SingleSource +

      The SingleSource directory contains test programs that are only a single +source file in size. These are usually small benchmark programs or small +programs that calculate a particular value. Several such programs are grouped +together in each directory.

    • -
      --enable-spec95 -
      --enable-spec95=<directory> -
      - Enable the use of SPEC95 when testing LLVM. It is similar to the - --enable-spec2000 option. -

      +

    • llvm-test/MultiSource +

      The MultiSource directory contains subdirectories which contain entire +programs with multiple source files. Large benchmarks and whole applications +go here.

    • + +
    • llvm-test/External +

      The External directory contains Makefiles for building code that is external +to (i.e., not distributed with) LLVM. The most prominent members of this +directory are the SPEC 95 and SPEC 2000 benchmark suites. The External +directory does not contain these actual tests,but only the Makefiles that know +how to properly compile these programs from somewhere else. The presence and +location of these external programs is configured by the llvm-test +configure script.

    • +
    + +

    Each tree is then subdivided into several categories, including applications, +benchmarks, regression tests, code that is strange grammatically, etc. These +organizations should be relatively self explanatory.

    + +

    Some tests are known to fail. Some are bugs that we have not fixed yet; +others are features that we haven't added yet (or may never add). In DejaGNU, +the result for such tests will be XFAIL (eXpected FAILure). In this way, you +can tell the difference between an expected and unexpected failure.

    + +

    The tests in llvm-test have no such feature at this time. If the +test passes, only warnings and other miscellaneous output will be generated. If +a test fails, a large <program> FAILED message will be displayed. This +will help you separate benign warnings from actual test failures.

    -
    --enable-povray -
    --enable-povray=<directory> -
    - Enable the use of Povray as an external test. Versions of Povray written - in C should work. This option is similar to the --enable-spec2000 - option. -
    - +
    @@ -667,21 +701,6 @@ are not executed inside of the LLVM source tree. This is because the test suite creates temporary files during execution.

    -

    The master Makefile in llvm/test is capable of running only the -DejaGNU driven tests. By default, it will run all of these tests.

    - -

    To run only the DejaGNU driven tests, run gmake at the -command line in llvm/test. To run a specific directory of tests, use -the TESTSUITE variable. -

    - -

    For example, to run the Regression tests, type -gmake TESTSUITE=Regression in llvm/tests.

    - -

    Note that there are no Makefiles in llvm/test/Features and -llvm/test/Regression. You must use DejaGNU from the llvm/test -directory to run them.

    -

    To run the llvm-test suite, you need to use the following steps:

      @@ -717,40 +736,94 @@ have the suite checked out and configured, you don't need to do it again (unless the test code or configure script changes).

      -

      To make a specialized test (use one of the -llvm-test/TEST.<type>.Makefiles), just run:

      + + + -
      -
      -% cd llvm/projects/llvm-test
      -% gmake TEST=<type> test
      -
      -
      +
      +

      Note, when configuring the llvm-test module, you might want to +specify the following configuration options:

      +
      +
      --enable-spec2000 +
      --enable-spec2000=<directory> +
      + Enable the use of SPEC2000 when testing LLVM. This is disabled by default + (unless configure finds SPEC2000 installed). By specifying + directory, you can tell configure where to find the SPEC2000 + benchmarks. If directory is left unspecified, configure + uses the default value + /home/vadve/shared/benchmarks/speccpu2000/benchspec. +

      -

      For example, you could run the nightly tester tests using the following -commands:

      +
      --enable-spec95 +
      --enable-spec95=<directory> +
      + Enable the use of SPEC95 when testing LLVM. It is similar to the + --enable-spec2000 option. +

      -

      -
      -% cd llvm/projects/llvm-test
      -% gmake TEST=nightly test
      -
      +
      --enable-povray +
      --enable-povray=<directory> +
      + Enable the use of Povray as an external test. Versions of Povray written + in C should work. This option is similar to the --enable-spec2000 + option. +
      -

      Regardless of which test you're running, the results are printed on standard -output and standard error. You can redirect these results to a file if you -choose.

      + + + +
      +

      In addition to the regular "whole program" tests, the llvm-test +module also provides a mechanism for compiling the programs in different ways. +If the variable TEST is defined on the gmake command line, the test system will +include a Makefile named TEST.<value of TEST variable>.Makefile. +This Makefile can modify build rules to yield different results.

      -

      Some tests are known to fail. Some are bugs that we have not fixed yet; -others are features that we haven't added yet (or may never add). In DejaGNU, -the result for such tests will be XFAIL (eXpected FAILure). In this way, you -can tell the difference between an expected and unexpected failure.

      +

      For example, the LLVM nightly tester uses TEST.nightly.Makefile to +create the nightly test reports. To run the nightly tests, run gmake +TEST=nightly.

      -

      The tests in llvm-test have no such feature at this time. If the -test passes, only warnings and other miscellaneous output will be generated. If -a test fails, a large <program> FAILED message will be displayed. This -will help you separate benign warnings from actual test failures.

      +

      There are several TEST Makefiles available in the tree. Some of them are +designed for internal LLVM research and will not work outside of the LLVM +research group. They may still be valuable, however, as a guide to writing your +own TEST Makefile for any optimization or analysis passes that you develop with +LLVM.

      + +
      + + + +
      +

      There are a number of ways to run the tests and generate output. The most + simple one is simply running gmake with no arguments. This will + compile and run all programs in the tree using a number of different methods + and compare results. Any failures are reported in the output, but are likely + drowned in the other output. Passes are not reported explicitely.

      + +

      Somewhat better is running gmake TEST=sometest test, which runs + the specified test and usually adds per-program summaries to the output + (depending on which sometest you use). For example, the nightly test + explicitely outputs TEST-PASS or TEST-FAIL for every test after each program. + Though these lines are still drowned in the output, it's easy to grep the + output logs in the Output directories.

      + +

      Even better are the report and report.format targets + (where format is one of html, csv, text or + graphs). The exact contents of the report are dependent on which + TEST you are running, but the text results are always shown at the + end of the run and the results are always stored in the + report.<type>.format file (when running with + TEST=<type>). + + The report also generate a file called + report.<type>.raw.out containing the output of the entire test + run.

      @@ -834,7 +907,7 @@

      The LLVM Nightly Testers automatically check out an LLVM tree, build it, run the "nightly" -program test (described above), run all of the feature and regression tests, +program test (described above), run all of the DejaGNU tests, delete the checked out tree, and then submit the results to http://llvm.org/nightlytest/. After test results are submitted to From nicolas.geoffray at lip6.fr Fri May 23 10:39:42 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Fri, 23 May 2008 15:39:42 -0000 Subject: [llvm-commits] [vmkit] r51481 - in /vmkit/trunk/lib/JnJVM: Classpath/ClasspathConstructor.cpp Classpath/ClasspathMethod.cpp Classpath/ClasspathVMField.cpp VMCore/JavaClass.cpp VMCore/JavaClass.h VMCore/JavaJIT.cpp VMCore/JavaMetaJIT.cpp VMCore/JavaTypes.cpp VMCore/JavaTypes.h VMCore/JnjvmModule.cpp VMCore/NativeUtil.cpp Message-ID: <200805231539.m4NFdhWN005822@zion.cs.uiuc.edu> Author: geoffray Date: Fri May 23 10:39:41 2008 New Revision: 51481 URL: http://llvm.org/viewvc/llvm-project?rev=51481&view=rev Log: Lazily create method and field signatures. Inline some functions. Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp?rev=51481&r1=51480&r2=51481&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathConstructor.cpp Fri May 23 10:39:41 2008 @@ -56,7 +56,7 @@ JavaMethod* meth = (JavaMethod*)_meth; ArrayObject* args = (ArrayObject*)_args; sint32 nbArgs = args ? args->size : 0; - sint32 size = meth->signature->args.size(); + sint32 size = meth->getSignature()->args.size(); Jnjvm* vm = JavaThread::get()->isolate; void** buf = (void**)alloca(size * sizeof(uint64)); @@ -70,8 +70,8 @@ JavaObject* res = cl->doNew(vm); - for (std::vector::iterator i = meth->signature->args.begin(), - e = meth->signature->args.end(); i != e; ++i, ++index) { + for (std::vector::iterator i = meth->getSignature()->args.begin(), + e = meth->getSignature()->args.end(); i != e; ++i, ++index) { NativeUtil::decapsulePrimitive(vm, buf, args->at(index), *i); } Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp?rev=51481&r1=51480&r2=51481&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathMethod.cpp Fri May 23 10:39:41 2008 @@ -41,7 +41,7 @@ jobject Meth) { JavaMethod* meth = (JavaMethod*)Classpath::methodSlot->getVirtualInt32Field((JavaObject*)Meth); JavaObject* loader = meth->classDef->classLoader; - return (jclass)NativeUtil::getClassType(loader, meth->signature->ret); + return (jclass)NativeUtil::getClassType(loader, meth->getSignature()->ret); } @@ -65,7 +65,7 @@ JavaMethod* meth = (JavaMethod*)_meth; ArrayObject* args = (ArrayObject*)_args; sint32 nbArgs = args ? args->size : 0; - sint32 size = meth->signature->args.size(); + sint32 size = meth->getSignature()->args.size(); Jnjvm* vm = JavaThread::get()->isolate; JavaObject* obj = (JavaObject*)_obj; @@ -87,8 +87,8 @@ } - for (std::vector::iterator i = meth->signature->args.begin(), - e = meth->signature->args.end(); i != e; ++i, ++index) { + for (std::vector::iterator i = meth->getSignature()->args.begin(), + e = meth->getSignature()->args.end(); i != e; ++i, ++index) { NativeUtil::decapsulePrimitive(vm, buf, args->at(index), *i); } @@ -120,7 +120,7 @@ } \ JavaObject* res = 0; - const AssessorDesc* retType = meth->signature->ret->funcs; + const AssessorDesc* retType = meth->getSignature()->ret->funcs; if (retType == AssessorDesc::dVoid) { res = 0; uint32 val = 0; Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp?rev=51481&r1=51480&r2=51481&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMField.cpp Fri May 23 10:39:41 2008 @@ -35,7 +35,7 @@ jobject obj) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)obj); JavaObject* loader = field->classDef->classLoader; - CommonClass* cl = field->signature->assocClass(loader); + CommonClass* cl = field->getSignature()->assocClass(loader); return (jclass)cl->getClassDelegatee(); } @@ -45,7 +45,7 @@ #endif jobject Field, jobject obj) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); @@ -80,7 +80,7 @@ #endif jobject Field, jobject obj) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); @@ -118,7 +118,7 @@ #endif jobject Field, jobject obj) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); @@ -142,7 +142,7 @@ #endif jobject Field, jobject obj) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); @@ -184,7 +184,7 @@ #endif jobject Field, jobject obj) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); @@ -207,7 +207,7 @@ #endif jobject Field, jobject obj) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); @@ -231,7 +231,7 @@ #endif jobject Field, jobject obj) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); @@ -258,7 +258,7 @@ #endif jobject Field, jobject obj) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); @@ -304,7 +304,7 @@ #endif jobject Field, jobject _obj) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - Typedef* type = field->signature; + Typedef* type = field->getSignature(); const AssessorDesc* ass = type->funcs; JavaObject* obj = (JavaObject*)_obj; Jnjvm* vm = JavaThread::get()->isolate; @@ -398,9 +398,9 @@ JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); void** buf = (void**)alloca(sizeof(uint64)); void* _buf = (void*)buf; - NativeUtil::decapsulePrimitive(JavaThread::get()->isolate, buf, (JavaObject*)val, field->signature); + NativeUtil::decapsulePrimitive(JavaThread::get()->isolate, buf, (JavaObject*)val, field->getSignature()); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); @@ -454,7 +454,7 @@ #endif jobject Field, jobject obj, jboolean val) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); @@ -476,7 +476,7 @@ #endif jobject Field, jobject _obj, jbyte val) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; JavaObject* obj = (JavaObject*)_obj; if (isStatic(field->access)) @@ -518,7 +518,7 @@ #endif jobject Field, jobject obj, jchar val) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); @@ -555,7 +555,7 @@ #endif jobject Field, jobject obj, jshort val) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); @@ -592,7 +592,7 @@ #endif jobject Field, jobject obj, jint val) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); @@ -625,7 +625,7 @@ #endif jobject Field, jobject obj, jlong val) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); @@ -654,7 +654,7 @@ #endif jobject Field, jobject obj, jfloat val) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); @@ -679,7 +679,7 @@ #endif jobject Field, jobject obj, jdouble val) { JavaField* field = (JavaField*)Classpath::fieldSlot->getVirtualInt32Field((JavaObject*)Field); - const AssessorDesc* ass = field->signature->funcs; + const AssessorDesc* ass = field->getSignature()->funcs; if (isStatic(field->access)) JavaThread::get()->isolate->initialiseClass(field->classDef); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp?rev=51481&r1=51480&r2=51481&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp Fri May 23 10:39:41 2008 @@ -279,7 +279,7 @@ const char* JavaMethod::printString() const { mvm::PrintBuffer *buf= mvm::PrintBuffer::alloc(); buf->write("JavaMethod<"); - signature->printWithSign(classDef, name, buf); + ((JavaMethod*)this)->getSignature()->printWithSign(classDef, name, buf); buf->write(">"); return buf->contents()->cString(); } @@ -291,7 +291,7 @@ buf->write("static "); else buf->write("virtual "); - signature->tPrintBuf(buf); + ((JavaMethod*)this)->getSignature()->tPrintBuf(buf); buf->write(" "); classDef->print(buf); buf->write("::"); @@ -479,7 +479,7 @@ } void JavaField::initField(JavaObject* obj) { - const AssessorDesc* funcs = signature->funcs; + const AssessorDesc* funcs = getSignature()->funcs; Attribut* attribut = lookupAttribut(Attribut::constantAttribut); if (!attribut) { @@ -579,7 +579,7 @@ method->name = name; method->type = type; method->classDef = (Class*)this; - method->signature = (Signdef*)isolate->constructType(type); + method->_signature = 0; method->code = 0; method->access = access; method->canBeInlined = false; @@ -602,7 +602,7 @@ field->name = name; field->type = type; field->classDef = (Class*)this; - field->signature = isolate->constructType(type); + field->_signature = 0; field->ptrOffset = 0; field->access = access; map.insert(std::make_pair(CC, field)); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h?rev=51481&r1=51480&r2=51481&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.h Fri May 23 10:39:41 2008 @@ -22,6 +22,7 @@ #include "mvm/Threads/Locks.h" #include "JavaAccess.h" +#include "Jnjvm.h" namespace jnjvm { @@ -156,12 +157,10 @@ #endif - typedef std::map, - gc_allocator > >::iterator + typedef std::map >::iterator field_iterator; - typedef std::map, - gc_allocator > > + typedef std::map > field_map; /// virtualFields - List of all the virtual fields defined in this class. @@ -172,12 +171,10 @@ /// field_map staticFields; - typedef std::map, - gc_allocator > >::iterator + typedef std::map >::iterator method_iterator; - typedef std::map, - gc_allocator > > + typedef std::map > method_map; /// virtualMethods - List of all the virtual methods defined by this class. @@ -357,12 +354,13 @@ class JavaMethod { + friend class CommonClass; private: void* _compiledPtr(); + Signdef* _signature; public: ~JavaMethod(); unsigned int access; - Signdef* signature; std::vector attributs; std::vector caches; Class* classDef; @@ -381,6 +379,12 @@ if (!code) return _compiledPtr(); return code; } + + Signdef* getSignature() { + if(!_signature) + _signature = (Signdef*) classDef->isolate->constructType(type); + return _signature; + } uint32 invokeIntSpecialAP(Jnjvm* vm, JavaObject* obj, va_list ap); float invokeFloatSpecialAP(Jnjvm* vm, JavaObject* obj, va_list ap); @@ -440,11 +444,13 @@ }; class JavaField { + friend class CommonClass; +private: + Typedef* _signature; public: ~JavaField(); unsigned int access; const UTF8* name; - Typedef* signature; const UTF8* type; std::vector attributs; Class* classDef; @@ -452,6 +458,12 @@ /// num - The index of the field in the field list. /// uint32 num; + + Typedef* getSignature() { + if(!_signature) + _signature = classDef->isolate->constructType(type); + return _signature; + } void initField(JavaObject* obj); Attribut* lookupAttribut(const UTF8* key); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp?rev=51481&r1=51480&r2=51481&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaJIT.cpp Fri May 23 10:39:41 2008 @@ -69,7 +69,7 @@ LLVMSignatureInfo* LSI = module->getSignatureInfo(signature); const llvm::FunctionType* virtualType = LSI->getVirtualType(); FunctionType::param_iterator it = virtualType->param_end(); - makeArgs(it, index, args, signature->nbIn + 1); + makeArgs(it, index, args, signature->args.size() + 1); JITVerifyNull(args[0]); @@ -206,8 +206,8 @@ currentBlock); llvm::BranchInst::Create(executeBlock, endBlock, test, currentBlock); - if (compilingMethod->signature->ret->funcs != AssessorDesc::dVoid) { - uint8 id = compilingMethod->signature->ret->funcs->numId; + if (compilingMethod->getSignature()->ret->funcs != AssessorDesc::dVoid) { + uint8 id = compilingMethod->getSignature()->ret->funcs->numId; LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; Constant* C = LAI.llvmNullConstant; endNode->addIncoming(C, currentBlock); @@ -243,7 +243,7 @@ LLVMSignatureInfo* LSI = - module->getSignatureInfo(compilingMethod->signature); + module->getSignatureInfo(compilingMethod->getSignature()); const llvm::Type* valPtrType = LSI->getNativePtrType(); Value* valPtr = ConstantExpr::getIntToPtr(ConstantInt::get(Type::Int64Ty, (uint64)natPtr), @@ -373,7 +373,7 @@ uint32 max = args.size(); #endif std::vector::iterator type = - compilingMethod->signature->args.begin(); + compilingMethod->getSignature()->args.begin(); std::vector::iterator i = args.begin(); if (isVirtual(compilingMethod->access)) { @@ -539,7 +539,7 @@ #endif Function::arg_iterator i = func->arg_begin(); std::vector::iterator type = - compilingMethod->signature->args.begin(); + compilingMethod->getSignature()->args.begin(); if (isVirtual(compilingMethod->access)) { new StoreInst(i, objectLocals[0], false, currentBlock); @@ -1362,7 +1362,7 @@ std::vector args; FunctionType::param_iterator it = virtualType->param_end(); - makeArgs(it, index, args, signature->nbIn + 1); + makeArgs(it, index, args, signature->args.size() + 1); JITVerifyNull(args[0]); if (cl == Jnjvm::mathName) { @@ -1407,7 +1407,7 @@ std::vector args; // size = [signature->nbIn + 2]; FunctionType::param_iterator it = staticType->param_end(); - makeArgs(it, index, args, signature->nbIn); + makeArgs(it, index, args, signature->args.size()); ctpInfo->markAsStaticCall(index); if (cl == Jnjvm::mathName) { @@ -1833,7 +1833,7 @@ std::vector args; // size = [signature->nbIn + 3]; FunctionType::param_iterator it = virtualType->param_end(); - makeArgs(it, index, args, signature->nbIn + 1); + makeArgs(it, index, args, signature->args.size() + 1); const llvm::Type* retType = virtualType->getReturnType(); BasicBlock* endBlock = createBasicBlock("end virtual invoke"); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp?rev=51481&r1=51480&r2=51481&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaMetaJIT.cpp Fri May 23 10:39:41 2008 @@ -100,13 +100,12 @@ classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); \ \ verifyNull(obj); \ - JavaMethod* meth = obj->classOf->lookupMethod(name, type, false, true); \ - \ - void** buf = (void**)alloca(meth->signature->args.size() * sizeof(uint64)); \ + Signdef* sign = getSignature(); \ + void** buf = (void**)alloca(sign->args.size() * sizeof(uint64)); \ void* _buf = (void*)buf; \ - readArgs(buf, signature, ap); \ - void* func = meth->compiledPtr();\ - return ((FUNC_TYPE_VIRTUAL_BUF)signature->virtualCallBuf())(vm, func, obj, _buf);\ + readArgs(buf, sign, ap); \ + void* func = (((void***)obj)[0])[offset];\ + return ((FUNC_TYPE_VIRTUAL_BUF)sign->getVirtualCallBuf())(vm, func, obj, _buf);\ }\ \ TYPE JavaMethod::invoke##TYPE_NAME##SpecialAP(Jnjvm* vm, JavaObject* obj, va_list ap) {\ @@ -114,22 +113,24 @@ classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true);\ \ verifyNull(obj);\ - void** buf = (void**)alloca(this->signature->args.size() * sizeof(uint64)); \ + Signdef* sign = getSignature(); \ + void** buf = (void**)alloca(sign->args.size() * sizeof(uint64)); \ void* _buf = (void*)buf; \ - readArgs(buf, signature, ap); \ + readArgs(buf, sign, ap); \ void* func = this->compiledPtr();\ - return ((FUNC_TYPE_VIRTUAL_BUF)signature->virtualCallBuf())(vm, func, obj, _buf);\ + return ((FUNC_TYPE_VIRTUAL_BUF)sign->getVirtualCallBuf())(vm, func, obj, _buf);\ }\ \ TYPE JavaMethod::invoke##TYPE_NAME##StaticAP(Jnjvm* vm, va_list ap) {\ if (!classDef->isReady())\ classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true);\ \ - void** buf = (void**)alloca(this->signature->args.size() * sizeof(uint64)); \ + Signdef* sign = getSignature(); \ + void** buf = (void**)alloca(sign->args.size() * sizeof(uint64)); \ void* _buf = (void*)buf; \ - readArgs(buf, signature, ap); \ + readArgs(buf, sign, ap); \ void* func = this->compiledPtr();\ - return ((FUNC_TYPE_STATIC_BUF)signature->staticCallBuf())(vm, func, _buf);\ + return ((FUNC_TYPE_STATIC_BUF)sign->getStaticCallBuf())(vm, func, _buf);\ }\ \ TYPE JavaMethod::invoke##TYPE_NAME##VirtualBuf(Jnjvm* vm, JavaObject* obj, void* buf) {\ @@ -139,8 +140,9 @@ verifyNull(obj);\ JavaMethod* meth = obj->classOf->lookupMethod(name, type, false, true);\ \ + Signdef* sign = getSignature(); \ void* func = meth->compiledPtr();\ - return ((FUNC_TYPE_VIRTUAL_BUF)signature->virtualCallBuf())(vm, func, obj, buf);\ + return ((FUNC_TYPE_VIRTUAL_BUF)sign->getVirtualCallBuf())(vm, func, obj, buf);\ }\ \ TYPE JavaMethod::invoke##TYPE_NAME##SpecialBuf(Jnjvm* vm, JavaObject* obj, void* buf) {\ @@ -149,7 +151,8 @@ \ verifyNull(obj);\ void* func = this->compiledPtr();\ - return ((FUNC_TYPE_VIRTUAL_BUF)signature->virtualCallBuf())(vm, func, obj, buf);\ + Signdef* sign = getSignature(); \ + return ((FUNC_TYPE_VIRTUAL_BUF)sign->getVirtualCallBuf())(vm, func, obj, buf);\ }\ \ TYPE JavaMethod::invoke##TYPE_NAME##StaticBuf(Jnjvm* vm, void* buf) {\ @@ -157,7 +160,8 @@ classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true);\ \ void* func = this->compiledPtr();\ - return ((FUNC_TYPE_STATIC_BUF)signature->staticCallBuf())(vm, func, buf);\ + Signdef* sign = getSignature(); \ + return ((FUNC_TYPE_STATIC_BUF)sign->getStaticCallBuf())(vm, func, buf);\ }\ \ TYPE JavaMethod::invoke##TYPE_NAME##Virtual(Jnjvm* vm, JavaObject* obj, ...) { \ @@ -193,10 +197,9 @@ classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true); \ \ verifyNull(obj); \ - JavaMethod* meth = obj->classOf->lookupMethod(name, type, false, true); \ - \ - void* func = (((void***)obj)[0])[meth->offset];\ - return ((FUNC_TYPE_VIRTUAL_AP)signature->virtualCallAP())(vm, func, obj, ap);\ + void* func = (((void***)obj)[0])[offset];\ + Signdef* sign = getSignature(); \ + return ((FUNC_TYPE_VIRTUAL_AP)sign->getVirtualCallAP())(vm, func, obj, ap);\ }\ \ TYPE JavaMethod::invoke##TYPE_NAME##SpecialAP(Jnjvm* vm, JavaObject* obj, va_list ap) {\ @@ -205,7 +208,8 @@ \ verifyNull(obj);\ void* func = this->compiledPtr();\ - return ((FUNC_TYPE_VIRTUAL_AP)signature->virtualCallAP())(vm, func, obj, ap);\ + Signdef* sign = getSignature(); \ + return ((FUNC_TYPE_VIRTUAL_AP)sign->getVirtualCallAP())(vm, func, obj, ap);\ }\ \ TYPE JavaMethod::invoke##TYPE_NAME##StaticAP(Jnjvm* vm, va_list ap) {\ @@ -213,7 +217,8 @@ classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true);\ \ void* func = this->compiledPtr();\ - return ((FUNC_TYPE_STATIC_AP)signature->staticCallAP())(vm, func, ap);\ + Signdef* sign = getSignature(); \ + return ((FUNC_TYPE_STATIC_AP)sign->getStaticCallAP())(vm, func, ap);\ }\ \ TYPE JavaMethod::invoke##TYPE_NAME##VirtualBuf(Jnjvm* vm, JavaObject* obj, void* buf) {\ @@ -221,10 +226,9 @@ classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true);\ \ verifyNull(obj);\ - JavaMethod* meth = obj->classOf->lookupMethod(name, type, false, true);\ - \ - void* func = meth->compiledPtr();\ - return ((FUNC_TYPE_VIRTUAL_BUF)signature->virtualCallBuf())(vm, func, obj, buf);\ + void* func = (((void***)obj)[0])[offset];\ + Signdef* sign = getSignature(); \ + return ((FUNC_TYPE_VIRTUAL_BUF)sign->getVirtualCallBuf())(vm, func, obj, buf);\ }\ \ TYPE JavaMethod::invoke##TYPE_NAME##SpecialBuf(Jnjvm* vm, JavaObject* obj, void* buf) {\ @@ -233,7 +237,8 @@ \ verifyNull(obj);\ void* func = this->compiledPtr();\ - return ((FUNC_TYPE_VIRTUAL_BUF)signature->virtualCallBuf())(vm, func, obj, buf);\ + Signdef* sign = getSignature(); \ + return ((FUNC_TYPE_VIRTUAL_BUF)sign->getVirtualCallBuf())(vm, func, obj, buf);\ }\ \ TYPE JavaMethod::invoke##TYPE_NAME##StaticBuf(Jnjvm* vm, void* buf) {\ @@ -241,7 +246,8 @@ classDef->isolate->loadName(classDef->name, classDef->classLoader, true, true, true);\ \ void* func = this->compiledPtr();\ - return ((FUNC_TYPE_STATIC_BUF)signature->staticCallBuf())(vm, func, buf);\ + Signdef* sign = getSignature(); \ + return ((FUNC_TYPE_STATIC_BUF)sign->getStaticCallBuf())(vm, func, buf);\ }\ \ TYPE JavaMethod::invoke##TYPE_NAME##Virtual(Jnjvm* vm,JavaObject* obj, ...) { \ Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp?rev=51481&r1=51480&r2=51481&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp Fri May 23 10:39:41 2008 @@ -471,10 +471,6 @@ humanPrintArgs(&args, buf); } -unsigned int Signdef::nbInWithThis(unsigned int flag) { - return args.size() + (isStatic(flag) ? 0 : 1); -} - Signdef* Signdef::signDup(const UTF8* name, Jnjvm *vm) { std::vector buf; uint32 len = (uint32)name->size; @@ -508,7 +504,6 @@ res->keyName = name; res->pseudoAssocClassName = name; res->funcs = 0; - res->nbIn = buf.size(); res->_virtualCallBuf = 0; res->_staticCallBuf = 0; res->_virtualCallAP = 0; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h?rev=51481&r1=51480&r2=51481&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h Fri May 23 10:39:41 2008 @@ -143,30 +143,69 @@ }; class Signdef : public Typedef { -public: - static VirtualTable *VT; - std::vector args; - Typedef* ret; +private: mvm::Code* _staticCallBuf; mvm::Code* _virtualCallBuf; mvm::Code* _staticCallAP; mvm::Code* _virtualCallAP; - uint32 nbIn; + + void* staticCallBuf(); + void* virtualCallBuf(); + void* staticCallAP(); + void* virtualCallAP(); + +public: + static VirtualTable *VT; + std::vector args; + Typedef* ret; virtual void print(mvm::PrintBuffer* buf) const; virtual void TRACER; void printWithSign(CommonClass* cl, const UTF8* name, mvm::PrintBuffer* buf); - unsigned int nbInWithThis(unsigned int flag); static Signdef* signDup(const UTF8* name, Jnjvm* vm); - void* staticCallBuf(); - void* virtualCallBuf(); - void* staticCallAP(); - void* virtualCallAP(); + + void* getStaticCallBuf() { + if(!_staticCallBuf) return staticCallBuf(); + return _staticCallBuf; + } + + void* getVirtualCallBuf() { + if(!_virtualCallBuf) return virtualCallBuf(); + return _virtualCallBuf; + } + + void* getStaticCallAP() { + if (!_staticCallAP) return staticCallAP(); + return _staticCallAP; + } + void* getVirtualCallAP() { + if (!_virtualCallAP) return virtualCallAP(); + return _virtualCallAP; + } + + void setStaticCallBuf(mvm::Code* code) { + _staticCallBuf = code; + } + + void setVirtualCallBuf(mvm::Code* code) { + _virtualCallBuf = code; + } + + void setStaticCallAP(mvm::Code* code) { + _staticCallAP = code; + } + + void setVirtualCallAP(mvm::Code* code) { + _virtualCallAP = code; + } + + }; + } // end namespace jnjvm #endif Modified: vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp?rev=51481&r1=51480&r2=51481&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JnjvmModule.cpp Fri May 23 10:39:41 2008 @@ -270,7 +270,7 @@ for (CommonClass::field_iterator i = fields.begin(), e = fields.end(); i!= e; ++i) { - if (i->second->signature->funcs->doTrace) { + if (i->second->getSignature()->funcs->doTrace) { LLVMFieldInfo* LFI = getFieldInfo(i->second); std::vector args; //size = 2 args.push_back(zero); @@ -330,7 +330,7 @@ for (uint32 index = 0; index < classDef->virtualFields.size(); ++index) { - uint8 id = array[index]->signature->funcs->numId; + uint8 id = array[index]->getSignature()->funcs->numId; LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; fields.push_back(LAI.llvmType); } @@ -374,7 +374,7 @@ for (uint32 index = 0; index < classDef->staticFields.size(); ++index) { JavaField* field = array[index]; - uint8 id = field->signature->funcs->numId; + uint8 id = field->getSignature()->funcs->numId; LLVMAssessorInfo& LAI = LLVMAssessorInfo::AssessorInfo[id]; fields.push_back(LAI.llvmType); } @@ -493,7 +493,7 @@ const FunctionType* LLVMMethodInfo::getFunctionType() { if (!functionType) { - LLVMSignatureInfo* LSI = module->getSignatureInfo(methodDef->signature); + LLVMSignatureInfo* LSI = module->getSignatureInfo(methodDef->getSignature()); assert(LSI); if (isStatic(methodDef->access)) { functionType = LSI->getStaticType(); @@ -763,8 +763,8 @@ // Lock here because we are called by arbitrary code llvm::MutexGuard locked(mvm::jit::executionEngine->lock); virtualBufFunction = createFunctionCallBuf(true); - signature->_virtualCallBuf = (mvm::Code*) - mvm::jit::executionEngine->getPointerToGlobal(virtualBufFunction); + signature->setVirtualCallBuf((mvm::Code*) + mvm::jit::executionEngine->getPointerToGlobal(virtualBufFunction)); } return virtualBufFunction; } @@ -774,8 +774,8 @@ // Lock here because we are called by arbitrary code llvm::MutexGuard locked(mvm::jit::executionEngine->lock); virtualAPFunction = createFunctionCallAP(true); - signature->_virtualCallAP = (mvm::Code*) - mvm::jit::executionEngine->getPointerToGlobal(virtualAPFunction); + signature->setVirtualCallAP((mvm::Code*) + mvm::jit::executionEngine->getPointerToGlobal(virtualAPFunction)); } return virtualAPFunction; } @@ -785,8 +785,8 @@ // Lock here because we are called by arbitrary code llvm::MutexGuard locked(mvm::jit::executionEngine->lock); staticBufFunction = createFunctionCallBuf(false); - signature->_staticCallBuf = (mvm::Code*) - mvm::jit::executionEngine->getPointerToGlobal(staticBufFunction); + signature->setStaticCallBuf((mvm::Code*) + mvm::jit::executionEngine->getPointerToGlobal(staticBufFunction)); } return staticBufFunction; } @@ -796,8 +796,8 @@ // Lock here because we are called by arbitrary code llvm::MutexGuard locked(mvm::jit::executionEngine->lock); staticAPFunction = createFunctionCallAP(false); - signature->_staticCallAP = (mvm::Code*) - mvm::jit::executionEngine->getPointerToGlobal(staticAPFunction); + signature->setStaticCallAP((mvm::Code*) + mvm::jit::executionEngine->getPointerToGlobal(staticAPFunction)); } return staticAPFunction; } @@ -1051,7 +1051,7 @@ void JnjvmModule::InitField(JavaField* field, JavaObject* obj, uint64 val) { - const AssessorDesc* funcs = field->signature->funcs; + const AssessorDesc* funcs = field->getSignature()->funcs; if (funcs == AssessorDesc::dLong) { ((sint64*)((uint64)obj + field->ptrOffset))[0] = val; } else if (funcs == AssessorDesc::dInt) { Modified: vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp?rev=51481&r1=51480&r2=51481&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp Fri May 23 10:39:41 2008 @@ -381,7 +381,7 @@ } ArrayObject* NativeUtil::getParameterTypes(JavaObject* loader, JavaMethod* meth) { - std::vector& args = meth->signature->args; + std::vector& args = meth->getSignature()->args; ArrayObject* res = ArrayObject::acons(args.size(), Classpath::classArrayClass, JavaThread::get()->isolate); From matthijs at stdin.nl Fri May 23 11:17:48 2008 From: matthijs at stdin.nl (Matthijs Kooijman) Date: Fri, 23 May 2008 16:17:48 -0000 Subject: [llvm-commits] [llvm] r51482 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200805231617.m4NGHmRY006992@zion.cs.uiuc.edu> Author: matthijs Date: Fri May 23 11:17:48 2008 New Revision: 51482 URL: http://llvm.org/viewvc/llvm-project?rev=51482&view=rev Log: Replace some weird usage of UserOp1 introduced in r49492 by a plain if. Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51482&r1=51481&r2=51482&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Fri May 23 11:17:48 2008 @@ -1096,7 +1096,9 @@ Value *L = P->getIncomingValue(i); Value *R = P->getIncomingValue(!i); User *LU = dyn_cast(L); - unsigned Opcode = LU ? getOpcode(LU) : (unsigned)Instruction::UserOp1; + if (!LU) + continue; + unsigned Opcode = getOpcode(LU); // Check for operations that have the property that if // both their operands have low zero bits, the result // will have low zero bits. From gohman at apple.com Fri May 23 11:57:00 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 16:57:00 -0000 Subject: [llvm-commits] [llvm] r51483 - /llvm/trunk/lib/Target/CBackend/CBackend.cpp Message-ID: <200805231657.m4NGv0rI008246@zion.cs.uiuc.edu> Author: djg Date: Fri May 23 11:57:00 2008 New Revision: 51483 URL: http://llvm.org/viewvc/llvm-project?rev=51483&view=rev Log: Fix another isFirstClassType that now needs to be isSingleValueType. This fixes recent CBE regressions. Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=51483&r1=51482&r2=51483&view=diff ============================================================================== --- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original) +++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Fri May 23 11:57:00 2008 @@ -913,7 +913,7 @@ << *CE << "\n"; abort(); } - } else if (isa(CPV) && CPV->getType()->isFirstClassType()) { + } else if (isa(CPV) && CPV->getType()->isSingleValueType()) { Out << "(("; printType(Out, CPV->getType()); // sign doesn't matter Out << ")/*UNDEF*/"; From gohman at apple.com Fri May 23 12:11:55 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 17:11:55 -0000 Subject: [llvm-commits] [llvm] r51484 - /llvm/trunk/utils/llvm.grm Message-ID: <200805231711.m4NHBtk4008700@zion.cs.uiuc.edu> Author: djg Date: Fri May 23 12:11:55 2008 New Revision: 51484 URL: http://llvm.org/viewvc/llvm-project?rev=51484&view=rev Log: Fix the spelling of the va_arg keyword. Modified: llvm/trunk/utils/llvm.grm Modified: llvm/trunk/utils/llvm.grm URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm.grm?rev=51484&r1=51483&r2=51484&view=diff ============================================================================== --- llvm/trunk/utils/llvm.grm (original) +++ llvm/trunk/utils/llvm.grm Fri May 23 12:11:55 2008 @@ -356,7 +356,7 @@ | vfcmp FPredicates Types ValueRef ^ "," ValueRef | CastOps ResolvedVal to Types | select ResolvedVal ^ "," ResolvedVal ^ "," ResolvedVal - | vaarg ResolvedVal ^ "," Types + | "va_arg" ResolvedVal ^ "," Types | extractelement ResolvedVal ^ "," ResolvedVal | insertelement ResolvedVal ^ "," ResolvedVal ^ "," ResolvedVal | shufflevector ResolvedVal ^ "," ResolvedVal ^ "," ResolvedVal From dalej at apple.com Fri May 23 12:19:02 2008 From: dalej at apple.com (Dale Johannesen) Date: Fri, 23 May 2008 17:19:02 -0000 Subject: [llvm-commits] [llvm] r51485 - /llvm/trunk/lib/CodeGen/BranchFolding.cpp Message-ID: <200805231719.m4NHJ2eR008897@zion.cs.uiuc.edu> Author: johannes Date: Fri May 23 12:19:02 2008 New Revision: 51485 URL: http://llvm.org/viewvc/llvm-project?rev=51485&view=rev Log: Rewrite a loop to avoid using iterators pointing to elements that have been erased. Based on a patch by Nicolas Capens. Modified: llvm/trunk/lib/CodeGen/BranchFolding.cpp Modified: llvm/trunk/lib/CodeGen/BranchFolding.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/BranchFolding.cpp?rev=51485&r1=51484&r2=51485&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/BranchFolding.cpp (original) +++ llvm/trunk/lib/CodeGen/BranchFolding.cpp Fri May 23 12:19:02 2008 @@ -529,18 +529,20 @@ void BranchFolder::RemoveBlocksWithHash(unsigned CurHash, MachineBasicBlock* SuccBB, MachineBasicBlock* PredBB) { - for (MPIterator CurMPIter = prior(MergePotentials.end()), - B = MergePotentials.begin(); + MPIterator CurMPIter, B; + for (CurMPIter = prior(MergePotentials.end()), B = MergePotentials.begin(); CurMPIter->first==CurHash; --CurMPIter) { // Put the unconditional branch back, if we need one. MachineBasicBlock *CurMBB = CurMPIter->second; if (SuccBB && CurMBB != PredBB) FixTail(CurMBB, SuccBB, TII); - MergePotentials.erase(CurMPIter); - if (CurMPIter==B) + if (CurMPIter==B) break; } + if (CurMPIter->first!=CurHash) + CurMPIter++; + MergePotentials.erase(CurMPIter, MergePotentials.end()); } /// CreateCommonTailOnlyBlock - None of the blocks to be tail-merged consist From evan.cheng at apple.com Fri May 23 12:28:11 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 23 May 2008 17:28:11 -0000 Subject: [llvm-commits] [llvm] r51487 - /llvm/trunk/lib/Target/X86/README-SSE.txt Message-ID: <200805231728.m4NHSB9N009180@zion.cs.uiuc.edu> Author: evancheng Date: Fri May 23 12:28:11 2008 New Revision: 51487 URL: http://llvm.org/viewvc/llvm-project?rev=51487&view=rev Log: New entry. Modified: llvm/trunk/lib/Target/X86/README-SSE.txt Modified: llvm/trunk/lib/Target/X86/README-SSE.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README-SSE.txt?rev=51487&r1=51486&r2=51487&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/README-SSE.txt (original) +++ llvm/trunk/lib/Target/X86/README-SSE.txt Fri May 23 12:28:11 2008 @@ -845,3 +845,47 @@ movaps %xmm1, %xmm0 punpckldq %xmm2, %xmm0 ret + +//===---------------------------------------------------------------------===// + +We compile this: + +__m128i +foo2 (char x) +{ + return _mm_set_epi8 (1, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 1, 0, 0, 0, 0); +} + +into: + movl $1, %eax + xorps %xmm0, %xmm0 + pinsrw $2, %eax, %xmm0 + movzbl 4(%esp), %eax + pinsrw $3, %eax, %xmm0 + movl $256, %eax + pinsrw $7, %eax, %xmm0 + ret + + +gcc-4.2: + subl $12, %esp + movzbl 16(%esp), %eax + movdqa LC0, %xmm0 + pinsrw $3, %eax, %xmm0 + addl $12, %esp + ret + .const + .align 4 +LC0: + .word 0 + .word 0 + .word 1 + .word 0 + .word 0 + .word 0 + .word 0 + .word 256 + +With SSE4, it should be + movdqa .LC0(%rip), %xmm0 + pinsrb $6, %edi, %xmm0 From gohman at apple.com Fri May 23 12:45:48 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 17:45:48 -0000 Subject: [llvm-commits] [vmkit] r51488 - in /vmkit/trunk/lib/N3/VMCore: CLIJit.cpp Opcodes.cpp VMClass.cpp Message-ID: <200805231745.m4NHjmrh009717@zion.cs.uiuc.edu> Author: djg Date: Fri May 23 12:45:47 2008 New Revision: 51488 URL: http://llvm.org/viewvc/llvm-project?rev=51488&view=rev Log: Change uses of llvm::Type::isFirstClassType to use the new llvm::Type::isSingleValueType. The isFirstClassType function has recently changed to return true for struct and array types. vmkit may some day want to use of isFirstClassType for some of these some day as an optimization, but it'll require some consideration. Modified: vmkit/trunk/lib/N3/VMCore/CLIJit.cpp vmkit/trunk/lib/N3/VMCore/Opcodes.cpp vmkit/trunk/lib/N3/VMCore/VMClass.cpp Modified: vmkit/trunk/lib/N3/VMCore/CLIJit.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/CLIJit.cpp?rev=51488&r1=51487&r2=51488&view=diff ============================================================================== --- vmkit/trunk/lib/N3/VMCore/CLIJit.cpp (original) +++ vmkit/trunk/lib/N3/VMCore/CLIJit.cpp Fri May 23 12:45:47 2008 @@ -1190,7 +1190,7 @@ VMCommonClass* cl = *i; cl->resolveType(false, false); AllocaInst* alloc = new AllocaInst(cl->naturalType, "", currentBlock); - if (cl->naturalType->isFirstClassType()) { + if (cl->naturalType->isSingleValueType()) { new StoreInst(Constant::getNullValue(cl->naturalType), alloc, false, currentBlock); } else { @@ -1362,7 +1362,7 @@ VMCommonClass* cl = *i; cl->resolveType(false, false); AllocaInst* alloc = new AllocaInst(cl->naturalType, "", currentBlock); - if (cl->naturalType->isFirstClassType()) { + if (cl->naturalType->isSingleValueType()) { new StoreInst(Constant::getNullValue(cl->naturalType), alloc, false, currentBlock); } else { Modified: vmkit/trunk/lib/N3/VMCore/Opcodes.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/Opcodes.cpp?rev=51488&r1=51487&r2=51488&view=diff ============================================================================== --- vmkit/trunk/lib/N3/VMCore/Opcodes.cpp (original) +++ vmkit/trunk/lib/N3/VMCore/Opcodes.cpp Fri May 23 12:45:47 2008 @@ -175,7 +175,7 @@ static void store(Value* val, Value* local, bool vol, BasicBlock* currentBlock) { const Type* contained = local->getType()->getContainedType(0); - if (contained->isFirstClassType()) { + if (contained->isSingleValueType()) { if (val->getType() != contained) { convertValue(val, contained, currentBlock); } @@ -194,7 +194,7 @@ static Value* load(Value* val, const char* name, BasicBlock* currentBlock) { const Type* contained = val->getType()->getContainedType(0); - if (contained->isFirstClassType()) { + if (contained->isSingleValueType()) { return new LoadInst(val, name, currentBlock); } else { uint64 size = mvm::jit::getTypeSize(contained); Modified: vmkit/trunk/lib/N3/VMCore/VMClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/VMClass.cpp?rev=51488&r1=51487&r2=51488&view=diff ============================================================================== --- vmkit/trunk/lib/N3/VMCore/VMClass.cpp (original) +++ vmkit/trunk/lib/N3/VMCore/VMClass.cpp Fri May 23 12:45:47 2008 @@ -634,7 +634,7 @@ const llvm::StructType* STy = llvm::dyn_cast(arg); for (llvm::StructType::element_iterator I = STy->element_begin(), E = STy->element_end(); I != E; ++I) { - if ((*I)->isFirstClassType()) { + if ((*I)->isSingleValueType()) { args.push_back(*I); } else { disassembleStruct(args, *I); @@ -673,14 +673,14 @@ if (cur->naturalType->isAbstract()) { cur->resolveType(false, false); } - if (cur->naturalType->isFirstClassType()) { + if (cur->naturalType->isSingleValueType()) { args.push_back(cur->naturalType); } else { args.push_back(llvm::PointerType::getUnqual(cur->naturalType)); } } - if (!(ret->isFirstClassType()) && ret != llvm::Type::VoidTy) { + if (!(ret->isSingleValueType()) && ret != llvm::Type::VoidTy) { args.push_back(llvm::PointerType::getUnqual(ret)); ret = llvm::Type::VoidTy; structRet = true; From gohman at apple.com Fri May 23 12:49:40 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 17:49:40 -0000 Subject: [llvm-commits] [llvm] r51489 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86InstrInfo.cpp lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/pmul.ll Message-ID: <200805231749.m4NHneIL009846@zion.cs.uiuc.edu> Author: djg Date: Fri May 23 12:49:40 2008 New Revision: 51489 URL: http://llvm.org/viewvc/llvm-project?rev=51489&view=rev Log: Use PMULDQ for v2i64 multiplies when SSE4.1 is available. And add load-folding table entries for PMULDQ and PMULLD. Added: llvm/trunk/test/CodeGen/X86/pmul.ll Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86InstrInfo.cpp llvm/trunk/lib/Target/X86/X86InstrSSE.td Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=51489&r1=51488&r2=51489&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri May 23 12:49:40 2008 @@ -700,6 +700,7 @@ if (Subtarget->hasSSE41()) { // FIXME: Do we need to handle scalar-to-vector here? setOperationAction(ISD::MUL, MVT::v4i32, Legal); + setOperationAction(ISD::MUL, MVT::v2i64, Legal); // i8 and i16 vectors are custom , because the source register and source // source memory operand types are not the same width. f32 vectors are Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=51489&r1=51488&r2=51489&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Fri May 23 12:49:40 2008 @@ -569,8 +569,12 @@ { X86::PMAXUBrr, X86::PMAXUBrm }, { X86::PMINSWrr, X86::PMINSWrm }, { X86::PMINUBrr, X86::PMINUBrm }, + { X86::PMULDQrr, X86::PMULDQrm }, + { X86::PMULDQrr_int, X86::PMULDQrm_int }, { X86::PMULHUWrr, X86::PMULHUWrm }, { X86::PMULHWrr, X86::PMULHWrm }, + { X86::PMULLDrr, X86::PMULLDrm }, + { X86::PMULLDrr_int, X86::PMULLDrm_int }, { X86::PMULLWrr, X86::PMULLWrm }, { X86::PMULUDQrr, X86::PMULUDQrm }, { X86::PORrr, X86::PORrm }, Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=51489&r1=51488&r2=51489&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Fri May 23 12:49:40 2008 @@ -3242,19 +3242,18 @@ int_x86_sse41_pmaxud, 1>; defm PMAXUW : SS41I_binop_rm_int<0x3E, "pmaxuw", int_x86_sse41_pmaxuw, 1>; -defm PMULDQ : SS41I_binop_rm_int<0x28, "pmuldq", - int_x86_sse41_pmuldq, 1>; /// SS41I_binop_rm_int - Simple SSE 4.1 binary operator let Constraints = "$src1 = $dst" in { - multiclass SS41I_binop_patint opc, string OpcodeStr, SDNode OpNode, - Intrinsic IntId128, bit Commutable = 0> { + multiclass SS41I_binop_patint opc, string OpcodeStr, ValueType OpVT, + SDNode OpNode, Intrinsic IntId128, + bit Commutable = 0> { def rr : SS48I, OpSize { + [(set VR128:$dst, (OpNode (OpVT VR128:$src1), + VR128:$src2))]>, OpSize { let isCommutable = Commutable; } def rr_int : SS48I; +defm PMULDQ : SS41I_binop_patint<0x28, "pmuldq", v2i64, mul, + int_x86_sse41_pmuldq, 1>; /// SS41I_binop_rmi_int - SSE 4.1 binary operator with 8-bit immediate Added: llvm/trunk/test/CodeGen/X86/pmul.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pmul.ll?rev=51489&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/pmul.ll (added) +++ llvm/trunk/test/CodeGen/X86/pmul.ll Fri May 23 12:49:40 2008 @@ -0,0 +1,32 @@ +; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 > %t +; RUN: grep pmul %t | count 6 +; RUN: grep mov %t | count 8 + +define <4 x i32> @a(<4 x i32> %i) nounwind { + %A = mul <4 x i32> %i, < i32 117, i32 117, i32 117, i32 117 > + ret <4 x i32> %A +} +define <2 x i64> @b(<2 x i64> %i) nounwind { + %A = mul <2 x i64> %i, < i64 117, i64 117 > + ret <2 x i64> %A +} +define <4 x i32> @c(<4 x i32> %i, <4 x i32> %j) nounwind { + %A = mul <4 x i32> %i, %j + ret <4 x i32> %A +} +define <2 x i64> @d(<2 x i64> %i, <2 x i64> %j) nounwind { + %A = mul <2 x i64> %i, %j + ret <2 x i64> %A +} +; Use a call to force spills. +declare void @foo() +define <4 x i32> @e(<4 x i32> %i, <4 x i32> %j) nounwind { + call void @foo() + %A = mul <4 x i32> %i, %j + ret <4 x i32> %A +} +define <2 x i64> @f(<2 x i64> %i, <2 x i64> %j) nounwind { + call void @foo() + %A = mul <2 x i64> %i, %j + ret <2 x i64> %A +} From nicolas.geoffray at lip6.fr Fri May 23 12:56:49 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Fri, 23 May 2008 19:56:49 +0200 Subject: [llvm-commits] [vmkit] r51488 - in /vmkit/trunk/lib/N3/VMCore: CLIJit.cpp Opcodes.cpp VMClass.cpp In-Reply-To: <200805231745.m4NHjmrh009717@zion.cs.uiuc.edu> References: <200805231745.m4NHjmrh009717@zion.cs.uiuc.edu> Message-ID: <48370561.9060703@lip6.fr> Thanks a lot Dan! Dan Gohman wrote: > Author: djg > Date: Fri May 23 12:45:47 2008 > New Revision: 51488 > > URL: http://llvm.org/viewvc/llvm-project?rev=51488&view=rev > Log: > Change uses of llvm::Type::isFirstClassType to use the new > llvm::Type::isSingleValueType. The isFirstClassType function has > recently changed to return true for struct and array types. > > vmkit may some day want to use of isFirstClassType for some of > these some day as an optimization, but it'll require some > consideration. > > Modified: > vmkit/trunk/lib/N3/VMCore/CLIJit.cpp > vmkit/trunk/lib/N3/VMCore/Opcodes.cpp > vmkit/trunk/lib/N3/VMCore/VMClass.cpp > > Modified: vmkit/trunk/lib/N3/VMCore/CLIJit.cpp > URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/CLIJit.cpp?rev=51488&r1=51487&r2=51488&view=diff > > ============================================================================== > --- vmkit/trunk/lib/N3/VMCore/CLIJit.cpp (original) > +++ vmkit/trunk/lib/N3/VMCore/CLIJit.cpp Fri May 23 12:45:47 2008 > @@ -1190,7 +1190,7 @@ > VMCommonClass* cl = *i; > cl->resolveType(false, false); > AllocaInst* alloc = new AllocaInst(cl->naturalType, "", currentBlock); > - if (cl->naturalType->isFirstClassType()) { > + if (cl->naturalType->isSingleValueType()) { > new StoreInst(Constant::getNullValue(cl->naturalType), alloc, false, > currentBlock); > } else { > @@ -1362,7 +1362,7 @@ > VMCommonClass* cl = *i; > cl->resolveType(false, false); > AllocaInst* alloc = new AllocaInst(cl->naturalType, "", currentBlock); > - if (cl->naturalType->isFirstClassType()) { > + if (cl->naturalType->isSingleValueType()) { > new StoreInst(Constant::getNullValue(cl->naturalType), alloc, false, > currentBlock); > } else { > > Modified: vmkit/trunk/lib/N3/VMCore/Opcodes.cpp > URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/Opcodes.cpp?rev=51488&r1=51487&r2=51488&view=diff > > ============================================================================== > --- vmkit/trunk/lib/N3/VMCore/Opcodes.cpp (original) > +++ vmkit/trunk/lib/N3/VMCore/Opcodes.cpp Fri May 23 12:45:47 2008 > @@ -175,7 +175,7 @@ > static void store(Value* val, Value* local, bool vol, > BasicBlock* currentBlock) { > const Type* contained = local->getType()->getContainedType(0); > - if (contained->isFirstClassType()) { > + if (contained->isSingleValueType()) { > if (val->getType() != contained) { > convertValue(val, contained, currentBlock); > } > @@ -194,7 +194,7 @@ > > static Value* load(Value* val, const char* name, BasicBlock* currentBlock) { > const Type* contained = val->getType()->getContainedType(0); > - if (contained->isFirstClassType()) { > + if (contained->isSingleValueType()) { > return new LoadInst(val, name, currentBlock); > } else { > uint64 size = mvm::jit::getTypeSize(contained); > > Modified: vmkit/trunk/lib/N3/VMCore/VMClass.cpp > URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/VMClass.cpp?rev=51488&r1=51487&r2=51488&view=diff > > ============================================================================== > --- vmkit/trunk/lib/N3/VMCore/VMClass.cpp (original) > +++ vmkit/trunk/lib/N3/VMCore/VMClass.cpp Fri May 23 12:45:47 2008 > @@ -634,7 +634,7 @@ > const llvm::StructType* STy = llvm::dyn_cast(arg); > for (llvm::StructType::element_iterator I = STy->element_begin(), > E = STy->element_end(); I != E; ++I) { > - if ((*I)->isFirstClassType()) { > + if ((*I)->isSingleValueType()) { > args.push_back(*I); > } else { > disassembleStruct(args, *I); > @@ -673,14 +673,14 @@ > if (cur->naturalType->isAbstract()) { > cur->resolveType(false, false); > } > - if (cur->naturalType->isFirstClassType()) { > + if (cur->naturalType->isSingleValueType()) { > args.push_back(cur->naturalType); > } else { > args.push_back(llvm::PointerType::getUnqual(cur->naturalType)); > } > } > > - if (!(ret->isFirstClassType()) && ret != llvm::Type::VoidTy) { > + if (!(ret->isSingleValueType()) && ret != llvm::Type::VoidTy) { > args.push_back(llvm::PointerType::getUnqual(ret)); > ret = llvm::Type::VoidTy; > structRet = true; > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > From evan.cheng at apple.com Fri May 23 12:58:58 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 23 May 2008 10:58:58 -0700 Subject: [llvm-commits] [llvm] r51489 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86InstrInfo.cpp lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/pmul.ll In-Reply-To: <200805231749.m4NHneIL009846@zion.cs.uiuc.edu> References: <200805231749.m4NHneIL009846@zion.cs.uiuc.edu> Message-ID: <353C9BB0-F856-49D5-9832-6549CD1BE53A@apple.com> Thanks. Please update README-SSE.txt if this fixes an entry. Evan On May 23, 2008, at 10:49 AM, Dan Gohman wrote: > Author: djg > Date: Fri May 23 12:49:40 2008 > New Revision: 51489 > > URL: http://llvm.org/viewvc/llvm-project?rev=51489&view=rev > Log: > Use PMULDQ for v2i64 multiplies when SSE4.1 is available. And add > load-folding table entries for PMULDQ and PMULLD. > > Added: > llvm/trunk/test/CodeGen/X86/pmul.ll > Modified: > llvm/trunk/lib/Target/X86/X86ISelLowering.cpp > llvm/trunk/lib/Target/X86/X86InstrInfo.cpp > llvm/trunk/lib/Target/X86/X86InstrSSE.td > > Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=51489&r1=51488&r2=51489&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) > +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri May 23 > 12:49:40 2008 > @@ -700,6 +700,7 @@ > if (Subtarget->hasSSE41()) { > // FIXME: Do we need to handle scalar-to-vector here? > setOperationAction(ISD::MUL, MVT::v4i32, Legal); > + setOperationAction(ISD::MUL, MVT::v2i64, Legal); > > // i8 and i16 vectors are custom , because the source register > and source > // source memory operand types are not the same width. f32 > vectors are > > Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=51489&r1=51488&r2=51489&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original) > +++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Fri May 23 12:49:40 > 2008 > @@ -569,8 +569,12 @@ > { X86::PMAXUBrr, X86::PMAXUBrm }, > { X86::PMINSWrr, X86::PMINSWrm }, > { X86::PMINUBrr, X86::PMINUBrm }, > + { X86::PMULDQrr, X86::PMULDQrm }, > + { X86::PMULDQrr_int, X86::PMULDQrm_int }, > { X86::PMULHUWrr, X86::PMULHUWrm }, > { X86::PMULHWrr, X86::PMULHWrm }, > + { X86::PMULLDrr, X86::PMULLDrm }, > + { X86::PMULLDrr_int, X86::PMULLDrm_int }, > { X86::PMULLWrr, X86::PMULLWrm }, > { X86::PMULUDQrr, X86::PMULUDQrm }, > { X86::PORrr, X86::PORrm }, > > Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=51489&r1=51488&r2=51489&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) > +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Fri May 23 12:49:40 2008 > @@ -3242,19 +3242,18 @@ > int_x86_sse41_pmaxud, 1>; > defm PMAXUW : SS41I_binop_rm_int<0x3E, "pmaxuw", > int_x86_sse41_pmaxuw, 1>; > -defm PMULDQ : SS41I_binop_rm_int<0x28, "pmuldq", > - int_x86_sse41_pmuldq, 1>; > > > /// SS41I_binop_rm_int - Simple SSE 4.1 binary operator > let Constraints = "$src1 = $dst" in { > - multiclass SS41I_binop_patint opc, string OpcodeStr, > SDNode OpNode, > - Intrinsic IntId128, bit Commutable > = 0> { > + multiclass SS41I_binop_patint opc, string OpcodeStr, > ValueType OpVT, > + SDNode OpNode, Intrinsic IntId128, > + bit Commutable = 0> { > def rr : SS48I (ins VR128:$src1, VR128:$src2), > !strconcat(OpcodeStr, "\t{$src2, $dst|$dst, > $src2}"), > - [(set VR128:$dst, (OpNode (v4i32 VR128:$src1), > - > VR128:$src2))]>, OpSize { > + [(set VR128:$dst, (OpNode (OpVT VR128:$src1), > + VR128:$src2))]>, > OpSize { > let isCommutable = Commutable; > } > def rr_int : SS48I @@ -3277,8 +3276,10 @@ > OpSize; > } > } > -defm PMULLD : SS41I_binop_patint<0x40, "pmulld", mul, > +defm PMULLD : SS41I_binop_patint<0x40, "pmulld", v4i32, mul, > int_x86_sse41_pmulld, 1>; > +defm PMULDQ : SS41I_binop_patint<0x28, "pmuldq", v2i64, mul, > + int_x86_sse41_pmuldq, 1>; > > > /// SS41I_binop_rmi_int - SSE 4.1 binary operator with 8-bit immediate > > Added: llvm/trunk/test/CodeGen/X86/pmul.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pmul.ll?rev=51489&view=auto > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/test/CodeGen/X86/pmul.ll (added) > +++ llvm/trunk/test/CodeGen/X86/pmul.ll Fri May 23 12:49:40 2008 > @@ -0,0 +1,32 @@ > +; RUN: llvm-as < %s | llc -march=x86 -mattr=sse41 > %t > +; RUN: grep pmul %t | count 6 > +; RUN: grep mov %t | count 8 > + > +define <4 x i32> @a(<4 x i32> %i) nounwind { > + %A = mul <4 x i32> %i, < i32 117, i32 117, i32 117, i32 117 > > + ret <4 x i32> %A > +} > +define <2 x i64> @b(<2 x i64> %i) nounwind { > + %A = mul <2 x i64> %i, < i64 117, i64 117 > > + ret <2 x i64> %A > +} > +define <4 x i32> @c(<4 x i32> %i, <4 x i32> %j) nounwind { > + %A = mul <4 x i32> %i, %j > + ret <4 x i32> %A > +} > +define <2 x i64> @d(<2 x i64> %i, <2 x i64> %j) nounwind { > + %A = mul <2 x i64> %i, %j > + ret <2 x i64> %A > +} > +; Use a call to force spills. > +declare void @foo() > +define <4 x i32> @e(<4 x i32> %i, <4 x i32> %j) nounwind { > + call void @foo() > + %A = mul <4 x i32> %i, %j > + ret <4 x i32> %A > +} > +define <2 x i64> @f(<2 x i64> %i, <2 x i64> %j) nounwind { > + call void @foo() > + %A = mul <2 x i64> %i, %j > + ret <2 x i64> %A > +} > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From evan.cheng at apple.com Fri May 23 13:00:18 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 23 May 2008 18:00:18 -0000 Subject: [llvm-commits] [llvm] r51490 - /llvm/trunk/lib/Target/X86/X86InstrSSE.td Message-ID: <200805231800.m4NI0Ie2010310@zion.cs.uiuc.edu> Author: evancheng Date: Fri May 23 13:00:18 2008 New Revision: 51490 URL: http://llvm.org/viewvc/llvm-project?rev=51490&view=rev Log: Fix a duplicated pattern. Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=51490&r1=51489&r2=51490&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Fri May 23 13:00:18 2008 @@ -2987,8 +2987,8 @@ MOVHP_shuffle_mask)), (MOVHPSrm VR128:$src1, addr:$src2)>, Requires<[HasSSE1]>; def : Pat<(v2i64 (vector_shuffle VR128:$src1, (memop addr:$src2), - MOVLP_shuffle_mask)), - (MOVLPDrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; + MOVHP_shuffle_mask)), + (MOVHPDrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; } let AddedComplexity = 15 in { From gohman at apple.com Fri May 23 13:05:39 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 18:05:39 -0000 Subject: [llvm-commits] [llvm] r51491 - /llvm/trunk/lib/Target/X86/README-SSE.txt Message-ID: <200805231805.m4NI5dUf010725@zion.cs.uiuc.edu> Author: djg Date: Fri May 23 13:05:39 2008 New Revision: 51491 URL: http://llvm.org/viewvc/llvm-project?rev=51491&view=rev Log: Elaborate on the entry on integer vector multiplication by constants. Modified: llvm/trunk/lib/Target/X86/README-SSE.txt Modified: llvm/trunk/lib/Target/X86/README-SSE.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README-SSE.txt?rev=51491&r1=51490&r2=51491&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/README-SSE.txt (original) +++ llvm/trunk/lib/Target/X86/README-SSE.txt Fri May 23 13:05:39 2008 @@ -814,7 +814,7 @@ ret <4 x i32> %A } -Compiles into: +On targets without SSE4.1, this compiles into: LCPI1_0: ## <4 x i32> .long 10 @@ -846,6 +846,11 @@ punpckldq %xmm2, %xmm0 ret +It would be better to synthesize integer vector multiplication by constants +using shifts and adds, pslld and paddd here. And even on targets with SSE4.1, +simple cases such as multiplication by powers of two would be better as +vector shifts than as multiplications. + //===---------------------------------------------------------------------===// We compile this: From baldrick at free.fr Fri May 23 13:12:28 2008 From: baldrick at free.fr (Duncan Sands) Date: Fri, 23 May 2008 20:12:28 +0200 Subject: [llvm-commits] [vmkit] r51488 - in /vmkit/trunk/lib/N3/VMCore: CLIJit.cpp Opcodes.cpp VMClass.cpp In-Reply-To: <200805231745.m4NHjmrh009717@zion.cs.uiuc.edu> References: <200805231745.m4NHjmrh009717@zion.cs.uiuc.edu> Message-ID: <200805232012.28875.baldrick@free.fr> Hi Dan, I find the name isSingleValueType a bit odd. For example, a struct with one field could be said to have a single value, yet isSingleValueType would return false for it. How about: isSimpleType? Ciao, Duncan. From gohman at apple.com Fri May 23 13:23:12 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 18:23:12 -0000 Subject: [llvm-commits] [llvm] r51493 - /llvm/trunk/lib/AsmParser/llvmAsmParser.y Message-ID: <200805231823.m4NINCvA011525@zion.cs.uiuc.edu> Author: djg Date: Fri May 23 13:23:11 2008 New Revision: 51493 URL: http://llvm.org/viewvc/llvm-project?rev=51493&view=rev Log: Issue errors in several situations instead of aborting. Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=51493&r1=51492&r2=51493&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Fri May 23 13:23:11 2008 @@ -731,6 +731,10 @@ GenerateError("Cannot declare global vars of function type"); return 0; } + if (Ty == Type::LabelTy) { + GenerateError("Cannot declare global vars of label type"); + return 0; + } const PointerType *PTy = PointerType::get(Ty, AddressSpace); @@ -1850,12 +1854,14 @@ CHECK_FOR_ERROR } | INTTYPE TRUETOK { // Boolean constants - assert(cast($1)->getBitWidth() == 1 && "Not Bool?"); + if (cast($1)->getBitWidth() != 1) + GEN_ERROR("Constant true must have type i1"); $$ = ConstantInt::getTrue(); CHECK_FOR_ERROR } | INTTYPE FALSETOK { // Boolean constants - assert(cast($1)->getBitWidth() == 1 && "Not Bool?"); + if (cast($1)->getBitWidth() != 1) + GEN_ERROR("Constant false must have type i1"); $$ = ConstantInt::getFalse(); CHECK_FOR_ERROR } @@ -2250,8 +2256,8 @@ ArgListH : ArgListH ',' Types OptParamAttrs OptLocalName { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*$3)->getDescription()); - if (*$3 == Type::VoidTy) - GEN_ERROR("void typed arguments are invalid"); + if (!(*$3)->isFirstClassType()) + GEN_ERROR("Argument types must be first-class"); ArgListEntry E; E.Attrs = $4; E.Ty = $3; E.Name = $5; $$ = $1; $1->push_back(E); @@ -2260,8 +2266,8 @@ | Types OptParamAttrs OptLocalName { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*$1)->getDescription()); - if (*$1 == Type::VoidTy) - GEN_ERROR("void typed arguments are invalid"); + if (!(*$1)->isFirstClassType()) + GEN_ERROR("Argument types must be first-class"); ArgListEntry E; E.Attrs = $2; E.Ty = $1; E.Name = $3; $$ = new ArgListType; $$->push_back(E); @@ -2498,6 +2504,9 @@ | '<' ConstVector '>' { // Nonempty unsized packed vector const Type *ETy = (*$2)[0]->getType(); int NumElements = $2->size(); + + if (!ETy->isInteger() && !ETy->isFloatingPoint()) + GEN_ERROR("Invalid vector element type: " + ETy->getDescription()); VectorType* pt = VectorType::get(ETy, NumElements); PATypeHolder* PTy = new PATypeHolder( @@ -2639,7 +2648,8 @@ $$ = BranchInst::Create(tmpBB); } // Conditional Branch... | BR INTTYPE ValueRef ',' LABEL ValueRef ',' LABEL ValueRef { - assert(cast($2)->getBitWidth() == 1 && "Not Bool?"); + if (cast($2)->getBitWidth() != 1) + GEN_ERROR("Branch condition must have type i1"); BasicBlock* tmpBBA = getBBVal($6); CHECK_FOR_ERROR BasicBlock* tmpBBB = getBBVal($9); @@ -3149,6 +3159,8 @@ | MALLOC Types ',' INTTYPE ValueRef OptCAlign { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription()); + if ($4 != Type::Int32Ty) + GEN_ERROR("Malloc array size is not a 32-bit integer!"); Value* tmpVal = getVal($4, $5); CHECK_FOR_ERROR $$ = new MallocInst(*$2, tmpVal, $6); @@ -3164,6 +3176,8 @@ | ALLOCA Types ',' INTTYPE ValueRef OptCAlign { if (!UpRefs.empty()) GEN_ERROR("Invalid upreference in type: " + (*$2)->getDescription()); + if ($4 != Type::Int32Ty) + GEN_ERROR("Alloca array size is not a 32-bit integer!"); Value* tmpVal = getVal($4, $5); CHECK_FOR_ERROR $$ = new AllocaInst(*$2, tmpVal, $6); From gohman at apple.com Fri May 23 13:36:30 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 11:36:30 -0700 Subject: [llvm-commits] [vmkit] r51488 - in /vmkit/trunk/lib/N3/VMCore: CLIJit.cpp Opcodes.cpp VMClass.cpp In-Reply-To: <200805232012.28875.baldrick@free.fr> References: <200805231745.m4NHjmrh009717@zion.cs.uiuc.edu> <200805232012.28875.baldrick@free.fr> Message-ID: <3061A3F3-9D9D-44B2-A566-D7CC46194496@apple.com> On May 23, 2008, at 11:12 AM, Duncan Sands wrote: > Hi Dan, I find the name isSingleValueType a bit odd. > For example, a struct with one field could be said > to have a single value, yet isSingleValueType would > return false for it. How about: isSimpleType? Hmm, isSimpleType is also a bit ambiguous to me. I don't have a strong preference either way, and there is inertia for isSingleValueType. I wouldn't object if you want to rename it though. Dan From dalej at apple.com Fri May 23 14:01:55 2008 From: dalej at apple.com (Dale Johannesen) Date: Fri, 23 May 2008 12:01:55 -0700 Subject: [llvm-commits] [llvm] r51458 - /llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp In-Reply-To: <1211514590.5835.25.camel@localhost> References: <200805230017.m4N0H0Qk027968@zion.cs.uiuc.edu> <1211514590.5835.25.camel@localhost> Message-ID: <6D26F62F-0EF5-475D-9D73-5C74CA3D74BB@apple.com> On May 22, 2008, at 8:49 PM, Anton Korobeynikov wrote: > Hello, Dale > >> + SwitchToDataSection("\t.section >> __TEXT,__const_coal,coalesced", I); > Is this correct? __TEXT section? That's the right section, yes, try the testcase referenced in the checkin. And I believe SwitchToDataSection is appropriate because that affects the padding character, and you want 0's in this section. I am not sure string vs. non-string is quite the right test, though, gcc's logic for this is very confusing. From dpatel at apple.com Fri May 23 14:07:35 2008 From: dpatel at apple.com (Devang Patel) Date: Fri, 23 May 2008 19:07:35 -0000 Subject: [llvm-commits] [test-suite] r51495 - in /test-suite/trunk: TEST.nightly2.Makefile TEST.nightly2.report Message-ID: <200805231907.m4NJ7Z6L013240@zion.cs.uiuc.edu> Author: dpatel Date: Fri May 23 14:07:35 2008 New Revision: 51495 URL: http://llvm.org/viewvc/llvm-project?rev=51495&view=rev Log: Add support for opt-beta runs without disturbing current TEST=nightly setup. Added: test-suite/trunk/TEST.nightly2.Makefile test-suite/trunk/TEST.nightly2.report (with props) Added: test-suite/trunk/TEST.nightly2.Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.nightly2.Makefile?rev=51495&view=auto ============================================================================== --- test-suite/trunk/TEST.nightly2.Makefile (added) +++ test-suite/trunk/TEST.nightly2.Makefile Fri May 23 14:07:35 2008 @@ -0,0 +1,153 @@ +##===- TEST.nightly.Makefile ------------------------------*- Makefile -*--===## +# +# This test is used in conjunction with the llvm/utils/NightlyTest* stuff to +# generate information about program status for the nightly report. +# +##===----------------------------------------------------------------------===## + +CURDIR := $(shell cd .; pwd) +PROGDIR := $(PROJ_SRC_ROOT) +RELDIR := $(subst $(PROGDIR),,$(CURDIR)) + +REPORTS_TO_GEN := compile nat +ifndef DISABLE_LLC +REPORTS_TO_GEN += llc +endif +ifndef DISABLE_JIT +REPORTS_TO_GEN += jit +endif +ifndef DISABLE_CBE +REPORTS_TO_GEN += cbe +endif +ifdef ENABLE_LLCBETA +REPORTS_TO_GEN += llc-beta +endif +ifdef ENABLE_OPTBETA +REPORTS_TO_GEN += opt-beta +endif +REPORTS_SUFFIX := $(addsuffix .report.txt, $(REPORTS_TO_GEN)) + + +TIMEOPT = -time-passes -stats -info-output-file=$(CURDIR)/$@.info +EXTRA_LLI_OPTS = $(TIMEOPT) + +# Compilation tests +$(PROGRAMS_TO_TEST:%=Output/%.nightly.compile.report.txt): \ +Output/%.nightly.compile.report.txt: Output/%.llvm.bc $(LOPT) + @echo > $@ + @-if test -f Output/$*.linked.bc.info; then \ + echo "TEST-PASS: compile $(RELDIR)/$*" >> $@;\ + printf "TEST-RESULT-compile: " >> $@;\ + grep "Total Execution Time" Output/$*.linked.bc.info >> $@;\ + echo >> $@;\ + printf "TEST-RESULT-compile: " >> $@;\ + wc -c $< >> $@;\ + echo >> $@;\ + else \ + echo "TEST-FAIL: compile $(RELDIR)/$*" >> $@;\ + fi + +# NAT tests +$(PROGRAMS_TO_TEST:%=Output/%.nightly.nat.report.txt): \ +Output/%.nightly.nat.report.txt: Output/%.out-nat + @echo > $@ + @printf "TEST-RESULT-nat-time: " >> $@ + -grep "^program" Output/$*.out-nat.time >> $@ + +# LLC tests +$(PROGRAMS_TO_TEST:%=Output/%.nightly.llc.report.txt): \ +Output/%.nightly.llc.report.txt: Output/%.llvm.bc Output/%.exe-llc $(LLC) + @echo > $@ + -head -n 100 Output/$*.exe-llc >> $@ + @-if test -f Output/$*.exe-llc; then \ + echo "TEST-PASS: llc $(RELDIR)/$*" >> $@;\ + $(LLC) $< $(LLCFLAGS) -o /dev/null -f $(TIMEOPT) >> $@ 2>&1; \ + printf "TEST-RESULT-llc: " >> $@;\ + grep "Total Execution Time" $@.info >> $@;\ + printf "TEST-RESULT-llc-time: " >> $@;\ + grep "^program" Output/$*.out-llc.time >> $@;\ + echo >> $@;\ + else \ + echo "TEST-FAIL: llc $(RELDIR)/$*" >> $@;\ + fi + +# LLC experimental tests +$(PROGRAMS_TO_TEST:%=Output/%.nightly.llc-beta.report.txt): \ +Output/%.nightly.llc-beta.report.txt: Output/%.llvm.bc Output/%.exe-llc-beta $(LLC) + @echo > $@ + -head -n 100 Output/$*.exe-llc-beta >> $@ + @-if test -f Output/$*.exe-llc-beta; then \ + echo "TEST-PASS: llc-beta $(RELDIR)/$*" >> $@;\ + $(LLC) $< $(LLCFLAGS) $(LLCBETAOPTION) -o /dev/null -f $(TIMEOPT) >> $@ 2>&1; \ + printf "TEST-RESULT-llc-beta: " >> $@;\ + grep "Total Execution Time" $@.info >> $@;\ + printf "TEST-RESULT-llc-beta-time: " >> $@;\ + grep "^program" Output/$*.out-llc-beta.time >> $@;\ + echo >> $@;\ + else \ + echo "TEST-FAIL: llc-beta $(RELDIR)/$*" >> $@;\ + fi + +# OPT experimental tests +$(PROGRAMS_TO_TEST:%=Output/%.nightly.opt-beta.report.txt): \ +Output/%.nightly.opt-beta.report.txt: Output/%.llvm.optbeta.bc Output/%.exe-opt-beta $(LLC) + @echo > $@ + -head -n 100 Output/$*.exe-opt-beta >> $@ + @-if test -f Output/$*.exe-opt-beta; then \ + echo "TEST-PASS: opt-beta $(RELDIR)/$*" >> $@;\ + $(LLC) $< $(LLCFLAGS) -o /dev/null -f $(TIMEOPT) >> $@ 2>&1; \ + printf "TEST-RESULT-opt-beta: " >> $@;\ + grep "Total Execution Time" $@.info >> $@;\ + printf "TEST-RESULT-opt-beta-time: " >> $@;\ + grep "^program" Output/$*.out-opt-beta.time >> $@;\ + echo >> $@;\ + else \ + echo "TEST-FAIL: opt-beta $(RELDIR)/$*" >> $@;\ + fi + +# CBE tests +$(PROGRAMS_TO_TEST:%=Output/%.nightly.cbe.report.txt): \ +Output/%.nightly.cbe.report.txt: Output/%.llvm.bc Output/%.exe-cbe $(LDIS) + @echo > $@ + -head -n 100 Output/$*.exe-cbe >> $@ + @-if test -f Output/$*.exe-cbe; then \ + echo "TEST-PASS: cbe $(RELDIR)/$*" >> $@;\ + printf "TEST-RESULT-cbe-time: " >> $@;\ + grep "^program" Output/$*.out-cbe.time >> $@;\ + echo >> $@;\ + else \ + echo "TEST-FAIL: cbe $(RELDIR)/$*" >> $@;\ + fi + +# JIT tests +$(PROGRAMS_TO_TEST:%=Output/%.nightly.jit.report.txt): \ +Output/%.nightly.jit.report.txt: Output/%.llvm.bc Output/%.exe-jit $(LLI) + @echo > $@ + -head -n 100 Output/$*.exe-jit >> $@ + @-if test -f Output/$*.exe-jit; then \ + echo "TEST-PASS: jit $(RELDIR)/$*" >> $@;\ + printf "TEST-RESULT-jit-time: " >> $@;\ + grep "^program" Output/$*.out-jit.time >> $@;\ + echo >> $@;\ + printf "TEST-RESULT-jit-comptime: " >> $@;\ + grep "Total Execution Time" Output/$*.out-jit.info >> $@;\ + echo >> $@;\ + else \ + echo "TEST-FAIL: jit $(RELDIR)/$*" >> $@;\ + fi + +# Overall tests: just run subordinate tests +$(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \ +Output/%.$(TEST).report.txt: $(addprefix Output/%.nightly., $(REPORTS_SUFFIX)) + -cat $(addprefix Output/$*.nightly., $(REPORTS_SUFFIX)) > $@ + + + +$(PROGRAMS_TO_TEST:%=test.$(TEST).%): \ +test.$(TEST).%: Output/%.$(TEST).report.txt + @echo "---------------------------------------------------------------" + @echo ">>> ========= '$(RELDIR)/$*' Program" + @echo "---------------------------------------------------------------" + @-cat $< + +REPORT_DEPENDENCIES := $(LDIS) $(LLI) $(LLC) Added: test-suite/trunk/TEST.nightly2.report URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.nightly2.report?rev=51495&view=auto ============================================================================== --- test-suite/trunk/TEST.nightly2.report (added) +++ test-suite/trunk/TEST.nightly2.report Fri May 23 14:07:35 2008 @@ -0,0 +1,103 @@ +##=== TEST.nightly.report - Report description for nightly -----*- perl -*-===## +# +# This file defines a report to be generated for the nightly tests. +# +##===----------------------------------------------------------------------===## + +# Sort by program name +$SortCol = 0; +$TrimRepeatedPrefix = 1; + +my $WallTimeRE = "Time: ([0-9.]+) seconds \\([0-9.]+ wall clock"; + +# FormatTime - Convert a time from 1m23.45 into 83.45 +sub FormatTime { + my $Time = shift; + if ($Time =~ m/([0-9]+)[m:]([0-9.]+)/) { + return sprintf("%7.3f", $1*60.0+$2); + } + + return sprintf("%7.2f", $Time); +} + +sub GCCCBERatio { + my ($Cols, $Col) = @_; + my $GCC = $Cols->[$Col-7]; + my $CBE = $Cols->[$Col-6]; + return "n/a" if ($GCC eq "*" or $CBE eq "*"); + return sprintf("%3.2f", $GCC/$CBE) if ($GCC >= 0.1 and $CBE >= 0.1); + return "-"; +} + +sub GCCLLCRatio { + my ($Cols, $Col) = @_; + my $GCC = $Cols->[$Col-8]; + my $LLC = $Cols->[$Col-6]; + return "n/a" if ($GCC eq "*" or $LLC eq "*"); + return sprintf("%3.2f", $GCC/$LLC) if ($GCC >= 0.1 and $LLC >= 0.1); + return "-"; +} + +sub GCCLLC_BETARatio { + my ($Cols, $Col) = @_; + my $GCC = $Cols->[$Col-9]; + my $LLC_BETA = $Cols->[$Col-6]; + return "n/a" if ($GCC eq "*" or $LLC_BETA eq "*"); + return sprintf("%3.2f", $GCC/$LLC_BETA) if ($GCC >= 0.1 and $LLC_BETA >= 0.1); + return "-"; +} + +sub LLCLLC_BETARatio { # LLC/LLC-BETA + my ($Cols, $Col) = @_; + my $LLC = $Cols->[$Col-8]; + my $LLC_BETA = $Cols->[$Col-7]; + return "n/a" if ($LLC eq "*" or $LLC_BETA eq "*"); + return sprintf("%3.2f", $LLC/$LLC_BETA) if ($LLC >= 0.1 and $LLC_BETA >= 0.1); + return "-"; +} + +sub OPTOPT_BETARatio { # OPT/OPT-BETA + my ($Cols, $Col) = @_; + my $LLC = $Cols->[$Col-9]; + my $OPT_BETA = $Cols->[$Col-7]; + return "n/allc" if ($LLC eq "*"); + return "n/aopt" if ($OPT_BETA eq "*"); + return "n/a" if ($LLC eq "*" or $OPT_BETA eq "*"); + return sprintf("%3.2f", $LLC/$OPT_BETA) if ($LLC >= 0.1 and $OPT_BETA >= 0.1); + return "-"; +} + +# highlight the RATIO columns with green/red. +$HilightColumns{14} = 1; +$HilightColumns{15} = 1; +$HilightColumns{16} = 1; +$HilightColumns{17} = 1; + +# These are the columns for the report. The first entry is the header for the +# column, the second is the regex to use to match the value. Empty list create +# separators, and closures may be put in for custom processing. +( +# Name + ["Program" , '\'([^\']+)\' Program'], + [], +# Times + ["GCCAS" , "TEST-RESULT-compile: .*$WallTimeRE"], + ["Bytecode" , 'TEST-RESULT-compile: *([0-9]+)'], + ["LLC compile" , "TEST-RESULT-llc: .*$WallTimeRE"], + ["LLC-BETA compile" , "TEST-RESULT-llc-beta: .*$WallTimeRE"], + ["OPT-BETA compile" , "TEST-RESULT-opt-beta: .*$WallTimeRE"], + ["JIT codegen" , "TEST-RESULT-jit-comptime: .*$WallTimeRE"], + [], + ["GCC" , 'TEST-RESULT-nat-time: program\s*([.0-9m:]+)', \&FormatTime], + ["CBE" , 'TEST-RESULT-cbe-time: program\s*([.0-9m:]+)', \&FormatTime], + ["LLC" , 'TEST-RESULT-llc-time: program\s*([.0-9m:]+)', \&FormatTime], + ["LLC-BETA" , 'TEST-RESULT-llc-beta-time: program\s*([.0-9m:]+)',\&FormatTime], + ["OPT-BETA" , 'TEST-RESULT-opt-beta-time: program\s*([.0-9m:]+)',\&FormatTime], + ["JIT" , 'TEST-RESULT-jit-time: program\s*([.0-9m:]+)', \&FormatTime], + [], + ["GCC/CBE" , \&GCCCBERatio], + ["GCC/LLC" , \&GCCLLCRatio], + ["GCC/LLC-BETA" , \&GCCLLC_BETARatio], + ["LLC/LLC-BETA" , \&LLCLLC_BETARatio], + ["OPT/OPT-BETA" , \&OPTOPT_BETARatio] +); Propchange: test-suite/trunk/TEST.nightly2.report ------------------------------------------------------------------------------ svn:executable = * From gohman at apple.com Fri May 23 15:40:06 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 20:40:06 -0000 Subject: [llvm-commits] [llvm] r51496 - in /llvm/trunk: include/llvm/PassManagers.h lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/ExecutionEngine/JIT/Intercept.cpp lib/ExecutionEngine/JIT/TargetSelect.cpp lib/VMCore/Pass.cpp tools/llvm-link/llvm-link.cpp Message-ID: <200805232040.m4NKe7N0016109@zion.cs.uiuc.edu> Author: djg Date: Fri May 23 15:40:06 2008 New Revision: 51496 URL: http://llvm.org/viewvc/llvm-project?rev=51496&view=rev Log: Add #includes to make some dependencies explicit. Modified: llvm/trunk/include/llvm/PassManagers.h llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/trunk/lib/ExecutionEngine/JIT/Intercept.cpp llvm/trunk/lib/ExecutionEngine/JIT/TargetSelect.cpp llvm/trunk/lib/VMCore/Pass.cpp llvm/trunk/tools/llvm-link/llvm-link.cpp Modified: llvm/trunk/include/llvm/PassManagers.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassManagers.h?rev=51496&r1=51495&r2=51496&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassManagers.h (original) +++ llvm/trunk/include/llvm/PassManagers.h Fri May 23 15:40:06 2008 @@ -86,6 +86,9 @@ #ifndef PASSMANAGERS_H #define PASSMANAGERS_H +#include "llvm/Pass.h" +#include + namespace llvm { /// FunctionPassManager and PassManager, two top level managers, serve Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=51496&r1=51495&r2=51496&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Fri May 23 15:40:06 2008 @@ -29,6 +29,7 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/MathExtras.h" #include +#include using namespace llvm; STATISTIC(NodesCombined , "Number of dag nodes combined"); Modified: llvm/trunk/lib/ExecutionEngine/JIT/Intercept.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/Intercept.cpp?rev=51496&r1=51495&r2=51496&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/JIT/Intercept.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/JIT/Intercept.cpp Fri May 23 15:40:06 2008 @@ -16,6 +16,7 @@ //===----------------------------------------------------------------------===// #include "JIT.h" +#include "llvm/Support/Streams.h" #include "llvm/System/DynamicLibrary.h" #include "llvm/Config/config.h" using namespace llvm; Modified: llvm/trunk/lib/ExecutionEngine/JIT/TargetSelect.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/TargetSelect.cpp?rev=51496&r1=51495&r2=51496&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/JIT/TargetSelect.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/JIT/TargetSelect.cpp Fri May 23 15:40:06 2008 @@ -15,6 +15,7 @@ #include "JIT.h" #include "llvm/Module.h" #include "llvm/ModuleProvider.h" +#include "llvm/Support/Streams.h" #include "llvm/Target/SubtargetFeature.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetMachineRegistry.h" Modified: llvm/trunk/lib/VMCore/Pass.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Pass.cpp?rev=51496&r1=51495&r2=51496&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Pass.cpp (original) +++ llvm/trunk/lib/VMCore/Pass.cpp Fri May 23 15:40:06 2008 @@ -13,6 +13,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/Pass.h" #include "llvm/PassManager.h" #include "llvm/Module.h" #include "llvm/ModuleProvider.h" Modified: llvm/trunk/tools/llvm-link/llvm-link.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-link/llvm-link.cpp?rev=51496&r1=51495&r2=51496&view=diff ============================================================================== --- llvm/trunk/tools/llvm-link/llvm-link.cpp (original) +++ llvm/trunk/tools/llvm-link/llvm-link.cpp Fri May 23 15:40:06 2008 @@ -19,6 +19,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/Streams.h" #include "llvm/System/Signals.h" #include "llvm/System/Path.h" #include From clattner at apple.com Fri May 23 15:57:04 2008 From: clattner at apple.com (Chris Lattner) Date: Fri, 23 May 2008 13:57:04 -0700 Subject: [llvm-commits] Teach SCEV about {X,*,Y} recursions In-Reply-To: <48103C2D.1060804@gmail.com> References: <480FA304.2060406@gmail.com> <8860430B-8F9B-46FA-91AF-C3298A261183@apple.com> <48103C2D.1060804@gmail.com> Message-ID: <9CB42B8F-28CE-4838-9822-DCBFE88F70F7@apple.com> On Apr 24, 2008, at 12:52 AM, T?r?k Edwin wrote: > Chris Lattner wrote: >> >> On Apr 23, 2008, at 1:58 PM, T?r?k Edwin wrote: >> >>> Hi, >>> >>> I have a patch that adds support for exponential recursions in >>> loops. >>> This is useful in static analysis tools, and also for code >>> optimization. >> >> This is interesting, but a couple questions: >> >> 1) What sort of code does this really help with in practice? I'm a >> bit afraid of adding a bunch of complexity to SCEV analysis if it is >> unlikely to be useful for broad code. Do you see power sequences >> indexing arrays for example? > > It is useful if we can compute the loop exit value of a variable > without > actually executing the loop (e.g. compute a^1980 w/o looping 1980 > times), and thus the variable can > be moved out of the loop, and we can possibly delete the loop > entirely. Yes, you're right. I guess my concern is that the current exit variable substitution, indvars, and LSR in general all need some sort of cost function to know whether it is profitable to rewrite something. I'm concerned that this change will cause code pessimization. For example, if indvars "recognizes" some code as an expression derived from an induction variable and rewrites it in terms of the canonical one, this often pessimizes code. This is currently by design though, as this is intended to simplify the code allowing other loop passes to analyze it efficiently. When LSR runs, it comes back and rewrites to inefficient code into the 'best' form for the target. The problem happens when indvars understands and rewrites something, but when LSR can't fix it. > If that variable is used for something else inside the loop > (indexing an > array), then we get no advantage, we still need to loop N times, and > actually it is better to keep the original mul in this case. > > I see that powexpr got generated for at least these: > pifft, consumer-lame, telecomm-fft, voronoi, np, scimark2. > > I'll try to see if performance is actually improved in a real > situation. Ok. What do these loops look like, out of curiousity? >> 2) instead of having SCEVExpander::visitPowExpr emit multiplies, it >> should emit a call to llvm.powi. > > I would need a powi that takes an integer argument as a base. > I don't want to introduce FP code where there wasn't any before. > Also it > would currently force us to link the resulting code with -lm, right? > Should I add a powi that takes an integer base? Ah right. I think it would be interesting to make powi work with integers. The code generator could always expand it into inline code instead of calling libm if needed. Alternatively, perhaps there is already a libgcc function that does this? >> 3) It would be really nice to teach the code generator to lower >> llvm.powi nicer, particularly before something like this patch goes >> in. Our current lowering of powi is pretty naive. > > AFAICT it is just transformed into a libcall. Would you like me to > move > the constant-power codegen code there? Yep, that's what I mean. Thanks Edwin, -Chris From gohman at apple.com Fri May 23 16:05:58 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 21:05:58 -0000 Subject: [llvm-commits] [llvm] r51499 - in /llvm/trunk: include/llvm/ lib/Transforms/Instrumentation/ lib/Transforms/Scalar/ lib/Transforms/Utils/ lib/VMCore/ Message-ID: <200805232105.m4NL5xXf027155@zion.cs.uiuc.edu> Author: djg Date: Fri May 23 16:05:58 2008 New Revision: 51499 URL: http://llvm.org/viewvc/llvm-project?rev=51499&view=rev Log: Tidy up BasicBlock::getFirstNonPHI, and change a bunch of places to use it instead of duplicating its functionality. Modified: llvm/trunk/include/llvm/BasicBlock.h llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp llvm/trunk/lib/Transforms/Instrumentation/RSProfiling.cpp llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp llvm/trunk/lib/Transforms/Scalar/LICM.cpp llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp llvm/trunk/lib/Transforms/Utils/LCSSA.cpp llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp llvm/trunk/lib/VMCore/BasicBlock.cpp Modified: llvm/trunk/include/llvm/BasicBlock.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BasicBlock.h?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/include/llvm/BasicBlock.h (original) +++ llvm/trunk/include/llvm/BasicBlock.h Fri May 23 16:05:58 2008 @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// // -// // This file contains the declaration of the BasicBlock class. +// //===----------------------------------------------------------------------===// #ifndef LLVM_BASICBLOCK_H @@ -106,6 +106,9 @@ /// the first instruction, which might be PHI. /// Returns 0 is there's no non-PHI instruction. Instruction* getFirstNonPHI(); + const Instruction* getFirstNonPHI() const { + return const_cast(this)->getFirstNonPHI(); + } /// removeFromParent - This method unlinks 'this' from the containing /// function, but does not delete it. Modified: llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp (original) +++ llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp Fri May 23 16:05:58 2008 @@ -100,8 +100,8 @@ void llvm::IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum, GlobalValue *CounterArray) { // Insert the increment after any alloca or PHI instructions... - BasicBlock::iterator InsertPos = BB->begin(); - while (isa(InsertPos) || isa(InsertPos)) + BasicBlock::iterator InsertPos = BB->getFirstNonPHI(); + while (isa(InsertPos)) ++InsertPos; // Create the getelementptr constant expression Modified: llvm/trunk/lib/Transforms/Instrumentation/RSProfiling.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/RSProfiling.cpp?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Instrumentation/RSProfiling.cpp (original) +++ llvm/trunk/lib/Transforms/Instrumentation/RSProfiling.cpp Fri May 23 16:05:58 2008 @@ -265,14 +265,11 @@ new StoreInst(l, Counter, bib); BasicBlock* bb = cast(bib)->getNormalDest(); - BasicBlock::iterator i = bb->begin(); - while (isa(i)) - ++i; + BasicBlock::iterator i = bb->getFirstNonPHI(); l = new LoadInst(Counter, "counter", i); bb = cast(bib)->getUnwindDest(); - i = bb->begin(); - while (isa(i)) ++i; + i = bb->getFirstNonPHI(); l = new LoadInst(Counter, "counter", i); new StoreInst(l, AI, i); } else if (isa(&*bib) || isa(&*bib)) { @@ -343,8 +340,8 @@ void RSProfilers_std::IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum, GlobalValue *CounterArray) { // Insert the increment after any alloca or PHI instructions... - BasicBlock::iterator InsertPos = BB->begin(); - while (isa(InsertPos) || isa(InsertPos)) + BasicBlock::iterator InsertPos = BB->getFirstNonPHI(); + while (isa(InsertPos)) ++InsertPos; // Create the getelementptr constant expression Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Fri May 23 16:05:58 2008 @@ -385,8 +385,7 @@ CastInst *&InsertedCast = InsertedCasts[UserBB]; if (!InsertedCast) { - BasicBlock::iterator InsertPt = UserBB->begin(); - while (isa(InsertPt)) ++InsertPt; + BasicBlock::iterator InsertPt = UserBB->getFirstNonPHI(); InsertedCast = CastInst::Create(CI->getOpcode(), CI->getOperand(0), CI->getType(), "", @@ -443,8 +442,7 @@ CmpInst *&InsertedCmp = InsertedCmps[UserBB]; if (!InsertedCmp) { - BasicBlock::iterator InsertPt = UserBB->begin(); - while (isa(InsertPt)) ++InsertPt; + BasicBlock::iterator InsertPt = UserBB->getFirstNonPHI(); InsertedCmp = CmpInst::Create(CI->getOpcode(), CI->getPredicate(), CI->getOperand(0), @@ -1039,8 +1037,7 @@ Instruction *&InsertedTrunc = InsertedTruncs[UserBB]; if (!InsertedTrunc) { - BasicBlock::iterator InsertPt = UserBB->begin(); - while (isa(InsertPt)) ++InsertPt; + BasicBlock::iterator InsertPt = UserBB->getFirstNonPHI(); InsertedTrunc = new TruncInst(I, Src->getType(), "", InsertPt); } Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Fri May 23 16:05:58 2008 @@ -319,8 +319,7 @@ BlockToInsertInto = ExitBlocks[0]; else BlockToInsertInto = Preheader; - BasicBlock::iterator InsertPt = BlockToInsertInto->begin(); - while (isa(InsertPt)) ++InsertPt; + BasicBlock::iterator InsertPt = BlockToInsertInto->getFirstNonPHI(); bool HasConstantItCount = isa(SE->getIterationCount(L)); @@ -535,8 +534,7 @@ // Now that we have a canonical induction variable, we can rewrite any // recurrences in terms of the induction variable. Start with the auxillary // induction variables, and recursively rewrite any of their uses. - BasicBlock::iterator InsertPt = Header->begin(); - while (isa(InsertPt)) ++InsertPt; + BasicBlock::iterator InsertPt = Header->getFirstNonPHI(); // If there were induction variables of other sizes, cast the primary // induction variable to the right size for them, avoiding the need for the Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Fri May 23 16:05:58 2008 @@ -9592,8 +9592,7 @@ // If this is an invoke instruction, we should insert it after the first // non-phi, instruction in the normal successor block. if (InvokeInst *II = dyn_cast(Caller)) { - BasicBlock::iterator I = II->getNormalDest()->begin(); - while (isa(I)) ++I; + BasicBlock::iterator I = II->getNormalDest()->getFirstNonPHI(); InsertNewInstBefore(NC, *I); } else { // Otherwise, it's a call, just insert cast right after the call instr @@ -11068,8 +11067,7 @@ // Advance to a place where it is safe to insert the new store and // insert it. - BBI = DestBB->begin(); - while (isa(BBI)) ++BBI; + BBI = DestBB->getFirstNonPHI(); InsertNewInstBefore(new StoreInst(MergedVal, SI.getOperand(1), OtherStore->isVolatile()), *BBI); @@ -11737,8 +11735,7 @@ return false; } - BasicBlock::iterator InsertPos = DestBlock->begin(); - while (isa(InsertPos)) ++InsertPos; + BasicBlock::iterator InsertPos = DestBlock->getFirstNonPHI(); I->moveBefore(InsertPos); ++NumSunkInst; Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Fri May 23 16:05:58 2008 @@ -116,9 +116,8 @@ /// getJumpThreadDuplicationCost - Return the cost of duplicating this block to /// thread across it. static unsigned getJumpThreadDuplicationCost(const BasicBlock *BB) { - BasicBlock::const_iterator I = BB->begin(); /// Ignore PHI nodes, these will be flattened when duplication happens. - while (isa(*I)) ++I; + BasicBlock::const_iterator I = BB->getFirstNonPHI(); // Sum up the cost of each instruction until we get to the terminator. Don't // include the terminator because the copy won't include it. Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LICM.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp Fri May 23 16:05:58 2008 @@ -472,8 +472,7 @@ // nodes in it. I.removeFromParent(); - BasicBlock::iterator InsertPt = ExitBlocks[0]->begin(); - while (isa(InsertPt)) ++InsertPt; + BasicBlock::iterator InsertPt = ExitBlocks[0]->getFirstNonPHI(); ExitBlocks[0]->getInstList().insert(InsertPt, &I); } } else if (ExitBlocks.empty()) { @@ -542,8 +541,7 @@ // If we haven't already processed this exit block, do so now. if (InsertedBlocks.insert(ExitBlock).second) { // Insert the code after the last PHI node... - BasicBlock::iterator InsertPt = ExitBlock->begin(); - while (isa(InsertPt)) ++InsertPt; + BasicBlock::iterator InsertPt = ExitBlock->getFirstNonPHI(); // If this is the first exit block processed, just move the original // instruction, otherwise clone the original instruction and insert @@ -735,9 +733,7 @@ continue; // Copy all of the allocas into their memory locations. - BasicBlock::iterator BI = ExitBlocks[i]->begin(); - while (isa(*BI)) - ++BI; // Skip over all of the phi nodes in the block. + BasicBlock::iterator BI = ExitBlocks[i]->getFirstNonPHI(); Instruction *InsertPos = BI; unsigned PVN = 0; for (unsigned i = 0, e = PromotedValues.size(); i != e; ++i) { Modified: llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp Fri May 23 16:05:58 2008 @@ -256,9 +256,7 @@ // nodes will be created for all getResults later. BasicBlock::iterator InsertPoint; if (InvokeInst *II = dyn_cast(In)) { - InsertPoint = II->getNormalDest()->begin(); - while (isa(InsertPoint)) - ++InsertPoint; + InsertPoint = II->getNormalDest()->getFirstNonPHI(); } else { InsertPoint = I; // call ++InsertPoint; Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Fri May 23 16:05:58 2008 @@ -682,8 +682,7 @@ InsertedPHIs.insert(NewLCSSA); } - BasicBlock::iterator InsertPt = EndBlock->begin(); - while (dyn_cast(InsertPt)) ++InsertPt; + BasicBlock::iterator InsertPt = EndBlock->getFirstNonPHI(); for (BasicBlock::iterator I = MiddleBlock->begin(); (OldLCSSA = dyn_cast(I)) && InsertedPHIs.count(OldLCSSA) == 0; ++I) { Modified: llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/TailDuplication.cpp Fri May 23 16:05:58 2008 @@ -118,8 +118,7 @@ ++PI; if (PI == PE) return false; // Exactly one predecessor! - BasicBlock::iterator I = Dest->begin(); - while (isa(*I)) ++I; + BasicBlock::iterator I = Dest->getFirstNonPHI(); for (unsigned Size = 0; I != Dest->end(); ++I) { if (Size == Threshold) return false; // The block is too large. @@ -254,8 +253,7 @@ // If there are non-phi instructions in DestBlock that have no operands // defined in DestBlock, and if the instruction has no side effects, we can // move the instruction to DomBlock instead of duplicating it. - BasicBlock::iterator BBI = DestBlock->begin(); - while (isa(BBI)) ++BBI; + BasicBlock::iterator BBI = DestBlock->getFirstNonPHI(); while (!isa(BBI)) { Instruction *I = BBI++; Modified: llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp Fri May 23 16:05:58 2008 @@ -126,8 +126,7 @@ // containing PHI nodes merging values from outside of the region, and a // second that contains all of the code for the block and merges back any // incoming values from inside of the region. - BasicBlock::iterator AfterPHIs = Header->begin(); - while (isa(AfterPHIs)) ++AfterPHIs; + BasicBlock::iterator AfterPHIs = Header->getFirstNonPHI(); BasicBlock *NewBB = Header->splitBasicBlock(AfterPHIs, Header->getName()+".ce"); Modified: llvm/trunk/lib/Transforms/Utils/LCSSA.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LCSSA.cpp?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/LCSSA.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/LCSSA.cpp Fri May 23 16:05:58 2008 @@ -225,9 +225,7 @@ // immediately here. It will be processed in next iteration. BasicBlock::iterator InsertPoint; if (InvokeInst *II = dyn_cast(I)) { - InsertPoint = II->getNormalDest()->begin(); - while (isa(InsertPoint)) - ++InsertPoint; + InsertPoint = II->getNormalDest()->getFirstNonPHI(); } else { InsertPoint = I; InsertPoint++; Modified: llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp Fri May 23 16:05:58 2008 @@ -282,8 +282,7 @@ // location afterward. new StoreInst(InvokeNoC, InvokeNum, true, II); // volatile - BasicBlock::iterator NI = II->getNormalDest()->begin(); - while (isa(NI)) ++NI; + BasicBlock::iterator NI = II->getNormalDest()->getFirstNonPHI(); // nonvolatile. new StoreInst(Constant::getNullValue(Type::Int32Ty), InvokeNum, false, NI); Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Fri May 23 16:05:58 2008 @@ -1493,8 +1493,7 @@ } } else if (BranchInst *BI = dyn_cast(BB->getTerminator())) { if (BI->isUnconditional()) { - BasicBlock::iterator BBI = BB->begin(); // Skip over phi nodes... - while (isa(*BBI)) ++BBI; + BasicBlock::iterator BBI = BB->getFirstNonPHI(); BasicBlock *Succ = BI->getSuccessor(0); if (BBI->isTerminator() && // Terminator is the only non-phi instruction! Modified: llvm/trunk/lib/VMCore/BasicBlock.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/BasicBlock.cpp?rev=51499&r1=51498&r2=51499&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/BasicBlock.cpp (original) +++ llvm/trunk/lib/VMCore/BasicBlock.cpp Fri May 23 16:05:58 2008 @@ -143,15 +143,14 @@ return dyn_cast(&InstList.back()); } -Instruction* BasicBlock::getFirstNonPHI() -{ - BasicBlock::iterator i = begin(); - // All valid basic blocks should have a terminator, - // which is not a PHINode. If we have invalid basic - // block we'll get assert when dereferencing past-the-end - // iterator. - while (isa(i)) ++i; - return &*i; +Instruction* BasicBlock::getFirstNonPHI() { + BasicBlock::iterator i = begin(); + // All valid basic blocks should have a terminator, + // which is not a PHINode. If we have an invalid basic + // block we'll get an assertion failure when dereferencing + // a past-the-end iterator. + while (isa(i)) ++i; + return &*i; } void BasicBlock::dropAllReferences() { From clattner at apple.com Fri May 23 16:09:41 2008 From: clattner at apple.com (Chris Lattner) Date: Fri, 23 May 2008 14:09:41 -0700 Subject: [llvm-commits] [llvm] r51013 - /llvm/trunk/docs/LangRef.html In-Reply-To: <200805122351.m4CNp9ss007522@zion.cs.uiuc.edu> References: <200805122351.m4CNp9ss007522@zion.cs.uiuc.edu> Message-ID: On May 12, 2008, at 4:51 PM, Dan Gohman wrote: > URL: http://llvm.org/viewvc/llvm-project?rev=51013&view=rev > Log: > Initial documentation for first-class aggregates changes. Nice, > +

      Example:
      > + > +
      > +  %result = extractvalue {i32, float} %agg, i32 0    ; yields  
      > i32
      > +
      > +
    Since the indices are constants, not "Value*"'s, I don't think there should be a type specified for them. Something like: %result = extractvalue {{i32, float}} %agg, 0, 1 Should be enough. > + > + > ++
    Arguments:
    > + > +

    > +The first operand of an 'insertvalue' instruction is a > +value of struct or href="#t_array">array type. > +The second operand is a first-class value to insert. > +type of the first operand. Sentence fragment? > The following operands are constant indicies If they aren't value*'s, please don't call them operands. > +

    Example:
    > + > +
    > +  %result = insertvalue {i32, float} %agg, i32 1, i32 0    ;  
    > yields {i32, float}
    
    Also, no types please.
    
    Should the discussion of first-class types and other type  
    classifications be updated?
    
    -Chris
    
    
    From gohman at apple.com  Fri May 23 16:15:36 2008
    From: gohman at apple.com (Dan Gohman)
    Date: Fri, 23 May 2008 21:15:36 -0000
    Subject: [llvm-commits] [llvm] r51500 - in /llvm/trunk/test:
     Analysis/Andersens/external.ll Bindings/Ocaml/ocaml.exp
     Feature/llvm2cpp.exp
     Transforms/IndVarsSimplify/2004-04-05-InvokeCastCrash.ll
    Message-ID: <200805232115.m4NLFabx004219@zion.cs.uiuc.edu>
    
    Author: djg
    Date: Fri May 23 16:15:35 2008
    New Revision: 51500
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51500&view=rev
    Log:
    Remove lingering references to .llx and .tr in the tests.
    
    Modified:
        llvm/trunk/test/Analysis/Andersens/external.ll
        llvm/trunk/test/Bindings/Ocaml/ocaml.exp
        llvm/trunk/test/Feature/llvm2cpp.exp
        llvm/trunk/test/Transforms/IndVarsSimplify/2004-04-05-InvokeCastCrash.ll
    
    Modified: llvm/trunk/test/Analysis/Andersens/external.ll
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/Andersens/external.ll?rev=51500&r1=51499&r2=51500&view=diff
    
    ==============================================================================
    --- llvm/trunk/test/Analysis/Andersens/external.ll (original)
    +++ llvm/trunk/test/Analysis/Andersens/external.ll Fri May 23 16:15:35 2008
    @@ -2,7 +2,7 @@
     
     ; Because the 'internal' function is passed to an external function, we don't
     ; know what the incoming values will alias.  As such, we cannot do the 
    -; optimization checked by the 'arg-must-alias.llx' test.
    +; optimization checked by the 'arg-must-alias.ll' test.
     
     declare void @external(i32(i32*)*)
     @G = internal constant i32* null
    
    Modified: llvm/trunk/test/Bindings/Ocaml/ocaml.exp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bindings/Ocaml/ocaml.exp?rev=51500&r1=51499&r2=51500&view=diff
    
    ==============================================================================
    --- llvm/trunk/test/Bindings/Ocaml/ocaml.exp (original)
    +++ llvm/trunk/test/Bindings/Ocaml/ocaml.exp Fri May 23 16:15:35 2008
    @@ -1,3 +1,3 @@
     load_lib llvm.exp
     
    -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr,ml}]]
    +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp,ml}]]
    
    Modified: llvm/trunk/test/Feature/llvm2cpp.exp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Feature/llvm2cpp.exp?rev=51500&r1=51499&r2=51500&view=diff
    
    ==============================================================================
    --- llvm/trunk/test/Feature/llvm2cpp.exp (original)
    +++ llvm/trunk/test/Feature/llvm2cpp.exp Fri May 23 16:15:35 2008
    @@ -1,3 +1,3 @@
     load_lib llvm2cpp.exp
     
    -llvm2cpp-test [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx}]]
    +llvm2cpp-test [lsort [glob -nocomplain $srcdir/$subdir/*.ll]]
    
    Modified: llvm/trunk/test/Transforms/IndVarsSimplify/2004-04-05-InvokeCastCrash.ll
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarsSimplify/2004-04-05-InvokeCastCrash.ll?rev=51500&r1=51499&r2=51500&view=diff
    
    ==============================================================================
    --- llvm/trunk/test/Transforms/IndVarsSimplify/2004-04-05-InvokeCastCrash.ll (original)
    +++ llvm/trunk/test/Transforms/IndVarsSimplify/2004-04-05-InvokeCastCrash.ll Fri May 23 16:15:35 2008
    @@ -1,5 +1,5 @@
     ; RUN: llvm-as < %s | opt -indvars -disable-output
    -; ModuleID = '2004-04-05-InvokeCastCrash.llx'
    +; ModuleID = '2004-04-05-InvokeCastCrash.ll'
     	%struct.__false_type = type { i8 }
     	%"struct.__gnu_cxx::_Hashtable_node" = type { %"struct.__gnu_cxx::_Hashtable_node"*, %"struct.llvm::Constant"* }
     	%"struct.__gnu_cxx::_Hashtable_node >" = type { %"struct.__gnu_cxx::_Hashtable_node >"*, %"struct.std::pair" }
    
    
    
    
    From evan.cheng at apple.com  Fri May 23 16:23:17 2008
    From: evan.cheng at apple.com (Evan Cheng)
    Date: Fri, 23 May 2008 21:23:17 -0000
    Subject: [llvm-commits] [llvm] r51501 - in /llvm/trunk:
     lib/Target/X86/README-SSE.txt lib/Target/X86/X86ISelDAGToDAG.cpp
     lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/vec_shuffle-18.ll
    Message-ID: <200805232123.m4NLNHVK005476@zion.cs.uiuc.edu>
    
    Author: evancheng
    Date: Fri May 23 16:23:16 2008
    New Revision: 51501
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51501&view=rev
    Log:
    Use movlps / movhps to modify low / high half of 16-byet memory location.
    
    Added:
        llvm/trunk/test/CodeGen/X86/vec_shuffle-18.ll
    Modified:
        llvm/trunk/lib/Target/X86/README-SSE.txt
        llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
        llvm/trunk/lib/Target/X86/X86InstrSSE.td
    
    Modified: llvm/trunk/lib/Target/X86/README-SSE.txt
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README-SSE.txt?rev=51501&r1=51500&r2=51501&view=diff
    
    ==============================================================================
    --- llvm/trunk/lib/Target/X86/README-SSE.txt (original)
    +++ llvm/trunk/lib/Target/X86/README-SSE.txt Fri May 23 16:23:16 2008
    @@ -505,46 +505,6 @@
     
     //===---------------------------------------------------------------------===//
     
    -We should compile this:
    -#include 
    -typedef union {
    -  int i[4];
    -  float f[4];
    -  __m128 v;
    -} vector4_t;
    -void swizzle (const void *a, vector4_t * b, vector4_t * c) {
    -  b->v = _mm_loadl_pi (b->v, (__m64 *) a);
    -  c->v = _mm_loadl_pi (c->v, ((__m64 *) a) + 1);
    -}
    -
    -to:
    -
    -_swizzle:
    -        movl    4(%esp), %eax
    -        movl    8(%esp), %edx
    -        movl    12(%esp), %ecx
    -        movlps  (%eax), %xmm0
    -        movlps  %xmm0, (%edx)
    -        movlps  8(%eax), %xmm0
    -        movlps  %xmm0, (%ecx)
    -        ret
    -
    -not:
    -
    -swizzle:
    -        movl 8(%esp), %eax
    -        movaps (%eax), %xmm0
    -        movl 4(%esp), %ecx
    -        movlps (%ecx), %xmm0
    -        movaps %xmm0, (%eax)
    -        movl 12(%esp), %eax
    -        movaps (%eax), %xmm0
    -        movlps 8(%ecx), %xmm0
    -        movaps %xmm0, (%eax)
    -        ret
    -
    -//===---------------------------------------------------------------------===//
    -
     We should materialize vector constants like "all ones" and "signbit" with 
     code like:
     
    
    Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=51501&r1=51500&r2=51501&view=diff
    
    ==============================================================================
    --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
    +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Fri May 23 16:23:16 2008
    @@ -363,6 +363,32 @@
                              Store.getOperand(2), Store.getOperand(3));
     }
     
    +/// isRMWLoad - Return true if N is a load that's part of RMW sub-DAG.
    +/// 
    +static bool isRMWLoad(SDOperand N, SDOperand Chain, SDOperand Address,
    +                      SDOperand &Load) {
    +  if (N.getOpcode() == ISD::BIT_CONVERT)
    +    N = N.getOperand(0);
    +
    +  LoadSDNode *LD = dyn_cast(N);
    +  if (!LD || LD->isVolatile())
    +    return false;
    +  if (LD->getAddressingMode() != ISD::UNINDEXED)
    +    return false;
    +
    +  ISD::LoadExtType ExtType = LD->getExtensionType();
    +  if (ExtType != ISD::NON_EXTLOAD && ExtType != ISD::EXTLOAD)
    +    return false;
    +
    +  if (N.hasOneUse() &&
    +      N.getOperand(1) == Address &&
    +      N.Val->isOperandOf(Chain.Val)) {
    +    Load = N;
    +    return true;
    +  }
    +  return false;
    +}
    +
     /// PreprocessForRMW - Preprocess the DAG to make instruction selection better.
     /// This is only run if not in -fast mode (aka -O0).
     /// This allows the instruction selector to pick more read-modify-write
    @@ -414,8 +440,8 @@
     
         SDOperand N1 = I->getOperand(1);
         SDOperand N2 = I->getOperand(2);
    -    if (MVT::isFloatingPoint(N1.getValueType()) ||
    -        MVT::isVector(N1.getValueType()) ||
    +    if ((MVT::isFloatingPoint(N1.getValueType()) &&
    +         !MVT::isVector(N1.getValueType())) ||
             !N1.hasOneUse())
           continue;
     
    @@ -429,20 +455,13 @@
           case ISD::OR:
           case ISD::XOR:
           case ISD::ADDC:
    -      case ISD::ADDE: {
    +      case ISD::ADDE:
    +      case ISD::VECTOR_SHUFFLE: {
             SDOperand N10 = N1.getOperand(0);
             SDOperand N11 = N1.getOperand(1);
    -        if (ISD::isNON_EXTLoad(N10.Val))
    -          RModW = true;
    -        else if (ISD::isNON_EXTLoad(N11.Val)) {
    -          RModW = true;
    -          std::swap(N10, N11);
    -        }
    -        RModW = RModW && N10.Val->isOperandOf(Chain.Val) && N10.hasOneUse() &&
    -          (N10.getOperand(1) == N2) &&
    -          (N10.Val->getValueType(0) == N1.getValueType());
    -        if (RModW)
    -          Load = N10;
    +        RModW = isRMWLoad(N10, Chain, N2, Load);
    +        if (!RModW)
    +          RModW = isRMWLoad(N11, Chain, N2, Load);
             break;
           }
           case ISD::SUB:
    @@ -456,12 +475,7 @@
           case X86ISD::SHLD:
           case X86ISD::SHRD: {
             SDOperand N10 = N1.getOperand(0);
    -        if (ISD::isNON_EXTLoad(N10.Val))
    -          RModW = N10.Val->isOperandOf(Chain.Val) && N10.hasOneUse() &&
    -            (N10.getOperand(1) == N2) &&
    -            (N10.Val->getValueType(0) == N1.getValueType());
    -        if (RModW)
    -          Load = N10;
    +        RModW = isRMWLoad(N10, Chain, N2, Load);
             break;
           }
         }
    
    Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=51501&r1=51500&r2=51501&view=diff
    
    ==============================================================================
    --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
    +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Fri May 23 16:23:16 2008
    @@ -2977,13 +2977,15 @@
                       MOVHP_shuffle_mask)),
               (MOVHPDrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>;
     
    -def : Pat<(v4i32 (vector_shuffle VR128:$src1, (bc_v4i32 (memopv2i64 addr:$src2)),
    +def : Pat<(v4i32 (vector_shuffle VR128:$src1,
    +                                 (bc_v4i32 (memopv2i64 addr:$src2)),
                       MOVLP_shuffle_mask)),
               (MOVLPSrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>;
     def : Pat<(v2i64 (vector_shuffle VR128:$src1, (memop addr:$src2),
                       MOVLP_shuffle_mask)),
               (MOVLPDrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>;
    -def : Pat<(v4i32 (vector_shuffle VR128:$src1, (bc_v4i32 (memopv2i64 addr:$src2)),
    +def : Pat<(v4i32 (vector_shuffle VR128:$src1,
    +                                 (bc_v4i32 (memopv2i64 addr:$src2)),
                       MOVHP_shuffle_mask)),
               (MOVHPSrm VR128:$src1, addr:$src2)>, Requires<[HasSSE1]>;
     def : Pat<(v2i64 (vector_shuffle VR128:$src1, (memop addr:$src2),
    @@ -2991,6 +2993,37 @@
               (MOVHPDrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>;
     }
     
    +// (store (vector_shuffle (load addr), v2, <4, 5, 2, 3>), addr) using MOVLPS
    +// (store (vector_shuffle (load addr), v2, <0, 1, 4, 5>), addr) using MOVHPS
    +def : Pat<(store (v4f32 (vector_shuffle (memop addr:$src1), VR128:$src2,
    +                         MOVLP_shuffle_mask)), addr:$src1),
    +          (MOVLPSmr addr:$src1, VR128:$src2)>, Requires<[HasSSE1]>;
    +def : Pat<(store (v2f64 (vector_shuffle (memop addr:$src1), VR128:$src2,
    +                         MOVLP_shuffle_mask)), addr:$src1),
    +          (MOVLPDmr addr:$src1, VR128:$src2)>, Requires<[HasSSE2]>;
    +def : Pat<(store (v4f32 (vector_shuffle (memop addr:$src1), VR128:$src2,
    +                         MOVHP_shuffle_mask)), addr:$src1),
    +          (MOVHPSmr addr:$src1, VR128:$src2)>, Requires<[HasSSE1]>;
    +def : Pat<(store (v2f64 (vector_shuffle (memop addr:$src1), VR128:$src2,
    +                         MOVHP_shuffle_mask)), addr:$src1),
    +          (MOVHPDmr addr:$src1, VR128:$src2)>, Requires<[HasSSE2]>;
    +
    +def : Pat<(store (v4i32 (vector_shuffle
    +                         (bc_v4i32 (memopv2i64 addr:$src1)), VR128:$src2,
    +                         MOVLP_shuffle_mask)), addr:$src1),
    +          (MOVLPSmr addr:$src1, VR128:$src2)>, Requires<[HasSSE1]>;
    +def : Pat<(store (v2i64 (vector_shuffle (memop addr:$src1), VR128:$src2,
    +                         MOVLP_shuffle_mask)), addr:$src1),
    +          (MOVLPDmr addr:$src1, VR128:$src2)>, Requires<[HasSSE2]>;
    +def : Pat<(store (v4i32 (vector_shuffle
    +                         (bc_v4i32 (memopv2i64 addr:$src1)), VR128:$src2,
    +                         MOVHP_shuffle_mask)), addr:$src1),
    +          (MOVHPSmr addr:$src1, VR128:$src2)>, Requires<[HasSSE1]>;
    +def : Pat<(store (v2i64 (vector_shuffle (memop addr:$src1), VR128:$src2,
    +                         MOVHP_shuffle_mask)), addr:$src1),
    +          (MOVHPDmr addr:$src1, VR128:$src2)>, Requires<[HasSSE2]>;
    +
    +
     let AddedComplexity = 15 in {
     // Setting the lowest element in the vector.
     def : Pat<(v4i32 (vector_shuffle VR128:$src1, VR128:$src2,
    
    Added: llvm/trunk/test/CodeGen/X86/vec_shuffle-18.ll
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_shuffle-18.ll?rev=51501&view=auto
    
    ==============================================================================
    --- llvm/trunk/test/CodeGen/X86/vec_shuffle-18.ll (added)
    +++ llvm/trunk/test/CodeGen/X86/vec_shuffle-18.ll Fri May 23 16:23:16 2008
    @@ -0,0 +1,25 @@
    +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep mov | count 7
    +
    +	%struct.vector4_t = type { <4 x float> }
    +
    +define void @swizzle(i8* %a, %struct.vector4_t* %b, %struct.vector4_t* %c) nounwind  {
    +entry:
    +	%tmp9 = getelementptr %struct.vector4_t* %b, i32 0, i32 0		; <<4 x float>*> [#uses=2]
    +	%tmp10 = load <4 x float>* %tmp9, align 16		; <<4 x float>> [#uses=1]
    +	%tmp14 = bitcast i8* %a to double*		;  [#uses=1]
    +	%tmp15 = load double* %tmp14		;  [#uses=1]
    +	%tmp16 = insertelement <2 x double> undef, double %tmp15, i32 0		; <<2 x double>> [#uses=1]
    +	%tmp18 = bitcast <2 x double> %tmp16 to <4 x float>		; <<4 x float>> [#uses=1]
    +	%tmp19 = shufflevector <4 x float> %tmp10, <4 x float> %tmp18, <4 x i32> < i32 4, i32 5, i32 2, i32 3 >		; <<4 x float>> [#uses=1]
    +	store <4 x float> %tmp19, <4 x float>* %tmp9, align 16
    +	%tmp28 = getelementptr %struct.vector4_t* %c, i32 0, i32 0		; <<4 x float>*> [#uses=2]
    +	%tmp29 = load <4 x float>* %tmp28, align 16		; <<4 x float>> [#uses=1]
    +	%tmp26 = getelementptr i8* %a, i32 8		;  [#uses=1]
    +	%tmp33 = bitcast i8* %tmp26 to double*		;  [#uses=1]
    +	%tmp34 = load double* %tmp33		;  [#uses=1]
    +	%tmp35 = insertelement <2 x double> undef, double %tmp34, i32 0		; <<2 x double>> [#uses=1]
    +	%tmp37 = bitcast <2 x double> %tmp35 to <4 x float>		; <<4 x float>> [#uses=1]
    +	%tmp38 = shufflevector <4 x float> %tmp29, <4 x float> %tmp37, <4 x i32> < i32 4, i32 5, i32 2, i32 3 >		; <<4 x float>> [#uses=1]
    +	store <4 x float> %tmp38, <4 x float>* %tmp28, align 16
    +	ret void
    +}
    
    
    
    
    From clattner at apple.com  Fri May 23 16:24:03 2008
    From: clattner at apple.com (Chris Lattner)
    Date: Fri, 23 May 2008 14:24:03 -0700
    Subject: [llvm-commits] [llvm] r51118 - in /llvm/trunk: include/llvm/
    	lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/
    	lib/CodeGen/ lib/ExecutionEngine/ lib/Linker/
    	lib/Target/Alpha/ lib/Target/CBackend/ lib/Target/CellSPU/
    	lib/Target/CppBackend/ lib/Target/IA64/ lib/Target/Mips/
    	lib/Target/PIC16/ lib/Target/PowerPC/ lib/Target/Sparc/
    	lib/Target/X86/ lib/VMCore/
    In-Reply-To: <200805142012.m4EKCqbd022612@zion.cs.uiuc.edu>
    References: <200805142012.m4EKCqbd022612@zion.cs.uiuc.edu>
    Message-ID: <2DC6E67E-3DB5-4041-AB2E-21ED7B8D62B1@apple.com>
    
    On May 14, 2008, at 1:12 PM, Dale Johannesen wrote:
    > URL: http://llvm.org/viewvc/llvm-project?rev=51118&view=rev
    > Log:
    > Add CommonLinkage; currently tentative definitions
    > are represented as "weak", but there are subtle differences
    > in some cases on Darwin, so we need both.  The intent
    > is that "common" will behave identically to "weak" unless
    > somebody changes their target to do something else.
    > No functional change as yet.
    
    Thanks for doing this Dale!  Please update LangRef.html to include a  
    description of the semantics of common linkage.
    
    -Chris
    
    
    From dalej at apple.com  Fri May 23 16:33:27 2008
    From: dalej at apple.com (Dale Johannesen)
    Date: Fri, 23 May 2008 21:33:27 -0000
    Subject: [llvm-commits] [llvm] r51503 -
    	/llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp
    Message-ID: <200805232133.m4NLXRgt006613@zion.cs.uiuc.edu>
    
    Author: johannes
    Date: Fri May 23 16:33:27 2008
    New Revision: 51503
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51503&view=rev
    Log:
    Add a missed CommonLinkage check.
    
    
    Modified:
        llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp
    
    Modified: llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp?rev=51503&r1=51502&r2=51503&view=diff
    
    ==============================================================================
    --- llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp (original)
    +++ llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp Fri May 23 16:33:27 2008
    @@ -143,5 +143,6 @@
         return false;
       
       return GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() ||
    +         GV->hasCommonLinkage() ||
              (GV->isDeclaration() && !GV->hasNotBeenReadFromBitcode());
     }
    
    
    
    
    From tonic at nondot.org  Fri May 23 16:35:54 2008
    From: tonic at nondot.org (Tanya Lattner)
    Date: Fri, 23 May 2008 21:35:54 -0000
    Subject: [llvm-commits] [llvm] r51504 -
    	/llvm/branches/release_23/include/llvm/User.h
    Message-ID: <200805232135.m4NLZst2007272@zion.cs.uiuc.edu>
    
    Author: tbrethou
    Date: Fri May 23 16:35:53 2008
    New Revision: 51504
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51504&view=rev
    Log:
    Reverting patch. Breaks llvm-gcc build.
    
    Modified:
        llvm/branches/release_23/include/llvm/User.h
    
    Modified: llvm/branches/release_23/include/llvm/User.h
    URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_23/include/llvm/User.h?rev=51504&r1=51503&r2=51504&view=diff
    
    ==============================================================================
    --- llvm/branches/release_23/include/llvm/User.h (original)
    +++ llvm/branches/release_23/include/llvm/User.h Fri May 23 16:35:53 2008
    @@ -46,11 +46,6 @@
         : Value(Ty, vty), OperandList(OpList), NumOperands(NumOps) {}
     
     public:
    -  /// placement delete - required by std, but never called.
    -  void operator delete(void*, size_t) {
    -    assert(0 && "Constructor throws?");
    -  }
    -
       Value *getOperand(unsigned i) const {
         assert(i < NumOperands && "getOperand() out of range!");
         return OperandList[i];
    
    
    
    
    From clattner at apple.com  Fri May 23 16:37:25 2008
    From: clattner at apple.com (Chris Lattner)
    Date: Fri, 23 May 2008 14:37:25 -0700
    Subject: [llvm-commits] [llvm] r51157 - in /llvm/trunk:
    	include/llvm/Constants.h include/llvm/Instruction.def
    	include/llvm/Instructions.h include/llvm/Support/InstVisitor.h
    	lib/AsmParser/llvmAsmParser.cpp.cvs
    	lib/AsmParser/llvmAsmParser.h.cvs lib/AsmParser/llvmAsmParser.y
    	lib/AsmParser/llvmAsmParser.y.cvs
    	lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
    	lib/VMCore/ConstantFold.cpp lib/VMCore/ConstantFold.h
    	lib/VMCore/Constants.cpp lib/VMCore/Instructions.cpp
    	lib/VMCore/Verifier.cpp
    	test/Verifier/2002-11-05-GetelementptrPointers.ll
    In-Reply-To: <200805151950.m4FJoZLD009863@zion.cs.uiuc.edu>
    References: <200805151950.m4FJoZLD009863@zion.cs.uiuc.edu>
    Message-ID: <06120267-4872-4ABD-8BCA-32614BF3A86C@apple.com>
    
    On May 15, 2008, at 12:50 PM, Dan Gohman wrote:
    > URL: http://llvm.org/viewvc/llvm-project?rev=51157&view=rev
    > Log:
    > IR support for extractvalue and insertvalue instructions. Also, begin
    > moving toward making structs and arrays first-class types.
    
    Ok.
    
    >
    > =
    > =
    > =
    > =
    > =
    > =
    > =
    > =
    > ======================================================================
    > --- llvm/trunk/include/llvm/Constants.h (original)
    > +++ llvm/trunk/include/llvm/Constants.h Thu May 15 14:50:34 2008
    > @@ -575,6 +575,11 @@
    >                                       Constant *Elt, Constant *Idx);
    >   static Constant *getShuffleVectorTy(const Type *Ty, Constant *V1,
    >                                       Constant *V2, Constant *Mask);
    > +  static Constant *getExtractValueTy(const Type *Ty, Constant *Agg,
    > +                                     Constant * const *Idxs,  
    > unsigned NumIdxs);
    > +  static Constant *getInsertValueTy(const Type *Ty, Constant *Agg,
    > +                                    Constant *Val,
    > +                                    Constant * const *Idxs,  
    > unsigned NumIdxs);
    
    As discussed in langref, I think this should take just "const unsigned  
    *Idxs, unsigned NumIdxs" like getresult.
    
    I understand that this means that you don't get to share code with GEP  
    indexing, but it is more efficient and means that we can't have  
    constantexprs as indices etc.
    
    > // 
    > = 
    > = 
    > = 
    > ----------------------------------------------------------------------= 
    > ==//
    > +//                                ExtractValueInst Class
    > +// 
    > = 
    > = 
    > = 
    > ----------------------------------------------------------------------= 
    > ==//
    > +
    > +/// ExtractValueInst - This instruction extracts a value
    > +/// from an aggregate value
    > +///
    > +class ExtractValueInst : public Instruction {
    > +  ExtractValueInst(const ExtractValueInst &EVI);
    > +  void init(Value *Agg, Value* const *Idx, unsigned NumIdx);
    > +  void init(Value *Agg, Value *Idx);
    > +
    > +  template
    > +  void init(Value *Agg, InputIterator IdxBegin, InputIterator IdxEnd,
    > +            const std::string &Name,
    > +            // This argument ensures that we have an iterator we can
    > +            // do arithmetic on in constant time
    > +            std::random_access_iterator_tag) {
    > +    unsigned NumIdx = static_cast(std::distance(IdxBegin,  
    > IdxEnd));
    > +
    > +    if (NumIdx > 0) {
    
    I thought the instruction required at least one index?  Likewise in a  
    couple other places.
    
    > +++ llvm/trunk/test/Verifier/2002-11-05-GetelementptrPointers.ll Thu  
    > May 15 14:50:34 2008
    > @@ -1,7 +1,7 @@
    > -; RUN: not llvm-as < %s |& grep {Invalid getelementptr indices}
    > +; RUN: llvm-as < %s
    >
    > -; This testcase is invalid because we are indexing into a pointer  
    > that is
    > -; contained WITHIN a structure.
    > +; This testcase was previously considered invalid for indexing into  
    > a pointer
    > +; that is contained WITHIN a structure, but this is now valid.
    >
    > define void @test({i32, i32*} * %X) {
    > 	getelementptr {i32, i32*} * %X, i32 0, i32 1, i32 0
    
    Why is this valid?
    
    -Chris
    
    
    
    From gohman at apple.com  Fri May 23 16:40:56 2008
    From: gohman at apple.com (Dan Gohman)
    Date: Fri, 23 May 2008 21:40:56 -0000
    Subject: [llvm-commits] [llvm] r51505 - in /llvm/trunk:
     lib/AsmParser/llvmAsmParser.y test/Assembler/huge-array.ll
    Message-ID: <200805232140.m4NLeuUj011231@zion.cs.uiuc.edu>
    
    Author: djg
    Date: Fri May 23 16:40:55 2008
    New Revision: 51505
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51505&view=rev
    Log:
    Don't silently truncate array extents to 32 bits.
    
    Added:
        llvm/trunk/test/Assembler/huge-array.ll
    Modified:
        llvm/trunk/lib/AsmParser/llvmAsmParser.y
    
    Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=51505&r1=51504&r2=51505&view=diff
    
    ==============================================================================
    --- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original)
    +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Fri May 23 16:40:55 2008
    @@ -1406,7 +1406,7 @@
       }
     
       | '[' EUINT64VAL 'x' Types ']' {          // Sized array type?
    -    $$ = new PATypeHolder(HandleUpRefs(ArrayType::get(*$4, (unsigned)$2)));
    +    $$ = new PATypeHolder(HandleUpRefs(ArrayType::get(*$4, $2)));
         delete $4;
         CHECK_FOR_ERROR
       }
    
    Added: llvm/trunk/test/Assembler/huge-array.ll
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/huge-array.ll?rev=51505&view=auto
    
    ==============================================================================
    --- llvm/trunk/test/Assembler/huge-array.ll (added)
    +++ llvm/trunk/test/Assembler/huge-array.ll Fri May 23 16:40:55 2008
    @@ -0,0 +1,5 @@
    +; RUN: llvm-as < %s | llvm-dis | grep 18446744073709551615 | count 2
    +
    +define [18446744073709551615 x i8]* @foo() {
    +  ret [18446744073709551615 x i8]* null
    +}
    
    
    
    
    From clattner at apple.com  Fri May 23 16:45:27 2008
    From: clattner at apple.com (Chris Lattner)
    Date: Fri, 23 May 2008 14:45:27 -0700
    Subject: [llvm-commits] [llvm] r51468 - in /llvm/trunk:
    	include/llvm/Bitcode/LLVMBitCodes.h include/llvm/Type.h
    	lib/AsmParser/LLLexer.cpp lib/AsmParser/llvmAsmParser.cpp.cvs
    	lib/AsmParser/llvmAsmParser.h.cvs lib/AsmParser/llvmAsmParser.y
    	lib/AsmParser/llvmAsmParser.y.cvs
    	lib/Bitcode/Reader/BitcodeReader.cpp
    	lib/Bitcode/Writer/BitcodeWriter.cpp
    	lib/Bitcode/Writer/ValueEnumerator.cpp
    	test/Assembler/insertextractvalue.ll
    	test/Verifier/2006-07-11-StoreStruct.ll utils/llvm.grm
    In-Reply-To: <200805230155.m4N1tVrR001980@zion.cs.uiuc.edu>
    References: <200805230155.m4N1tVrR001980@zion.cs.uiuc.edu>
    Message-ID: <80E072E0-F83A-42CD-98E7-68E9B50DB978@apple.com>
    
    On May 22, 2008, at 6:55 PM, Dan Gohman wrote:
    > URL: http://llvm.org/viewvc/llvm-project?rev=51468&view=rev
    > Log:
    > Make structs and arrays first-class types, and add assembly
    > and bitcode support for the extractvalue and insertvalue
    > instructions and constant expressions.
    
    Woo!
    
    > +++ llvm/trunk/include/llvm/Type.h Thu May 22 20:55:30 2008
    > @@ -216,8 +216,8 @@
    >   /// is a valid type for a Value.
    >   ///
    >   inline bool isFirstClassType() const {
    > -    // Coming soon: first-class struct and array types...
    > -    return isSingleValueType();
    > +    return isSingleValueType() ||
    > +           ID == StructTyID || ID == ArrayTyID;
    >   }
    
    At this point, is it faster to just check that this *isn't* void and  
    functiontype?
    
    > @@ -1966,6 +1967,48 @@
    >       GEN_ERROR("Invalid shufflevector operands");
    >     $$ = ConstantExpr::getShuffleVector($3, $5, $7);
    >     CHECK_FOR_ERROR
    > +  }
    > +  | EXTRACTVALUE '(' ConstVal IndexList ')' {
    
    Does IndexList start with a comma?  "extractvalue ( {i32} zeroinit  
    0 )" is strange, I think a comma is needed.  Also, constantexprs  
    should not require types on the indices either.  It should just take a  
    list of EUINT64VAL's, like getresult.
    
    > +++ llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp Thu May 22  
    > 20:55:30 2008
    > @@ -103,10 +103,10 @@
    >   // in the table (have low bit-width).
    >   std::stable_sort(Types.begin(), Types.end(), CompareByFrequency);
    >
    > -  // Partition the Type ID's so that the first-class types occur  
    > before the
    > +  // Partition the Type ID's so that the single-value types occur  
    > before the
    >   // aggregate types.  This allows the aggregate types to be dropped  
    > from the
    >   // type table after parsing the global variable initializers.
    > -  std::partition(Types.begin(), Types.end(), isFirstClassType);
    > +  std::partition(Types.begin(), Types.end(), isSingleValueType);
    
    Is this required for correctness?  This could cause a significant BC  
    file size increase for real world apps.  I'd try kimwitu and 176.gcc  
    as examples.
    
    Thanks for working on this Dan!
    
    -Chris
    
    
    From gohman at apple.com  Fri May 23 16:53:16 2008
    From: gohman at apple.com (Dan Gohman)
    Date: Fri, 23 May 2008 21:53:16 -0000
    Subject: [llvm-commits] [llvm] r51506 - /llvm/trunk/docs/LangRef.html
    Message-ID: <200805232153.m4NLrGlp021090@zion.cs.uiuc.edu>
    
    Author: djg
    Date: Fri May 23 16:53:15 2008
    New Revision: 51506
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51506&view=rev
    Log:
    Update the description of first-class types to reflect that
    structs and arrays are now first-class. And fix a sentance
    fragment in the insertvalue description. Thanks to Chris
    for pointing these out!
    
    Modified:
        llvm/trunk/docs/LangRef.html
    
    Modified: llvm/trunk/docs/LangRef.html
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=51506&r1=51505&r2=51506&view=diff
    
    ==============================================================================
    --- llvm/trunk/docs/LangRef.html (original)
    +++ llvm/trunk/docs/LangRef.html Fri May 23 16:53:15 2008
    @@ -1066,8 +1066,7 @@
     

    The first class types are perhaps the most important. Values of these types are the only ones which can be produced by instructions, passed as arguments, or used as operands to -instructions. This means that all structures and arrays must be -manipulated either by pointer or by component.

    +instructions.

    @@ -2956,7 +2955,7 @@ The first operand of an 'insertvalue' instruction is a value of struct or array type. The second operand is a first-class value to insert. -type of the first operand. The following operands are constant indices +The following operands are constant indices indicating the position at which to insert the value in the same manner as indices in a 'getelementptr' instruction. From gohman at apple.com Fri May 23 17:01:39 2008 From: gohman at apple.com (Dan Gohman) Date: Fri, 23 May 2008 15:01:39 -0700 Subject: [llvm-commits] [llvm] r51013 - /llvm/trunk/docs/LangRef.html In-Reply-To: References: <200805122351.m4CNp9ss007522@zion.cs.uiuc.edu> Message-ID: <39BFE89E-40E0-4CA2-B293-41C9B8EADAA6@apple.com> On May 23, 2008, at 2:09 PM, Chris Lattner wrote: > On May 12, 2008, at 4:51 PM, Dan Gohman wrote: >> URL: http://llvm.org/viewvc/llvm-project?rev=51013&view=rev >> Log: >> Initial documentation for first-class aggregates changes. > > Nice, > >> +
    Example:
    >> + >> +
    >> +  %result = extractvalue {i32, float} %agg, i32 0    ; yields  
    >> i32
    >> +
    >> +
    > > Since the indices are constants, not "Value*"'s, I don't think there > should be a type specified for them. Something like: > > %result = extractvalue {{i32, float}} %agg, 0, 1 > > Should be enough. Currently the indices are Value*'s though. As Value*'s they are more consistent with getelementptr, and to some degree extractelement. Making them plain constants would make extractvalue/insertvalue a little simpler though, so I could be convinced :-). > > >> + >> + >> ++
    Arguments:
    >> + >> +

    >> +The first operand of an 'insertvalue' instruction is a >> +value of struct or > href="#t_array">array type. >> +The second operand is a first-class value to insert. > >> +type of the first operand. > > Sentence fragment? Fixed. > > >> The following operands are constant indicies > > If they aren't value*'s, please don't call them operands. > >> +

    Example:
    >> + >> +
    >> +  %result = insertvalue {i32, float} %agg, i32 1, i32 0    ;  
    >> yields {i32, float}
    >
    > Also, no types please.
    
    If we change to plain constant indices, I'll update these.
    
    > Should the discussion of first-class types and other type  
    > classifications be updated?
    
    There was some wording about structs and arrays needing to be
    referenced via loads and stores. I removed it.
    
    Thanks,
    
    Dan
    
    
    
    From clattner at apple.com  Fri May 23 17:04:21 2008
    From: clattner at apple.com (Chris Lattner)
    Date: Fri, 23 May 2008 15:04:21 -0700
    Subject: [llvm-commits] [llvm] r51013 - /llvm/trunk/docs/LangRef.html
    In-Reply-To: <39BFE89E-40E0-4CA2-B293-41C9B8EADAA6@apple.com>
    References: <200805122351.m4CNp9ss007522@zion.cs.uiuc.edu>
    	
    	<39BFE89E-40E0-4CA2-B293-41C9B8EADAA6@apple.com>
    Message-ID: <779AAF8F-049A-47C2-9057-C5C03F85142C@apple.com>
    
    On May 23, 2008, at 3:01 PM, Dan Gohman wrote:
    >> Since the indices are constants, not "Value*"'s, I don't think  
    >> there should be a type specified for them.  Something like:
    >>
    >> %result = extractvalue {{i32, float}} %agg, 0, 1
    >>
    >> Should be enough.
    >
    > Currently the indices are Value*'s though. As Value*'s they are
    > more consistent with getelementptr, and to some degree extractelement.
    > Making them plain constants would make extractvalue/insertvalue a
    > little simpler though, so I could be convinced :-).
    
    I'd strongly prefer it that way.  The reason we went this way for  
    getresult is that it is more memory efficient (4 bytes vs 12 [plus the  
    constant itself if not shared] for each index) and it doesn't allow  
    constant exprs to be used.
    
    Does that seem reasonable?
    
    -Chris
    
    
    From gohman at apple.com  Fri May 23 17:08:18 2008
    From: gohman at apple.com (Dan Gohman)
    Date: Fri, 23 May 2008 15:08:18 -0700
    Subject: [llvm-commits] [llvm] r51157 - in /llvm/trunk:
    	include/llvm/Constants.h include/llvm/Instruction.def
    	include/llvm/Instructions.h include/llvm/Support/InstVisitor.h
    	lib/AsmParser/llvmAsmParser.cpp.cvs	lib/AsmParser/llvmAsmParser.h.cvs
    	lib/AsmParser/llvmAsmParser.y	lib/AsmParser/llvmAsmParser.y.cvs
    	lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	lib/VMCore/ConstantFold.cpp
    	lib/VMCore/ConstantFold.h	lib/VMCore/Constants.cpp
    	lib/VMCore/Instructions.cpp
    	lib/VMCore/Verifier.cpp	test/Verifier/2002-11-05-GetelementptrPointers.ll
    In-Reply-To: <06120267-4872-4ABD-8BCA-32614BF3A86C@apple.com>
    References: <200805151950.m4FJoZLD009863@zion.cs.uiuc.edu>
    	<06120267-4872-4ABD-8BCA-32614BF3A86C@apple.com>
    Message-ID: <270ECD9C-5336-4FC7-8855-B271C4893AA5@apple.com>
    
    
    On May 23, 2008, at 2:37 PM, Chris Lattner wrote:
    
    > On May 15, 2008, at 12:50 PM, Dan Gohman wrote:
    >> URL: http://llvm.org/viewvc/llvm-project?rev=51157&view=rev
    >> Log:
    >> IR support for extractvalue and insertvalue instructions. Also, begin
    >> moving toward making structs and arrays first-class types.
    >
    > Ok.
    >
    >>
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =
    >> =====================================================================
    >> --- llvm/trunk/include/llvm/Constants.h (original)
    >> +++ llvm/trunk/include/llvm/Constants.h Thu May 15 14:50:34 2008
    >> @@ -575,6 +575,11 @@
    >>                                      Constant *Elt, Constant *Idx);
    >>  static Constant *getShuffleVectorTy(const Type *Ty, Constant *V1,
    >>                                      Constant *V2, Constant *Mask);
    >> +  static Constant *getExtractValueTy(const Type *Ty, Constant *Agg,
    >> +                                     Constant * const *Idxs,
    >> unsigned NumIdxs);
    >> +  static Constant *getInsertValueTy(const Type *Ty, Constant *Agg,
    >> +                                    Constant *Val,
    >> +                                    Constant * const *Idxs,
    >> unsigned NumIdxs);
    >
    > As discussed in langref, I think this should take just "const unsigned
    > *Idxs, unsigned NumIdxs" like getresult.
    >
    > I understand that this means that you don't get to share code with GEP
    > indexing, but it is more efficient and means that we can't have
    > constantexprs as indices etc.
    
    Ok.
    
    >
    >
    >> //
    >> =
    >> =
    >> =
    >> ----------------------------------------------------------------------=
    >> ==//
    >> +//                                ExtractValueInst Class
    >> +//
    >> =
    >> =
    >> =
    >> ----------------------------------------------------------------------=
    >> ==//
    >> +
    >> +/// ExtractValueInst - This instruction extracts a value
    >> +/// from an aggregate value
    >> +///
    >> +class ExtractValueInst : public Instruction {
    >> +  ExtractValueInst(const ExtractValueInst &EVI);
    >> +  void init(Value *Agg, Value* const *Idx, unsigned NumIdx);
    >> +  void init(Value *Agg, Value *Idx);
    >> +
    >> +  template
    >> +  void init(Value *Agg, InputIterator IdxBegin, InputIterator  
    >> IdxEnd,
    >> +            const std::string &Name,
    >> +            // This argument ensures that we have an iterator we can
    >> +            // do arithmetic on in constant time
    >> +            std::random_access_iterator_tag) {
    >> +    unsigned NumIdx = static_cast(std::distance(IdxBegin,
    >> IdxEnd));
    >> +
    >> +    if (NumIdx > 0) {
    >
    > I thought the instruction required at least one index?  Likewise in a
    > couple other places.
    
    It doesn't really need to require an index. An extractvalue with
    no indicies is an identity operation.
    
    >
    >
    >> +++ llvm/trunk/test/Verifier/2002-11-05-GetelementptrPointers.ll Thu
    >> May 15 14:50:34 2008
    >> @@ -1,7 +1,7 @@
    >> -; RUN: not llvm-as < %s |& grep {Invalid getelementptr indices}
    >> +; RUN: llvm-as < %s
    >>
    >> -; This testcase is invalid because we are indexing into a pointer
    >> that is
    >> -; contained WITHIN a structure.
    >> +; This testcase was previously considered invalid for indexing into
    >> a pointer
    >> +; that is contained WITHIN a structure, but this is now valid.
    >>
    >> define void @test({i32, i32*} * %X) {
    >> 	getelementptr {i32, i32*} * %X, i32 0, i32 1, i32 0
    >
    > Why is this valid?
    
    It isn't. This was a mistake which has since been fixed.
    
    Dan
    
    
    
    From clattner at apple.com  Fri May 23 17:15:19 2008
    From: clattner at apple.com (Chris Lattner)
    Date: Fri, 23 May 2008 15:15:19 -0700
    Subject: [llvm-commits] [llvm] r51157 - in /llvm/trunk:
    	include/llvm/Constants.h include/llvm/Instruction.def
    	include/llvm/Instructions.h include/llvm/Support/InstVisitor.h
    	lib/AsmParser/llvmAsmParser.cpp.cvs	lib/AsmParser/llvmAsmParser.h.cvs
    	lib/AsmParser/llvmAsmParser.y	lib/AsmParser/llvmAsmParser.y.cvs
    	lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	lib/VMCore/ConstantFold.cpp
    	lib/VMCore/ConstantFold.h	lib/VMCore/Constants.cpp	lib/VMCore/Instructions.cpp
    	lib/VMCore/Verifier.cpp	test/Verifier/2002-11-05-GetelementptrPointers.ll
    In-Reply-To: <270ECD9C-5336-4FC7-8855-B271C4893AA5@apple.com>
    References: <200805151950.m4FJoZLD009863@zion.cs.uiuc.edu>
    	<06120267-4872-4ABD-8BCA-32614BF3A86C@apple.com>
    	<270ECD9C-5336-4FC7-8855-B271C4893AA5@apple.com>
    Message-ID: 
    
    
    On May 23, 2008, at 3:08 PM, Dan Gohman wrote:
    
    >>> +  template
    >>> +  void init(Value *Agg, InputIterator IdxBegin, InputIterator
    >>> IdxEnd,
    >>> +            const std::string &Name,
    >>> +            // This argument ensures that we have an iterator we  
    >>> can
    >>> +            // do arithmetic on in constant time
    >>> +            std::random_access_iterator_tag) {
    >>> +    unsigned NumIdx = static_cast(std::distance(IdxBegin,
    >>> IdxEnd));
    >>> +
    >>> +    if (NumIdx > 0) {
    >>
    >> I thought the instruction required at least one index?  Likewise in a
    >> couple other places.
    >
    > It doesn't really need to require an index. An extractvalue with
    > no indicies is an identity operation.
    
    LangRef claims otherwise.  Unless there is a reason for it, I'd  
    recommend banning zero-index versions of these.  We can always choose  
    to allow them later if needed.
    
    -Chris
    
    
    From gohman at apple.com  Fri May 23 17:24:42 2008
    From: gohman at apple.com (Dan Gohman)
    Date: Fri, 23 May 2008 15:24:42 -0700
    Subject: [llvm-commits] [llvm] r51468 - in /llvm/trunk:
    	include/llvm/Bitcode/LLVMBitCodes.h include/llvm/Type.h
    	lib/AsmParser/LLLexer.cpp lib/AsmParser/llvmAsmParser.cpp.cvs
    	lib/AsmParser/llvmAsmParser.h.cvs lib/AsmParser/llvmAsmParser.y
    	lib/AsmParser/llvmAsmParser.y.cvs	lib/Bitcode/Reader/BitcodeReader.cpp
    	lib/Bitcode/Writer/BitcodeWriter.cpp	lib/Bitcode/Writer/ValueEnumerator.cpp
    	test/Assembler/insertextractvalue.ll	test/Verifier/2006-07-11-StoreStruct.ll
    	utils/llvm.grm
    In-Reply-To: <80E072E0-F83A-42CD-98E7-68E9B50DB978@apple.com>
    References: <200805230155.m4N1tVrR001980@zion.cs.uiuc.edu>
    	<80E072E0-F83A-42CD-98E7-68E9B50DB978@apple.com>
    Message-ID: 
    
    
    On May 23, 2008, at 2:45 PM, Chris Lattner wrote:
    
    > On May 22, 2008, at 6:55 PM, Dan Gohman wrote:
    >> URL: http://llvm.org/viewvc/llvm-project?rev=51468&view=rev
    >> Log:
    >> Make structs and arrays first-class types, and add assembly
    >> and bitcode support for the extractvalue and insertvalue
    >> instructions and constant expressions.
    >
    > Woo!
    >
    >> +++ llvm/trunk/include/llvm/Type.h Thu May 22 20:55:30 2008
    >> @@ -216,8 +216,8 @@
    >>  /// is a valid type for a Value.
    >>  ///
    >>  inline bool isFirstClassType() const {
    >> -    // Coming soon: first-class struct and array types...
    >> -    return isSingleValueType();
    >> +    return isSingleValueType() ||
    >> +           ID == StructTyID || ID == ArrayTyID;
    >>  }
    >
    > At this point, is it faster to just check that this *isn't* void and
    > functiontype?
    
    There's also opaque and label types. I guess that's still
    4, instead of 6.
    
    >
    >
    >> @@ -1966,6 +1967,48 @@
    >>      GEN_ERROR("Invalid shufflevector operands");
    >>    $$ = ConstantExpr::getShuffleVector($3, $5, $7);
    >>    CHECK_FOR_ERROR
    >> +  }
    >> +  | EXTRACTVALUE '(' ConstVal IndexList ')' {
    >
    > Does IndexList start with a comma?  "extractvalue ( {i32} zeroinit
    > 0 )" is strange, I think a comma is needed.  Also, constantexprs
    > should not require types on the indices either.  It should just take a
    > list of EUINT64VAL's, like getresult.
    
    Yes, the IndexList production starts with a comma.
    
    >> +++ llvm/trunk/lib/Bitcode/Writer/ValueEnumerator.cpp Thu May 22
    >> 20:55:30 2008
    >> @@ -103,10 +103,10 @@
    >>  // in the table (have low bit-width).
    >>  std::stable_sort(Types.begin(), Types.end(), CompareByFrequency);
    >>
    >> -  // Partition the Type ID's so that the first-class types occur
    >> before the
    >> +  // Partition the Type ID's so that the single-value types occur
    >> before the
    >>  // aggregate types.  This allows the aggregate types to be dropped
    >> from the
    >>  // type table after parsing the global variable initializers.
    >> -  std::partition(Types.begin(), Types.end(), isFirstClassType);
    >> +  std::partition(Types.begin(), Types.end(), isSingleValueType);
    >
    > Is this required for correctness?  This could cause a significant BC
    > file size increase for real world apps.  I'd try kimwitu and 176.gcc
    > as examples.
    
    It is required for correctness, given some other stuff that the
    BC writer does. But it shouldn't change the BC file size;
    isSingleValueType does exactly what isFirstClassType used to do;
    that's why it exists even.
    
    Dan
    
    
    
    From gohman at apple.com  Fri May 23 17:27:03 2008
    From: gohman at apple.com (Dan Gohman)
    Date: Fri, 23 May 2008 22:27:03 -0000
    Subject: [llvm-commits] [llvm] r51510 -
    	/llvm/trunk/test/Archive/toc_MacOSX.ll
    Message-ID: <200805232227.m4NMR3ce007397@zion.cs.uiuc.edu>
    
    Author: djg
    Date: Fri May 23 17:27:01 2008
    New Revision: 51510
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51510&view=rev
    Log:
    Remove a bogus svn:mime-type property.
    
    Modified:
        llvm/trunk/test/Archive/toc_MacOSX.ll   (props changed)
    
    Propchange: llvm/trunk/test/Archive/toc_MacOSX.ll
    
    ------------------------------------------------------------------------------
    --- svn:mime-type (original)
    +++ svn:mime-type (removed)
    @@ -1 +0,0 @@
    -application/octet-stream
    
    
    
    
    From clattner at apple.com  Fri May 23 17:29:57 2008
    From: clattner at apple.com (Chris Lattner)
    Date: Fri, 23 May 2008 15:29:57 -0700
    Subject: [llvm-commits] [llvm] r51468 - in /llvm/trunk:
    	include/llvm/Bitcode/LLVMBitCodes.h include/llvm/Type.h
    	lib/AsmParser/LLLexer.cpp lib/AsmParser/llvmAsmParser.cpp.cvs
    	lib/AsmParser/llvmAsmParser.h.cvs lib/AsmParser/llvmAsmParser.y
    	lib/AsmParser/llvmAsmParser.y.cvs	lib/Bitcode/Reader/BitcodeReader.cpp
    	lib/Bitcode/Writer/BitcodeWriter.cpp	lib/Bitcode/Writer/ValueEnumerator.cpp
    	test/Assembler/insertextractvalue.ll	test/Verifier/2006-07-11-StoreStruct.ll
    	utils/llvm.grm
    In-Reply-To: 
    References: <200805230155.m4N1tVrR001980@zion.cs.uiuc.edu>
    	<80E072E0-F83A-42CD-98E7-68E9B50DB978@apple.com>
    	
    Message-ID: <5C8FBADF-1DED-4E2F-88E9-8FFFA2BCBA0F@apple.com>
    
    
    On May 23, 2008, at 3:24 PM, Dan Gohman wrote:
    
    >>> +  // Partition the Type ID's so that the single-value types occur
    >>> before the
    >>> // aggregate types.  This allows the aggregate types to be dropped
    >>> from the
    >>> // type table after parsing the global variable initializers.
    >>> -  std::partition(Types.begin(), Types.end(), isFirstClassType);
    >>> +  std::partition(Types.begin(), Types.end(), isSingleValueType);
    >>
    >> Is this required for correctness?  This could cause a significant BC
    >> file size increase for real world apps.  I'd try kimwitu and 176.gcc
    >> as examples.
    >
    > It is required for correctness, given some other stuff that the
    > BC writer does. But it shouldn't change the BC file size;
    > isSingleValueType does exactly what isFirstClassType used to do;
    > that's why it exists even.
    
    Oh, right!  Thanks Dan,
    
    -Chris
    
    
    From gohman at apple.com  Fri May 23 17:47:52 2008
    From: gohman at apple.com (Dan Gohman)
    Date: Fri, 23 May 2008 22:47:52 -0000
    Subject: [llvm-commits] [llvm] r51511 - /llvm/trunk/include/llvm/Type.h
    Message-ID: <200805232247.m4NMlqMv010697@zion.cs.uiuc.edu>
    
    Author: djg
    Date: Fri May 23 17:47:52 2008
    New Revision: 51511
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51511&view=rev
    Log:
    It turns out there are only 3 non-first-class type kinds left now, so
    it's simpler for isFirstClassType to use a negative test.
    
    Modified:
        llvm/trunk/include/llvm/Type.h
    
    Modified: llvm/trunk/include/llvm/Type.h
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Type.h?rev=51511&r1=51510&r2=51511&view=diff
    
    ==============================================================================
    --- llvm/trunk/include/llvm/Type.h (original)
    +++ llvm/trunk/include/llvm/Type.h Fri May 23 17:47:52 2008
    @@ -216,8 +216,9 @@
       /// is a valid type for a Value.
       ///
       inline bool isFirstClassType() const {
    -    return isSingleValueType() ||
    -           ID == StructTyID || ID == ArrayTyID;
    +    // There are more first-class kinds than non-first-class kinds, so a
    +    // negative test is simpler than a positive one.
    +    return ID != FunctionTyID && ID != VoidTyID && ID != OpaqueTyID;
       }
     
       /// isSingleValueType - Return true if the type is a valid type for a
    
    
    
    
    From gohman at apple.com  Fri May 23 17:50:26 2008
    From: gohman at apple.com (Dan Gohman)
    Date: Fri, 23 May 2008 22:50:26 -0000
    Subject: [llvm-commits] [llvm] r51512 - /llvm/trunk/docs/LangRef.html
    Message-ID: <200805232250.m4NMoQi2011373@zion.cs.uiuc.edu>
    
    Author: djg
    Date: Fri May 23 17:50:26 2008
    New Revision: 51512
    
    URL: http://llvm.org/viewvc/llvm-project?rev=51512&view=rev
    Log:
    label is a first-class type.
    
    Modified:
        llvm/trunk/docs/LangRef.html
    
    Modified: llvm/trunk/docs/LangRef.html
    URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=51512&r1=51511&r2=51512&view=diff
    
    ==============================================================================
    --- llvm/trunk/docs/LangRef.html (original)
    +++ llvm/trunk/docs/LangRef.html Fri May 23 17:50:26 2008
    @@ -1040,6 +1040,7 @@
               vector
               structure,
               array,
    +          label.
           
         
         
    From evan.cheng at apple.com Fri May 23 17:59:19 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 23 May 2008 15:59:19 -0700 Subject: [llvm-commits] [llvm] r51440 - /llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp In-Reply-To: <200805222116.m4MLGXFM016613@zion.cs.uiuc.edu> References: <200805222116.m4MLGXFM016613@zion.cs.uiuc.edu> Message-ID: <183F47D6-F436-427A-AA07-F92CE45EC71F@apple.com> Hi David, This breaks quite a few tests. See Grawp-PIC nightly tester results. I'll back it out for now. New Test Failures: Applications/ClamAV/clamscan [LLC compile, LLC-BETA compile, , LLC] Applications/JM/lencod/lencod [LLC compile, LLC-BETA compile, , LLC, LLC-BETA] Applications/kimwitu++/kc [LLC compile, LLC-BETA compile, , LLC, LLC- BETA] Applications/oggenc/oggenc [LLC compile, LLC-BETA compile, , LLC, LLC- BETA] Applications/SPASS/SPASS [LLC compile, LLC-BETA compile, , LLC, LLC- BETA] Applications/sqlite3/sqlite3 [LLC compile, LLC-BETA compile, , LLC, LLC-BETA] Applications/treecc/treecc [LLC compile, LLC-BETA compile, , LLC, LLC- BETA] Benchmarks/FreeBench/analyzer/analyzer [] Benchmarks/llubenchmark/llu [LLC compile, LLC-BETA compile, , LLC, LLC- BETA] Benchmarks/MallocBench/cfrac/cfrac [LLC compile, LLC-BETA compile, , LLC, LLC-BETA] Benchmarks/MallocBench/espresso/espresso [LLC compile, LLC-BETA compile, , LLC, LLC-BETA] Benchmarks/MiBench/automotive-susan/automotive-susan [LLC compile, LLC- BETA compile, , LLC, LLC-BETA] Benchmarks/MiBench/consumer-jpeg/consumer-jpeg [LLC compile, LLC-BETA compile, , LLC, LLC-BETA] Benchmarks/MiBench/consumer-lame/consumer-lame [LLC compile, LLC-BETA compile, , LLC, LLC-BETA] Benchmarks/MiBench/consumer-typeset/consumer-typeset [LLC compile, LLC- BETA compile, , LLC, LLC-BETA] Benchmarks/MiBench/office-ispell/office-ispell [LLC compile, LLC-BETA compile, , LLC] ... Evan On May 22, 2008, at 2:16 PM, David Greene wrote: > Author: greened > Date: Thu May 22 16:16:33 2008 > New Revision: 51440 > > URL: http://llvm.org/viewvc/llvm-project?rev=51440&view=rev > Log: > > When rewriting defs and uses after spilling, don't set the weight of a > live interval to infinity if the instruction being rewritten is an > original remat def instruction. We were only checking against the > clone > of the remat def which doesn't actually appear in the IR at all. > > Modified: > llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp > > Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=51440&r1=51439&r2=51440&view=diff > > = > = > = > = > = > = > = > = > ====================================================================== > --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original) > +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Thu May 22 > 16:16:33 2008 > @@ -1150,7 +1150,9 @@ > } > MachineBasicBlock *MBB = MI->getParent(); > > - if (ImpUse && MI != ReMatDefMI) { > + // ReMatDefMI is a clone and not in the IR at all, so check > + // RefMatOrigDefMI too. > + if (ImpUse && MI != ReMatDefMI && MI != ReMatOrigDefMI) { > // Re-matting an instruction with virtual register use. Update > the > // register interval's spill weight to HUGE_VALF to prevent it > from > // being spilled. > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20080523/af0013b2/attachment.html From evan.cheng at apple.com Fri May 23 18:00:04 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 23 May 2008 23:00:04 -0000 Subject: [llvm-commits] [llvm] r51513 - /llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <200805232300.m4NN04Rs013176@zion.cs.uiuc.edu> Author: evancheng Date: Fri May 23 18:00:04 2008 New Revision: 51513 URL: http://llvm.org/viewvc/llvm-project?rev=51513&view=rev Log: Revert 51440 as it breaks a bunch of PIC tests. Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=51513&r1=51512&r2=51513&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original) +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Fri May 23 18:00:04 2008 @@ -1150,9 +1150,7 @@ } MachineBasicBlock *MBB = MI->getParent(); - // ReMatDefMI is a clone and not in the IR at all, so check - // RefMatOrigDefMI too. - if (ImpUse && MI != ReMatDefMI && MI != ReMatOrigDefMI) { + if (ImpUse && MI != ReMatDefMI) { // Re-matting an instruction with virtual register use. Update the // register interval's spill weight to HUGE_VALF to prevent it from // being spilled. From kremenek at apple.com Fri May 23 18:13:27 2008 From: kremenek at apple.com (Ted Kremenek) Date: Fri, 23 May 2008 23:13:27 -0000 Subject: [llvm-commits] [llvm] r51516 - /llvm/tags/checker/checker-31/ Message-ID: <200805232313.m4NNDRBA017180@zion.cs.uiuc.edu> Author: kremenek Date: Fri May 23 18:13:27 2008 New Revision: 51516 URL: http://llvm.org/viewvc/llvm-project?rev=51516&view=rev Log: Tagging checker-31. Added: llvm/tags/checker/checker-31/ - copied from r51515, llvm/trunk/ From dalej at apple.com Fri May 23 18:13:41 2008 From: dalej at apple.com (Dale Johannesen) Date: Fri, 23 May 2008 23:13:41 -0000 Subject: [llvm-commits] [llvm] r51517 - /llvm/trunk/docs/LangRef.html Message-ID: <200805232313.m4NNDfOn017377@zion.cs.uiuc.edu> Author: johannes Date: Fri May 23 18:13:41 2008 New Revision: 51517 URL: http://llvm.org/viewvc/llvm-project?rev=51517&view=rev Log: Document common linkage. Modified: llvm/trunk/docs/LangRef.html Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=51517&r1=51516&r2=51517&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Fri May 23 18:13:41 2008 @@ -466,7 +466,7 @@
    -
    internal
    +
    internal:
    Global values with internal linkage are only directly accessible by objects in the current module. In particular, linking code into a module with @@ -485,14 +485,22 @@ allowed to be discarded.
    +
    common:
    + +
    "common" linkage is exactly the same as linkonce + linkage, except that unreferenced common globals may not be + discarded. This is used for globals that may be emitted in multiple + translation units, but that are not guaranteed to be emitted into every + translation unit that uses them. One example of this is tentative + definitions in C, such as "int X;" at global scope. +
    +
    weak:
    -
    "weak" linkage is exactly the same as linkonce linkage, - except that unreferenced weak globals may not be discarded. This is - used for globals that may be emitted in multiple translation units, but that - are not guaranteed to be emitted into every translation unit that uses them. - One example of this are common globals in C, such as "int X;" at - global scope. +
    "weak" linkage is the same as common linkage, except + that some targets may choose to emit different assembly sequences for them + for target-dependent reasons. This is used for globals that are declared + "weak" in C source code.
    appending:
    From tonic at nondot.org Fri May 23 18:32:42 2008 From: tonic at nondot.org (Tanya Lattner) Date: Fri, 23 May 2008 23:32:42 -0000 Subject: [llvm-commits] [llvm] r51520 - in /llvm/branches/release_23/win32: Analysis/Analysis.vcproj Transforms/Transforms.vcproj Message-ID: <200805232332.m4NNWg7W005423@zion.cs.uiuc.edu> Author: tbrethou Date: Fri May 23 18:32:42 2008 New Revision: 51520 URL: http://llvm.org/viewvc/llvm-project?rev=51520&view=rev Log: Fix windows project files. Modified: llvm/branches/release_23/win32/Analysis/Analysis.vcproj llvm/branches/release_23/win32/Transforms/Transforms.vcproj Modified: llvm/branches/release_23/win32/Analysis/Analysis.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_23/win32/Analysis/Analysis.vcproj?rev=51520&r1=51519&r2=51520&view=diff ============================================================================== --- llvm/branches/release_23/win32/Analysis/Analysis.vcproj (original) +++ llvm/branches/release_23/win32/Analysis/Analysis.vcproj Fri May 23 18:32:42 2008 @@ -353,6 +353,14 @@ > + + + + @@ -483,6 +491,10 @@ > + + Modified: llvm/branches/release_23/win32/Transforms/Transforms.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_23/win32/Transforms/Transforms.vcproj?rev=51520&r1=51519&r2=51520&view=diff ============================================================================== --- llvm/branches/release_23/win32/Transforms/Transforms.vcproj (original) +++ llvm/branches/release_23/win32/Transforms/Transforms.vcproj Fri May 23 18:32:42 2008 @@ -352,6 +352,10 @@ > + + @@ -396,10 +400,6 @@ > - - @@ -721,6 +721,10 @@ > + + From evan.cheng at apple.com Fri May 23 19:07:06 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 24 May 2008 00:07:06 -0000 Subject: [llvm-commits] [llvm] r51521 - in /llvm/trunk: include/llvm/IntrinsicsX86.td lib/Transforms/Scalar/LoopStrengthReduce.cpp Message-ID: <200805240007.m4O077kG018896@zion.cs.uiuc.edu> Author: evancheng Date: Fri May 23 19:07:06 2008 New Revision: 51521 URL: http://llvm.org/viewvc/llvm-project?rev=51521&view=rev Log: Remove x86.sse2.loadh.pd and x86.sse2.loadl.pd. These will be lowered into load and shuffle instructions. Modified: llvm/trunk/include/llvm/IntrinsicsX86.td llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Modified: llvm/trunk/include/llvm/IntrinsicsX86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsX86.td?rev=51521&r1=51520&r2=51521&view=diff ============================================================================== --- llvm/trunk/include/llvm/IntrinsicsX86.td (original) +++ llvm/trunk/include/llvm/IntrinsicsX86.td Fri May 23 19:07:06 2008 @@ -507,12 +507,6 @@ def int_x86_sse2_movs_d : GCCBuiltin<"__builtin_ia32_movsd">, Intrinsic<[llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_loadh_pd : GCCBuiltin<"__builtin_ia32_loadhpd">, - Intrinsic<[llvm_v2f64_ty, llvm_v2f64_ty, - llvm_ptr_ty], [IntrReadMem]>; - def int_x86_sse2_loadl_pd : GCCBuiltin<"__builtin_ia32_loadlpd">, - Intrinsic<[llvm_v2f64_ty, llvm_v2f64_ty, - llvm_ptr_ty], [IntrReadMem]>; def int_x86_sse2_shuf_pd : GCCBuiltin<"__builtin_ia32_shufpd">, Intrinsic<[llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i32_ty], [IntrNoMem]>; Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=51521&r1=51520&r2=51521&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Fri May 23 19:07:06 2008 @@ -1119,11 +1119,6 @@ if (II->getOperand(1) == OperandVal) isAddress = true; break; - case Intrinsic::x86_sse2_loadh_pd: - case Intrinsic::x86_sse2_loadl_pd: - if (II->getOperand(2) == OperandVal) - isAddress = true; - break; } } return isAddress; From evan.cheng at apple.com Fri May 23 19:07:30 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 24 May 2008 00:07:30 -0000 Subject: [llvm-commits] [llvm] r51522 - /llvm/trunk/lib/Target/X86/X86InstrSSE.td Message-ID: <200805240007.m4O07Uci018931@zion.cs.uiuc.edu> Author: evancheng Date: Fri May 23 19:07:29 2008 New Revision: 51522 URL: http://llvm.org/viewvc/llvm-project?rev=51522&view=rev Log: Remove x86.sse2.loadh.pd and x86.sse2.loadl.pd. These will be lowered into load and shuffle instructions. Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=51522&r1=51521&r2=51522&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Fri May 23 19:07:29 2008 @@ -3053,10 +3053,6 @@ // FIXME: Temporary workaround since 2-wide shuffle is broken. def : Pat<(int_x86_sse2_movs_d VR128:$src1, VR128:$src2), (v2f64 (MOVLPDrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_loadh_pd VR128:$src1, addr:$src2), - (v2f64 (MOVHPDrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_loadl_pd VR128:$src1, addr:$src2), - (v2f64 (MOVLPDrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; def : Pat<(int_x86_sse2_shuf_pd VR128:$src1, VR128:$src2, imm:$src3), (v2f64 (SHUFPDrri VR128:$src1, VR128:$src2, imm:$src3))>, Requires<[HasSSE2]>; From evan.cheng at apple.com Fri May 23 19:08:39 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 24 May 2008 00:08:39 -0000 Subject: [llvm-commits] [llvm] r51523 - in /llvm/trunk: lib/VMCore/AutoUpgrade.cpp test/Bitcode/sse2_loadl_pd.ll test/Bitcode/sse2_loadl_pd.ll.bc Message-ID: <200805240008.m4O08dSm018995@zion.cs.uiuc.edu> Author: evancheng Date: Fri May 23 19:08:39 2008 New Revision: 51523 URL: http://llvm.org/viewvc/llvm-project?rev=51523&view=rev Log: Autoupgrade x86.sse2.loadh.pd and x86.sse2.loadl.pd. Added: llvm/trunk/test/Bitcode/sse2_loadl_pd.ll llvm/trunk/test/Bitcode/sse2_loadl_pd.ll.bc (with props) Modified: llvm/trunk/lib/VMCore/AutoUpgrade.cpp Modified: llvm/trunk/lib/VMCore/AutoUpgrade.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AutoUpgrade.cpp?rev=51523&r1=51522&r2=51523&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/AutoUpgrade.cpp (original) +++ llvm/trunk/lib/VMCore/AutoUpgrade.cpp Fri May 23 19:08:39 2008 @@ -148,8 +148,10 @@ VT, (Type *)0)); return true; - } else if (Name.compare(5,16,"x86.sse2.movl.dq",16) == 0) { - // Calls to this intrinsic are transformed into ShuffleVector's. + } else if (Name.compare(5,17,"x86.sse2.loadh.pd",17) == 0 || + Name.compare(5,17,"x86.sse2.loadl.pd",17) == 0 || + Name.compare(5,16,"x86.sse2.movl.dq",16) == 0) { + // Calls to these intrinsics are transformed into ShuffleVector's. NewFn = 0; return true; } @@ -184,23 +186,52 @@ assert(F && "CallInst has no function associated with it."); if (!NewFn) { - if (strcmp(F->getNameStart(), "llvm.x86.sse2.movl.dq") == 0) { + bool isLoadH = false, isLoadL = false, isMovL = false; + if (strcmp(F->getNameStart(), "llvm.x86.sse2.loadh.pd") == 0) + isLoadH = true; + else if (strcmp(F->getNameStart(), "llvm.x86.sse2.loadl.pd") == 0) + isLoadL = true; + else if (strcmp(F->getNameStart(), "llvm.x86.sse2.movl.dq") == 0) + isMovL = true; + + if (isLoadH || isLoadL || isMovL) { std::vector Idxs; - Constant *Zero = ConstantInt::get(Type::Int32Ty, 0); - Idxs.push_back(Zero); - Idxs.push_back(Zero); - Idxs.push_back(Zero); - Idxs.push_back(Zero); - Value *ZeroV = ConstantVector::get(Idxs); - - Idxs.clear(); - Idxs.push_back(ConstantInt::get(Type::Int32Ty, 4)); - Idxs.push_back(ConstantInt::get(Type::Int32Ty, 5)); - Idxs.push_back(ConstantInt::get(Type::Int32Ty, 2)); - Idxs.push_back(ConstantInt::get(Type::Int32Ty, 3)); - Value *Mask = ConstantVector::get(Idxs); - ShuffleVectorInst *SI = new ShuffleVectorInst(ZeroV, CI->getOperand(1), - Mask, "upgraded", CI); + Value *Op0 = CI->getOperand(1); + ShuffleVectorInst *SI; + if (isLoadH || isLoadL) { + Value *Op1 = UndefValue::get(Op0->getType()); + Value *Addr = new BitCastInst(CI->getOperand(2), + PointerType::getUnqual(Type::DoubleTy), + "upgraded.", CI); + Value *Load = new LoadInst(Addr, "upgraded.", false, 8, CI); + Value *Idx = ConstantInt::get(Type::Int32Ty, 0); + Op1 = InsertElementInst::Create(Op1, Load, Idx, "upgraded.", CI); + + if (isLoadH) { + Idxs.push_back(ConstantInt::get(Type::Int32Ty, 0)); + Idxs.push_back(ConstantInt::get(Type::Int32Ty, 2)); + } else { + Idxs.push_back(ConstantInt::get(Type::Int32Ty, 2)); + Idxs.push_back(ConstantInt::get(Type::Int32Ty, 1)); + } + Value *Mask = ConstantVector::get(Idxs); + SI = new ShuffleVectorInst(Op0, Op1, Mask, "upgraded.", CI); + } else { + Constant *Zero = ConstantInt::get(Type::Int32Ty, 0); + Idxs.push_back(Zero); + Idxs.push_back(Zero); + Idxs.push_back(Zero); + Idxs.push_back(Zero); + Value *ZeroV = ConstantVector::get(Idxs); + + Idxs.clear(); + Idxs.push_back(ConstantInt::get(Type::Int32Ty, 4)); + Idxs.push_back(ConstantInt::get(Type::Int32Ty, 5)); + Idxs.push_back(ConstantInt::get(Type::Int32Ty, 2)); + Idxs.push_back(ConstantInt::get(Type::Int32Ty, 3)); + Value *Mask = ConstantVector::get(Idxs); + SI = new ShuffleVectorInst(ZeroV, Op0, Mask, "upgraded.", CI); + } // Handle any uses of the old CallInst. if (!CI->use_empty()) @@ -233,7 +264,7 @@ // Cast the second parameter to the correct type. BitCastInst *BC = new BitCastInst(CI->getOperand(2), NewFn->getFunctionType()->getParamType(1), - "upgraded", CI); + "upgraded.", CI); Operands[1] = BC; // Construct a new CallInst Added: llvm/trunk/test/Bitcode/sse2_loadl_pd.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/sse2_loadl_pd.ll?rev=51523&view=auto ============================================================================== --- llvm/trunk/test/Bitcode/sse2_loadl_pd.ll (added) +++ llvm/trunk/test/Bitcode/sse2_loadl_pd.ll Fri May 23 19:08:39 2008 @@ -0,0 +1,2 @@ +; RUN: llvm-dis < %s.bc | not grep {i32 @llvm\\.loadl.pd} +; RUN: llvm-dis < %s.bc | grep shufflevector Added: llvm/trunk/test/Bitcode/sse2_loadl_pd.ll.bc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/sse2_loadl_pd.ll.bc?rev=51523&view=auto ============================================================================== Binary file - no diff available. Propchange: llvm/trunk/test/Bitcode/sse2_loadl_pd.ll.bc ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream From evan.cheng at apple.com Fri May 23 19:09:24 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 24 May 2008 00:09:24 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r51524 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Message-ID: <200805240009.m4O09PrB019039@zion.cs.uiuc.edu> Author: evancheng Date: Fri May 23 19:09:24 2008 New Revision: 51524 URL: http://llvm.org/viewvc/llvm-project?rev=51524&view=rev Log: Lower loadhpd / loadlpd into load + insert + shuffle. Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp?rev=51524&r1=51523&r2=51524&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Fri May 23 19:09:24 2008 @@ -278,6 +278,22 @@ Result = Builder.CreateBitCast(Result, ResultType, "tmp"); return true; } + case IX86_BUILTIN_LOADHPD: { + Value *Load = Builder.CreateLoad(Ops[1], "tmp"); + Ops[1] = BuildVector(Load, UndefValue::get(Type::DoubleTy), NULL); + Ops[1] = Builder.CreateBitCast(Ops[1], ResultType, "tmp"); + Result = BuildVectorShuffle(Ops[0], Ops[1], 0, 2); + Result = Builder.CreateBitCast(Result, ResultType, "tmp"); + return true; + } + case IX86_BUILTIN_LOADLPD: { + Value *Load = Builder.CreateLoad(Ops[1], "tmp"); + Ops[1] = BuildVector(Load, UndefValue::get(Type::DoubleTy), NULL); + Ops[1] = Builder.CreateBitCast(Ops[1], ResultType, "tmp"); + Result = BuildVectorShuffle(Ops[0], Ops[1], 2, 1); + Result = Builder.CreateBitCast(Result, ResultType, "tmp"); + return true; + } case IX86_BUILTIN_STOREHPS: { VectorType *v2f64 = VectorType::get(Type::DoubleTy, 2); PointerType *f64Ptr = PointerType::getUnqual(Type::DoubleTy); From evan.cheng at apple.com Fri May 23 19:10:02 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 24 May 2008 00:10:02 -0000 Subject: [llvm-commits] [llvm] r51525 - /llvm/trunk/test/CodeGen/X86/vec_loadhl.ll Message-ID: <200805240010.m4O0A2XQ019171@zion.cs.uiuc.edu> Author: evancheng Date: Fri May 23 19:10:02 2008 New Revision: 51525 URL: http://llvm.org/viewvc/llvm-project?rev=51525&view=rev Log: New loadl_pd and loadh_pd tests. Added: llvm/trunk/test/CodeGen/X86/vec_loadhl.ll Added: llvm/trunk/test/CodeGen/X86/vec_loadhl.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_loadhl.ll?rev=51525&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/vec_loadhl.ll (added) +++ llvm/trunk/test/CodeGen/X86/vec_loadhl.ll Fri May 23 19:10:02 2008 @@ -0,0 +1,19 @@ +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movlpd +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movhpd +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep movsd + +define void @t1(<2 x double>* %r, <2 x double>* %A, double %B) nounwind { + %tmp3 = load <2 x double>* %A, align 16 + %tmp7 = insertelement <2 x double> undef, double %B, i32 0 + %tmp9 = shufflevector <2 x double> %tmp3, <2 x double> %tmp7, <2 x i32> < i32 2, i32 1 > + store <2 x double> %tmp9, <2 x double>* %r, align 16 + ret void +} + +define void @t2(<2 x double>* %r, <2 x double>* %A, double %B) nounwind { + %tmp3 = load <2 x double>* %A, align 16 + %tmp7 = insertelement <2 x double> undef, double %B, i32 0 + %tmp9 = shufflevector <2 x double> %tmp3, <2 x double> %tmp7, <2 x i32> < i32 0, i32 2 > + store <2 x double> %tmp9, <2 x double>* %r, align 16 + ret void +} From evan.cheng at apple.com Fri May 23 19:10:14 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 24 May 2008 00:10:14 -0000 Subject: [llvm-commits] [llvm] r51526 - /llvm/trunk/lib/Target/X86/README-SSE.txt Message-ID: <200805240010.m4O0AEIi019187@zion.cs.uiuc.edu> Author: evancheng Date: Fri May 23 19:10:13 2008 New Revision: 51526 URL: http://llvm.org/viewvc/llvm-project?rev=51526&view=rev Log: This is done. Modified: llvm/trunk/lib/Target/X86/README-SSE.txt Modified: llvm/trunk/lib/Target/X86/README-SSE.txt URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/README-SSE.txt?rev=51526&r1=51525&r2=51526&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/README-SSE.txt (original) +++ llvm/trunk/lib/Target/X86/README-SSE.txt Fri May 23 19:10:13 2008 @@ -382,52 +382,6 @@ //===---------------------------------------------------------------------===// -For this: - -#include -void test(__m128d *r, __m128d *A, double B) { - *r = _mm_loadl_pd(*A, &B); -} - -We generates: - - subl $12, %esp - movsd 24(%esp), %xmm0 - movsd %xmm0, (%esp) - movl 20(%esp), %eax - movapd (%eax), %xmm0 - movlpd (%esp), %xmm0 - movl 16(%esp), %eax - movapd %xmm0, (%eax) - addl $12, %esp - ret - -icc generates: - - movl 4(%esp), %edx #3.6 - movl 8(%esp), %eax #3.6 - movapd (%eax), %xmm0 #4.22 - movlpd 12(%esp), %xmm0 #4.8 - movapd %xmm0, (%edx) #4.3 - ret #5.1 - -So icc is smart enough to know that B is in memory so it doesn't load it and -store it back to stack. - -This should be fixed by eliminating the llvm.x86.sse2.loadl.pd intrinsic, -lowering it to a load+insertelement instead. Already match the load+shuffle -as movlpd, so this should be easy. We already get optimal code for: - -define void @test2(<2 x double>* %r, <2 x double>* %A, double %B) { -entry: - %tmp2 = load <2 x double>* %A, align 16 - %tmp8 = insertelement <2 x double> %tmp2, double %B, i32 0 - store <2 x double> %tmp8, <2 x double>* %r, align 16 - ret void -} - -//===---------------------------------------------------------------------===// - __m128d test1( __m128d A, __m128d B) { return _mm_shuffle_pd(A, B, 0x3); } From dalej at apple.com Fri May 23 19:10:20 2008 From: dalej at apple.com (Dale Johannesen) Date: Sat, 24 May 2008 00:10:20 -0000 Subject: [llvm-commits] [llvm] r51527 - /llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Message-ID: <200805240010.m4O0AKmg019227@zion.cs.uiuc.edu> Author: johannes Date: Fri May 23 19:10:20 2008 New Revision: 51527 URL: http://llvm.org/viewvc/llvm-project?rev=51527&view=rev Log: Put initialized const weak objects into correct sections on ppc32 darwin. g++.dg/abi/key2.C Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=51527&r1=51526&r2=51527&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Fri May 23 19:10:20 2008 @@ -977,7 +977,15 @@ case GlobalValue::CommonLinkage: O << "\t.globl " << name << '\n' << "\t.weak_definition " << name << '\n'; - SwitchToDataSection("\t.section __DATA,__datacoal_nt,coalesced", I); + if (!I->isConstant()) + SwitchToDataSection("\t.section __DATA,__datacoal_nt,coalesced", I); + else { + const ArrayType *AT = dyn_cast(Type); + if (AT && AT->getElementType()==Type::Int8Ty) + SwitchToDataSection("\t.section __TEXT,__const_coal,coalesced", I); + else + SwitchToDataSection("\t.section __DATA,__const_coal,coalesced", I); + } break; case GlobalValue::AppendingLinkage: // FIXME: appending linkage variables should go into a section of From baldrick at free.fr Fri May 23 20:00:53 2008 From: baldrick at free.fr (Duncan Sands) Date: Sat, 24 May 2008 01:00:53 -0000 Subject: [llvm-commits] [llvm] r51529 - /llvm/trunk/lib/Target/CBackend/CBackend.cpp Message-ID: <200805240100.m4O10rHm011906@zion.cs.uiuc.edu> Author: baldrick Date: Fri May 23 20:00:52 2008 New Revision: 51529 URL: http://llvm.org/viewvc/llvm-project?rev=51529&view=rev Log: Tweak how ConstantFP80Ty constants are output so that gcc doesn't warn about them. Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp Modified: llvm/trunk/lib/Target/CBackend/CBackend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CBackend/CBackend.cpp?rev=51529&r1=51528&r2=51529&view=diff ============================================================================== --- llvm/trunk/lib/Target/CBackend/CBackend.cpp (original) +++ llvm/trunk/lib/Target/CBackend/CBackend.cpp Fri May 23 20:00:52 2008 @@ -1823,7 +1823,7 @@ Out << "static const ConstantFP80Ty FPConstant" << FPCounter++ << " = { 0x" << std::hex << ((uint16_t)p[1] | (p[0] & 0xffffffffffffLL)<<16) - << ", 0x" << (uint16_t)(p[0] >> 48) << ",0,0,0" + << "ULL, 0x" << (uint16_t)(p[0] >> 48) << ",{0,0,0}" << "}; /* Long double constant */\n" << std::dec; } else if (FPC->getType() == Type::PPC_FP128Ty) { APInt api = FPC->getValueAPF().convertToAPInt(); From baldrick at free.fr Fri May 23 20:04:33 2008 From: baldrick at free.fr (Duncan Sands) Date: Sat, 24 May 2008 01:04:33 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r51530 - /llvm-gcc-4.2/trunk/gcc/tree-eh.c Message-ID: <200805240104.m4O14X8w012214@zion.cs.uiuc.edu> Author: baldrick Date: Fri May 23 20:04:33 2008 New Revision: 51530 URL: http://llvm.org/viewvc/llvm-project?rev=51530&view=rev Log: The exception handling lowering code sometimes duplicates blocks as an optimization. This kind of optimization can be better left to LLVM. Modified: llvm-gcc-4.2/trunk/gcc/tree-eh.c Modified: llvm-gcc-4.2/trunk/gcc/tree-eh.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree-eh.c?rev=51530&r1=51529&r2=51530&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/tree-eh.c (original) +++ llvm-gcc-4.2/trunk/gcc/tree-eh.c Fri May 23 20:04:33 2008 @@ -1328,7 +1328,13 @@ { int f_estimate, sw_estimate; + /* LLVM local begin - let LLVM make this decision. */ +#ifdef ENABLE_LLVM + if (1) +#else if (!optimize) +#endif + /* LLVM local end */ return false; /* Finally estimate N times, plus N gotos. */ From evan.cheng at apple.com Fri May 23 21:14:05 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 24 May 2008 02:14:05 -0000 Subject: [llvm-commits] [llvm] r51531 - in /llvm/trunk: include/llvm/IntrinsicsX86.td lib/Target/X86/X86InstrSSE.td lib/VMCore/AutoUpgrade.cpp test/Bitcode/sse2_movs_d.ll test/Bitcode/sse2_movs_d.ll.bc test/Bitcode/sse2_shuf_pd.ll test/Bitcode/sse2_shuf_pd.ll.bc test/Bitcode/sse2_unpck_pd.ll test/Bitcode/sse2_unpck_pd.ll.bc Message-ID: <200805240214.m4O2E5wR016645@zion.cs.uiuc.edu> Author: evancheng Date: Fri May 23 21:14:05 2008 New Revision: 51531 URL: http://llvm.org/viewvc/llvm-project?rev=51531&view=rev Log: Eliminate x86.sse2.movs.d, x86.sse2.shuf.pd, x86.sse2.unpckh.pd, and x86.sse2.unpckl.pd intrinsics. These will be lowered into shuffles. Added: llvm/trunk/test/Bitcode/sse2_movs_d.ll llvm/trunk/test/Bitcode/sse2_movs_d.ll.bc (with props) llvm/trunk/test/Bitcode/sse2_shuf_pd.ll llvm/trunk/test/Bitcode/sse2_shuf_pd.ll.bc (with props) llvm/trunk/test/Bitcode/sse2_unpck_pd.ll llvm/trunk/test/Bitcode/sse2_unpck_pd.ll.bc (with props) Modified: llvm/trunk/include/llvm/IntrinsicsX86.td llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/lib/VMCore/AutoUpgrade.cpp Modified: llvm/trunk/include/llvm/IntrinsicsX86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsX86.td?rev=51531&r1=51530&r2=51531&view=diff ============================================================================== --- llvm/trunk/include/llvm/IntrinsicsX86.td (original) +++ llvm/trunk/include/llvm/IntrinsicsX86.td Fri May 23 21:14:05 2008 @@ -504,18 +504,6 @@ // Shuffles. // FIXME: Temporary workarounds since 2-wide shuffle is broken. let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse2_movs_d : GCCBuiltin<"__builtin_ia32_movsd">, - Intrinsic<[llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_shuf_pd : GCCBuiltin<"__builtin_ia32_shufpd">, - Intrinsic<[llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_sse2_unpckh_pd : GCCBuiltin<"__builtin_ia32_unpckhpd">, - Intrinsic<[llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_unpckl_pd : GCCBuiltin<"__builtin_ia32_unpcklpd">, - Intrinsic<[llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; def int_x86_sse2_punpckh_qdq : GCCBuiltin<"__builtin_ia32_punpckhqdq128">, Intrinsic<[llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=51531&r1=51530&r2=51531&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Fri May 23 21:14:05 2008 @@ -3051,22 +3051,6 @@ (MOVZPQILo2PQIrr VR128:$src)>, Requires<[HasSSE2]>; // FIXME: Temporary workaround since 2-wide shuffle is broken. -def : Pat<(int_x86_sse2_movs_d VR128:$src1, VR128:$src2), - (v2f64 (MOVLPDrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_shuf_pd VR128:$src1, VR128:$src2, imm:$src3), - (v2f64 (SHUFPDrri VR128:$src1, VR128:$src2, imm:$src3))>, - Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_shuf_pd VR128:$src1, (memop addr:$src2),imm:$src3), - (v2f64 (SHUFPDrmi VR128:$src1, addr:$src2, imm:$src3))>, - Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_unpckh_pd VR128:$src1, VR128:$src2), - (v2f64 (UNPCKHPDrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_unpckh_pd VR128:$src1, (memop addr:$src2)), - (v2f64 (UNPCKHPDrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_unpckl_pd VR128:$src1, VR128:$src2), - (v2f64 (UNPCKLPDrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_unpckl_pd VR128:$src1, (memop addr:$src2)), - (v2f64 (UNPCKLPDrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; def : Pat<(int_x86_sse2_punpckh_qdq VR128:$src1, VR128:$src2), (v2i64 (PUNPCKHQDQrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; def : Pat<(int_x86_sse2_punpckh_qdq VR128:$src1, (memop addr:$src2)), Modified: llvm/trunk/lib/VMCore/AutoUpgrade.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AutoUpgrade.cpp?rev=51531&r1=51530&r2=51531&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/AutoUpgrade.cpp (original) +++ llvm/trunk/lib/VMCore/AutoUpgrade.cpp Fri May 23 21:14:05 2008 @@ -150,7 +150,11 @@ return true; } else if (Name.compare(5,17,"x86.sse2.loadh.pd",17) == 0 || Name.compare(5,17,"x86.sse2.loadl.pd",17) == 0 || - Name.compare(5,16,"x86.sse2.movl.dq",16) == 0) { + Name.compare(5,16,"x86.sse2.movl.dq",16) == 0 || + Name.compare(5,15,"x86.sse2.movs.d",15) == 0 || + Name.compare(5,16,"x86.sse2.shuf.pd",16) == 0 || + Name.compare(5,18,"x86.sse2.unpckh.pd",18) == 0 || + Name.compare(5,18,"x86.sse2.unpckl.pd",18) == 0 ) { // Calls to these intrinsics are transformed into ShuffleVector's. NewFn = 0; return true; @@ -187,17 +191,28 @@ if (!NewFn) { bool isLoadH = false, isLoadL = false, isMovL = false; + bool isMovSD = false, isShufPD = false; + bool isUnpckhPD = false, isUnpcklPD = false; if (strcmp(F->getNameStart(), "llvm.x86.sse2.loadh.pd") == 0) isLoadH = true; else if (strcmp(F->getNameStart(), "llvm.x86.sse2.loadl.pd") == 0) isLoadL = true; else if (strcmp(F->getNameStart(), "llvm.x86.sse2.movl.dq") == 0) isMovL = true; + else if (strcmp(F->getNameStart(), "llvm.x86.sse2.movs.d") == 0) + isMovSD = true; + else if (strcmp(F->getNameStart(), "llvm.x86.sse2.shuf.pd") == 0) + isShufPD = true; + else if (strcmp(F->getNameStart(), "llvm.x86.sse2.unpckh.pd") == 0) + isUnpckhPD = true; + else if (strcmp(F->getNameStart(), "llvm.x86.sse2.unpckl.pd") == 0) + isUnpcklPD = true; - if (isLoadH || isLoadL || isMovL) { + if (isLoadH || isLoadL || isMovL || isMovSD || isShufPD || + isUnpckhPD || isUnpcklPD) { std::vector Idxs; Value *Op0 = CI->getOperand(1); - ShuffleVectorInst *SI; + ShuffleVectorInst *SI = NULL; if (isLoadH || isLoadL) { Value *Op1 = UndefValue::get(Op0->getType()); Value *Addr = new BitCastInst(CI->getOperand(2), @@ -216,7 +231,7 @@ } Value *Mask = ConstantVector::get(Idxs); SI = new ShuffleVectorInst(Op0, Op1, Mask, "upgraded.", CI); - } else { + } else if (isMovL) { Constant *Zero = ConstantInt::get(Type::Int32Ty, 0); Idxs.push_back(Zero); Idxs.push_back(Zero); @@ -231,8 +246,31 @@ Idxs.push_back(ConstantInt::get(Type::Int32Ty, 3)); Value *Mask = ConstantVector::get(Idxs); SI = new ShuffleVectorInst(ZeroV, Op0, Mask, "upgraded.", CI); + } else if (isMovSD || isUnpckhPD || isUnpcklPD) { + Value *Op1 = CI->getOperand(2); + if (isMovSD) { + Idxs.push_back(ConstantInt::get(Type::Int32Ty, 2)); + Idxs.push_back(ConstantInt::get(Type::Int32Ty, 1)); + } else if (isUnpckhPD) { + Idxs.push_back(ConstantInt::get(Type::Int32Ty, 1)); + Idxs.push_back(ConstantInt::get(Type::Int32Ty, 3)); + } else { + Idxs.push_back(ConstantInt::get(Type::Int32Ty, 0)); + Idxs.push_back(ConstantInt::get(Type::Int32Ty, 2)); + } + Value *Mask = ConstantVector::get(Idxs); + SI = new ShuffleVectorInst(Op0, Op1, Mask, "upgraded.", CI); + } else if (isShufPD) { + Value *Op1 = CI->getOperand(2); + unsigned MaskVal = cast(CI->getOperand(3))->getZExtValue(); + Idxs.push_back(ConstantInt::get(Type::Int32Ty, MaskVal & 1)); + Idxs.push_back(ConstantInt::get(Type::Int32Ty, ((MaskVal >> 1) & 1)+2)); + Value *Mask = ConstantVector::get(Idxs); + SI = new ShuffleVectorInst(Op0, Op1, Mask, "upgraded.", CI); } + assert(SI && "Unexpected!"); + // Handle any uses of the old CallInst. if (!CI->use_empty()) // Replace all uses of the old call with the new cast which has the Added: llvm/trunk/test/Bitcode/sse2_movs_d.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/sse2_movs_d.ll?rev=51531&view=auto ============================================================================== --- llvm/trunk/test/Bitcode/sse2_movs_d.ll (added) +++ llvm/trunk/test/Bitcode/sse2_movs_d.ll Fri May 23 21:14:05 2008 @@ -0,0 +1,2 @@ +; RUN: llvm-dis < %s.bc | not grep {i32 @llvm\\.movs.d} +; RUN: llvm-dis < %s.bc | grep shufflevector Added: llvm/trunk/test/Bitcode/sse2_movs_d.ll.bc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/sse2_movs_d.ll.bc?rev=51531&view=auto ============================================================================== Binary file - no diff available. Propchange: llvm/trunk/test/Bitcode/sse2_movs_d.ll.bc ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: llvm/trunk/test/Bitcode/sse2_shuf_pd.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/sse2_shuf_pd.ll?rev=51531&view=auto ============================================================================== --- llvm/trunk/test/Bitcode/sse2_shuf_pd.ll (added) +++ llvm/trunk/test/Bitcode/sse2_shuf_pd.ll Fri May 23 21:14:05 2008 @@ -0,0 +1,2 @@ +; RUN: llvm-dis < %s.bc | not grep {i32 @llvm\\.shuf.pd} +; RUN: llvm-dis < %s.bc | grep shufflevector Added: llvm/trunk/test/Bitcode/sse2_shuf_pd.ll.bc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/sse2_shuf_pd.ll.bc?rev=51531&view=auto ============================================================================== Binary file - no diff available. Propchange: llvm/trunk/test/Bitcode/sse2_shuf_pd.ll.bc ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: llvm/trunk/test/Bitcode/sse2_unpck_pd.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/sse2_unpck_pd.ll?rev=51531&view=auto ============================================================================== --- llvm/trunk/test/Bitcode/sse2_unpck_pd.ll (added) +++ llvm/trunk/test/Bitcode/sse2_unpck_pd.ll Fri May 23 21:14:05 2008 @@ -0,0 +1,3 @@ +; RUN: llvm-dis < %s.bc | not grep {i32 @llvm\\.unpckh.pd} +; RUN: llvm-dis < %s.bc | not grep {i32 @llvm\\.unpckl.pd} +; RUN: llvm-dis < %s.bc | grep shufflevector Added: llvm/trunk/test/Bitcode/sse2_unpck_pd.ll.bc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/sse2_unpck_pd.ll.bc?rev=51531&view=auto ============================================================================== Binary file - no diff available. Propchange: llvm/trunk/test/Bitcode/sse2_unpck_pd.ll.bc ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream From evan.cheng at apple.com Fri May 23 21:15:45 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 24 May 2008 02:15:45 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r51532 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Message-ID: <200805240215.m4O2Fj0M016703@zion.cs.uiuc.edu> Author: evancheng Date: Fri May 23 21:15:45 2008 New Revision: 51532 URL: http://llvm.org/viewvc/llvm-project?rev=51532&view=rev Log: Lower shufpd, unpckhpd, unpcklpd, and movsd intrinsics into shuffles. Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp?rev=51532&r1=51531&r2=51532&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Fri May 23 21:15:45 2008 @@ -147,6 +147,16 @@ Result = Ops[0]; } return true; + case IX86_BUILTIN_SHUFPD: + if (ConstantInt *Elt = dyn_cast(Ops[2])) { + int EV = Elt->getZExtValue(); + Result = BuildVectorShuffle(Ops[0], Ops[1], + ((EV & 0x01) >> 0), ((EV & 0x02) >> 1)+2); + } else { + error("%Hmask must be an immediate", &EXPR_LOCATION(exp)); + Result = Ops[0]; + } + return true; case IX86_BUILTIN_PSHUFW: case IX86_BUILTIN_PSHUFD: if (ConstantInt *Elt = dyn_cast(Ops[1])) { @@ -229,9 +239,15 @@ case IX86_BUILTIN_UNPCKHPS: Result = BuildVectorShuffle(Ops[0], Ops[1], 2, 6, 3, 7); return true; + case IX86_BUILTIN_UNPCKHPD: + Result = BuildVectorShuffle(Ops[0], Ops[1], 1, 3); + return true; case IX86_BUILTIN_UNPCKLPS: Result = BuildVectorShuffle(Ops[0], Ops[1], 0, 4, 1, 5); return true; + case IX86_BUILTIN_UNPCKLPD: + Result = BuildVectorShuffle(Ops[0], Ops[1], 0, 2); + return true; case IX86_BUILTIN_MOVHLPS: Result = BuildVectorShuffle(Ops[0], Ops[1], 6, 7, 2, 3); return true; @@ -241,6 +257,9 @@ case IX86_BUILTIN_MOVSS: Result = BuildVectorShuffle(Ops[0], Ops[1], 4, 1, 2, 3); return true; + case IX86_BUILTIN_MOVSD: + Result = BuildVectorShuffle(Ops[0], Ops[1], 2, 1); + return true; case IX86_BUILTIN_MOVQ: { Value *Zero = ConstantInt::get(Type::Int32Ty, 0); Result = BuildVector(Zero, Zero, Zero, Zero, NULL); From evan.cheng at apple.com Fri May 23 21:56:30 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 24 May 2008 02:56:30 -0000 Subject: [llvm-commits] [llvm] r51533 - in /llvm/trunk: include/llvm/IntrinsicsX86.td lib/Target/X86/X86InstrSSE.td lib/VMCore/AutoUpgrade.cpp test/Bitcode/sse2_punpck_qdq.ll test/Bitcode/sse2_punpck_qdq.ll.bc Message-ID: <200805240256.m4O2uUxg017739@zion.cs.uiuc.edu> Author: evancheng Date: Fri May 23 21:56:30 2008 New Revision: 51533 URL: http://llvm.org/viewvc/llvm-project?rev=51533&view=rev Log: Eliminate x86.sse2.punpckh.qdq and x86.sse2.punpckl.qdq. Added: llvm/trunk/test/Bitcode/sse2_punpck_qdq.ll llvm/trunk/test/Bitcode/sse2_punpck_qdq.ll.bc (with props) Modified: llvm/trunk/include/llvm/IntrinsicsX86.td llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/lib/VMCore/AutoUpgrade.cpp Modified: llvm/trunk/include/llvm/IntrinsicsX86.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IntrinsicsX86.td?rev=51533&r1=51532&r2=51533&view=diff ============================================================================== --- llvm/trunk/include/llvm/IntrinsicsX86.td (original) +++ llvm/trunk/include/llvm/IntrinsicsX86.td Fri May 23 21:56:30 2008 @@ -501,17 +501,6 @@ Intrinsic<[llvm_void_ty], [IntrWriteMem]>; } -// Shuffles. -// FIXME: Temporary workarounds since 2-wide shuffle is broken. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse2_punpckh_qdq : GCCBuiltin<"__builtin_ia32_punpckhqdq128">, - Intrinsic<[llvm_v2i64_ty, llvm_v2i64_ty, - llvm_v2i64_ty], [IntrNoMem]>; - def int_x86_sse2_punpckl_qdq : GCCBuiltin<"__builtin_ia32_punpcklqdq128">, - Intrinsic<[llvm_v2i64_ty, llvm_v2i64_ty, - llvm_v2i64_ty], [IntrNoMem]>; -} - //===----------------------------------------------------------------------===// // SSE3 Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=51533&r1=51532&r2=51533&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Fri May 23 21:56:30 2008 @@ -3050,16 +3050,6 @@ def : Pat<(v2f64 (X86vzmovl (v2f64 VR128:$src))), (MOVZPQILo2PQIrr VR128:$src)>, Requires<[HasSSE2]>; -// FIXME: Temporary workaround since 2-wide shuffle is broken. -def : Pat<(int_x86_sse2_punpckh_qdq VR128:$src1, VR128:$src2), - (v2i64 (PUNPCKHQDQrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_punpckh_qdq VR128:$src1, (memop addr:$src2)), - (v2i64 (PUNPCKHQDQrm VR128:$src1, addr:$src2))>, Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_punpckl_qdq VR128:$src1, VR128:$src2), - (v2i64 (PUNPCKLQDQrr VR128:$src1, VR128:$src2))>, Requires<[HasSSE2]>; -def : Pat<(int_x86_sse2_punpckl_qdq VR128:$src1, (memop addr:$src2)), - (PUNPCKLQDQrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; - // Some special case pandn patterns. def : Pat<(v2i64 (and (xor VR128:$src1, (bc_v2i64 (v4i32 immAllOnesV))), VR128:$src2)), Modified: llvm/trunk/lib/VMCore/AutoUpgrade.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AutoUpgrade.cpp?rev=51533&r1=51532&r2=51533&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/AutoUpgrade.cpp (original) +++ llvm/trunk/lib/VMCore/AutoUpgrade.cpp Fri May 23 21:56:30 2008 @@ -154,7 +154,9 @@ Name.compare(5,15,"x86.sse2.movs.d",15) == 0 || Name.compare(5,16,"x86.sse2.shuf.pd",16) == 0 || Name.compare(5,18,"x86.sse2.unpckh.pd",18) == 0 || - Name.compare(5,18,"x86.sse2.unpckl.pd",18) == 0 ) { + Name.compare(5,18,"x86.sse2.unpckl.pd",18) == 0 || + Name.compare(5,20,"x86.sse2.punpckh.qdq",20) == 0 || + Name.compare(5,20,"x86.sse2.punpckl.qdq",20) == 0) { // Calls to these intrinsics are transformed into ShuffleVector's. NewFn = 0; return true; @@ -193,6 +195,7 @@ bool isLoadH = false, isLoadL = false, isMovL = false; bool isMovSD = false, isShufPD = false; bool isUnpckhPD = false, isUnpcklPD = false; + bool isPunpckhQPD = false, isPunpcklQPD = false; if (strcmp(F->getNameStart(), "llvm.x86.sse2.loadh.pd") == 0) isLoadH = true; else if (strcmp(F->getNameStart(), "llvm.x86.sse2.loadl.pd") == 0) @@ -207,9 +210,13 @@ isUnpckhPD = true; else if (strcmp(F->getNameStart(), "llvm.x86.sse2.unpckl.pd") == 0) isUnpcklPD = true; + else if (strcmp(F->getNameStart(), "llvm.x86.sse2.punpckh.qdq") == 0) + isPunpckhQPD = true; + else if (strcmp(F->getNameStart(), "llvm.x86.sse2.punpckl.qdq") == 0) + isPunpcklQPD = true; if (isLoadH || isLoadL || isMovL || isMovSD || isShufPD || - isUnpckhPD || isUnpcklPD) { + isUnpckhPD || isUnpcklPD || isPunpckhQPD || isPunpcklQPD) { std::vector Idxs; Value *Op0 = CI->getOperand(1); ShuffleVectorInst *SI = NULL; @@ -246,12 +253,13 @@ Idxs.push_back(ConstantInt::get(Type::Int32Ty, 3)); Value *Mask = ConstantVector::get(Idxs); SI = new ShuffleVectorInst(ZeroV, Op0, Mask, "upgraded.", CI); - } else if (isMovSD || isUnpckhPD || isUnpcklPD) { + } else if (isMovSD || + isUnpckhPD || isUnpcklPD || isPunpckhQPD || isPunpcklQPD) { Value *Op1 = CI->getOperand(2); if (isMovSD) { Idxs.push_back(ConstantInt::get(Type::Int32Ty, 2)); Idxs.push_back(ConstantInt::get(Type::Int32Ty, 1)); - } else if (isUnpckhPD) { + } else if (isUnpckhPD || isPunpckhQPD) { Idxs.push_back(ConstantInt::get(Type::Int32Ty, 1)); Idxs.push_back(ConstantInt::get(Type::Int32Ty, 3)); } else { Added: llvm/trunk/test/Bitcode/sse2_punpck_qdq.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/sse2_punpck_qdq.ll?rev=51533&view=auto ============================================================================== --- llvm/trunk/test/Bitcode/sse2_punpck_qdq.ll (added) +++ llvm/trunk/test/Bitcode/sse2_punpck_qdq.ll Fri May 23 21:56:30 2008 @@ -0,0 +1,3 @@ +; RUN: llvm-dis < %s.bc | not grep {i32 @llvm\\.punpckh.qdq} +; RUN: llvm-dis < %s.bc | not grep {i32 @llvm\\.punpckl.qdq} +; RUN: llvm-dis < %s.bc | grep shufflevector Added: llvm/trunk/test/Bitcode/sse2_punpck_qdq.ll.bc URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/sse2_punpck_qdq.ll.bc?rev=51533&view=auto ============================================================================== Binary file - no diff available. Propchange: llvm/trunk/test/Bitcode/sse2_punpck_qdq.ll.bc ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream From evan.cheng at apple.com Fri May 23 21:56:59 2008 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 24 May 2008 02:56:59 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r51534 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Message-ID: <200805240256.m4O2uxxb017768@zion.cs.uiuc.edu> Author: evancheng Date: Fri May 23 21:56:59 2008 New Revision: 51534 URL: http://llvm.org/viewvc/llvm-project?rev=51534&view=rev Log: Lower punpck{h/l}.qdq into shuffles. Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp?rev=51534&r1=51533&r2=51534&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Fri May 23 21:56:59 2008 @@ -224,6 +224,9 @@ case IX86_BUILTIN_PUNPCKHDQ128: Result = BuildVectorShuffle(Ops[0], Ops[1], 2, 6, 3, 7); return true; + case IX86_BUILTIN_PUNPCKHQDQ128: + Result = BuildVectorShuffle(Ops[0], Ops[1], 1, 3); + return true; case IX86_BUILTIN_PUNPCKLBW128: Result = BuildVectorShuffle(Ops[0], Ops[1], 0, 16, 1, 17, 2, 18, 3, 19, @@ -236,6 +239,9 @@ case IX86_BUILTIN_PUNPCKLDQ128: Result = BuildVectorShuffle(Ops[0], Ops[1], 0, 4, 1, 5); return true; + case IX86_BUILTIN_PUNPCKLQDQ128: + Result = BuildVectorShuffle(Ops[0], Ops[1], 0, 2); + return true; case IX86_BUILTIN_UNPCKHPS: Result = BuildVectorShuffle(Ops[0], Ops[1], 2, 6, 3, 7); return true; From sabre at nondot.org Fri May 23 22:59:34 2008 From: sabre at nondot.org (Chris Lattner) Date: Sat, 24 May 2008 03:59:34 -0000 Subject: [llvm-commits] [llvm] r51535 - in /llvm/trunk: lib/Transforms/Scalar/SCCP.cpp test/Transforms/SCCP/2008-05-23-UndefCallFold.ll Message-ID: <200805240359.m4O3xYc1019703@zion.cs.uiuc.edu> Author: lattner Date: Fri May 23 22:59:33 2008 New Revision: 51535 URL: http://llvm.org/viewvc/llvm-project?rev=51535&view=rev Log: Fix PR2358 by resolving calls with undef arguments to overdefined. Added: llvm/trunk/test/Transforms/SCCP/2008-05-23-UndefCallFold.ll Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=51535&r1=51534&r2=51535&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Fri May 23 22:59:33 2008 @@ -1370,6 +1370,12 @@ else markOverdefined(LV, I); return true; + case Instruction::Call: + // If a call has an undef result, it is because it is constant foldable + // but one of the inputs was undef. Just force the result to + // overdefined. + markOverdefined(LV, I); + return true; } } Added: llvm/trunk/test/Transforms/SCCP/2008-05-23-UndefCallFold.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SCCP/2008-05-23-UndefCallFold.ll?rev=51535&view=auto ============================================================================== --- llvm/trunk/test/Transforms/SCCP/2008-05-23-UndefCallFold.ll (added) +++ llvm/trunk/test/Transforms/SCCP/2008-05-23-UndefCallFold.ll Fri May 23 22:59:33 2008 @@ -0,0 +1,14 @@ +; RUN: llvm-as < %s | opt -sccp | llvm-dis | not grep {ret i32 undef} +; PR2358 +target datalayout = +"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" +target triple = "i686-pc-linux-gnu" + +define i32 @x(i32 %b) { +entry: + %val = call i32 @llvm.cttz.i32(i32 undef) + ret i32 %val +} + +declare i32 @llvm.cttz.i32(i32) + From sabre at nondot.org Fri May 23 23:06:29 2008 From: sabre at nondot.org (Chris Lattner) Date: Sat, 24 May 2008 04:06:29 -0000 Subject: [llvm-commits] [llvm] r51536 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2008-05-23-CompareFold.ll Message-ID: <200805240406.m4O46THA019973@zion.cs.uiuc.edu> Author: lattner Date: Fri May 23 23:06:28 2008 New Revision: 51536 URL: http://llvm.org/viewvc/llvm-project?rev=51536&view=rev Log: Fix a serious brain-o. Obviously no-one reviewed my patch :( This fixes PR2359 Added: llvm/trunk/test/Transforms/InstCombine/2008-05-23-CompareFold.ll Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51536&r1=51535&r2=51536&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Fri May 23 23:06:28 2008 @@ -5571,7 +5571,8 @@ SMax.convertFromAPInt(APInt::getSignedMaxValue(IntWidth), true, APFloat::rmNearestTiesToEven); if (SMax.compare(RHS) == APFloat::cmpLessThan) { // smax < 13123.0 - if (ICmpInst::ICMP_NE || ICmpInst::ICMP_SLT || Pred == ICmpInst::ICMP_SLE) + if (Pred == ICmpInst::ICMP_NE || Pred == ICmpInst::ICMP_SLT || + Pred == ICmpInst::ICMP_SLE) return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 1)); return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 0)); } @@ -5581,7 +5582,8 @@ SMin.convertFromAPInt(APInt::getSignedMinValue(IntWidth), true, APFloat::rmNearestTiesToEven); if (SMin.compare(RHS) == APFloat::cmpGreaterThan) { // smin > 12312.0 - if (ICmpInst::ICMP_NE || ICmpInst::ICMP_SGT || Pred == ICmpInst::ICMP_SGE) + if (Pred == ICmpInst::ICMP_NE || Pred == ICmpInst::ICMP_SGT || + Pred == ICmpInst::ICMP_SGE) return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 1)); return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 0)); } Added: llvm/trunk/test/Transforms/InstCombine/2008-05-23-CompareFold.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2008-05-23-CompareFold.ll?rev=51536&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/2008-05-23-CompareFold.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/2008-05-23-CompareFold.ll Fri May 23 23:06:28 2008 @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {ret i1 false} +; PR2359 +define i1 @f(i8* %x) { +entry: + %tmp462 = load i8* %x, align 1 ; [#uses=1] + %tmp462463 = sitofp i8 %tmp462 to float ; [#uses=1] + %tmp464 = fcmp ugt float %tmp462463, 0x47EFFFFFE0000000 ; + ret i1 %tmp464 +} + + From sabre at nondot.org Fri May 23 23:35:27 2008 From: sabre at nondot.org (Chris Lattner) Date: Sat, 24 May 2008 04:35:27 -0000 Subject: [llvm-commits] [test-suite] r51537 - /test-suite/trunk/SingleSource/Benchmarks/CoyoteBench/fftbench.cpp Message-ID: <200805240435.m4O4ZRpo021354@zion.cs.uiuc.edu> Author: lattner Date: Fri May 23 23:35:27 2008 New Revision: 51537 URL: http://llvm.org/viewvc/llvm-project?rev=51537&view=rev Log: reduce the input size of this benchmark to fit in the 200M heap limit impossed by RunSafely. Modified: test-suite/trunk/SingleSource/Benchmarks/CoyoteBench/fftbench.cpp Modified: test-suite/trunk/SingleSource/Benchmarks/CoyoteBench/fftbench.cpp URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/CoyoteBench/fftbench.cpp?rev=51537&r1=51536&r2=51537&view=diff ============================================================================== --- test-suite/trunk/SingleSource/Benchmarks/CoyoteBench/fftbench.cpp (original) +++ test-suite/trunk/SingleSource/Benchmarks/CoyoteBench/fftbench.cpp Fri May 23 23:35:27 2008 @@ -46,7 +46,7 @@ #ifdef SMALL_PROBLEM_SIZE static const int TEST_SIZE = 50000; #else -static const int TEST_SIZE = 2097152; +static const int TEST_SIZE = 2097152/2; #endif #endif From sabre at nondot.org Fri May 23 23:58:48 2008 From: sabre at nondot.org (Chris Lattner) Date: Sat, 24 May 2008 04:58:48 -0000 Subject: [llvm-commits] [llvm] r51538 - /llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp Message-ID: <200805240458.m4O4wn77022033@zion.cs.uiuc.edu> Author: lattner Date: Fri May 23 23:58:48 2008 New Revision: 51538 URL: http://llvm.org/viewvc/llvm-project?rev=51538&view=rev Log: Add FreeBSD/PPC support, patch by Marcel Moolenaar! Modified: llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp Modified: llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp?rev=51538&r1=51537&r2=51538&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp Fri May 23 23:58:48 2008 @@ -72,7 +72,7 @@ extern "C" void PPC64CompilationCallback(); #if (defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)) && \ - !defined(__ppc64__) + !(defined(__ppc64__) || defined(__FreeBSD__)) // CompilationCallback stub - We can't use a C function with inline assembly in // it, because we the prolog/epilog inserted by GCC won't work for us. Instead, // write our own wrapper, which does things our way, so we have complete control @@ -138,7 +138,7 @@ ); #elif defined(__PPC__) && !defined(__ppc64__) -// Linux/PPC support +// Linux & FreeBSD / PPC 32 support // CompilationCallback stub - We can't use a C function with inline assembly in // it, because we the prolog/epilog inserted by GCC won't work for us. Instead, From sabre at nondot.org Sat May 24 00:11:48 2008 From: sabre at nondot.org (Chris Lattner) Date: Sat, 24 May 2008 05:11:48 -0000 Subject: [llvm-commits] [llvm] r51539 - /llvm/trunk/win32/dobison.cmd Message-ID: <200805240511.m4O5Bmrf022393@zion.cs.uiuc.edu> Author: lattner Date: Sat May 24 00:11:48 2008 New Revision: 51539 URL: http://llvm.org/viewvc/llvm-project?rev=51539&view=rev Log: Fix win32 when no bison is around, PR2331, patch by 'hume'. Modified: llvm/trunk/win32/dobison.cmd Modified: llvm/trunk/win32/dobison.cmd URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/dobison.cmd?rev=51539&r1=51538&r2=51539&view=diff ============================================================================== --- llvm/trunk/win32/dobison.cmd (original) +++ llvm/trunk/win32/dobison.cmd Sat May 24 00:11:48 2008 @@ -22,6 +22,8 @@ :nobison echo Bison not found. Using pre-generated files. +copy %~pn4.cpp.cvs .\%3.cpp copy %~pn4.cpp.cvs %5\%3.cpp +copy %~pn4.h.cvs .\%3.h copy %~pn4.h.cvs %5\%3.h exit From tonic at nondot.org Sat May 24 00:16:08 2008 From: tonic at nondot.org (Tanya Lattner) Date: Sat, 24 May 2008 00:16:08 -0500 Subject: [llvm-commits] CVS: llvm-www/www-index.html Message-ID: <200805240516.m4O5G88C022544@zion.cs.uiuc.edu> Changes in directory llvm-www: www-index.html updated: 1.156 -> 1.157 --- Log message: Push back release a few days. --- Diffs of the changes: (+3 -3) www-index.html | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm-www/www-index.html diff -u llvm-www/www-index.html:1.156 llvm-www/www-index.html:1.157 --- llvm-www/www-index.html:1.156 Thu May 22 17:37:43 2008 +++ llvm-www/www-index.html Sat May 24 00:15:21 2008 @@ -122,9 +122,9 @@
  • May 9, 2008: Branch creation/Code Freeze (9PM PDT).
  • May 12, 2008: First round of pre-release testing begins.
  • May 21, 2008: Pre-release testing ends.
  • -
  • May 23, 2008: Second round of pre-release testing begins.
  • -
  • May 30, 2008: Pre-release testing ends.
  • -
  • June 2, 2008: 2.3 Released.
  • +
  • May 28, 2008: Second round of pre-release testing begins.
  • +
  • June 1, 2008: Pre-release testing ends.
  • +
  • June 4, 2008: 2.3 Released.
  • From resistor at mac.com Sat May 24 00:42:30 2008 From: resistor at mac.com (Owen Anderson) Date: Sat, 24 May 2008 05:42:30 -0000 Subject: [llvm-commits] [llvm] r51540 - /llvm/trunk/lib/Archive/ArchiveWriter.cpp Message-ID: <200805240542.m4O5gUbn023556@zion.cs.uiuc.edu> Author: resistor Date: Sat May 24 00:42:29 2008 New Revision: 51540 URL: http://llvm.org/viewvc/llvm-project?rev=51540&view=rev Log: Create archives with the same permissions are ar. Patch by Mikael Lepist?. Modified: llvm/trunk/lib/Archive/ArchiveWriter.cpp Modified: llvm/trunk/lib/Archive/ArchiveWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Archive/ArchiveWriter.cpp?rev=51540&r1=51539&r2=51540&view=diff ============================================================================== --- llvm/trunk/lib/Archive/ArchiveWriter.cpp (original) +++ llvm/trunk/lib/Archive/ArchiveWriter.cpp Sat May 24 00:42:29 2008 @@ -467,5 +467,12 @@ if (TmpArchive.renamePathOnDisk(archPath, ErrMsg)) return true; + // Set correct read and write permissions after temporary file is moved + // to final destination path. + if (archPath.makeReadableOnDisk(ErrMsg)) + return true; + if (archPath.makeWriteableOnDisk(ErrMsg)) + return true; + return false; } From nicolas.geoffray at lip6.fr Sat May 24 07:01:03 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Sat, 24 May 2008 12:01:03 -0000 Subject: [llvm-commits] [vmkit] r51541 - /vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Message-ID: <200805241201.m4OC15JX010932@zion.cs.uiuc.edu> Author: geoffray Date: Sat May 24 07:00:46 2008 New Revision: 51541 URL: http://llvm.org/viewvc/llvm-project?rev=51541&view=rev Log: Make a test before tracing objects that are unlikely to exist. Modified: vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp?rev=51541&r1=51540&r2=51541&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/VirtualTables.cpp Sat May 24 07:00:46 2008 @@ -72,20 +72,21 @@ void JavaArray::TRACER { classOf->MARK_AND_TRACE; - lockObj->MARK_AND_TRACE; + if (lockObj) lockObj->MARK_AND_TRACE; } void ArrayObject::TRACER { classOf->MARK_AND_TRACE; - lockObj->MARK_AND_TRACE; + if (lockObj) lockObj->MARK_AND_TRACE; for (sint32 i = 0; i < size; i++) { - elements[i]->MARK_AND_TRACE; + if (elements[i]) elements[i]->MARK_AND_TRACE; } } #define ARRAYTRACER(name) \ void name::TRACER { \ - lockObj->MARK_AND_TRACE; \ + if (lockObj) \ + lockObj->MARK_AND_TRACE; \ } @@ -152,7 +153,7 @@ void JavaObject::TRACER { classOf->MARK_AND_TRACE; - lockObj->MARK_AND_TRACE; + if (lockObj) lockObj->MARK_AND_TRACE; } #ifdef MULTIPLE_GC @@ -161,7 +162,7 @@ extern "C" void JavaObjectTracer(JavaObject* obj) { #endif obj->classOf->MARK_AND_TRACE; - obj->lockObj->MARK_AND_TRACE; + if (obj->lockObj) obj->lockObj->MARK_AND_TRACE; } @@ -169,7 +170,7 @@ javaThread->MARK_AND_TRACE; // FIXME: do I need this? isolate->MARK_AND_TRACE; - pendingException->MARK_AND_TRACE; + if (pendingException) pendingException->MARK_AND_TRACE; } void Typedef::TRACER { From nicolas.geoffray at lip6.fr Sat May 24 07:01:44 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Sat, 24 May 2008 12:01:44 -0000 Subject: [llvm-commits] [vmkit] r51542 - /vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp Message-ID: <200805241201.m4OC1i2F010962@zion.cs.uiuc.edu> Author: geoffray Date: Sat May 24 07:01:44 2008 New Revision: 51542 URL: http://llvm.org/viewvc/llvm-project?rev=51542&view=rev Log: Do inline accesses to array elements. Modified: vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp Modified: vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp?rev=51542&r1=51541&r2=51542&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/NativeUtil.cpp Sat May 24 07:01:44 2008 @@ -52,7 +52,7 @@ memcpy(buf, PRE, PRE_LEN); for (sint32 i =0; i < clen; ++i) { - cur = jniConsClName->at(i); + cur = jniConsClName->elements[i]; if (cur == '/') ptr[0] = '_'; else ptr[0] = (uint8)cur; ++ptr; @@ -62,7 +62,7 @@ ++ptr; for (sint32 i =0; i < mnlen; ++i) { - cur = jniConsName->at(i); + cur = jniConsName->elements[i]; if (cur == '/') ptr[0] = '_'; else ptr[0] = (uint8)cur; ++ptr; @@ -89,7 +89,7 @@ memcpy(buf, PRE, PRE_LEN); for (sint32 i =0; i < clen; ++i) { - cur = jniConsClName->at(i); + cur = jniConsClName->elements[i]; if (cur == '/') ptr[0] = '_'; else ptr[0] = (uint8)cur; ++ptr; @@ -99,7 +99,7 @@ ++ptr; for (sint32 i =0; i < mnlen; ++i) { - cur = jniConsName->at(i); + cur = jniConsName->elements[i]; if (cur == '/') ptr[0] = '_'; else if (cur == '_') { ptr[0] = '_'; @@ -131,7 +131,7 @@ memcpy(buf, PRE, PRE_LEN); for (sint32 i =0; i < clen; ++i) { - cur = jniConsClName->at(i); + cur = jniConsClName->elements[i]; if (cur == '/') ptr[0] = '_'; else ptr[0] = (uint8)cur; ++ptr; @@ -141,7 +141,7 @@ ++ptr; for (sint32 i =0; i < mnlen; ++i) { - cur = jniConsName->at(i); + cur = jniConsName->elements[i]; if (cur == '/') ptr[0] = '_'; else ptr[0] = (uint8)cur; ++ptr; @@ -149,7 +149,7 @@ sint32 i = 0; while (i < jniConsType->size) { - char c = jniConsType->at(i++); + char c = jniConsType->elements[i++]; if (c == AssessorDesc::I_PARG) { ptr[0] = '_'; ptr[1] = '_'; From nicolas.geoffray at lip6.fr Sat May 24 07:26:48 2008 From: nicolas.geoffray at lip6.fr (Nicolas Geoffray) Date: Sat, 24 May 2008 12:26:48 -0000 Subject: [llvm-commits] [vmkit] r51543 - in /vmkit/trunk/lib/JnJVM: Classpath/ClasspathVMClass.cpp Classpath/ClasspathVMSystem.cpp VMCore/JavaClass.cpp VMCore/JavaTypes.cpp VMCore/JavaTypes.h VMCore/Jni.cpp VMCore/Jnjvm.cpp Message-ID: <200805241226.m4OCQq0Q011749@zion.cs.uiuc.edu> Author: geoffray Date: Sat May 24 07:26:33 2008 New Revision: 51543 URL: http://llvm.org/viewvc/llvm-project?rev=51543&view=rev Log: Use the isPrimitive flag of a CommonClass instead of bogusClassToPrimitive. Removed bogusClassToPrimitive. Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h vmkit/trunk/lib/JnJVM/VMCore/Jni.cpp vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp?rev=51543&r1=51542&r2=51543&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMClass.cpp Sat May 24 07:26:33 2008 @@ -177,14 +177,9 @@ CommonClass* cl = (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl); - AssessorDesc* ass = AssessorDesc::bogusClassToPrimitive(cl); - const UTF8* res = 0; - if (ass) { - res = ass->UTF8Name; - } else { - const UTF8* iname = cl->name; - res = iname->internalToJava(vm, 0, iname->size); - } + const UTF8* iname = cl->name; + const UTF8* res = iname->internalToJava(vm, 0, iname->size); + return (jobject)(vm->UTF8ToStr(res)); } @@ -197,9 +192,7 @@ CommonClass* cl = (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl); - AssessorDesc* ass = AssessorDesc::bogusClassToPrimitive(cl); - if (ass == 0) return false; - else return true; + return cl->isPrimitive; } JNIEXPORT jboolean JNICALL Java_java_lang_VMClass_isInterface( @@ -252,13 +245,8 @@ CommonClass* cl2 = (CommonClass*)Classpath::vmdataClass->getVirtualObjectField((JavaObject*)Cl2); - AssessorDesc* ass = AssessorDesc::bogusClassToPrimitive(cl1); - if (ass) { - return ass == AssessorDesc::bogusClassToPrimitive(cl2); - } else { - cl2->resolveClass(false); - return cl2->isAssignableFrom(cl1); - } + cl2->resolveClass(false); + return cl2->isAssignableFrom(cl1); } Modified: vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp?rev=51543&r1=51542&r2=51543&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp (original) +++ vmkit/trunk/lib/JnJVM/Classpath/ClasspathVMSystem.cpp Sat May 24 07:26:33 2008 @@ -47,10 +47,10 @@ ClassArray* ts = (ClassArray*)src->classOf; ClassArray* td = (ClassArray*)dst->classOf; CommonClass* dstType = td->baseClass(); - CommonClass* srcType = ts->baseClass(); - AssessorDesc* srcPrim = AssessorDesc::bogusClassToPrimitive(srcType); - AssessorDesc* dstPrim = AssessorDesc::bogusClassToPrimitive(dstType); + AssessorDesc* dstFuncs = td->funcs(); AssessorDesc* srcFuncs = ts->funcs(); + CommonClass* srcPrim = srcFuncs->classType; + CommonClass* dstPrim = dstFuncs->classType; if (len > src->size) { vm->indexOutOfBounds(src, len); @@ -72,9 +72,9 @@ jint i = sstart; bool doThrow = false; - if (srcFuncs == AssessorDesc::dTab || srcFuncs == AssessorDesc::dRef) { + if (srcFuncs->doTrace) { while (i < sstart + len && !doThrow) { - JavaObject* cur = ((ArrayObject*)src)->at(i); + JavaObject* cur = ((ArrayObject*)src)->elements[i]; if (cur) { if (!(cur->classOf->isAssignableFrom(dstType))) { doThrow = true; Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp?rev=51543&r1=51542&r2=51543&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaClass.cpp Sat May 24 07:26:33 2008 @@ -388,8 +388,8 @@ bool CommonClass::inheritName(const UTF8* Tname) { if (name->equals(Tname)) { return true; - } else if (AssessorDesc::bogusClassToPrimitive(this)) { - return true; + } else if (isPrimitive) { + return false; } else if (super) { if (super->inheritName(Tname)) return true; } @@ -551,7 +551,7 @@ JavaState* CommonClass::getStatus() { if (!this->isArray && - !AssessorDesc::bogusClassToPrimitive(this)) { + !this->isPrimitive) { Class* cl = (Class*)this; Jnjvm* vm = JavaThread::get()->isolate; std::pair* val = vm->statics->lookup(cl); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp?rev=51543&r1=51542&r2=51543&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.cpp Sat May 24 07:26:33 2008 @@ -401,30 +401,6 @@ } } -AssessorDesc* AssessorDesc::bogusClassToPrimitive(CommonClass* cl) { - if (cl == dFloat->classType) { - return dFloat; - } else if (cl == dInt->classType) { - return dInt; - } else if (cl == dShort->classType) { - return dShort; - } else if (cl == dChar->classType) { - return dChar; - } else if (cl == dDouble->classType) { - return dDouble; - } else if (cl == dByte->classType) { - return dByte; - } else if (cl == dBool->classType) { - return dBool; - } else if (cl == dLong->classType) { - return dLong; - } else if (cl == dVoid->classType) { - return dVoid; - } else { - return 0; - } -} - void Typedef::print(mvm::PrintBuffer* buf) const { buf->write("Type<"); tPrintBuf(buf); Modified: vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h?rev=51543&r1=51542&r2=51543&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h (original) +++ vmkit/trunk/lib/JnJVM/VMCore/JavaTypes.h Sat May 24 07:26:33 2008 @@ -118,7 +118,6 @@ static AssessorDesc* byteIdToPrimitive(const char id); static AssessorDesc* classToPrimitive(CommonClass* cl); - static AssessorDesc* bogusClassToPrimitive(CommonClass* cl); }; Modified: vmkit/trunk/lib/JnJVM/VMCore/Jni.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jni.cpp?rev=51543&r1=51542&r2=51543&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Jni.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Jni.cpp Sat May 24 07:26:33 2008 @@ -114,11 +114,7 @@ CommonClass* cl2 = NativeUtil::resolvedImplClass(sup, false); CommonClass* cl1 = NativeUtil::resolvedImplClass(sub, false); - AssessorDesc* prim = AssessorDesc::bogusClassToPrimitive(cl2); - if (prim) - return prim == AssessorDesc::bogusClassToPrimitive(cl1); - else - return cl1->isAssignableFrom(cl2); + return cl1->isAssignableFrom(cl2); END_EXCEPTION Modified: vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp?rev=51543&r1=51542&r2=51543&view=diff ============================================================================== --- vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp (original) +++ vmkit/trunk/lib/JnJVM/VMCore/Jnjvm.cpp Sat May 24 07:26:33 2008 @@ -304,7 +304,7 @@ void Jnjvm::initialiseClass(CommonClass* cl) { JavaState* status = cl->getStatus(); - if (cl->isArray || AssessorDesc::bogusClassToPrimitive(cl)) { + if (cl->isArray || cl->isPrimitive) { *status = ready; } else if (!(*status == ready)) { cl->aquire(); From isanbard at gmail.com Sat May 24 11:21:11 2008 From: isanbard at gmail.com (Bill Wendling) Date: Sat, 24 May 2008 09:21:11 -0700 Subject: [llvm-commits] [llvm] r51533 - in /llvm/trunk: include/llvm/IntrinsicsX86.td lib/Target/X86/X86InstrSSE.td lib/VMCore/AutoUpgrade.cpp test/Bitcode/sse2_punpck_qdq.ll test/Bitcode/sse2_punpck_qdq.ll.bc In-Reply-To: <200805240256.m4O2uUxg017739@zion.cs.uiuc.edu> References: <200805240256.m4O2uUxg017739@zion.cs.uiuc.edu> Message-ID: <29780B2F-9C1D-4988-AB7F-B18D2C92FFCC@gmail.com> On May 23, 2008, at 7:56 PM, Evan Cheng wrote: > Author: evancheng > Date: Fri May 23 21:56:30 2008 > New Revision: 51533 > > URL: http://llvm.org/viewvc/llvm-project?rev=51533&view=rev > Log: > Eliminate x86.sse2.punpckh.qdq and x86.sse2.punpckl.qdq. > > Added: > llvm/trunk/test/Bitcode/sse2_punpck_qdq.ll > llvm/trunk/test/Bitcode/sse2_punpck_qdq.ll.bc (with props) Why add the .bc file? -bw From kremenek at apple.com Sat May 24 11:39:57 2008 From: kremenek at apple.com (Ted Kremenek) Date: Sat, 24 May 2008 16:39:57 -0000 Subject: [llvm-commits] [llvm] r51549 - /llvm/tags/checker/checker-32/ Message-ID: <200805241639.m4OGdvsO019388@zion.cs.uiuc.edu> Author: kremenek Date: Sat May 24 11:39:57 2008 New Revision: 51549 URL: http://llvm.org/viewvc/llvm-project?rev=51549&view=rev Log: Tagging checker-32. Added: llvm/tags/checker/checker-32/ - copied from r51548, llvm/trunk/ From asl at math.spbu.ru Sun May 25 02:29:21 2008 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Sun, 25 May 2008 02:29:21 -0500 Subject: [llvm-commits] CVS: llvm-www/devmtg/register.php students.php talk.php Message-ID: <200805250729.m4P7TLu7012313@zion.cs.uiuc.edu> Changes in directory llvm-www/devmtg: register.php updated: 1.3 -> 1.4 students.php updated: 1.1 -> 1.2 talk.php updated: 1.2 -> 1.3 --- Log message: Minor tweaks --- Diffs of the changes: (+16 -0) register.php | 6 ++++++ students.php | 5 +++++ talk.php | 5 +++++ 3 files changed, 16 insertions(+) Index: llvm-www/devmtg/register.php diff -u llvm-www/devmtg/register.php:1.3 llvm-www/devmtg/register.php:1.4 --- llvm-www/devmtg/register.php:1.3 Thu May 22 16:47:54 2008 +++ llvm-www/devmtg/register.php Sun May 25 02:28:33 2008 @@ -52,7 +52,13 @@ } +function my_escape_string(&$item, $key) { + $item = mysql_real_escape_string($item); +} + function processForm() { + array_walk($_POST, 'my_escape_string'); + if($_POST['attendBefore'] == 0) $attend = 2; else Index: llvm-www/devmtg/students.php diff -u llvm-www/devmtg/students.php:1.1 llvm-www/devmtg/students.php:1.2 --- llvm-www/devmtg/students.php:1.1 Thu May 22 11:45:49 2008 +++ llvm-www/devmtg/students.php Sun May 25 02:28:33 2008 @@ -50,7 +50,12 @@ } +function my_escape_string(&$item, $key) { + $item = mysql_real_escape_string($item); +} + function processForm() { + array_walk($_POST, 'my_escape_string'); $sql = "INSERT into students (lastName, firstName, school, email, level, location, airfare, lodging, other, type, comments) VALUES('$_POST[last]', '$_POST[first]', '$_POST[school]', '$_POST[email]', '$_POST[level]', '$_POST[location]','$_POST[airfare]', '$_POST[lodging]', '$_POST[other]', '$_POST[type]', '$_POST[comments]')"; mysql_query($sql) or die(mysql_error()); print 'Your request for funding to attend the LLVM Developers\' Meeting has been submitted. We will contact you once funds have been allocated.

    Please sign up for the LLVM Developers\' Meeting mailing list to receive announcements about the event.

    '; Index: llvm-www/devmtg/talk.php diff -u llvm-www/devmtg/talk.php:1.2 llvm-www/devmtg/talk.php:1.3 --- llvm-www/devmtg/talk.php:1.2 Thu May 22 15:12:36 2008 +++ llvm-www/devmtg/talk.php Sun May 25 02:28:33 2008 @@ -54,7 +54,12 @@ } +function my_escape_string(&$item, $key) { + $item = mysql_real_escape_string($item); +} + function processForm() { + array_walk($_POST, 'my_escape_string'); $sql = "INSERT into presenters (lastName, firstName, organization, email, phone, title, summary, minLength, maxLength) VALUES('$_POST[last]', '$_POST[first]', '$_POST[org]', '$_POST[email]', '$_POST[phone]', '$_POST[title]', '$_POST[summary]','$_POST[min]', '$_POST[max]')"; mysql_query($sql) or die(mysql_error()); print 'Congratulations! Your talk proposal for the LLVM Developers\' Meeting has been submitted. We will contact you once the agenda has been finalized.

    Please sign up for the LLVM Developers\' Meeting mailing list to receive announcements about the event.

    '; From nicholas at mxc.ca Sun May 25 15:56:16 2008 From: nicholas at mxc.ca (Nick Lewycky) Date: Sun, 25 May 2008 20:56:16 -0000 Subject: [llvm-commits] [llvm] r51559 - in /llvm/trunk: include/llvm/Analysis/ConstantFolding.h lib/Analysis/ConstantFolding.cpp lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/2008-05-18-FoldIntToPtr.ll Message-ID: <200805252056.m4PKuHaS002426@zion.cs.uiuc.edu> Author: nicholas Date: Sun May 25 15:56:15 2008 New Revision: 51559 URL: http://llvm.org/viewvc/llvm-project?rev=51559&view=rev Log: "ret (constexpr)" can't be folded into a Constant. Add a method to Analysis/ConstantFolding to fold ConstantExpr's, then make instcombine use it to try to use targetdata to fold constant expressions on void instructions. Also extend the icmp(inttoptr, inttoptr) folding to handle the case where int size != ptr size. Added: llvm/trunk/test/Transforms/InstCombine/2008-05-18-FoldIntToPtr.ll Modified: llvm/trunk/include/llvm/Analysis/ConstantFolding.h llvm/trunk/lib/Analysis/ConstantFolding.cpp llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/include/llvm/Analysis/ConstantFolding.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ConstantFolding.h?rev=51559&r1=51558&r2=51559&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/ConstantFolding.h (original) +++ llvm/trunk/include/llvm/Analysis/ConstantFolding.h Sun May 25 15:56:15 2008 @@ -30,6 +30,12 @@ /// Constant *ConstantFoldInstruction(Instruction *I, const TargetData *TD = 0); +/// ConstantFoldConstantExpression - Attempt to fold the constant expression +/// using the specified TargetData. If successful, the constant result is +/// result is returned, if not, null is returned. +Constant *ConstantFoldConstantExpression(ConstantExpr *CE, + const TargetData *TD); + /// ConstantFoldInstOperands - Attempt to constant fold an instruction with the /// specified operands. If successful, the constant result is returned, if not, /// null is returned. Note that this function can fail when attempting to Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ConstantFolding.cpp?rev=51559&r1=51558&r2=51559&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ConstantFolding.cpp (original) +++ llvm/trunk/lib/Analysis/ConstantFolding.cpp Sun May 25 15:56:15 2008 @@ -312,6 +312,25 @@ &Ops[0], Ops.size(), TD); } +/// ConstantFoldConstantExpression - Attempt to fold the constant expression +/// using the specified TargetData. If successful, the constant result is +/// result is returned, if not, null is returned. +Constant *llvm::ConstantFoldConstantExpression(ConstantExpr *CE, + const TargetData *TD) { + assert(TD && "ConstantFoldConstantExpression requires a valid TargetData."); + + SmallVector Ops; + for (User::op_iterator i = CE->op_begin(), e = CE->op_end(); i != e; ++i) + Ops.push_back(cast(*i)); + + if (CE->isCompare()) + return ConstantFoldCompareInstOperands(CE->getPredicate(), + &Ops[0], Ops.size(), TD); + else + return ConstantFoldInstOperands(CE->getOpcode(), CE->getType(), + &Ops[0], Ops.size(), TD); +} + /// ConstantFoldInstOperands - Attempt to constant fold an instruction with the /// specified opcode and operands. If successful, the constant result is /// returned, if not, null is returned. Note that this function can fail when @@ -398,7 +417,7 @@ const TargetData *TD) { // fold: icmp (inttoptr x), null -> icmp x, 0 // fold: icmp (ptrtoint x), 0 -> icmp x, null - // fold: icmp (inttoptr x), (inttoptr y) -> icmp x, y + // fold: icmp (inttoptr x), (inttoptr y) -> icmp trunc/zext x, trunc/zext y // fold: icmp (ptrtoint x), (ptrtoint y) -> icmp x, y // // ConstantExpr::getCompare cannot do this, because it doesn't have TD @@ -426,21 +445,31 @@ } } - if (TD && isa(Ops[1]) && - cast(Ops[1])->getOpcode() == CE0->getOpcode()) { - const Type *IntPtrTy = TD->getIntPtrType(); - // Only do this transformation if the int is intptrty in size, otherwise - // there is a truncation or extension that we aren't modeling. - if ((CE0->getOpcode() == Instruction::IntToPtr && - CE0->getOperand(0)->getType() == IntPtrTy && - Ops[1]->getOperand(0)->getType() == IntPtrTy) || - (CE0->getOpcode() == Instruction::PtrToInt && - CE0->getType() == IntPtrTy && - CE0->getOperand(0)->getType() == Ops[1]->getOperand(0)->getType())) { - Constant *NewOps[] = { - CE0->getOperand(0), cast(Ops[1])->getOperand(0) - }; - return ConstantFoldCompareInstOperands(Predicate, NewOps, 2, TD); + if (ConstantExpr *CE1 = dyn_cast(Ops[1])) { + if (TD && CE0->getOpcode() == CE1->getOpcode()) { + const Type *IntPtrTy = TD->getIntPtrType(); + + if (CE0->getOpcode() == Instruction::IntToPtr) { + // Convert the integer value to the right size to ensure we get the + // proper extension or truncation. + Constant *C0 = ConstantExpr::getIntegerCast(CE0->getOperand(0), + IntPtrTy, false); + Constant *C1 = ConstantExpr::getIntegerCast(CE1->getOperand(0), + IntPtrTy, false); + Constant *NewOps[] = { C0, C1 }; + return ConstantFoldCompareInstOperands(Predicate, NewOps, 2, TD); + } + + // Only do this transformation if the int is intptrty in size, otherwise + // there is a truncation or extension that we aren't modeling. + if ((CE0->getOpcode() == Instruction::PtrToInt && + CE0->getType() == IntPtrTy && + CE0->getOperand(0)->getType() == CE1->getOperand(0)->getType())) { + Constant *NewOps[] = { + CE0->getOperand(0), CE1->getOperand(0) + }; + return ConstantFoldCompareInstOperands(Predicate, NewOps, 2, TD); + } } } } Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51559&r1=51558&r2=51559&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Sun May 25 15:56:15 2008 @@ -11887,6 +11887,16 @@ continue; } + if (TD && I->getType()->getTypeID() == Type::VoidTyID) { + // See if we can constant fold its operands. + for (User::op_iterator i = I->op_begin(), e = I->op_end(); i != e; ++i) { + if (ConstantExpr *CE = dyn_cast(i)) { + if (Constant *NewC = ConstantFoldConstantExpression(CE, TD)) + i->set(NewC); + } + } + } + // See if we can trivially sink this instruction to a successor basic block. // FIXME: Remove GetResultInst test when first class support for aggregates // is implemented. Added: llvm/trunk/test/Transforms/InstCombine/2008-05-18-FoldIntToPtr.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2008-05-18-FoldIntToPtr.ll?rev=51559&view=auto ============================================================================== --- llvm/trunk/test/Transforms/InstCombine/2008-05-18-FoldIntToPtr.ll (added) +++ llvm/trunk/test/Transforms/InstCombine/2008-05-18-FoldIntToPtr.ll Sun May 25 15:56:15 2008 @@ -0,0 +1,13 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {ret i1 false} | count 2 +; PR2329 + +target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" +target triple = "i386-pc-linux-gnu" + +define i1 @f1() { + ret i1 icmp eq (i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 2 to i8*)) +} + +define i1 @f2() { + ret i1 icmp eq (i8* inttoptr (i16 1 to i8*), i8* inttoptr (i16 2 to i8*)) +} From nicholas at mxc.ca Sun May 25 18:43:33 2008 From: nicholas at mxc.ca (Nick Lewycky) Date: Sun, 25 May 2008 23:43:33 -0000 Subject: [llvm-commits] [llvm] r51560 - in /llvm/trunk: lib/Analysis/ScalarEvolution.cpp test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll Message-ID: <200805252343.m4PNhX1c007260@zion.cs.uiuc.edu> Author: nicholas Date: Sun May 25 18:43:32 2008 New Revision: 51560 URL: http://llvm.org/viewvc/llvm-project?rev=51560&view=rev Log: Don't treat values as signed when looking at loop steppings in HowForToNonZero. Added: llvm/trunk/test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=51560&r1=51559&r2=51560&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original) +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Sun May 25 18:43:32 2008 @@ -2548,9 +2548,9 @@ if (SCEVConstant *StartC = dyn_cast(Start)) { ConstantInt *StartCC = StartC->getValue(); Constant *StartNegC = ConstantExpr::getNeg(StartCC); - Constant *Rem = ConstantExpr::getSRem(StartNegC, StepC->getValue()); + Constant *Rem = ConstantExpr::getURem(StartNegC, StepC->getValue()); if (Rem->isNullValue()) { - Constant *Result =ConstantExpr::getSDiv(StartNegC,StepC->getValue()); + Constant *Result = ConstantExpr::getUDiv(StartNegC,StepC->getValue()); return SE.getUnknown(Result); } } Added: llvm/trunk/test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll?rev=51560&view=auto ============================================================================== --- llvm/trunk/test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll (added) +++ llvm/trunk/test/Analysis/ScalarEvolution/2008-05-25-NegativeStepToZero.ll Sun May 25 18:43:32 2008 @@ -0,0 +1,20 @@ +; RUN: llvm-as < %s | opt -analyze -scalar-evolution | grep {61 iterations} + +define i32 @func_6() nounwind { +entry: + br label %bb5 + +bb: ; preds = %bb5 + %tmp2 = add i32 %i.0, 1 ; [#uses=1] + %tmp4 = add i8 %x.0, -4 ; [#uses=1] + br label %bb5 + +bb5: ; preds = %bb, %entry + %x.0 = phi i8 [ 0, %entry ], [ %tmp4, %bb ] ; [#uses=2] + %i.0 = phi i32 [ 0, %entry ], [ %tmp2, %bb ] ; [#uses=2] + %tmp7 = icmp eq i8 %x.0, 12 ; [#uses=1] + br i1 %tmp7, label %return, label %bb + +return: ; preds = %bb5 + ret i32 %i.0 +} From nicholas at mxc.ca Sun May 25 20:27:09 2008 From: nicholas at mxc.ca (Nick Lewycky) Date: Mon, 26 May 2008 01:27:09 -0000 Subject: [llvm-commits] [llvm] r51561 - /llvm/trunk/test/Analysis/ScalarEvolution/smax.ll Message-ID: <200805260127.m4Q1R9ku010039@zion.cs.uiuc.edu> Author: nicholas Date: Sun May 25 20:27:08 2008 New Revision: 51561 URL: http://llvm.org/viewvc/llvm-project?rev=51561&view=rev Log: Use {} instead of "" in RUN lines. Modified: llvm/trunk/test/Analysis/ScalarEvolution/smax.ll Modified: llvm/trunk/test/Analysis/ScalarEvolution/smax.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/ScalarEvolution/smax.ll?rev=51561&r1=51560&r2=51561&view=diff ============================================================================== --- llvm/trunk/test/Analysis/ScalarEvolution/smax.ll (original) +++ llvm/trunk/test/Analysis/ScalarEvolution/smax.ll Sun May 25 20:27:08 2008 @@ -1,6 +1,6 @@ ; RUN: llvm-as < %s | opt -analyze -scalar-evolution | grep smax | count 2 ; RUN: llvm-as < %s | opt -analyze -scalar-evolution | grep \ -; RUN: "%. smax %. smax %." +; RUN: {%. smax %. smax %.} ; PR1614 define i32 @x(i32 %a, i32 %b, i32 %c) {
    NameOrganization