From baldrick at free.fr Mon Jul 23 01:25:35 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 23 Jul 2007 08:25:35 +0200 Subject: [llvm-commits] [llvm] r40128 - /llvm/trunk/test/CFrontend/2004-02-13-Memset.c In-Reply-To: <2A93540A-9D53-4416-AFE4-CBC33412E7FD@apple.com> References: <200707202239.l6KMd6qO005993@zion.cs.uiuc.edu> <200707221240.22410.baldrick@free.fr> <2A93540A-9D53-4416-AFE4-CBC33412E7FD@apple.com> Message-ID: <200707230825.40486.baldrick@free.fr> > > Sure! But in fact the argument was already known to be a pointer > > in all cases. I've committed a fix. > > Nice! Does it make sense to change the dejagnu test back to -O0? It does and I did. Ciao, Duncan. From rspencer at reidspencer.com Mon Jul 23 02:49:28 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Mon, 23 Jul 2007 07:49:28 -0000 Subject: [llvm-commits] [llvm-top] r40425 - /llvm-top/trunk/library.sh Message-ID: <200707230749.l6N7nSWk025429@zion.cs.uiuc.edu> Author: reid Date: Mon Jul 23 02:49:26 2007 New Revision: 40425 URL: http://llvm.org/viewvc/llvm-project?rev=40425&view=rev Log: Support arithmetic expansion in older shells. Modified: llvm-top/trunk/library.sh Modified: llvm-top/trunk/library.sh URL: http://llvm.org/viewvc/llvm-project/llvm-top/trunk/library.sh?rev=40425&r1=40424&r2=40425&view=diff ============================================================================== --- llvm-top/trunk/library.sh (original) +++ llvm-top/trunk/library.sh Mon Jul 23 02:49:26 2007 @@ -173,7 +173,7 @@ if test "$RECURSION_DEPTH" -gt 10 ; then die 2 "Recursing too deeply on module dependencies" fi - let RECURSION_DEPTH="$RECURSION_DEPTH + 1" + let RECURSION_DEPTH="$((RECURSION_DEPTH + 1))" local module="$1" msg 2 "Getting dependencies for module '$module'" get_module_info $module DepModule From rspencer at reidspencer.com Mon Jul 23 03:09:16 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Mon, 23 Jul 2007 08:09:16 -0000 Subject: [llvm-commits] [llvm] r40426 - /llvm/trunk/Makefile.rules Message-ID: <200707230809.l6N89HWb025847@zion.cs.uiuc.edu> Author: reid Date: Mon Jul 23 03:09:15 2007 New Revision: 40426 URL: http://llvm.org/viewvc/llvm-project?rev=40426&view=rev Log: Remove bizarre use of /dev/null in a makefile include line that produces warning from make about bad timestamp on /dev/null Patch by Holger Schurig. Modified: llvm/trunk/Makefile.rules Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=40426&r1=40425&r2=40426&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Mon Jul 23 03:09:15 2007 @@ -391,7 +391,7 @@ ifndef VERBOSE Verb := @ LibTool.Flags += --silent - AR.Flags += >/dev/null 2>/dev/null + AR.Flags += ">/dev/null 2>/dev/null" ConfigureScriptFLAGS += >$(PROJ_OBJ_DIR)/configure.out 2>&1 else ConfigureScriptFLAGS := @@ -1471,7 +1471,7 @@ DependFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources))) DependFiles := $(DependFiles:%=$(PROJ_OBJ_DIR)/$(BuildMode)/%.d) --include /dev/null $(DependFiles) +-include $(DependFiles) endif From baldrick at free.fr Mon Jul 23 03:16:35 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 23 Jul 2007 08:16:35 -0000 Subject: [llvm-commits] [llvm-gcc-4.0] r40427 - /llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp Message-ID: <200707230816.l6N8GZ0P026073@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 23 03:16:35 2007 New Revision: 40427 URL: http://llvm.org/viewvc/llvm-project?rev=40427&view=rev Log: Cleanup fallout from the elimination of signed and unsigned types in LLVM. Modified: llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp Modified: llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp?rev=40427&r1=40426&r2=40427&view=diff ============================================================================== --- llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp Mon Jul 23 03:16:35 2007 @@ -5508,27 +5508,15 @@ std::vector Elts; if (ElTy == Type::Int8Ty) { - const signed char *InStr = (const signed char *)TREE_STRING_POINTER(exp); - for (unsigned i = 0; i != Len; ++i) - Elts.push_back(ConstantInt::get(Type::Int8Ty, InStr[i])); - } else if (ElTy == Type::Int8Ty) { const unsigned char *InStr =(const unsigned char *)TREE_STRING_POINTER(exp); for (unsigned i = 0; i != Len; ++i) Elts.push_back(ConstantInt::get(Type::Int8Ty, InStr[i])); } else if (ElTy == Type::Int16Ty) { - const signed short *InStr = (const signed short *)TREE_STRING_POINTER(exp); - for (unsigned i = 0; i != Len; ++i) - Elts.push_back(ConstantInt::get(Type::Int16Ty, InStr[i])); - } else if (ElTy == Type::Int16Ty) { const unsigned short *InStr = (const unsigned short *)TREE_STRING_POINTER(exp); for (unsigned i = 0; i != Len; ++i) Elts.push_back(ConstantInt::get(Type::Int16Ty, InStr[i])); } else if (ElTy == Type::Int32Ty) { - const signed *InStr = (const signed *)TREE_STRING_POINTER(exp); - for (unsigned i = 0; i != Len; ++i) - Elts.push_back(ConstantInt::get(Type::Int32Ty, InStr[i])); - } else if (ElTy == Type::Int32Ty) { const unsigned *InStr = (const unsigned *)TREE_STRING_POINTER(exp); for (unsigned i = 0; i != Len; ++i) Elts.push_back(ConstantInt::get(Type::Int32Ty, InStr[i])); From baldrick at free.fr Mon Jul 23 03:18:47 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 23 Jul 2007 08:18:47 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40428 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Message-ID: <200707230818.l6N8IlxO026139@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 23 03:18:47 2007 New Revision: 40428 URL: http://llvm.org/viewvc/llvm-project?rev=40428&view=rev Log: Forward port of r40427. Cleanup fallout from the elimination of signed and unsigned types in LLVM. 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=40428&r1=40427&r2=40428&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon Jul 23 03:18:47 2007 @@ -5536,27 +5536,15 @@ std::vector Elts; if (ElTy == Type::Int8Ty) { - const signed char *InStr = (const signed char *)TREE_STRING_POINTER(exp); - for (unsigned i = 0; i != Len; ++i) - Elts.push_back(ConstantInt::get(Type::Int8Ty, InStr[i])); - } else if (ElTy == Type::Int8Ty) { const unsigned char *InStr =(const unsigned char *)TREE_STRING_POINTER(exp); for (unsigned i = 0; i != Len; ++i) Elts.push_back(ConstantInt::get(Type::Int8Ty, InStr[i])); } else if (ElTy == Type::Int16Ty) { - const signed short *InStr = (const signed short *)TREE_STRING_POINTER(exp); - for (unsigned i = 0; i != Len; ++i) - Elts.push_back(ConstantInt::get(Type::Int16Ty, InStr[i])); - } else if (ElTy == Type::Int16Ty) { const unsigned short *InStr = (const unsigned short *)TREE_STRING_POINTER(exp); for (unsigned i = 0; i != Len; ++i) Elts.push_back(ConstantInt::get(Type::Int16Ty, InStr[i])); } else if (ElTy == Type::Int32Ty) { - const signed *InStr = (const signed *)TREE_STRING_POINTER(exp); - for (unsigned i = 0; i != Len; ++i) - Elts.push_back(ConstantInt::get(Type::Int32Ty, InStr[i])); - } else if (ElTy == Type::Int32Ty) { const unsigned *InStr = (const unsigned *)TREE_STRING_POINTER(exp); for (unsigned i = 0; i != Len; ++i) Elts.push_back(ConstantInt::get(Type::Int32Ty, InStr[i])); From rspencer at reidspencer.com Mon Jul 23 03:20:46 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Mon, 23 Jul 2007 08:20:46 -0000 Subject: [llvm-commits] [llvm] r40429 - /llvm/trunk/Makefile.rules Message-ID: <200707230820.l6N8Kkgg026191@zion.cs.uiuc.edu> Author: reid Date: Mon Jul 23 03:20:46 2007 New Revision: 40429 URL: http://llvm.org/viewvc/llvm-project?rev=40429&view=rev Log: Restore ability to build archives (oops) Fix -include line so it doesn't reference /dev/null Modified: llvm/trunk/Makefile.rules Modified: llvm/trunk/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=40429&r1=40428&r2=40429&view=diff ============================================================================== --- llvm/trunk/Makefile.rules (original) +++ llvm/trunk/Makefile.rules Mon Jul 23 03:20:46 2007 @@ -391,7 +391,7 @@ ifndef VERBOSE Verb := @ LibTool.Flags += --silent - AR.Flags += ">/dev/null 2>/dev/null" + AR.Flags += >/dev/null 2>/dev/null ConfigureScriptFLAGS += >$(PROJ_OBJ_DIR)/configure.out 2>&1 else ConfigureScriptFLAGS := @@ -1471,7 +1471,7 @@ DependFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources))) DependFiles := $(DependFiles:%=$(PROJ_OBJ_DIR)/$(BuildMode)/%.d) --include $(DependFiles) +-include $(DependFiles) "" endif From rspencer at reidspencer.com Mon Jul 23 03:23:19 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Mon, 23 Jul 2007 08:23:19 -0000 Subject: [llvm-commits] [llvm-top] r40430 - /llvm-top/trunk/library.sh Message-ID: <200707230823.l6N8NJMO026249@zion.cs.uiuc.edu> Author: reid Date: Mon Jul 23 03:23:19 2007 New Revision: 40430 URL: http://llvm.org/viewvc/llvm-project?rev=40430&view=rev Log: One more try at getting arithmetic expansion to work with Bourne shell. Modified: llvm-top/trunk/library.sh Modified: llvm-top/trunk/library.sh URL: http://llvm.org/viewvc/llvm-project/llvm-top/trunk/library.sh?rev=40430&r1=40429&r2=40430&view=diff ============================================================================== --- llvm-top/trunk/library.sh (original) +++ llvm-top/trunk/library.sh Mon Jul 23 03:23:19 2007 @@ -173,7 +173,7 @@ if test "$RECURSION_DEPTH" -gt 10 ; then die 2 "Recursing too deeply on module dependencies" fi - let RECURSION_DEPTH="$((RECURSION_DEPTH + 1))" + RECURSION_DEPTH=$(($RECURSION_DEPTH + 1)) local module="$1" msg 2 "Getting dependencies for module '$module'" get_module_info $module DepModule From baldrick at free.fr Mon Jul 23 04:26:28 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 23 Jul 2007 09:26:28 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40431 - /llvm-gcc-4.2/trunk/gcc/passes.c Message-ID: <200707230926.l6N9QSrF028102@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 23 04:26:28 2007 New Revision: 40431 URL: http://llvm.org/viewvc/llvm-project?rev=40431&view=rev Log: We don't want gcc to lower vectors. Also, the vector lowering seems to create invalid BIT_FIELD_REFs. This fixes 2006-03-16-VectorCtor.c. 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=40431&r1=40430&r2=40431&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/passes.c (original) +++ llvm-gcc-4.2/trunk/gcc/passes.c Mon Jul 23 04:26:28 2007 @@ -496,7 +496,8 @@ NEXT_PASS (pass_lower_eh); NEXT_PASS (pass_build_cfg); NEXT_PASS (pass_lower_complex_O0); - NEXT_PASS (pass_lower_vector); + /* LLVM LOCAL */ + /* NEXT_PASS (pass_lower_vector); */ NEXT_PASS (pass_warn_function_return); NEXT_PASS (pass_early_tree_profile); *p = NULL; From baldrick at free.fr Mon Jul 23 04:47:04 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 23 Jul 2007 09:47:04 -0000 Subject: [llvm-commits] [llvm-gcc-4.0] r40432 - in /llvm-gcc-4.0/trunk/gcc: common.opt llvm-backend.cpp Message-ID: <200707230947.l6N9l4lv028982@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 23 04:47:03 2007 New Revision: 40432 URL: http://llvm.org/viewvc/llvm-project?rev=40432&view=rev Log: Recover [129769], lost in the repository move. Provide command line switches to print pass manager info useful for debugging. Patch by Devang. Modified: llvm-gcc-4.0/trunk/gcc/common.opt llvm-gcc-4.0/trunk/gcc/llvm-backend.cpp Modified: llvm-gcc-4.0/trunk/gcc/common.opt URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/common.opt?rev=40432&r1=40431&r2=40432&view=diff ============================================================================== --- llvm-gcc-4.0/trunk/gcc/common.opt (original) +++ llvm-gcc-4.0/trunk/gcc/common.opt Mon Jul 23 04:47:03 2007 @@ -202,6 +202,15 @@ emit-llvm-bc Common Report Var(emit_llvm_bc) Emit LLVM IR to the output file instead of native machine code. + +; Debug pass manager +fdebug-pass-structure +Common Report Var(flag_debug_pass_structure) +Print pass manager structure + +fdebug-pass-arguments +Common Report Var(flag_debug_pass_arguments) +Print pass manager arguments ; APPLE LOCAL end LLVM ; The version of the C++ ABI in use. The following values are allowed: Modified: llvm-gcc-4.0/trunk/gcc/llvm-backend.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-backend.cpp?rev=40432&r1=40431&r2=40432&view=diff ============================================================================== --- llvm-gcc-4.0/trunk/gcc/llvm-backend.cpp (original) +++ llvm-gcc-4.0/trunk/gcc/llvm-backend.cpp Mon Jul 23 04:47:03 2007 @@ -118,7 +118,10 @@ Args.push_back("--nozero-initialized-in-bss"); if (flag_debug_asm) Args.push_back("--asm-verbose"); - + if (flag_debug_pass_structure) + Args.push_back("--debug-pass=Structure"); + if (flag_debug_pass_arguments) + Args.push_back("--debug-pass=Arguments"); // Disabled until PR1224 is resolved. //if (flag_exceptions) // Args.push_back("--enable-eh"); From baldrick at free.fr Mon Jul 23 05:48:11 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 23 Jul 2007 10:48:11 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40433 - in /llvm-gcc-4.2/trunk/gcc: common.opt llvm-backend.cpp Message-ID: <200707231048.l6NAmBYQ030614@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 23 05:48:10 2007 New Revision: 40433 URL: http://llvm.org/viewvc/llvm-project?rev=40433&view=rev Log: Forward port of r40432. Recover [129769], lost in the repository move. Provide command line switches to print pass manager info useful for debugging. Patch by Devang. Modified: llvm-gcc-4.2/trunk/gcc/common.opt llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Modified: llvm-gcc-4.2/trunk/gcc/common.opt URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/common.opt?rev=40433&r1=40432&r2=40433&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/common.opt (original) +++ llvm-gcc-4.2/trunk/gcc/common.opt Mon Jul 23 05:48:10 2007 @@ -224,6 +224,15 @@ emit-llvm-bc Common Report Var(emit_llvm_bc) Emit LLVM IR to the output file instead of native machine code. + +; Debug pass manager +fdebug-pass-structure +Common Report Var(flag_debug_pass_structure) +Print pass manager structure + +fdebug-pass-arguments +Common Report Var(flag_debug_pass_arguments) +Print pass manager arguments ; LLVM LOCAL end ; The version of the C++ ABI in use. The following values are allowed: 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=40433&r1=40432&r2=40433&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Mon Jul 23 05:48:10 2007 @@ -119,7 +119,10 @@ Args.push_back("--nozero-initialized-in-bss"); if (flag_debug_asm) Args.push_back("--asm-verbose"); - + if (flag_debug_pass_structure) + Args.push_back("--debug-pass=Structure"); + if (flag_debug_pass_arguments) + Args.push_back("--debug-pass=Arguments"); // Disabled until PR1224 is resolved. //if (flag_exceptions) // Args.push_back("--enable-eh"); From baldrick at free.fr Mon Jul 23 06:41:11 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 23 Jul 2007 11:41:11 -0000 Subject: [llvm-commits] [test-suite] r40434 - in /test-suite/trunk/SingleSource/UnitTests/Vector/SSE: sse.expandfft.c sse.isamax.c sse.stepfft.c Message-ID: <200707231141.l6NBfBE9031789@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 23 06:41:10 2007 New Revision: 40434 URL: http://llvm.org/viewvc/llvm-project?rev=40434&view=rev Log: Fix these in a more interesting way. Modified: test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.isamax.c test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c Modified: test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c?rev=40434&r1=40433&r2=40434&view=diff ============================================================================== --- test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c (original) +++ test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.expandfft.c Mon Jul 23 06:41:10 2007 @@ -94,8 +94,9 @@ int jb, jc, jw, k, k2, lj, m, j, mj, mj2, pass, tgle; float (*a)[2],(*b)[2],(*c)[2],(*d)[2]; float (*aa)[2],(*bb)[2],(*cb)[2],(*dd)[2]; - float rp,up,wra[7],wua[7]; - float *wr = wra, *wu = wua; + float rp,up; + float wr[4] __attribute__ ((aligned (16))); + float wu[4] __attribute__ ((aligned (16))); __m128 V0,V1,V2,V3,V4,V5,V6,V7; __m128 V8,V9,V10,V11,V12,V13,V14,V15; @@ -108,8 +109,6 @@ mj = 1; mj2 = 2; lj = n/2; - wr += (4 - ((unsigned int) wr >> 2)) & 0x03; // align wr - wu += (4 - ((unsigned int) wu >> 2)) & 0x03; // align wu // first pass thru data: x -> y a = (void *)&x[0][0]; b = (void *)&x[n/2][0]; Modified: test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.isamax.c URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.isamax.c?rev=40434&r1=40433&r2=40434&view=diff ============================================================================== --- test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.isamax.c (original) +++ test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.isamax.c Mon Jul 23 06:41:10 2007 @@ -30,8 +30,8 @@ float bbig,ebig,bres,*xp; int eres,i,ibbig,iebig,align,nsegs,mb,nn; __m128 offset4,V0,V1,V2,V3,V6,V7; - float xbiga[11],indxa[11]; - float *xbig = xbiga, *indx = indxa; + float xbig[8] __attribute__ ((aligned (16))); + float indx[8] __attribute__ ((aligned (16))); // n < NS done in scalar mode if(n < NS){ iebig = 0; @@ -100,8 +100,6 @@ V7 = _mm_max_ps(V7,V3); } // Now finish up: segment maxima are in V0, indices in V7 - xbig += (4 - ((unsigned int) xbig >> 2)) & 0x03; // align xbig - indx += (4 - ((unsigned int) indx >> 2)) & 0x03; // align indx _mm_store_ps(xbig,V0); _mm_store_ps(indx,V7); if(eres>0){ Modified: test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c?rev=40434&r1=40433&r2=40434&view=diff ============================================================================== --- test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c (original) +++ test-suite/trunk/SingleSource/UnitTests/Vector/SSE/sse.stepfft.c Mon Jul 23 06:41:10 2007 @@ -156,16 +156,14 @@ float a[][2],b[][2],c[][2],d[][2],w[][2],sign; { int j,k,jc,jw,l,lj,mj2,mseg; - float rp,up,wra[7],wua[7]; + float rp,up; + float wr[4] __attribute__ ((aligned (16))); + float wu[4] __attribute__ ((aligned (16))); __m128 xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7; - float *wr = wra, *wu = wua; mj2 = 2*mj; lj = n/mj2; - wr += (4 - ((unsigned int) wr >> 2)) & 0x03; // align wr - wu += (4 - ((unsigned int) wu >> 2)) & 0x03; // align wu - for(j=0; j Author: baldrick Date: Mon Jul 23 08:10:20 2007 New Revision: 40435 URL: http://llvm.org/viewvc/llvm-project?rev=40435&view=rev Log: Forward port of [129669]. Add support for this builtin: __builtin_ia32_vec_ext_v2di 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=40435&r1=40434&r2=40435&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Mon Jul 23 08:10:20 2007 @@ -442,6 +442,7 @@ case IX86_BUILTIN_VEC_EXT_V2SI: case IX86_BUILTIN_VEC_EXT_V4HI: case IX86_BUILTIN_VEC_EXT_V2DF: + case IX86_BUILTIN_VEC_EXT_V2DI: case IX86_BUILTIN_VEC_EXT_V4SI: case IX86_BUILTIN_VEC_EXT_V4SF: case IX86_BUILTIN_VEC_EXT_V8HI: From baldrick at free.fr Mon Jul 23 08:41:54 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 23 Jul 2007 13:41:54 -0000 Subject: [llvm-commits] [llvm] r40436 - in /llvm/trunk/test/FrontendAda: Support/ Support/fat_fields.ads Support/global_constant.ads Support/non_lvalue.ads Support/unc_constructor.ads Support/var_size.ads array_constructor.adb array_range_ref.adb array_ref.adb array_size.adb asm.adb debug_var_size.ads emit_var.ads fat_fields.adb fat_fields.ads global_constant.adb global_constant.ads non_lvalue.adb non_lvalue.ads switch.adb unc_constructor.adb unc_constructor.ads var_size.adb var_size.ads vce.adb vce_lv.adb Message-ID: <200707231341.l6NDfsla002740@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 23 08:41:53 2007 New Revision: 40436 URL: http://llvm.org/viewvc/llvm-project?rev=40436&view=rev Log: For multipart tests, place the parts with no RUN line in Support. Give up on sending output to /dev/null - this cannot always be arranged. Added: llvm/trunk/test/FrontendAda/Support/ llvm/trunk/test/FrontendAda/Support/fat_fields.ads llvm/trunk/test/FrontendAda/Support/global_constant.ads llvm/trunk/test/FrontendAda/Support/non_lvalue.ads llvm/trunk/test/FrontendAda/Support/unc_constructor.ads llvm/trunk/test/FrontendAda/Support/var_size.ads Removed: llvm/trunk/test/FrontendAda/fat_fields.ads llvm/trunk/test/FrontendAda/global_constant.ads llvm/trunk/test/FrontendAda/non_lvalue.ads llvm/trunk/test/FrontendAda/unc_constructor.ads llvm/trunk/test/FrontendAda/var_size.ads Modified: llvm/trunk/test/FrontendAda/array_constructor.adb llvm/trunk/test/FrontendAda/array_range_ref.adb llvm/trunk/test/FrontendAda/array_ref.adb llvm/trunk/test/FrontendAda/array_size.adb llvm/trunk/test/FrontendAda/asm.adb llvm/trunk/test/FrontendAda/debug_var_size.ads llvm/trunk/test/FrontendAda/emit_var.ads llvm/trunk/test/FrontendAda/fat_fields.adb llvm/trunk/test/FrontendAda/global_constant.adb llvm/trunk/test/FrontendAda/non_lvalue.adb llvm/trunk/test/FrontendAda/switch.adb llvm/trunk/test/FrontendAda/unc_constructor.adb llvm/trunk/test/FrontendAda/var_size.adb llvm/trunk/test/FrontendAda/vce.adb llvm/trunk/test/FrontendAda/vce_lv.adb Added: llvm/trunk/test/FrontendAda/Support/fat_fields.ads URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/Support/fat_fields.ads?rev=40436&view=auto ============================================================================== --- llvm/trunk/test/FrontendAda/Support/fat_fields.ads (added) +++ llvm/trunk/test/FrontendAda/Support/fat_fields.ads Mon Jul 23 08:41:53 2007 @@ -0,0 +1,6 @@ +package Fat_Fields is + pragma Elaborate_Body; + type A is array (Positive range <>) of Boolean; + type A_Ptr is access A; + P : A_Ptr := null; +end; Added: llvm/trunk/test/FrontendAda/Support/global_constant.ads URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/Support/global_constant.ads?rev=40436&view=auto ============================================================================== --- llvm/trunk/test/FrontendAda/Support/global_constant.ads (added) +++ llvm/trunk/test/FrontendAda/Support/global_constant.ads Mon Jul 23 08:41:53 2007 @@ -0,0 +1,4 @@ +package Global_Constant is + pragma Elaborate_Body; + An_Error : exception; +end; Added: llvm/trunk/test/FrontendAda/Support/non_lvalue.ads URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/Support/non_lvalue.ads?rev=40436&view=auto ============================================================================== --- llvm/trunk/test/FrontendAda/Support/non_lvalue.ads (added) +++ llvm/trunk/test/FrontendAda/Support/non_lvalue.ads Mon Jul 23 08:41:53 2007 @@ -0,0 +1,11 @@ +package Non_LValue is + type T (Length : Natural) is record + A : String (1 .. Length); + B : String (1 .. Length); + end record; + type T_Ptr is access all T; + type U is record + X : T_Ptr; + end record; + function A (Y : U) return String; +end; Added: llvm/trunk/test/FrontendAda/Support/unc_constructor.ads URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/Support/unc_constructor.ads?rev=40436&view=auto ============================================================================== --- llvm/trunk/test/FrontendAda/Support/unc_constructor.ads (added) +++ llvm/trunk/test/FrontendAda/Support/unc_constructor.ads Mon Jul 23 08:41:53 2007 @@ -0,0 +1,8 @@ +package Unc_Constructor is + type C is null record; + type A is array (Positive range <>) of C; + A0 : constant A; + procedure P (X : A); +private + A0 : aliased constant A := (1 .. 0 => (null record)); +end; Added: llvm/trunk/test/FrontendAda/Support/var_size.ads URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/Support/var_size.ads?rev=40436&view=auto ============================================================================== --- llvm/trunk/test/FrontendAda/Support/var_size.ads (added) +++ llvm/trunk/test/FrontendAda/Support/var_size.ads Mon Jul 23 08:41:53 2007 @@ -0,0 +1,7 @@ +package Var_Size is + type T (Length : Natural) is record + A : String (1 .. Length); + B : String (1 .. Length); + end record; + function A (X : T) return String; +end; Modified: llvm/trunk/test/FrontendAda/array_constructor.adb URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/array_constructor.adb?rev=40436&r1=40435&r2=40436&view=diff ============================================================================== --- llvm/trunk/test/FrontendAda/array_constructor.adb (original) +++ llvm/trunk/test/FrontendAda/array_constructor.adb Mon Jul 23 08:41:53 2007 @@ -1,4 +1,4 @@ --- RUN: %llvmgcc -c %s -o /dev/null +-- RUN: %llvmgcc -c %s procedure Array_Constructor is A : array (Integer range <>) of Boolean := (True, False); begin Modified: llvm/trunk/test/FrontendAda/array_range_ref.adb URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/array_range_ref.adb?rev=40436&r1=40435&r2=40436&view=diff ============================================================================== --- llvm/trunk/test/FrontendAda/array_range_ref.adb (original) +++ llvm/trunk/test/FrontendAda/array_range_ref.adb Mon Jul 23 08:41:53 2007 @@ -1,4 +1,4 @@ --- RUN: %llvmgcc -c %s -o /dev/null +-- RUN: %llvmgcc -c %s procedure Array_Range_Ref is A : String (1 .. 3); B : String := A (A'RANGE)(1 .. 3); Modified: llvm/trunk/test/FrontendAda/array_ref.adb URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/array_ref.adb?rev=40436&r1=40435&r2=40436&view=diff ============================================================================== --- llvm/trunk/test/FrontendAda/array_ref.adb (original) +++ llvm/trunk/test/FrontendAda/array_ref.adb Mon Jul 23 08:41:53 2007 @@ -1,4 +1,4 @@ --- RUN: %llvmgcc -c %s -o /dev/null +-- RUN: %llvmgcc -c %s procedure Array_Ref is type A is array (Natural range <>, Natural range <>) of Boolean; type A_Access is access A; Modified: llvm/trunk/test/FrontendAda/array_size.adb URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/array_size.adb?rev=40436&r1=40435&r2=40436&view=diff ============================================================================== --- llvm/trunk/test/FrontendAda/array_size.adb (original) +++ llvm/trunk/test/FrontendAda/array_size.adb Mon Jul 23 08:41:53 2007 @@ -1,4 +1,4 @@ --- RUN: %llvmgcc -c %s -o /dev/null +-- RUN: %llvmgcc -c %s procedure Array_Size is subtype S is String (1 .. 2); type R is record Modified: llvm/trunk/test/FrontendAda/asm.adb URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/asm.adb?rev=40436&r1=40435&r2=40436&view=diff ============================================================================== --- llvm/trunk/test/FrontendAda/asm.adb (original) +++ llvm/trunk/test/FrontendAda/asm.adb Mon Jul 23 08:41:53 2007 @@ -1,4 +1,4 @@ --- RUN: %llvmgcc -c %s -o /dev/null +-- RUN: %llvmgcc -c %s with System.Machine_Code; procedure Asm is begin Modified: llvm/trunk/test/FrontendAda/debug_var_size.ads URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/debug_var_size.ads?rev=40436&r1=40435&r2=40436&view=diff ============================================================================== --- llvm/trunk/test/FrontendAda/debug_var_size.ads (original) +++ llvm/trunk/test/FrontendAda/debug_var_size.ads Mon Jul 23 08:41:53 2007 @@ -1,4 +1,4 @@ --- RUN: %llvmgcc -c -g %s -o /dev/null +-- RUN: %llvmgcc -c -g %s package Debug_Var_Size is subtype Length_Type is Positive range 1 .. 64; type T (Length : Length_Type := 1) is record Modified: llvm/trunk/test/FrontendAda/emit_var.ads URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/emit_var.ads?rev=40436&r1=40435&r2=40436&view=diff ============================================================================== --- llvm/trunk/test/FrontendAda/emit_var.ads (original) +++ llvm/trunk/test/FrontendAda/emit_var.ads Mon Jul 23 08:41:53 2007 @@ -1,4 +1,4 @@ --- RUN: %llvmgcc -c %s -o /dev/null +-- RUN: %llvmgcc -c %s with Ada.Finalization; package Emit_Var is type Search_Type is new Ada.Finalization.Controlled with null record; Modified: llvm/trunk/test/FrontendAda/fat_fields.adb URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/fat_fields.adb?rev=40436&r1=40435&r2=40436&view=diff ============================================================================== --- llvm/trunk/test/FrontendAda/fat_fields.adb (original) +++ llvm/trunk/test/FrontendAda/fat_fields.adb Mon Jul 23 08:41:53 2007 @@ -1,5 +1,5 @@ --- RUN: %llvmgcc -c %s -o /dev/null --- RUN: %llvmgcc -c %s -O2 -o /dev/null +-- RUN: %llvmgcc -c %s -I%p/Support +-- RUN: %llvmgcc -c %s -I%p/Support -O2 package body Fat_Fields is procedure Proc is begin Removed: llvm/trunk/test/FrontendAda/fat_fields.ads URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/fat_fields.ads?rev=40435&view=auto ============================================================================== --- llvm/trunk/test/FrontendAda/fat_fields.ads (original) +++ llvm/trunk/test/FrontendAda/fat_fields.ads (removed) @@ -1,6 +0,0 @@ -package Fat_Fields is - pragma Elaborate_Body; - type A is array (Positive range <>) of Boolean; - type A_Ptr is access A; - P : A_Ptr := null; -end; Modified: llvm/trunk/test/FrontendAda/global_constant.adb URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/global_constant.adb?rev=40436&r1=40435&r2=40436&view=diff ============================================================================== --- llvm/trunk/test/FrontendAda/global_constant.adb (original) +++ llvm/trunk/test/FrontendAda/global_constant.adb Mon Jul 23 08:41:53 2007 @@ -1,4 +1,4 @@ --- RUN: %llvmgcc -c %s -o /dev/null +-- RUN: %llvmgcc -c %s -I%p/Support package body Global_Constant is begin raise An_Error; Removed: llvm/trunk/test/FrontendAda/global_constant.ads URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/global_constant.ads?rev=40435&view=auto ============================================================================== --- llvm/trunk/test/FrontendAda/global_constant.ads (original) +++ llvm/trunk/test/FrontendAda/global_constant.ads (removed) @@ -1,4 +0,0 @@ -package Global_Constant is - pragma Elaborate_Body; - An_Error : exception; -end; Modified: llvm/trunk/test/FrontendAda/non_lvalue.adb URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/non_lvalue.adb?rev=40436&r1=40435&r2=40436&view=diff ============================================================================== --- llvm/trunk/test/FrontendAda/non_lvalue.adb (original) +++ llvm/trunk/test/FrontendAda/non_lvalue.adb Mon Jul 23 08:41:53 2007 @@ -1,4 +1,4 @@ --- RUN: %llvmgcc -c %s -o /dev/null +-- RUN: %llvmgcc -c %s -I%p/Support package body Non_LValue is function A (Y : U) return String is begin Removed: llvm/trunk/test/FrontendAda/non_lvalue.ads URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/non_lvalue.ads?rev=40435&view=auto ============================================================================== --- llvm/trunk/test/FrontendAda/non_lvalue.ads (original) +++ llvm/trunk/test/FrontendAda/non_lvalue.ads (removed) @@ -1,11 +0,0 @@ -package Non_LValue is - type T (Length : Natural) is record - A : String (1 .. Length); - B : String (1 .. Length); - end record; - type T_Ptr is access all T; - type U is record - X : T_Ptr; - end record; - function A (Y : U) return String; -end; Modified: llvm/trunk/test/FrontendAda/switch.adb URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/switch.adb?rev=40436&r1=40435&r2=40436&view=diff ============================================================================== --- llvm/trunk/test/FrontendAda/switch.adb (original) +++ llvm/trunk/test/FrontendAda/switch.adb Mon Jul 23 08:41:53 2007 @@ -1,4 +1,4 @@ --- RUN: %llvmgcc -c %s -o /dev/null +-- RUN: %llvmgcc -c %s function Switch (N : Integer) return Integer is begin case N is Modified: llvm/trunk/test/FrontendAda/unc_constructor.adb URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/unc_constructor.adb?rev=40436&r1=40435&r2=40436&view=diff ============================================================================== --- llvm/trunk/test/FrontendAda/unc_constructor.adb (original) +++ llvm/trunk/test/FrontendAda/unc_constructor.adb Mon Jul 23 08:41:53 2007 @@ -1,4 +1,4 @@ --- RUN: %llvmgcc -c %s -o /dev/null +-- RUN: %llvmgcc -c %s -I%p/Support package body Unc_Constructor is procedure P (X : A) is begin Removed: llvm/trunk/test/FrontendAda/unc_constructor.ads URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/unc_constructor.ads?rev=40435&view=auto ============================================================================== --- llvm/trunk/test/FrontendAda/unc_constructor.ads (original) +++ llvm/trunk/test/FrontendAda/unc_constructor.ads (removed) @@ -1,8 +0,0 @@ -package Unc_Constructor is - type C is null record; - type A is array (Positive range <>) of C; - A0 : constant A; - procedure P (X : A); -private - A0 : aliased constant A := (1 .. 0 => (null record)); -end; Modified: llvm/trunk/test/FrontendAda/var_size.adb URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/var_size.adb?rev=40436&r1=40435&r2=40436&view=diff ============================================================================== --- llvm/trunk/test/FrontendAda/var_size.adb (original) +++ llvm/trunk/test/FrontendAda/var_size.adb Mon Jul 23 08:41:53 2007 @@ -1,4 +1,4 @@ --- RUN: %llvmgcc -c %s -o /dev/null +-- RUN: %llvmgcc -c %s -I%p/Support package body Var_Size is function A (X : T) return String is begin Removed: llvm/trunk/test/FrontendAda/var_size.ads URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/var_size.ads?rev=40435&view=auto ============================================================================== --- llvm/trunk/test/FrontendAda/var_size.ads (original) +++ llvm/trunk/test/FrontendAda/var_size.ads (removed) @@ -1,7 +0,0 @@ -package Var_Size is - type T (Length : Natural) is record - A : String (1 .. Length); - B : String (1 .. Length); - end record; - function A (X : T) return String; -end; Modified: llvm/trunk/test/FrontendAda/vce.adb URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/vce.adb?rev=40436&r1=40435&r2=40436&view=diff ============================================================================== --- llvm/trunk/test/FrontendAda/vce.adb (original) +++ llvm/trunk/test/FrontendAda/vce.adb Mon Jul 23 08:41:53 2007 @@ -1,4 +1,4 @@ --- RUN: %llvmgcc -c %s -o /dev/null +-- RUN: %llvmgcc -c %s procedure VCE is S : String (1 .. 2); B : Character := 'B'; Modified: llvm/trunk/test/FrontendAda/vce_lv.adb URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendAda/vce_lv.adb?rev=40436&r1=40435&r2=40436&view=diff ============================================================================== --- llvm/trunk/test/FrontendAda/vce_lv.adb (original) +++ llvm/trunk/test/FrontendAda/vce_lv.adb Mon Jul 23 08:41:53 2007 @@ -1,4 +1,4 @@ --- RUN: %llvmgcc -c %s -o /dev/null +-- RUN: %llvmgcc -c %s procedure VCE_LV is type P is access String ; type T is new P (5 .. 7); From reid at x10sys.com Mon Jul 23 09:54:01 2007 From: reid at x10sys.com (Reid Spencer) Date: Mon, 23 Jul 2007 09:54:01 -0500 Subject: [llvm-commits] CVS: llvm-www/releases/index.html Message-ID: <200707231454.l6NEs1fZ004734@zion.cs.uiuc.edu> Changes in directory llvm-www/releases: index.html updated: 1.36 -> 1.37 --- Log message: Add the 2.0 documentation link. --- Diffs of the changes: (+1 -0) index.html | 1 + 1 files changed, 1 insertion(+) Index: llvm-www/releases/index.html diff -u llvm-www/releases/index.html:1.36 llvm-www/releases/index.html:1.37 --- llvm-www/releases/index.html:1.36 Wed May 23 13:37:34 2007 +++ llvm-www/releases/index.html Mon Jul 23 09:53:24 2007 @@ -74,6 +74,7 @@
  • Current LLVM documentation
  • +
  • Documentation for LLVM 2.0
  • Documentation for LLVM 1.9
  • Documentation for LLVM 1.8
  • Documentation for LLVM 1.7
  • From djg at cray.com Mon Jul 23 09:58:43 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 23 Jul 2007 09:58:43 -0500 Subject: [llvm-commits] ScalarEvolution fix for treeadd Message-ID: <20070723145843.GM5470@village.us.cray.com> > + // If we can show that there is no inner cycle in the loop then we know > + // that the execution count must equal the branch count. Would it be too intrusive to ask ScalarEvolution to use a PostDominanceFrontier for this? Dan -- Dan Gohman, Cray Inc. From baldrick at free.fr Mon Jul 23 10:23:36 2007 From: baldrick at free.fr (Duncan Sands) Date: Mon, 23 Jul 2007 15:23:36 -0000 Subject: [llvm-commits] [llvm] r40437 - in /llvm/trunk/test: C++Frontend/2006-11-30-NoCompileUnit.cpp CodeGen/CBackend/2003-06-23-PromotedExprs.llx Feature/float.ll Feature/inlineasm.ll Feature/llvm2cpp.ll lib/llvm.exp Message-ID: <200707231523.l6NFNaeI005655@zion.cs.uiuc.edu> Author: baldrick Date: Mon Jul 23 10:23:35 2007 New Revision: 40437 URL: http://llvm.org/viewvc/llvm-project?rev=40437&view=rev Log: The Ada f-e produces various auxiliary output files that cannot be suppressed and cannot be redirected: they are dumped in the current working directory. When running the testsuite this means that these files do not end up in the Output directory. The best solution I could find is to change directory into Output before running tests. Modified: llvm/trunk/test/C++Frontend/2006-11-30-NoCompileUnit.cpp llvm/trunk/test/CodeGen/CBackend/2003-06-23-PromotedExprs.llx llvm/trunk/test/Feature/float.ll llvm/trunk/test/Feature/inlineasm.ll llvm/trunk/test/Feature/llvm2cpp.ll llvm/trunk/test/lib/llvm.exp Modified: llvm/trunk/test/C++Frontend/2006-11-30-NoCompileUnit.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/2006-11-30-NoCompileUnit.cpp?rev=40437&r1=40436&r2=40437&view=diff ============================================================================== --- llvm/trunk/test/C++Frontend/2006-11-30-NoCompileUnit.cpp (original) +++ llvm/trunk/test/C++Frontend/2006-11-30-NoCompileUnit.cpp Mon Jul 23 10:23:35 2007 @@ -1,12 +1,12 @@ // This is a regression test on debug info to make sure we don't hit a compile // unit size issue with gdb. // RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | \ -// RUN: llc --disable-fp-elim -o Output/NoCompileUnit.s -f -// RUN: as Output/NoCompileUnit.s -o Output/NoCompileUnit.o -// RUN: g++ Output/NoCompileUnit.o -o Output/NoCompileUnit.exe +// RUN: llc --disable-fp-elim -o NoCompileUnit.s -f +// RUN: as NoCompileUnit.s -o NoCompileUnit.o +// RUN: g++ NoCompileUnit.o -o NoCompileUnit.exe // RUN: echo {break main\nrun\np NoCompileUnit::pubname} > %t2 -// RUN: gdb -q -batch -n -x %t2 Output/NoCompileUnit.exe | \ -// RUN: tee Output/NoCompileUnit.out | not grep {"low == high"} +// RUN: gdb -q -batch -n -x %t2 NoCompileUnit.exe | \ +// RUN: tee NoCompileUnit.out | not grep {"low == high"} // XFAIL: alpha|ia64|arm Modified: llvm/trunk/test/CodeGen/CBackend/2003-06-23-PromotedExprs.llx URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CBackend/2003-06-23-PromotedExprs.llx?rev=40437&r1=40436&r2=40437&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/CBackend/2003-06-23-PromotedExprs.llx (original) +++ llvm/trunk/test/CodeGen/CBackend/2003-06-23-PromotedExprs.llx Mon Jul 23 10:23:35 2007 @@ -1,7 +1,7 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=c > %t1.cbe.c ; RUN: gcc -B/usr/bin/ %t1.cbe.c -o %t1.cbe -; RUN: %t1.cbe +; RUN: ./%t1.cbe bool %doTest(ubyte %x) { %dec.0 = add ubyte %x, 255 Modified: llvm/trunk/test/Feature/float.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Feature/float.ll?rev=40437&r1=40436&r2=40437&view=diff ============================================================================== --- llvm/trunk/test/Feature/float.ll (original) +++ llvm/trunk/test/Feature/float.ll Mon Jul 23 10:23:35 2007 @@ -1,6 +1,6 @@ -; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > Output/t1.ll -; RUN: llvm-as Output/t1.ll -o - | llvm-dis > Output/t2.ll -; RUN: diff Output/t1.ll Output/t2.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > t1.ll +; RUN: llvm-as t1.ll -o - | llvm-dis > t2.ll +; RUN: diff t1.ll t2.ll %F1 = global float 0x4010000000000000 %D1 = global double 0x4010000000000000 Modified: llvm/trunk/test/Feature/inlineasm.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Feature/inlineasm.ll?rev=40437&r1=40436&r2=40437&view=diff ============================================================================== --- llvm/trunk/test/Feature/inlineasm.ll (original) +++ llvm/trunk/test/Feature/inlineasm.ll Mon Jul 23 10:23:35 2007 @@ -1,7 +1,7 @@ ; RUN: llvm-upgrade %s -o - | llvm-as -o /dev/null -f -; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > Output/t1.ll -; RUN: llvm-as Output/t1.ll -o - | llvm-dis > Output/t2.ll -; RUN: diff Output/t1.ll Output/t2.ll +; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > t1.ll +; RUN: llvm-as t1.ll -o - | llvm-dis > t2.ll +; RUN: diff t1.ll t2.ll module asm "this is an inline asm block" Modified: llvm/trunk/test/Feature/llvm2cpp.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Feature/llvm2cpp.ll?rev=40437&r1=40436&r2=40437&view=diff ============================================================================== --- llvm/trunk/test/Feature/llvm2cpp.ll (original) +++ llvm/trunk/test/Feature/llvm2cpp.ll Mon Jul 23 10:23:35 2007 @@ -1,7 +1,7 @@ ; RUN: llvm-as < %s | llvm-dis > %t1.ll ; RUN: llvm-as < %s | llvm2cpp -gen-program -o %t2.cpp - -f ; RUN: %link -o %t2.exe %t2.cpp -lLLVMCore -lLLVMSupport -lLLVMSystem -lstdc++ -; RUN: %t2.exe > %t2.ll +; RUN: ./%t2.exe > %t2.ll ; RUN: diff %t1.ll %t2.ll @X = global i32 4, align 16 ; [#uses=0] Modified: llvm/trunk/test/lib/llvm.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lib/llvm.exp?rev=40437&r1=40436&r2=40437&view=diff ============================================================================== --- llvm/trunk/test/lib/llvm.exp (original) +++ llvm/trunk/test/lib/llvm.exp Mon Jul 23 10:23:35 2007 @@ -46,7 +46,6 @@ global llvmgcc llvmgxx llvmgcc_version llvmgccmajvers global gccpath gxxpath compile_c compile_cxx link shlibext llvmlibsdir set path [file join $srcdir $subdir] - set tmp [file join Output $tmpFile] # Substitute all Tcl variables. set new_line [subst $line ] @@ -72,7 +71,7 @@ #replace %s with filename regsub -all {%s} $new_line $test new_line #replace %t with temp filenames - regsub -all {%t} $new_line [file join Output $tmpFile] new_line + regsub -all {%t} $new_line $tmpFile new_line #replace %% with % regsub -all {%%} $new_line % new_line return $new_line @@ -94,6 +93,7 @@ } file mkdir Output + cd Output foreach test $test_source_files { #Should figure out best way to set the timeout From nicholas at mxc.ca Mon Jul 23 10:42:22 2007 From: nicholas at mxc.ca (Nick Lewycky) Date: Mon, 23 Jul 2007 11:42:22 -0400 Subject: [llvm-commits] ScalarEvolution fix for treeadd In-Reply-To: <20070723145843.GM5470@village.us.cray.com> References: <20070723145843.GM5470@village.us.cray.com> Message-ID: <1185205342.3323.8.camel@tracer> On Mon, 2007-07-23 at 09:58 -0500, Dan Gohman wrote: > > + // If we can show that there is no inner cycle in the loop then we know > > + // that the execution count must equal the branch count. > > Would it be too intrusive to ask ScalarEvolution to use a > PostDominanceFrontier for this? No, that's what I implemented at first. Unfortunately, it doesn't cover all the possible cases (specifically, it broke 2007-01-06-TripCount.ll). In 2007-01-06-TripCount.ll there's two "loops" sharing one loop header. The first runs from header -> exit -> A -> header and the other is header -> B -> A -> header. I was testing exit postdom header, which it does, but that didn't catch this case where the transform is still unsafe. If you think I merely had my test wrong, please let me know what you think it ought to be and I'll implement it and see. Nick From sabre at nondot.org Mon Jul 23 12:10:17 2007 From: sabre at nondot.org (Chris Lattner) Date: Mon, 23 Jul 2007 17:10:17 -0000 Subject: [llvm-commits] [llvm] r40439 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200707231710.l6NHAH6N008271@zion.cs.uiuc.edu> Author: lattner Date: Mon Jul 23 12:10:17 2007 New Revision: 40439 URL: http://llvm.org/viewvc/llvm-project?rev=40439&view=rev Log: completely remove a transformation that is unsafe in the face of undefs. 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=40439&r1=40438&r2=40439&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon Jul 23 12:10:17 2007 @@ -3870,42 +3870,6 @@ InsertNewInstBefore(BinaryOperator::createOr(V2, V3, "tmp"), I); return BinaryOperator::createAnd(V1, Or); } - - // (V1 & V3)|(V2 & ~V3) -> ((V1 ^ V2) & V3) ^ V2 - // Disable this transformations temporarily. This causes - // mis-compilation when V2 is undefined. - if (0 && isOnlyUse(Op0) && isOnlyUse(Op1)) { - // Try all combination of terms to find V3 and ~V3. - if (A->hasOneUse() && match(A, m_Not(m_Value(V3)))) { - if (V3 == B) - V1 = D, V2 = C; - else if (V3 == D) - V1 = B, V2 = C; - } - if (B->hasOneUse() && match(B, m_Not(m_Value(V3)))) { - if (V3 == A) - V1 = C, V2 = D; - else if (V3 == C) - V1 = A, V2 = D; - } - if (C->hasOneUse() && match(C, m_Not(m_Value(V3)))) { - if (V3 == B) - V1 = D, V2 = A; - else if (V3 == D) - V1 = B, V2 = A; - } - if (D->hasOneUse() && match(D, m_Not(m_Value(V3)))) { - if (V3 == A) - V1 = C, V2 = B; - else if (V3 == C) - V1 = A, V2 = B; - } - if (V1) { - A = InsertNewInstBefore(BinaryOperator::createXor(V1, V2, "tmp"), I); - A = InsertNewInstBefore(BinaryOperator::createAnd(A, V3, "tmp"), I); - return BinaryOperator::createXor(A, V2); - } - } } } From resistor at mac.com Mon Jul 23 13:30:37 2007 From: resistor at mac.com (Owen Anderson) Date: Mon, 23 Jul 2007 18:30:37 -0000 Subject: [llvm-commits] [llvm] r40440 - /llvm/trunk/lib/Transforms/Scalar/FastDSE.cpp Message-ID: <200707231830.l6NIUcGS010553@zion.cs.uiuc.edu> Author: resistor Date: Mon Jul 23 13:30:37 2007 New Revision: 40440 URL: http://llvm.org/viewvc/llvm-project?rev=40440&view=rev Log: Fix file header. Modified: llvm/trunk/lib/Transforms/Scalar/FastDSE.cpp Modified: llvm/trunk/lib/Transforms/Scalar/FastDSE.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/FastDSE.cpp?rev=40440&r1=40439&r2=40440&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/FastDSE.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/FastDSE.cpp Mon Jul 23 13:30:37 2007 @@ -1,4 +1,4 @@ -//===- DeadStoreElimination.cpp - Dead Store Elimination ------------------===// +//===- FastDSE.cpp - Fast Dead Store Elimination --------------------------===// // // The LLVM Compiler Infrastructure // From djg at cray.com Mon Jul 23 13:53:56 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 23 Jul 2007 13:53:56 -0500 Subject: [llvm-commits] ScalarEvolution fix for treeadd Message-ID: <20070723185356.GP5470@village.us.cray.com> > > Would it be too intrusive to ask ScalarEvolution to use a > > PostDominanceFrontier for this? > > No, that's what I implemented at first. Unfortunately, it doesn't cover > all the possible cases (specifically, it broke 2007-01-06-TripCount.ll). > > In 2007-01-06-TripCount.ll there's two "loops" sharing one loop header. > The first runs from header -> exit -> A -> header and the other is > header -> B -> A -> header. I was testing exit postdom header, which it > does, but that didn't catch this case where the transform is still > unsafe. > > If you think I merely had my test wrong, please let me know what you > think it ought to be and I'll implement it and see. I do think you merely had the wrong test. The post-dominance frontiers are needed here. Running -analyze -postdomfrontier on 2007-01-06-TripCount.ll gives this: Printing analysis 'Post-Dominance Frontier Construction' for function 'test': DomFrontier for BB %bb is: %bb2 %cond_next DomFrontier for BB %bb2 is: %bb2 %cond_next DomFrontier for BB %cond_true is: %bb2 DomFrontier for BB %cond_next is: %cond_next DomFrontier for BB %bb6 is: DomFrontier for BB %return is: DomFrontier for BB %entry is: It looks like %bb2 is the loop header, and %cond_next is the block that contains the exit branch. The frontier sets for these two blocks are different, so they're not control-equivalent, and that disqualifies the loop for what ScalarEvolution is doing here. Dan -- Dan Gohman, Cray Inc. From djg at cray.com Mon Jul 23 14:26:08 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 23 Jul 2007 19:26:08 -0000 Subject: [llvm-commits] [llvm] r40441 - in /llvm/trunk: lib/Target/X86/X86ATTAsmPrinter.cpp lib/Target/X86/X86ATTAsmPrinter.h lib/Target/X86/X86AsmPrinter.h lib/Target/X86/X86IntelAsmPrinter.cpp lib/Target/X86/X86IntelAsmPrinter.h test/Archive/very_long_bytecode_file_name.bc test/Feature/packed.ll test/Feature/packed_struct.ll Message-ID: <200707231926.l6NJQ8gL012254@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 23 14:26:08 2007 New Revision: 40441 URL: http://llvm.org/viewvc/llvm-project?rev=40441&view=rev Log: Delete the svn:executable property on these files, which aren't executable. Modified: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp (props changed) llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.h (props changed) llvm/trunk/lib/Target/X86/X86AsmPrinter.h (props changed) llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp (props changed) llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.h (props changed) llvm/trunk/test/Archive/very_long_bytecode_file_name.bc (props changed) llvm/trunk/test/Feature/packed.ll (props changed) llvm/trunk/test/Feature/packed_struct.ll (props changed) Propchange: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp ------------------------------------------------------------------------------ --- svn:executable (original) +++ svn:executable (removed) @@ -1 +0,0 @@ -* Propchange: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.h ------------------------------------------------------------------------------ --- svn:executable (original) +++ svn:executable (removed) @@ -1 +0,0 @@ -* Propchange: llvm/trunk/lib/Target/X86/X86AsmPrinter.h ------------------------------------------------------------------------------ --- svn:executable (original) +++ svn:executable (removed) @@ -1 +0,0 @@ -* Propchange: llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp ------------------------------------------------------------------------------ --- svn:executable (original) +++ svn:executable (removed) @@ -1 +0,0 @@ -* Propchange: llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.h ------------------------------------------------------------------------------ --- svn:executable (original) +++ svn:executable (removed) @@ -1 +0,0 @@ -* Propchange: llvm/trunk/test/Archive/very_long_bytecode_file_name.bc ------------------------------------------------------------------------------ --- svn:executable (original) +++ svn:executable (removed) @@ -1 +0,0 @@ -* Propchange: llvm/trunk/test/Feature/packed.ll ------------------------------------------------------------------------------ --- svn:executable (original) +++ svn:executable (removed) @@ -1 +0,0 @@ -* Propchange: llvm/trunk/test/Feature/packed_struct.ll ------------------------------------------------------------------------------ --- svn:executable (original) +++ svn:executable (removed) @@ -1 +0,0 @@ -* From lauro.venancio at gmail.com Mon Jul 23 15:13:02 2007 From: lauro.venancio at gmail.com (Lauro Ramos Venancio) Date: Mon, 23 Jul 2007 20:13:02 -0000 Subject: [llvm-commits] [llvm-gcc-4.0] r40442 - /llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp Message-ID: <200707232013.l6NKD29C013661@zion.cs.uiuc.edu> Author: laurov Date: Mon Jul 23 15:13:01 2007 New Revision: 40442 URL: http://llvm.org/viewvc/llvm-project?rev=40442&view=rev Log: Fix the build for ARM. Modified: llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp Modified: llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp?rev=40442&r1=40441&r2=40442&view=diff ============================================================================== --- llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp Mon Jul 23 15:13:01 2007 @@ -46,6 +46,7 @@ #include "system.h" #include "coretypes.h" #include "tm.h" +#include "tm_p.h" #include "tree.h" #include "c-tree.h" // FIXME: eliminate. #include "tree-iterator.h" From djg at cray.com Mon Jul 23 15:24:29 2007 From: djg at cray.com (Dan Gohman) Date: Mon, 23 Jul 2007 20:24:29 -0000 Subject: [llvm-commits] [llvm] r40443 - in /llvm/trunk/lib: CodeGen/DwarfWriter.cpp CodeGen/SelectionDAG/SelectionDAG.cpp Target/X86/X86ISelLowering.cpp Message-ID: <200707232024.l6NKOUCG014006@zion.cs.uiuc.edu> Author: djg Date: Mon Jul 23 15:24:29 2007 New Revision: 40443 URL: http://llvm.org/viewvc/llvm-project?rev=40443&view=rev Log: Fix some uses of dyn_cast to be uses of cast. Modified: llvm/trunk/lib/CodeGen/DwarfWriter.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/lib/CodeGen/DwarfWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DwarfWriter.cpp?rev=40443&r1=40442&r2=40443&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/DwarfWriter.cpp (original) +++ llvm/trunk/lib/CodeGen/DwarfWriter.cpp Mon Jul 23 15:24:29 2007 @@ -1546,7 +1546,7 @@ break; } - FromTy = dyn_cast(FromTy)->getFromType(); + FromTy = cast(FromTy)->getFromType(); } // Unless we have a bit field. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=40443&r1=40442&r2=40443&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Mon Jul 23 15:24:29 2007 @@ -3210,7 +3210,7 @@ GlobalAddressSDNode::GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT::ValueType VT, int o) : SDNode(isa(GA) && - dyn_cast(GA)->isThreadLocal() ? + cast(GA)->isThreadLocal() ? // Thread Local (isTarget ? ISD::TargetGlobalTLSAddress : ISD::GlobalTLSAddress) : // Non Thread Local Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=40443&r1=40442&r2=40443&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Mon Jul 23 15:24:29 2007 @@ -4676,8 +4676,8 @@ if (Loc.getOpcode() == ISD::FrameIndex) { if (BaseLoc.getOpcode() != ISD::FrameIndex) return false; - int FI = dyn_cast(Loc)->getIndex(); - int BFI = dyn_cast(BaseLoc)->getIndex(); + int FI = cast(Loc)->getIndex(); + int BFI = cast(BaseLoc)->getIndex(); int FS = MFI->getObjectSize(FI); int BFS = MFI->getObjectSize(BFI); if (FS != BFS || FS != Size) return false; @@ -4704,7 +4704,7 @@ return (GV->getAlignment() >= 16 && (Offset % 16) == 0); else { assert(Base->getOpcode() == ISD::FrameIndex && "Unexpected base node!"); - int BFI = dyn_cast(Base)->getIndex(); + int BFI = cast(Base)->getIndex(); if (BFI < 0) // Fixed objects do not specify alignment, however the offsets are known. return ((Subtarget->getStackAlignment() % 16) == 0 && From resistor at mac.com Mon Jul 23 15:49:13 2007 From: resistor at mac.com (Owen Anderson) Date: Mon, 23 Jul 2007 20:49:13 -0000 Subject: [llvm-commits] [llvm] r40444 - in /llvm/trunk/test/Transforms/DeadStoreElimination: 2004-11-28-LiveStoreDeleted.ll 2004-12-28-PartialStore.ll 2005-11-30-vaarg.ll 2006-06-27-AST-Remove.ll PartialStore.ll alloca.llx context-sensitive.llx free.llx simple.llx Message-ID: <200707232049.l6NKnDhp014654@zion.cs.uiuc.edu> Author: resistor Date: Mon Jul 23 15:49:13 2007 New Revision: 40444 URL: http://llvm.org/viewvc/llvm-project?rev=40444&view=rev Log: Move these tests to use FastDSE instead of old DSE. Modified: llvm/trunk/test/Transforms/DeadStoreElimination/2004-11-28-LiveStoreDeleted.ll llvm/trunk/test/Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll llvm/trunk/test/Transforms/DeadStoreElimination/2005-11-30-vaarg.ll llvm/trunk/test/Transforms/DeadStoreElimination/2006-06-27-AST-Remove.ll llvm/trunk/test/Transforms/DeadStoreElimination/PartialStore.ll llvm/trunk/test/Transforms/DeadStoreElimination/alloca.llx llvm/trunk/test/Transforms/DeadStoreElimination/context-sensitive.llx llvm/trunk/test/Transforms/DeadStoreElimination/free.llx llvm/trunk/test/Transforms/DeadStoreElimination/simple.llx Modified: llvm/trunk/test/Transforms/DeadStoreElimination/2004-11-28-LiveStoreDeleted.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/2004-11-28-LiveStoreDeleted.ll?rev=40444&r1=40443&r2=40444&view=diff ============================================================================== --- llvm/trunk/test/Transforms/DeadStoreElimination/2004-11-28-LiveStoreDeleted.ll (original) +++ llvm/trunk/test/Transforms/DeadStoreElimination/2004-11-28-LiveStoreDeleted.ll Mon Jul 23 15:49:13 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -dse -scalarrepl -instcombine | \ +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse -scalarrepl -instcombine | \ ; RUN: llvm-dis | not grep {ret int undef} int %test(double %__x) { Modified: llvm/trunk/test/Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll?rev=40444&r1=40443&r2=40444&view=diff ============================================================================== --- llvm/trunk/test/Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll (original) +++ llvm/trunk/test/Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll Mon Jul 23 15:49:13 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | \ +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | \ ; RUN: grep {store i32 1234567} ; Do not delete stores that are only partially killed. Modified: llvm/trunk/test/Transforms/DeadStoreElimination/2005-11-30-vaarg.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/2005-11-30-vaarg.ll?rev=40444&r1=40443&r2=40444&view=diff ============================================================================== --- llvm/trunk/test/Transforms/DeadStoreElimination/2005-11-30-vaarg.ll (original) +++ llvm/trunk/test/Transforms/DeadStoreElimination/2005-11-30-vaarg.ll Mon Jul 23 15:49:13 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | grep store +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | grep store double %foo(sbyte* %X) { %X_addr = alloca sbyte* Modified: llvm/trunk/test/Transforms/DeadStoreElimination/2006-06-27-AST-Remove.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/2006-06-27-AST-Remove.ll?rev=40444&r1=40443&r2=40444&view=diff ============================================================================== --- llvm/trunk/test/Transforms/DeadStoreElimination/2006-06-27-AST-Remove.ll (original) +++ llvm/trunk/test/Transforms/DeadStoreElimination/2006-06-27-AST-Remove.ll Mon Jul 23 15:49:13 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -dse -disable-output +; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -fdse -disable-output target endian = big target pointersize = 32 target triple = "powerpc-apple-darwin8" Modified: llvm/trunk/test/Transforms/DeadStoreElimination/PartialStore.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/PartialStore.ll?rev=40444&r1=40443&r2=40444&view=diff ============================================================================== --- llvm/trunk/test/Transforms/DeadStoreElimination/PartialStore.ll (original) +++ llvm/trunk/test/Transforms/DeadStoreElimination/PartialStore.ll Mon Jul 23 15:49:13 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | \ +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | \ ; RUN: not grep {store sbyte} ; Ensure that the dead store is deleted in this case. It is wholely ; overwritten by the second store. Modified: llvm/trunk/test/Transforms/DeadStoreElimination/alloca.llx URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/alloca.llx?rev=40444&r1=40443&r2=40444&view=diff ============================================================================== --- llvm/trunk/test/Transforms/DeadStoreElimination/alloca.llx (original) +++ llvm/trunk/test/Transforms/DeadStoreElimination/alloca.llx Mon Jul 23 15:49:13 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | not grep DEAD +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | not grep DEAD void %test(int* %Q) { %P = alloca int Modified: llvm/trunk/test/Transforms/DeadStoreElimination/context-sensitive.llx URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/context-sensitive.llx?rev=40444&r1=40443&r2=40444&view=diff ============================================================================== --- llvm/trunk/test/Transforms/DeadStoreElimination/context-sensitive.llx (original) +++ llvm/trunk/test/Transforms/DeadStoreElimination/context-sensitive.llx Mon Jul 23 15:49:13 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | not grep DEAD +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | not grep DEAD declare void %ext() Modified: llvm/trunk/test/Transforms/DeadStoreElimination/free.llx URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/free.llx?rev=40444&r1=40443&r2=40444&view=diff ============================================================================== --- llvm/trunk/test/Transforms/DeadStoreElimination/free.llx (original) +++ llvm/trunk/test/Transforms/DeadStoreElimination/free.llx Mon Jul 23 15:49:13 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | not grep DEAD +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | not grep DEAD void %test(int* %Q, int* %P) { %DEAD = load int* %Q Modified: llvm/trunk/test/Transforms/DeadStoreElimination/simple.llx URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadStoreElimination/simple.llx?rev=40444&r1=40443&r2=40444&view=diff ============================================================================== --- llvm/trunk/test/Transforms/DeadStoreElimination/simple.llx (original) +++ llvm/trunk/test/Transforms/DeadStoreElimination/simple.llx Mon Jul 23 15:49:13 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | not grep DEAD +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | not grep DEAD void %test(int* %Q, int* %P) { %DEAD = load int* %Q From rspencer at reidspencer.com Mon Jul 23 15:54:11 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Mon, 23 Jul 2007 13:54:11 -0700 Subject: [llvm-commits] PR1146 (Parameter Attributes) Patch For Review Message-ID: <1185224052.3144.783.camel@bashful.x10sys.com> All, Here's my patch to finish the implementation of parameter attributes in llvm. This patch takes the parameter attributes off the FunctionType object and places them on Function, CallInst and InvokeInst values. The corresponding llvm-gcc patch will follow shortly. Reid. -------------- next part -------------- A non-text attachment was scrubbed... Name: PR1146-llvm.patch Type: text/x-patch Size: 86228 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070723/a351a639/attachment.bin From clattner at apple.com Mon Jul 23 16:25:14 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 23 Jul 2007 14:25:14 -0700 Subject: [llvm-commits] [llvm] r40444 - in /llvm/trunk/test/Transforms/DeadStoreElimination: 2004-11-28-LiveStoreDeleted.ll 2004-12-28-PartialStore.ll 2005-11-30-vaarg.ll 2006-06-27-AST-Remove.ll PartialStore.ll alloca.llx context-sensitive.llx free.llx simple.llx In-Reply-To: <200707232049.l6NKnDhp014654@zion.cs.uiuc.edu> References: <200707232049.l6NKnDhp014654@zion.cs.uiuc.edu> Message-ID: Silly thought, but when you remove the -dse pass, why not rename - fdse to -dse ? -Chris On Jul 23, 2007, at 1:49 PM, Owen Anderson wrote: > Author: resistor > Date: Mon Jul 23 15:49:13 2007 > New Revision: 40444 > > URL: http://llvm.org/viewvc/llvm-project?rev=40444&view=rev > Log: > Move these tests to use FastDSE instead of old DSE. > > Modified: > llvm/trunk/test/Transforms/DeadStoreElimination/2004-11-28- > LiveStoreDeleted.ll > llvm/trunk/test/Transforms/DeadStoreElimination/2004-12-28- > PartialStore.ll > llvm/trunk/test/Transforms/DeadStoreElimination/2005-11-30- > vaarg.ll > llvm/trunk/test/Transforms/DeadStoreElimination/2006-06-27-AST- > Remove.ll > llvm/trunk/test/Transforms/DeadStoreElimination/PartialStore.ll > llvm/trunk/test/Transforms/DeadStoreElimination/alloca.llx > llvm/trunk/test/Transforms/DeadStoreElimination/context- > sensitive.llx > llvm/trunk/test/Transforms/DeadStoreElimination/free.llx > llvm/trunk/test/Transforms/DeadStoreElimination/simple.llx > > Modified: llvm/trunk/test/Transforms/DeadStoreElimination/ > 2004-11-28-LiveStoreDeleted.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ > DeadStoreElimination/2004-11-28-LiveStoreDeleted.ll? > rev=40444&r1=40443&r2=40444&view=diff > > ====================================================================== > ======== > --- llvm/trunk/test/Transforms/DeadStoreElimination/2004-11-28- > LiveStoreDeleted.ll (original) > +++ llvm/trunk/test/Transforms/DeadStoreElimination/2004-11-28- > LiveStoreDeleted.ll Mon Jul 23 15:49:13 2007 > @@ -1,4 +1,4 @@ > -; RUN: llvm-upgrade < %s | llvm-as | opt -dse -scalarrepl - > instcombine | \ > +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse -scalarrepl - > instcombine | \ > ; RUN: llvm-dis | not grep {ret int undef} > > int %test(double %__x) { > > Modified: llvm/trunk/test/Transforms/DeadStoreElimination/ > 2004-12-28-PartialStore.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ > DeadStoreElimination/2004-12-28-PartialStore.ll? > rev=40444&r1=40443&r2=40444&view=diff > > ====================================================================== > ======== > --- llvm/trunk/test/Transforms/DeadStoreElimination/2004-12-28- > PartialStore.ll (original) > +++ llvm/trunk/test/Transforms/DeadStoreElimination/2004-12-28- > PartialStore.ll Mon Jul 23 15:49:13 2007 > @@ -1,4 +1,4 @@ > -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | \ > +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | \ > ; RUN: grep {store i32 1234567} > > ; Do not delete stores that are only partially killed. > > Modified: llvm/trunk/test/Transforms/DeadStoreElimination/ > 2005-11-30-vaarg.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ > DeadStoreElimination/2005-11-30-vaarg.ll? > rev=40444&r1=40443&r2=40444&view=diff > > ====================================================================== > ======== > --- llvm/trunk/test/Transforms/DeadStoreElimination/2005-11-30- > vaarg.ll (original) > +++ llvm/trunk/test/Transforms/DeadStoreElimination/2005-11-30- > vaarg.ll Mon Jul 23 15:49:13 2007 > @@ -1,4 +1,4 @@ > -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | grep store > +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | grep > store > > double %foo(sbyte* %X) { > %X_addr = alloca sbyte* > > Modified: llvm/trunk/test/Transforms/DeadStoreElimination/ > 2006-06-27-AST-Remove.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ > DeadStoreElimination/2006-06-27-AST-Remove.ll? > rev=40444&r1=40443&r2=40444&view=diff > > ====================================================================== > ======== > --- llvm/trunk/test/Transforms/DeadStoreElimination/2006-06-27-AST- > Remove.ll (original) > +++ llvm/trunk/test/Transforms/DeadStoreElimination/2006-06-27-AST- > Remove.ll Mon Jul 23 15:49:13 2007 > @@ -1,4 +1,4 @@ > -; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -dse - > disable-output > +; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -fdse - > disable-output > target endian = big > target pointersize = 32 > target triple = "powerpc-apple-darwin8" > > Modified: llvm/trunk/test/Transforms/DeadStoreElimination/ > PartialStore.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ > DeadStoreElimination/PartialStore.ll? > rev=40444&r1=40443&r2=40444&view=diff > > ====================================================================== > ======== > --- llvm/trunk/test/Transforms/DeadStoreElimination/PartialStore.ll > (original) > +++ llvm/trunk/test/Transforms/DeadStoreElimination/PartialStore.ll > Mon Jul 23 15:49:13 2007 > @@ -1,4 +1,4 @@ > -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | \ > +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | \ > ; RUN: not grep {store sbyte} > ; Ensure that the dead store is deleted in this case. It is wholely > ; overwritten by the second store. > > Modified: llvm/trunk/test/Transforms/DeadStoreElimination/alloca.llx > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ > DeadStoreElimination/alloca.llx?rev=40444&r1=40443&r2=40444&view=diff > > ====================================================================== > ======== > --- llvm/trunk/test/Transforms/DeadStoreElimination/alloca.llx > (original) > +++ llvm/trunk/test/Transforms/DeadStoreElimination/alloca.llx Mon > Jul 23 15:49:13 2007 > @@ -1,4 +1,4 @@ > -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | not > grep DEAD > +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | not > grep DEAD > > void %test(int* %Q) { > %P = alloca int > > Modified: llvm/trunk/test/Transforms/DeadStoreElimination/context- > sensitive.llx > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ > DeadStoreElimination/context-sensitive.llx? > rev=40444&r1=40443&r2=40444&view=diff > > ====================================================================== > ======== > --- llvm/trunk/test/Transforms/DeadStoreElimination/context- > sensitive.llx (original) > +++ llvm/trunk/test/Transforms/DeadStoreElimination/context- > sensitive.llx Mon Jul 23 15:49:13 2007 > @@ -1,4 +1,4 @@ > -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | not > grep DEAD > +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | not > grep DEAD > > declare void %ext() > > > Modified: llvm/trunk/test/Transforms/DeadStoreElimination/free.llx > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ > DeadStoreElimination/free.llx?rev=40444&r1=40443&r2=40444&view=diff > > ====================================================================== > ======== > --- llvm/trunk/test/Transforms/DeadStoreElimination/free.llx > (original) > +++ llvm/trunk/test/Transforms/DeadStoreElimination/free.llx Mon > Jul 23 15:49:13 2007 > @@ -1,4 +1,4 @@ > -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | not > grep DEAD > +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | not > grep DEAD > > void %test(int* %Q, int* %P) { > %DEAD = load int* %Q > > Modified: llvm/trunk/test/Transforms/DeadStoreElimination/simple.llx > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ > DeadStoreElimination/simple.llx?rev=40444&r1=40443&r2=40444&view=diff > > ====================================================================== > ======== > --- llvm/trunk/test/Transforms/DeadStoreElimination/simple.llx > (original) > +++ llvm/trunk/test/Transforms/DeadStoreElimination/simple.llx Mon > Jul 23 15:49:13 2007 > @@ -1,4 +1,4 @@ > -; RUN: llvm-upgrade < %s | llvm-as | opt -dse | llvm-dis | not > grep DEAD > +; RUN: llvm-upgrade < %s | llvm-as | opt -fdse | llvm-dis | not > grep DEAD > > void %test(int* %Q, int* %P) { > %DEAD = load int* %Q > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From resistor at mac.com Mon Jul 23 16:48:09 2007 From: resistor at mac.com (Owen Anderson) Date: Mon, 23 Jul 2007 21:48:09 -0000 Subject: [llvm-commits] [llvm] r40445 - in /llvm/trunk: include/llvm/Transforms/Scalar.h lib/Transforms/Scalar/FastDLE.cpp Message-ID: <200707232148.l6NLm9fF016317@zion.cs.uiuc.edu> Author: resistor Date: Mon Jul 23 16:48:08 2007 New Revision: 40445 URL: http://llvm.org/viewvc/llvm-project?rev=40445&view=rev Log: Add FastDLE, the load-elimination counterpart of FastDSE. Added: llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp Modified: llvm/trunk/include/llvm/Transforms/Scalar.h Modified: llvm/trunk/include/llvm/Transforms/Scalar.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Scalar.h?rev=40445&r1=40444&r2=40445&view=diff ============================================================================== --- llvm/trunk/include/llvm/Transforms/Scalar.h (original) +++ llvm/trunk/include/llvm/Transforms/Scalar.h Mon Jul 23 16:48:08 2007 @@ -332,6 +332,13 @@ //===----------------------------------------------------------------------===// // +// FastDeadStoreElimination - This pass deletes loads that are dominated by +// must-aliased loads and are not stored to between the loads. +// +FunctionPass *createFastDeadLoadEliminationPass(); + +//===----------------------------------------------------------------------===// +// // CodeGenPrepare - This pass prepares a function for instruction selection. // FunctionPass *createCodeGenPreparePass(const TargetLowering *TLI = 0); Added: llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp?rev=40445&view=auto ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp (added) +++ llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp Mon Jul 23 16:48:08 2007 @@ -0,0 +1,128 @@ +//===- FastDLE.cpp - Fast Dead Load Elimination ---------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by Owen Anderson and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements a trivial dead load elimination that only considers +// basic-block local redundant load. +// +// FIXME: This should eventually be extended to be a post-dominator tree +// traversal. Doing so would be pretty trivial. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "fdle" +#include "llvm/Transforms/Scalar.h" +#include "llvm/Function.h" +#include "llvm/Instructions.h" +#include "llvm/Pass.h" +#include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Analysis/MemoryDependenceAnalysis.h" +#include "llvm/Transforms/Utils/Local.h" +#include "llvm/Support/Compiler.h" +using namespace llvm; + +STATISTIC(NumFastLoads, "Number of loads deleted"); + +namespace { + struct VISIBILITY_HIDDEN FDLE : public FunctionPass { + static char ID; // Pass identification, replacement for typeid + FDLE() : FunctionPass((intptr_t)&ID) {} + + virtual bool runOnFunction(Function &F) { + bool Changed = false; + for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) + Changed |= runOnBasicBlock(*I); + return Changed; + } + + bool runOnBasicBlock(BasicBlock &BB); + + // getAnalysisUsage - We require post dominance frontiers (aka Control + // Dependence Graph) + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesCFG(); + AU.addRequired(); + AU.addPreserved(); + } + }; + char FDLE::ID = 0; + RegisterPass X("fdle", "Fast Dead Load Elimination"); +} + +FunctionPass *llvm::createFastDeadLoadEliminationPass() { return new FDLE(); } + +bool FDLE::runOnBasicBlock(BasicBlock &BB) { + MemoryDependenceAnalysis& MD = getAnalysis(); + + // Record the last-seen load from this pointer + DenseMap lastLoad; + + bool MadeChange = false; + + // Do a top-down walk on the BB + for (BasicBlock::iterator BBI = BB.begin(), BBE = BB.end(); BBI != BBE; ++BBI) { + // If we find a store or a free... + if (LoadInst* L = dyn_cast(BBI)) { + Value* pointer = L->getPointerOperand(); + LoadInst*& last = lastLoad[pointer]; + + // ... to a pointer that has been loaded from before... + Instruction* dep = MD.getDependency(BBI); + bool deletedLoad = false; + + while (dep != MemoryDependenceAnalysis::None && + dep != MemoryDependenceAnalysis::NonLocal && + (isa(dep) || isa(dep))) { + // ... that depends on a store ... + if (StoreInst* S = dyn_cast(dep)) { + if (S->getPointerOperand() == pointer) { + // Remove it! + MD.removeInstruction(BBI); + + BBI--; + L->replaceAllUsesWith(S->getOperand(0)); + L->eraseFromParent(); + NumFastLoads++; + deletedLoad = true; + MadeChange = true; + } + + // Whether we removed it or not, we can't + // go any further + break; + } else if (!last) { + // If we don't depend on a store, and we haven't + // been loaded before, bail. + break; + } else if (dep == last) { + // Remove it! + MD.removeInstruction(BBI); + + BBI--; + L->replaceAllUsesWith(last); + L->eraseFromParent(); + deletedLoad = true; + NumFastLoads++; + MadeChange = true; + + break; + } else { + dep = MD.getDependency(BBI, dep); + } + } + + if (!deletedLoad) + last = L; + } + } + + return MadeChange; +} + + From resistor at mac.com Mon Jul 23 16:51:37 2007 From: resistor at mac.com (Owen Anderson) Date: Mon, 23 Jul 2007 21:51:37 -0000 Subject: [llvm-commits] [llvm] r40446 - /llvm/trunk/include/llvm/Transforms/Scalar.h Message-ID: <200707232151.l6NLpbZZ016457@zion.cs.uiuc.edu> Author: resistor Date: Mon Jul 23 16:51:37 2007 New Revision: 40446 URL: http://llvm.org/viewvc/llvm-project?rev=40446&view=rev Log: Fix a comment. Modified: llvm/trunk/include/llvm/Transforms/Scalar.h Modified: llvm/trunk/include/llvm/Transforms/Scalar.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Scalar.h?rev=40446&r1=40445&r2=40446&view=diff ============================================================================== --- llvm/trunk/include/llvm/Transforms/Scalar.h (original) +++ llvm/trunk/include/llvm/Transforms/Scalar.h Mon Jul 23 16:51:37 2007 @@ -332,7 +332,7 @@ //===----------------------------------------------------------------------===// // -// FastDeadStoreElimination - This pass deletes loads that are dominated by +// FastDeadLoadElimination - This pass deletes loads that are dominated by // must-aliased loads and are not stored to between the loads. // FunctionPass *createFastDeadLoadEliminationPass(); From resistor at mac.com Mon Jul 23 17:00:03 2007 From: resistor at mac.com (Owen Anderson) Date: Mon, 23 Jul 2007 22:00:03 -0000 Subject: [llvm-commits] [llvm] r40447 - /llvm/trunk/include/llvm/LinkAllPasses.h Message-ID: <200707232200.l6NM03qc016865@zion.cs.uiuc.edu> Author: resistor Date: Mon Jul 23 17:00:03 2007 New Revision: 40447 URL: http://llvm.org/viewvc/llvm-project?rev=40447&view=rev Log: Forgot to commit this file. Modified: llvm/trunk/include/llvm/LinkAllPasses.h Modified: llvm/trunk/include/llvm/LinkAllPasses.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LinkAllPasses.h?rev=40447&r1=40446&r2=40447&view=diff ============================================================================== --- llvm/trunk/include/llvm/LinkAllPasses.h (original) +++ llvm/trunk/include/llvm/LinkAllPasses.h Mon Jul 23 17:00:03 2007 @@ -61,6 +61,7 @@ (void) llvm::createDeadStoreEliminationPass(); (void) llvm::createDeadTypeEliminationPass(); (void) llvm::createEdgeProfilerPass(); + (void) llvm::createFastDeadLoadEliminationPass(); (void) llvm::createFastDeadStoreEliminationPass(); (void) llvm::createFunctionInliningPass(); (void) llvm::createFunctionProfilerPass(); From resistor at mac.com Mon Jul 23 17:05:55 2007 From: resistor at mac.com (Owen Anderson) Date: Mon, 23 Jul 2007 22:05:55 -0000 Subject: [llvm-commits] [llvm] r40448 - /llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp Message-ID: <200707232205.l6NM5tLx017094@zion.cs.uiuc.edu> Author: resistor Date: Mon Jul 23 17:05:54 2007 New Revision: 40448 URL: http://llvm.org/viewvc/llvm-project?rev=40448&view=rev Log: Don't delete volatile loads. Doing so is not safe. Modified: llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp Modified: llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp?rev=40448&r1=40447&r2=40448&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp Mon Jul 23 17:05:54 2007 @@ -69,6 +69,12 @@ for (BasicBlock::iterator BBI = BB.begin(), BBE = BB.end(); BBI != BBE; ++BBI) { // If we find a store or a free... if (LoadInst* L = dyn_cast(BBI)) { + // We can't delete volatile loads + if (L->isVolatile()) { + lastLoad[L->getPointerOperand()] = L; + continue; + } + Value* pointer = L->getPointerOperand(); LoadInst*& last = lastLoad[pointer]; From resistor at mac.com Mon Jul 23 17:18:08 2007 From: resistor at mac.com (Owen Anderson) Date: Mon, 23 Jul 2007 22:18:08 -0000 Subject: [llvm-commits] [llvm] r40449 - in /llvm/trunk/test/Transforms/DeadLoadElimination: ./ dg.exp simple.ll volatile.ll Message-ID: <200707232218.l6NMI82Z017650@zion.cs.uiuc.edu> Author: resistor Date: Mon Jul 23 17:18:05 2007 New Revision: 40449 URL: http://llvm.org/viewvc/llvm-project?rev=40449&view=rev Log: Add testcases for FastDLE. Added: llvm/trunk/test/Transforms/DeadLoadElimination/ llvm/trunk/test/Transforms/DeadLoadElimination/dg.exp llvm/trunk/test/Transforms/DeadLoadElimination/simple.ll llvm/trunk/test/Transforms/DeadLoadElimination/volatile.ll Added: llvm/trunk/test/Transforms/DeadLoadElimination/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadLoadElimination/dg.exp?rev=40449&view=auto ============================================================================== --- llvm/trunk/test/Transforms/DeadLoadElimination/dg.exp (added) +++ llvm/trunk/test/Transforms/DeadLoadElimination/dg.exp Mon Jul 23 17:18:05 2007 @@ -0,0 +1,3 @@ +load_lib llvm.exp + +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] Added: llvm/trunk/test/Transforms/DeadLoadElimination/simple.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadLoadElimination/simple.ll?rev=40449&view=auto ============================================================================== --- llvm/trunk/test/Transforms/DeadLoadElimination/simple.ll (added) +++ llvm/trunk/test/Transforms/DeadLoadElimination/simple.ll Mon Jul 23 17:18:05 2007 @@ -0,0 +1,7 @@ +; RUN: llvm-as < %s | opt -fdle | llvm-dis | not grep DEAD + +define void @test(i32* %Q, i32* %P) { + %A = load i32* %Q + %DEAD = load i32* %Q ; [#uses=1] + ret void +} Added: llvm/trunk/test/Transforms/DeadLoadElimination/volatile.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/DeadLoadElimination/volatile.ll?rev=40449&view=auto ============================================================================== --- llvm/trunk/test/Transforms/DeadLoadElimination/volatile.ll (added) +++ llvm/trunk/test/Transforms/DeadLoadElimination/volatile.ll Mon Jul 23 17:18:05 2007 @@ -0,0 +1,7 @@ +; RUN: llvm-as < %s | opt -fdle | llvm-dis | grep NOTDEAD + +define void @test(i32* %Q, i32* %P) { + %A = load i32* %Q + %NOTDEAD = volatile load i32* %Q ; [#uses=1] + ret void +} From chandlerc at gmail.com Mon Jul 23 17:42:15 2007 From: chandlerc at gmail.com (Chandler Carruth) Date: Mon, 23 Jul 2007 22:42:15 -0000 Subject: [llvm-commits] [llvm] r40451 - /llvm/trunk/test/CFrontend/exact-div-expr.c Message-ID: <200707232242.l6NMgFQd018576@zion.cs.uiuc.edu> Author: chandlerc Date: Mon Jul 23 17:42:15 2007 New Revision: 40451 URL: http://llvm.org/viewvc/llvm-project?rev=40451&view=rev Log: Fix for PR1567, which involves a weird bug on non-32bit architectures and silly C type sizes. Modified: llvm/trunk/test/CFrontend/exact-div-expr.c Modified: llvm/trunk/test/CFrontend/exact-div-expr.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/exact-div-expr.c?rev=40451&r1=40450&r2=40451&view=diff ============================================================================== --- llvm/trunk/test/CFrontend/exact-div-expr.c (original) +++ llvm/trunk/test/CFrontend/exact-div-expr.c Mon Jul 23 17:42:15 2007 @@ -1,6 +1,6 @@ // RUN: %llvmgcc -S %s -o - -O | grep ashr // RUN: %llvmgcc -S %s -o - -O | not grep sdiv -int test(int *A, int *B) { +long long test(int *A, int *B) { return A-B; } From rspencer at reidspencer.com Mon Jul 23 18:09:55 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Mon, 23 Jul 2007 23:09:55 -0000 Subject: [llvm-commits] [llvm] r40453 - /llvm/trunk/lib/VMCore/Verifier.cpp Message-ID: <200707232309.l6NN9tXc019292@zion.cs.uiuc.edu> Author: reid Date: Mon Jul 23 18:09:55 2007 New Revision: 40453 URL: http://llvm.org/viewvc/llvm-project?rev=40453&view=rev Log: Add better verification of attributes on function types. It is not permitted to use sret or inreg on the function. It is equally illegal to use noreturn or nounwind on a parameter; they only go with the function. This patch enforces these rules. Modified: llvm/trunk/lib/VMCore/Verifier.cpp Modified: llvm/trunk/lib/VMCore/Verifier.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=40453&r1=40452&r2=40453&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Verifier.cpp (original) +++ llvm/trunk/lib/VMCore/Verifier.cpp Mon Jul 23 18:09:55 2007 @@ -364,6 +364,10 @@ Assert(!Attrs->paramHasAttr(0, ParamAttr::ByVal), "Attribute ByVal should not apply to functions!"); + Assert(!Attrs->paramHasAttr(0, ParamAttr::StructRet), + "Attribute SRet should not apply to functions!"); + Assert(!Attrs->paramHasAttr(0, ParamAttr::InReg), + "Attribute SRet should not apply to functions!"); for (FunctionType::param_iterator I = FT->param_begin(), E = FT->param_end(); I != E; ++I, ++Idx) { @@ -386,6 +390,11 @@ Assert1(isa(Ty->getElementType()), "Attribute ByVal should only apply to pointer to structs!", &F); } + + if (Attrs->paramHasAttr(Idx, ParamAttr::NoReturn)) + Assert1(0, "Attribute NoReturn should only be applied to function", &F); + if (Attrs->paramHasAttr(Idx, ParamAttr::NoUnwind)) + Assert1(0, "Attribute NoUnwind should only be applied to function", &F); } } From clattner at apple.com Mon Jul 23 18:29:19 2007 From: clattner at apple.com (Chris Lattner) Date: Mon, 23 Jul 2007 16:29:19 -0700 Subject: [llvm-commits] [llvm] r40453 - /llvm/trunk/lib/VMCore/Verifier.cpp In-Reply-To: <200707232309.l6NN9tXc019292@zion.cs.uiuc.edu> References: <200707232309.l6NN9tXc019292@zion.cs.uiuc.edu> Message-ID: > + if (Attrs->paramHasAttr(Idx, ParamAttr::NoReturn)) > + Assert1(0, "Attribute NoReturn should only be applied to > function", &F); Why not: Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::NoReturn), "Attribute NoReturn should only be applied to function", &F); ? > + if (Attrs->paramHasAttr(Idx, ParamAttr::NoUnwind)) > + Assert1(0, "Attribute NoUnwind should only be applied to > function", &F); > } > } > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From rspencer at reidspencer.com Mon Jul 23 18:40:50 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Mon, 23 Jul 2007 16:40:50 -0700 Subject: [llvm-commits] [llvm] r40453 - /llvm/trunk/lib/VMCore/Verifier.cpp In-Reply-To: References: <200707232309.l6NN9tXc019292@zion.cs.uiuc.edu> Message-ID: <1185234050.3144.788.camel@bashful.x10sys.com> On Mon, 2007-07-23 at 16:29 -0700, Chris Lattner wrote: > > + if (Attrs->paramHasAttr(Idx, ParamAttr::NoReturn)) > > + Assert1(0, "Attribute NoReturn should only be applied to > > function", &F); > > Why not: > Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::NoReturn), > "Attribute NoReturn should only be applied to function", &F); No Reason. Will fix. Reid. > ? > > > + if (Attrs->paramHasAttr(Idx, ParamAttr::NoUnwind)) > > + Assert1(0, "Attribute NoUnwind should only be applied to > > function", &F); > > } > > } > > > > > > > > _______________________________________________ > > llvm-commits mailing list > > llvm-commits at cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From rspencer at reidspencer.com Mon Jul 23 18:46:43 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Mon, 23 Jul 2007 23:46:43 -0000 Subject: [llvm-commits] [llvm] r40455 - /llvm/trunk/lib/VMCore/Verifier.cpp Message-ID: <200707232346.l6NNkhqw020430@zion.cs.uiuc.edu> Author: reid Date: Mon Jul 23 18:46:43 2007 New Revision: 40455 URL: http://llvm.org/viewvc/llvm-project?rev=40455&view=rev Log: 1. Make sure we print the Function Value for parameter attribute errors 2. Fold an if statement into the Assert1 macro call. Modified: llvm/trunk/lib/VMCore/Verifier.cpp Modified: llvm/trunk/lib/VMCore/Verifier.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=40455&r1=40454&r2=40455&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Verifier.cpp (original) +++ llvm/trunk/lib/VMCore/Verifier.cpp Mon Jul 23 18:46:43 2007 @@ -362,12 +362,12 @@ if (const ParamAttrsList *Attrs = FT->getParamAttrs()) { unsigned Idx = 1; - Assert(!Attrs->paramHasAttr(0, ParamAttr::ByVal), - "Attribute ByVal should not apply to functions!"); - Assert(!Attrs->paramHasAttr(0, ParamAttr::StructRet), - "Attribute SRet should not apply to functions!"); - Assert(!Attrs->paramHasAttr(0, ParamAttr::InReg), - "Attribute SRet should not apply to functions!"); + Assert1(!Attrs->paramHasAttr(0, ParamAttr::ByVal), + "Attribute ByVal should not apply to functions!", &F); + Assert1(!Attrs->paramHasAttr(0, ParamAttr::StructRet), + "Attribute SRet should not apply to functions!", &F); + Assert1(!Attrs->paramHasAttr(0, ParamAttr::InReg), + "Attribute SRet should not apply to functions!", &F); for (FunctionType::param_iterator I = FT->param_begin(), E = FT->param_end(); I != E; ++I, ++Idx) { @@ -391,10 +391,10 @@ "Attribute ByVal should only apply to pointer to structs!", &F); } - if (Attrs->paramHasAttr(Idx, ParamAttr::NoReturn)) - Assert1(0, "Attribute NoReturn should only be applied to function", &F); - if (Attrs->paramHasAttr(Idx, ParamAttr::NoUnwind)) - Assert1(0, "Attribute NoUnwind should only be applied to function", &F); + Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::NoReturn), + "Attribute NoReturn should only be applied to function", &F); + Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::NoUnwind), + "Attribute NoUnwind should only be applied to function", &F); } } From resistor at mac.com Mon Jul 23 19:08:38 2007 From: resistor at mac.com (Owen Anderson) Date: Tue, 24 Jul 2007 00:08:38 -0000 Subject: [llvm-commits] [llvm] r40456 - in /llvm/trunk/lib/Transforms/Scalar: FastDLE.cpp RedundantLoadElimination.cpp Message-ID: <200707240008.l6O08cVF021217@zion.cs.uiuc.edu> Author: resistor Date: Mon Jul 23 19:08:38 2007 New Revision: 40456 URL: http://llvm.org/viewvc/llvm-project?rev=40456&view=rev Log: Rename FastDLE as RedundantLoadElimination. Added: llvm/trunk/lib/Transforms/Scalar/RedundantLoadElimination.cpp - copied unchanged from r40448, llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp Removed: llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp Removed: llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp?rev=40455&view=auto ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp (removed) @@ -1,134 +0,0 @@ -//===- FastDLE.cpp - Fast Dead Load Elimination ---------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file was developed by Owen Anderson and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements a trivial dead load elimination that only considers -// basic-block local redundant load. -// -// FIXME: This should eventually be extended to be a post-dominator tree -// traversal. Doing so would be pretty trivial. -// -//===----------------------------------------------------------------------===// - -#define DEBUG_TYPE "fdle" -#include "llvm/Transforms/Scalar.h" -#include "llvm/Function.h" -#include "llvm/Instructions.h" -#include "llvm/Pass.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/Statistic.h" -#include "llvm/Analysis/MemoryDependenceAnalysis.h" -#include "llvm/Transforms/Utils/Local.h" -#include "llvm/Support/Compiler.h" -using namespace llvm; - -STATISTIC(NumFastLoads, "Number of loads deleted"); - -namespace { - struct VISIBILITY_HIDDEN FDLE : public FunctionPass { - static char ID; // Pass identification, replacement for typeid - FDLE() : FunctionPass((intptr_t)&ID) {} - - virtual bool runOnFunction(Function &F) { - bool Changed = false; - for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) - Changed |= runOnBasicBlock(*I); - return Changed; - } - - bool runOnBasicBlock(BasicBlock &BB); - - // getAnalysisUsage - We require post dominance frontiers (aka Control - // Dependence Graph) - virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.setPreservesCFG(); - AU.addRequired(); - AU.addPreserved(); - } - }; - char FDLE::ID = 0; - RegisterPass X("fdle", "Fast Dead Load Elimination"); -} - -FunctionPass *llvm::createFastDeadLoadEliminationPass() { return new FDLE(); } - -bool FDLE::runOnBasicBlock(BasicBlock &BB) { - MemoryDependenceAnalysis& MD = getAnalysis(); - - // Record the last-seen load from this pointer - DenseMap lastLoad; - - bool MadeChange = false; - - // Do a top-down walk on the BB - for (BasicBlock::iterator BBI = BB.begin(), BBE = BB.end(); BBI != BBE; ++BBI) { - // If we find a store or a free... - if (LoadInst* L = dyn_cast(BBI)) { - // We can't delete volatile loads - if (L->isVolatile()) { - lastLoad[L->getPointerOperand()] = L; - continue; - } - - Value* pointer = L->getPointerOperand(); - LoadInst*& last = lastLoad[pointer]; - - // ... to a pointer that has been loaded from before... - Instruction* dep = MD.getDependency(BBI); - bool deletedLoad = false; - - while (dep != MemoryDependenceAnalysis::None && - dep != MemoryDependenceAnalysis::NonLocal && - (isa(dep) || isa(dep))) { - // ... that depends on a store ... - if (StoreInst* S = dyn_cast(dep)) { - if (S->getPointerOperand() == pointer) { - // Remove it! - MD.removeInstruction(BBI); - - BBI--; - L->replaceAllUsesWith(S->getOperand(0)); - L->eraseFromParent(); - NumFastLoads++; - deletedLoad = true; - MadeChange = true; - } - - // Whether we removed it or not, we can't - // go any further - break; - } else if (!last) { - // If we don't depend on a store, and we haven't - // been loaded before, bail. - break; - } else if (dep == last) { - // Remove it! - MD.removeInstruction(BBI); - - BBI--; - L->replaceAllUsesWith(last); - L->eraseFromParent(); - deletedLoad = true; - NumFastLoads++; - MadeChange = true; - - break; - } else { - dep = MD.getDependency(BBI, dep); - } - } - - if (!deletedLoad) - last = L; - } - } - - return MadeChange; -} - - From resistor at mac.com Mon Jul 23 19:17:05 2007 From: resistor at mac.com (Owen Anderson) Date: Tue, 24 Jul 2007 00:17:05 -0000 Subject: [llvm-commits] [llvm] r40457 - in /llvm/trunk: include/llvm/LinkAllPasses.h include/llvm/Transforms/Scalar.h lib/Transforms/Scalar/RedundantLoadElimination.cpp test/Transforms/DeadLoadElimination/ test/Transforms/RedundantLoadElimination/ test/Transforms/RedundantLoadElimination/simple.ll test/Transforms/RedundantLoadElimination/volatile.ll Message-ID: <200707240017.l6O0H57K021697@zion.cs.uiuc.edu> Author: resistor Date: Mon Jul 23 19:17:04 2007 New Revision: 40457 URL: http://llvm.org/viewvc/llvm-project?rev=40457&view=rev Log: Rename a lot of things to change FastDLE to RedundantLoadElimination. Added: llvm/trunk/test/Transforms/RedundantLoadElimination/ - copied from r40449, llvm/trunk/test/Transforms/DeadLoadElimination/ Removed: llvm/trunk/test/Transforms/DeadLoadElimination/ Modified: llvm/trunk/include/llvm/LinkAllPasses.h llvm/trunk/include/llvm/Transforms/Scalar.h llvm/trunk/lib/Transforms/Scalar/RedundantLoadElimination.cpp llvm/trunk/test/Transforms/RedundantLoadElimination/simple.ll llvm/trunk/test/Transforms/RedundantLoadElimination/volatile.ll Modified: llvm/trunk/include/llvm/LinkAllPasses.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LinkAllPasses.h?rev=40457&r1=40456&r2=40457&view=diff ============================================================================== --- llvm/trunk/include/llvm/LinkAllPasses.h (original) +++ llvm/trunk/include/llvm/LinkAllPasses.h Mon Jul 23 19:17:04 2007 @@ -61,7 +61,7 @@ (void) llvm::createDeadStoreEliminationPass(); (void) llvm::createDeadTypeEliminationPass(); (void) llvm::createEdgeProfilerPass(); - (void) llvm::createFastDeadLoadEliminationPass(); + (void) llvm::createRedundantLoadEliminationPass(); (void) llvm::createFastDeadStoreEliminationPass(); (void) llvm::createFunctionInliningPass(); (void) llvm::createFunctionProfilerPass(); Modified: llvm/trunk/include/llvm/Transforms/Scalar.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Scalar.h?rev=40457&r1=40456&r2=40457&view=diff ============================================================================== --- llvm/trunk/include/llvm/Transforms/Scalar.h (original) +++ llvm/trunk/include/llvm/Transforms/Scalar.h Mon Jul 23 19:17:04 2007 @@ -332,10 +332,10 @@ //===----------------------------------------------------------------------===// // -// FastDeadLoadElimination - This pass deletes loads that are dominated by +// RedundantLoadElimination - This pass deletes loads that are dominated by // must-aliased loads and are not stored to between the loads. // -FunctionPass *createFastDeadLoadEliminationPass(); +FunctionPass *createRedundantLoadEliminationPass(); //===----------------------------------------------------------------------===// // Modified: llvm/trunk/lib/Transforms/Scalar/RedundantLoadElimination.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/RedundantLoadElimination.cpp?rev=40457&r1=40456&r2=40457&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/RedundantLoadElimination.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/RedundantLoadElimination.cpp Mon Jul 23 19:17:04 2007 @@ -15,7 +15,7 @@ // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "fdle" +#define DEBUG_TYPE "rle" #include "llvm/Transforms/Scalar.h" #include "llvm/Function.h" #include "llvm/Instructions.h" @@ -30,9 +30,9 @@ STATISTIC(NumFastLoads, "Number of loads deleted"); namespace { - struct VISIBILITY_HIDDEN FDLE : public FunctionPass { + struct VISIBILITY_HIDDEN RLE : public FunctionPass { static char ID; // Pass identification, replacement for typeid - FDLE() : FunctionPass((intptr_t)&ID) {} + RLE() : FunctionPass((intptr_t)&ID) {} virtual bool runOnFunction(Function &F) { bool Changed = false; @@ -51,13 +51,13 @@ AU.addPreserved(); } }; - char FDLE::ID = 0; - RegisterPass X("fdle", "Fast Dead Load Elimination"); + char RLE::ID = 0; + RegisterPass X("rle", "Redundant Load Elimination"); } -FunctionPass *llvm::createFastDeadLoadEliminationPass() { return new FDLE(); } +FunctionPass *llvm::createRedundantLoadEliminationPass() { return new RLE(); } -bool FDLE::runOnBasicBlock(BasicBlock &BB) { +bool RLE::runOnBasicBlock(BasicBlock &BB) { MemoryDependenceAnalysis& MD = getAnalysis(); // Record the last-seen load from this pointer Modified: llvm/trunk/test/Transforms/RedundantLoadElimination/simple.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/RedundantLoadElimination/simple.ll?rev=40457&r1=40449&r2=40457&view=diff ============================================================================== --- llvm/trunk/test/Transforms/RedundantLoadElimination/simple.ll (original) +++ llvm/trunk/test/Transforms/RedundantLoadElimination/simple.ll Mon Jul 23 19:17:04 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -fdle | llvm-dis | not grep DEAD +; RUN: llvm-as < %s | opt -rle | llvm-dis | not grep DEAD define void @test(i32* %Q, i32* %P) { %A = load i32* %Q Modified: llvm/trunk/test/Transforms/RedundantLoadElimination/volatile.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/RedundantLoadElimination/volatile.ll?rev=40457&r1=40449&r2=40457&view=diff ============================================================================== --- llvm/trunk/test/Transforms/RedundantLoadElimination/volatile.ll (original) +++ llvm/trunk/test/Transforms/RedundantLoadElimination/volatile.ll Mon Jul 23 19:17:04 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -fdle | llvm-dis | grep NOTDEAD +; RUN: llvm-as < %s | opt -rle | llvm-dis | grep NOTDEAD define void @test(i32* %Q, i32* %P) { %A = load i32* %Q From dpatel at apple.com Mon Jul 23 20:02:26 2007 From: dpatel at apple.com (Devang Patel) Date: Tue, 24 Jul 2007 01:02:26 -0000 Subject: [llvm-commits] [llvm] r40458 - in /llvm/trunk: lib/Analysis/PostDominators.cpp test/Transforms/ADCE/2007-07-23-InfiniteLoop.ll Message-ID: <200707240102.l6O12Q4L022813@zion.cs.uiuc.edu> Author: dpatel Date: Mon Jul 23 20:02:25 2007 New Revision: 40458 URL: http://llvm.org/viewvc/llvm-project?rev=40458&view=rev Log: Unreachable block is not a root node in post dominator tree. Added: llvm/trunk/test/Transforms/ADCE/2007-07-23-InfiniteLoop.ll Modified: llvm/trunk/lib/Analysis/PostDominators.cpp Modified: llvm/trunk/lib/Analysis/PostDominators.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/PostDominators.cpp?rev=40458&r1=40457&r2=40458&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/PostDominators.cpp (original) +++ llvm/trunk/lib/Analysis/PostDominators.cpp Mon Jul 23 20:02:25 2007 @@ -112,8 +112,12 @@ // relationships. These blocks, which have no successors, end with return and // unwind instructions. for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I) - if (succ_begin(I) == succ_end(I)) - Roots.push_back(I); + if (succ_begin(I) == succ_end(I)) { + Instruction *Insn = I->getTerminator(); + // Unreachable block is not a root node. + if (!isa(Insn)) + Roots.push_back(I); + } Vertex.push_back(0); Added: llvm/trunk/test/Transforms/ADCE/2007-07-23-InfiniteLoop.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ADCE/2007-07-23-InfiniteLoop.ll?rev=40458&view=auto ============================================================================== --- llvm/trunk/test/Transforms/ADCE/2007-07-23-InfiniteLoop.ll (added) +++ llvm/trunk/test/Transforms/ADCE/2007-07-23-InfiniteLoop.ll Mon Jul 23 20:02:25 2007 @@ -0,0 +1,13 @@ +; RUN: llvm-as < %s | opt -adce | llvm-dis | grep switch +; PR 1564 + +define fastcc void @out() { + start: + br label %loop + unreachable: + unreachable + loop: + switch i32 0, label %unreachable [ + i32 0, label %loop + ] +} From baldrick at free.fr Tue Jul 24 02:38:12 2007 From: baldrick at free.fr (Duncan Sands) Date: Tue, 24 Jul 2007 09:38:12 +0200 Subject: [llvm-commits] [llvm] r40453 - /llvm/trunk/lib/VMCore/Verifier.cpp In-Reply-To: <200707232309.l6NN9tXc019292@zion.cs.uiuc.edu> References: <200707232309.l6NN9tXc019292@zion.cs.uiuc.edu> Message-ID: <200707240938.14477.baldrick@free.fr> > + Assert(!Attrs->paramHasAttr(0, ParamAttr::InReg), > + "Attribute SRet should not apply to functions!"); I think you mean InReg in the second line. Ciao, Duncan. From baldrick at free.fr Tue Jul 24 04:30:28 2007 From: baldrick at free.fr (Duncan Sands) Date: Tue, 24 Jul 2007 09:30:28 -0000 Subject: [llvm-commits] [llvm-gcc-4.0] r40463 - /llvm-gcc-4.0/trunk/gcc/c-typeck.c Message-ID: <200707240930.l6O9UTHb001969@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 24 04:30:28 2007 New Revision: 40463 URL: http://llvm.org/viewvc/llvm-project?rev=40463&view=rev Log: Silence a warning. Modified: llvm-gcc-4.0/trunk/gcc/c-typeck.c Modified: llvm-gcc-4.0/trunk/gcc/c-typeck.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/c-typeck.c?rev=40463&r1=40462&r2=40463&view=diff ============================================================================== --- llvm-gcc-4.0/trunk/gcc/c-typeck.c (original) +++ llvm-gcc-4.0/trunk/gcc/c-typeck.c Tue Jul 24 04:30:28 2007 @@ -2925,7 +2925,7 @@ return build_binary_op (PLUS_EXPR, TREE_OPERAND (arg, 0), TREE_OPERAND (arg, 1), 1); } -#endif ENABLE_LLVM +#endif /* APPLE LOCAL end LLVM */ /* Anything not already handled and not a true memory reference From rspencer at reidspencer.com Tue Jul 24 09:35:45 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Tue, 24 Jul 2007 14:35:45 -0000 Subject: [llvm-commits] [llvm] r40464 - /llvm/trunk/lib/VMCore/Verifier.cpp Message-ID: <200707241435.l6OEZjgP008213@zion.cs.uiuc.edu> Author: reid Date: Tue Jul 24 09:35:44 2007 New Revision: 40464 URL: http://llvm.org/viewvc/llvm-project?rev=40464&view=rev Log: Make output match actual condition tested. Thanks, Duncan. Modified: llvm/trunk/lib/VMCore/Verifier.cpp Modified: llvm/trunk/lib/VMCore/Verifier.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=40464&r1=40463&r2=40464&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Verifier.cpp (original) +++ llvm/trunk/lib/VMCore/Verifier.cpp Tue Jul 24 09:35:44 2007 @@ -367,7 +367,7 @@ Assert1(!Attrs->paramHasAttr(0, ParamAttr::StructRet), "Attribute SRet should not apply to functions!", &F); Assert1(!Attrs->paramHasAttr(0, ParamAttr::InReg), - "Attribute SRet should not apply to functions!", &F); + "Attribute InReg should not apply to functions!", &F); for (FunctionType::param_iterator I = FT->param_begin(), E = FT->param_end(); I != E; ++I, ++Idx) { From baldrick at free.fr Tue Jul 24 12:35:25 2007 From: baldrick at free.fr (Duncan Sands) Date: Tue, 24 Jul 2007 17:35:25 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40467 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Message-ID: <200707241735.l6OHZP2Z012755@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 24 12:35:25 2007 New Revision: 40467 URL: http://llvm.org/viewvc/llvm-project?rev=40467&view=rev Log: Make sure the terminator terminates the basic block. 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=40467&r1=40466&r2=40467&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Tue Jul 24 12:35:25 2007 @@ -4698,6 +4698,7 @@ Intrinsic::eh_return), Offset, Handler); Result = Builder.CreateUnreachable(); + EmitBlock(new BasicBlock("")); return true; } From baldrick at free.fr Tue Jul 24 12:38:48 2007 From: baldrick at free.fr (Duncan Sands) Date: Tue, 24 Jul 2007 17:38:48 -0000 Subject: [llvm-commits] [llvm-gcc-4.0] r40468 - /llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp Message-ID: <200707241738.l6OHcmpA012820@zion.cs.uiuc.edu> Author: baldrick Date: Tue Jul 24 12:38:48 2007 New Revision: 40468 URL: http://llvm.org/viewvc/llvm-project?rev=40468&view=rev Log: Make sure the terminator terminates the basic block. Modified: llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp Modified: llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp?rev=40468&r1=40467&r2=40468&view=diff ============================================================================== --- llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp Tue Jul 24 12:38:48 2007 @@ -4679,6 +4679,7 @@ Intrinsic::eh_return), Offset, Handler); Result = Builder.CreateUnreachable(); + EmitBlock(new BasicBlock("")); return true; } From resistor at mac.com Tue Jul 24 12:55:58 2007 From: resistor at mac.com (Owen Anderson) Date: Tue, 24 Jul 2007 17:55:58 -0000 Subject: [llvm-commits] [llvm] r40469 - in /llvm/trunk: include/llvm/LinkAllPasses.h include/llvm/Transforms/Scalar.h lib/Transforms/Scalar/GVN.cpp test/Transforms/GVN/ test/Transforms/GVN/basic.ll test/Transforms/GVN/dg.exp test/Transforms/GVN/mixed.ll Message-ID: <200707241755.l6OHtw6Q013418@zion.cs.uiuc.edu> Author: resistor Date: Tue Jul 24 12:55:58 2007 New Revision: 40469 URL: http://llvm.org/viewvc/llvm-project?rev=40469&view=rev Log: Add a GVN pass, using the value numbering code I developed for GVNPRE and the load elimination code from RedundantLoadElimination. Added: llvm/trunk/lib/Transforms/Scalar/GVN.cpp llvm/trunk/test/Transforms/GVN/ llvm/trunk/test/Transforms/GVN/basic.ll llvm/trunk/test/Transforms/GVN/dg.exp llvm/trunk/test/Transforms/GVN/mixed.ll Modified: llvm/trunk/include/llvm/LinkAllPasses.h llvm/trunk/include/llvm/Transforms/Scalar.h Modified: llvm/trunk/include/llvm/LinkAllPasses.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LinkAllPasses.h?rev=40469&r1=40468&r2=40469&view=diff ============================================================================== --- llvm/trunk/include/llvm/LinkAllPasses.h (original) +++ llvm/trunk/include/llvm/LinkAllPasses.h Tue Jul 24 12:55:58 2007 @@ -114,6 +114,7 @@ (void) llvm::createInstCountPass(); (void) llvm::createPredicateSimplifierPass(); (void) llvm::createCodeGenPreparePass(); + (void) llvm::createGVNPass(); (void)new llvm::IntervalPartition(); (void)new llvm::FindUsedTypes(); Modified: llvm/trunk/include/llvm/Transforms/Scalar.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Scalar.h?rev=40469&r1=40468&r2=40469&view=diff ============================================================================== --- llvm/trunk/include/llvm/Transforms/Scalar.h (original) +++ llvm/trunk/include/llvm/Transforms/Scalar.h Tue Jul 24 12:55:58 2007 @@ -339,6 +339,13 @@ //===----------------------------------------------------------------------===// // +// GVN - This pass performs global value numbering and redundant load +// elimination cotemporaneously. +// +FunctionPass *createGVNPass(); + +//===----------------------------------------------------------------------===// +// // CodeGenPrepare - This pass prepares a function for instruction selection. // FunctionPass *createCodeGenPreparePass(const TargetLowering *TLI = 0); Added: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=40469&view=auto ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (added) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Tue Jul 24 12:55:58 2007 @@ -0,0 +1,816 @@ +//===- GVN.cpp - Eliminate redundant values and loads ------------===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by the Owen Anderson and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This pass performs global value numbering to eliminate fully redundant +// instructions. It also performs simple dead load elimination. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "gvn" +#include "llvm/Value.h" +#include "llvm/Transforms/Scalar.h" +#include "llvm/Instructions.h" +#include "llvm/Function.h" +#include "llvm/DerivedTypes.h" +#include "llvm/Analysis/Dominators.h" +#include "llvm/ADT/BitVector.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/DepthFirstIterator.h" +#include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Analysis/MemoryDependenceAnalysis.h" +#include "llvm/Support/CFG.h" +#include "llvm/Support/Compiler.h" +using namespace llvm; + +//===----------------------------------------------------------------------===// +// ValueTable Class +//===----------------------------------------------------------------------===// + +/// This class holds the mapping between values and value numbers. It is used +/// as an efficient mechanism to determine the expression-wise equivalence of +/// two values. +namespace { + struct VISIBILITY_HIDDEN Expression { + enum ExpressionOpcode { ADD, SUB, MUL, UDIV, SDIV, FDIV, UREM, SREM, + FREM, SHL, LSHR, ASHR, AND, OR, XOR, ICMPEQ, + ICMPNE, ICMPUGT, ICMPUGE, ICMPULT, ICMPULE, + ICMPSGT, ICMPSGE, ICMPSLT, ICMPSLE, FCMPOEQ, + FCMPOGT, FCMPOGE, FCMPOLT, FCMPOLE, FCMPONE, + FCMPORD, FCMPUNO, FCMPUEQ, FCMPUGT, FCMPUGE, + FCMPULT, FCMPULE, FCMPUNE, EXTRACT, INSERT, + SHUFFLE, SELECT, TRUNC, ZEXT, SEXT, FPTOUI, + FPTOSI, UITOFP, SITOFP, FPTRUNC, FPEXT, + PTRTOINT, INTTOPTR, BITCAST, GEP, EMPTY, + TOMBSTONE }; + + ExpressionOpcode opcode; + const Type* type; + uint32_t firstVN; + uint32_t secondVN; + uint32_t thirdVN; + SmallVector varargs; + + Expression() { } + Expression(ExpressionOpcode o) : opcode(o) { } + + bool operator==(const Expression &other) const { + if (opcode != other.opcode) + return false; + else if (opcode == EMPTY || opcode == TOMBSTONE) + return true; + else if (type != other.type) + return false; + else if (firstVN != other.firstVN) + return false; + else if (secondVN != other.secondVN) + return false; + else if (thirdVN != other.thirdVN) + return false; + else { + if (varargs.size() != other.varargs.size()) + return false; + + for (size_t i = 0; i < varargs.size(); ++i) + if (varargs[i] != other.varargs[i]) + return false; + + return true; + } + } + + bool operator!=(const Expression &other) const { + if (opcode != other.opcode) + return true; + else if (opcode == EMPTY || opcode == TOMBSTONE) + return false; + else if (type != other.type) + return true; + else if (firstVN != other.firstVN) + return true; + else if (secondVN != other.secondVN) + return true; + else if (thirdVN != other.thirdVN) + return true; + else { + if (varargs.size() != other.varargs.size()) + return true; + + for (size_t i = 0; i < varargs.size(); ++i) + if (varargs[i] != other.varargs[i]) + return true; + + return false; + } + } + }; + + class VISIBILITY_HIDDEN ValueTable { + private: + DenseMap valueNumbering; + DenseMap expressionNumbering; + + uint32_t nextValueNumber; + + Expression::ExpressionOpcode getOpcode(BinaryOperator* BO); + Expression::ExpressionOpcode getOpcode(CmpInst* C); + Expression::ExpressionOpcode getOpcode(CastInst* C); + Expression create_expression(BinaryOperator* BO); + Expression create_expression(CmpInst* C); + Expression create_expression(ShuffleVectorInst* V); + Expression create_expression(ExtractElementInst* C); + Expression create_expression(InsertElementInst* V); + Expression create_expression(SelectInst* V); + Expression create_expression(CastInst* C); + Expression create_expression(GetElementPtrInst* G); + public: + ValueTable() { nextValueNumber = 1; } + uint32_t lookup_or_add(Value* V); + uint32_t lookup(Value* V) const; + void add(Value* V, uint32_t num); + void clear(); + void erase(Value* v); + unsigned size(); + }; +} + +namespace llvm { +template <> struct DenseMapKeyInfo { + static inline Expression getEmptyKey() { return Expression(Expression::EMPTY); } + static inline Expression getTombstoneKey() { return Expression(Expression::TOMBSTONE); } + + static unsigned getHashValue(const Expression e) { + unsigned hash = e.opcode; + + hash = e.firstVN + hash * 37; + hash = e.secondVN + hash * 37; + hash = e.thirdVN + hash * 37; + + hash = (unsigned)((uintptr_t)e.type >> 4) ^ + (unsigned)((uintptr_t)e.type >> 9) + + hash * 37; + + for (SmallVector::const_iterator I = e.varargs.begin(), E = e.varargs.end(); + I != E; ++I) + hash = *I + hash * 37; + + return hash; + } + static bool isPod() { return true; } +}; +} + +//===----------------------------------------------------------------------===// +// ValueTable Internal Functions +//===----------------------------------------------------------------------===// +Expression::ExpressionOpcode + ValueTable::getOpcode(BinaryOperator* BO) { + switch(BO->getOpcode()) { + case Instruction::Add: + return Expression::ADD; + case Instruction::Sub: + return Expression::SUB; + case Instruction::Mul: + return Expression::MUL; + case Instruction::UDiv: + return Expression::UDIV; + case Instruction::SDiv: + return Expression::SDIV; + case Instruction::FDiv: + return Expression::FDIV; + case Instruction::URem: + return Expression::UREM; + case Instruction::SRem: + return Expression::SREM; + case Instruction::FRem: + return Expression::FREM; + case Instruction::Shl: + return Expression::SHL; + case Instruction::LShr: + return Expression::LSHR; + case Instruction::AShr: + return Expression::ASHR; + case Instruction::And: + return Expression::AND; + case Instruction::Or: + return Expression::OR; + case Instruction::Xor: + return Expression::XOR; + + // THIS SHOULD NEVER HAPPEN + default: + assert(0 && "Binary operator with unknown opcode?"); + return Expression::ADD; + } +} + +Expression::ExpressionOpcode ValueTable::getOpcode(CmpInst* C) { + if (C->getOpcode() == Instruction::ICmp) { + switch (C->getPredicate()) { + case ICmpInst::ICMP_EQ: + return Expression::ICMPEQ; + case ICmpInst::ICMP_NE: + return Expression::ICMPNE; + case ICmpInst::ICMP_UGT: + return Expression::ICMPUGT; + case ICmpInst::ICMP_UGE: + return Expression::ICMPUGE; + case ICmpInst::ICMP_ULT: + return Expression::ICMPULT; + case ICmpInst::ICMP_ULE: + return Expression::ICMPULE; + case ICmpInst::ICMP_SGT: + return Expression::ICMPSGT; + case ICmpInst::ICMP_SGE: + return Expression::ICMPSGE; + case ICmpInst::ICMP_SLT: + return Expression::ICMPSLT; + case ICmpInst::ICMP_SLE: + return Expression::ICMPSLE; + + // THIS SHOULD NEVER HAPPEN + default: + assert(0 && "Comparison with unknown predicate?"); + return Expression::ICMPEQ; + } + } else { + switch (C->getPredicate()) { + case FCmpInst::FCMP_OEQ: + return Expression::FCMPOEQ; + case FCmpInst::FCMP_OGT: + return Expression::FCMPOGT; + case FCmpInst::FCMP_OGE: + return Expression::FCMPOGE; + case FCmpInst::FCMP_OLT: + return Expression::FCMPOLT; + case FCmpInst::FCMP_OLE: + return Expression::FCMPOLE; + case FCmpInst::FCMP_ONE: + return Expression::FCMPONE; + case FCmpInst::FCMP_ORD: + return Expression::FCMPORD; + case FCmpInst::FCMP_UNO: + return Expression::FCMPUNO; + case FCmpInst::FCMP_UEQ: + return Expression::FCMPUEQ; + case FCmpInst::FCMP_UGT: + return Expression::FCMPUGT; + case FCmpInst::FCMP_UGE: + return Expression::FCMPUGE; + case FCmpInst::FCMP_ULT: + return Expression::FCMPULT; + case FCmpInst::FCMP_ULE: + return Expression::FCMPULE; + case FCmpInst::FCMP_UNE: + return Expression::FCMPUNE; + + // THIS SHOULD NEVER HAPPEN + default: + assert(0 && "Comparison with unknown predicate?"); + return Expression::FCMPOEQ; + } + } +} + +Expression::ExpressionOpcode + ValueTable::getOpcode(CastInst* C) { + switch(C->getOpcode()) { + case Instruction::Trunc: + return Expression::TRUNC; + case Instruction::ZExt: + return Expression::ZEXT; + case Instruction::SExt: + return Expression::SEXT; + case Instruction::FPToUI: + return Expression::FPTOUI; + case Instruction::FPToSI: + return Expression::FPTOSI; + case Instruction::UIToFP: + return Expression::UITOFP; + case Instruction::SIToFP: + return Expression::SITOFP; + case Instruction::FPTrunc: + return Expression::FPTRUNC; + case Instruction::FPExt: + return Expression::FPEXT; + case Instruction::PtrToInt: + return Expression::PTRTOINT; + case Instruction::IntToPtr: + return Expression::INTTOPTR; + case Instruction::BitCast: + return Expression::BITCAST; + + // THIS SHOULD NEVER HAPPEN + default: + assert(0 && "Cast operator with unknown opcode?"); + return Expression::BITCAST; + } +} + +Expression ValueTable::create_expression(BinaryOperator* BO) { + Expression e; + + e.firstVN = lookup_or_add(BO->getOperand(0)); + e.secondVN = lookup_or_add(BO->getOperand(1)); + e.thirdVN = 0; + e.type = BO->getType(); + e.opcode = getOpcode(BO); + + return e; +} + +Expression ValueTable::create_expression(CmpInst* C) { + Expression e; + + e.firstVN = lookup_or_add(C->getOperand(0)); + e.secondVN = lookup_or_add(C->getOperand(1)); + e.thirdVN = 0; + e.type = C->getType(); + e.opcode = getOpcode(C); + + return e; +} + +Expression ValueTable::create_expression(CastInst* C) { + Expression e; + + e.firstVN = lookup_or_add(C->getOperand(0)); + e.secondVN = 0; + e.thirdVN = 0; + e.type = C->getType(); + e.opcode = getOpcode(C); + + return e; +} + +Expression ValueTable::create_expression(ShuffleVectorInst* S) { + Expression e; + + e.firstVN = lookup_or_add(S->getOperand(0)); + e.secondVN = lookup_or_add(S->getOperand(1)); + e.thirdVN = lookup_or_add(S->getOperand(2)); + e.type = S->getType(); + e.opcode = Expression::SHUFFLE; + + return e; +} + +Expression ValueTable::create_expression(ExtractElementInst* E) { + Expression e; + + e.firstVN = lookup_or_add(E->getOperand(0)); + e.secondVN = lookup_or_add(E->getOperand(1)); + e.thirdVN = 0; + e.type = E->getType(); + e.opcode = Expression::EXTRACT; + + return e; +} + +Expression ValueTable::create_expression(InsertElementInst* I) { + Expression e; + + e.firstVN = lookup_or_add(I->getOperand(0)); + e.secondVN = lookup_or_add(I->getOperand(1)); + e.thirdVN = lookup_or_add(I->getOperand(2)); + e.type = I->getType(); + e.opcode = Expression::INSERT; + + return e; +} + +Expression ValueTable::create_expression(SelectInst* I) { + Expression e; + + e.firstVN = lookup_or_add(I->getCondition()); + e.secondVN = lookup_or_add(I->getTrueValue()); + e.thirdVN = lookup_or_add(I->getFalseValue()); + e.type = I->getType(); + e.opcode = Expression::SELECT; + + return e; +} + +Expression ValueTable::create_expression(GetElementPtrInst* G) { + Expression e; + + e.firstVN = lookup_or_add(G->getPointerOperand()); + e.secondVN = 0; + e.thirdVN = 0; + e.type = G->getType(); + e.opcode = Expression::GEP; + + for (GetElementPtrInst::op_iterator I = G->idx_begin(), E = G->idx_end(); + I != E; ++I) + e.varargs.push_back(lookup_or_add(*I)); + + return e; +} + +//===----------------------------------------------------------------------===// +// ValueTable External Functions +//===----------------------------------------------------------------------===// + +/// lookup_or_add - Returns the value number for the specified value, assigning +/// it a new number if it did not have one before. +uint32_t ValueTable::lookup_or_add(Value* V) { + DenseMap::iterator VI = valueNumbering.find(V); + if (VI != valueNumbering.end()) + return VI->second; + + + if (BinaryOperator* BO = dyn_cast(V)) { + Expression e = create_expression(BO); + + DenseMap::iterator EI = expressionNumbering.find(e); + if (EI != expressionNumbering.end()) { + valueNumbering.insert(std::make_pair(V, EI->second)); + return EI->second; + } else { + expressionNumbering.insert(std::make_pair(e, nextValueNumber)); + valueNumbering.insert(std::make_pair(V, nextValueNumber)); + + return nextValueNumber++; + } + } else if (CmpInst* C = dyn_cast(V)) { + Expression e = create_expression(C); + + DenseMap::iterator EI = expressionNumbering.find(e); + if (EI != expressionNumbering.end()) { + valueNumbering.insert(std::make_pair(V, EI->second)); + return EI->second; + } else { + expressionNumbering.insert(std::make_pair(e, nextValueNumber)); + valueNumbering.insert(std::make_pair(V, nextValueNumber)); + + return nextValueNumber++; + } + } else if (ShuffleVectorInst* U = dyn_cast(V)) { + Expression e = create_expression(U); + + DenseMap::iterator EI = expressionNumbering.find(e); + if (EI != expressionNumbering.end()) { + valueNumbering.insert(std::make_pair(V, EI->second)); + return EI->second; + } else { + expressionNumbering.insert(std::make_pair(e, nextValueNumber)); + valueNumbering.insert(std::make_pair(V, nextValueNumber)); + + return nextValueNumber++; + } + } else if (ExtractElementInst* U = dyn_cast(V)) { + Expression e = create_expression(U); + + DenseMap::iterator EI = expressionNumbering.find(e); + if (EI != expressionNumbering.end()) { + valueNumbering.insert(std::make_pair(V, EI->second)); + return EI->second; + } else { + expressionNumbering.insert(std::make_pair(e, nextValueNumber)); + valueNumbering.insert(std::make_pair(V, nextValueNumber)); + + return nextValueNumber++; + } + } else if (InsertElementInst* U = dyn_cast(V)) { + Expression e = create_expression(U); + + DenseMap::iterator EI = expressionNumbering.find(e); + if (EI != expressionNumbering.end()) { + valueNumbering.insert(std::make_pair(V, EI->second)); + return EI->second; + } else { + expressionNumbering.insert(std::make_pair(e, nextValueNumber)); + valueNumbering.insert(std::make_pair(V, nextValueNumber)); + + return nextValueNumber++; + } + } else if (SelectInst* U = dyn_cast(V)) { + Expression e = create_expression(U); + + DenseMap::iterator EI = expressionNumbering.find(e); + if (EI != expressionNumbering.end()) { + valueNumbering.insert(std::make_pair(V, EI->second)); + return EI->second; + } else { + expressionNumbering.insert(std::make_pair(e, nextValueNumber)); + valueNumbering.insert(std::make_pair(V, nextValueNumber)); + + return nextValueNumber++; + } + } else if (CastInst* U = dyn_cast(V)) { + Expression e = create_expression(U); + + DenseMap::iterator EI = expressionNumbering.find(e); + if (EI != expressionNumbering.end()) { + valueNumbering.insert(std::make_pair(V, EI->second)); + return EI->second; + } else { + expressionNumbering.insert(std::make_pair(e, nextValueNumber)); + valueNumbering.insert(std::make_pair(V, nextValueNumber)); + + return nextValueNumber++; + } + } else if (GetElementPtrInst* U = dyn_cast(V)) { + Expression e = create_expression(U); + + DenseMap::iterator EI = expressionNumbering.find(e); + if (EI != expressionNumbering.end()) { + valueNumbering.insert(std::make_pair(V, EI->second)); + return EI->second; + } else { + expressionNumbering.insert(std::make_pair(e, nextValueNumber)); + valueNumbering.insert(std::make_pair(V, nextValueNumber)); + + return nextValueNumber++; + } + } else { + valueNumbering.insert(std::make_pair(V, nextValueNumber)); + return nextValueNumber++; + } +} + +/// lookup - Returns the value number of the specified value. Fails if +/// the value has not yet been numbered. +uint32_t ValueTable::lookup(Value* V) const { + DenseMap::iterator VI = valueNumbering.find(V); + if (VI != valueNumbering.end()) + return VI->second; + else + assert(0 && "Value not numbered?"); + + return 0; +} + +/// clear - Remove all entries from the ValueTable +void ValueTable::clear() { + valueNumbering.clear(); + expressionNumbering.clear(); + nextValueNumber = 1; +} + +//===----------------------------------------------------------------------===// +// ValueNumberedSet Class +//===----------------------------------------------------------------------===// +namespace { +class ValueNumberedSet { + private: + SmallPtrSet contents; + BitVector numbers; + public: + ValueNumberedSet() { numbers.resize(1); } + ValueNumberedSet(const ValueNumberedSet& other) { + numbers = other.numbers; + contents = other.contents; + } + + typedef SmallPtrSet::iterator iterator; + + iterator begin() { return contents.begin(); } + iterator end() { return contents.end(); } + + bool insert(Value* v) { return contents.insert(v); } + void insert(iterator I, iterator E) { contents.insert(I, E); } + void erase(Value* v) { contents.erase(v); } + unsigned count(Value* v) { return contents.count(v); } + size_t size() { return contents.size(); } + + void set(unsigned i) { + if (i >= numbers.size()) + numbers.resize(i+1); + + numbers.set(i); + } + + void operator=(const ValueNumberedSet& other) { + contents = other.contents; + numbers = other.numbers; + } + + void reset(unsigned i) { + if (i < numbers.size()) + numbers.reset(i); + } + + bool test(unsigned i) { + if (i >= numbers.size()) + return false; + + return numbers.test(i); + } + + void clear() { + contents.clear(); + numbers.clear(); + } +}; +} + +//===----------------------------------------------------------------------===// +// GVN Pass +//===----------------------------------------------------------------------===// + +namespace { + + class VISIBILITY_HIDDEN GVN : public FunctionPass { + bool runOnFunction(Function &F); + public: + static char ID; // Pass identification, replacement for typeid + GVN() : FunctionPass((intptr_t)&ID) { } + + private: + ValueTable VN; + + DenseMap availableOut; + + // This transformation requires dominator postdominator info + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesCFG(); + AU.addRequired(); + AU.addRequired(); + AU.addPreserved(); + } + + // Helper fuctions + // FIXME: eliminate or document these better + Value* find_leader(ValueNumberedSet& vals, uint32_t v) ; + void val_insert(ValueNumberedSet& s, Value* v); + bool processLoad(LoadInst* L, + DenseMap& lastLoad, + SmallVector& toErase); + bool processInstruction(Instruction* I, + ValueNumberedSet& currAvail, + DenseMap& lastSeenLoad, + SmallVector& toErase); + }; + + char GVN::ID = 0; + +} + +// createGVNPass - The public interface to this file... +FunctionPass *llvm::createGVNPass() { return new GVN(); } + +static RegisterPass X("gvn", + "Global Value Numbering"); + +STATISTIC(NumGVNInstr, "Number of instructions deleted"); +STATISTIC(NumGVNLoad, "Number of loads deleted"); + +/// find_leader - Given a set and a value number, return the first +/// element of the set with that value number, or 0 if no such element +/// is present +Value* GVN::find_leader(ValueNumberedSet& vals, uint32_t v) { + if (!vals.test(v)) + return 0; + + for (ValueNumberedSet::iterator I = vals.begin(), E = vals.end(); + I != E; ++I) + if (v == VN.lookup(*I)) + return *I; + + assert(0 && "No leader found, but present bit is set?"); + return 0; +} + +/// val_insert - Insert a value into a set only if there is not a value +/// with the same value number already in the set +void GVN::val_insert(ValueNumberedSet& s, Value* v) { + uint32_t num = VN.lookup(v); + if (!s.test(num)) + s.insert(v); +} + +bool GVN::processLoad(LoadInst* L, + DenseMap& lastLoad, + SmallVector& toErase) { + if (L->isVolatile()) { + lastLoad[L->getPointerOperand()] = L; + return false; + } + + Value* pointer = L->getPointerOperand(); + LoadInst*& last = lastLoad[pointer]; + + // ... to a pointer that has been loaded from before... + MemoryDependenceAnalysis& MD = getAnalysis(); + Instruction* dep = MD.getDependency(L); + bool deletedLoad = false; + + while (dep != MemoryDependenceAnalysis::None && + dep != MemoryDependenceAnalysis::NonLocal && + (isa(dep) || isa(dep))) { + // ... that depends on a store ... + if (StoreInst* S = dyn_cast(dep)) { + if (S->getPointerOperand() == pointer) { + // Remove it! + MD.removeInstruction(L); + + L->replaceAllUsesWith(S->getOperand(0)); + toErase.push_back(L); + deletedLoad = true; + NumGVNLoad++; + } + + // Whether we removed it or not, we can't + // go any further + break; + } else if (!last) { + // If we don't depend on a store, and we haven't + // been loaded before, bail. + break; + } else if (dep == last) { + // Remove it! + MD.removeInstruction(L); + + L->replaceAllUsesWith(last); + toErase.push_back(L); + deletedLoad = true; + NumGVNLoad++; + + break; + } else { + dep = MD.getDependency(L, dep); + } + } + + if (!deletedLoad) + last = L; + + return deletedLoad; +} + +/// buildsets_availout - When calculating availability, handle an instruction +/// by inserting it into the appropriate sets +bool GVN::processInstruction(Instruction* I, + ValueNumberedSet& currAvail, + DenseMap& lastSeenLoad, + SmallVector& toErase) { + if (LoadInst* L = dyn_cast(I)) { + return processLoad(L, lastSeenLoad, toErase); + } + + unsigned num = VN.lookup_or_add(I); + + if (currAvail.test(num)) { + Value* repl = find_leader(currAvail, num); + + I->replaceAllUsesWith(repl); + toErase.push_back(I); + return true; + } else if (!I->isTerminator()) { + currAvail.set(num); + currAvail.insert(I); + } + + return false; +} + +// GVN::runOnFunction - This is the main transformation entry point for a +// function. +// +bool GVN::runOnFunction(Function &F) { + // Clean out global sets from any previous functions + VN.clear(); + availableOut.clear(); + + bool changed_function = false; + + DominatorTree &DT = getAnalysis(); + + SmallVector toErase; + + // Top-down walk of the dominator tree + for (df_iterator DI = df_begin(DT.getRootNode()), + E = df_end(DT.getRootNode()); DI != E; ++DI) { + + // Get the set to update for this block + ValueNumberedSet& currAvail = availableOut[DI->getBlock()]; + DenseMap lastSeenLoad; + + BasicBlock* BB = DI->getBlock(); + + // A block inherits AVAIL_OUT from its dominator + if (DI->getIDom() != 0) + currAvail = availableOut[DI->getIDom()->getBlock()]; + + for (BasicBlock::iterator BI = BB->begin(), BE = BB->end(); + BI != BE; ++BI) { + processInstruction(BI, currAvail, lastSeenLoad, toErase); + } + } + + NumGVNInstr = toErase.size(); + + for (SmallVector::iterator I = toErase.begin(), + E = toErase.end(); I != E; ++I) + (*I)->eraseFromParent(); + + return changed_function; +} Added: llvm/trunk/test/Transforms/GVN/basic.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/basic.ll?rev=40469&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GVN/basic.ll (added) +++ llvm/trunk/test/Transforms/GVN/basic.ll Tue Jul 24 12:55:58 2007 @@ -0,0 +1,10 @@ +; RUN: llvm-as < %s | opt -gvn | llvm-dis | not grep {%z2 =} + +define i32 @main() { +block1: + %z1 = bitcast i32 0 to i32 + br label %block2 +block2: + %z2 = bitcast i32 0 to i32 + ret i32 %z2 +} \ No newline at end of file Added: llvm/trunk/test/Transforms/GVN/dg.exp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/dg.exp?rev=40469&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GVN/dg.exp (added) +++ llvm/trunk/test/Transforms/GVN/dg.exp Tue Jul 24 12:55:58 2007 @@ -0,0 +1,3 @@ +load_lib llvm.exp + +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]] Added: llvm/trunk/test/Transforms/GVN/mixed.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/mixed.ll?rev=40469&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GVN/mixed.ll (added) +++ llvm/trunk/test/Transforms/GVN/mixed.ll Tue Jul 24 12:55:58 2007 @@ -0,0 +1,13 @@ +; RUN: llvm-as < %s | opt -gvn | llvm-dis | not grep DEADLOAD +; RUN: llvm-as < %s | opt -gvn | llvm-dis | not grep DEADGEP + +define i32 @main(i32** %p) { +block1: + %z1 = load i32** %p + %z2 = getelementptr i32* %z1, i32 0 + %z3 = load i32* %z2 + %DEADLOAD = load i32** %p + %DEADGEP = getelementptr i32* %DEADLOAD, i32 0 + %DEADLOAD2 = load i32* %DEADGEP + ret i32 %DEADLOAD2 +} \ No newline at end of file From asl at math.spbu.ru Tue Jul 24 16:07:39 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Tue, 24 Jul 2007 21:07:39 -0000 Subject: [llvm-commits] [llvm] r40472 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Message-ID: <200707242107.l6OL7e2Z018534@zion.cs.uiuc.edu> Author: asl Date: Tue Jul 24 16:07:39 2007 New Revision: 40472 URL: http://llvm.org/viewvc/llvm-project?rev=40472&view=rev Log: Heal EH handling stuff by emitting correct offsets to callee-saved registers. Pretty hackish, but code itself is dirty mess, so we won't make anything worse. :) Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=40472&r1=40471&r2=40472&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Tue Jul 24 16:07:39 2007 @@ -1297,9 +1297,21 @@ // Add callee saved registers to move list. const std::vector &CSI = MFI->getCalleeSavedInfo(); - for (unsigned I = 0, E = CSI.size(); I != E; ++I) { + + // FIXME: This is dirty hack. The code itself is pretty mess right now. + // It should be rewritten from scratch and generalized sometimes. + + // Determine maximum offset (minumum due to stack growth) + int64_t MaxOffset = 0; + for (unsigned I = 0, E = CSI.size(); I!=E; ++I) + MaxOffset = std::min(MaxOffset, + MFI->getObjectOffset(CSI[I].getFrameIdx())); + + // Calculate offsets + for (unsigned I = 0, E = CSI.size(); I!=E; ++I) { int64_t Offset = MFI->getObjectOffset(CSI[I].getFrameIdx()); unsigned Reg = CSI[I].getReg(); + Offset = (MaxOffset-Offset+3*stackGrowth); MachineLocation CSDst(MachineLocation::VirtualFP, Offset); MachineLocation CSSrc(Reg); Moves.push_back(MachineMove(FrameLabelId, CSDst, CSSrc)); From alenhar2 at cs.uiuc.edu Tue Jul 24 16:26:20 2007 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Tue, 24 Jul 2007 21:26:20 -0000 Subject: [llvm-commits] [poolalloc] r40473 - /poolalloc/branches/SVA/lib/DSA/Local.cpp Message-ID: <200707242126.l6OLQKod019254@zion.cs.uiuc.edu> Author: alenhar2 Date: Tue Jul 24 16:26:20 2007 New Revision: 40473 URL: http://llvm.org/viewvc/llvm-project?rev=40473&view=rev Log: last of llva functions, I hope Modified: poolalloc/branches/SVA/lib/DSA/Local.cpp Modified: poolalloc/branches/SVA/lib/DSA/Local.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/branches/SVA/lib/DSA/Local.cpp?rev=40473&r1=40472&r2=40473&view=diff ============================================================================== --- poolalloc/branches/SVA/lib/DSA/Local.cpp (original) +++ poolalloc/branches/SVA/lib/DSA/Local.cpp Tue Jul 24 16:26:20 2007 @@ -50,6 +50,7 @@ static cl::opt CrashAt("dsa-crashat", cl::Hidden, cl::desc("Crash on unknowns")); +static bool DebugUnknown = false; static int CrashCur = 0; DSNode *DSNode::setUnknownNodeMarker() { if (Crash && CrashCur == CrashAt) assert(0); @@ -1124,14 +1125,81 @@ N->setReadMarker(); return true; #ifdef LLVA_KERNEL - //TODO: - //state.c: - //llva_ipush_function0,1,3 llva_push_function1 llva_push_syscall - //llva_set_integer_stackp, llva_load_integer - //llva_load_stackp - //llva_load_invoke llva_save_invoke llva_icontext_save_retvalue - //llva_get_icontext_stackp llva_set_icontext_stackp - //llva_iset_privileged + } else if (F->getName() == "llva_print_icontext") { + DSNodeHandle RetNH = getValueDest(**(CS.arg_begin())); + RetNH.getNode()->setReadMarker(); + return true; + } else if (F->getName() == "llva_ipush_function0" || + F->getName() == "llva_ipush_function1" || + F->getName() == "llva_ipush_function3" || + F->getName() == "llva_push_function1") { + DSNodeHandle RetNH = getValueDest(**(CS.arg_begin())); + DSNodeHandle FP = getValueDest(**(CS.arg_begin() + 1)); + RetNH.getNode()->setModifiedMarker()->setReadMarker()->foldNodeCompletely(); + RetNH.addEdgeTo(FP); + return true; + } else if (F->getName() == "llva_push_syscall" ) { + DSNodeHandle RetNH = getValueDest(**(CS.arg_begin() + 1)); + DSNodeHandle FP = getValueDest(**(CS.arg_begin() + 2)); + RetNH.getNode()->setModifiedMarker()->setReadMarker()->foldNodeCompletely(); + RetNH.addEdgeTo(FP); + return true; + } else if (F->getName() == "llva_config_ldt" || + F->getName() == "llva_mm_flush_tlb" || + F->getName() == "llva_register_syscall_cleaner") { + return true; + } else if (F->getName() == "llva_iset_privileged") { + DSNodeHandle RetNH = getValueDest(**(CS.arg_begin())); + RetNH.getNode()->setModifiedMarker(); + return true; + } else if (F->getName() == "llva_load_invoke") { + Value* GV = F->getParent()->getNamedGlobal("llva.invoke"); + DSNodeHandle Dest = getValueDest(*GV); + Dest.getNode()->setModifiedMarker(); + Dest.getNode()->mergeTypeInfo((*CS.arg_begin())->getType(), Dest.getOffset()); + Dest.addEdgeTo(getValueDest(**CS.arg_begin())); + return true; + } else if (F->getName() == "llva_save_invoke") { + Value* GV = F->getParent()->getNamedGlobal("llva.invoke"); + DSNodeHandle Ptr = getValueDest(*GV); + if (Ptr.isNull()) + Ptr = createNode(); + Ptr.getNode()->setReadMarker(); + Ptr.getNode()->mergeTypeInfo(CS.getInstruction()->getType(), Ptr.getOffset(), false); + setDestTo(*CS.getInstruction(), getLink(Ptr)); + return true; + } else if (F->getName() == "llva_mm_load_pgtable") { + Value* GV = F->getParent()->getNamedGlobal("llva.pgtable"); + DSNodeHandle Dest = getValueDest(*GV); + Dest.getNode()->setModifiedMarker(); + Dest.getNode()->mergeTypeInfo((*CS.arg_begin())->getType(), Dest.getOffset()); + Dest.addEdgeTo(getValueDest(**CS.arg_begin())); + return true; + } else if (F->getName() == "llva_mm_save_pgtable") { + Value* GV = F->getParent()->getNamedGlobal("llva.pgtable"); + DSNodeHandle Ptr = getValueDest(*GV); + if (Ptr.isNull()) + Ptr = createNode(); + Ptr.getNode()->setReadMarker(); + Ptr.getNode()->mergeTypeInfo(CS.getInstruction()->getType(), Ptr.getOffset(), false); + setDestTo(*CS.getInstruction(), getLink(Ptr)); + return true; + } else if (F->getName() == "llva_load_kstackp") { + Value* GV = F->getParent()->getNamedGlobal("llva.kstackp"); + DSNodeHandle Dest = getValueDest(*GV); + Dest.getNode()->setModifiedMarker(); + Dest.getNode()->mergeTypeInfo((*CS.arg_begin())->getType(), Dest.getOffset()); + Dest.addEdgeTo(getValueDest(**CS.arg_begin())); + return true; + } else if (F->getName() == "llva_save_kstackp") { + Value* GV = F->getParent()->getNamedGlobal("llva.kstackp"); + DSNodeHandle Ptr = getValueDest(*GV); + if (Ptr.isNull()) + Ptr = createNode(); + Ptr.getNode()->setReadMarker(); + Ptr.getNode()->mergeTypeInfo(CS.getInstruction()->getType(), Ptr.getOffset(), false); + setDestTo(*CS.getInstruction(), getLink(Ptr)); + return true; } else if (F->getName() == "llva_icontext_save_retvalue") { DSNodeHandle RetNH = getValueDest(**(CS.arg_begin())); RetNH.getNode()->setModifiedMarker(); @@ -1197,7 +1265,9 @@ Ptr.getNode()->setReadMarker(); return true; } else if (F->getName() == "llva_register_syscall" || - F->getName() == "llva_register_interrupt") { + F->getName() == "llva_register_interrupt" || + F->getName() == "llva_register_general_exception" || + F->getName() == "llva_register_memory_exception") { //FIXME: track functions and clear Incomplete flags on them // or set userspace flag on pointers return true; @@ -1498,7 +1568,7 @@ // to track the fact that the node points to SOMETHING, just something we // don't know about. Make an "Unknown" node. // - CI.dump(); + if (DebugUnknown) CI.dump(); setDestTo(CI, createNode()->setUnknownNodeMarker()); } } @@ -1516,7 +1586,7 @@ CurNode.mergeWith(getValueDest(**I)); if (DSNode *N = CurNode.getNode()) { - Inst.dump(); + if (DebugUnknown) Inst.dump(); N->setUnknownNodeMarker(); } } @@ -1688,6 +1758,12 @@ if (Function* F = dyn_cast(fun)) syscalls[num] = F; } + + //Add shadow globals for processor state + new GlobalVariable(PointerType::get(Type::SByteTy), false, GlobalValue::InternalLinkage, Constant::getNullValue(PointerType::get(Type::SByteTy)), "llva.pgtable", &M); + new GlobalVariable(PointerType::get(Type::SByteTy), false, GlobalValue::InternalLinkage, Constant::getNullValue(PointerType::get(Type::SByteTy)), "llva.invoke", &M); + new GlobalVariable(PointerType::get(Type::SByteTy), false, GlobalValue::InternalLinkage, Constant::getNullValue(PointerType::get(Type::SByteTy)), "llva.kstackp", &M); + #endif const TargetData &TD = getAnalysis(); @@ -1758,7 +1834,7 @@ #endif - return false; + return true; } // releaseMemory - If the pass pipeline is done with this pass, we can release From resistor at mac.com Tue Jul 24 16:31:23 2007 From: resistor at mac.com (Owen Anderson) Date: Tue, 24 Jul 2007 21:31:23 -0000 Subject: [llvm-commits] [llvm] r40474 - /llvm/trunk/lib/Support/SmallPtrSet.cpp Message-ID: <200707242131.l6OLVNrT019481@zion.cs.uiuc.edu> Author: resistor Date: Tue Jul 24 16:31:23 2007 New Revision: 40474 URL: http://llvm.org/viewvc/llvm-project?rev=40474&view=rev Log: Make the copy constructor of SmallPtrSet much faster. Modified: llvm/trunk/lib/Support/SmallPtrSet.cpp Modified: llvm/trunk/lib/Support/SmallPtrSet.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SmallPtrSet.cpp?rev=40474&r1=40473&r2=40474&view=diff ============================================================================== --- llvm/trunk/lib/Support/SmallPtrSet.cpp (original) +++ llvm/trunk/lib/Support/SmallPtrSet.cpp Tue Jul 24 16:31:23 2007 @@ -149,33 +149,23 @@ } SmallPtrSetImpl::SmallPtrSetImpl(const SmallPtrSetImpl& that) { - NumElements = that.NumElements; - NumTombstones = 0; + // If we're becoming small, prepare to insert into our stack space if (that.isSmall()) { - CurArraySize = that.CurArraySize; CurArray = &SmallArray[0]; - // Copy the entire contents of the array, including the -1's and the null - // terminator. - memcpy(CurArray, that.CurArray, sizeof(void*)*(CurArraySize+1)); + // Otherwise, allocate new heap space (unless we were the same size) } else { - CurArraySize = that.NumElements < 64 ? 128 : that.CurArraySize*2; - CurArray = (void**)malloc(sizeof(void*) * (CurArraySize+1)); + CurArray = (void**)malloc(sizeof(void*) * (that.CurArraySize+1)); assert(CurArray && "Failed to allocate memory?"); - memset(CurArray, -1, CurArraySize*sizeof(void*)); - - // The end pointer, always valid, is set to a valid element to help the - // iterator. - CurArray[CurArraySize] = 0; - - // Copy over all valid entries. - for (void **BucketPtr = that.CurArray, **E = that.CurArray+that.CurArraySize; - BucketPtr != E; ++BucketPtr) { - // Copy over the element if it is valid. - void *Elt = *BucketPtr; - if (Elt != getTombstoneMarker() && Elt != getEmptyMarker()) - *const_cast(FindBucketFor(Elt)) = Elt; - } } + + // Copy over the new array size + CurArraySize = that.CurArraySize; + + // Copy over the contents from the other set + memcpy(CurArray, that.CurArray, sizeof(void*)*(CurArraySize+1)); + + NumElements = that.NumElements; + NumTombstones = that.NumTombstones; } /// CopyFrom - implement operator= from a smallptrset that has the same pointer From resistor at mac.com Tue Jul 24 16:52:37 2007 From: resistor at mac.com (Owen Anderson) Date: Tue, 24 Jul 2007 21:52:37 -0000 Subject: [llvm-commits] [llvm] r40476 - in /llvm/trunk: include/llvm/Analysis/MemoryDependenceAnalysis.h lib/Analysis/MemoryDependenceAnalysis.cpp Message-ID: <200707242152.l6OLqbQ3020015@zion.cs.uiuc.edu> Author: resistor Date: Tue Jul 24 16:52:37 2007 New Revision: 40476 URL: http://llvm.org/viewvc/llvm-project?rev=40476&view=rev Log: Add initial support for non-local memory dependence analysis. NOTE: This has only been cursorily tested. Expected improvements soon. Modified: llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Modified: llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h?rev=40476&r1=40475&r2=40476&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h (original) +++ llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h Tue Jul 24 16:52:37 2007 @@ -20,6 +20,7 @@ #include "llvm/Pass.h" #include "llvm/Support/CallSite.h" #include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/SmallPtrSet.h" #include "llvm/Support/Compiler.h" #include @@ -37,6 +38,7 @@ Instruction* getCallSiteDependency(CallSite C, Instruction* start, bool local = true); + SmallPtrSet nonLocalHelper(Instruction* query, BasicBlock* block); public: static Instruction* NonLocal; @@ -63,7 +65,9 @@ /// getDependency - Return the instruction on which a memory operation /// depends, starting with start. Instruction* getDependency(Instruction* query, Instruction* start = 0, - bool local = true); + BasicBlock* block = 0); + + SmallPtrSet getNonLocalDependency(Instruction* query); /// removeInstruction - Remove an instruction from the dependence analysis, /// updating the dependence of instructions that previously depended on it. Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=40476&r1=40475&r2=40476&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Tue Jul 24 16:52:37 2007 @@ -19,6 +19,7 @@ #include "llvm/Instructions.h" #include "llvm/Function.h" #include "llvm/Analysis/AliasAnalysis.h" +#include "llvm/Support/CFG.h" #include "llvm/Target/TargetData.h" using namespace llvm; @@ -26,7 +27,7 @@ char MemoryDependenceAnalysis::ID = 0; Instruction* MemoryDependenceAnalysis::NonLocal = (Instruction*)0; -Instruction* MemoryDependenceAnalysis::None = (Instruction*)~0; +Instruction* MemoryDependenceAnalysis::None = (Instruction*)(~0 - 1); // Register this pass... static RegisterPass X("memdep", @@ -100,15 +101,60 @@ return NonLocal; } +SmallPtrSet MemoryDependenceAnalysis::nonLocalHelper(Instruction* query, + BasicBlock* block) { + SmallPtrSet ret; + + Instruction* localDep = getDependency(query, block->end(), block); + if (localDep != NonLocal) { + ret.insert(localDep); + return ret; + } + + for (pred_iterator PI = pred_begin(block), PE = pred_end(block); + PI != PE; ++PI) { + SmallPtrSet pred_deps = nonLocalHelper(query, *PI); + for (SmallPtrSet::iterator I = pred_deps.begin(), + E = pred_deps.end(); I != E; ++I) + ret.insert(*I); + } + + if (ret.empty()) + ret.insert(None); + + return ret; +} + +SmallPtrSet MemoryDependenceAnalysis::getNonLocalDependency(Instruction* query) { + SmallPtrSet ret; + + Instruction* localDep = getDependency(query); + if (localDep != NonLocal) { + ret.insert(localDep); + return ret; + } + + BasicBlock* parent = query->getParent(); + for (pred_iterator PI = pred_begin(parent), PE = pred_end(parent); + PI != PE; ++PI) { + SmallPtrSet pred_deps = nonLocalHelper(query, *PI); + for (SmallPtrSet::iterator I = pred_deps.begin(), + E = pred_deps.end(); I != E; ++I) + ret.insert(*I); + } + + if (ret.empty()) + ret.insert(None); + + return ret; +} + /// getDependency - Return the instruction on which a memory operation /// depends. The local paramter indicates if the query should only /// evaluate dependencies within the same basic block. Instruction* MemoryDependenceAnalysis::getDependency(Instruction* query, Instruction* start, - bool local) { - if (!local) - assert(0 && "Non-local memory dependence is not yet supported."); - + BasicBlock* block) { // Start looking for dependencies with the queried inst BasicBlock::iterator QI = query; @@ -154,7 +200,8 @@ else return None; - BasicBlock::iterator blockBegin = query->getParent()->begin(); + BasicBlock::iterator blockBegin = block ? block->begin() + : query->getParent()->begin(); while (QI != blockBegin) { --QI; From rspencer at reidspencer.com Tue Jul 24 16:55:40 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Tue, 24 Jul 2007 14:55:40 -0700 Subject: [llvm-commits] [llvm] r40474 - /llvm/trunk/lib/Support/SmallPtrSet.cpp In-Reply-To: <200707242131.l6OLVNrT019481@zion.cs.uiuc.edu> References: <200707242131.l6OLVNrT019481@zion.cs.uiuc.edu> Message-ID: <1185314140.3144.853.camel@bashful.x10sys.com> All, It would help me out a lot if you'd merge changes to lib/Support, lib/System, include/llvm/Support and include/llvm/System into the "support" module. I've been doing these as they come up but I might miss some. In the near future, the directories just mentioned will be moved out of the "llvm" module and into the "support" module. The only thing needing to be finished for this to happen is ensuring the makefile system in support can be used by llvm. In the mean time, please use the "svn merge" command to apply your changes to the support module as well. Thanks, Reid. On Tue, 2007-07-24 at 21:31 +0000, Owen Anderson wrote: > Author: resistor > Date: Tue Jul 24 16:31:23 2007 > New Revision: 40474 > > URL: http://llvm.org/viewvc/llvm-project?rev=40474&view=rev > Log: > Make the copy constructor of SmallPtrSet much faster. > > Modified: > llvm/trunk/lib/Support/SmallPtrSet.cpp > > Modified: llvm/trunk/lib/Support/SmallPtrSet.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SmallPtrSet.cpp?rev=40474&r1=40473&r2=40474&view=diff > > ============================================================================== > --- llvm/trunk/lib/Support/SmallPtrSet.cpp (original) > +++ llvm/trunk/lib/Support/SmallPtrSet.cpp Tue Jul 24 16:31:23 2007 > @@ -149,33 +149,23 @@ > } > > SmallPtrSetImpl::SmallPtrSetImpl(const SmallPtrSetImpl& that) { > - NumElements = that.NumElements; > - NumTombstones = 0; > + // If we're becoming small, prepare to insert into our stack space > if (that.isSmall()) { > - CurArraySize = that.CurArraySize; > CurArray = &SmallArray[0]; > - // Copy the entire contents of the array, including the -1's and the null > - // terminator. > - memcpy(CurArray, that.CurArray, sizeof(void*)*(CurArraySize+1)); > + // Otherwise, allocate new heap space (unless we were the same size) > } else { > - CurArraySize = that.NumElements < 64 ? 128 : that.CurArraySize*2; > - CurArray = (void**)malloc(sizeof(void*) * (CurArraySize+1)); > + CurArray = (void**)malloc(sizeof(void*) * (that.CurArraySize+1)); > assert(CurArray && "Failed to allocate memory?"); > - memset(CurArray, -1, CurArraySize*sizeof(void*)); > - > - // The end pointer, always valid, is set to a valid element to help the > - // iterator. > - CurArray[CurArraySize] = 0; > - > - // Copy over all valid entries. > - for (void **BucketPtr = that.CurArray, **E = that.CurArray+that.CurArraySize; > - BucketPtr != E; ++BucketPtr) { > - // Copy over the element if it is valid. > - void *Elt = *BucketPtr; > - if (Elt != getTombstoneMarker() && Elt != getEmptyMarker()) > - *const_cast(FindBucketFor(Elt)) = Elt; > - } > } > + > + // Copy over the new array size > + CurArraySize = that.CurArraySize; > + > + // Copy over the contents from the other set > + memcpy(CurArray, that.CurArray, sizeof(void*)*(CurArraySize+1)); > + > + NumElements = that.NumElements; > + NumTombstones = that.NumTombstones; > } > > /// CopyFrom - implement operator= from a smallptrset that has the same pointer > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From resistor at mac.com Tue Jul 24 17:45:36 2007 From: resistor at mac.com (Owen Anderson) Date: Tue, 24 Jul 2007 22:45:36 -0000 Subject: [llvm-commits] [support] r40477 - /support/trunk/lib/Support/SmallPtrSet.cpp Message-ID: <200707242245.l6OMjaN6021320@zion.cs.uiuc.edu> Author: resistor Date: Tue Jul 24 17:45:36 2007 New Revision: 40477 URL: http://llvm.org/viewvc/llvm-project?rev=40477&view=rev Log: Merge patch from mainline. Modified: support/trunk/lib/Support/SmallPtrSet.cpp Modified: support/trunk/lib/Support/SmallPtrSet.cpp URL: http://llvm.org/viewvc/llvm-project/support/trunk/lib/Support/SmallPtrSet.cpp?rev=40477&r1=40476&r2=40477&view=diff ============================================================================== --- support/trunk/lib/Support/SmallPtrSet.cpp (original) +++ support/trunk/lib/Support/SmallPtrSet.cpp Tue Jul 24 17:45:36 2007 @@ -149,33 +149,23 @@ } SmallPtrSetImpl::SmallPtrSetImpl(const SmallPtrSetImpl& that) { - NumElements = that.NumElements; - NumTombstones = 0; + // If we're becoming small, prepare to insert into our stack space if (that.isSmall()) { - CurArraySize = that.CurArraySize; CurArray = &SmallArray[0]; - // Copy the entire contents of the array, including the -1's and the null - // terminator. - memcpy(CurArray, that.CurArray, sizeof(void*)*(CurArraySize+1)); + // Otherwise, allocate new heap space (unless we were the same size) } else { - CurArraySize = that.NumElements < 64 ? 128 : that.CurArraySize*2; - CurArray = (void**)malloc(sizeof(void*) * (CurArraySize+1)); + CurArray = (void**)malloc(sizeof(void*) * (that.CurArraySize+1)); assert(CurArray && "Failed to allocate memory?"); - memset(CurArray, -1, CurArraySize*sizeof(void*)); - - // The end pointer, always valid, is set to a valid element to help the - // iterator. - CurArray[CurArraySize] = 0; - - // Copy over all valid entries. - for (void **BucketPtr = that.CurArray, **E = that.CurArray+that.CurArraySize; - BucketPtr != E; ++BucketPtr) { - // Copy over the element if it is valid. - void *Elt = *BucketPtr; - if (Elt != getTombstoneMarker() && Elt != getEmptyMarker()) - *const_cast(FindBucketFor(Elt)) = Elt; - } } + + // Copy over the new array size + CurArraySize = that.CurArraySize; + + // Copy over the contents from the other set + memcpy(CurArray, that.CurArray, sizeof(void*)*(CurArraySize+1)); + + NumElements = that.NumElements; + NumTombstones = that.NumTombstones; } /// CopyFrom - implement operator= from a smallptrset that has the same pointer From djg at cray.com Tue Jul 24 17:55:09 2007 From: djg at cray.com (Dan Gohman) Date: Tue, 24 Jul 2007 22:55:09 -0000 Subject: [llvm-commits] [llvm] r40478 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/v4f32-immediate.ll Message-ID: <200707242255.l6OMt9IM021500@zion.cs.uiuc.edu> Author: djg Date: Tue Jul 24 17:55:08 2007 New Revision: 40478 URL: http://llvm.org/viewvc/llvm-project?rev=40478&view=rev Log: Use movaps to load a v4f32 build_vector of all-constant values into a register instead of loading each element individually. Added: llvm/trunk/test/CodeGen/X86/v4f32-immediate.ll Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=40478&r1=40477&r2=40478&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Jul 24 17:55:08 2007 @@ -2495,6 +2495,7 @@ unsigned NumZero = 0; unsigned NumNonZero = 0; unsigned NonZeros = 0; + unsigned NumNonZeroImms = 0; std::set Values; for (unsigned i = 0; i < NumElems; ++i) { SDOperand Elt = Op.getOperand(i); @@ -2505,6 +2506,9 @@ else { NonZeros |= (1 << i); NumNonZero++; + if (Elt.getOpcode() == ISD::Constant || + Elt.getOpcode() == ISD::ConstantFP) + NumNonZeroImms++; } } } @@ -2548,6 +2552,11 @@ } } + // A vector full of immediates; various special cases are already + // handled, so this is best done with a single constant-pool load. + if (NumNonZero == NumNonZeroImms) + return SDOperand(); + // Let legalizer expand 2-wide build_vectors. if (EVTBits == 64) return SDOperand(); Added: llvm/trunk/test/CodeGen/X86/v4f32-immediate.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/v4f32-immediate.ll?rev=40478&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/v4f32-immediate.ll (added) +++ llvm/trunk/test/CodeGen/X86/v4f32-immediate.ll Tue Jul 24 17:55:08 2007 @@ -0,0 +1,5 @@ +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse | grep movaps + +define <4 x float> @foo() { + ret <4 x float> +} From djg at cray.com Tue Jul 24 17:58:00 2007 From: djg at cray.com (Dan Gohman) Date: Tue, 24 Jul 2007 22:58:00 -0000 Subject: [llvm-commits] [llvm] r40479 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Message-ID: <200707242258.l6OMw0B3021558@zion.cs.uiuc.edu> Author: djg Date: Tue Jul 24 17:58:00 2007 New Revision: 40479 URL: http://llvm.org/viewvc/llvm-project?rev=40479&view=rev Log: A minor simplication in the generated code. Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=40479&r1=40478&r2=40479&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Tue Jul 24 17:58:00 2007 @@ -2875,7 +2875,7 @@ std::string NodeName; if (!isRoot) { NodeName = "Tmp" + utostr(ResNo); - Code2 = "SDOperand " + NodeName + " = SDOperand("; + Code2 = "SDOperand " + NodeName + "("; } else { NodeName = "ResNode"; if (!ResNodeDecled) { @@ -2991,7 +2991,7 @@ bool NeedReplace = false; if (NodeHasOutFlag) { if (!InFlagDecled) { - emitCode("SDOperand InFlag = SDOperand(ResNode, " + + emitCode("SDOperand InFlag(ResNode, " + utostr(NumResults + (unsigned)NodeHasChain) + ");"); InFlagDecled = true; } else From djg at cray.com Tue Jul 24 18:00:27 2007 From: djg at cray.com (Dan Gohman) Date: Tue, 24 Jul 2007 23:00:27 -0000 Subject: [llvm-commits] [llvm] r40480 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGISel.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200707242300.l6ON0Rn8021620@zion.cs.uiuc.edu> Author: djg Date: Tue Jul 24 18:00:27 2007 New Revision: 40480 URL: http://llvm.org/viewvc/llvm-project?rev=40480&view=rev Log: Add const to CanBeFoldedBy, CheckAndMask, and CheckOrMask. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=40480&r1=40479&r2=40480&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Tue Jul 24 18:00:27 2007 @@ -74,7 +74,9 @@ /// CanBeFoldedBy - Returns true if the specific operand node N of U can be /// folded during instruction selection that starts at Root? - virtual bool CanBeFoldedBy(SDNode *N, SDNode *U, SDNode *Root) { return true;} + virtual bool CanBeFoldedBy(SDNode *N, SDNode *U, SDNode *Root) const { + return true; + } /// CreateTargetHazardRecognizer - Return a newly allocated hazard recognizer /// to use for this target when scheduling the DAG. @@ -164,8 +166,10 @@ SelectionDAG &DAG); // Calls to these predicates are generated by tblgen. - bool CheckAndMask(SDOperand LHS, ConstantSDNode *RHS, int64_t DesiredMaskS); - bool CheckOrMask(SDOperand LHS, ConstantSDNode *RHS, int64_t DesiredMaskS); + bool CheckAndMask(SDOperand LHS, ConstantSDNode *RHS, + int64_t DesiredMaskS) const; + bool CheckOrMask(SDOperand LHS, ConstantSDNode *RHS, + int64_t DesiredMaskS) const; private: void SelectBasicBlock(BasicBlock *BB, MachineFunction &MF, Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=40480&r1=40479&r2=40480&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Jul 24 18:00:27 2007 @@ -4799,7 +4799,7 @@ /// actual value in the DAG on the RHS of an AND, and DesiredMaskS is the value /// specified in the .td file (e.g. 255). bool SelectionDAGISel::CheckAndMask(SDOperand LHS, ConstantSDNode *RHS, - int64_t DesiredMaskS) { + int64_t DesiredMaskS) const { uint64_t ActualMask = RHS->getValue(); uint64_t DesiredMask =DesiredMaskS & MVT::getIntVTBitMask(LHS.getValueType()); @@ -4828,7 +4828,7 @@ /// actual value in the DAG on the RHS of an OR, and DesiredMaskS is the value /// specified in the .td file (e.g. 255). bool SelectionDAGISel::CheckOrMask(SDOperand LHS, ConstantSDNode *RHS, - int64_t DesiredMaskS) { + int64_t DesiredMaskS) const { uint64_t ActualMask = RHS->getValue(); uint64_t DesiredMask =DesiredMaskS & MVT::getIntVTBitMask(LHS.getValueType()); Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=40480&r1=40479&r2=40480&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Tue Jul 24 18:00:27 2007 @@ -132,7 +132,7 @@ virtual void EmitFunctionEntryCode(Function &Fn, MachineFunction &MF); - virtual bool CanBeFoldedBy(SDNode *N, SDNode *U, SDNode *Root); + virtual bool CanBeFoldedBy(SDNode *N, SDNode *U, SDNode *Root) const; // Include the pieces autogenerated from the target description. #include "X86GenDAGISel.inc" @@ -272,7 +272,7 @@ } -bool X86DAGToDAGISel::CanBeFoldedBy(SDNode *N, SDNode *U, SDNode *Root) { +bool X86DAGToDAGISel::CanBeFoldedBy(SDNode *N, SDNode *U, SDNode *Root) const { if (FastISel) return false; // If U use can somehow reach N through another path then U can't fold N or From asl at math.spbu.ru Tue Jul 24 19:06:28 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Wed, 25 Jul 2007 00:06:28 -0000 Subject: [llvm-commits] [llvm] r40481 - in /llvm/trunk/lib: CodeGen/DwarfWriter.cpp Target/X86/X86TargetAsmInfo.cpp Message-ID: <200707250006.l6P06S1l022971@zion.cs.uiuc.edu> Author: asl Date: Tue Jul 24 19:06:28 2007 New Revision: 40481 URL: http://llvm.org/viewvc/llvm-project?rev=40481&view=rev Log: Minor cleanup: - Split EH and debug infiormation - Make DwarfWriter more verbose in some cases Modified: llvm/trunk/lib/CodeGen/DwarfWriter.cpp llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp Modified: llvm/trunk/lib/CodeGen/DwarfWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DwarfWriter.cpp?rev=40481&r1=40480&r2=40481&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/DwarfWriter.cpp (original) +++ llvm/trunk/lib/CodeGen/DwarfWriter.cpp Tue Jul 24 19:06:28 2007 @@ -1041,7 +1041,7 @@ Asm->EOL("Offset"); } else if (Reg < 64) { Asm->EmitInt8(DW_CFA_offset + Reg); - Asm->EOL("DW_CFA_offset + Reg"); + Asm->EOL("DW_CFA_offset + Reg (" + utostr(Reg) + ")"); Asm->EmitULEB128Bytes(Offset); Asm->EOL("Offset"); } else { Modified: llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp?rev=40481&r1=40480&r2=40481&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp Tue Jul 24 19:06:28 2007 @@ -110,8 +110,9 @@ // Set up DWARF directives HasLEB128 = true; // Target asm supports leb128 directives (little-endian) + + // Debug Information AbsoluteDebugSectionOffsets = true; - AbsoluteEHSectionOffsets = false; SupportsDebugInformation = true; DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\", at progbits"; DwarfInfoSection = "\t.section\t.debug_info,\"\", at progbits"; @@ -125,8 +126,10 @@ DwarfRangesSection = "\t.section\t.debug_ranges,\"\", at progbits"; DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\", at progbits"; + // Exceptions handling if (!Subtarget->is64Bit()) SupportsExceptionHandling = true; + AbsoluteEHSectionOffsets = false; DwarfEHFrameSection = "\t.section\t.eh_frame,\"aw\", at progbits"; DwarfExceptionSection = "\t.section\t.gcc_except_table,\"a\", at progbits"; break; From nicholas at mxc.ca Tue Jul 24 22:48:46 2007 From: nicholas at mxc.ca (Nick Lewycky) Date: Wed, 25 Jul 2007 03:48:46 -0000 Subject: [llvm-commits] [llvm] r40483 - in /llvm/trunk/lib/Target/PowerPC: PPCAsmPrinter.cpp PPCTargetAsmInfo.cpp Message-ID: <200707250348.l6P3mk6P029341@zion.cs.uiuc.edu> Author: nicholas Date: Tue Jul 24 22:48:45 2007 New Revision: 40483 URL: http://llvm.org/viewvc/llvm-project?rev=40483&view=rev Log: Fix debug info and globals filled with zeros. Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=40483&r1=40482&r2=40483&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Tue Jul 24 22:48:45 2007 @@ -668,8 +668,8 @@ if (I->hasExternalLinkage()) { O << "\t.global " << name << '\n'; O << "\t.type " << name << ", @object\n"; - //O << "\t.zerofill __DATA, __common, " << name << ", " - // << Size << ", " << Align; + O << name << ":\n"; + O << "\t.zero " << Size << "\n"; } else if (I->hasInternalLinkage()) { SwitchToDataSection("\t.data", I); O << TAI->getLCOMMDirective() << name << "," << Size; Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp?rev=40483&r1=40482&r2=40483&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCTargetAsmInfo.cpp Tue Jul 24 22:48:45 2007 @@ -30,17 +30,6 @@ NeedsSet = true; AddressSize = isPPC64 ? 8 : 4; - DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug"; - DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug"; - DwarfLineSection = ".section __DWARF,__debug_line,regular,debug"; - DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug"; - DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug"; - DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug"; - DwarfStrSection = ".section __DWARF,__debug_str,regular,debug"; - DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug"; - DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug"; - DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug"; - DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug"; DwarfEHFrameSection = ".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support"; DwarfExceptionSection = ".section __DATA,__gcc_except_tab"; @@ -71,6 +60,18 @@ WeakRefDirective = "\t.weak_reference\t"; HiddenDirective = "\t.private_extern\t"; SupportsExceptionHandling = true; + + DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug"; + DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug"; + DwarfLineSection = ".section __DWARF,__debug_line,regular,debug"; + DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug"; + DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug"; + DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug"; + DwarfStrSection = ".section __DWARF,__debug_str,regular,debug"; + DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug"; + DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug"; + DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug"; + DwarfMacInfoSection = ".section __DWARF,__debug_macinfo,regular,debug"; // In non-PIC modes, emit a special label before jump tables so that the // linker can perform more accurate dead code stripping. @@ -93,4 +94,16 @@ StaticDtorsSection = ".section\t.dtors,\"aw\", at progbits"; UsedDirective = "\t# .no_dead_strip\t"; WeakRefDirective = "\t.weak\t"; + + DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\", at progbits"; + DwarfInfoSection = "\t.section\t.debug_info,\"\", at progbits"; + DwarfLineSection = "\t.section\t.debug_line,\"\", at progbits"; + DwarfFrameSection = "\t.section\t.debug_frame,\"\", at progbits"; + DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"\", at progbits"; + DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"\", at progbits"; + DwarfStrSection = "\t.section\t.debug_str,\"\", at progbits"; + DwarfLocSection = "\t.section\t.debug_loc,\"\", at progbits"; + DwarfARangesSection = "\t.section\t.debug_aranges,\"\", at progbits"; + DwarfRangesSection = "\t.section\t.debug_ranges,\"\", at progbits"; + DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\", at progbits"; } From sabre at nondot.org Wed Jul 25 01:15:23 2007 From: sabre at nondot.org (Chris Lattner) Date: Wed, 25 Jul 2007 06:15:23 -0000 Subject: [llvm-commits] [llvm] r40484 - /llvm/trunk/docs/HowToReleaseLLVM.html Message-ID: <200707250615.l6P6FNcZ009687@zion.cs.uiuc.edu> Author: lattner Date: Wed Jul 25 01:15:23 2007 New Revision: 40484 URL: http://llvm.org/viewvc/llvm-project?rev=40484&view=rev Log: test commit Modified: llvm/trunk/docs/HowToReleaseLLVM.html Modified: llvm/trunk/docs/HowToReleaseLLVM.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/HowToReleaseLLVM.html?rev=40484&r1=40483&r2=40484&view=diff ============================================================================== --- llvm/trunk/docs/HowToReleaseLLVM.html (original) +++ llvm/trunk/docs/HowToReleaseLLVM.html Wed Jul 25 01:15:23 2007 @@ -438,7 +438,7 @@ that has the name of the release (LLVM-M.m in our current case). This is the directory that will get tar'd. It contains all the software that needs to be in the distribution. During the copying - process, it omits generated files, CVS directories, and any other + process, it omits generated files, SVN directories, and any other "cruft" that's in your build tree. This is done to eliminate the possibility of huge distribution tarballs that include useless or irrelevant stuff in them. This is the trickiest part of making the From nicholas at mxc.ca Wed Jul 25 07:12:02 2007 From: nicholas at mxc.ca (Nick Lewycky) Date: Wed, 25 Jul 2007 08:12:02 -0400 Subject: [llvm-commits] ScalarEvolution fix for treeadd In-Reply-To: <20070723185356.GP5470@village.us.cray.com> References: <20070723185356.GP5470@village.us.cray.com> Message-ID: <46A73E12.2070205@mxc.ca> Dan Gohman wrote: >>>Would it be too intrusive to ask ScalarEvolution to use a >>>PostDominanceFrontier for this? >> >>No, that's what I implemented at first. Unfortunately, it doesn't cover >>all the possible cases (specifically, it broke 2007-01-06-TripCount.ll). >> >>In 2007-01-06-TripCount.ll there's two "loops" sharing one loop header. >>The first runs from header -> exit -> A -> header and the other is >>header -> B -> A -> header. I was testing exit postdom header, which it >>does, but that didn't catch this case where the transform is still >>unsafe. >> >>If you think I merely had my test wrong, please let me know what you >>think it ought to be and I'll implement it and see. > > I do think you merely had the wrong test. The post-dominance frontiers > are needed here. > > Running -analyze -postdomfrontier on 2007-01-06-TripCount.ll gives this: > > Printing analysis 'Post-Dominance Frontier Construction' for function 'test': > DomFrontier for BB %bb is: %bb2 %cond_next > DomFrontier for BB %bb2 is: %bb2 %cond_next > DomFrontier for BB %cond_true is: %bb2 > DomFrontier for BB %cond_next is: %cond_next > DomFrontier for BB %bb6 is: > DomFrontier for BB %return is: > DomFrontier for BB %entry is: > > It looks like %bb2 is the loop header, and %cond_next is the block that > contains the exit branch. The frontier sets for these two blocks are > different, so they're not control-equivalent, and that disqualifies the > loop for what ScalarEvolution is doing here. Cool! I've implemented that (patch attached) and it works for both treeadd and TripCount. Here's the numbers: Original: predicted: 4874 (21%) not predicted: 18361 (79%) PDF test only: predicted: 4865 (21%) not predicted: 18372 (79%) There was one other consequence of that change. PDF entries only exist for nodes that postdominate the exit. One could have a countable loop that preceeds an infinite loop, and it would no longer be analyzed. I was going to just have it refuse to analyze that case, but it occured to me that event loops and such work this way, and it could cause a real problem for real code. So I thought I'd try keeping it. Both tests: predicted: 4881 (21%) not predicted: 18354 (79%) I'm not sure why, but it doesn't seem as promising as the previous test I had. Could it be that when comparing the PDF I should ignore blocks that are not part of the loop? Nick -------------- next part -------------- A non-text attachment was scrubbed... Name: scev.patch Type: text/x-diff Size: 3812 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070725/0c70dfff/attachment.bin From alenhar2 at cs.uiuc.edu Wed Jul 25 08:08:36 2007 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Wed, 25 Jul 2007 13:08:36 -0000 Subject: [llvm-commits] [poolalloc] r40485 - /poolalloc/branches/SVA/lib/DSA/LeafRepl.cpp Message-ID: <200707251308.l6PD8aob022704@zion.cs.uiuc.edu> Author: alenhar2 Date: Wed Jul 25 08:08:35 2007 New Revision: 40485 URL: http://llvm.org/viewvc/llvm-project?rev=40485&view=rev Log: a cloner to improve context sensitivity in TD results. It also happens to make the kernel smaller Added: poolalloc/branches/SVA/lib/DSA/LeafRepl.cpp Added: poolalloc/branches/SVA/lib/DSA/LeafRepl.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/branches/SVA/lib/DSA/LeafRepl.cpp?rev=40485&view=auto ============================================================================== --- poolalloc/branches/SVA/lib/DSA/LeafRepl.cpp (added) +++ poolalloc/branches/SVA/lib/DSA/LeafRepl.cpp Wed Jul 25 08:08:35 2007 @@ -0,0 +1,181 @@ +#include "llvm/Pass.h" +#include "llvm/Module.h" +#include "llvm/Function.h" +#include "llvm/Instructions.h" +#include "llvm/DerivedTypes.h" +#include "llvm/Transforms/Utils/Cloning.h" +#include "llvm/ADT/Statistic.h" + +#include +#include +#include +using namespace llvm; + +namespace { + + Statistic<> FuncAdded("CSCloner", "Number of functions added"); + Statistic<> IndDirSplit("CSCloner", "Number of direct and indirect splits"); + Statistic<> LeafClone("CSCloner", "Number of leaves cloned"); + Statistic<> ShallowClone("CSCloner", "Number of shallow functions cloned"); + + class CSCloner : public ModulePass { + + bool isLeaf(Function* F) { + for (Function::iterator FI = F->begin(), FE = F->end(); + FI != FE; ++FI) + for (BasicBlock::iterator BI = FI->begin(), BE = FI->end(); + BI != BE; ++BI) + if(isa(BI) || isa(BI)) + return false; + return true; + } + + bool isLevelOne(Function* F) { + for (Function::iterator FI = F->begin(), FE = F->end(); + FI != FE; ++FI) + for (BasicBlock::iterator BI = FI->begin(), BE = FI->end(); + BI != BE; ++BI) { + if(LoadInst* LI = dyn_cast(BI)) + if (isa(LI->getType())) + return false; + if(StoreInst* SI = dyn_cast(BI)) + if (isa(SI->getOperand(0)->getType())) + return false; + } + return true; + } + + bool isLevelTwo(Function* F) { + for (Function::iterator FI = F->begin(), FE = F->end(); + FI != FE; ++FI) + for (BasicBlock::iterator BI = FI->begin(), BE = FI->end(); + BI != BE; ++BI) { + if(LoadInst* LI = dyn_cast(BI)) + if (isa(LI->getType())) + for (Value::use_iterator ii = LI->use_begin(), ee = LI->use_end(); + ii != ee; ++ii) + if (isa(ii)) + return false; + } + return true; + } + + Function* clone(Function* F) { + Function* FNew = CloneFunction(F); + FNew->setLinkage(Function::InternalLinkage); + ++FuncAdded; + F->getParent()->getFunctionList().push_back(FNew); + return FNew; + } + + public: + bool runOnModuleI(Module& M) { + + bool changed = false; + + //first figure out how functions are used + std::set DirectCalls; + std::set Unknowns; + std::set TakesPointers; + std::set Leaf; + std::set Shallow; + std::vector IgnoreList; + IgnoreList.push_back("kmalloc"); + IgnoreList.push_back("__vmalloc"); + IgnoreList.push_back("kmem_cache_alloc"); + IgnoreList.push_back("__alloc_bootmem"); + IgnoreList.push_back(" __get_free_pages"); + IgnoreList.push_back("kfree"); + IgnoreList.push_back("vfree"); + IgnoreList.push_back("free_pages"); + + for (Module::iterator MI = M.begin(), ME = M.end(); + MI != ME; ++MI) + if (!MI->isExternal() && + std::find(IgnoreList.begin(), IgnoreList.end(), MI->getName()) == IgnoreList.end()) { + if (isLeaf(MI)) + Leaf.insert(MI); + if (isLevelOne(MI) || isLevelTwo(MI)) + Shallow.insert(MI); + for (Value::use_iterator ii = MI->use_begin(), ee = MI->use_end(); + ii != ee; ++ii) { + CallInst* CI = dyn_cast(*ii); + if (CI && CI->getCalledFunction() == MI) + DirectCalls.insert(MI); + else + Unknowns.insert(MI); + const FunctionType* FT = MI->getFunctionType(); + if (FT->isVarArg() || isa(FT->getReturnType())) + TakesPointers.insert(MI); + else + for (FunctionType::param_iterator pi = FT->param_begin(), pe = FT->param_end(); + pi != pe; ++pi) + if (isa(pi->get())) + TakesPointers.insert(MI); + } + } + + //now think about replicating some functions + for (Module::iterator MI = M.begin(), ME = M.end(); + MI != ME; ++MI) { + if(TakesPointers.find(MI) != TakesPointers.end()) { + + //if something is used for both direct calls and indirect calls, + //clone a function for the indirect calls + if (DirectCalls.find(MI) != DirectCalls.end() && + Unknowns.find(MI) != Unknowns.end()) { + Function* FNew = clone(MI); + ++IndDirSplit; + changed = true; + for (Value::use_iterator ii = MI->use_begin(), ee = MI->use_end(); + ii != ee; ++ii) { + CallInst* CI = dyn_cast(*ii); + if (CI && CI->getCalledFunction() == MI) + CI->setOperand(0, FNew); + } + } + + //if it is a leaf, clone it + if (Leaf.find(MI) != Leaf.end() && !MI->hasOneUse() && !MI->use_empty()) { + for (Value::use_iterator ii = MI->use_begin(), ee = MI->use_end(); + ii != ee; ++ii) { + CallInst* CI = dyn_cast(*ii); + if (CI && CI->getCalledFunction() == MI) { + Function* FNew = clone(MI); + ++LeafClone; + changed = true; + CI->setOperand(0, FNew); + } + } + } + + //if it has only level 1 loads (aka no loads of pointers), clone it + if (Shallow.find(MI) != Shallow.end() && !MI->hasOneUse() && !MI->use_empty()) { + for (Value::use_iterator ii = MI->use_begin(), ee = MI->use_end(); + ii != ee; ++ii) { + CallInst* CI = dyn_cast(*ii); + if (CI && CI->getCalledFunction() == MI) { + Function* FNew = clone(MI); + ++ShallowClone; + changed = true; + CI->setOperand(0, FNew); + } + } + } + + } + } + return changed; + } + + virtual bool runOnModule(Module& M) { + // int x = 4; + // while (runOnModuleI(M) && --x) {} + // return true; + return runOnModuleI(M); + } + }; + + RegisterPass X("csclone", "Cloning for Context Sensitivity"); + +} From dpatel at apple.com Wed Jul 25 13:00:26 2007 From: dpatel at apple.com (Devang Patel) Date: Wed, 25 Jul 2007 18:00:26 -0000 Subject: [llvm-commits] [llvm] r40486 - in /llvm/trunk: include/llvm/Transforms/Utils/BasicInliner.h include/llvm/Transforms/Utils/InlineCost.h lib/Transforms/IPO/InlineSimple.cpp lib/Transforms/Utils/BasicInliner.cpp lib/Transforms/Utils/InlineCost.cpp Message-ID: <200707251800.l6PI0Qd8031101@zion.cs.uiuc.edu> Author: dpatel Date: Wed Jul 25 13:00:25 2007 New Revision: 40486 URL: http://llvm.org/viewvc/llvm-project?rev=40486&view=rev Log: Add BasicInliner interface. This interface allows clients to inline bunch of functions with module level call graph information.:wq Added: llvm/trunk/include/llvm/Transforms/Utils/BasicInliner.h llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp llvm/trunk/lib/Transforms/Utils/InlineCost.cpp Modified: llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp Added: llvm/trunk/include/llvm/Transforms/Utils/BasicInliner.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/BasicInliner.h?rev=40486&view=auto ============================================================================== --- llvm/trunk/include/llvm/Transforms/Utils/BasicInliner.h (added) +++ llvm/trunk/include/llvm/Transforms/Utils/BasicInliner.h Wed Jul 25 13:00:25 2007 @@ -0,0 +1,55 @@ +//===- BasicInliner.h - Basic function level inliner ------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by Devang Patel and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines a simple function based inliner that does not use +// call graph information. +// +//===----------------------------------------------------------------------===// + +#ifndef BASICINLINER_H +#define BASICINLINER_H + +#include "llvm/Transforms/Utils/InlineCost.h" + +namespace llvm { + + class Function; + class TargetData; + class BasicInlinerImpl; + + /// BasicInliner - BasicInliner provides function level inlining interface. + /// Clients provide list of functions which are inline without using + /// module level call graph information. Note that the BasicInliner is + /// free to delete a function if it is inlined into all call sites. + class BasicInliner { + public: + + BasicInliner(TargetData *T = NULL); + ~BasicInliner(); + + /// addFunction - Add function into the list of functions to process. + /// All functions must be inserted using this interface before invoking + /// inlineFunctions(). + void addFunction(Function *F); + + /// neverInlineFunction - Sometimes a function is never to be inlined + /// because of one or other reason. + void neverInlineFunction(Function *F); + + /// inlineFuctions - Walk all call sites in all functions supplied by + /// client. Inline as many call sites as possible. Delete completely + /// inlined functions. + void inlineFunctions(); + + private: + BasicInlinerImpl *Impl; + }; +} + +#endif Added: llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h?rev=40486&view=auto ============================================================================== --- llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h (added) +++ llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h Wed Jul 25 13:00:25 2007 @@ -0,0 +1,80 @@ +//===- InlineCost.cpp - Cost analysis for inliner ---------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by the LLVM research group and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements bottom-up inlining of functions into callees. +// +//===----------------------------------------------------------------------===// + +#ifndef INLINECOST_H +#define INLINECOST_H + +#include +#include +#include + +namespace llvm { + + class Value; + class Function; + class CallSite; + + /// InlineCostAnalyzer - Cost analyzer used by inliner. + class InlineCostAnalyzer { + struct ArgInfo { + public: + unsigned ConstantWeight; + unsigned AllocaWeight; + + ArgInfo(unsigned CWeight, unsigned AWeight) + : ConstantWeight(CWeight), AllocaWeight(AWeight) {} + }; + + // FunctionInfo - For each function, calculate the size of it in blocks and + // instructions. + struct FunctionInfo { + // NumInsts, NumBlocks - Keep track of how large each function is, which is + // used to estimate the code size cost of inlining it. + unsigned NumInsts, NumBlocks; + + // ArgumentWeights - Each formal argument of the function is inspected to + // see if it is used in any contexts where making it a constant or alloca + // would reduce the code size. If so, we add some value to the argument + // entry here. + std::vector ArgumentWeights; + + FunctionInfo() : NumInsts(0), NumBlocks(0) {} + + /// analyzeFunction - Fill in the current structure with information gleaned + /// from the specified function. + void analyzeFunction(Function *F); + + // CountCodeReductionForConstant - Figure out an approximation for how many + // instructions will be constant folded if the specified value is constant. + // + unsigned CountCodeReductionForConstant(Value *V); + + // CountCodeReductionForAlloca - Figure out an approximation of how much smaller + // the function will be if it is inlined into a context where an argument + // becomes an alloca. + // + unsigned CountCodeReductionForAlloca(Value *V); + }; + + std::mapCachedFunctionInfo; + + public: + + // getInlineCost - The heuristic used to determine if we should inline the + // function call or not. + // + int getInlineCost(CallSite CS, std::set &NeverInline); + }; +} + +#endif Modified: llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp?rev=40486&r1=40485&r2=40486&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp Wed Jul 25 13:00:25 2007 @@ -22,46 +22,22 @@ #include "llvm/Support/Compiler.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/IPO/InlinerPass.h" +#include "llvm/Transforms/Utils/InlineCost.h" #include using namespace llvm; namespace { - struct VISIBILITY_HIDDEN ArgInfo { - unsigned ConstantWeight; - unsigned AllocaWeight; - - ArgInfo(unsigned CWeight, unsigned AWeight) - : ConstantWeight(CWeight), AllocaWeight(AWeight) {} - }; - - // FunctionInfo - For each function, calculate the size of it in blocks and - // instructions. - struct VISIBILITY_HIDDEN FunctionInfo { - // NumInsts, NumBlocks - Keep track of how large each function is, which is - // used to estimate the code size cost of inlining it. - unsigned NumInsts, NumBlocks; - - // ArgumentWeights - Each formal argument of the function is inspected to - // see if it is used in any contexts where making it a constant or alloca - // would reduce the code size. If so, we add some value to the argument - // entry here. - std::vector ArgumentWeights; - - FunctionInfo() : NumInsts(0), NumBlocks(0) {} - - /// analyzeFunction - Fill in the current structure with information gleaned - /// from the specified function. - void analyzeFunction(Function *F); - }; class VISIBILITY_HIDDEN SimpleInliner : public Inliner { - std::map CachedFunctionInfo; std::set NeverInline; // Functions that are never inlined + InlineCostAnalyzer CA; public: SimpleInliner() : Inliner(&ID) {} static char ID; // Pass identification, replacement for typeid - int getInlineCost(CallSite CS); + int getInlineCost(CallSite CS) { + return CA.getInlineCost(CS, NeverInline); + } virtual bool doInitialization(CallGraph &CG); }; char SimpleInliner::ID = 0; @@ -70,223 +46,6 @@ Pass *llvm::createFunctionInliningPass() { return new SimpleInliner(); } -// CountCodeReductionForConstant - Figure out an approximation for how many -// instructions will be constant folded if the specified value is constant. -// -static unsigned CountCodeReductionForConstant(Value *V) { - unsigned Reduction = 0; - for (Value::use_iterator UI = V->use_begin(), E = V->use_end(); UI != E; ++UI) - if (isa(*UI)) - Reduction += 40; // Eliminating a conditional branch is a big win - else if (SwitchInst *SI = dyn_cast(*UI)) - // Eliminating a switch is a big win, proportional to the number of edges - // deleted. - Reduction += (SI->getNumSuccessors()-1) * 40; - else if (CallInst *CI = dyn_cast(*UI)) { - // Turning an indirect call into a direct call is a BIG win - Reduction += CI->getCalledValue() == V ? 500 : 0; - } else if (InvokeInst *II = dyn_cast(*UI)) { - // Turning an indirect call into a direct call is a BIG win - Reduction += II->getCalledValue() == V ? 500 : 0; - } else { - // Figure out if this instruction will be removed due to simple constant - // propagation. - Instruction &Inst = cast(**UI); - bool AllOperandsConstant = true; - for (unsigned i = 0, e = Inst.getNumOperands(); i != e; ++i) - if (!isa(Inst.getOperand(i)) && Inst.getOperand(i) != V) { - AllOperandsConstant = false; - break; - } - - if (AllOperandsConstant) { - // We will get to remove this instruction... - Reduction += 7; - - // And any other instructions that use it which become constants - // themselves. - Reduction += CountCodeReductionForConstant(&Inst); - } - } - - return Reduction; -} - -// CountCodeReductionForAlloca - Figure out an approximation of how much smaller -// the function will be if it is inlined into a context where an argument -// becomes an alloca. -// -static unsigned CountCodeReductionForAlloca(Value *V) { - if (!isa(V->getType())) return 0; // Not a pointer - unsigned Reduction = 0; - for (Value::use_iterator UI = V->use_begin(), E = V->use_end(); UI != E;++UI){ - Instruction *I = cast(*UI); - if (isa(I) || isa(I)) - Reduction += 10; - else if (GetElementPtrInst *GEP = dyn_cast(I)) { - // If the GEP has variable indices, we won't be able to do much with it. - for (Instruction::op_iterator I = GEP->op_begin()+1, E = GEP->op_end(); - I != E; ++I) - if (!isa(*I)) return 0; - Reduction += CountCodeReductionForAlloca(GEP)+15; - } else { - // If there is some other strange instruction, we're not going to be able - // to do much if we inline this. - return 0; - } - } - - return Reduction; -} - -/// analyzeFunction - Fill in the current structure with information gleaned -/// from the specified function. -void FunctionInfo::analyzeFunction(Function *F) { - unsigned NumInsts = 0, NumBlocks = 0; - - // Look at the size of the callee. Each basic block counts as 20 units, and - // each instruction counts as 10. - for (Function::const_iterator BB = F->begin(), E = F->end(); BB != E; ++BB) { - for (BasicBlock::const_iterator II = BB->begin(), E = BB->end(); - II != E; ++II) { - if (isa(II)) continue; // Debug intrinsics don't count. - - // Noop casts, including ptr <-> int, don't count. - if (const CastInst *CI = dyn_cast(II)) { - if (CI->isLosslessCast() || isa(CI) || - isa(CI)) - continue; - } else if (const GetElementPtrInst *GEPI = - dyn_cast(II)) { - // If a GEP has all constant indices, it will probably be folded with - // a load/store. - bool AllConstant = true; - for (unsigned i = 1, e = GEPI->getNumOperands(); i != e; ++i) - if (!isa(GEPI->getOperand(i))) { - AllConstant = false; - break; - } - if (AllConstant) continue; - } - - ++NumInsts; - } - - ++NumBlocks; - } - - this->NumBlocks = NumBlocks; - this->NumInsts = NumInsts; - - // Check out all of the arguments to the function, figuring out how much - // code can be eliminated if one of the arguments is a constant. - for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I) - ArgumentWeights.push_back(ArgInfo(CountCodeReductionForConstant(I), - CountCodeReductionForAlloca(I))); -} - - -// getInlineCost - The heuristic used to determine if we should inline the -// function call or not. -// -int SimpleInliner::getInlineCost(CallSite CS) { - Instruction *TheCall = CS.getInstruction(); - Function *Callee = CS.getCalledFunction(); - const Function *Caller = TheCall->getParent()->getParent(); - - // Don't inline a directly recursive call. - if (Caller == Callee || - // Don't inline functions which can be redefined at link-time to mean - // something else. link-once linkage is ok though. - Callee->hasWeakLinkage() || - - // Don't inline functions marked noinline. - NeverInline.count(Callee)) - return 2000000000; - - // InlineCost - This value measures how good of an inline candidate this call - // site is to inline. A lower inline cost make is more likely for the call to - // be inlined. This value may go negative. - // - int InlineCost = 0; - - // If there is only one call of the function, and it has internal linkage, - // make it almost guaranteed to be inlined. - // - if (Callee->hasInternalLinkage() && Callee->hasOneUse()) - InlineCost -= 30000; - - // If this function uses the coldcc calling convention, prefer not to inline - // it. - if (Callee->getCallingConv() == CallingConv::Cold) - InlineCost += 2000; - - // If the instruction after the call, or if the normal destination of the - // invoke is an unreachable instruction, the function is noreturn. As such, - // there is little point in inlining this. - if (InvokeInst *II = dyn_cast(TheCall)) { - if (isa(II->getNormalDest()->begin())) - InlineCost += 10000; - } else if (isa(++BasicBlock::iterator(TheCall))) - InlineCost += 10000; - - // Get information about the callee... - FunctionInfo &CalleeFI = CachedFunctionInfo[Callee]; - - // If we haven't calculated this information yet, do so now. - if (CalleeFI.NumBlocks == 0) - CalleeFI.analyzeFunction(Callee); - - // Add to the inline quality for properties that make the call valuable to - // inline. This includes factors that indicate that the result of inlining - // the function will be optimizable. Currently this just looks at arguments - // passed into the function. - // - unsigned ArgNo = 0; - for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end(); - I != E; ++I, ++ArgNo) { - // Each argument passed in has a cost at both the caller and the callee - // sides. This favors functions that take many arguments over functions - // that take few arguments. - InlineCost -= 20; - - // If this is a function being passed in, it is very likely that we will be - // able to turn an indirect function call into a direct function call. - if (isa(I)) - InlineCost -= 100; - - // If an alloca is passed in, inlining this function is likely to allow - // significant future optimization possibilities (like scalar promotion, and - // scalarization), so encourage the inlining of the function. - // - else if (isa(I)) { - if (ArgNo < CalleeFI.ArgumentWeights.size()) - InlineCost -= CalleeFI.ArgumentWeights[ArgNo].AllocaWeight; - - // If this is a constant being passed into the function, use the argument - // weights calculated for the callee to determine how much will be folded - // away with this information. - } else if (isa(I)) { - if (ArgNo < CalleeFI.ArgumentWeights.size()) - InlineCost -= CalleeFI.ArgumentWeights[ArgNo].ConstantWeight; - } - } - - // Now that we have considered all of the factors that make the call site more - // likely to be inlined, look at factors that make us not want to inline it. - - // Don't inline into something too big, which would make it bigger. Here, we - // count each basic block as a single unit. - // - InlineCost += Caller->size()/20; - - - // Look at the size of the callee. Each basic block counts as 20 units, and - // each instruction counts as 5. - InlineCost += CalleeFI.NumInsts*5 + CalleeFI.NumBlocks*20; - return InlineCost; -} - // doInitialization - Initializes the vector of functions that have been // annotated with the noinline attribute. bool SimpleInliner::doInitialization(CallGraph &CG) { @@ -321,3 +80,4 @@ return false; } + Added: llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp?rev=40486&view=auto ============================================================================== --- llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp (added) +++ llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp Wed Jul 25 13:00:25 2007 @@ -0,0 +1,171 @@ +//===- BasicInliner.cpp - Basic function level inliner --------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by Devang Patel and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines a simple function based inliner that does not use +// call graph information. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "basicinliner" + +#include "llvm/Module.h" +#include "llvm/Function.h" +#include "llvm/Transforms/Utils/BasicInliner.h" +#include "llvm/Transforms/Utils/Cloning.h" +#include "llvm/Support/CallSite.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/Support/Debug.h" +#include "llvm/ADT/SmallPtrSet.h" +#include +#include + +using namespace llvm; + +namespace { + cl::opt + BasicInlineThreshold("inline-threshold", cl::Hidden, cl::init(200), + cl::desc("Control the amount of basic inlining to perform (default = 200)")); +} + +namespace llvm { + + /// BasicInlinerImpl - BasicInliner implemantation class. This hides + /// container info, used by basic inliner, from public interface. + struct VISIBILITY_HIDDEN BasicInlinerImpl { + + BasicInlinerImpl(const BasicInlinerImpl&); // DO NOT IMPLEMENT + void operator=(const BasicInlinerImpl&); // DO NO IMPLEMENT + public: + BasicInlinerImpl(TargetData *T) : TD(T) {} + + /// addFunction - Add function into the list of functions to process. + /// All functions must be inserted using this interface before invoking + /// inlineFunctions(). + void addFunction(Function *F) { + Functions.push_back(F); + } + + /// neverInlineFunction - Sometimes a function is never to be inlined + /// because of one or other reason. + void neverInlineFunction(Function *F) { + NeverInline.insert(F); + } + + /// inlineFuctions - Walk all call sites in all functions supplied by + /// client. Inline as many call sites as possible. Delete completely + /// inlined functions. + void inlineFunctions(); + + private: + TargetData *TD; + std::vector Functions; + std::set NeverInline; + SmallPtrSet DeadFunctions; + InlineCostAnalyzer CA; + }; + +/// inlineFuctions - Walk all call sites in all functions supplied by +/// client. Inline as many call sites as possible. Delete completely +/// inlined functions. +void BasicInlinerImpl::inlineFunctions() { + + // Scan through and identify all call sites ahead of time so that we only + // inline call sites in the original functions, not call sites that result + // from inlining other functions. + std::vector CallSites; + + for (std::vector::iterator FI = Functions.begin(), + FE = Functions.end(); FI != FE; ++FI) { + Function *F = *FI; + for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) + for (BasicBlock::iterator I = BB->begin(); I != BB->end(); ++I) { + CallSite CS = CallSite::get(I); + if (CS.getInstruction() && CS.getCalledFunction() + && !CS.getCalledFunction()->isDeclaration()) + CallSites.push_back(CS); + } + } + + DOUT << ": " << CallSites.size() << " call sites.\n"; + + // Inline call sites. + bool Changed = false; + do { + Changed = false; + for (unsigned index = 0; index != CallSites.size() && !CallSites.empty(); ++index) { + CallSite CS = CallSites[index]; + if (Function *Callee = CS.getCalledFunction()) { + + // Eliminate calls taht are never inlinable. + if (Callee->isDeclaration() || + CS.getInstruction()->getParent()->getParent() == Callee) { + CallSites.erase(CallSites.begin() + index); + --index; + continue; + } + int InlineCost = CA.getInlineCost(CS, NeverInline); + if (InlineCost >= (int) BasicInlineThreshold) { + DOUT << " NOT Inlining: cost = " << InlineCost + << ", call: " << *CS.getInstruction(); + continue; + } + + DOUT << " Inlining: cost=" << InlineCost + <<", call: " << *CS.getInstruction(); + + // Inline + if (InlineFunction(CS, NULL, TD)) { + if (Callee->use_empty() && Callee->hasInternalLinkage()) + DeadFunctions.insert(Callee); + Changed = true; + CallSites.erase(CallSites.begin() + index); + --index; + } + } + } + } while (Changed); + + // Remove completely inlined functions from module. + for(SmallPtrSet::iterator I = DeadFunctions.begin(), + E = DeadFunctions.end(); I != E; ++I) { + Function *D = *I; + Module *M = D->getParent(); + M->getFunctionList().remove(D); + } +} + +BasicInliner::BasicInliner(TargetData *TD) { + Impl = new BasicInlinerImpl(TD); +} + +BasicInliner::~BasicInliner() { + delete Impl; +} + +/// addFunction - Add function into the list of functions to process. +/// All functions must be inserted using this interface before invoking +/// inlineFunctions(). +void BasicInliner::addFunction(Function *F) { + Impl->addFunction(F); +} + +/// neverInlineFunction - Sometimes a function is never to be inlined because +/// of one or other reason. +void BasicInliner::neverInlineFunction(Function *F) { + Impl->neverInlineFunction(F); +} + +/// inlineFuctions - Walk all call sites in all functions supplied by +/// client. Inline as many call sites as possible. Delete completely +/// inlined functions. +void BasicInliner::inlineFunctions() { + Impl->inlineFunctions(); +} + +} Added: llvm/trunk/lib/Transforms/Utils/InlineCost.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InlineCost.cpp?rev=40486&view=auto ============================================================================== --- llvm/trunk/lib/Transforms/Utils/InlineCost.cpp (added) +++ llvm/trunk/lib/Transforms/Utils/InlineCost.cpp Wed Jul 25 13:00:25 2007 @@ -0,0 +1,241 @@ +//===- InlineCoast.cpp - Cost analysis for inliner ------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by the LLVM research group and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements inline cost analysis. +// +//===----------------------------------------------------------------------===// + + +#include "llvm/Transforms/Utils/InlineCost.h" +#include "llvm/Support/CallSite.h" +#include "llvm/CallingConv.h" +#include "llvm/IntrinsicInst.h" + +using namespace llvm; + +// CountCodeReductionForConstant - Figure out an approximation for how many +// instructions will be constant folded if the specified value is constant. +// +unsigned InlineCostAnalyzer::FunctionInfo:: + CountCodeReductionForConstant(Value *V) { + unsigned Reduction = 0; + for (Value::use_iterator UI = V->use_begin(), E = V->use_end(); UI != E; ++UI) + if (isa(*UI)) + Reduction += 40; // Eliminating a conditional branch is a big win + else if (SwitchInst *SI = dyn_cast(*UI)) + // Eliminating a switch is a big win, proportional to the number of edges + // deleted. + Reduction += (SI->getNumSuccessors()-1) * 40; + else if (CallInst *CI = dyn_cast(*UI)) { + // Turning an indirect call into a direct call is a BIG win + Reduction += CI->getCalledValue() == V ? 500 : 0; + } else if (InvokeInst *II = dyn_cast(*UI)) { + // Turning an indirect call into a direct call is a BIG win + Reduction += II->getCalledValue() == V ? 500 : 0; + } else { + // Figure out if this instruction will be removed due to simple constant + // propagation. + Instruction &Inst = cast(**UI); + bool AllOperandsConstant = true; + for (unsigned i = 0, e = Inst.getNumOperands(); i != e; ++i) + if (!isa(Inst.getOperand(i)) && Inst.getOperand(i) != V) { + AllOperandsConstant = false; + break; + } + + if (AllOperandsConstant) { + // We will get to remove this instruction... + Reduction += 7; + + // And any other instructions that use it which become constants + // themselves. + Reduction += CountCodeReductionForConstant(&Inst); + } + } + + return Reduction; +} + +// CountCodeReductionForAlloca - Figure out an approximation of how much smaller +// the function will be if it is inlined into a context where an argument +// becomes an alloca. +// +unsigned InlineCostAnalyzer::FunctionInfo:: + CountCodeReductionForAlloca(Value *V) { + if (!isa(V->getType())) return 0; // Not a pointer + unsigned Reduction = 0; + for (Value::use_iterator UI = V->use_begin(), E = V->use_end(); UI != E;++UI){ + Instruction *I = cast(*UI); + if (isa(I) || isa(I)) + Reduction += 10; + else if (GetElementPtrInst *GEP = dyn_cast(I)) { + // If the GEP has variable indices, we won't be able to do much with it. + for (Instruction::op_iterator I = GEP->op_begin()+1, E = GEP->op_end(); + I != E; ++I) + if (!isa(*I)) return 0; + Reduction += CountCodeReductionForAlloca(GEP)+15; + } else { + // If there is some other strange instruction, we're not going to be able + // to do much if we inline this. + return 0; + } + } + + return Reduction; +} + +/// analyzeFunction - Fill in the current structure with information gleaned +/// from the specified function. +void InlineCostAnalyzer::FunctionInfo::analyzeFunction(Function *F) { + unsigned NumInsts = 0, NumBlocks = 0; + + // Look at the size of the callee. Each basic block counts as 20 units, and + // each instruction counts as 10. + for (Function::const_iterator BB = F->begin(), E = F->end(); BB != E; ++BB) { + for (BasicBlock::const_iterator II = BB->begin(), E = BB->end(); + II != E; ++II) { + if (isa(II)) continue; // Debug intrinsics don't count. + + // Noop casts, including ptr <-> int, don't count. + if (const CastInst *CI = dyn_cast(II)) { + if (CI->isLosslessCast() || isa(CI) || + isa(CI)) + continue; + } else if (const GetElementPtrInst *GEPI = + dyn_cast(II)) { + // If a GEP has all constant indices, it will probably be folded with + // a load/store. + bool AllConstant = true; + for (unsigned i = 1, e = GEPI->getNumOperands(); i != e; ++i) + if (!isa(GEPI->getOperand(i))) { + AllConstant = false; + break; + } + if (AllConstant) continue; + } + + ++NumInsts; + } + + ++NumBlocks; + } + + this->NumBlocks = NumBlocks; + this->NumInsts = NumInsts; + + // Check out all of the arguments to the function, figuring out how much + // code can be eliminated if one of the arguments is a constant. + for (Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I) + ArgumentWeights.push_back(ArgInfo(CountCodeReductionForConstant(I), + CountCodeReductionForAlloca(I))); +} + + + +// getInlineCost - The heuristic used to determine if we should inline the +// function call or not. +// +int InlineCostAnalyzer::getInlineCost(CallSite CS, std::set &NeverInline) { + Instruction *TheCall = CS.getInstruction(); + Function *Callee = CS.getCalledFunction(); + const Function *Caller = TheCall->getParent()->getParent(); + + // Don't inline a directly recursive call. + if (Caller == Callee || + // Don't inline functions which can be redefined at link-time to mean + // something else. link-once linkage is ok though. + Callee->hasWeakLinkage() || + + // Don't inline functions marked noinline. + NeverInline.count(Callee)) + return 2000000000; + + // InlineCost - This value measures how good of an inline candidate this call + // site is to inline. A lower inline cost make is more likely for the call to + // be inlined. This value may go negative. + // + int InlineCost = 0; + + // If there is only one call of the function, and it has internal linkage, + // make it almost guaranteed to be inlined. + // + if (Callee->hasInternalLinkage() && Callee->hasOneUse()) + InlineCost -= 30000; + + // If this function uses the coldcc calling convention, prefer not to inline + // it. + if (Callee->getCallingConv() == CallingConv::Cold) + InlineCost += 2000; + + // If the instruction after the call, or if the normal destination of the + // invoke is an unreachable instruction, the function is noreturn. As such, + // there is little point in inlining this. + if (InvokeInst *II = dyn_cast(TheCall)) { + if (isa(II->getNormalDest()->begin())) + InlineCost += 10000; + } else if (isa(++BasicBlock::iterator(TheCall))) + InlineCost += 10000; + + // Get information about the callee... + FunctionInfo &CalleeFI = CachedFunctionInfo[Callee]; + + // If we haven't calculated this information yet, do so now. + if (CalleeFI.NumBlocks == 0) + CalleeFI.analyzeFunction(Callee); + + // Add to the inline quality for properties that make the call valuable to + // inline. This includes factors that indicate that the result of inlining + // the function will be optimizable. Currently this just looks at arguments + // passed into the function. + // + unsigned ArgNo = 0; + for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end(); + I != E; ++I, ++ArgNo) { + // Each argument passed in has a cost at both the caller and the callee + // sides. This favors functions that take many arguments over functions + // that take few arguments. + InlineCost -= 20; + + // If this is a function being passed in, it is very likely that we will be + // able to turn an indirect function call into a direct function call. + if (isa(I)) + InlineCost -= 100; + + // If an alloca is passed in, inlining this function is likely to allow + // significant future optimization possibilities (like scalar promotion, and + // scalarization), so encourage the inlining of the function. + // + else if (isa(I)) { + if (ArgNo < CalleeFI.ArgumentWeights.size()) + InlineCost -= CalleeFI.ArgumentWeights[ArgNo].AllocaWeight; + + // If this is a constant being passed into the function, use the argument + // weights calculated for the callee to determine how much will be folded + // away with this information. + } else if (isa(I)) { + if (ArgNo < CalleeFI.ArgumentWeights.size()) + InlineCost -= CalleeFI.ArgumentWeights[ArgNo].ConstantWeight; + } + } + + // Now that we have considered all of the factors that make the call site more + // likely to be inlined, look at factors that make us not want to inline it. + + // Don't inline into something too big, which would make it bigger. Here, we + // count each basic block as a single unit. + // + InlineCost += Caller->size()/20; + + + // Look at the size of the callee. Each basic block counts as 20 units, and + // each instruction counts as 5. + InlineCost += CalleeFI.NumInsts*5 + CalleeFI.NumBlocks*20; + return InlineCost; +} + From cfr at adobe.com Wed Jul 25 13:21:47 2007 From: cfr at adobe.com (Chuck Rose III) Date: Wed, 25 Jul 2007 11:21:47 -0700 Subject: [llvm-commits] Two patches: some VStudio compiler errors and an interpreter multi-use crash Message-ID: <680422C0AA225644931C2F6DD07200DDE493AD@namail5.corp.adobe.com> The "lib.patch" is for the lib directory & the "utils.patch" for the utils directory. Lib.patch contains 1 VStudio compiler error fix and also a move into a managed static of one of the statics for the interpreter. In cases where programs are compiled in a loop, interpreted, and then discarded, the current interpreter will crash as the static will contain pointers to discarded Function* values. The compiler error's I'm seeing come from VStudio's unwillingness to accept code of this form: for (unsigned index = 0 ; ....) { ... unsigned index = whatever; // this one to eclipse the loop control index for the purposes of the loop interior ... } I fixed this by renaming one of the two variables so that it wouldn't clash. In case in LoopUnswitch, I changed the name of the interior index. The utils.patch contains another compiler error fix of the same type as above. In RegisterInfoEmitter, I changed the name of the outside index. I tried to pick reasonable names in keeping with the prevailing style of the functions in question, but would love if the main dev for those areas can ensure that's the case. Please include my email address on the "to"-line for any questions about this patch. I'm currently subscribed to the commit alias in digest form. Thanks, Chuck. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070725/56cc8147/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: lib.patch Type: application/octet-stream Size: 2456 bytes Desc: lib.patch Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070725/56cc8147/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: utils.patch Type: application/octet-stream Size: 645 bytes Desc: utils.patch Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070725/56cc8147/attachment-0001.obj From djg at cray.com Wed Jul 25 14:33:14 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 25 Jul 2007 19:33:14 -0000 Subject: [llvm-commits] [llvm] r40487 - in /llvm/trunk/lib/Target: ARM/ARMAsmPrinter.cpp Alpha/AlphaAsmPrinter.cpp IA64/IA64AsmPrinter.cpp Mips/MipsAsmPrinter.cpp PowerPC/PPCAsmPrinter.cpp Sparc/SparcAsmPrinter.cpp X86/X86AsmPrinter.cpp X86/X86IntelAsmPrinter.cpp Message-ID: <200707251933.l6PJXED8002282@zion.cs.uiuc.edu> Author: djg Date: Wed Jul 25 14:33:14 2007 New Revision: 40487 URL: http://llvm.org/viewvc/llvm-project?rev=40487&view=rev Log: Don't ignore the return value of AsmPrinter::doInitialization and AsmPrinter::doFinalization. Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp llvm/trunk/lib/Target/Alpha/AlphaAsmPrinter.cpp llvm/trunk/lib/Target/IA64/IA64AsmPrinter.cpp llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?rev=40487&r1=40486&r2=40487&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Wed Jul 25 14:33:14 2007 @@ -789,13 +789,13 @@ // Emit initial debug information. DW.BeginModule(&M); - AsmPrinter::doInitialization(M); + bool Result = AsmPrinter::doInitialization(M); // Darwin wants symbols to be quoted if they have complex names. if (Subtarget->isTargetDarwin()) Mang->setUseQuotes(true); - return false; + return Result; } bool ARMAsmPrinter::doFinalization(Module &M) { @@ -1024,6 +1024,5 @@ DW.EndModule(); } - AsmPrinter::doFinalization(M); - return false; // success + return AsmPrinter::doFinalization(M); } Modified: llvm/trunk/lib/Target/Alpha/AlphaAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaAsmPrinter.cpp?rev=40487&r1=40486&r2=40487&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaAsmPrinter.cpp Wed Jul 25 14:33:14 2007 @@ -198,8 +198,7 @@ else O << "\t.arch ev6\n"; O << "\t.set noat\n"; - AsmPrinter::doInitialization(M); - return false; + return AsmPrinter::doInitialization(M); } bool AlphaAsmPrinter::doFinalization(Module &M) { @@ -271,8 +270,7 @@ O << '\n'; } - AsmPrinter::doFinalization(M); - return false; + return AsmPrinter::doFinalization(M); } /// PrintAsmOperand - Print out an operand for an inline asm expression. Modified: llvm/trunk/lib/Target/IA64/IA64AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/IA64/IA64AsmPrinter.cpp?rev=40487&r1=40486&r2=40487&view=diff ============================================================================== --- llvm/trunk/lib/Target/IA64/IA64AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/IA64/IA64AsmPrinter.cpp Wed Jul 25 14:33:14 2007 @@ -248,13 +248,13 @@ } bool IA64AsmPrinter::doInitialization(Module &M) { - AsmPrinter::doInitialization(M); + bool Result = AsmPrinter::doInitialization(M); O << "\n.ident \"LLVM-ia64\"\n\n" << "\t.psr lsb\n" // should be "msb" on HP-UX, for starters << "\t.radix C\n" << "\t.psr abi64\n"; // we only support 64 bits for now - return false; + return Result; } bool IA64AsmPrinter::doFinalization(Module &M) { @@ -344,8 +344,7 @@ } O << "\n\n"; - AsmPrinter::doFinalization(M); - return false; // success + return AsmPrinter::doFinalization(M); } /// createIA64CodePrinterPass - Returns a pass that prints the IA64 Modified: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp?rev=40487&r1=40486&r2=40487&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp Wed Jul 25 14:33:14 2007 @@ -428,6 +428,5 @@ } } - AsmPrinter::doFinalization(M); - return false; // success + return AsmPrinter::doFinalization(M); } Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=40487&r1=40486&r2=40487&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Wed Jul 25 14:33:14 2007 @@ -626,7 +626,7 @@ } bool LinuxAsmPrinter::doInitialization(Module &M) { - AsmPrinter::doInitialization(M); + bool Result = AsmPrinter::doInitialization(M); // GNU as handles section names wrapped in quotes Mang->setUseQuotes(true); @@ -635,7 +635,7 @@ // Emit initial debug information. DW.BeginModule(&M); - return false; + return Result; } bool LinuxAsmPrinter::doFinalization(Module &M) { @@ -743,8 +743,7 @@ // Emit initial debug information. DW.EndModule(); - AsmPrinter::doFinalization(M); - return false; // success + return AsmPrinter::doFinalization(M); } std::string LinuxAsmPrinter::getSectionForFunction(const Function &F) const { @@ -858,7 +857,7 @@ assert(Directive <= PPC::DIR_64 && "Directive out of range."); O << "\t.machine " << CPUDirectives[Directive] << "\n"; - AsmPrinter::doInitialization(M); + bool Result = AsmPrinter::doInitialization(M); // Darwin wants symbols to be quoted if they have complex names. Mang->setUseQuotes(true); @@ -878,7 +877,7 @@ // Emit initial debug information. DW.BeginModule(&M); - return false; + return Result; } bool DarwinAsmPrinter::doFinalization(Module &M) { @@ -1078,8 +1077,7 @@ // code that does this, it is always safe to set. O << "\t.subsections_via_symbols\n"; - AsmPrinter::doFinalization(M); - return false; // success + return AsmPrinter::doFinalization(M); } Modified: llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp?rev=40487&r1=40486&r2=40487&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp Wed Jul 25 14:33:14 2007 @@ -286,6 +286,5 @@ } } - AsmPrinter::doFinalization(M); - return false; // success + return AsmPrinter::doFinalization(M); } Modified: llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp?rev=40487&r1=40486&r2=40487&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86AsmPrinter.cpp Wed Jul 25 14:33:14 2007 @@ -120,13 +120,13 @@ DW.BeginModule(&M); } - AsmPrinter::doInitialization(M); + bool Result = AsmPrinter::doInitialization(M); // Darwin wants symbols to be quoted if they have complex names. if (Subtarget->isTargetDarwin()) Mang->setUseQuotes(true); - return false; + return Result; } bool X86SharedAsmPrinter::doFinalization(Module &M) { @@ -389,8 +389,7 @@ DW.EndModule(); } - AsmPrinter::doFinalization(M); - return false; // success + return AsmPrinter::doFinalization(M); } /// createX86CodePrinterPass - Returns a pass that prints the X86 assembly code Modified: llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp?rev=40487&r1=40486&r2=40487&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp Wed Jul 25 14:33:14 2007 @@ -339,7 +339,7 @@ } bool X86IntelAsmPrinter::doInitialization(Module &M) { - X86SharedAsmPrinter::doInitialization(M); + bool Result = X86SharedAsmPrinter::doInitialization(M); Mang->markCharUnacceptable('.'); @@ -373,7 +373,7 @@ } } - return false; + return Result; } bool X86IntelAsmPrinter::doFinalization(Module &M) { @@ -463,10 +463,10 @@ } // Bypass X86SharedAsmPrinter::doFinalization(). - AsmPrinter::doFinalization(M); + bool Result = AsmPrinter::doFinalization(M); SwitchToDataSection(""); O << "\tend\n"; - return false; // success + return Result; } void X86IntelAsmPrinter::EmitString(const ConstantArray *CVA) const { From chandlerc at gmail.com Wed Jul 25 14:47:31 2007 From: chandlerc at gmail.com (Chandler Carruth) Date: Wed, 25 Jul 2007 19:47:31 -0000 Subject: [llvm-commits] [llvm] r40488 - in /llvm/trunk/test: Bitcode/ Bytecode/ Message-ID: <200707251947.l6PJlV9M002894@zion.cs.uiuc.edu> Author: chandlerc Date: Wed Jul 25 14:47:31 2007 New Revision: 40488 URL: http://llvm.org/viewvc/llvm-project?rev=40488&view=rev Log: Moving regression test to reflect move in source and headers to Bitcode. Added: llvm/trunk/test/Bitcode/ - copied from r40485, llvm/trunk/test/Bytecode/ Removed: llvm/trunk/test/Bytecode/ From resistor at mac.com Wed Jul 25 14:57:03 2007 From: resistor at mac.com (Owen Anderson) Date: Wed, 25 Jul 2007 19:57:03 -0000 Subject: [llvm-commits] [llvm] r40489 - in /llvm/trunk: include/llvm/Analysis/MemoryDependenceAnalysis.h lib/Analysis/MemoryDependenceAnalysis.cpp lib/Transforms/Scalar/GVN.cpp test/Transforms/GVN/dominated.ll test/Transforms/GVN/nonlocal.ll test/Transforms/GVN/semidominated.ll Message-ID: <200707251957.l6PJv36O003362@zion.cs.uiuc.edu> Author: resistor Date: Wed Jul 25 14:57:03 2007 New Revision: 40489 URL: http://llvm.org/viewvc/llvm-project?rev=40489&view=rev Log: Add basic support for performing whole-function RLE. Note: This has not yet been thoroughly tested. Use at your own risk. Added: llvm/trunk/test/Transforms/GVN/dominated.ll llvm/trunk/test/Transforms/GVN/nonlocal.ll llvm/trunk/test/Transforms/GVN/semidominated.ll Modified: llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h?rev=40489&r1=40488&r2=40489&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h (original) +++ llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h Wed Jul 25 14:57:03 2007 @@ -38,7 +38,8 @@ Instruction* getCallSiteDependency(CallSite C, Instruction* start, bool local = true); - SmallPtrSet nonLocalHelper(Instruction* query, BasicBlock* block); + bool nonLocalHelper(Instruction* query, BasicBlock* block, + DenseMap& resp); public: static Instruction* NonLocal; @@ -67,7 +68,8 @@ Instruction* getDependency(Instruction* query, Instruction* start = 0, BasicBlock* block = 0); - SmallPtrSet getNonLocalDependency(Instruction* query); + bool getNonLocalDependency(Instruction* query, + DenseMap& resp); /// removeInstruction - Remove an instruction from the dependence analysis, /// updating the dependence of instructions that previously depended on it. Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=40489&r1=40488&r2=40489&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Wed Jul 25 14:57:03 2007 @@ -26,8 +26,8 @@ char MemoryDependenceAnalysis::ID = 0; -Instruction* MemoryDependenceAnalysis::NonLocal = (Instruction*)0; -Instruction* MemoryDependenceAnalysis::None = (Instruction*)(~0 - 1); +Instruction* MemoryDependenceAnalysis::NonLocal = (Instruction*)-2; +Instruction* MemoryDependenceAnalysis::None = (Instruction*)-3; // Register this pass... static RegisterPass X("memdep", @@ -101,52 +101,49 @@ return NonLocal; } -SmallPtrSet MemoryDependenceAnalysis::nonLocalHelper(Instruction* query, - BasicBlock* block) { - SmallPtrSet ret; +bool MemoryDependenceAnalysis::nonLocalHelper(Instruction* query, + BasicBlock* block, + DenseMap& resp) { + if (resp.count(block)) + return resp[block] != None; - Instruction* localDep = getDependency(query, block->end(), block); + Instruction* localDep = getDependency(query, 0, block); if (localDep != NonLocal) { - ret.insert(localDep); - return ret; + resp.insert(std::make_pair(block, localDep)); + return true; } + bool inserted = false; for (pred_iterator PI = pred_begin(block), PE = pred_end(block); - PI != PE; ++PI) { - SmallPtrSet pred_deps = nonLocalHelper(query, *PI); - for (SmallPtrSet::iterator I = pred_deps.begin(), - E = pred_deps.end(); I != E; ++I) - ret.insert(*I); - } + PI != PE; ++PI) + inserted |= nonLocalHelper(query, *PI, resp); - if (ret.empty()) - ret.insert(None); + if (!inserted) + resp.insert(std::make_pair(block, None)); - return ret; + return inserted; } -SmallPtrSet MemoryDependenceAnalysis::getNonLocalDependency(Instruction* query) { - SmallPtrSet ret; - +bool MemoryDependenceAnalysis::getNonLocalDependency(Instruction* query, + DenseMap& resp) { Instruction* localDep = getDependency(query); if (localDep != NonLocal) { - ret.insert(localDep); - return ret; + resp.insert(std::make_pair(query->getParent(), localDep)); + return true; } + bool inserted = false; + BasicBlock* parent = query->getParent(); for (pred_iterator PI = pred_begin(parent), PE = pred_end(parent); PI != PE; ++PI) { - SmallPtrSet pred_deps = nonLocalHelper(query, *PI); - for (SmallPtrSet::iterator I = pred_deps.begin(), - E = pred_deps.end(); I != E; ++I) - ret.insert(*I); + inserted |= nonLocalHelper(query, *PI, resp); } - if (ret.empty()) - ret.insert(None); + if (!inserted) + resp.insert(std::make_pair(query->getParent(), None)); - return ret; + return inserted; } /// getDependency - Return the instruction on which a memory operation @@ -163,12 +160,14 @@ // If we have a _confirmed_ cached entry, return it if (cachedResult.second) return cachedResult.first; - else if (cachedResult.first != NonLocal) + else if (cachedResult.first && cachedResult.first != NonLocal) // If we have an unconfirmed cached entry, we can start our search from there QI = cachedResult.first; if (start) QI = start; + else if (!start && block) + QI = block->end(); AliasAnalysis& AA = getAnalysis(); TargetData& TD = getAnalysis(); @@ -212,7 +211,7 @@ if (StoreInst* S = dyn_cast(QI)) { // All volatile loads/stores depend on each other if (queryIsVolatile && S->isVolatile()) { - if (!start) { + if (!start || block) { depGraphLocal.insert(std::make_pair(query, std::make_pair(S, true))); reverseDep.insert(std::make_pair(S, query)); } @@ -225,7 +224,7 @@ } else if (LoadInst* L = dyn_cast(QI)) { // All volatile loads/stores depend on each other if (queryIsVolatile && L->isVolatile()) { - if (!start) { + if (!start || block) { depGraphLocal.insert(std::make_pair(query, std::make_pair(L, true))); reverseDep.insert(std::make_pair(L, query)); } @@ -253,7 +252,7 @@ // Call insts need special handling. Check is they can modify our pointer if (AA.getModRefInfo(CallSite::get(QI), dependee, dependeeSize) != AliasAnalysis::NoModRef) { - if (!start) { + if (!start || block) { depGraphLocal.insert(std::make_pair(query, std::make_pair(QI, true))); reverseDep.insert(std::make_pair(QI, query)); } @@ -270,7 +269,7 @@ dependee, dependeeSize); if (R != AliasAnalysis::NoAlias) { - if (!start) { + if (!start || block) { depGraphLocal.insert(std::make_pair(query, std::make_pair(QI, true))); reverseDep.insert(std::make_pair(QI, query)); } @@ -281,7 +280,7 @@ } // If we found nothing, return the non-local flag - if (!start) { + if (!start || block) { depGraphLocal.insert(std::make_pair(query, std::make_pair(NonLocal, true))); reverseDep.insert(std::make_pair(NonLocal, query)); Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=40489&r1=40488&r2=40489&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Wed Jul 25 14:57:03 2007 @@ -15,6 +15,7 @@ #define DEBUG_TYPE "gvn" #include "llvm/Value.h" #include "llvm/Transforms/Scalar.h" +#include "llvm/BasicBlock.h" #include "llvm/Instructions.h" #include "llvm/Function.h" #include "llvm/DerivedTypes.h" @@ -648,6 +649,10 @@ ValueNumberedSet& currAvail, DenseMap& lastSeenLoad, SmallVector& toErase); + bool processNonLocalLoad(LoadInst* L, SmallVector& toErase); + Value *performPHIConstruction(BasicBlock *BB, LoadInst* orig, + DenseMap &Phis); + void dump(DenseMap& d); }; char GVN::ID = 0; @@ -687,6 +692,88 @@ s.insert(v); } +void GVN::dump(DenseMap& d) { + printf("{\n"); + for (DenseMap::iterator I = d.begin(), + E = d.end(); I != E; ++I) { + if (I->second == MemoryDependenceAnalysis::None) + printf("None\n"); + else + I->second->dump(); + } + printf("}\n"); +} + + +Value *GVN::performPHIConstruction(BasicBlock *BB, LoadInst* orig, + DenseMap &Phis) { + DenseMap::iterator DI = Phis.find(BB); + if (DI != Phis.end()) + return DI->second; + + unsigned numPreds = std::distance(pred_begin(BB), pred_end(BB)); + + if (numPreds == 1) { + Phis[BB] = Phis[*pred_begin(BB)]; + return Phis[BB]; + } else { + PHINode *PN = new PHINode(orig->getType(), orig->getName()+".rle", BB->begin()); + PN->reserveOperandSpace(numPreds); + + // Fill in the incoming values for the block. + for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) + PN->addIncoming(performPHIConstruction(*PI, orig, Phis), *PI); + + bool all_same = PN->getNumIncomingValues() != 1; + Value* first = PN->getIncomingValue(0); + for (unsigned i = 1; i < PN->getNumIncomingValues(); ++i) + all_same &= (PN->getIncomingValue(i) == first); + + if (all_same) { + PN->eraseFromParent(); + return first; + } else { + return PN; + } + } +} + +bool GVN::processNonLocalLoad(LoadInst* L, SmallVector& toErase) { + MemoryDependenceAnalysis& MD = getAnalysis(); + + DenseMap deps; + bool ret = MD.getNonLocalDependency(L, deps); + if (!ret) + return false; + + DenseMap repl; + for (DenseMap::iterator I = deps.begin(), E = deps.end(); + I != E; ++I) + if (I->second == MemoryDependenceAnalysis::None) { + return false; + } else if (StoreInst* S = dyn_cast(I->second)) { + if (S->getPointerOperand() == L->getPointerOperand()) + repl.insert(std::make_pair(I->first, S->getOperand(0))); + else + return false; + } else if (LoadInst* LD = dyn_cast(I->second)) { + if (LD->getPointerOperand() == L->getPointerOperand()) + repl.insert(std::make_pair(I->first, LD)); + else + return false; + } else { + return false; + } + + Value* v = performPHIConstruction(L->getParent(), L, repl); + + MD.removeInstruction(L); + L->replaceAllUsesWith(v); + toErase.push_back(L); + + return true; +} + bool GVN::processLoad(LoadInst* L, DenseMap& lastLoad, SmallVector& toErase) { @@ -701,6 +788,9 @@ // ... to a pointer that has been loaded from before... MemoryDependenceAnalysis& MD = getAnalysis(); Instruction* dep = MD.getDependency(L); + if (dep == MemoryDependenceAnalysis::NonLocal && + L->getParent() != &L->getParent()->getParent()->getEntryBlock()) + processNonLocalLoad(L, toErase); bool deletedLoad = false; while (dep != MemoryDependenceAnalysis::None && @@ -802,15 +892,17 @@ for (BasicBlock::iterator BI = BB->begin(), BE = BB->end(); BI != BE; ++BI) { - processInstruction(BI, currAvail, lastSeenLoad, toErase); + changed_function |= processInstruction(BI, currAvail, lastSeenLoad, toErase); + + NumGVNInstr += toErase.size(); + + for (SmallVector::iterator I = toErase.begin(), + E = toErase.end(); I != E; ++I) + (*I)->eraseFromParent(); + + toErase.clear(); } } - NumGVNInstr = toErase.size(); - - for (SmallVector::iterator I = toErase.begin(), - E = toErase.end(); I != E; ++I) - (*I)->eraseFromParent(); - return changed_function; } Added: llvm/trunk/test/Transforms/GVN/dominated.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/dominated.ll?rev=40489&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GVN/dominated.ll (added) +++ llvm/trunk/test/Transforms/GVN/dominated.ll Wed Jul 25 14:57:03 2007 @@ -0,0 +1,20 @@ +; RUN: llvm-as < %s | opt -gvn | llvm-dis | not grep DEAD + +define i32 @main(i32** %p) { +block1: + %z = load i32** %p + br i1 true, label %block2, label %block3 + +block2: + %a = load i32** %p + br label %block4 + +block3: + %b = load i32** %p + br label %block4 + +block4: + %DEAD = load i32** %p + %c = load i32* %DEAD + ret i32 %c +} \ No newline at end of file Added: llvm/trunk/test/Transforms/GVN/nonlocal.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/nonlocal.ll?rev=40489&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GVN/nonlocal.ll (added) +++ llvm/trunk/test/Transforms/GVN/nonlocal.ll Wed Jul 25 14:57:03 2007 @@ -0,0 +1,19 @@ +; RUN: llvm-as < %s | opt -gvn | llvm-dis | not grep {DEAD =} + +define i32 @main(i32** %p) { +block1: + br i1 true, label %block2, label %block3 + +block2: + %a = load i32** %p + br label %block4 + +block3: + %b = load i32** %p + br label %block4 + +block4: + %DEAD = load i32** %p + %c = load i32* %DEAD + ret i32 %c +} \ No newline at end of file Added: llvm/trunk/test/Transforms/GVN/semidominated.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/semidominated.ll?rev=40489&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GVN/semidominated.ll (added) +++ llvm/trunk/test/Transforms/GVN/semidominated.ll Wed Jul 25 14:57:03 2007 @@ -0,0 +1,19 @@ +; RUN: llvm-as < %s | opt -gvn | llvm-dis | not grep {DEAD =} + +define i32 @main(i32* %p) { +block1: + %z = load i32* %p + br i1 true, label %block2, label %block3 + +block2: + br label %block4 + +block3: + %b = bitcast i32 0 to i32 + store i32 %b, i32* %p + br label %block4 + +block4: + %DEAD = load i32* %p + ret i32 %DEAD +} \ No newline at end of file From isanbard at gmail.com Wed Jul 25 15:03:00 2007 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 25 Jul 2007 20:03:00 -0000 Subject: [llvm-commits] [llvm-gcc-4.0] r40490 - /llvm-gcc-4.0/tags/llvm-gcc-1200-03/ Message-ID: <200707252003.l6PK3021003792@zion.cs.uiuc.edu> Author: void Date: Wed Jul 25 15:03:00 2007 New Revision: 40490 URL: http://llvm.org/viewvc/llvm-project?rev=40490&view=rev Log: Creating llvm-1200-03 branch Added: llvm-gcc-4.0/tags/llvm-gcc-1200-03/ - copied from r40489, llvm-gcc-4.0/trunk/ From isanbard at gmail.com Wed Jul 25 15:10:22 2007 From: isanbard at gmail.com (Bill Wendling) Date: Wed, 25 Jul 2007 20:10:22 -0000 Subject: [llvm-commits] [llvm] r40491 - /llvm/tags/Apple/llvm-1200-03/ Message-ID: <200707252010.l6PKAMEg004111@zion.cs.uiuc.edu> Author: void Date: Wed Jul 25 15:10:21 2007 New Revision: 40491 URL: http://llvm.org/viewvc/llvm-project?rev=40491&view=rev Log: Creating llvm-1200-03 branch Added: llvm/tags/Apple/llvm-1200-03/ - copied from r40490, llvm/trunk/ From dpatel at apple.com Wed Jul 25 16:05:40 2007 From: dpatel at apple.com (Devang Patel) Date: Wed, 25 Jul 2007 21:05:40 -0000 Subject: [llvm-commits] [llvm] r40493 - /llvm/trunk/docs/WritingAnLLVMPass.html Message-ID: <200707252105.l6PL5eFk005854@zion.cs.uiuc.edu> Author: dpatel Date: Wed Jul 25 16:05:39 2007 New Revision: 40493 URL: http://llvm.org/viewvc/llvm-project?rev=40493&view=rev Log: Fix example code. Modified: llvm/trunk/docs/WritingAnLLVMPass.html Modified: llvm/trunk/docs/WritingAnLLVMPass.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/WritingAnLLVMPass.html?rev=40493&r1=40492&r2=40493&view=diff ============================================================================== --- llvm/trunk/docs/WritingAnLLVMPass.html (original) +++ llvm/trunk/docs/WritingAnLLVMPass.html Wed Jul 25 16:05:39 2007 @@ -320,6 +320,7 @@ } }; + char Hello::ID = 0; RegisterPass<Hello> X("hello", "Hello World Pass"); } From resistor at mac.com Wed Jul 25 16:13:41 2007 From: resistor at mac.com (Owen Anderson) Date: Wed, 25 Jul 2007 21:13:41 -0000 Subject: [llvm-commits] [llvm] r40494 - in /llvm/trunk: lib/Transforms/Scalar/GVN.cpp test/Transforms/GVN/2007-07-25-SinglePredecessor.ll Message-ID: <200707252113.l6PLDfXx006239@zion.cs.uiuc.edu> Author: resistor Date: Wed Jul 25 16:13:41 2007 New Revision: 40494 URL: http://llvm.org/viewvc/llvm-project?rev=40494&view=rev Log: Fix a bug that was causing GVN to crash on 252.eon. Added: llvm/trunk/test/Transforms/GVN/2007-07-25-SinglePredecessor.ll Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=40494&r1=40493&r2=40494&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Wed Jul 25 16:13:41 2007 @@ -714,8 +714,15 @@ unsigned numPreds = std::distance(pred_begin(BB), pred_end(BB)); if (numPreds == 1) { - Phis[BB] = Phis[*pred_begin(BB)]; - return Phis[BB]; + DenseMap::iterator DI = Phis.find(BB); + if (DI != Phis.end()) { + Phis.insert(std::make_pair(BB, DI->second)); + return DI->second; + } else { + Value* domV = performPHIConstruction(*pred_begin(BB), orig, Phis); + Phis.insert(std::make_pair(BB, domV)); + return domV; + } } else { PHINode *PN = new PHINode(orig->getType(), orig->getName()+".rle", BB->begin()); PN->reserveOperandSpace(numPreds); Added: llvm/trunk/test/Transforms/GVN/2007-07-25-SinglePredecessor.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/2007-07-25-SinglePredecessor.ll?rev=40494&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GVN/2007-07-25-SinglePredecessor.ll (added) +++ llvm/trunk/test/Transforms/GVN/2007-07-25-SinglePredecessor.ll Wed Jul 25 16:13:41 2007 @@ -0,0 +1,29 @@ +; RUN: llvm-as < %s | opt -gvn | llvm-dis + + %struct.ggBRDF = type { i32 (...)** } + %struct.ggBox3 = type { %struct.ggPoint3, %struct.ggPoint3 } + %struct.ggMaterialRecord = type { %struct.ggPoint2, %struct.ggBox3, %struct.ggBox3, %struct.ggSpectrum, %struct.ggSpectrum, %struct.ggSpectrum, %struct.ggBRDF*, i32, i32, i32, i32 } + %struct.ggONB3 = type { %struct.ggPoint3, %struct.ggPoint3, %struct.ggPoint3 } + %struct.ggPoint2 = type { [2 x double] } + %struct.ggPoint3 = type { [3 x double] } + %struct.ggSpectrum = type { [8 x float] } + %struct.mrViewingHitRecord = type { double, %struct.ggPoint3, %struct.ggONB3, %struct.ggPoint2, double, %struct.ggSpectrum, %struct.ggSpectrum, i32, i32, i32, i32 } + %struct.mrXEllipticalCylinder = type { %struct.ggBRDF, float, float, float, float, float, float } + +define i32 @_ZNK21mrZEllipticalCylinder10viewingHitERK6ggRay3dddR18mrViewingHitRecordR16ggMaterialRecord(%struct.mrXEllipticalCylinder* %this, %struct.ggBox3* %ray, double %unnamed_arg, double %tmin, double %tmax, %struct.mrViewingHitRecord* %VHR, %struct.ggMaterialRecord* %unnamed_arg2) { +entry: + %tmp80.i = getelementptr %struct.mrViewingHitRecord* %VHR, i32 0, i32 1, i32 0, i32 0 ; [#uses=1] + store double 0.000000e+00, double* %tmp80.i + br i1 false, label %return, label %cond_next.i + +cond_next.i: ; preds = %entry + br i1 false, label %return, label %cond_true + +cond_true: ; preds = %cond_next.i + %tmp3.i8 = getelementptr %struct.mrViewingHitRecord* %VHR, i32 0, i32 1, i32 0, i32 0 ; [#uses=1] + %tmp46 = load double* %tmp3.i8 ; [#uses=0] + ret i32 1 + +return: ; preds = %cond_next.i, %entry + ret i32 0 +} From resistor at mac.com Wed Jul 25 16:26:36 2007 From: resistor at mac.com (Owen Anderson) Date: Wed, 25 Jul 2007 21:26:36 -0000 Subject: [llvm-commits] [llvm] r40495 - in /llvm/trunk: lib/Analysis/MemoryDependenceAnalysis.cpp test/Transforms/GVN/2007-07-25-Loop.ll Message-ID: <200707252126.l6PLQa7o006804@zion.cs.uiuc.edu> Author: resistor Date: Wed Jul 25 16:26:36 2007 New Revision: 40495 URL: http://llvm.org/viewvc/llvm-project?rev=40495&view=rev Log: Fix a bug in non-local memdep that was causing an infinite loop on 175.vpr. Added: llvm/trunk/test/Transforms/GVN/2007-07-25-Loop.ll Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=40495&r1=40494&r2=40495&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Wed Jul 25 16:26:36 2007 @@ -103,7 +103,8 @@ bool MemoryDependenceAnalysis::nonLocalHelper(Instruction* query, BasicBlock* block, - DenseMap& resp) { + DenseMap& resp, + SmallPtrSet& visited) { if (resp.count(block)) return resp[block] != None; @@ -113,10 +114,15 @@ return true; } + visited.insert(block); + bool inserted = false; for (pred_iterator PI = pred_begin(block), PE = pred_end(block); PI != PE; ++PI) - inserted |= nonLocalHelper(query, *PI, resp); + if (!visited.count(*PI)) + inserted |= nonLocalHelper(query, *PI, resp, visited); + + visited.erase(block); if (!inserted) resp.insert(std::make_pair(block, None)); @@ -133,11 +139,14 @@ } bool inserted = false; + SmallPtrSet visited; + visited.insert(query->getParent()); BasicBlock* parent = query->getParent(); for (pred_iterator PI = pred_begin(parent), PE = pred_end(parent); PI != PE; ++PI) { - inserted |= nonLocalHelper(query, *PI, resp); + if (!visited.count(*PI)) + inserted |= nonLocalHelper(query, *PI, resp, visited); } if (!inserted) Added: llvm/trunk/test/Transforms/GVN/2007-07-25-Loop.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/2007-07-25-Loop.ll?rev=40495&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GVN/2007-07-25-Loop.ll (added) +++ llvm/trunk/test/Transforms/GVN/2007-07-25-Loop.ll Wed Jul 25 16:26:36 2007 @@ -0,0 +1,15 @@ +; RUN: llvm-as < %s | opt -gvn | llvm-dis + + %struct.s_segment_inf = type { float, i32, i16, i16, float, float, i32, float, float } + +define void @print_arch(i8* %arch_file, i32 %route_type, i64 %det_routing_arch.0.0, i64 %det_routing_arch.0.1, i64 %det_routing_arch.0.2, i64 %det_routing_arch.0.3, i64 %det_routing_arch.0.4, %struct.s_segment_inf* %segment_inf, i64 %timing_inf.0.0, i64 %timing_inf.0.1, i64 %timing_inf.0.2, i64 %timing_inf.0.3, i64 %timing_inf.0.4, i32 %timing_inf.1) { +entry: + br i1 false, label %bb278, label %bb344 + +bb278: ; preds = %bb278, %entry + br i1 false, label %bb278, label %bb344 + +bb344: ; preds = %bb278, %entry + %tmp38758 = load i16* null, align 2 ; [#uses=0] + ret void +} From resistor at mac.com Wed Jul 25 16:30:15 2007 From: resistor at mac.com (Owen Anderson) Date: Wed, 25 Jul 2007 21:30:15 -0000 Subject: [llvm-commits] [llvm] r40496 - /llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h Message-ID: <200707252130.l6PLUFTQ007051@zion.cs.uiuc.edu> Author: resistor Date: Wed Jul 25 16:30:15 2007 New Revision: 40496 URL: http://llvm.org/viewvc/llvm-project?rev=40496&view=rev Log: Forgot to include this file in my last commit. Modified: llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h Modified: llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h?rev=40496&r1=40495&r2=40496&view=diff ============================================================================== --- llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h (original) +++ llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h Wed Jul 25 16:30:15 2007 @@ -39,7 +39,8 @@ Instruction* getCallSiteDependency(CallSite C, Instruction* start, bool local = true); bool nonLocalHelper(Instruction* query, BasicBlock* block, - DenseMap& resp); + DenseMap& resp, + SmallPtrSet& visited); public: static Instruction* NonLocal; From resistor at mac.com Wed Jul 25 17:03:06 2007 From: resistor at mac.com (Owen Anderson) Date: Wed, 25 Jul 2007 22:03:06 -0000 Subject: [llvm-commits] [llvm] r40497 - in /llvm/trunk: lib/Transforms/Scalar/GVN.cpp test/Transforms/GVN/2007-07-25-InfiniteLoop.ll Message-ID: <200707252203.l6PM37CY007968@zion.cs.uiuc.edu> Author: resistor Date: Wed Jul 25 17:03:06 2007 New Revision: 40497 URL: http://llvm.org/viewvc/llvm-project?rev=40497&view=rev Log: Fix an infinite loop on 300.twolf. Added: llvm/trunk/test/Transforms/GVN/2007-07-25-InfiniteLoop.ll Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=40497&r1=40496&r2=40497&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Wed Jul 25 17:03:06 2007 @@ -651,7 +651,8 @@ SmallVector& toErase); bool processNonLocalLoad(LoadInst* L, SmallVector& toErase); Value *performPHIConstruction(BasicBlock *BB, LoadInst* orig, - DenseMap &Phis); + DenseMap &Phis, + SmallPtrSet& visited); void dump(DenseMap& d); }; @@ -706,7 +707,8 @@ Value *GVN::performPHIConstruction(BasicBlock *BB, LoadInst* orig, - DenseMap &Phis) { + DenseMap &Phis, + SmallPtrSet& visited) { DenseMap::iterator DI = Phis.find(BB); if (DI != Phis.end()) return DI->second; @@ -719,17 +721,25 @@ Phis.insert(std::make_pair(BB, DI->second)); return DI->second; } else { - Value* domV = performPHIConstruction(*pred_begin(BB), orig, Phis); + visited.insert(BB); + Value* domV = performPHIConstruction(*pred_begin(BB), orig, Phis, visited); + visited.erase(BB); + Phis.insert(std::make_pair(BB, domV)); return domV; } } else { PHINode *PN = new PHINode(orig->getType(), orig->getName()+".rle", BB->begin()); PN->reserveOperandSpace(numPreds); - + + visited.insert(BB); // Fill in the incoming values for the block. for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) - PN->addIncoming(performPHIConstruction(*PI, orig, Phis), *PI); + if (!visited.count(*PI)) + PN->addIncoming(performPHIConstruction(*PI, orig, Phis, visited), *PI); + else + PN->addIncoming(PN, *PI); + visited.erase(BB); bool all_same = PN->getNumIncomingValues() != 1; Value* first = PN->getIncomingValue(0); @@ -772,7 +782,8 @@ return false; } - Value* v = performPHIConstruction(L->getParent(), L, repl); + SmallPtrSet visited; + Value* v = performPHIConstruction(L->getParent(), L, repl, visited); MD.removeInstruction(L); L->replaceAllUsesWith(v); Added: llvm/trunk/test/Transforms/GVN/2007-07-25-InfiniteLoop.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/2007-07-25-InfiniteLoop.ll?rev=40497&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GVN/2007-07-25-InfiniteLoop.ll (added) +++ llvm/trunk/test/Transforms/GVN/2007-07-25-InfiniteLoop.ll Wed Jul 25 17:03:06 2007 @@ -0,0 +1,14 @@ +; RUN: llvm-as < %s | opt -gvn | llvm-dis + + %struct.INT2 = type { i32, i32 } + at blkshifts = external global %struct.INT2* ; <%struct.INT2**> [#uses=2] + +define i32 @xcompact() { +entry: + store %struct.INT2* null, %struct.INT2** @blkshifts, align 4 + br label %bb + +bb: ; preds = %bb, %entry + %tmp10 = load %struct.INT2** @blkshifts, align 4 ; <%struct.INT2*> [#uses=0] + br label %bb +} From resistor at mac.com Wed Jul 25 17:19:41 2007 From: resistor at mac.com (Owen Anderson) Date: Wed, 25 Jul 2007 22:19:41 -0000 Subject: [llvm-commits] [llvm] r40498 - in /llvm/trunk: lib/Transforms/Scalar/GVN.cpp test/Transforms/GVN/2007-07-25-NestedLoop.ll Message-ID: <200707252219.l6PMJfP3008391@zion.cs.uiuc.edu> Author: resistor Date: Wed Jul 25 17:19:40 2007 New Revision: 40498 URL: http://llvm.org/viewvc/llvm-project?rev=40498&view=rev Log: My last commit was not correct for nested loops. Fix it, and add a testcase for it. Added: llvm/trunk/test/Transforms/GVN/2007-07-25-NestedLoop.ll Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=40498&r1=40497&r2=40498&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Wed Jul 25 17:19:40 2007 @@ -731,6 +731,7 @@ } else { PHINode *PN = new PHINode(orig->getType(), orig->getName()+".rle", BB->begin()); PN->reserveOperandSpace(numPreds); + Phis[BB] = PN; visited.insert(BB); // Fill in the incoming values for the block. @@ -738,7 +739,7 @@ if (!visited.count(*PI)) PN->addIncoming(performPHIConstruction(*PI, orig, Phis, visited), *PI); else - PN->addIncoming(PN, *PI); + PN->addIncoming(Phis[*PI], *PI); visited.erase(BB); bool all_same = PN->getNumIncomingValues() != 1; @@ -748,6 +749,7 @@ if (all_same) { PN->eraseFromParent(); + Phis[BB] = first; return first; } else { return PN; Added: llvm/trunk/test/Transforms/GVN/2007-07-25-NestedLoop.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/2007-07-25-NestedLoop.ll?rev=40498&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GVN/2007-07-25-NestedLoop.ll (added) +++ llvm/trunk/test/Transforms/GVN/2007-07-25-NestedLoop.ll Wed Jul 25 17:19:40 2007 @@ -0,0 +1,38 @@ +; RUN: llvm-as < %s | opt -gvn | llvm-dis + + %struct.TypHeader = type { i32, %struct.TypHeader**, [3 x i8], i8 } + +define %struct.TypHeader* @LtRec(%struct.TypHeader* %hdL, %struct.TypHeader* %hdR) { +entry: + br i1 false, label %bb556.preheader, label %bb534.preheader + +bb534.preheader: ; preds = %entry + ret %struct.TypHeader* null + +bb556.preheader: ; preds = %entry + %tmp56119 = getelementptr %struct.TypHeader* %hdR, i32 0, i32 0 ; [#uses=1] + %tmp56220 = load i32* %tmp56119 ; [#uses=0] + br i1 false, label %bb.nph23, label %bb675.preheader + +bb.nph23: ; preds = %bb556.preheader + ret %struct.TypHeader* null + +bb656: ; preds = %bb675.outer, %bb656 + %tmp678 = load i32* %tmp677 ; [#uses=0] + br i1 false, label %bb684, label %bb656 + +bb684: ; preds = %bb675.outer, %bb656 + br i1 false, label %bb924.preheader, label %bb675.outer + +bb675.outer: ; preds = %bb675.preheader, %bb684 + %tmp67812 = load i32* %tmp67711 ; [#uses=0] + br i1 false, label %bb684, label %bb656 + +bb675.preheader: ; preds = %bb556.preheader + %tmp67711 = getelementptr %struct.TypHeader* %hdR, i32 0, i32 0 ; [#uses=1] + %tmp677 = getelementptr %struct.TypHeader* %hdR, i32 0, i32 0 ; [#uses=1] + br label %bb675.outer + +bb924.preheader: ; preds = %bb684 + ret %struct.TypHeader* null +} From evan.cheng at apple.com Wed Jul 25 17:28:16 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 25 Jul 2007 22:28:16 -0000 Subject: [llvm-commits] [llvm] r40499 - /llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp Message-ID: <200707252228.l6PMSH26008609@zion.cs.uiuc.edu> Author: evancheng Date: Wed Jul 25 17:28:16 2007 New Revision: 40499 URL: http://llvm.org/viewvc/llvm-project?rev=40499&view=rev Log: Functions with LinkOnce and weak linkage still need to be aligned. Doh. Modified: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp Modified: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp?rev=40499&r1=40498&r2=40499&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp Wed Jul 25 17:28:16 2007 @@ -111,6 +111,7 @@ case Function::LinkOnceLinkage: case Function::WeakLinkage: if (Subtarget->isTargetDarwin()) { + EmitAlignment(4, F); // FIXME: This should be parameterized somewhere. O << "\t.globl\t" << CurrentFnName << "\n"; O << "\t.weak_definition\t" << CurrentFnName << "\n"; } else if (Subtarget->isTargetCygMing()) { From djg at cray.com Wed Jul 25 18:00:00 2007 From: djg at cray.com (Dan Gohman) Date: Wed, 25 Jul 2007 18:00:00 -0500 Subject: [llvm-commits] ScalarEvolution fix for treeadd Message-ID: <20070725230000.GB4092@village.us.cray.com> > I'm not sure why, but it doesn't seem as promising as the previous test > I had. Could it be that when comparing the PDF I should ignore blocks > that are not part of the loop? If there are branches from outside the loop to blocks inside the loop other than the loop header, then the exit branch may not be executed the same number of times as the loop header. Can you identify a testcase that doesn't involve an infinite loop where the PDF test rejects a loop that the one of the other tests accepts? Dan -- Dan Gohman From evan.cheng at apple.com Wed Jul 25 18:35:08 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 25 Jul 2007 23:35:08 -0000 Subject: [llvm-commits] [llvm] r40500 - in /llvm/trunk: include/llvm/CodeGen/AsmPrinter.h lib/CodeGen/AsmPrinter.cpp Message-ID: <200707252335.l6PNZ8au010952@zion.cs.uiuc.edu> Author: evancheng Date: Wed Jul 25 18:35:07 2007 New Revision: 40500 URL: http://llvm.org/viewvc/llvm-project?rev=40500&view=rev Log: EmitAlignment() also emits optional fill value. Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h llvm/trunk/lib/CodeGen/AsmPrinter.cpp Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=40500&r1=40499&r2=40500&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original) +++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Wed Jul 25 18:35:07 2007 @@ -251,7 +251,9 @@ /// an explicit alignment requested, it will unconditionally override the /// alignment request. However, if ForcedAlignBits is specified, this value /// has final say: the ultimate alignment will be the max of ForcedAlignBits - /// and the alignment computed with NumBits and the global. + /// and the alignment computed with NumBits and the global. If UseFillExpr + /// is true, it also emits an optional second value FillValue which the + /// assembler uses to fill gaps to match alignment. /// /// The algorithm is: /// Align = NumBits; @@ -259,7 +261,8 @@ /// Align = std::max(Align, ForcedAlignBits); /// void EmitAlignment(unsigned NumBits, const GlobalValue *GV = 0, - unsigned ForcedAlignBits = 0) const; + unsigned ForcedAlignBits = 0, bool UseFillExpr = false, + unsigned FillValue = 0) const; protected: /// EmitZeros - Emit a block of zeros. Modified: llvm/trunk/lib/CodeGen/AsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter.cpp?rev=40500&r1=40499&r2=40500&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/AsmPrinter.cpp (original) +++ llvm/trunk/lib/CodeGen/AsmPrinter.cpp Wed Jul 25 18:35:07 2007 @@ -621,14 +621,17 @@ // Align = std::max(Align, ForcedAlignBits); // void AsmPrinter::EmitAlignment(unsigned NumBits, const GlobalValue *GV, - unsigned ForcedAlignBits) const { + unsigned ForcedAlignBits, bool UseFillExpr, + unsigned FillValue) const { if (GV && GV->getAlignment()) NumBits = Log2_32(GV->getAlignment()); NumBits = std::max(NumBits, ForcedAlignBits); if (NumBits == 0) return; // No need to emit alignment. if (TAI->getAlignmentIsInBytes()) NumBits = 1 << NumBits; - O << TAI->getAlignDirective() << NumBits << "\n"; + O << TAI->getAlignDirective() << NumBits; + if (UseFillExpr) O << ",0x" << std::hex << FillValue << std::dec; + O << "\n"; } From evan.cheng at apple.com Wed Jul 25 18:36:05 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 25 Jul 2007 23:36:05 -0000 Subject: [llvm-commits] [llvm] r40501 - /llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp Message-ID: <200707252336.l6PNa5S5011046@zion.cs.uiuc.edu> Author: evancheng Date: Wed Jul 25 18:36:05 2007 New Revision: 40501 URL: http://llvm.org/viewvc/llvm-project?rev=40501&view=rev Log: Mac OS X should use 0x90 to fill in gaps to satisfy function alignment requirements. Modified: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp Modified: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp?rev=40501&r1=40500&r2=40501&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp Wed Jul 25 18:36:05 2007 @@ -99,19 +99,28 @@ switch (F->getLinkage()) { default: assert(0 && "Unknown linkage type!"); case Function::InternalLinkage: // Symbols default to internal. - EmitAlignment(4, F); // FIXME: This should be parameterized somewhere. + if (Subtarget->isTargetDarwin()) + // FIXME: This should be parameterized somewhere. + EmitAlignment(4, F, 0, true, 0x90); + else + EmitAlignment(4, F); // FIXME: This should be parameterized somewhere. break; case Function::DLLExportLinkage: DLLExportedFns.insert(Mang->makeNameProper(F->getName(), "")); //FALLS THROUGH case Function::ExternalLinkage: - EmitAlignment(4, F); // FIXME: This should be parameterized somewhere. + if (Subtarget->isTargetDarwin()) + // FIXME: This should be parameterized somewhere. + EmitAlignment(4, F, 0, true, 0x90); + else + EmitAlignment(4, F); // FIXME: This should be parameterized somewhere. O << "\t.globl\t" << CurrentFnName << "\n"; break; case Function::LinkOnceLinkage: case Function::WeakLinkage: if (Subtarget->isTargetDarwin()) { - EmitAlignment(4, F); // FIXME: This should be parameterized somewhere. + // FIXME: This should be parameterized somewhere. + EmitAlignment(4, F, 0, true, 0x90); O << "\t.globl\t" << CurrentFnName << "\n"; O << "\t.weak_definition\t" << CurrentFnName << "\n"; } else if (Subtarget->isTargetCygMing()) { From evan.cheng at apple.com Wed Jul 25 18:41:36 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 25 Jul 2007 23:41:36 -0000 Subject: [llvm-commits] [llvm] r40502 - /llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200707252341.l6PNfacl011379@zion.cs.uiuc.edu> Author: evancheng Date: Wed Jul 25 18:41:36 2007 New Revision: 40502 URL: http://llvm.org/viewvc/llvm-project?rev=40502&view=rev Log: Mac OS X x86-64 lower 4G address is not available. Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=40502&r1=40501&r2=40502&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Jul 25 18:41:36 2007 @@ -615,7 +615,8 @@ SDOperand N0 = N.getOperand(0); if (GlobalAddressSDNode *G = dyn_cast(N0)) { GlobalValue *GV = G->getGlobal(); - bool isAbs32 = !is64Bit || isStatic; + // Mac OS X X86-64 lower 4G address is not available. + bool isAbs32 = !is64Bit || (isStatic && !Subtarget->isTargetDarwin()); if (isAbs32 || isRoot) { AM.GV = GV; AM.Disp += G->getOffset(); From resistor at mac.com Wed Jul 25 18:54:42 2007 From: resistor at mac.com (Owen Anderson) Date: Wed, 25 Jul 2007 23:54:42 -0000 Subject: [llvm-commits] [llvm] r40503 - in /llvm/trunk: lib/Transforms/Scalar/GVN.cpp test/Transforms/GVN/2007-07-25-DominatedLoop.ll Message-ID: <200707252354.l6PNsgaL011902@zion.cs.uiuc.edu> Author: resistor Date: Wed Jul 25 18:54:42 2007 New Revision: 40503 URL: http://llvm.org/viewvc/llvm-project?rev=40503&view=rev Log: Fix what is _hopefully_ the last corner case for loops. Added: llvm/trunk/test/Transforms/GVN/2007-07-25-DominatedLoop.ll Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=40503&r1=40502&r2=40503&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Wed Jul 25 18:54:42 2007 @@ -738,8 +738,12 @@ for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) if (!visited.count(*PI)) PN->addIncoming(performPHIConstruction(*PI, orig, Phis, visited), *PI); - else - PN->addIncoming(Phis[*PI], *PI); + else { + if (Phis[*PI]) + PN->addIncoming(Phis[*PI], *PI); + else + PN->addIncoming(PN, *PI); + } visited.erase(BB); bool all_same = PN->getNumIncomingValues() != 1; Added: llvm/trunk/test/Transforms/GVN/2007-07-25-DominatedLoop.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/2007-07-25-DominatedLoop.ll?rev=40503&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GVN/2007-07-25-DominatedLoop.ll (added) +++ llvm/trunk/test/Transforms/GVN/2007-07-25-DominatedLoop.ll Wed Jul 25 18:54:42 2007 @@ -0,0 +1,86 @@ +; RUN: llvm-as < %s | opt -gvn | llvm-dis + + %struct.PerlInterpreter = type { i8 } + at PL_sv_count = external global i32 ; [#uses=2] + +define void @perl_destruct(%struct.PerlInterpreter* %sv_interp) { +entry: + br i1 false, label %cond_next25, label %cond_true16 + +cond_true16: ; preds = %entry + ret void + +cond_next25: ; preds = %entry + br i1 false, label %cond_next33, label %cond_true32 + +cond_true32: ; preds = %cond_next25 + ret void + +cond_next33: ; preds = %cond_next25 + br i1 false, label %cond_next61, label %cond_true.i46 + +cond_true.i46: ; preds = %cond_next33 + ret void + +cond_next61: ; preds = %cond_next33 + br i1 false, label %cond_next69, label %cond_true66 + +cond_true66: ; preds = %cond_next61 + ret void + +cond_next69: ; preds = %cond_next61 + br i1 false, label %Perl_safefree.exit52, label %cond_true.i50 + +cond_true.i50: ; preds = %cond_next69 + ret void + +Perl_safefree.exit52: ; preds = %cond_next69 + br i1 false, label %cond_next80, label %cond_true77 + +cond_true77: ; preds = %Perl_safefree.exit52 + ret void + +cond_next80: ; preds = %Perl_safefree.exit52 + br i1 false, label %Perl_safefree.exit56, label %cond_true.i54 + +cond_true.i54: ; preds = %cond_next80 + ret void + +Perl_safefree.exit56: ; preds = %cond_next80 + br i1 false, label %Perl_safefree.exit60, label %cond_true.i58 + +cond_true.i58: ; preds = %Perl_safefree.exit56 + ret void + +Perl_safefree.exit60: ; preds = %Perl_safefree.exit56 + br i1 false, label %Perl_safefree.exit64, label %cond_true.i62 + +cond_true.i62: ; preds = %Perl_safefree.exit60 + ret void + +Perl_safefree.exit64: ; preds = %Perl_safefree.exit60 + br i1 false, label %Perl_safefree.exit68, label %cond_true.i66 + +cond_true.i66: ; preds = %Perl_safefree.exit64 + ret void + +Perl_safefree.exit68: ; preds = %Perl_safefree.exit64 + br i1 false, label %cond_next150, label %cond_true23.i + +cond_true23.i: ; preds = %Perl_safefree.exit68 + ret void + +cond_next150: ; preds = %Perl_safefree.exit68 + %tmp16092 = load i32* @PL_sv_count, align 4 ; [#uses=0] + br label %cond_next165 + +bb157: ; preds = %cond_next165 + %tmp158 = load i32* @PL_sv_count, align 4 ; [#uses=0] + br label %cond_next165 + +cond_next165: ; preds = %bb157, %cond_next150 + br i1 false, label %bb171, label %bb157 + +bb171: ; preds = %cond_next165 + ret void +} From djg at cray.com Wed Jul 25 19:31:09 2007 From: djg at cray.com (Dan Gohman) Date: Thu, 26 Jul 2007 00:31:09 -0000 Subject: [llvm-commits] [llvm] r40504 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/vec_shuffle.ll Message-ID: <200707260031.l6Q0V9i9014112@zion.cs.uiuc.edu> Author: djg Date: Wed Jul 25 19:31:09 2007 New Revision: 40504 URL: http://llvm.org/viewvc/llvm-project?rev=40504&view=rev Log: Remove X86ISD::LOAD_PACK and X86ISD::LOAD_UA and associated code from the x86 target, replacing them with the new alignment attributes on memory references. Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.h llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/CodeGen/X86/vec_shuffle.ll Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=40504&r1=40503&r2=40504&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jul 25 19:31:09 2007 @@ -3367,14 +3367,10 @@ CV.push_back(C); CV.push_back(C); } - Constant *CS = ConstantStruct::get(CV); - SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); - SDVTList Tys = DAG.getVTList(VT, MVT::Other); - SmallVector Ops; - Ops.push_back(DAG.getEntryNode()); - Ops.push_back(CPIdx); - Ops.push_back(DAG.getSrcValue(NULL)); - SDOperand Mask = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], Ops.size()); + Constant *C = ConstantVector::get(CV); + SDOperand CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); + SDOperand Mask = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, NULL, 0, + false, 16); return DAG.getNode(X86ISD::FAND, VT, Op.getOperand(0), Mask); } @@ -3399,21 +3395,16 @@ CV.push_back(C); CV.push_back(C); } - Constant *CS = ConstantStruct::get(CV); - SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); + Constant *C = ConstantVector::get(CV); + SDOperand CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); + SDOperand Mask = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, NULL, 0, + false, 16); if (MVT::isVector(VT)) { - SDOperand Mask = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, NULL, 0); return DAG.getNode(ISD::BIT_CONVERT, VT, DAG.getNode(ISD::XOR, MVT::v2i64, DAG.getNode(ISD::BIT_CONVERT, MVT::v2i64, Op.getOperand(0)), DAG.getNode(ISD::BIT_CONVERT, MVT::v2i64, Mask))); } else { - SDVTList Tys = DAG.getVTList(VT, MVT::Other); - SmallVector Ops; - Ops.push_back(DAG.getEntryNode()); - Ops.push_back(CPIdx); - Ops.push_back(DAG.getSrcValue(NULL)); - SDOperand Mask = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], Ops.size()); return DAG.getNode(X86ISD::FXOR, VT, Op.getOperand(0), Mask); } } @@ -3442,14 +3433,10 @@ CV.push_back(ConstantFP::get(SrcTy, 0.0)); CV.push_back(ConstantFP::get(SrcTy, 0.0)); } - Constant *CS = ConstantStruct::get(CV); - SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); - SDVTList Tys = DAG.getVTList(SrcVT, MVT::Other); - SmallVector Ops; - Ops.push_back(DAG.getEntryNode()); - Ops.push_back(CPIdx); - Ops.push_back(DAG.getSrcValue(NULL)); - SDOperand Mask1 = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], Ops.size()); + Constant *C = ConstantVector::get(CV); + SDOperand CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); + SDOperand Mask1 = DAG.getLoad(SrcVT, DAG.getEntryNode(), CPIdx, NULL, 0, + false, 16); SDOperand SignBit = DAG.getNode(X86ISD::FAND, SrcVT, Op1, Mask1); // Shift sign bit right or left if the two operands have different types. @@ -3474,14 +3461,10 @@ CV.push_back(ConstantFP::get(SrcTy, 0.0)); CV.push_back(ConstantFP::get(SrcTy, 0.0)); } - CS = ConstantStruct::get(CV); - CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); - Tys = DAG.getVTList(VT, MVT::Other); - Ops.clear(); - Ops.push_back(DAG.getEntryNode()); - Ops.push_back(CPIdx); - Ops.push_back(DAG.getSrcValue(NULL)); - SDOperand Mask2 = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], Ops.size()); + C = ConstantVector::get(CV); + CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); + SDOperand Mask2 = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, NULL, 0, + false, 16); SDOperand Val = DAG.getNode(X86ISD::FAND, VT, Op0, Mask2); // Or the value with the sign bit. @@ -4357,8 +4340,6 @@ case X86ISD::RET_FLAG: return "X86ISD::RET_FLAG"; case X86ISD::REP_STOS: return "X86ISD::REP_STOS"; case X86ISD::REP_MOVS: return "X86ISD::REP_MOVS"; - case X86ISD::LOAD_PACK: return "X86ISD::LOAD_PACK"; - case X86ISD::LOAD_UA: return "X86ISD::LOAD_UA"; case X86ISD::GlobalBaseReg: return "X86ISD::GlobalBaseReg"; case X86ISD::Wrapper: return "X86ISD::Wrapper"; case X86ISD::S2VEC: return "X86ISD::S2VEC"; @@ -4756,19 +4737,14 @@ } bool isAlign16 = isBaseAlignment16(Base->getOperand(1).Val, MFI, Subtarget); + LoadSDNode *LD = cast(Base); if (isAlign16) { - LoadSDNode *LD = cast(Base); return DAG.getLoad(VT, LD->getChain(), LD->getBasePtr(), LD->getSrcValue(), - LD->getSrcValueOffset()); + LD->getSrcValueOffset(), LD->isVolatile()); } else { - // Just use movups, it's shorter. - SDVTList Tys = DAG.getVTList(MVT::v4f32, MVT::Other); - SmallVector Ops; - Ops.push_back(Base->getOperand(0)); - Ops.push_back(Base->getOperand(1)); - Ops.push_back(Base->getOperand(2)); - return DAG.getNode(ISD::BIT_CONVERT, VT, - DAG.getNode(X86ISD::LOAD_UA, Tys, &Ops[0], Ops.size())); + return DAG.getLoad(VT, LD->getChain(), LD->getBasePtr(), LD->getSrcValue(), + LD->getSrcValueOffset(), LD->isVolatile(), + LD->getAlignment()); } } Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=40504&r1=40503&r2=40504&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Wed Jul 25 19:31:09 2007 @@ -143,14 +143,6 @@ /// REP_MOVS - Repeat move, corresponds to X86::REP_MOVSx. REP_MOVS, - /// LOAD_PACK Load a 128-bit packed float / double value. It has the same - /// operands as a normal load. - LOAD_PACK, - - /// LOAD_UA Load an unaligned 128-bit value. It has the same operands as - /// a normal load. - LOAD_UA, - /// GlobalBaseReg - On Darwin, this node represents the result of the popl /// at function entry, used for PIC code. GlobalBaseReg, Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=40504&r1=40503&r2=40504&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Wed Jul 25 19:31:09 2007 @@ -21,8 +21,6 @@ def SDTX86FPShiftOp : SDTypeProfile<1, 2, [ SDTCisSameAs<0, 1>, SDTCisFP<0>, SDTCisInt<2> ]>; -def X86loadp : SDNode<"X86ISD::LOAD_PACK", SDTLoad, [SDNPHasChain]>; -def X86loadu : SDNode<"X86ISD::LOAD_UA", SDTLoad, [SDNPHasChain]>; def X86fmin : SDNode<"X86ISD::FMIN", SDTFPBinOp>; def X86fmax : SDNode<"X86ISD::FMAX", SDTFPBinOp>; def X86fand : SDNode<"X86ISD::FAND", SDTFPBinOp, @@ -82,9 +80,6 @@ // SSE pattern fragments //===----------------------------------------------------------------------===// -def X86loadpf32 : PatFrag<(ops node:$ptr), (f32 (X86loadp node:$ptr))>; -def X86loadpf64 : PatFrag<(ops node:$ptr), (f64 (X86loadp node:$ptr))>; - def loadv4f32 : PatFrag<(ops node:$ptr), (v4f32 (load node:$ptr))>; def loadv2f64 : PatFrag<(ops node:$ptr), (v2f64 (load node:$ptr))>; def loadv4i32 : PatFrag<(ops node:$ptr), (v4i32 (load node:$ptr))>; @@ -109,6 +104,8 @@ return false; }]>; +def alignedloadf32 : PatFrag<(ops node:$ptr), (f32 (alignedload node:$ptr))>; +def alignedloadf64 : PatFrag<(ops node:$ptr), (f64 (alignedload node:$ptr))>; def alignedloadv4f32 : PatFrag<(ops node:$ptr), (v4f32 (alignedload node:$ptr))>; def alignedloadv2f64 : PatFrag<(ops node:$ptr), (v2f64 (alignedload node:$ptr))>; def alignedloadv4i32 : PatFrag<(ops node:$ptr), (v4i32 (alignedload node:$ptr))>; @@ -411,7 +408,7 @@ // disregarded. def FsMOVAPSrm : PSI<0x28, MRMSrcMem, (outs FR32:$dst), (ins f128mem:$src), "movaps {$src, $dst|$dst, $src}", - [(set FR32:$dst, (X86loadpf32 addr:$src))]>; + [(set FR32:$dst, (alignedloadf32 addr:$src))]>; // Alias bitwise logical operations using SSE logical ops on packed FP values. let isTwoAddress = 1 in { @@ -430,15 +427,15 @@ def FsANDPSrm : PSI<0x54, MRMSrcMem, (outs FR32:$dst), (ins FR32:$src1, f128mem:$src2), "andps {$src2, $dst|$dst, $src2}", [(set FR32:$dst, (X86fand FR32:$src1, - (X86loadpf32 addr:$src2)))]>; + (alignedloadf32 addr:$src2)))]>; def FsORPSrm : PSI<0x56, MRMSrcMem, (outs FR32:$dst), (ins FR32:$src1, f128mem:$src2), "orps {$src2, $dst|$dst, $src2}", [(set FR32:$dst, (X86for FR32:$src1, - (X86loadpf32 addr:$src2)))]>; + (alignedloadf32 addr:$src2)))]>; def FsXORPSrm : PSI<0x57, MRMSrcMem, (outs FR32:$dst), (ins FR32:$src1, f128mem:$src2), "xorps {$src2, $dst|$dst, $src2}", [(set FR32:$dst, (X86fxor FR32:$src1, - (X86loadpf32 addr:$src2)))]>; + (alignedloadf32 addr:$src2)))]>; def FsANDNPSrr : PSI<0x55, MRMSrcReg, (outs FR32:$dst), (ins FR32:$src1, FR32:$src2), @@ -1084,7 +1081,7 @@ // disregarded. def FsMOVAPDrm : PDI<0x28, MRMSrcMem, (outs FR64:$dst), (ins f128mem:$src), "movapd {$src, $dst|$dst, $src}", - [(set FR64:$dst, (X86loadpf64 addr:$src))]>; + [(set FR64:$dst, (alignedloadf64 addr:$src))]>; // Alias bitwise logical operations using SSE logical ops on packed FP values. let isTwoAddress = 1 in { @@ -1103,15 +1100,15 @@ def FsANDPDrm : PDI<0x54, MRMSrcMem, (outs FR64:$dst), (ins FR64:$src1, f128mem:$src2), "andpd {$src2, $dst|$dst, $src2}", [(set FR64:$dst, (X86fand FR64:$src1, - (X86loadpf64 addr:$src2)))]>; + (alignedloadf64 addr:$src2)))]>; def FsORPDrm : PDI<0x56, MRMSrcMem, (outs FR64:$dst), (ins FR64:$src1, f128mem:$src2), "orpd {$src2, $dst|$dst, $src2}", [(set FR64:$dst, (X86for FR64:$src1, - (X86loadpf64 addr:$src2)))]>; + (alignedloadf64 addr:$src2)))]>; def FsXORPDrm : PDI<0x57, MRMSrcMem, (outs FR64:$dst), (ins FR64:$src1, f128mem:$src2), "xorpd {$src2, $dst|$dst, $src2}", [(set FR64:$dst, (X86fxor FR64:$src1, - (X86loadpf64 addr:$src2)))]>; + (alignedloadf64 addr:$src2)))]>; def FsANDNPDrr : PDI<0x55, MRMSrcReg, (outs FR64:$dst), (ins FR64:$src1, FR64:$src2), @@ -2631,11 +2628,11 @@ (load addr:$src2))), (PANDNrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; -// Unaligned load -def : Pat<(v4f32 (X86loadu addr:$src)), (MOVUPSrm addr:$src)>, - Requires<[HasSSE1]>; - // Use movaps / movups for SSE integer load / store (one byte shorter). +def : Pat<(alignedloadv4i32 addr:$src), + (MOVAPSrm addr:$src)>, Requires<[HasSSE1]>; +def : Pat<(loadv4i32 addr:$src), + (MOVUPSrm addr:$src)>, Requires<[HasSSE1]>; def : Pat<(alignedloadv2i64 addr:$src), (MOVAPSrm addr:$src)>, Requires<[HasSSE2]>; def : Pat<(loadv2i64 addr:$src), Modified: llvm/trunk/test/CodeGen/X86/vec_shuffle.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_shuffle.ll?rev=40504&r1=40503&r2=40504&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/vec_shuffle.ll (original) +++ llvm/trunk/test/CodeGen/X86/vec_shuffle.ll Wed Jul 25 19:31:09 2007 @@ -1,6 +1,6 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f ; RUN: grep shufp %t | wc -l | grep 1 -; RUN: grep movups %t | wc -l | grep 1 +; RUN: grep movupd %t | wc -l | grep 1 ; RUN: grep pshufhw %t | wc -l | grep 1 void %test_v4sf(<4 x float>* %P, float %X, float %Y) { From alenhar2 at cs.uiuc.edu Wed Jul 25 19:36:59 2007 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Thu, 26 Jul 2007 00:36:59 -0000 Subject: [llvm-commits] [poolalloc] r40505 - in /poolalloc/branches/SVA/lib/DSA: Devirt.cpp Info.cpp Message-ID: <200707260036.l6Q0axLs014367@zion.cs.uiuc.edu> Author: alenhar2 Date: Wed Jul 25 19:36:58 2007 New Revision: 40505 URL: http://llvm.org/viewvc/llvm-project?rev=40505&view=rev Log: how did I forget these files Added: poolalloc/branches/SVA/lib/DSA/Devirt.cpp poolalloc/branches/SVA/lib/DSA/Info.cpp Added: poolalloc/branches/SVA/lib/DSA/Devirt.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/branches/SVA/lib/DSA/Devirt.cpp?rev=40505&view=auto ============================================================================== --- poolalloc/branches/SVA/lib/DSA/Devirt.cpp (added) +++ poolalloc/branches/SVA/lib/DSA/Devirt.cpp Wed Jul 25 19:36:58 2007 @@ -0,0 +1,176 @@ +//===- Devirt.cpp - Devirtualize using the sig match intrinsic in llva ----===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by the LLVM research group and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +#include "llvm/Transforms/IPO.h" +#include "dsa/CallTargets.h" +#include "llvm/Pass.h" +#include "llvm/Module.h" +#include "llvm/Function.h" +#include "llvm/Instructions.h" +#include "llvm/DerivedTypes.h" +#include "llvm/Support/CommandLine.h" +#include "llvm/ADT/Statistic.h" + +#include +#include +#include +#include + +using namespace llvm; + +namespace { + + static cl::opt + VirtualLimit("devirt-limit", cl::Hidden, cl::init(16), + cl::desc("Maximum number of callees to devirtualize at a call site")); + Statistic<> FuncAdded("devirt", "Number of bounce functions added"); + Statistic<> CSConvert("devirt", "Number of call sites converted"); + + + class Devirtualize : public ModulePass { + + + std::map >, Function*> cache; + int fnum; + + Function* buildBounce(CallSite cs, std::vector& Targets, Module& M) { + Value* ptr = cs.getCalledValue(); + const FunctionType* OrigType = + cast(cast(ptr->getType())->getElementType());; + ++FuncAdded; + + std::vector< const Type *> TP(OrigType->param_begin(), OrigType->param_end()); + TP.insert(TP.begin(), ptr->getType()); + const FunctionType* NewTy = FunctionType::get(OrigType->getReturnType(), TP, false); + Function* F = new Function(NewTy, GlobalValue::InternalLinkage, "devirtbounce", &M); + std::map targets; + + F->arg_begin()->setName("funcPtr"); + std::vector fargs; + for(Function::arg_iterator ai = F->arg_begin(), ae = F->arg_end(); ai != ae; ++ai) + if (ai != F->arg_begin()) { + fargs.push_back(ai); + ai->setName("arg"); + } + + for (std::vector::iterator i = Targets.begin(), e = Targets.end(); + i != e; ++i) { + Function* FL = *i; + BasicBlock* BL = new BasicBlock(FL->getName(), F); + targets[FL] = BL; + + //Make call + Value* call = new CallInst(FL, fargs, "", BL); + + //return correctly + if (OrigType->getReturnType() == Type::VoidTy) + new ReturnInst(0, BL); + else + new ReturnInst(call, BL); + } + + //hookup the test chain + BasicBlock* tail = new BasicBlock("fail", F, &F->getEntryBlock()); + new CallInst(M.getOrInsertFunction("pchk_ind_fail", Type::VoidTy, NULL), + "", tail); + new UnreachableInst(tail); + + for (std::vector::iterator i = Targets.begin(), e = Targets.end(); + i != e; ++i) { + BasicBlock* TB = targets[*i]; + BasicBlock* newB = new BasicBlock("test." + (*i)->getName(), F, &F->getEntryBlock()); + Value* p = F->arg_begin(); + SetCondInst* setcc = new SetCondInst(Instruction::SetEQ, *i, p, "sc", newB); + new BranchInst(TB, tail, setcc, newB); + tail = newB; + } + return F; + } + + public: + virtual bool runOnModule(Module &M) { + CallTargetFinder* CTF = &getAnalysis(); + bool changed = false; + + Function* ams = M.getNamedFunction("llva_assert_match_sig"); + + std::set safecalls; + + for (Value::use_iterator ii = ams->use_begin(), ee = ams->use_end(); + ii != ee; ++ii) { + if (CallInst* CI = dyn_cast(*ii)) { + std::cerr << "Found safe call site in " + << CI->getParent()->getParent()->getName() << "\n"; + Value* V = CI->getOperand(1); + CI->eraseFromParent(); + do { + safecalls.insert(V); + if (CastInst* CV = dyn_cast(V)) + V = CV->getOperand(0); + else V = 0; + } while (V); + } + } + + std::vector toDelete; + + for(std::set::iterator i = safecalls.begin(), e = safecalls.end(); + i != e; ++i) { + for (Value::use_iterator ii = (*i)->use_begin(), ie = (*i)->use_end(); + ii != ie; ++ii) { + CallSite cs = CallSite::get(*ii); + bool isSafeCall = cs.getInstruction() && + safecalls.find(cs.getCalledValue()) != safecalls.end(); + if (cs.getInstruction() && !cs.getCalledFunction() && + (isSafeCall || CTF->isComplete(cs))) { + std::vector Targets; + for (std::vector::iterator ii = CTF->begin(cs), ee = CTF->end(cs); + ii != ee; ++ii) + if (!isSafeCall || (*ii)->getType() == cs.getCalledValue()->getType()) + Targets.push_back(*ii); + + if (Targets.size() > 0) { + std::cerr << "Target count: " << Targets.size() << "\n"; + Function* NF = buildBounce(cs, Targets, M); + changed = true; + if (CallInst* ci = dyn_cast(cs.getInstruction())) { + ++CSConvert; + std::vector Par(ci->op_begin(), ci->op_end()); + CallInst* cn = new CallInst(NF, Par, + ci->getName() + ".dv", ci); + ci->replaceAllUsesWith(cn); + toDelete.push_back(ci); + } else if (InvokeInst* ci = dyn_cast(cs.getInstruction())) { + ++CSConvert; + std::vector Par(ci->op_begin(), ci->op_end()); + InvokeInst* cn = new InvokeInst(NF, ci->getNormalDest(), + ci->getUnwindDest(), + Par, ci->getName()+".dv", + ci); + ci->replaceAllUsesWith(cn); + toDelete.push_back(ci); + } + } + } + } + } + for (std::vector::iterator ii = toDelete.begin(), ee = toDelete.end(); + ii != ee; ++ii) + (*ii)->eraseFromParent(); + return changed; + } + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequired(); + } + + }; + + RegisterPass X("devirt", "Devirtualization"); + +} Added: poolalloc/branches/SVA/lib/DSA/Info.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/branches/SVA/lib/DSA/Info.cpp?rev=40505&view=auto ============================================================================== --- poolalloc/branches/SVA/lib/DSA/Info.cpp (added) +++ poolalloc/branches/SVA/lib/DSA/Info.cpp Wed Jul 25 19:36:58 2007 @@ -0,0 +1,28 @@ +#include "llvm/Pass.h" +#include "llvm/Function.h" +#include "llvm/BasicBlock.h" +#include "llvm/Instructions.h" +#include "llvm/ADT/Statistic.h" + +using namespace llvm; + +Statistic<> Direct("calltarget", "Number of direct calls"); +Statistic<> Indirect("calltarget", "Number of indirect calls"); + + +namespace { + struct CallInfo : public FunctionPass { + virtual bool runOnFunction(Function &F) { + for (Function::iterator BI = F.begin(), BE = F.end(); BI != BE; ++BI) + for (BasicBlock::iterator II = BI->begin(), IE = BI->end(); II != IE; ++II) + if (CallInst* CI = dyn_cast(&*II)) + if (CI->getCalledFunction()) + ++Direct; + else + ++Indirect; + return false; + } + }; + + RegisterPass X("call-info", "Call Info Pass"); +} From christopher.lamb at gmail.com Wed Jul 25 20:46:52 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Thu, 26 Jul 2007 01:46:52 -0000 Subject: [llvm-commits] [llvm] r40506 - in /llvm/trunk: include/llvm/CodeGen/ValueTypes.h include/llvm/CodeGen/ValueTypes.td lib/VMCore/ValueTypes.cpp Message-ID: <200707260146.l6Q1krMB018665@zion.cs.uiuc.edu> Author: clamb Date: Wed Jul 25 20:46:52 2007 New Revision: 40506 URL: http://llvm.org/viewvc/llvm-project?rev=40506&view=rev Log: Add support for 3 element 32-bit vector ValueTypes. Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h llvm/trunk/include/llvm/CodeGen/ValueTypes.td llvm/trunk/lib/VMCore/ValueTypes.cpp Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.h?rev=40506&r1=40505&r2=40506&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original) +++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Wed Jul 25 20:46:52 2007 @@ -52,16 +52,19 @@ v1i64 = 16, // 1 x i64 v16i8 = 17, // 16 x i8 v8i16 = 18, // 8 x i16 - v4i32 = 19, // 4 x i32 - v2i64 = 20, // 2 x i64 - - v2f32 = 21, // 2 x f32 - v4f32 = 22, // 4 x f32 - v2f64 = 23, // 2 x f64 + v3i32 = 19, // 3 x i32 + v4i32 = 20, // 4 x i32 + v2i64 = 21, // 2 x i64 + + v2f32 = 22, // 2 x f32 + v3f32 = 23, // 3 x f32 + v4f32 = 24, // 4 x f32 + v2f64 = 25, // 2 x f64 + FIRST_VECTOR_VALUETYPE = v8i8, LAST_VECTOR_VALUETYPE = v2f64, - LAST_VALUETYPE = 24, // This always remains at the end of the list. + LAST_VALUETYPE = 26, // This always remains at the end of the list. // iAny - An integer value of any bit width. This is used for intrinsics // that have overloadings based on integer bit widths. This is only for @@ -133,10 +136,12 @@ case v4i16: case v8i16: return i16; case v2i32: + case v3i32: case v4i32: return i32; case v1i64: case v2i64: return i64; case v2f32: + case v3f32: case v4f32: return f32; case v2f64: return f64; } @@ -156,6 +161,8 @@ case v4i16: case v4i32: case v4f32: return 4; + case v3i32: + case v3f32: return 3; case v2i32: case v2i64: case v2f32: @@ -187,6 +194,8 @@ case MVT::v1i64: case MVT::v2f32: return 64; case MVT::f80 : return 80; + case MVT::v3i32: + case MVT::v3f32: return 96; case MVT::f128: case MVT::i128: case MVT::v16i8: @@ -215,6 +224,7 @@ break; case MVT::i32: if (NumElements == 2) return MVT::v2i32; + if (NumElements == 3) return MVT::v3i32; if (NumElements == 4) return MVT::v4i32; break; case MVT::i64: @@ -223,6 +233,7 @@ break; case MVT::f32: if (NumElements == 2) return MVT::v2f32; + if (NumElements == 3) return MVT::v3f32; if (NumElements == 4) return MVT::v4f32; break; case MVT::f64: @@ -244,6 +255,7 @@ default: return getVectorType(i8, NumElts); case 1: return v1i64; case 2: return v2i32; + case 3: return v3i32; case 4: return v4i16; case 8: return v8i8; case 16: return v16i8; Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.td?rev=40506&r1=40505&r2=40506&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/ValueTypes.td (original) +++ llvm/trunk/include/llvm/CodeGen/ValueTypes.td Wed Jul 25 20:46:52 2007 @@ -39,11 +39,14 @@ def v16i8 : ValueType<128, 17>; // 16 x i8 vector value def v8i16 : ValueType<128, 18>; // 8 x i16 vector value -def v4i32 : ValueType<128, 19>; // 4 x i32 vector value -def v2i64 : ValueType<128, 20>; // 2 x i64 vector value -def v2f32 : ValueType<64, 21>; // 2 x f32 vector value -def v4f32 : ValueType<128, 22>; // 4 x f32 vector value -def v2f64 : ValueType<128, 23>; // 2 x f64 vector value +def v3i32 : ValueType<96 , 19>; // 3 x f32 vector value +def v4i32 : ValueType<128, 20>; // 4 x i32 vector value +def v2i64 : ValueType<128, 21>; // 2 x i64 vector value + +def v2f32 : ValueType<64, 22>; // 2 x f32 vector value +def v3f32 : ValueType<96 , 23>; // 3 x f64 vector value +def v4f32 : ValueType<128, 24>; // 4 x f32 vector value +def v2f64 : ValueType<128, 25>; // 2 x f64 vector value // Pseudo valuetype to represent "integer of any bit width" def iAny : ValueType<0 , 254>; // integer value of any bit width Modified: llvm/trunk/lib/VMCore/ValueTypes.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ValueTypes.cpp?rev=40506&r1=40505&r2=40506&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/ValueTypes.cpp (original) +++ llvm/trunk/lib/VMCore/ValueTypes.cpp Wed Jul 25 20:46:52 2007 @@ -50,6 +50,8 @@ case MVT::v2f32: return "v2f32"; case MVT::v4f32: return "v4f32"; case MVT::v2f64: return "v2f64"; + case MVT::v3i32: return "v3i32"; + case MVT::v3f32: return "v3f32"; } } @@ -83,6 +85,8 @@ case MVT::v2f32: return VectorType::get(Type::FloatTy, 2); case MVT::v4f32: return VectorType::get(Type::FloatTy, 4); case MVT::v2f64: return VectorType::get(Type::DoubleTy, 2); + case MVT::v3i32: return VectorType::get(Type::Int32Ty, 3); + case MVT::v3f32: return VectorType::get(Type::FloatTy, 3); } } From christopher.lamb at gmail.com Wed Jul 25 20:48:57 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Thu, 26 Jul 2007 01:48:57 -0000 Subject: [llvm-commits] [llvm] r40507 - /llvm/trunk/include/llvm/CodeGen/ValueTypes.td Message-ID: <200707260148.l6Q1mviW018888@zion.cs.uiuc.edu> Author: clamb Date: Wed Jul 25 20:48:57 2007 New Revision: 40507 URL: http://llvm.org/viewvc/llvm-project?rev=40507&view=rev Log: Fix comments for new types. Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.td Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.td?rev=40507&r1=40506&r2=40507&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/ValueTypes.td (original) +++ llvm/trunk/include/llvm/CodeGen/ValueTypes.td Wed Jul 25 20:48:57 2007 @@ -39,12 +39,12 @@ def v16i8 : ValueType<128, 17>; // 16 x i8 vector value def v8i16 : ValueType<128, 18>; // 8 x i16 vector value -def v3i32 : ValueType<96 , 19>; // 3 x f32 vector value +def v3i32 : ValueType<96 , 19>; // 3 x i32 vector value def v4i32 : ValueType<128, 20>; // 4 x i32 vector value def v2i64 : ValueType<128, 21>; // 2 x i64 vector value def v2f32 : ValueType<64, 22>; // 2 x f32 vector value -def v3f32 : ValueType<96 , 23>; // 3 x f64 vector value +def v3f32 : ValueType<96 , 23>; // 3 x f32 vector value def v4f32 : ValueType<128, 24>; // 4 x f32 vector value def v2f64 : ValueType<128, 25>; // 2 x f64 vector value From christopher.lamb at gmail.com Wed Jul 25 22:33:13 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Thu, 26 Jul 2007 03:33:13 -0000 Subject: [llvm-commits] [llvm] r40510 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Message-ID: <200707260333.l6Q3XDbI023557@zion.cs.uiuc.edu> Author: clamb Date: Wed Jul 25 22:33:13 2007 New Revision: 40510 URL: http://llvm.org/viewvc/llvm-project?rev=40510&view=rev Log: Fix infinite recursion for when extract_vector_elt is legal. Unfortunately no public targets use this code-path, so no test. Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=40510&r1=40509&r2=40510&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Jul 25 22:33:13 2007 @@ -3605,7 +3605,7 @@ if (isTypeLegal(TVT)) { Vec = LegalizeOp(Vec); Op = DAG.UpdateNodeOperands(Op, Vec, Idx); - Op = LegalizeOp(Op); + return Op; } break; case TargetLowering::Expand: From clattner at apple.com Thu Jul 26 00:47:43 2007 From: clattner at apple.com (Chris Lattner) Date: Wed, 25 Jul 2007 22:47:43 -0700 Subject: [llvm-commits] [llvm] r40502 - /llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp In-Reply-To: <200707252341.l6PNfacl011379@zion.cs.uiuc.edu> References: <200707252341.l6PNfacl011379@zion.cs.uiuc.edu> Message-ID: <440068D0-CCFC-4ADC-9C76-919E1EE6441D@apple.com> On Jul 25, 2007, at 4:41 PM, Evan Cheng wrote: > Author: evancheng > Date: Wed Jul 25 18:41:36 2007 > New Revision: 40502 > > URL: http://llvm.org/viewvc/llvm-project?rev=40502&view=rev > Log: > Mac OS X x86-64 lower 4G address is not available. Hi Evan, Would it be better to have the X86 backend change the relo module to mdynamic-no-pic on darwin? It seems strange to test the os in a low- level place like this. -Chirs > Modified: > llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp > > Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/ > X86ISelDAGToDAG.cpp?rev=40502&r1=40501&r2=40502&view=diff > > ====================================================================== > ======== > --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) > +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Jul 25 > 18:41:36 2007 > @@ -615,7 +615,8 @@ > SDOperand N0 = N.getOperand(0); > if (GlobalAddressSDNode *G = dyn_cast > (N0)) { > GlobalValue *GV = G->getGlobal(); > - bool isAbs32 = !is64Bit || isStatic; > + // Mac OS X X86-64 lower 4G address is not available. > + bool isAbs32 = !is64Bit || (isStatic && !Subtarget- > >isTargetDarwin()); > if (isAbs32 || isRoot) { > AM.GV = GV; > AM.Disp += G->getOffset(); > > > _______________________________________________ > 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 Thu Jul 26 00:50:44 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 25 Jul 2007 22:50:44 -0700 Subject: [llvm-commits] [llvm] r40506 - in /llvm/trunk: include/llvm/CodeGen/ValueTypes.h include/llvm/CodeGen/ValueTypes.td lib/VMCore/ValueTypes.cpp In-Reply-To: <200707260146.l6Q1krMB018665@zion.cs.uiuc.edu> References: <200707260146.l6Q1krMB018665@zion.cs.uiuc.edu> Message-ID: Hi Chris, Can codegen handle non-pow 2 vector types? Are you planning to add it soon? :-) Also, can you check if tblgen need to be taught the new types? I'm away from my Mac so I can't check. Thanks, Evan Sent from my iPhone On Jul 25, 2007, at 6:46 PM, Christopher Lamb wrote: > Author: clamb > Date: Wed Jul 25 20:46:52 2007 > New Revision: 40506 > > URL: http://llvm.org/viewvc/llvm-project?rev=40506&view=rev > Log: > Add support for 3 element 32-bit vector ValueTypes. > > Modified: > llvm/trunk/include/llvm/CodeGen/ValueTypes.h > llvm/trunk/include/llvm/CodeGen/ValueTypes.td > llvm/trunk/lib/VMCore/ValueTypes.cpp > > Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.h?rev=40506&r1=40505&r2=40506&view=diff > > === > === > === > ===================================================================== > --- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original) > +++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Wed Jul 25 20:46:52 > 2007 > @@ -52,16 +52,19 @@ > v1i64 = 16, // 1 x i64 > v16i8 = 17, // 16 x i8 > v8i16 = 18, // 8 x i16 > - v4i32 = 19, // 4 x i32 > - v2i64 = 20, // 2 x i64 > - > - v2f32 = 21, // 2 x f32 > - v4f32 = 22, // 4 x f32 > - v2f64 = 23, // 2 x f64 > + v3i32 = 19, // 3 x i32 > + v4i32 = 20, // 4 x i32 > + v2i64 = 21, // 2 x i64 > + > + v2f32 = 22, // 2 x f32 > + v3f32 = 23, // 3 x f32 > + v4f32 = 24, // 4 x f32 > + v2f64 = 25, // 2 x f64 > + > FIRST_VECTOR_VALUETYPE = v8i8, > LAST_VECTOR_VALUETYPE = v2f64, > > - LAST_VALUETYPE = 24, // This always remains at the end of > the list. > + LAST_VALUETYPE = 26, // This always remains at the end of > the list. > > // iAny - An integer value of any bit width. This is used for > intrinsics > // that have overloadings based on integer bit widths. This is > only for > @@ -133,10 +136,12 @@ > case v4i16: > case v8i16: return i16; > case v2i32: > + case v3i32: > case v4i32: return i32; > case v1i64: > case v2i64: return i64; > case v2f32: > + case v3f32: > case v4f32: return f32; > case v2f64: return f64; > } > @@ -156,6 +161,8 @@ > case v4i16: > case v4i32: > case v4f32: return 4; > + case v3i32: > + case v3f32: return 3; > case v2i32: > case v2i64: > case v2f32: > @@ -187,6 +194,8 @@ > case MVT::v1i64: > case MVT::v2f32: return 64; > case MVT::f80 : return 80; > + case MVT::v3i32: > + case MVT::v3f32: return 96; > case MVT::f128: > case MVT::i128: > case MVT::v16i8: > @@ -215,6 +224,7 @@ > break; > case MVT::i32: > if (NumElements == 2) return MVT::v2i32; > + if (NumElements == 3) return MVT::v3i32; > if (NumElements == 4) return MVT::v4i32; > break; > case MVT::i64: > @@ -223,6 +233,7 @@ > break; > case MVT::f32: > if (NumElements == 2) return MVT::v2f32; > + if (NumElements == 3) return MVT::v3f32; > if (NumElements == 4) return MVT::v4f32; > break; > case MVT::f64: > @@ -244,6 +255,7 @@ > default: return getVectorType(i8, NumElts); > case 1: return v1i64; > case 2: return v2i32; > + case 3: return v3i32; > case 4: return v4i16; > case 8: return v8i8; > case 16: return v16i8; > > Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.td > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.td?rev=40506&r1=40505&r2=40506&view=diff > > === > === > === > ===================================================================== > --- llvm/trunk/include/llvm/CodeGen/ValueTypes.td (original) > +++ llvm/trunk/include/llvm/CodeGen/ValueTypes.td Wed Jul 25 > 20:46:52 2007 > @@ -39,11 +39,14 @@ > > def v16i8 : ValueType<128, 17>; // 16 x i8 vector value > def v8i16 : ValueType<128, 18>; // 8 x i16 vector value > -def v4i32 : ValueType<128, 19>; // 4 x i32 vector value > -def v2i64 : ValueType<128, 20>; // 2 x i64 vector value > -def v2f32 : ValueType<64, 21>; // 2 x f32 vector value > -def v4f32 : ValueType<128, 22>; // 4 x f32 vector value > -def v2f64 : ValueType<128, 23>; // 2 x f64 vector value > +def v3i32 : ValueType<96 , 19>; // 3 x f32 vector value > +def v4i32 : ValueType<128, 20>; // 4 x i32 vector value > +def v2i64 : ValueType<128, 21>; // 2 x i64 vector value > + > +def v2f32 : ValueType<64, 22>; // 2 x f32 vector value > +def v3f32 : ValueType<96 , 23>; // 3 x f64 vector value > +def v4f32 : ValueType<128, 24>; // 4 x f32 vector value > +def v2f64 : ValueType<128, 25>; // 2 x f64 vector value > > // Pseudo valuetype to represent "integer of any bit width" > def iAny : ValueType<0 , 254>; // integer value of any bit width > > Modified: llvm/trunk/lib/VMCore/ValueTypes.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ValueTypes.cpp?rev=40506&r1=40505&r2=40506&view=diff > > === > === > === > ===================================================================== > --- llvm/trunk/lib/VMCore/ValueTypes.cpp (original) > +++ llvm/trunk/lib/VMCore/ValueTypes.cpp Wed Jul 25 20:46:52 2007 > @@ -50,6 +50,8 @@ > case MVT::v2f32: return "v2f32"; > case MVT::v4f32: return "v4f32"; > case MVT::v2f64: return "v2f64"; > + case MVT::v3i32: return "v3i32"; > + case MVT::v3f32: return "v3f32"; > } > } > > @@ -83,6 +85,8 @@ > case MVT::v2f32: return VectorType::get(Type::FloatTy, 2); > case MVT::v4f32: return VectorType::get(Type::FloatTy, 4); > case MVT::v2f64: return VectorType::get(Type::DoubleTy, 2); > + case MVT::v3i32: return VectorType::get(Type::Int32Ty, 3); > + case MVT::v3f32: return VectorType::get(Type::FloatTy, 3); > } > } > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From christopher.lamb at gmail.com Thu Jul 26 01:02:41 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Wed, 25 Jul 2007 23:02:41 -0700 Subject: [llvm-commits] [llvm] r40506 - in /llvm/trunk: include/llvm/CodeGen/ValueTypes.h include/llvm/CodeGen/ValueTypes.td lib/VMCore/ValueTypes.cpp In-Reply-To: References: <200707260146.l6Q1krMB018665@zion.cs.uiuc.edu> Message-ID: On Jul 25, 2007, at 10:50 PM, Evan Cheng wrote: > Hi Chris, > > Can codegen handle non-pow 2 vector types? Are you planning to add it > soon? :-) On my local copy codegen appears to be able to handle non-pow 2 vector types, but still can't handle passing non-legal vector types by value to functions. To enable this there are some other changes that have to happen as well in the FE and middle end. Mostly disabling the pow-2 checks. I've got a hefty vreg subreg patch that I'm preparing for review too... > Also, can you check if tblgen need to be taught the new types? I'm > away from my Mac so I can't check. I think the ValueTypes.td changes cover that. I've been using these types in our target's .td files for quite a while now. > Sent from my iPhone Rub it in, eh? =) -- Chris > On Jul 25, 2007, at 6:46 PM, Christopher Lamb > > wrote: > >> Author: clamb >> Date: Wed Jul 25 20:46:52 2007 >> New Revision: 40506 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=40506&view=rev >> Log: >> Add support for 3 element 32-bit vector ValueTypes. >> >> Modified: >> llvm/trunk/include/llvm/CodeGen/ValueTypes.h >> llvm/trunk/include/llvm/CodeGen/ValueTypes.td >> llvm/trunk/lib/VMCore/ValueTypes.cpp >> >> Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ >> CodeGen/ValueTypes.h?rev=40506&r1=40505&r2=40506&view=diff >> >> === >> === >> === >> ===================================================================== >> --- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original) >> +++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Wed Jul 25 20:46:52 >> 2007 >> @@ -52,16 +52,19 @@ >> v1i64 = 16, // 1 x i64 >> v16i8 = 17, // 16 x i8 >> v8i16 = 18, // 8 x i16 >> - v4i32 = 19, // 4 x i32 >> - v2i64 = 20, // 2 x i64 >> - >> - v2f32 = 21, // 2 x f32 >> - v4f32 = 22, // 4 x f32 >> - v2f64 = 23, // 2 x f64 >> + v3i32 = 19, // 3 x i32 >> + v4i32 = 20, // 4 x i32 >> + v2i64 = 21, // 2 x i64 >> + >> + v2f32 = 22, // 2 x f32 >> + v3f32 = 23, // 3 x f32 >> + v4f32 = 24, // 4 x f32 >> + v2f64 = 25, // 2 x f64 >> + >> FIRST_VECTOR_VALUETYPE = v8i8, >> LAST_VECTOR_VALUETYPE = v2f64, >> >> - LAST_VALUETYPE = 24, // This always remains at the end of >> the list. >> + LAST_VALUETYPE = 26, // This always remains at the end of >> the list. >> >> // iAny - An integer value of any bit width. This is used for >> intrinsics >> // that have overloadings based on integer bit widths. This is >> only for >> @@ -133,10 +136,12 @@ >> case v4i16: >> case v8i16: return i16; >> case v2i32: >> + case v3i32: >> case v4i32: return i32; >> case v1i64: >> case v2i64: return i64; >> case v2f32: >> + case v3f32: >> case v4f32: return f32; >> case v2f64: return f64; >> } >> @@ -156,6 +161,8 @@ >> case v4i16: >> case v4i32: >> case v4f32: return 4; >> + case v3i32: >> + case v3f32: return 3; >> case v2i32: >> case v2i64: >> case v2f32: >> @@ -187,6 +194,8 @@ >> case MVT::v1i64: >> case MVT::v2f32: return 64; >> case MVT::f80 : return 80; >> + case MVT::v3i32: >> + case MVT::v3f32: return 96; >> case MVT::f128: >> case MVT::i128: >> case MVT::v16i8: >> @@ -215,6 +224,7 @@ >> break; >> case MVT::i32: >> if (NumElements == 2) return MVT::v2i32; >> + if (NumElements == 3) return MVT::v3i32; >> if (NumElements == 4) return MVT::v4i32; >> break; >> case MVT::i64: >> @@ -223,6 +233,7 @@ >> break; >> case MVT::f32: >> if (NumElements == 2) return MVT::v2f32; >> + if (NumElements == 3) return MVT::v3f32; >> if (NumElements == 4) return MVT::v4f32; >> break; >> case MVT::f64: >> @@ -244,6 +255,7 @@ >> default: return getVectorType(i8, NumElts); >> case 1: return v1i64; >> case 2: return v2i32; >> + case 3: return v3i32; >> case 4: return v4i16; >> case 8: return v8i8; >> case 16: return v16i8; >> >> Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.td >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ >> CodeGen/ValueTypes.td?rev=40506&r1=40505&r2=40506&view=diff >> >> === >> === >> === >> ===================================================================== >> --- llvm/trunk/include/llvm/CodeGen/ValueTypes.td (original) >> +++ llvm/trunk/include/llvm/CodeGen/ValueTypes.td Wed Jul 25 >> 20:46:52 2007 >> @@ -39,11 +39,14 @@ >> >> def v16i8 : ValueType<128, 17>; // 16 x i8 vector value >> def v8i16 : ValueType<128, 18>; // 8 x i16 vector value >> -def v4i32 : ValueType<128, 19>; // 4 x i32 vector value >> -def v2i64 : ValueType<128, 20>; // 2 x i64 vector value >> -def v2f32 : ValueType<64, 21>; // 2 x f32 vector value >> -def v4f32 : ValueType<128, 22>; // 4 x f32 vector value >> -def v2f64 : ValueType<128, 23>; // 2 x f64 vector value >> +def v3i32 : ValueType<96 , 19>; // 3 x f32 vector value >> +def v4i32 : ValueType<128, 20>; // 4 x i32 vector value >> +def v2i64 : ValueType<128, 21>; // 2 x i64 vector value >> + >> +def v2f32 : ValueType<64, 22>; // 2 x f32 vector value >> +def v3f32 : ValueType<96 , 23>; // 3 x f64 vector value >> +def v4f32 : ValueType<128, 24>; // 4 x f32 vector value >> +def v2f64 : ValueType<128, 25>; // 2 x f64 vector value >> >> // Pseudo valuetype to represent "integer of any bit width" >> def iAny : ValueType<0 , 254>; // integer value of any bit width >> >> Modified: llvm/trunk/lib/VMCore/ValueTypes.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ >> ValueTypes.cpp?rev=40506&r1=40505&r2=40506&view=diff >> >> === >> === >> === >> ===================================================================== >> --- llvm/trunk/lib/VMCore/ValueTypes.cpp (original) >> +++ llvm/trunk/lib/VMCore/ValueTypes.cpp Wed Jul 25 20:46:52 2007 >> @@ -50,6 +50,8 @@ >> case MVT::v2f32: return "v2f32"; >> case MVT::v4f32: return "v4f32"; >> case MVT::v2f64: return "v2f64"; >> + case MVT::v3i32: return "v3i32"; >> + case MVT::v3f32: return "v3f32"; >> } >> } >> >> @@ -83,6 +85,8 @@ >> case MVT::v2f32: return VectorType::get(Type::FloatTy, 2); >> case MVT::v4f32: return VectorType::get(Type::FloatTy, 4); >> case MVT::v2f64: return VectorType::get(Type::DoubleTy, 2); >> + case MVT::v3i32: return VectorType::get(Type::Int32Ty, 3); >> + case MVT::v3f32: return VectorType::get(Type::FloatTy, 3); >> } >> } >> >> >> >> _______________________________________________ >> 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 -- Christopher Lamb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070725/0ab372bd/attachment.html From clamb at ageia.com Thu Jul 26 01:03:51 2007 From: clamb at ageia.com (Christopher Lamb) Date: Wed, 25 Jul 2007 23:03:51 -0700 Subject: [llvm-commits] [llvm] r40506 - in /llvm/trunk: include/llvm/CodeGen/ValueTypes.h include/llvm/CodeGen/ValueTypes.td lib/VMCore/ValueTypes.cpp In-Reply-To: References: <200707260146.l6Q1krMB018665@zion.cs.uiuc.edu> Message-ID: <6BB778BC-CC18-477C-B0BB-E81FBFA344A1@ageia.com> On Jul 25, 2007, at 11:02 PM, Christopher Lamb wrote: > > On Jul 25, 2007, at 10:50 PM, Evan Cheng wrote: > >> Hi Chris, >> >> Can codegen handle non-pow 2 vector types? Are you planning to add it >> soon? :-) > > On my local copy codegen appears to be able to handle non-pow 2 > vector types, but still can't handle passing non-legal vector types > by value to functions. To enable this by this, I mean the level of support I currently have locally > there are some other changes that have to happen as well in the FE > and middle end. Mostly disabling the pow-2 checks. I've got a hefty > vreg subreg patch that I'm preparing for review too... > >> Also, can you check if tblgen need to be taught the new types? I'm >> away from my Mac so I can't check. > > I think the ValueTypes.td changes cover that. I've been using these > types in our target's .td files for quite a while now. > >> Sent from my iPhone > > Rub it in, eh? =) > -- > Chris > > >> On Jul 25, 2007, at 6:46 PM, Christopher Lamb >> >> wrote: >> >>> Author: clamb >>> Date: Wed Jul 25 20:46:52 2007 >>> New Revision: 40506 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=40506&view=rev >>> Log: >>> Add support for 3 element 32-bit vector ValueTypes. >>> >>> Modified: >>> llvm/trunk/include/llvm/CodeGen/ValueTypes.h >>> llvm/trunk/include/llvm/CodeGen/ValueTypes.td >>> llvm/trunk/lib/VMCore/ValueTypes.cpp >>> >>> Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h >>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ >>> CodeGen/ValueTypes.h?rev=40506&r1=40505&r2=40506&view=diff >>> >>> === >>> === >>> === >>> ==================================================================== >>> = >>> --- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original) >>> +++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Wed Jul 25 20:46:52 >>> 2007 >>> @@ -52,16 +52,19 @@ >>> v1i64 = 16, // 1 x i64 >>> v16i8 = 17, // 16 x i8 >>> v8i16 = 18, // 8 x i16 >>> - v4i32 = 19, // 4 x i32 >>> - v2i64 = 20, // 2 x i64 >>> - >>> - v2f32 = 21, // 2 x f32 >>> - v4f32 = 22, // 4 x f32 >>> - v2f64 = 23, // 2 x f64 >>> + v3i32 = 19, // 3 x i32 >>> + v4i32 = 20, // 4 x i32 >>> + v2i64 = 21, // 2 x i64 >>> + >>> + v2f32 = 22, // 2 x f32 >>> + v3f32 = 23, // 3 x f32 >>> + v4f32 = 24, // 4 x f32 >>> + v2f64 = 25, // 2 x f64 >>> + >>> FIRST_VECTOR_VALUETYPE = v8i8, >>> LAST_VECTOR_VALUETYPE = v2f64, >>> >>> - LAST_VALUETYPE = 24, // This always remains at the end of >>> the list. >>> + LAST_VALUETYPE = 26, // This always remains at the end of >>> the list. >>> >>> // iAny - An integer value of any bit width. This is used for >>> intrinsics >>> // that have overloadings based on integer bit widths. This is >>> only for >>> @@ -133,10 +136,12 @@ >>> case v4i16: >>> case v8i16: return i16; >>> case v2i32: >>> + case v3i32: >>> case v4i32: return i32; >>> case v1i64: >>> case v2i64: return i64; >>> case v2f32: >>> + case v3f32: >>> case v4f32: return f32; >>> case v2f64: return f64; >>> } >>> @@ -156,6 +161,8 @@ >>> case v4i16: >>> case v4i32: >>> case v4f32: return 4; >>> + case v3i32: >>> + case v3f32: return 3; >>> case v2i32: >>> case v2i64: >>> case v2f32: >>> @@ -187,6 +194,8 @@ >>> case MVT::v1i64: >>> case MVT::v2f32: return 64; >>> case MVT::f80 : return 80; >>> + case MVT::v3i32: >>> + case MVT::v3f32: return 96; >>> case MVT::f128: >>> case MVT::i128: >>> case MVT::v16i8: >>> @@ -215,6 +224,7 @@ >>> break; >>> case MVT::i32: >>> if (NumElements == 2) return MVT::v2i32; >>> + if (NumElements == 3) return MVT::v3i32; >>> if (NumElements == 4) return MVT::v4i32; >>> break; >>> case MVT::i64: >>> @@ -223,6 +233,7 @@ >>> break; >>> case MVT::f32: >>> if (NumElements == 2) return MVT::v2f32; >>> + if (NumElements == 3) return MVT::v3f32; >>> if (NumElements == 4) return MVT::v4f32; >>> break; >>> case MVT::f64: >>> @@ -244,6 +255,7 @@ >>> default: return getVectorType(i8, NumElts); >>> case 1: return v1i64; >>> case 2: return v2i32; >>> + case 3: return v3i32; >>> case 4: return v4i16; >>> case 8: return v8i8; >>> case 16: return v16i8; >>> >>> Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.td >>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ >>> CodeGen/ValueTypes.td?rev=40506&r1=40505&r2=40506&view=diff >>> >>> === >>> === >>> === >>> ==================================================================== >>> = >>> --- llvm/trunk/include/llvm/CodeGen/ValueTypes.td (original) >>> +++ llvm/trunk/include/llvm/CodeGen/ValueTypes.td Wed Jul 25 >>> 20:46:52 2007 >>> @@ -39,11 +39,14 @@ >>> >>> def v16i8 : ValueType<128, 17>; // 16 x i8 vector value >>> def v8i16 : ValueType<128, 18>; // 8 x i16 vector value >>> -def v4i32 : ValueType<128, 19>; // 4 x i32 vector value >>> -def v2i64 : ValueType<128, 20>; // 2 x i64 vector value >>> -def v2f32 : ValueType<64, 21>; // 2 x f32 vector value >>> -def v4f32 : ValueType<128, 22>; // 4 x f32 vector value >>> -def v2f64 : ValueType<128, 23>; // 2 x f64 vector value >>> +def v3i32 : ValueType<96 , 19>; // 3 x f32 vector value >>> +def v4i32 : ValueType<128, 20>; // 4 x i32 vector value >>> +def v2i64 : ValueType<128, 21>; // 2 x i64 vector value >>> + >>> +def v2f32 : ValueType<64, 22>; // 2 x f32 vector value >>> +def v3f32 : ValueType<96 , 23>; // 3 x f64 vector value >>> +def v4f32 : ValueType<128, 24>; // 4 x f32 vector value >>> +def v2f64 : ValueType<128, 25>; // 2 x f64 vector value >>> >>> // Pseudo valuetype to represent "integer of any bit width" >>> def iAny : ValueType<0 , 254>; // integer value of any bit >>> width >>> >>> Modified: llvm/trunk/lib/VMCore/ValueTypes.cpp >>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ >>> ValueTypes.cpp?rev=40506&r1=40505&r2=40506&view=diff >>> >>> === >>> === >>> === >>> ==================================================================== >>> = >>> --- llvm/trunk/lib/VMCore/ValueTypes.cpp (original) >>> +++ llvm/trunk/lib/VMCore/ValueTypes.cpp Wed Jul 25 20:46:52 2007 >>> @@ -50,6 +50,8 @@ >>> case MVT::v2f32: return "v2f32"; >>> case MVT::v4f32: return "v4f32"; >>> case MVT::v2f64: return "v2f64"; >>> + case MVT::v3i32: return "v3i32"; >>> + case MVT::v3f32: return "v3f32"; >>> } >>> } >>> >>> @@ -83,6 +85,8 @@ >>> case MVT::v2f32: return VectorType::get(Type::FloatTy, 2); >>> case MVT::v4f32: return VectorType::get(Type::FloatTy, 4); >>> case MVT::v2f64: return VectorType::get(Type::DoubleTy, 2); >>> + case MVT::v3i32: return VectorType::get(Type::Int32Ty, 3); >>> + case MVT::v3f32: return VectorType::get(Type::FloatTy, 3); >>> } >>> } >>> >>> >>> >>> _______________________________________________ >>> 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 > > -- > Christopher Lamb > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070725/44a99554/attachment.html From sabre at nondot.org Thu Jul 26 01:08:11 2007 From: sabre at nondot.org (Chris Lattner) Date: Thu, 26 Jul 2007 01:08:11 -0500 Subject: [llvm-commits] CVS: llvm-www/pubs/2007-07-25-LLVM-2.0-and-Beyond.html 2007-07-25-LLVM-2.0-and-Beyond.pdf Message-ID: <200707260608.l6Q68Bpv029117@zion.cs.uiuc.edu> Changes in directory llvm-www/pubs: 2007-07-25-LLVM-2.0-and-Beyond.html added (r1.1) 2007-07-25-LLVM-2.0-and-Beyond.pdf added (r1.1) --- Log message: new talk --- Diffs of the changes: (+41 -0) 2007-07-25-LLVM-2.0-and-Beyond.html | 41 ++++++++++++++++++++++++++++++++++++ 2007-07-25-LLVM-2.0-and-Beyond.pdf | 0 2 files changed, 41 insertions(+) Index: llvm-www/pubs/2007-07-25-LLVM-2.0-and-Beyond.html diff -c /dev/null llvm-www/pubs/2007-07-25-LLVM-2.0-and-Beyond.html:1.1 *** /dev/null Thu Jul 26 01:07:58 2007 --- llvm-www/pubs/2007-07-25-LLVM-2.0-and-Beyond.html Thu Jul 26 01:07:48 2007 *************** *** 0 **** --- 1,41 ---- + + + + + + LLVM 2.0 and Beyond! + + + +
    + LLVM 2.0 and Beyond! +
    + + +

    Abstract:

    +
    +

    + The LLVM 2.0 release brings a number of new features and capabilities to + the LLVM toolset. This talk briefly describes those features, then moves + on to talk about what is next: llvm 2.1, llvm-gcc 4.2, and puts a special + emphasis on the 'clang' C front-end. This describes how the 'clang' + preprocessor can be used to improve the scalability of distcc by up to + 4.4x.

    + +
    + +

    Published:

    +
    + "LLVM 2.0 and Beyond!", Chris Lattner,
    + Google Tech Talk, Mountain View, CA, July 2007.
    +
    + +

    Download Presentation:

    + + + + Index: llvm-www/pubs/2007-07-25-LLVM-2.0-and-Beyond.pdf From sabre at nondot.org Thu Jul 26 01:09:37 2007 From: sabre at nondot.org (Chris Lattner) Date: Thu, 26 Jul 2007 01:09:37 -0500 Subject: [llvm-commits] CVS: llvm-www/pubs/index.html Message-ID: <200707260609.l6Q69bYK029184@zion.cs.uiuc.edu> Changes in directory llvm-www/pubs: index.html updated: 1.56 -> 1.57 --- Log message: add new talk to index --- Diffs of the changes: (+8 -2) index.html | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) Index: llvm-www/pubs/index.html diff -u llvm-www/pubs/index.html:1.56 llvm-www/pubs/index.html:1.57 --- llvm-www/pubs/index.html:1.56 Wed Jun 13 20:42:19 2007 +++ llvm-www/pubs/index.html Thu Jul 26 01:09:19 2007 @@ -3,17 +3,23 @@
      +
    1. "LLVM 2.0 +and Beyond!"
      +Chris Lattner
      +Google Tech Talk, Mountain View, CA, July 2007.
    2. + +
    3. "Structural Abstraction of Software Verification Conditions"
      Domagoj Babic and Alan J. Hu.
      Proc. of the 19th Int. Conf. on Computer Aided Verification - (CAV'07), Berlin, Germany, Jul, 2007.
    4. + (CAV'07), Berlin, Germany, Jul, 2007.
    5. "Making Context-Sensitive Points-to Analysis with Heap Cloning Practical For The Real World"
      Chris Lattner, Andrew Lenharth, and Vikram Adve.
      Proc. of the 2007 ACM SIGPLAN Conference on Programming Language - Design and Implementation (PLDI'07), San Diego, CA, Jun, 2007.
    6. + Design and Implementation (PLDI'07), San Diego, CA, Jun, 2007.
    7. "Improving Switch Lowering for The LLVM Compiler System"
      From evan.cheng at apple.com Thu Jul 26 01:30:16 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 25 Jul 2007 23:30:16 -0700 Subject: [llvm-commits] [llvm] r40502 - /llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp In-Reply-To: <440068D0-CCFC-4ADC-9C76-919E1EE6441D@apple.com> References: <200707252341.l6PNfacl011379@zion.cs.uiuc.edu> <440068D0-CCFC-4ADC-9C76-919E1EE6441D@apple.com> Message-ID: <28B25C19-62EC-4B64-9B90-314CEE326E1F@apple.com> I do want to support static codegen for JIT. If non-JIT mode silently change it to dynamic-no-pic, then we can't emulate with llc. An alternative is to define a code model that is somewhere between small and medium. It's only used by Mac OS / static though. Not sure if that's cleaner? Evan Sent from my iPhone On Jul 25, 2007, at 10:47 PM, Chris Lattner wrote: > > On Jul 25, 2007, at 4:41 PM, Evan Cheng wrote: > >> Author: evancheng >> Date: Wed Jul 25 18:41:36 2007 >> New Revision: 40502 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=40502&view=rev >> Log: >> Mac OS X x86-64 lower 4G address is not available. > > Hi Evan, > > Would it be better to have the X86 backend change the relo module to > mdynamic-no-pic on darwin? It seems strange to test the os in a low- > level place like this. > > -Chirs > >> Modified: >> llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp >> >> Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/ >> X86ISelDAGToDAG.cpp?rev=40502&r1=40501&r2=40502&view=diff >> >> === >> =================================================================== >> ======== >> --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) >> +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Wed Jul 25 >> 18:41:36 2007 >> @@ -615,7 +615,8 @@ >> SDOperand N0 = N.getOperand(0); >> if (GlobalAddressSDNode *G = dyn_cast >> (N0)) { >> GlobalValue *GV = G->getGlobal(); >> - bool isAbs32 = !is64Bit || isStatic; >> + // Mac OS X X86-64 lower 4G address is not available. >> + bool isAbs32 = !is64Bit || (isStatic && !Subtarget- >>> isTargetDarwin()); >> if (isAbs32 || isRoot) { >> AM.GV = GV; >> AM.Disp += G->getOffset(); >> >> >> _______________________________________________ >> 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 christopher.lamb at gmail.com Thu Jul 26 01:41:18 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Thu, 26 Jul 2007 06:41:18 -0000 Subject: [llvm-commits] [llvm] r40513 - /llvm/trunk/utils/TableGen/CodeGenTarget.cpp Message-ID: <200707260641.l6Q6fIX6030125@zion.cs.uiuc.edu> Author: clamb Date: Thu Jul 26 01:41:18 2007 New Revision: 40513 URL: http://llvm.org/viewvc/llvm-project?rev=40513&view=rev Log: Teach TableGen about the new vector types. Modified: llvm/trunk/utils/TableGen/CodeGenTarget.cpp Modified: llvm/trunk/utils/TableGen/CodeGenTarget.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenTarget.cpp?rev=40513&r1=40512&r2=40513&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeGenTarget.cpp (original) +++ llvm/trunk/utils/TableGen/CodeGenTarget.cpp Thu Jul 26 01:41:18 2007 @@ -61,6 +61,8 @@ case MVT::v2f32: return "MVT::v2f32"; case MVT::v4f32: return "MVT::v4f32"; case MVT::v2f64: return "MVT::v2f64"; + case MVT::v3i32: return "MVT::v3i32"; + case MVT::v3f32: return "MVT::v3f32"; case MVT::iPTR: return "TLI.getPointerTy()"; default: assert(0 && "ILLEGAL VALUE TYPE!"); return ""; } @@ -93,6 +95,8 @@ case MVT::v2f32: return "MVT::v2f32"; case MVT::v4f32: return "MVT::v4f32"; case MVT::v2f64: return "MVT::v2f64"; + case MVT::v3i32: return "MVT::v3i32"; + case MVT::v3f32: return "MVT::v3f32"; case MVT::iPTR: return "TLI.getPointerTy()"; default: assert(0 && "ILLEGAL VALUE TYPE!"); return ""; } From christopher.lamb at gmail.com Thu Jul 26 01:41:47 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Wed, 25 Jul 2007 23:41:47 -0700 Subject: [llvm-commits] [llvm] r40506 - in /llvm/trunk: include/llvm/CodeGen/ValueTypes.h include/llvm/CodeGen/ValueTypes.td lib/VMCore/ValueTypes.cpp In-Reply-To: References: <200707260146.l6Q1krMB018665@zion.cs.uiuc.edu> Message-ID: On Jul 25, 2007, at 10:50 PM, Evan Cheng wrote: > Hi Chris, > > Can codegen handle non-pow 2 vector types? Are you planning to add it > soon? :-) > > Also, can you check if tblgen need to be taught the new types? I'm > away from my Mac so I can't check. I thought I'd had it, but I'd missed the file. Thanks! -- Chris > > On Jul 25, 2007, at 6:46 PM, Christopher Lamb > > wrote: > >> Author: clamb >> Date: Wed Jul 25 20:46:52 2007 >> New Revision: 40506 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=40506&view=rev >> Log: >> Add support for 3 element 32-bit vector ValueTypes. >> >> Modified: >> llvm/trunk/include/llvm/CodeGen/ValueTypes.h >> llvm/trunk/include/llvm/CodeGen/ValueTypes.td >> llvm/trunk/lib/VMCore/ValueTypes.cpp >> >> Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ >> CodeGen/ValueTypes.h?rev=40506&r1=40505&r2=40506&view=diff >> >> === >> === >> === >> ===================================================================== >> --- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original) >> +++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Wed Jul 25 20:46:52 >> 2007 >> @@ -52,16 +52,19 @@ >> v1i64 = 16, // 1 x i64 >> v16i8 = 17, // 16 x i8 >> v8i16 = 18, // 8 x i16 >> - v4i32 = 19, // 4 x i32 >> - v2i64 = 20, // 2 x i64 >> - >> - v2f32 = 21, // 2 x f32 >> - v4f32 = 22, // 4 x f32 >> - v2f64 = 23, // 2 x f64 >> + v3i32 = 19, // 3 x i32 >> + v4i32 = 20, // 4 x i32 >> + v2i64 = 21, // 2 x i64 >> + >> + v2f32 = 22, // 2 x f32 >> + v3f32 = 23, // 3 x f32 >> + v4f32 = 24, // 4 x f32 >> + v2f64 = 25, // 2 x f64 >> + >> FIRST_VECTOR_VALUETYPE = v8i8, >> LAST_VECTOR_VALUETYPE = v2f64, >> >> - LAST_VALUETYPE = 24, // This always remains at the end of >> the list. >> + LAST_VALUETYPE = 26, // This always remains at the end of >> the list. >> >> // iAny - An integer value of any bit width. This is used for >> intrinsics >> // that have overloadings based on integer bit widths. This is >> only for >> @@ -133,10 +136,12 @@ >> case v4i16: >> case v8i16: return i16; >> case v2i32: >> + case v3i32: >> case v4i32: return i32; >> case v1i64: >> case v2i64: return i64; >> case v2f32: >> + case v3f32: >> case v4f32: return f32; >> case v2f64: return f64; >> } >> @@ -156,6 +161,8 @@ >> case v4i16: >> case v4i32: >> case v4f32: return 4; >> + case v3i32: >> + case v3f32: return 3; >> case v2i32: >> case v2i64: >> case v2f32: >> @@ -187,6 +194,8 @@ >> case MVT::v1i64: >> case MVT::v2f32: return 64; >> case MVT::f80 : return 80; >> + case MVT::v3i32: >> + case MVT::v3f32: return 96; >> case MVT::f128: >> case MVT::i128: >> case MVT::v16i8: >> @@ -215,6 +224,7 @@ >> break; >> case MVT::i32: >> if (NumElements == 2) return MVT::v2i32; >> + if (NumElements == 3) return MVT::v3i32; >> if (NumElements == 4) return MVT::v4i32; >> break; >> case MVT::i64: >> @@ -223,6 +233,7 @@ >> break; >> case MVT::f32: >> if (NumElements == 2) return MVT::v2f32; >> + if (NumElements == 3) return MVT::v3f32; >> if (NumElements == 4) return MVT::v4f32; >> break; >> case MVT::f64: >> @@ -244,6 +255,7 @@ >> default: return getVectorType(i8, NumElts); >> case 1: return v1i64; >> case 2: return v2i32; >> + case 3: return v3i32; >> case 4: return v4i16; >> case 8: return v8i8; >> case 16: return v16i8; >> >> Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.td >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ >> CodeGen/ValueTypes.td?rev=40506&r1=40505&r2=40506&view=diff >> >> === >> === >> === >> ===================================================================== >> --- llvm/trunk/include/llvm/CodeGen/ValueTypes.td (original) >> +++ llvm/trunk/include/llvm/CodeGen/ValueTypes.td Wed Jul 25 >> 20:46:52 2007 >> @@ -39,11 +39,14 @@ >> >> def v16i8 : ValueType<128, 17>; // 16 x i8 vector value >> def v8i16 : ValueType<128, 18>; // 8 x i16 vector value >> -def v4i32 : ValueType<128, 19>; // 4 x i32 vector value >> -def v2i64 : ValueType<128, 20>; // 2 x i64 vector value >> -def v2f32 : ValueType<64, 21>; // 2 x f32 vector value >> -def v4f32 : ValueType<128, 22>; // 4 x f32 vector value >> -def v2f64 : ValueType<128, 23>; // 2 x f64 vector value >> +def v3i32 : ValueType<96 , 19>; // 3 x f32 vector value >> +def v4i32 : ValueType<128, 20>; // 4 x i32 vector value >> +def v2i64 : ValueType<128, 21>; // 2 x i64 vector value >> + >> +def v2f32 : ValueType<64, 22>; // 2 x f32 vector value >> +def v3f32 : ValueType<96 , 23>; // 3 x f64 vector value >> +def v4f32 : ValueType<128, 24>; // 4 x f32 vector value >> +def v2f64 : ValueType<128, 25>; // 2 x f64 vector value >> >> // Pseudo valuetype to represent "integer of any bit width" >> def iAny : ValueType<0 , 254>; // integer value of any bit width >> >> Modified: llvm/trunk/lib/VMCore/ValueTypes.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ >> ValueTypes.cpp?rev=40506&r1=40505&r2=40506&view=diff >> >> === >> === >> === >> ===================================================================== >> --- llvm/trunk/lib/VMCore/ValueTypes.cpp (original) >> +++ llvm/trunk/lib/VMCore/ValueTypes.cpp Wed Jul 25 20:46:52 2007 >> @@ -50,6 +50,8 @@ >> case MVT::v2f32: return "v2f32"; >> case MVT::v4f32: return "v4f32"; >> case MVT::v2f64: return "v2f64"; >> + case MVT::v3i32: return "v3i32"; >> + case MVT::v3f32: return "v3f32"; >> } >> } >> >> @@ -83,6 +85,8 @@ >> case MVT::v2f32: return VectorType::get(Type::FloatTy, 2); >> case MVT::v4f32: return VectorType::get(Type::FloatTy, 4); >> case MVT::v2f64: return VectorType::get(Type::DoubleTy, 2); >> + case MVT::v3i32: return VectorType::get(Type::Int32Ty, 3); >> + case MVT::v3f32: return VectorType::get(Type::FloatTy, 3); >> } >> } >> >> >> >> _______________________________________________ >> 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 -- Christopher Lamb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070725/5625dad4/attachment.html From evan.cheng at apple.com Thu Jul 26 01:43:48 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 25 Jul 2007 23:43:48 -0700 Subject: [llvm-commits] [llvm] r40506 - in /llvm/trunk: include/llvm/CodeGen/ValueTypes.h include/llvm/CodeGen/ValueTypes.td lib/VMCore/ValueTypes.cpp In-Reply-To: References: <200707260146.l6Q1krMB018665@zion.cs.uiuc.edu> Message-ID: <3E8DEAAF-B673-4552-A898-C07AF51F0F4C@apple.com> On Jul 25, 2007, at 11:02 PM, Christopher Lamb wrote: > > On Jul 25, 2007, at 10:50 PM, Evan Cheng wrote: > >> Hi Chris, >> >> Can codegen handle non-pow 2 vector types? Are you planning to add it >> soon? :-) > > On my local copy codegen appears to be able to handle non-pow 2 > vector types, but still can't handle passing non-legal vector types > by value to functions. To enable this there are some other changes > that have to happen as well in the FE and Ok, you mean the codegen passes don't choke if they are legal types for the specific target? If so, ok to leave them in. > middle end. Mostly disabling the pow-2 checks. I've got a hefty > vreg subreg patch that I'm preparing for review too... > >> Also, can you check if tblgen need to be taught the new types? I'm >> away from my Mac so I can't check. > > I think the ValueTypes.td changes cover that. I've been using these > types in our target's .td files for quite a while now. > I see you have added them to CodeGenTarget.cpp. Thanks! Evan NOT Sent from my iPhone (but I do have one ;-) >> Sent from my iPhone > > Rub it in, eh? =) > -- > Chris > > >> On Jul 25, 2007, at 6:46 PM, Christopher Lamb >> >> wrote: >> >>> Author: clamb >>> Date: Wed Jul 25 20:46:52 2007 >>> New Revision: 40506 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=40506&view=rev >>> Log: >>> Add support for 3 element 32-bit vector ValueTypes. >>> >>> Modified: >>> llvm/trunk/include/llvm/CodeGen/ValueTypes.h >>> llvm/trunk/include/llvm/CodeGen/ValueTypes.td >>> llvm/trunk/lib/VMCore/ValueTypes.cpp >>> >>> Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h >>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ >>> CodeGen/ValueTypes.h?rev=40506&r1=40505&r2=40506&view=diff >>> >>> === >>> === >>> === >>> ==================================================================== >>> = >>> --- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original) >>> +++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Wed Jul 25 20:46:52 >>> 2007 >>> @@ -52,16 +52,19 @@ >>> v1i64 = 16, // 1 x i64 >>> v16i8 = 17, // 16 x i8 >>> v8i16 = 18, // 8 x i16 >>> - v4i32 = 19, // 4 x i32 >>> - v2i64 = 20, // 2 x i64 >>> - >>> - v2f32 = 21, // 2 x f32 >>> - v4f32 = 22, // 4 x f32 >>> - v2f64 = 23, // 2 x f64 >>> + v3i32 = 19, // 3 x i32 >>> + v4i32 = 20, // 4 x i32 >>> + v2i64 = 21, // 2 x i64 >>> + >>> + v2f32 = 22, // 2 x f32 >>> + v3f32 = 23, // 3 x f32 >>> + v4f32 = 24, // 4 x f32 >>> + v2f64 = 25, // 2 x f64 >>> + >>> FIRST_VECTOR_VALUETYPE = v8i8, >>> LAST_VECTOR_VALUETYPE = v2f64, >>> >>> - LAST_VALUETYPE = 24, // This always remains at the end of >>> the list. >>> + LAST_VALUETYPE = 26, // This always remains at the end of >>> the list. >>> >>> // iAny - An integer value of any bit width. This is used for >>> intrinsics >>> // that have overloadings based on integer bit widths. This is >>> only for >>> @@ -133,10 +136,12 @@ >>> case v4i16: >>> case v8i16: return i16; >>> case v2i32: >>> + case v3i32: >>> case v4i32: return i32; >>> case v1i64: >>> case v2i64: return i64; >>> case v2f32: >>> + case v3f32: >>> case v4f32: return f32; >>> case v2f64: return f64; >>> } >>> @@ -156,6 +161,8 @@ >>> case v4i16: >>> case v4i32: >>> case v4f32: return 4; >>> + case v3i32: >>> + case v3f32: return 3; >>> case v2i32: >>> case v2i64: >>> case v2f32: >>> @@ -187,6 +194,8 @@ >>> case MVT::v1i64: >>> case MVT::v2f32: return 64; >>> case MVT::f80 : return 80; >>> + case MVT::v3i32: >>> + case MVT::v3f32: return 96; >>> case MVT::f128: >>> case MVT::i128: >>> case MVT::v16i8: >>> @@ -215,6 +224,7 @@ >>> break; >>> case MVT::i32: >>> if (NumElements == 2) return MVT::v2i32; >>> + if (NumElements == 3) return MVT::v3i32; >>> if (NumElements == 4) return MVT::v4i32; >>> break; >>> case MVT::i64: >>> @@ -223,6 +233,7 @@ >>> break; >>> case MVT::f32: >>> if (NumElements == 2) return MVT::v2f32; >>> + if (NumElements == 3) return MVT::v3f32; >>> if (NumElements == 4) return MVT::v4f32; >>> break; >>> case MVT::f64: >>> @@ -244,6 +255,7 @@ >>> default: return getVectorType(i8, NumElts); >>> case 1: return v1i64; >>> case 2: return v2i32; >>> + case 3: return v3i32; >>> case 4: return v4i16; >>> case 8: return v8i8; >>> case 16: return v16i8; >>> >>> Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.td >>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ >>> CodeGen/ValueTypes.td?rev=40506&r1=40505&r2=40506&view=diff >>> >>> === >>> === >>> === >>> ==================================================================== >>> = >>> --- llvm/trunk/include/llvm/CodeGen/ValueTypes.td (original) >>> +++ llvm/trunk/include/llvm/CodeGen/ValueTypes.td Wed Jul 25 >>> 20:46:52 2007 >>> @@ -39,11 +39,14 @@ >>> >>> def v16i8 : ValueType<128, 17>; // 16 x i8 vector value >>> def v8i16 : ValueType<128, 18>; // 8 x i16 vector value >>> -def v4i32 : ValueType<128, 19>; // 4 x i32 vector value >>> -def v2i64 : ValueType<128, 20>; // 2 x i64 vector value >>> -def v2f32 : ValueType<64, 21>; // 2 x f32 vector value >>> -def v4f32 : ValueType<128, 22>; // 4 x f32 vector value >>> -def v2f64 : ValueType<128, 23>; // 2 x f64 vector value >>> +def v3i32 : ValueType<96 , 19>; // 3 x f32 vector value >>> +def v4i32 : ValueType<128, 20>; // 4 x i32 vector value >>> +def v2i64 : ValueType<128, 21>; // 2 x i64 vector value >>> + >>> +def v2f32 : ValueType<64, 22>; // 2 x f32 vector value >>> +def v3f32 : ValueType<96 , 23>; // 3 x f64 vector value >>> +def v4f32 : ValueType<128, 24>; // 4 x f32 vector value >>> +def v2f64 : ValueType<128, 25>; // 2 x f64 vector value >>> >>> // Pseudo valuetype to represent "integer of any bit width" >>> def iAny : ValueType<0 , 254>; // integer value of any bit >>> width >>> >>> Modified: llvm/trunk/lib/VMCore/ValueTypes.cpp >>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ >>> ValueTypes.cpp?rev=40506&r1=40505&r2=40506&view=diff >>> >>> === >>> === >>> === >>> ==================================================================== >>> = >>> --- llvm/trunk/lib/VMCore/ValueTypes.cpp (original) >>> +++ llvm/trunk/lib/VMCore/ValueTypes.cpp Wed Jul 25 20:46:52 2007 >>> @@ -50,6 +50,8 @@ >>> case MVT::v2f32: return "v2f32"; >>> case MVT::v4f32: return "v4f32"; >>> case MVT::v2f64: return "v2f64"; >>> + case MVT::v3i32: return "v3i32"; >>> + case MVT::v3f32: return "v3f32"; >>> } >>> } >>> >>> @@ -83,6 +85,8 @@ >>> case MVT::v2f32: return VectorType::get(Type::FloatTy, 2); >>> case MVT::v4f32: return VectorType::get(Type::FloatTy, 4); >>> case MVT::v2f64: return VectorType::get(Type::DoubleTy, 2); >>> + case MVT::v3i32: return VectorType::get(Type::Int32Ty, 3); >>> + case MVT::v3f32: return VectorType::get(Type::FloatTy, 3); >>> } >>> } >>> >>> >>> >>> _______________________________________________ >>> 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 > > -- > Christopher Lamb > > > > _______________________________________________ > 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/20070725/aa699bc1/attachment.html From evan.cheng at apple.com Thu Jul 26 01:45:30 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 25 Jul 2007 23:45:30 -0700 Subject: [llvm-commits] [llvm] r40478 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/v4f32-immediate.ll In-Reply-To: <200707242255.l6OMt9IM021500@zion.cs.uiuc.edu> References: <200707242255.l6OMt9IM021500@zion.cs.uiuc.edu> Message-ID: How did I miss that one? Duh. Thanks! Evan On Jul 24, 2007, at 3:55 PM, Dan Gohman wrote: > Author: djg > Date: Tue Jul 24 17:55:08 2007 > New Revision: 40478 > > URL: http://llvm.org/viewvc/llvm-project?rev=40478&view=rev > Log: > Use movaps to load a v4f32 build_vector of all-constant values into a > register instead of loading each element individually. > > Added: > llvm/trunk/test/CodeGen/X86/v4f32-immediate.ll > Modified: > llvm/trunk/lib/Target/X86/X86ISelLowering.cpp > > Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/ > X86ISelLowering.cpp?rev=40478&r1=40477&r2=40478&view=diff > > ====================================================================== > ======== > --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) > +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Jul 24 > 17:55:08 2007 > @@ -2495,6 +2495,7 @@ > unsigned NumZero = 0; > unsigned NumNonZero = 0; > unsigned NonZeros = 0; > + unsigned NumNonZeroImms = 0; > std::set Values; > for (unsigned i = 0; i < NumElems; ++i) { > SDOperand Elt = Op.getOperand(i); > @@ -2505,6 +2506,9 @@ > else { > NonZeros |= (1 << i); > NumNonZero++; > + if (Elt.getOpcode() == ISD::Constant || > + Elt.getOpcode() == ISD::ConstantFP) > + NumNonZeroImms++; > } > } > } > @@ -2548,6 +2552,11 @@ > } > } > > + // A vector full of immediates; various special cases are already > + // handled, so this is best done with a single constant-pool load. > + if (NumNonZero == NumNonZeroImms) > + return SDOperand(); > + > // Let legalizer expand 2-wide build_vectors. > if (EVTBits == 64) > return SDOperand(); > > Added: llvm/trunk/test/CodeGen/X86/v4f32-immediate.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ > X86/v4f32-immediate.ll?rev=40478&view=auto > > ====================================================================== > ======== > --- llvm/trunk/test/CodeGen/X86/v4f32-immediate.ll (added) > +++ llvm/trunk/test/CodeGen/X86/v4f32-immediate.ll Tue Jul 24 > 17:55:08 2007 > @@ -0,0 +1,5 @@ > +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse | grep movaps > + > +define <4 x float> @foo() { > + ret <4 x float> 0.1> > +} > > > _______________________________________________ > 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 Thu Jul 26 01:49:20 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Wed, 25 Jul 2007 23:49:20 -0700 Subject: [llvm-commits] [llvm] r40472 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp In-Reply-To: <200707242107.l6OL7e2Z018534@zion.cs.uiuc.edu> References: <200707242107.l6OL7e2Z018534@zion.cs.uiuc.edu> Message-ID: <8E243D0E-7F56-4901-8355-BF72DB2FDFC2@apple.com> Hi Anton, Can you add an entry to README.txt about this? Please explain it a little bit because I have no idea what's going on here. :-) Evan On Jul 24, 2007, at 2:07 PM, Anton Korobeynikov wrote: > Author: asl > Date: Tue Jul 24 16:07:39 2007 > New Revision: 40472 > > URL: http://llvm.org/viewvc/llvm-project?rev=40472&view=rev > Log: > Heal EH handling stuff by emitting correct offsets to callee-saved > registers. > > Pretty hackish, but code itself is dirty mess, so we won't make > anything worse. :) > > Modified: > llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp > > Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/ > X86RegisterInfo.cpp?rev=40472&r1=40471&r2=40472&view=diff > > ====================================================================== > ======== > --- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original) > +++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Tue Jul 24 > 16:07:39 2007 > @@ -1297,9 +1297,21 @@ > > // Add callee saved registers to move list. > const std::vector &CSI = MFI- > >getCalleeSavedInfo(); > - for (unsigned I = 0, E = CSI.size(); I != E; ++I) { > + > + // FIXME: This is dirty hack. The code itself is pretty mess > right now. > + // It should be rewritten from scratch and generalized sometimes. > + > + // Determine maximum offset (minumum due to stack growth) > + int64_t MaxOffset = 0; > + for (unsigned I = 0, E = CSI.size(); I!=E; ++I) > + MaxOffset = std::min(MaxOffset, > + MFI->getObjectOffset(CSI[I].getFrameIdx > ())); > + > + // Calculate offsets > + for (unsigned I = 0, E = CSI.size(); I!=E; ++I) { > int64_t Offset = MFI->getObjectOffset(CSI[I].getFrameIdx()); > unsigned Reg = CSI[I].getReg(); > + Offset = (MaxOffset-Offset+3*stackGrowth); > MachineLocation CSDst(MachineLocation::VirtualFP, Offset); > MachineLocation CSSrc(Reg); > Moves.push_back(MachineMove(FrameLabelId, CSDst, CSSrc)); > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From christopher.lamb at gmail.com Thu Jul 26 02:00:46 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Thu, 26 Jul 2007 07:00:46 -0000 Subject: [llvm-commits] [llvm] r40514 - in /llvm/trunk: include/llvm/CodeGen/MachineInstr.h include/llvm/CodeGen/MachineInstrBuilder.h lib/CodeGen/MachineInstr.cpp Message-ID: <200707260700.l6Q70lRF030539@zion.cs.uiuc.edu> Author: clamb Date: Thu Jul 26 02:00:46 2007 New Revision: 40514 URL: http://llvm.org/viewvc/llvm-project?rev=40514&view=rev Log: Remove subreg index from MachineInstr's and also keep vregs as unsigned when adding operands. Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h llvm/trunk/lib/CodeGen/MachineInstr.cpp Modified: llvm/trunk/include/llvm/CodeGen/MachineInstr.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstr.h?rev=40514&r1=40513&r2=40514&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineInstr.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineInstr.h Thu Jul 26 02:00:46 2007 @@ -76,10 +76,6 @@ /// offset - Offset to address of global or external, only valid for /// MO_GlobalAddress, MO_ExternalSym and MO_ConstantPoolIndex int offset; - - /// subReg - SubRegister number, only valid for MO_Register. A value of 0 - /// indicates the MO_Register has no subReg. - unsigned subReg; } auxInfo; MachineOperand() {} @@ -178,10 +174,6 @@ "Wrong MachineOperand accessor"); return auxInfo.offset; } - unsigned getSubReg() const { - assert(isRegister() && "Wrong MachineOperand accessor"); - return auxInfo.subReg; - } const char *getSymbolName() const { assert(isExternalSymbol() && "Wrong MachineOperand accessor"); return contents.SymbolName; @@ -267,10 +259,6 @@ "Wrong MachineOperand accessor"); auxInfo.offset = Offset; } - void setSubReg(unsigned subReg) { - assert(isRegister() && "Wrong MachineOperand accessor"); - auxInfo.subReg = subReg; - } void setConstantPoolIndex(unsigned Idx) { assert(isConstantPoolIndex() && "Wrong MachineOperand accessor"); contents.immedVal = Idx; @@ -459,7 +447,6 @@ Op.IsKill = IsKill; Op.IsDead = IsDead; Op.contents.RegNo = Reg; - Op.auxInfo.subReg = 0; } /// addImmOperand - Add a zero extended constant argument to the Modified: llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h?rev=40514&r1=40513&r2=40514&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h Thu Jul 26 02:00:46 2007 @@ -37,7 +37,7 @@ /// addReg - Add a new virtual register operand... /// const - MachineInstrBuilder &addReg(int RegNo, bool isDef = false, bool isImp = false, + MachineInstrBuilder &addReg(unsigned RegNo, bool isDef = false, bool isImp = false, bool isKill = false, bool isDead = false) const { MI->addRegOperand(RegNo, isDef, isImp, isKill, isDead); return *this; Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=40514&r1=40513&r2=40514&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original) +++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Thu Jul 26 02:00:46 2007 @@ -39,7 +39,6 @@ Op.IsKill = false; Op.IsDead = false; Op.contents.RegNo = *ImpDefs; - Op.auxInfo.subReg = 0; Operands.push_back(Op); } if (TID->ImplicitUses) @@ -51,7 +50,6 @@ Op.IsKill = false; Op.IsDead = false; Op.contents.RegNo = *ImpUses; - Op.auxInfo.subReg = 0; Operands.push_back(Op); } } From christopher.lamb at gmail.com Thu Jul 26 02:03:08 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Thu, 26 Jul 2007 07:03:08 -0000 Subject: [llvm-commits] [llvm] r40515 - /llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h Message-ID: <200707260703.l6Q738Y8030628@zion.cs.uiuc.edu> Author: clamb Date: Thu Jul 26 02:03:08 2007 New Revision: 40515 URL: http://llvm.org/viewvc/llvm-project?rev=40515&view=rev Log: Fix 80 col violation. Modified: llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h Modified: llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h?rev=40515&r1=40514&r2=40515&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h Thu Jul 26 02:03:08 2007 @@ -37,8 +37,9 @@ /// addReg - Add a new virtual register operand... /// const - MachineInstrBuilder &addReg(unsigned RegNo, bool isDef = false, bool isImp = false, - bool isKill = false, bool isDead = false) const { + MachineInstrBuilder &addReg(unsigned RegNo, bool isDef = false, + bool isImp = false, bool isKill = false, + bool isDead = false) const { MI->addRegOperand(RegNo, isDef, isImp, isKill, isDead); return *this; } From christopher.lamb at gmail.com Thu Jul 26 02:34:40 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Thu, 26 Jul 2007 07:34:40 -0000 Subject: [llvm-commits] [llvm] r40516 - in /llvm/trunk: include/llvm/CodeGen/SelectionDAGNodes.h lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/Target/TargetSelectionDAG.td Message-ID: <200707260734.l6Q7YeTk031732@zion.cs.uiuc.edu> Author: clamb Date: Thu Jul 26 02:34:40 2007 New Revision: 40516 URL: http://llvm.org/viewvc/llvm-project?rev=40516&view=rev Log: Add selection DAG nodes for subreg insert/extract. PR1350 Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/trunk/lib/Target/TargetSelectionDAG.td Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=40516&r1=40515&r2=40516&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Thu Jul 26 02:34:40 2007 @@ -289,6 +289,15 @@ /// elements of the vector are undefined. SCALAR_TO_VECTOR, + // EXTRACT_SUBREG - This node is used to extract a sub-register value. + // This node takes a superreg and a constant sub-register index as operands. + EXTRACT_SUBREG, + + // INSERT_SUBREG - This node is used to insert a sub-register value. + // This node takes a superreg, a subreg value, and a constant sub-register + // index as operands. + INSERT_SUBREG, + // MULHU/MULHS - Multiply high - Multiply two integers of type iN, producing // an unsigned/signed value of type i[2*n], then return the top part. MULHU, MULHS, Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=40516&r1=40515&r2=40516&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Jul 26 02:34:40 2007 @@ -957,7 +957,23 @@ AddLegalizedOperand(SDOperand(Node, i), Tmp1); } return Tmp2; - + case ISD::EXTRACT_SUBREG: { + Tmp1 = LegalizeOp(Node->getOperand(0)); + ConstantSDNode *idx = dyn_cast(Node->getOperand(1)); + assert(idx && "Operand must be a constant"); + Tmp2 = DAG.getTargetConstant(idx->getValue(), idx->getValueType(0)); + Result = DAG.UpdateNodeOperands(Result, Tmp1, Tmp2); + } + break; + case ISD::INSERT_SUBREG: { + Tmp1 = LegalizeOp(Node->getOperand(0)); + Tmp2 = LegalizeOp(Node->getOperand(1)); + ConstantSDNode *idx = dyn_cast(Node->getOperand(2)); + assert(idx && "Operand must be a constant"); + Tmp3 = DAG.getTargetConstant(idx->getValue(), idx->getValueType(0)); + Result = DAG.UpdateNodeOperands(Result, Tmp1, Tmp2, Tmp3); + } + break; case ISD::BUILD_VECTOR: switch (TLI.getOperationAction(ISD::BUILD_VECTOR, Node->getValueType(0))) { default: assert(0 && "This action is not supported yet!"); Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=40516&r1=40515&r2=40516&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Jul 26 02:34:40 2007 @@ -3455,7 +3455,10 @@ case ISD::SHL_PARTS: return "shl_parts"; case ISD::SRA_PARTS: return "sra_parts"; case ISD::SRL_PARTS: return "srl_parts"; - + + case ISD::EXTRACT_SUBREG: return "extract_subreg"; + case ISD::INSERT_SUBREG: return "insert_subreg"; + // Conversion operators. case ISD::SIGN_EXTEND: return "sign_extend"; case ISD::ZERO_EXTEND: return "zero_extend"; Modified: llvm/trunk/lib/Target/TargetSelectionDAG.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetSelectionDAG.td?rev=40516&r1=40515&r2=40516&view=diff ============================================================================== --- llvm/trunk/lib/Target/TargetSelectionDAG.td (original) +++ llvm/trunk/lib/Target/TargetSelectionDAG.td Thu Jul 26 02:34:40 2007 @@ -317,6 +317,11 @@ SDTypeProfile<1, 2, [SDTCisPtrTy<2>]>, []>; def vector_insert : SDNode<"ISD::INSERT_VECTOR_ELT", SDTypeProfile<1, 3, [SDTCisSameAs<0, 1>, SDTCisPtrTy<3>]>, []>; + +def extract_subreg : SDNode<"ISD::EXTRACT_SUBREG", + SDTypeProfile<1, 2, []>>; +def insert_subreg : SDNode<"ISD::INSERT_SUBREG", + SDTypeProfile<1, 3, []>>; // Nodes for intrinsics, you should use the intrinsic itself and let tblgen use // these internally. Don't reference these directly. From evan.cheng at apple.com Thu Jul 26 02:35:15 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 26 Jul 2007 07:35:15 -0000 Subject: [llvm-commits] [llvm] r40517 - /llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200707260735.l6Q7ZFKd031758@zion.cs.uiuc.edu> Author: evancheng Date: Thu Jul 26 02:35:15 2007 New Revision: 40517 URL: http://llvm.org/viewvc/llvm-project?rev=40517&view=rev Log: Same goes for constantpool, etc. Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=40517&r1=40516&r2=40517&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Jul 26 02:35:15 2007 @@ -613,10 +613,10 @@ if (!Available || (AM.Base.Reg.Val && AM.IndexReg.Val)) { bool isStatic = TM.getRelocationModel() == Reloc::Static; SDOperand N0 = N.getOperand(0); + // Mac OS X X86-64 lower 4G address is not available. + bool isAbs32 = !is64Bit || (isStatic && !Subtarget->isTargetDarwin()); if (GlobalAddressSDNode *G = dyn_cast(N0)) { GlobalValue *GV = G->getGlobal(); - // Mac OS X X86-64 lower 4G address is not available. - bool isAbs32 = !is64Bit || (isStatic && !Subtarget->isTargetDarwin()); if (isAbs32 || isRoot) { AM.GV = GV; AM.Disp += G->getOffset(); @@ -624,7 +624,7 @@ return false; } } else if (ConstantPoolSDNode *CP = dyn_cast(N0)) { - if (!is64Bit || isStatic || isRoot) { + if (isAbs32 || isRoot) { AM.CP = CP->getConstVal(); AM.Align = CP->getAlignment(); AM.Disp += CP->getOffset(); @@ -632,13 +632,13 @@ return false; } } else if (ExternalSymbolSDNode *S =dyn_cast(N0)) { - if (isStatic || isRoot) { + if (isAbs32 || isRoot) { AM.ES = S->getSymbol(); AM.isRIPRel = !isStatic; return false; } } else if (JumpTableSDNode *J = dyn_cast(N0)) { - if (isStatic || isRoot) { + if (isAbs32 || isRoot) { AM.JT = J->getIndex(); AM.isRIPRel = !isStatic; return false; From christopher.lamb at gmail.com Thu Jul 26 02:48:24 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Thu, 26 Jul 2007 07:48:24 -0000 Subject: [llvm-commits] [llvm] r40518 - in /llvm/trunk: include/llvm/Target/TargetInstrInfo.h lib/Target/Target.td utils/TableGen/CodeEmitterGen.cpp utils/TableGen/CodeGenTarget.cpp utils/TableGen/DAGISelEmitter.cpp utils/TableGen/InstrInfoEmitter.cpp Message-ID: <200707260748.l6Q7mPC5032022@zion.cs.uiuc.edu> Author: clamb Date: Thu Jul 26 02:48:21 2007 New Revision: 40518 URL: http://llvm.org/viewvc/llvm-project?rev=40518&view=rev Log: Add target independent MachineInstr's to represent subreg insert/extract in MBB's. PR1350 Modified: llvm/trunk/include/llvm/Target/TargetInstrInfo.h llvm/trunk/lib/Target/Target.td llvm/trunk/utils/TableGen/CodeEmitterGen.cpp llvm/trunk/utils/TableGen/CodeGenTarget.cpp llvm/trunk/utils/TableGen/DAGISelEmitter.cpp llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp Modified: llvm/trunk/include/llvm/Target/TargetInstrInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetInstrInfo.h?rev=40518&r1=40517&r2=40518&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetInstrInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetInstrInfo.h Thu Jul 26 02:48:21 2007 @@ -177,7 +177,9 @@ enum { PHI = 0, INLINEASM = 1, - LABEL = 2 + LABEL = 2, + EXTRACT_SUBREG = 3, + INSERT_SUBREG = 4 }; unsigned getNumOpcodes() const { return NumOpcodes; } Modified: llvm/trunk/lib/Target/Target.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Target.td?rev=40518&r1=40517&r2=40518&view=diff ============================================================================== --- llvm/trunk/lib/Target/Target.td (original) +++ llvm/trunk/lib/Target/Target.td Thu Jul 26 02:48:21 2007 @@ -321,6 +321,18 @@ let Namespace = "TargetInstrInfo"; let hasCtrlDep = 1; } +def EXTRACT_SUBREG : Instruction { + let OutOperandList = (ops variable_ops); + let InOperandList = (ops variable_ops); + let AsmString = ""; + let Namespace = "TargetInstrInfo"; +} +def INSERT_SUBREG : Instruction { + let OutOperandList = (ops variable_ops); + let InOperandList = (ops variable_ops); + let AsmString = ""; + let Namespace = "TargetInstrInfo"; +} //===----------------------------------------------------------------------===// // AsmWriter - This class can be implemented by targets that need to customize Modified: llvm/trunk/utils/TableGen/CodeEmitterGen.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeEmitterGen.cpp?rev=40518&r1=40517&r2=40518&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeEmitterGen.cpp (original) +++ llvm/trunk/utils/TableGen/CodeEmitterGen.cpp Thu Jul 26 02:48:21 2007 @@ -26,7 +26,9 @@ Record *R = *I; if (R->getName() == "PHI" || R->getName() == "INLINEASM" || - R->getName() == "LABEL") continue; + R->getName() == "LABEL" || + R->getName() == "EXTRACT_SUBREG" || + R->getName() == "INSERT_SUBREG") continue; BitsInit *BI = R->getValueAsBitsInit("Inst"); @@ -97,7 +99,9 @@ if (R->getName() == "PHI" || R->getName() == "INLINEASM" || - R->getName() == "LABEL") { + R->getName() == "LABEL" || + R->getName() == "EXTRACT_SUBREG" || + R->getName() == "INSERT_SUBREG") { o << " 0U"; continue; } @@ -127,7 +131,9 @@ if (InstName == "PHI" || InstName == "INLINEASM" || - InstName == "LABEL") continue; + InstName == "LABEL"|| + InstName == "EXTRACT_SUBREG" || + InstName == "INSERT_SUBREG") continue; BitsInit *BI = R->getValueAsBitsInit("Inst"); const std::vector &Vals = R->getValues(); Modified: llvm/trunk/utils/TableGen/CodeGenTarget.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenTarget.cpp?rev=40518&r1=40517&r2=40518&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/CodeGenTarget.cpp (original) +++ llvm/trunk/utils/TableGen/CodeGenTarget.cpp Thu Jul 26 02:48:21 2007 @@ -275,14 +275,28 @@ if (I == Instructions.end()) throw "Could not find 'LABEL' instruction!"; const CodeGenInstruction *LABEL = &I->second; + I = getInstructions().find("EXTRACT_SUBREG"); + if (I == Instructions.end()) + throw "Could not find 'EXTRACT_SUBREG' instruction!"; + const CodeGenInstruction *EXTRACT_SUBREG = &I->second; + + I = getInstructions().find("INSERT_SUBREG"); + if (I == Instructions.end()) + throw "Could not find 'INSERT_SUBREG' instruction!"; + const CodeGenInstruction *INSERT_SUBREG = &I->second; + // Print out the rest of the instructions now. NumberedInstructions.push_back(PHI); NumberedInstructions.push_back(INLINEASM); NumberedInstructions.push_back(LABEL); + NumberedInstructions.push_back(EXTRACT_SUBREG); + NumberedInstructions.push_back(INSERT_SUBREG); for (inst_iterator II = inst_begin(), E = inst_end(); II != E; ++II) if (&II->second != PHI && &II->second != INLINEASM && - &II->second != LABEL) + &II->second != LABEL && + &II->second != EXTRACT_SUBREG && + &II->second != INSERT_SUBREG) NumberedInstructions.push_back(&II->second); } Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=40518&r1=40517&r2=40518&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Thu Jul 26 02:48:21 2007 @@ -3729,6 +3729,33 @@ << " MVT::Other, Tmp, Chain);\n" << "}\n\n"; + OS << "SDNode *Select_EXTRACT_SUBREG(const SDOperand &N) {\n" + << " SDOperand N0 = N.getOperand(0);\n" + << " SDOperand N1 = N.getOperand(1);\n" + << " unsigned C = cast(N1)->getValue();\n" + << " SDOperand Tmp = CurDAG->getTargetConstant(C, MVT::i32);\n" + << " AddToISelQueue(N0);\n" + << " return CurDAG->getTargetNode(TargetInstrInfo::EXTRACT_SUBREG,\n" + << " N.getValueType(), N0, Tmp);\n" + << "}\n\n"; + + OS << "SDNode *Select_INSERT_SUBREG(const SDOperand &N) {\n" + << " SDOperand N0 = N.getOperand(0);\n" + << " SDOperand N1 = N.getOperand(1);\n" + << " SDOperand N2 = N.getOperand(2);\n" + << " unsigned C = cast(N2)->getValue();\n" + << " SDOperand Tmp = CurDAG->getTargetConstant(C, MVT::i32);\n" + << " AddToISelQueue(N1);\n" + << " if (N0.getOpcode() == ISD::UNDEF) {\n" + << " return CurDAG->getTargetNode(TargetInstrInfo::EXTRACT_SUBREG,\n" + << " N.getValueType(), N1, Tmp);\n" + << " } else {\n" + << " AddToISelQueue(N0);\n" + << " return CurDAG->getTargetNode(TargetInstrInfo::EXTRACT_SUBREG,\n" + << " N.getValueType(), N0, N1, Tmp);\n" + << " }\n" + << "}\n\n"; + OS << "// The main instruction selector code.\n" << "SDNode *SelectCode(SDOperand N) {\n" << " if (N.getOpcode() >= ISD::BUILTIN_OP_END &&\n" @@ -3766,7 +3793,9 @@ << " return NULL;\n" << " }\n" << " case ISD::INLINEASM: return Select_INLINEASM(N);\n" - << " case ISD::LABEL: return Select_LABEL(N);\n"; + << " case ISD::LABEL: return Select_LABEL(N);\n" + << " case ISD::EXTRACT_SUBREG: return Select_EXTRACT_SUBREG(N);\n" + << " case ISD::INSERT_SUBREG: return Select_INSERT_SUBREG(N);\n"; // Loop over all of the case statements, emiting a call to each method we Modified: llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp?rev=40518&r1=40517&r2=40518&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp Thu Jul 26 02:48:21 2007 @@ -325,7 +325,9 @@ // This isn't an error if this is a builtin instruction. if (R->getName() != "PHI" && R->getName() != "INLINEASM" && - R->getName() != "LABEL") + R->getName() != "LABEL" && + R->getName() != "EXTRACT_SUBREG" && + R->getName() != "INSERT_SUBREG") throw R->getName() + " doesn't have a field named '" + Val->getValue() + "'!"; return; From christopher.lamb at gmail.com Thu Jul 26 03:02:00 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Thu, 26 Jul 2007 08:02:00 -0000 Subject: [llvm-commits] [llvm] r40519 - in /llvm/trunk: include/llvm/Target/MRegisterInfo.h utils/TableGen/RegisterInfoEmitter.cpp Message-ID: <200707260802.l6Q821Zk032369@zion.cs.uiuc.edu> Author: clamb Date: Thu Jul 26 03:01:58 2007 New Revision: 40519 URL: http://llvm.org/viewvc/llvm-project?rev=40519&view=rev Log: Have register info provide the inverse mapping of register->superregisters. PR1350 Modified: llvm/trunk/include/llvm/Target/MRegisterInfo.h llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp Modified: llvm/trunk/include/llvm/Target/MRegisterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/MRegisterInfo.h?rev=40519&r1=40518&r2=40519&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/MRegisterInfo.h (original) +++ llvm/trunk/include/llvm/Target/MRegisterInfo.h Thu Jul 26 03:01:58 2007 @@ -68,6 +68,7 @@ const sc_iterator SubClasses; const sc_iterator SuperClasses; const sc_iterator SubRegClasses; + const sc_iterator SuperRegClasses; const unsigned RegSize, Alignment; // Size & Alignment of register in bytes const iterator RegsBegin, RegsEnd; public: @@ -76,9 +77,10 @@ const TargetRegisterClass * const *subcs, const TargetRegisterClass * const *supcs, const TargetRegisterClass * const *subregcs, + const TargetRegisterClass * const *superregcs, unsigned RS, unsigned Al, iterator RB, iterator RE) : ID(id), VTs(vts), SubClasses(subcs), SuperClasses(supcs), - SubRegClasses(subregcs), + SubRegClasses(subregcs), SuperRegClasses(superregcs), RegSize(RS), Alignment(Al), RegsBegin(RB), RegsEnd(RE) {} virtual ~TargetRegisterClass() {} // Allow subclasses @@ -131,9 +133,9 @@ return I; } - /// hasSubRegClass - return true if the specified TargetRegisterClass is a + /// hasSubClass - return true if the specified TargetRegisterClass is a /// sub-register class of this TargetRegisterClass. - bool hasSubRegClass(const TargetRegisterClass *cs) const { + bool hasSubClass(const TargetRegisterClass *cs) const { for (int i = 0; SubClasses[i] != NULL; ++i) if (SubClasses[i] == cs) return true; @@ -152,9 +154,9 @@ return I; } - /// hasSuperRegClass - return true if the specified TargetRegisterClass is a + /// hasSuperClass - return true if the specified TargetRegisterClass is a /// super-register class of this TargetRegisterClass. - bool hasSuperRegClass(const TargetRegisterClass *cs) const { + bool hasSuperClass(const TargetRegisterClass *cs) const { for (int i = 0; SuperClasses[i] != NULL; ++i) if (SuperClasses[i] == cs) return true; @@ -173,9 +175,9 @@ return I; } - /// hasSubRegForClass - return true if the specified TargetRegisterClass is a + /// hasSubRegClass - return true if the specified TargetRegisterClass is a /// class of a sub-register class for this TargetRegisterClass. - bool hasSubRegForClass(const TargetRegisterClass *cs) const { + bool hasSubRegClass(const TargetRegisterClass *cs) const { for (int i = 0; SubRegClasses[i] != NULL; ++i) if (SubRegClasses[i] == cs) return true; @@ -199,6 +201,7 @@ for (unsigned i = 0; SubRegClasses[i] != NULL; ++i) if (i == SubReg) return &SubRegClasses[i]; + assert(0 && "Invalid subregister index for register class"); return NULL; } @@ -214,6 +217,18 @@ return I; } + /// superregclasses_begin / superregclasses_end - Loop over all of + /// the superregister classes of this register class. + sc_iterator superregclasses_begin() const { + return SuperRegClasses; + } + + sc_iterator superregclasses_end() const { + sc_iterator I = SuperRegClasses; + while (*I != NULL) ++I; + return I; + } + /// allocation_order_begin/end - These methods define a range of registers /// which specify the registers in this class that are valid to register /// allocate, and the preferred order to allocate them in. For example, Modified: llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp?rev=40519&r1=40518&r2=40519&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp Thu Jul 26 03:01:58 2007 @@ -223,9 +223,9 @@ << RegisterClasses[i].getName() << "RegClass;\n"; std::map > SuperClassMap; + std::map > SuperRegClassMap; OS << "\n"; - // Emit the sub-register classes for each RegisterClass for (unsigned rc = 0, e = RegisterClasses.size(); rc != e; ++rc) { const CodeGenRegisterClass &RC = RegisterClasses[rc]; @@ -246,9 +246,18 @@ for (; rc2 != e2; ++rc2) { const CodeGenRegisterClass &RC2 = RegisterClasses[rc2]; if (RC.SubRegClasses[subrc]->getName() == RC2.getName()) { - if (!Empty) OS << ", "; - OS << "&" << getQualifiedName(RC2.TheDef) << "RegClass"; + if (!Empty) + OS << ", "; + OS << "&" << getQualifiedName(RC2.TheDef) << "RegClass"; Empty = false; + + std::map >::iterator SCMI = + SuperRegClassMap.find(rc2); + if (SCMI == SuperRegClassMap.end()) { + SuperRegClassMap.insert(std::make_pair(rc2, std::set())); + SCMI = SuperRegClassMap.find(rc2); + } + SCMI->second.insert(rc); break; } } @@ -262,6 +271,36 @@ OS << "\n };\n\n"; } + // Emit the super-register classes for each RegisterClass + for (unsigned rc = 0, e = RegisterClasses.size(); rc != e; ++rc) { + const CodeGenRegisterClass &RC = RegisterClasses[rc]; + + // Give the register class a legal C name if it's anonymous. + std::string Name = RC.TheDef->getName(); + + OS << " // " << Name + << " Super-register Classess...\n" + << " static const TargetRegisterClass* const " + << Name << "SuperRegClasses [] = {\n "; + + bool Empty = true; + std::map >::iterator I = + SuperRegClassMap.find(rc); + if (I != SuperRegClassMap.end()) { + for (std::set::iterator II = I->second.begin(), + EE = I->second.end(); II != EE; ++II) { + const CodeGenRegisterClass &RC2 = RegisterClasses[*II]; + if (!Empty) + OS << ", "; + OS << "&" << getQualifiedName(RC2.TheDef) << "RegClass"; + Empty = false; + } + } + + OS << (!Empty ? ", " : "") << "NULL"; + OS << "\n };\n\n"; + } + // Emit the sub-classes array for each RegisterClass for (unsigned rc = 0, e = RegisterClasses.size(); rc != e; ++rc) { const CodeGenRegisterClass &RC = RegisterClasses[rc]; @@ -343,6 +382,7 @@ << RC.getName() + "Subclasses" << ", " << RC.getName() + "Superclasses" << ", " << RC.getName() + "SubRegClasses" << ", " + << RC.getName() + "SuperRegClasses" << ", " << RC.SpillSize/8 << ", " << RC.SpillAlignment/8 << ", " << RC.getName() << ", " << RC.getName() << " + " << RC.Elements.size() << ") {}\n"; From christopher.lamb at gmail.com Thu Jul 26 03:12:10 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Thu, 26 Jul 2007 08:12:10 -0000 Subject: [llvm-commits] [llvm] r40520 - in /llvm/trunk: include/llvm/CodeGen/ScheduleDAG.h lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Message-ID: <200707260812.l6Q8CAYc032614@zion.cs.uiuc.edu> Author: clamb Date: Thu Jul 26 03:12:07 2007 New Revision: 40520 URL: http://llvm.org/viewvc/llvm-project?rev=40520&view=rev Log: Teach DAG scheduling how to properly emit subreg insert/extract machine instructions. PR1350 Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=40520&r1=40519&r2=40520&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original) +++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Thu Jul 26 03:12:07 2007 @@ -255,6 +255,11 @@ virtual void Schedule() {} private: + /// EmitSubregNode - Generate machine code for subreg nodes. + /// + void EmitSubregNode(SDNode *Node, + DenseMap &VRBaseMap); + void AddOperand(MachineInstr *MI, SDOperand Op, unsigned IIOpNum, const TargetInstrDescriptor *II, DenseMap &VRBaseMap); Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp?rev=40520&r1=40519&r2=40520&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Thu Jul 26 03:12:07 2007 @@ -429,6 +429,148 @@ return 0; } +// Returns the Register Class of a subregister +static const TargetRegisterClass *getSubRegisterRegClass( + const TargetRegisterClass *TRC, + unsigned SubIdx) { + // Pick the register class of the subregister + MRegisterInfo::regclass_iterator I = TRC->subregclasses_begin() + SubIdx-1; + assert(I < TRC->subregclasses_end() && + "Invalid subregister index for register class"); + return *I; +} + +static const TargetRegisterClass *getSuperregRegisterClass( + const TargetRegisterClass *TRC, + unsigned SubIdx, + MVT::ValueType VT) { + // Pick the register class of the superegister for this type + for (MRegisterInfo::regclass_iterator I = TRC->superregclasses_begin(), + E = TRC->superregclasses_end(); I != E; ++I) + if ((*I)->hasType(VT) && getSubRegisterRegClass(*I, SubIdx) == TRC) + return *I; + assert(false && "Couldn't find the register class"); + return 0; +} + +/// EmitSubregNode - Generate machine code for subreg nodes. +/// +void ScheduleDAG::EmitSubregNode(SDNode *Node, + DenseMap &VRBaseMap) { + unsigned VRBase = 0; + unsigned Opc = Node->getTargetOpcode(); + if (Opc == TargetInstrInfo::EXTRACT_SUBREG) { + // If the node is only used by a CopyToReg and the dest reg is a vreg, use + // the CopyToReg'd destination register instead of creating a new vreg. + for (SDNode::use_iterator UI = Node->use_begin(), E = Node->use_end(); + UI != E; ++UI) { + SDNode *Use = *UI; + if (Use->getOpcode() == ISD::CopyToReg && + Use->getOperand(2).Val == Node) { + unsigned DestReg = cast(Use->getOperand(1))->getReg(); + if (MRegisterInfo::isVirtualRegister(DestReg)) { + VRBase = DestReg; + break; + } + } + } + + unsigned SubIdx = cast(Node->getOperand(1))->getValue(); + + // TODO: If the node is a use of a CopyFromReg from a physical register + // fold the extract into the copy now + + // TODO: Add tracking info to SSARegMap of which vregs are subregs + // to allow coalescing in the allocator + + // Create the extract_subreg machine instruction. + MachineInstr *MI = + new MachineInstr(BB, TII->get(TargetInstrInfo::EXTRACT_SUBREG)); + + // Figure out the register class to create for the destreg. + unsigned VReg = getVR(Node->getOperand(0), VRBaseMap); + const TargetRegisterClass *TRC = RegMap->getRegClass(VReg); + const TargetRegisterClass *SRC = getSubRegisterRegClass(TRC, SubIdx); + + if (VRBase) { + // Grab the destination register + const TargetRegisterClass *DRC = 0; + DRC = RegMap->getRegClass(VRBase); + assert(SRC == DRC && + "Source subregister and destination must have the same class"); + } else { + // Create the reg + VRBase = RegMap->createVirtualRegister(SRC); + } + + // Add def, source, and subreg index + MI->addRegOperand(VRBase, true); + AddOperand(MI, Node->getOperand(0), 0, 0, VRBaseMap); + MI->addImmOperand(SubIdx); + + } else if (Opc == TargetInstrInfo::INSERT_SUBREG) { + assert((Node->getNumOperands() == 2 || Node->getNumOperands() == 3) && + "Malformed insert_subreg node"); + bool isUndefInput = (Node->getNumOperands() == 2); + unsigned SubReg = 0; + unsigned SubIdx = 0; + + if (isUndefInput) { + SubReg = getVR(Node->getOperand(0), VRBaseMap); + SubIdx = cast(Node->getOperand(1))->getValue(); + } else { + SubReg = getVR(Node->getOperand(1), VRBaseMap); + SubIdx = cast(Node->getOperand(2))->getValue(); + } + + // TODO: Add tracking info to SSARegMap of which vregs are subregs + // to allow coalescing in the allocator + + // If the node is only used by a CopyToReg and the dest reg is a vreg, use + // the CopyToReg'd destination register instead of creating a new vreg. + // If the CopyToReg'd destination register is physical, then fold the + // insert into the copy + for (SDNode::use_iterator UI = Node->use_begin(), E = Node->use_end(); + UI != E; ++UI) { + SDNode *Use = *UI; + if (Use->getOpcode() == ISD::CopyToReg && + Use->getOperand(2).Val == Node) { + unsigned DestReg = cast(Use->getOperand(1))->getReg(); + if (MRegisterInfo::isVirtualRegister(DestReg)) { + VRBase = DestReg; + break; + } + } + } + + // Create the insert_subreg machine instruction. + MachineInstr *MI = + new MachineInstr(BB, TII->get(TargetInstrInfo::INSERT_SUBREG)); + + // Figure out the register class to create for the destreg. + const TargetRegisterClass *TRC = 0; + if (VRBase) { + TRC = RegMap->getRegClass(VRBase); + } else { + TRC = getSuperregRegisterClass(RegMap->getRegClass(SubReg), + SubIdx, + Node->getValueType(0)); + assert(TRC && "Couldn't determine register class for insert_subreg"); + VRBase = RegMap->createVirtualRegister(TRC); // Create the reg + } + + MI->addRegOperand(VRBase, true); + AddOperand(MI, Node->getOperand(0), 0, 0, VRBaseMap); + if (!isUndefInput) + AddOperand(MI, Node->getOperand(1), 0, 0, VRBaseMap); + MI->addImmOperand(SubIdx); + } else + assert(0 && "Node is not a subreg insert or extract"); + + bool isNew = VRBaseMap.insert(std::make_pair(SDOperand(Node,0), VRBase)); + assert(isNew && "Node emitted out of order - early"); +} + /// EmitNode - Generate machine code for an node and needed dependencies. /// void ScheduleDAG::EmitNode(SDNode *Node, @@ -436,6 +578,14 @@ // If machine instruction if (Node->isTargetOpcode()) { unsigned Opc = Node->getTargetOpcode(); + + // Handle subreg insert/extract specially + if (Opc == TargetInstrInfo::EXTRACT_SUBREG || + Opc == TargetInstrInfo::INSERT_SUBREG) { + EmitSubregNode(Node, VRBaseMap); + return; + } + const TargetInstrDescriptor &II = TII->get(Opc); unsigned NumResults = CountResults(Node); From christopher.lamb at gmail.com Thu Jul 26 03:18:33 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Thu, 26 Jul 2007 08:18:33 -0000 Subject: [llvm-commits] [llvm] r40521 - in /llvm/trunk: include/llvm/CodeGen/Passes.h lib/CodeGen/LLVMTargetMachine.cpp lib/CodeGen/LowerSubregs.cpp Message-ID: <200707260818.l6Q8IXsf000338@zion.cs.uiuc.edu> Author: clamb Date: Thu Jul 26 03:18:32 2007 New Revision: 40521 URL: http://llvm.org/viewvc/llvm-project?rev=40521&view=rev Log: Add a MachineFunction pass, which runs post register allocation, that turns subreg insert/extract instruction into register copies. This ensures correct code gen if the coalescer isn't able to remove all subreg instructions. Added: llvm/trunk/lib/CodeGen/LowerSubregs.cpp Modified: llvm/trunk/include/llvm/CodeGen/Passes.h llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Modified: llvm/trunk/include/llvm/CodeGen/Passes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/Passes.h?rev=40521&r1=40520&r2=40521&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/Passes.h (original) +++ llvm/trunk/include/llvm/CodeGen/Passes.h Thu Jul 26 03:18:32 2007 @@ -88,6 +88,12 @@ /// and eliminates abstract frame references. /// FunctionPass *createPrologEpilogCodeInserter(); + + /// LowerSubregs Pass - This pass lowers subregs to register-register copies + /// which yields suboptimial, but correct code if the register allocator + /// cannot coalesce all subreg operations during allocation. + /// + FunctionPass *createLowerSubregsPass(); /// createPostRAScheduler - under development. FunctionPass *createPostRAScheduler(); Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=40521&r1=40520&r2=40521&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Thu Jul 26 03:18:32 2007 @@ -96,6 +96,8 @@ if (addPreEmitPass(PM, Fast) && PrintMachineCode) PM.add(createMachineFunctionPrinterPass(cerr)); + + PM.add(createLowerSubregsPass()); switch (FileType) { default: @@ -197,6 +199,8 @@ if (addPreEmitPass(PM, Fast) && PrintMachineCode) PM.add(createMachineFunctionPrinterPass(cerr)); + + PM.add(createLowerSubregsPass()); addCodeEmitter(PM, Fast, PrintEmittedAsm, MCE); Added: llvm/trunk/lib/CodeGen/LowerSubregs.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LowerSubregs.cpp?rev=40521&view=auto ============================================================================== --- llvm/trunk/lib/CodeGen/LowerSubregs.cpp (added) +++ llvm/trunk/lib/CodeGen/LowerSubregs.cpp Thu Jul 26 03:18:32 2007 @@ -0,0 +1,226 @@ +//===-- LowerSubregs.cpp - Subregister Lowering instruction pass ----------===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by Christopher Lamb and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#define DEBUG_TYPE "lowersubregs" +#include "llvm/CodeGen/Passes.h" +#include "llvm/Function.h" +#include "llvm/CodeGen/MachineFunctionPass.h" +#include "llvm/CodeGen/MachineInstr.h" +#include "llvm/CodeGen/SSARegMap.h" +#include "llvm/Target/MRegisterInfo.h" +#include "llvm/Target/TargetInstrInfo.h" +#include "llvm/Target/TargetMachine.h" +#include "llvm/Support/Debug.h" +#include "llvm/Support/Compiler.h" +using namespace llvm; + +namespace { + struct VISIBILITY_HIDDEN LowerSubregsInstructionPass + : public MachineFunctionPass { + static char ID; // Pass identification, replacement for typeid + LowerSubregsInstructionPass() : MachineFunctionPass((intptr_t)&ID) {} + + const char *getPassName() const { + return "Subregister lowering instruction pass"; + } + + /// runOnMachineFunction - pass entry point + bool runOnMachineFunction(MachineFunction&); + }; + + char LowerSubregsInstructionPass::ID = 0; +} + +FunctionPass *llvm::createLowerSubregsPass() { + return new LowerSubregsInstructionPass(); +} + +// Returns the Register Class of a physical register +static const TargetRegisterClass *getPhysicalRegisterRegClass( + const MRegisterInfo &MRI, + unsigned reg) { + assert(MRegisterInfo::isPhysicalRegister(reg) && + "reg must be a physical register"); + // Pick the register class of the right type that contains this physreg. + for (MRegisterInfo::regclass_iterator I = MRI.regclass_begin(), + E = MRI.regclass_end(); I != E; ++I) + if ((*I)->contains(reg)) + return *I; + assert(false && "Couldn't find the register class"); + return 0; +} + +static bool isSubRegOf(const MRegisterInfo &MRI, + unsigned SubReg, + unsigned SupReg) { + const TargetRegisterDesc &RD = MRI[SubReg]; + for (const unsigned *reg = RD.SuperRegs; *reg != 0; ++reg) + if (*reg == SupReg) + return true; + + return false; +} + + +/// runOnMachineFunction - Reduce subregister inserts and extracts to register +/// copies. +/// +bool LowerSubregsInstructionPass::runOnMachineFunction(MachineFunction &MF) { + DOUT << "Machine Function\n"; + const TargetMachine &TM = MF.getTarget(); + const MRegisterInfo &MRI = *TM.getRegisterInfo(); + + bool MadeChange = false; + + DOUT << "********** LOWERING SUBREG INSTRS **********\n"; + DOUT << "********** Function: " << MF.getFunction()->getName() << '\n'; + + for (MachineFunction::iterator mbbi = MF.begin(), mbbe = MF.end(); + mbbi != mbbe; ++mbbi) { + for (MachineBasicBlock::iterator mi = mbbi->begin(), me = mbbi->end(); + mi != me; ++mi) { + + if (mi->getOpcode() == TargetInstrInfo::EXTRACT_SUBREG) { + assert(mi->getOperand(0).isRegister() && mi->getOperand(0).isDef() && + mi->getOperand(1).isRegister() && mi->getOperand(1).isUse() && + mi->getOperand(2).isImm() && "Malformed extract_subreg"); + + unsigned SuperReg = mi->getOperand(1).getReg(); + unsigned SubIdx = mi->getOperand(2).getImm(); + + assert(MRegisterInfo::isPhysicalRegister(SuperReg) && + "Extract supperg source must be a physical register"); + unsigned SrcReg = MRI.getSubReg(SuperReg, SubIdx); + unsigned DstReg = mi->getOperand(0).getReg(); + + DOUT << "subreg: CONVERTING: " << *mi; + + if (SrcReg != DstReg) { + const TargetRegisterClass *TRC = 0; + if (MRegisterInfo::isPhysicalRegister(DstReg)) { + TRC = getPhysicalRegisterRegClass(MRI, DstReg); + } else { + TRC = MF.getSSARegMap()->getRegClass(DstReg); + } + assert(TRC == getPhysicalRegisterRegClass(MRI, SrcReg) && + "Extract subreg and Dst must be of same register class"); + + MRI.copyRegToReg(*mbbi, mi, DstReg, SrcReg, TRC); + MachineBasicBlock::iterator dmi = mi; + DOUT << "subreg: " << *(--dmi); + } + + DOUT << "\n"; + mbbi->erase(mi); + MadeChange = true; + + } else if (mi->getOpcode() == TargetInstrInfo::INSERT_SUBREG) { + + unsigned DstReg = 0; + unsigned SrcReg = 0; + unsigned InsReg = 0; + unsigned SubIdx = 0; + + // If only have 3 operands, then the source superreg is undef + // and we can supress the copy from the undef value + if (mi->getNumOperands() == 3) { + assert((mi->getOperand(0).isRegister() && mi->getOperand(0).isDef()) && + (mi->getOperand(1).isRegister() && mi->getOperand(1).isUse()) && + mi->getOperand(2).isImm() && "Invalid extract_subreg"); + DstReg = mi->getOperand(0).getReg(); + SrcReg = DstReg; + InsReg = mi->getOperand(1).getReg(); + SubIdx = mi->getOperand(2).getImm(); + } else if (mi->getNumOperands() == 4) { + assert((mi->getOperand(0).isRegister() && mi->getOperand(0).isDef()) && + (mi->getOperand(1).isRegister() && mi->getOperand(1).isUse()) && + (mi->getOperand(2).isRegister() && mi->getOperand(2).isUse()) && + mi->getOperand(3).isImm() && "Invalid extract_subreg"); + DstReg = mi->getOperand(0).getReg(); + SrcReg = mi->getOperand(1).getReg(); + InsReg = mi->getOperand(2).getReg(); + SubIdx = mi->getOperand(3).getImm(); + } else + assert(0 && "Malformed extract_subreg"); + + assert(SubIdx != 0 && "Invalid index for extract_subreg"); + unsigned DstSubReg = MRI.getSubReg(DstReg, SubIdx); + + assert(MRegisterInfo::isPhysicalRegister(SrcReg) && + "Insert superreg source must be in a physical register"); + assert(MRegisterInfo::isPhysicalRegister(DstReg) && + "Insert destination must be in a physical register"); + assert(MRegisterInfo::isPhysicalRegister(InsReg) && + "Inserted value must be in a physical register"); + + DOUT << "subreg: CONVERTING: " << *mi; + + // If the inserted register is already allocated into a subregister + // of the destination, we copy the subreg into the source + // However, this is only safe if the insert instruction is the kill + // of the source register + bool revCopyOrder = isSubRegOf(MRI, InsReg, DstReg); + if (revCopyOrder) { + if (mi->getOperand(1).isKill()) { + DstSubReg = MRI.getSubReg(SrcReg, SubIdx); + // Insert sub-register copy + const TargetRegisterClass *TRC1 = 0; + if (MRegisterInfo::isPhysicalRegister(InsReg)) { + TRC1 = getPhysicalRegisterRegClass(MRI, InsReg); + } else { + TRC1 = MF.getSSARegMap()->getRegClass(InsReg); + } + + MRI.copyRegToReg(*mbbi, mi, DstSubReg, InsReg, TRC1); + MachineBasicBlock::iterator dmi = mi; + DOUT << "subreg: " << *(--dmi); + } else { + assert(0 && "Don't know how to convert this insert"); + } + } + + if (SrcReg != DstReg) { + // Insert super-register copy + const TargetRegisterClass *TRC0 = 0; + if (MRegisterInfo::isPhysicalRegister(DstReg)) { + TRC0 = getPhysicalRegisterRegClass(MRI, DstReg); + } else { + TRC0 = MF.getSSARegMap()->getRegClass(DstReg); + } + assert(TRC0 == getPhysicalRegisterRegClass(MRI, SrcReg) && + "Insert superreg and Dst must be of same register class"); + + MRI.copyRegToReg(*mbbi, mi, DstReg, SrcReg, TRC0); + MachineBasicBlock::iterator dmi = mi; + DOUT << "subreg: " << *(--dmi); + } + + if (!revCopyOrder && InsReg != DstSubReg) { + // Insert sub-register copy + const TargetRegisterClass *TRC1 = 0; + if (MRegisterInfo::isPhysicalRegister(InsReg)) { + TRC1 = getPhysicalRegisterRegClass(MRI, InsReg); + } else { + TRC1 = MF.getSSARegMap()->getRegClass(InsReg); + } + + MRI.copyRegToReg(*mbbi, mi, DstSubReg, InsReg, TRC1); + MachineBasicBlock::iterator dmi = mi; + DOUT << "subreg: " << *(--dmi); + } + + DOUT << "\n"; + mbbi->erase(mi); + MadeChange = true; + } + } + } + + return MadeChange; +} From asl at math.spbu.ru Thu Jul 26 05:31:53 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Thu, 26 Jul 2007 10:31:53 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40522 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Message-ID: <200707261031.l6QAVrQY004632@zion.cs.uiuc.edu> Author: asl Date: Thu Jul 26 05:31:52 2007 New Revision: 40522 URL: http://llvm.org/viewvc/llvm-project?rev=40522&view=rev Log: Fix float initializers emission (HOST_WORDS_BIG_ENDIAN is obsolete). We still need to verify stuff on big-endian targets and cross-compilation on targets with different endiannes. Also, make use of FLOAT_WORDS_BIG_ENDIAN, which seems to be important for ARM. This change allows most of SingleSource/Benchmark and some of MultiSource/Applications to pass! 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=40522&r1=40521&r2=40522&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Thu Jul 26 05:31:52 2007 @@ -5496,25 +5496,22 @@ // Here's how this works: // REAL_VALUE_TO_TARGET_DOUBLE() will generate the floating point number - // as an array of integers in the hosts's representation. Each integer + // as an array of integers in the target's representation. Each integer // in the array will hold 32 bits of the result REGARDLESS OF THE HOST'S - // INTEGER SIZE. + // INTEGER SIZE. // // This, then, makes the conversion pretty simple. The tricky part is // getting the byte ordering correct and make sure you don't print any // more than 32 bits per integer on platforms with ints > 32 bits. - // - bool HostBigEndian = false; -#ifdef WORDS_BIG_ENDIAN - HostBigEndian = true; -#endif - + UArr[0] = RealArr[0]; // Long -> int convert UArr[1] = RealArr[1]; - if (WORDS_BIG_ENDIAN != HostBigEndian) + // FIXME: verify on big-endian targets and cross from big- to little- endian + // targets + if (FLOAT_WORDS_BIG_ENDIAN) std::swap(UArr[0], UArr[1]); - + return ConstantFP::get(Ty, V); } From baldrick at free.fr Thu Jul 26 07:47:10 2007 From: baldrick at free.fr (Duncan Sands) Date: Thu, 26 Jul 2007 12:47:10 -0000 Subject: [llvm-commits] [llvm-gcc-4.0] r40523 - /llvm-gcc-4.0/trunk/gcc/gcc.c Message-ID: <200707261247.l6QClApa009533@zion.cs.uiuc.edu> Author: baldrick Date: Thu Jul 26 07:47:10 2007 New Revision: 40523 URL: http://llvm.org/viewvc/llvm-project?rev=40523&view=rev Log: This variable could be used uninitialized. Modified: llvm-gcc-4.0/trunk/gcc/gcc.c Modified: llvm-gcc-4.0/trunk/gcc/gcc.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/gcc.c?rev=40523&r1=40522&r2=40523&view=diff ============================================================================== --- llvm-gcc-4.0/trunk/gcc/gcc.c (original) +++ llvm-gcc-4.0/trunk/gcc/gcc.c Thu Jul 26 07:47:10 2007 @@ -6390,7 +6390,8 @@ main (int argc, const char **argv) { size_t i; - int value; + /* APPLE LOCAL LLVM uninit warning */ + int value = 0; int linker_was_run = 0; int lang_n_infiles = 0; int num_linker_inputs = 0; From baldrick at free.fr Thu Jul 26 07:52:30 2007 From: baldrick at free.fr (Duncan Sands) Date: Thu, 26 Jul 2007 12:52:30 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40524 - /llvm-gcc-4.2/trunk/gcc/gcc.c Message-ID: <200707261252.l6QCqU5i009649@zion.cs.uiuc.edu> Author: baldrick Date: Thu Jul 26 07:52:29 2007 New Revision: 40524 URL: http://llvm.org/viewvc/llvm-project?rev=40524&view=rev Log: Tweak this uninitialized variable fix in a way that minimizes the differences with mainline. Modified: llvm-gcc-4.2/trunk/gcc/gcc.c Modified: llvm-gcc-4.2/trunk/gcc/gcc.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/gcc.c?rev=40524&r1=40523&r2=40524&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/gcc.c (original) +++ llvm-gcc-4.2/trunk/gcc/gcc.c Thu Jul 26 07:52:29 2007 @@ -6460,8 +6460,7 @@ main (int argc, char **argv) { size_t i; - /* APPLE LOCAL uninit warning */ - int value = 0; + int value; int linker_was_run = 0; int lang_n_infiles = 0; int num_linker_inputs = 0; @@ -6989,7 +6988,9 @@ infiles[i].incompiler = lookup_compiler (infiles[i].name, strlen (infiles[i].name), infiles[i].language); - + + if (value < 0) + this_file_error = 1; } else if (traditional_cpp_flag) { @@ -7002,9 +7003,6 @@ } } - if (value < 0) - this_file_error = 1; - if (this_file_error) { delete_failure_queue (); From asl at math.spbu.ru Thu Jul 26 08:18:48 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Thu, 26 Jul 2007 13:18:48 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40525 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Message-ID: <200707261318.l6QDInJW010358@zion.cs.uiuc.edu> Author: asl Date: Thu Jul 26 08:18:48 2007 New Revision: 40525 URL: http://llvm.org/viewvc/llvm-project?rev=40525&view=rev Log: Emit globals to LLVM properly (when they appear as lvalue's) 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=40525&r1=40524&r2=40525&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Thu Jul 26 08:18:48 2007 @@ -5048,7 +5048,7 @@ // If this is an aggregate, emit it to LLVM now. GCC happens to // get this case right by forcing the initializer into memory. if (TREE_CODE(exp) == CONST_DECL || TREE_CODE(exp) == VAR_DECL) { - if (DECL_INITIAL(exp) && GV->isDeclaration()) { + if (GV->isDeclaration()) { emit_global_to_llvm(exp); Decl = DECL_LLVM(exp); // Decl could have change if it changed type. } @@ -6128,7 +6128,7 @@ // If this is an aggregate, emit it to LLVM now. GCC happens to // get this case right by forcing the initializer into memory. if (TREE_CODE(exp) == CONST_DECL || TREE_CODE(exp) == VAR_DECL) { - if (DECL_INITIAL(exp) && Val->isDeclaration()) { + if (Val->isDeclaration()) { emit_global_to_llvm(exp); // Decl could have change if it changed type. Val = cast(DECL_LLVM(exp)); From baldrick at free.fr Thu Jul 26 09:56:19 2007 From: baldrick at free.fr (Duncan Sands) Date: Thu, 26 Jul 2007 16:56:19 +0200 Subject: [llvm-commits] Trampoline support (pointers nested funtions) Message-ID: <200707261656.20050.baldrick@free.fr> These patches add support for taking pointers to nested functions (a gcc extension). This is done by building and executing a small code stub on the stack, known as a trampoline. The LLVM part adds two new intrinsics, llvm.init.trampoline and llvm.adjust.trampoline. The adjust intrinsic is implemented for all architectures that are supported in gcc, while the init intrinsic is only implemented for X86. Furthermore, trampolines can interact badly with stack protection mechanisms which don't much like execution of code on the stack. GCC does various tricks to tell the OS that the trampoline is kosher. I didn't implement any of those tricks yet, because it works without them on my machine :) Enjoy! Duncan. -------------- next part -------------- A non-text attachment was scrubbed... Name: tramp.diff Type: text/x-diff Size: 29376 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070726/0c80a0a0/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: tramp-gcc.diff Type: text/x-diff Size: 4440 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070726/0c80a0a0/attachment-0001.bin From djg at cray.com Thu Jul 26 10:11:00 2007 From: djg at cray.com (Dan Gohman) Date: Thu, 26 Jul 2007 15:11:00 -0000 Subject: [llvm-commits] [llvm] r40527 - /llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp Message-ID: <200707261511.l6QFB0A5017551@zion.cs.uiuc.edu> Author: djg Date: Thu Jul 26 10:11:00 2007 New Revision: 40527 URL: http://llvm.org/viewvc/llvm-project?rev=40527&view=rev Log: Fix a pasto in a comment. Modified: llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp Modified: llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp?rev=40527&r1=40526&r2=40527&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/IntrinsicEmitter.cpp Thu Jul 26 10:11:00 2007 @@ -309,7 +309,7 @@ break; } } - OS << " return true; // These intrinsics have no side effects.\n"; + OS << " return true; // These intrinsics do not reference memory.\n"; OS << " }\n"; OS << "#endif\n\n"; } From djg at cray.com Thu Jul 26 10:11:50 2007 From: djg at cray.com (Dan Gohman) Date: Thu, 26 Jul 2007 15:11:50 -0000 Subject: [llvm-commits] [llvm] r40528 - /llvm/trunk/lib/Target/X86/X86InstrSSE.td Message-ID: <200707261511.l6QFBo2c017647@zion.cs.uiuc.edu> Author: djg Date: Thu Jul 26 10:11:50 2007 New Revision: 40528 URL: http://llvm.org/viewvc/llvm-project?rev=40528&view=rev Log: Fix a whitespace difference between CMPSSrr and CMPSDrr. 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=40528&r1=40527&r2=40528&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Thu Jul 26 10:11:50 2007 @@ -349,8 +349,7 @@ let isTwoAddress = 1 in { def CMPSSrr : SSI<0xC2, MRMSrcReg, (outs FR32:$dst), (ins FR32:$src1, FR32:$src, SSECC:$cc), - "cmp${cc}ss {$src, $dst|$dst, $src}", - []>; + "cmp${cc}ss {$src, $dst|$dst, $src}", []>; def CMPSSrm : SSI<0xC2, MRMSrcMem, (outs FR32:$dst), (ins FR32:$src1, f32mem:$src, SSECC:$cc), "cmp${cc}ss {$src, $dst|$dst, $src}", []>; From djg at cray.com Thu Jul 26 10:24:15 2007 From: djg at cray.com (Dan Gohman) Date: Thu, 26 Jul 2007 15:24:15 -0000 Subject: [llvm-commits] [llvm] r40529 - /llvm/trunk/lib/Target/X86/X86InstrInfo.td Message-ID: <200707261524.l6QFOFrM018925@zion.cs.uiuc.edu> Author: djg Date: Thu Jul 26 10:24:15 2007 New Revision: 40529 URL: http://llvm.org/viewvc/llvm-project?rev=40529&view=rev Log: In the .loc directive, print the fields as "debug" fields, so they don't get decorated as if for immediate fields for instructions. Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=40529&r1=40528&r2=40529&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Thu Jul 26 10:24:15 2007 @@ -2498,7 +2498,7 @@ def DWARF_LOC : I<0, Pseudo, (outs), (ins i32imm:$line, i32imm:$col, i32imm:$file), - "; .loc $file, $line, $col", + "; .loc ${file:debug}, ${line:debug}, ${col:debug}", [(dwarf_loc (i32 imm:$line), (i32 imm:$col), (i32 imm:$file))]>; From djg at cray.com Thu Jul 26 10:25:08 2007 From: djg at cray.com (Dan Gohman) Date: Thu, 26 Jul 2007 15:25:08 -0000 Subject: [llvm-commits] [llvm] r40530 - /llvm/trunk/lib/VMCore/BasicBlock.cpp Message-ID: <200707261525.l6QFP8oj019013@zion.cs.uiuc.edu> Author: djg Date: Thu Jul 26 10:25:08 2007 New Revision: 40530 URL: http://llvm.org/viewvc/llvm-project?rev=40530&view=rev Log: DummyInst's member functions don't need to be virtual. Modified: llvm/trunk/lib/VMCore/BasicBlock.cpp Modified: llvm/trunk/lib/VMCore/BasicBlock.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/BasicBlock.cpp?rev=40530&r1=40529&r2=40530&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/BasicBlock.cpp (original) +++ llvm/trunk/lib/VMCore/BasicBlock.cpp Thu Jul 26 10:25:08 2007 @@ -40,11 +40,11 @@ LeakDetector::removeGarbageObject(this); } - virtual Instruction *clone() const { + Instruction *clone() const { assert(0 && "Cannot clone EOL");abort(); return 0; } - virtual const char *getOpcodeName() const { return "*end-of-list-inst*"; } + const char *getOpcodeName() const { return "*end-of-list-inst*"; } // Methods for support type inquiry through isa, cast, and dyn_cast... static inline bool classof(const DummyInst *) { return true; } From djg at cray.com Thu Jul 26 10:29:35 2007 From: djg at cray.com (Dan Gohman) Date: Thu, 26 Jul 2007 15:29:35 -0000 Subject: [llvm-commits] [llvm] r40531 - /llvm/trunk/lib/Transforms/Scalar/CorrelatedExprs.cpp Message-ID: <200707261529.l6QFTZxH019463@zion.cs.uiuc.edu> Author: djg Date: Thu Jul 26 10:29:35 2007 New Revision: 40531 URL: http://llvm.org/viewvc/llvm-project?rev=40531&view=rev Log: Remove a bogus return statement, what appears to have been a pasto from Relation::contradicts in Relation::incorporate. Modified: llvm/trunk/lib/Transforms/Scalar/CorrelatedExprs.cpp Modified: llvm/trunk/lib/Transforms/Scalar/CorrelatedExprs.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CorrelatedExprs.cpp?rev=40531&r1=40530&r2=40531&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/CorrelatedExprs.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/CorrelatedExprs.cpp Thu Jul 26 10:29:35 2007 @@ -1321,7 +1321,6 @@ } return false; case FCmpInst::FCMP_OGE: - return Op == FCmpInst::FCMP_OLT; if (Op == FCmpInst::FCMP_OEQ || Op == FCmpInst::FCMP_OGT) { Rel = Op; return true; From asl at math.spbu.ru Thu Jul 26 10:47:14 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Thu, 26 Jul 2007 15:47:14 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40532 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Message-ID: <200707261547.l6QFlEj0021299@zion.cs.uiuc.edu> Author: asl Date: Thu Jul 26 10:47:14 2007 New Revision: 40532 URL: http://llvm.org/viewvc/llvm-project?rev=40532&view=rev Log: This correct way to handle with globals. This makes MultiSource/{Applications,Benchmarks} and SingleSource/{Applications,Benchmark} (C parts) to pass being compiled with llvm-gcc-4.2! 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=40532&r1=40531&r2=40532&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Thu Jul 26 10:47:14 2007 @@ -5048,7 +5048,7 @@ // If this is an aggregate, emit it to LLVM now. GCC happens to // get this case right by forcing the initializer into memory. if (TREE_CODE(exp) == CONST_DECL || TREE_CODE(exp) == VAR_DECL) { - if (GV->isDeclaration()) { + if ((DECL_INITIAL(exp) || !TREE_PUBLIC(exp)) && GV->isDeclaration()) { emit_global_to_llvm(exp); Decl = DECL_LLVM(exp); // Decl could have change if it changed type. } @@ -6124,11 +6124,11 @@ TREE_USED(exp) = 1; Val = cast(DECL_LLVM(exp)); } - + // If this is an aggregate, emit it to LLVM now. GCC happens to // get this case right by forcing the initializer into memory. if (TREE_CODE(exp) == CONST_DECL || TREE_CODE(exp) == VAR_DECL) { - if (Val->isDeclaration()) { + if ((DECL_INITIAL(exp) || !TREE_PUBLIC(exp)) && Val->isDeclaration()) { emit_global_to_llvm(exp); // Decl could have change if it changed type. Val = cast(DECL_LLVM(exp)); From djg at cray.com Thu Jul 26 11:06:08 2007 From: djg at cray.com (Dan Gohman) Date: Thu, 26 Jul 2007 16:06:08 -0000 Subject: [llvm-commits] [llvm] r40533 - in /llvm/trunk/lib: Transforms/Utils/Local.cpp VMCore/Instruction.cpp Message-ID: <200707261606.l6QG69jM022844@zion.cs.uiuc.edu> Author: djg Date: Thu Jul 26 11:06:08 2007 New Revision: 40533 URL: http://llvm.org/viewvc/llvm-project?rev=40533&view=rev Log: Move the GET_SIDE_EFFECT_INFO logic from isInstructionTriviallyDead to Instruction::mayWriteToMemory, fixing a FIXME, and helping various places that call mayWriteToMemory directly. Modified: llvm/trunk/lib/Transforms/Utils/Local.cpp llvm/trunk/lib/VMCore/Instruction.cpp Modified: llvm/trunk/lib/Transforms/Utils/Local.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/Local.cpp?rev=40533&r1=40532&r2=40533&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/Local.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/Local.cpp Thu Jul 26 11:06:08 2007 @@ -175,13 +175,6 @@ if (!I->mayWriteToMemory()) return true; - if (CallInst *CI = dyn_cast(I)) - if (Function *F = CI->getCalledFunction()) { - unsigned IntrinsicID = F->getIntrinsicID(); -#define GET_SIDE_EFFECT_INFO -#include "llvm/Intrinsics.gen" -#undef GET_SIDE_EFFECT_INFO - } return false; } Modified: llvm/trunk/lib/VMCore/Instruction.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instruction.cpp?rev=40533&r1=40532&r2=40533&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Instruction.cpp (original) +++ llvm/trunk/lib/VMCore/Instruction.cpp Thu Jul 26 11:06:08 2007 @@ -197,6 +197,15 @@ return true; } +// IntrinsicOnlyReadsMemory - Return true if the specified intrinsic doesn't +// have any side-effects or if it only reads memory. +static bool IntrinsicOnlyReadsMemory(unsigned IntrinsicID) { +#define GET_SIDE_EFFECT_INFO +#include "llvm/Intrinsics.gen" +#undef GET_SIDE_EFFECT_INFO + return false; +} + /// mayWriteToMemory - Return true if this instruction may modify memory. /// bool Instruction::mayWriteToMemory() const { @@ -208,11 +217,10 @@ case Instruction::VAArg: return true; case Instruction::Call: - //if (const IntrinsicInst *II = dyn_cast(this)) { + if (const IntrinsicInst *II = dyn_cast(this)) { // If the intrinsic doesn't write memory, it is safe. - // FIXME: this is obviously supposed to determine which intrinsics - // don't write to memory, but hasn't been implemented yet. - //} + return !IntrinsicOnlyReadsMemory(II->getIntrinsicID()); + } return true; case Instruction::Load: return cast(this)->isVolatile(); From djg at cray.com Thu Jul 26 11:14:06 2007 From: djg at cray.com (Dan Gohman) Date: Thu, 26 Jul 2007 16:14:06 -0000 Subject: [llvm-commits] [llvm] r40534 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Message-ID: <200707261614.l6QGE6D8023390@zion.cs.uiuc.edu> Author: djg Date: Thu Jul 26 11:14:06 2007 New Revision: 40534 URL: http://llvm.org/viewvc/llvm-project?rev=40534&view=rev Log: Fix the alias analysis query in DAGCombiner to not add in two offsets. The SrcValueOffset values are the real offsets from the SrcValue base pointers. 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=40534&r1=40533&r2=40534&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Jul 26 11:14:06 2007 @@ -4599,8 +4599,8 @@ if (CombinerGlobalAA) { // Use alias analysis information. - int Overlap1 = Size1 + SrcValueOffset1 + Offset1; - int Overlap2 = Size2 + SrcValueOffset2 + Offset2; + int Overlap1 = Size1 + SrcValueOffset1; + int Overlap2 = Size2 + SrcValueOffset2; AliasAnalysis::AliasResult AAResult = AA.alias(SrcValue1, Overlap1, SrcValue2, Overlap2); if (AAResult == AliasAnalysis::NoAlias) From evan.cheng at apple.com Thu Jul 26 12:02:46 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 26 Jul 2007 17:02:46 -0000 Subject: [llvm-commits] [llvm] r40535 - /llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Message-ID: <200707261702.l6QH2kXO027249@zion.cs.uiuc.edu> Author: evancheng Date: Thu Jul 26 12:02:45 2007 New Revision: 40535 URL: http://llvm.org/viewvc/llvm-project?rev=40535&view=rev Log: Minor bug. Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=40535&r1=40534&r2=40535&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Jul 26 12:02:45 2007 @@ -628,19 +628,19 @@ AM.CP = CP->getConstVal(); AM.Align = CP->getAlignment(); AM.Disp += CP->getOffset(); - AM.isRIPRel = !isStatic; + AM.isRIPRel = !isAbs32; return false; } } else if (ExternalSymbolSDNode *S =dyn_cast(N0)) { if (isAbs32 || isRoot) { AM.ES = S->getSymbol(); - AM.isRIPRel = !isStatic; + AM.isRIPRel = !isAbs32; return false; } } else if (JumpTableSDNode *J = dyn_cast(N0)) { if (isAbs32 || isRoot) { AM.JT = J->getIndex(); - AM.isRIPRel = !isStatic; + AM.isRIPRel = !isAbs32; return false; } } From evan.cheng at apple.com Thu Jul 26 12:07:04 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 26 Jul 2007 17:07:04 -0000 Subject: [llvm-commits] [llvm] r40536 - /llvm/trunk/test/CodeGen/X86/test-pic-jtbl.ll Message-ID: <200707261707.l6QH74A4027439@zion.cs.uiuc.edu> Author: evancheng Date: Thu Jul 26 12:07:03 2007 New Revision: 40536 URL: http://llvm.org/viewvc/llvm-project?rev=40536&view=rev Log: Fix test. Modified: llvm/trunk/test/CodeGen/X86/test-pic-jtbl.ll Modified: llvm/trunk/test/CodeGen/X86/test-pic-jtbl.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/test-pic-jtbl.ll?rev=40536&r1=40535&r2=40536&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/test-pic-jtbl.ll (original) +++ llvm/trunk/test/CodeGen/X86/test-pic-jtbl.ll Thu Jul 26 12:07:03 2007 @@ -3,8 +3,8 @@ ; RUN: grep _GLOBAL_OFFSET_TABLE_ %t ; RUN: grep piclabel %t | wc -l | grep 3 ; RUN: grep PLT %t | wc -l | grep 6 -; RUN: grep GOTOFF %t | wc -l | grep 1 -; RUN: grep JTI %t | wc -l | grep 8 +; RUN: grep GOTOFF %t | wc -l | grep 2 +; RUN: grep JTI %t | wc -l | grep 9 define void @bar(i32 %n.u) { entry: From evan.cheng at apple.com Thu Jul 26 12:32:14 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 26 Jul 2007 17:32:14 -0000 Subject: [llvm-commits] [llvm] r40537 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Message-ID: <200707261732.l6QHWE2P029235@zion.cs.uiuc.edu> Author: evancheng Date: Thu Jul 26 12:32:14 2007 New Revision: 40537 URL: http://llvm.org/viewvc/llvm-project?rev=40537&view=rev Log: Don't pollute the meaning of isUnpredicatedTerminator. Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=40537&r1=40536&r2=40537&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Thu Jul 26 12:32:14 2007 @@ -402,11 +402,7 @@ } } -// For purposes of branch analysis do not count FP_REG_KILL as a terminator. bool X86InstrInfo::isUnpredicatedTerminator(const MachineInstr *MI) const { - if (MI->getOpcode() == X86::FP_REG_KILL) - return false; - const TargetInstrDescriptor *TID = MI->getInstrDescriptor(); if (TID->Flags & M_TERMINATOR_FLAG) { // Conditional branch is a special case. @@ -419,20 +415,28 @@ return false; } +// For purposes of branch analysis do not count FP_REG_KILL as a terminator. +static bool isBrAnalysisUnpredicatedTerminator(const MachineInstr *MI, + const X86InstrInfo &TII) { + if (MI->getOpcode() == X86::FP_REG_KILL) + return false; + return TII.isUnpredicatedTerminator(MI); +} + bool X86InstrInfo::AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, std::vector &Cond) const { // If the block has no terminators, it just falls into the block after it. MachineBasicBlock::iterator I = MBB.end(); - if (I == MBB.begin() || !isUnpredicatedTerminator(--I)) + if (I == MBB.begin() || !isBrAnalysisUnpredicatedTerminator(--I, *this)) return false; // Get the last instruction in the block. MachineInstr *LastInst = I; // If there is only one terminator instruction, process it. - if (I == MBB.begin() || !isUnpredicatedTerminator(--I)) { + if (I == MBB.begin() || !isBrAnalysisUnpredicatedTerminator(--I, *this)) { if (!isBranch(LastInst->getOpcode())) return true; @@ -457,7 +461,8 @@ MachineInstr *SecondLastInst = I; // If there are three terminators, we don't know what sort of block this is. - if (SecondLastInst && I != MBB.begin() && isUnpredicatedTerminator(--I)) + if (SecondLastInst && I != MBB.begin() && + isBrAnalysisUnpredicatedTerminator(--I, *this)) return true; // If the block ends with X86::JMP and a conditional branch, handle it. From evan.cheng at apple.com Thu Jul 26 12:45:41 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 26 Jul 2007 17:45:41 -0000 Subject: [llvm-commits] [llvm] r40538 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Message-ID: <200707261745.l6QHjf9X029719@zion.cs.uiuc.edu> Author: evancheng Date: Thu Jul 26 12:45:41 2007 New Revision: 40538 URL: http://llvm.org/viewvc/llvm-project?rev=40538&view=rev Log: Make sure epilogue esp adjustment is placed before any terminator and pop instructions. Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=40538&r1=40537&r2=40538&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original) +++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Thu Jul 26 12:45:41 2007 @@ -1372,8 +1372,9 @@ // Skip the callee-saved pop instructions. while (MBBI != MBB.begin()) { - MachineBasicBlock::iterator PI = prior(MBBI); - if (PI->getOpcode() != X86::POP32r && PI->getOpcode() != X86::POP64r) + MachineBasicBlock::iterator PI = prior(MBBI); + unsigned Opc = PI->getOpcode(); + if (Opc != X86::POP32r && Opc != X86::POP64r && !TII.isTerminatorInstr(Opc)) break; --MBBI; } From evan.cheng at apple.com Thu Jul 26 12:45:58 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 26 Jul 2007 17:45:58 -0000 Subject: [llvm-commits] [llvm] r40539 - /llvm/trunk/test/CodeGen/X86/2007-07-25-EpilogueBug.ll Message-ID: <200707261745.l6QHjwBl029738@zion.cs.uiuc.edu> Author: evancheng Date: Thu Jul 26 12:45:57 2007 New Revision: 40539 URL: http://llvm.org/viewvc/llvm-project?rev=40539&view=rev Log: Test case for PR1573. Added: llvm/trunk/test/CodeGen/X86/2007-07-25-EpilogueBug.ll Added: llvm/trunk/test/CodeGen/X86/2007-07-25-EpilogueBug.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-07-25-EpilogueBug.ll?rev=40539&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/2007-07-25-EpilogueBug.ll (added) +++ llvm/trunk/test/CodeGen/X86/2007-07-25-EpilogueBug.ll Thu Jul 26 12:45:57 2007 @@ -0,0 +1,54 @@ +; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -mcpu=i386 | \ +; RUN: %prcontext ret 1 | grep FP_REG_KILL +; PR1573 + + %struct.c34006f__TsB = type { i8, i32, i32, %struct.c34006f__TsB___b___XVN } + %struct.c34006f__TsB___b___XVN = type { %struct.c34006f__TsB___b___XVN___O } + %struct.c34006f__TsB___b___XVN___O = type { float } + +define fastcc i8 @c34006f__pkg__parentEQ.213(%struct.c34006f__TsB* %x, %struct.c34006f__TsB* %y) zeroext { +entry: + %tmp190 = icmp eq i8 0, 0 ; [#uses=1] + %tmp207 = icmp eq i32 0, 0 ; [#uses=1] + %bothcond = and i1 %tmp190, %tmp207 ; [#uses=1] + %tmp224 = icmp eq i32 0, 0 ; [#uses=1] + %bothcond1 = and i1 %bothcond, %tmp224 ; [#uses=1] + br i1 %bothcond1, label %cond_next229, label %UnifiedReturnBlock + +cond_next229: ; preds = %entry + %tmp234 = icmp eq i8 0, 0 ; [#uses=1] + br i1 %tmp234, label %cond_false391, label %cond_true237 + +cond_true237: ; preds = %cond_next229 + %tmp268 = icmp sgt i32 0, -1 ; [#uses=2] + %max269 = select i1 %tmp268, i32 0, i32 0 ; [#uses=1] + %tmp305.op = add i32 0, -1 ; [#uses=1] + br i1 false, label %bb328, label %cond_next315 + +cond_next315: ; preds = %cond_true237 + ret i8 0 + +bb328: ; preds = %cond_true237 + %tmp337 = select i1 %tmp268, i32 %tmp305.op, i32 -1 ; [#uses=1] + %tmp347 = icmp eq i32 %tmp337, 0 ; [#uses=1] + br i1 %tmp347, label %cond_next351, label %UnifiedReturnBlock + +cond_next351: ; preds = %bb328 + %tmp354 = getelementptr %struct.c34006f__TsB* %y, i32 0, i32 3 ; <%struct.c34006f__TsB___b___XVN*> [#uses=1] + %tmp354355 = bitcast %struct.c34006f__TsB___b___XVN* %tmp354 to i8* ; [#uses=1] + %tmp358 = getelementptr %struct.c34006f__TsB* %x, i32 0, i32 3 ; <%struct.c34006f__TsB___b___XVN*> [#uses=1] + %tmp358359 = bitcast %struct.c34006f__TsB___b___XVN* %tmp358 to i8* ; [#uses=1] + %tmp360 = tail call i32 (i8*, i8*, i32, ...)* @memcmp( i8* %tmp358359, i8* %tmp354355, i32 %max269 ) ; [#uses=0] + ret i8 0 + +cond_false391: ; preds = %cond_next229 + %tmp400 = fcmp une float 0.000000e+00, 0.000000e+00 ; [#uses=1] + %not.tmp400 = xor i1 %tmp400, true ; [#uses=1] + %retval = zext i1 %not.tmp400 to i8 ; [#uses=1] + ret i8 %retval + +UnifiedReturnBlock: ; preds = %bb328, %entry + ret i8 0 +} + +declare i32 @memcmp(i8*, i8*, i32, ...) From resistor at mac.com Thu Jul 26 13:26:51 2007 From: resistor at mac.com (Owen Anderson) Date: Thu, 26 Jul 2007 18:26:51 -0000 Subject: [llvm-commits] [llvm] r40540 - in /llvm/trunk: lib/Analysis/MemoryDependenceAnalysis.cpp lib/Transforms/Scalar/GVN.cpp test/Transforms/GVN/2007-07-26-InterlockingLoops.ll test/Transforms/GVN/2007-07-26-PhiErasure.ll Message-ID: <200707261826.l6QIQpT7030941@zion.cs.uiuc.edu> Author: resistor Date: Thu Jul 26 13:26:51 2007 New Revision: 40540 URL: http://llvm.org/viewvc/llvm-project?rev=40540&view=rev Log: Fix a couple more bugs in the phi construction by pulling in code that does almost the same things from LCSSA. Added: llvm/trunk/test/Transforms/GVN/2007-07-26-InterlockingLoops.ll llvm/trunk/test/Transforms/GVN/2007-07-26-PhiErasure.ll Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp llvm/trunk/lib/Transforms/Scalar/GVN.cpp Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=40540&r1=40539&r2=40540&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Thu Jul 26 13:26:51 2007 @@ -124,9 +124,6 @@ visited.erase(block); - if (!inserted) - resp.insert(std::make_pair(block, None)); - return inserted; } Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=40540&r1=40539&r2=40540&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Thu Jul 26 13:26:51 2007 @@ -13,12 +13,14 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "gvn" -#include "llvm/Value.h" + #include "llvm/Transforms/Scalar.h" #include "llvm/BasicBlock.h" -#include "llvm/Instructions.h" -#include "llvm/Function.h" +#include "llvm/Constants.h" #include "llvm/DerivedTypes.h" +#include "llvm/Function.h" +#include "llvm/Instructions.h" +#include "llvm/Value.h" #include "llvm/Analysis/Dominators.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/DenseMap.h" @@ -650,9 +652,8 @@ DenseMap& lastSeenLoad, SmallVector& toErase); bool processNonLocalLoad(LoadInst* L, SmallVector& toErase); - Value *performPHIConstruction(BasicBlock *BB, LoadInst* orig, - DenseMap &Phis, - SmallPtrSet& visited); + Value *GetValueForBlock(BasicBlock *BB, LoadInst* orig, + DenseMap &Phis); void dump(DenseMap& d); }; @@ -706,59 +707,35 @@ } -Value *GVN::performPHIConstruction(BasicBlock *BB, LoadInst* orig, - DenseMap &Phis, - SmallPtrSet& visited) { - DenseMap::iterator DI = Phis.find(BB); - if (DI != Phis.end()) - return DI->second; - - unsigned numPreds = std::distance(pred_begin(BB), pred_end(BB)); - - if (numPreds == 1) { - DenseMap::iterator DI = Phis.find(BB); - if (DI != Phis.end()) { - Phis.insert(std::make_pair(BB, DI->second)); - return DI->second; - } else { - visited.insert(BB); - Value* domV = performPHIConstruction(*pred_begin(BB), orig, Phis, visited); - visited.erase(BB); - - Phis.insert(std::make_pair(BB, domV)); - return domV; - } - } else { - PHINode *PN = new PHINode(orig->getType(), orig->getName()+".rle", BB->begin()); - PN->reserveOperandSpace(numPreds); - Phis[BB] = PN; - - visited.insert(BB); - // Fill in the incoming values for the block. - for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) - if (!visited.count(*PI)) - PN->addIncoming(performPHIConstruction(*PI, orig, Phis, visited), *PI); - else { - if (Phis[*PI]) - PN->addIncoming(Phis[*PI], *PI); - else - PN->addIncoming(PN, *PI); - } - visited.erase(BB); - - bool all_same = PN->getNumIncomingValues() != 1; - Value* first = PN->getIncomingValue(0); - for (unsigned i = 1; i < PN->getNumIncomingValues(); ++i) - all_same &= (PN->getIncomingValue(i) == first); - - if (all_same) { - PN->eraseFromParent(); - Phis[BB] = first; - return first; - } else { - return PN; - } +/// GetValueForBlock - Get the value to use within the specified basic block. +/// available values are in Phis. +Value *GVN::GetValueForBlock(BasicBlock *BB, LoadInst* orig, + DenseMap &Phis) { + DominatorTree &DT = getAnalysis(); + + // If we have already computed this value, return the previously computed val. + Value *&V = Phis[BB]; + if (V) return V; + + DomTreeNode *IDom = DT.getNode(BB)->getIDom(); + + if (IDom && Phis.count(IDom->getBlock())) { + return V = GetValueForBlock(IDom->getBlock(), orig, Phis); } + + + + // Otherwise, the idom is the loop, so we need to insert a PHI node. Do so + // now, then get values to fill in the incoming values for the PHI. + PHINode *PN = new PHINode(orig->getType(), orig->getName()+".rle", + BB->begin()); + PN->reserveOperandSpace(std::distance(pred_begin(BB), pred_end(BB))); + V = PN; + + // Fill in the incoming values for the block. + for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) + PN->addIncoming(GetValueForBlock(DT.getNode(*PI)->getBlock(), orig, Phis), *PI); + return PN; } bool GVN::processNonLocalLoad(LoadInst* L, SmallVector& toErase) { @@ -789,7 +766,7 @@ } SmallPtrSet visited; - Value* v = performPHIConstruction(L->getParent(), L, repl, visited); + Value* v = GetValueForBlock(L->getParent(), L, repl); MD.removeInstruction(L); L->replaceAllUsesWith(v); Added: llvm/trunk/test/Transforms/GVN/2007-07-26-InterlockingLoops.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/2007-07-26-InterlockingLoops.ll?rev=40540&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GVN/2007-07-26-InterlockingLoops.ll (added) +++ llvm/trunk/test/Transforms/GVN/2007-07-26-InterlockingLoops.ll Thu Jul 26 13:26:51 2007 @@ -0,0 +1,30 @@ +; RUN: llvm-as < %s | opt -gvn | llvm-dis | not grep {tmp17625 =} +; RUN: llvm-as < %s | opt -gvn | llvm-dis | not grep {tmp17631 =} + + at last = external global [65 x i32*] ; <[65 x i32*]*> [#uses=1] + +define i32 @NextRootMove(i32 %wtm) { +cond_next95: ; preds = %cond_true85, %cond_true79, %cond_true73, %bb68 + %tmp17618 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4 ; [#uses=0] + br label %cond_true116 + +cond_true116: ; preds = %cond_true111 + br i1 false, label %cond_true128, label %cond_true145 + +cond_true128: ; preds = %cond_true121 + %tmp17625 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4 ; [#uses=0] + br i1 false, label %bb98.backedge, label %return.loopexit + +bb98.backedge: ; preds = %bb171, %cond_true145, %cond_true128 + br label %cond_true116 + +cond_true145: ; preds = %cond_false + %tmp17631 = load i32** getelementptr ([65 x i32*]* @last, i32 0, i32 1), align 4 ; [#uses=0] + br i1 false, label %bb98.backedge, label %return.loopexit + +return.loopexit: ; preds = %bb171, %cond_true145, %cond_true128 + br label %return + +return: ; preds = %return.loopexit, %cond_next95, %cond_true85 + ret i32 0 +} Added: llvm/trunk/test/Transforms/GVN/2007-07-26-PhiErasure.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/2007-07-26-PhiErasure.ll?rev=40540&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GVN/2007-07-26-PhiErasure.ll (added) +++ llvm/trunk/test/Transforms/GVN/2007-07-26-PhiErasure.ll Thu Jul 26 13:26:51 2007 @@ -0,0 +1,28 @@ +; RUN: llvm-as < %s | opt -gvn | llvm-dis | not grep {tmp298316 =} + + %struct..0anon = type { i32 } + %struct.FILE = type { i8*, i32, i32, i16, i16, %struct.__sbuf, i32, i8*, i32 (i8*)*, i32 (i8*, i8*, i32)*, i64 (i8*, i64, i32)*, i32 (i8*, i8*, i32)*, %struct.__sbuf, %struct.__sFILEX*, i32, [3 x i8], [1 x i8], %struct.__sbuf, i32, i64 } + %struct.__sFILEX = type opaque + %struct.__sbuf = type { i8*, i32 } + %struct.rtx_def = type { i16, i8, i8, [1 x %struct..0anon] } + at n_spills = external global i32 ; [#uses=2] + +define i32 @reload(%struct.rtx_def* %first, i32 %global, %struct.FILE* %dumpfile) { +cond_next2835.1: ; preds = %cond_next2861 + %tmp2922 = load i32* @n_spills, align 4 ; [#uses=0] + br label %bb2928 + +bb2928: ; preds = %cond_next2835.1, %cond_next2943 + br i1 false, label %cond_next2943, label %cond_true2935 + +cond_true2935: ; preds = %bb2928 + br label %cond_next2943 + +cond_next2943: ; preds = %cond_true2935, %bb2928 + br i1 false, label %bb2982.preheader, label %bb2928 + +bb2982.preheader: ; preds = %cond_next2943 + %tmp298316 = load i32* @n_spills, align 4 ; [#uses=0] + ret i32 0 + +} From echeng at apple.com Thu Jul 26 13:52:21 2007 From: echeng at apple.com (echeng at apple.com) Date: Thu, 26 Jul 2007 11:52:21 -0700 (PDT) Subject: [llvm-commits] [129933] Restore llvm version info. Message-ID: <20070726185221.04633111E28F7@src> Revision: 129933 Author: echeng Date: 2007-07-26 11:52:21 -0700 (Thu, 26 Jul 2007) Log Message: ----------- Restore llvm version info. Modified Paths: -------------- apple-local/branches/llvm/gcc/Makefile.in Modified: apple-local/branches/llvm/gcc/Makefile.in =================================================================== --- apple-local/branches/llvm/gcc/Makefile.in 2007-07-26 18:36:42 UTC (rev 129932) +++ apple-local/branches/llvm/gcc/Makefile.in 2007-07-26 18:52:21 UTC (rev 129933) @@ -218,10 +218,6 @@ @checkingenabled_flag@ LLVMOBJDIR = @LLVMBASEPATH@ -ifdef LLVM_VERSION_INFO -CPPFLAGS += -DLLVM_VERSION_INFO='"$(LLVM_VERSION_INFO)"' -endif - # Determine BUILDMODE from configure run (--enable-llvm) BUILDMODE := @LLVMBUILDMODE@ @@ -236,6 +232,10 @@ # srcdir != objdir builds. LLVMSRCDIR := $(shell $(LLVMBINPATH)/llvm-config --src-root) endif + +ifdef LLVM_VERSION_INFO +CPPFLAGS += -DLLVM_VERSION_INFO='"$(LLVM_VERSION_INFO)"' +endif # APPLE LOCAL end LLVM # These exists to be overridden by the x-* and t-* files, respectively. From resistor at mac.com Thu Jul 26 13:57:04 2007 From: resistor at mac.com (Owen Anderson) Date: Thu, 26 Jul 2007 18:57:04 -0000 Subject: [llvm-commits] [llvm] r40542 - in /llvm/trunk: lib/Analysis/MemoryDependenceAnalysis.cpp test/Transforms/GVN/2007-07-25-InfiniteLoop.ll test/Transforms/GVN/2007-07-26-NonRedundant.ll Message-ID: <200707261857.l6QIv4Uv031982@zion.cs.uiuc.edu> Author: resistor Date: Thu Jul 26 13:57:04 2007 New Revision: 40542 URL: http://llvm.org/viewvc/llvm-project?rev=40542&view=rev Log: Fix a bug introduced in my last commit. Added: llvm/trunk/test/Transforms/GVN/2007-07-26-NonRedundant.ll Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp llvm/trunk/test/Transforms/GVN/2007-07-25-InfiniteLoop.ll Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=40542&r1=40541&r2=40542&view=diff ============================================================================== --- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Thu Jul 26 13:57:04 2007 @@ -117,12 +117,18 @@ visited.insert(block); bool inserted = false; + bool predOnStack = false; for (pred_iterator PI = pred_begin(block), PE = pred_end(block); PI != PE; ++PI) if (!visited.count(*PI)) inserted |= nonLocalHelper(query, *PI, resp, visited); - + else + predOnStack = true; + visited.erase(block); + + if (!inserted && !predOnStack) + resp.insert(std::make_pair(block, None)); return inserted; } Modified: llvm/trunk/test/Transforms/GVN/2007-07-25-InfiniteLoop.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/2007-07-25-InfiniteLoop.ll?rev=40542&r1=40541&r2=40542&view=diff ============================================================================== --- llvm/trunk/test/Transforms/GVN/2007-07-25-InfiniteLoop.ll (original) +++ llvm/trunk/test/Transforms/GVN/2007-07-25-InfiniteLoop.ll Thu Jul 26 13:57:04 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -gvn | llvm-dis +; RUN: llvm-as < %s | opt -gvn | llvm-dis | not grep {tmp10 =} %struct.INT2 = type { i32, i32 } @blkshifts = external global %struct.INT2* ; <%struct.INT2**> [#uses=2] Added: llvm/trunk/test/Transforms/GVN/2007-07-26-NonRedundant.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GVN/2007-07-26-NonRedundant.ll?rev=40542&view=auto ============================================================================== --- llvm/trunk/test/Transforms/GVN/2007-07-26-NonRedundant.ll (added) +++ llvm/trunk/test/Transforms/GVN/2007-07-26-NonRedundant.ll Thu Jul 26 13:57:04 2007 @@ -0,0 +1,16 @@ +; RUN: llvm-as < %s | opt -gvn | llvm-dis + + at bsLive = external global i32 ; [#uses=2] + +define i32 @bsR(i32 %n) { +entry: + br i1 false, label %cond_next, label %bb19 + +cond_next: ; preds = %entry + store i32 0, i32* @bsLive, align 4 + br label %bb19 + +bb19: ; preds = %cond_next, %entry + %tmp29 = load i32* @bsLive, align 4 ; [#uses=0] + ret i32 0 +} From evan.cheng at apple.com Thu Jul 26 14:08:44 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 26 Jul 2007 19:08:44 -0000 Subject: [llvm-commits] [llvm-gcc-4.0] r40543 - /llvm-gcc-4.0/trunk/gcc/Makefile.in Message-ID: <200707261908.l6QJ8jrI032322@zion.cs.uiuc.edu> Author: evancheng Date: Thu Jul 26 14:08:44 2007 New Revision: 40543 URL: http://llvm.org/viewvc/llvm-project?rev=40543&view=rev Log: Restore llvm version info. Modified: llvm-gcc-4.0/trunk/gcc/Makefile.in Modified: llvm-gcc-4.0/trunk/gcc/Makefile.in URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/Makefile.in?rev=40543&r1=40542&r2=40543&view=diff ============================================================================== --- llvm-gcc-4.0/trunk/gcc/Makefile.in (original) +++ llvm-gcc-4.0/trunk/gcc/Makefile.in Thu Jul 26 14:08:44 2007 @@ -218,10 +218,6 @@ @checkingenabled_flag@ LLVMOBJDIR = @LLVMBASEPATH@ -ifdef LLVM_VERSION_INFO -CPPFLAGS += -DLLVM_VERSION_INFO='"$(LLVM_VERSION_INFO)"' -endif - # Determine BUILDMODE from configure run (--enable-llvm) BUILDMODE := @LLVMBUILDMODE@ @@ -236,6 +232,10 @@ # srcdir != objdir builds. LLVMSRCDIR := $(shell $(LLVMBINPATH)/llvm-config --src-root) endif + +ifdef LLVM_VERSION_INFO +CPPFLAGS += -DLLVM_VERSION_INFO='"$(LLVM_VERSION_INFO)"' +endif # APPLE LOCAL end LLVM # These exists to be overridden by the x-* and t-* files, respectively. From echeng at apple.com Thu Jul 26 14:08:12 2007 From: echeng at apple.com (echeng at apple.com) Date: Thu, 26 Jul 2007 12:08:12 -0700 (PDT) Subject: [llvm-commits] [129934] Revert. Message-ID: <20070726190812.30FA8111F7D85@src> Revision: 129934 Author: echeng Date: 2007-07-26 12:08:11 -0700 (Thu, 26 Jul 2007) Log Message: ----------- Revert. Wrong repository. Modified Paths: -------------- apple-local/branches/llvm/gcc/Makefile.in Modified: apple-local/branches/llvm/gcc/Makefile.in =================================================================== --- apple-local/branches/llvm/gcc/Makefile.in 2007-07-26 18:52:21 UTC (rev 129933) +++ apple-local/branches/llvm/gcc/Makefile.in 2007-07-26 19:08:11 UTC (rev 129934) @@ -218,6 +218,10 @@ @checkingenabled_flag@ LLVMOBJDIR = @LLVMBASEPATH@ +ifdef LLVM_VERSION_INFO +CPPFLAGS += -DLLVM_VERSION_INFO='"$(LLVM_VERSION_INFO)"' +endif + # Determine BUILDMODE from configure run (--enable-llvm) BUILDMODE := @LLVMBUILDMODE@ @@ -232,10 +236,6 @@ # srcdir != objdir builds. LLVMSRCDIR := $(shell $(LLVMBINPATH)/llvm-config --src-root) endif - -ifdef LLVM_VERSION_INFO -CPPFLAGS += -DLLVM_VERSION_INFO='"$(LLVM_VERSION_INFO)"' -endif # APPLE LOCAL end LLVM # These exists to be overridden by the x-* and t-* files, respectively. From baldrick at free.fr Thu Jul 26 14:15:08 2007 From: baldrick at free.fr (Duncan Sands) Date: Thu, 26 Jul 2007 21:15:08 +0200 Subject: [llvm-commits] Trampoline support (pointers nested funtions) In-Reply-To: <200707261656.20050.baldrick@free.fr> References: <200707261656.20050.baldrick@free.fr> Message-ID: <200707262115.09391.baldrick@free.fr> There was a small mistake in the X86 error checking: i64 inreg arguments should count as consuming two registers. Fix: - InRegCount++; + InRegCount += (getTargetData()->getTypeSizeInBits(*I) + 31) / 32; From evan.cheng at apple.com Thu Jul 26 14:49:30 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 26 Jul 2007 19:49:30 -0000 Subject: [llvm-commits] [llvm-gcc-4.0] r40544 - /llvm-gcc-4.0/trunk/gcc/llvm-linker-hack.cpp Message-ID: <200707261949.l6QJnU29001148@zion.cs.uiuc.edu> Author: evancheng Date: Thu Jul 26 14:49:30 2007 New Revision: 40544 URL: http://llvm.org/viewvc/llvm-project?rev=40544&view=rev Log: Unbreak Apple style build: createDeadStoreEliminationPass must be linked in until it's completely removed. Modified: llvm-gcc-4.0/trunk/gcc/llvm-linker-hack.cpp Modified: llvm-gcc-4.0/trunk/gcc/llvm-linker-hack.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-linker-hack.cpp?rev=40544&r1=40543&r2=40544&view=diff ============================================================================== --- llvm-gcc-4.0/trunk/gcc/llvm-linker-hack.cpp (original) +++ llvm-gcc-4.0/trunk/gcc/llvm-linker-hack.cpp Thu Jul 26 14:49:30 2007 @@ -77,6 +77,7 @@ llvm::createDeadArgEliminationPass(); llvm::createLoadValueNumberingPass(); llvm::createTailCallEliminationPass(); + llvm::createDeadStoreEliminationPass(); llvm::createFastDeadStoreEliminationPass(); llvm::createIPConstantPropagationPass(); llvm::createStripDeadPrototypesPass(); From alenhar2 at cs.uiuc.edu Thu Jul 26 15:07:56 2007 From: alenhar2 at cs.uiuc.edu (Andrew Lenharth) Date: Thu, 26 Jul 2007 20:07:56 -0000 Subject: [llvm-commits] [poolalloc] r40545 - /poolalloc/branches/SVA/lib/DSA/Devirt.cpp Message-ID: <200707262007.l6QK7u1u001872@zion.cs.uiuc.edu> Author: alenhar2 Date: Thu Jul 26 15:07:56 2007 New Revision: 40545 URL: http://llvm.org/viewvc/llvm-project?rev=40545&view=rev Log: minor improvements Modified: poolalloc/branches/SVA/lib/DSA/Devirt.cpp Modified: poolalloc/branches/SVA/lib/DSA/Devirt.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/branches/SVA/lib/DSA/Devirt.cpp?rev=40545&r1=40544&r2=40545&view=diff ============================================================================== --- poolalloc/branches/SVA/lib/DSA/Devirt.cpp (original) +++ poolalloc/branches/SVA/lib/DSA/Devirt.cpp Thu Jul 26 15:07:56 2007 @@ -95,11 +95,11 @@ public: virtual bool runOnModule(Module &M) { CallTargetFinder* CTF = &getAnalysis(); - bool changed = false; Function* ams = M.getNamedFunction("llva_assert_match_sig"); std::set safecalls; + std::vector toDelete; for (Value::use_iterator ii = ams->use_begin(), ee = ams->use_end(); ii != ee; ++ii) { @@ -107,8 +107,9 @@ std::cerr << "Found safe call site in " << CI->getParent()->getParent()->getName() << "\n"; Value* V = CI->getOperand(1); - CI->eraseFromParent(); + toDelete.push_back(CI); do { + //V->dump(); safecalls.insert(V); if (CastInst* CV = dyn_cast(V)) V = CV->getOperand(0); @@ -117,13 +118,11 @@ } } - std::vector toDelete; - for(std::set::iterator i = safecalls.begin(), e = safecalls.end(); i != e; ++i) { - for (Value::use_iterator ii = (*i)->use_begin(), ie = (*i)->use_end(); - ii != ie; ++ii) { - CallSite cs = CallSite::get(*ii); + for (Value::use_iterator uii = (*i)->use_begin(), uie = (*i)->use_end(); + uii != uie; ++uii) { + CallSite cs = CallSite::get(*uii); bool isSafeCall = cs.getInstruction() && safecalls.find(cs.getCalledValue()) != safecalls.end(); if (cs.getInstruction() && !cs.getCalledFunction() && @@ -135,9 +134,8 @@ Targets.push_back(*ii); if (Targets.size() > 0) { - std::cerr << "Target count: " << Targets.size() << "\n"; + std::cerr << "Target count: " << Targets.size() << " in " << cs.getInstruction()->getParent()->getParent()->getName() << "\n"; Function* NF = buildBounce(cs, Targets, M); - changed = true; if (CallInst* ci = dyn_cast(cs.getInstruction())) { ++CSConvert; std::vector Par(ci->op_begin(), ci->op_end()); @@ -155,13 +153,18 @@ ci->replaceAllUsesWith(cn); toDelete.push_back(ci); } - } + } else //Target size == 0 + std::cerr << "Call site found, but no Targets\n"; } } } + + bool changed = false; for (std::vector::iterator ii = toDelete.begin(), ee = toDelete.end(); - ii != ee; ++ii) + ii != ee; ++ii) { + changed = true; (*ii)->eraseFromParent(); + } return changed; } From dpatel at apple.com Thu Jul 26 15:21:42 2007 From: dpatel at apple.com (Devang Patel) Date: Thu, 26 Jul 2007 20:21:42 -0000 Subject: [llvm-commits] [llvm] r40546 - /llvm/trunk/lib/Transforms/Scalar/CondPropagate.cpp Message-ID: <200707262021.l6QKLgbW002451@zion.cs.uiuc.edu> Author: dpatel Date: Thu Jul 26 15:21:42 2007 New Revision: 40546 URL: http://llvm.org/viewvc/llvm-project?rev=40546&view=rev Log: Fix thinko. Update return status appropriately. Modified: llvm/trunk/lib/Transforms/Scalar/CondPropagate.cpp Modified: llvm/trunk/lib/Transforms/Scalar/CondPropagate.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CondPropagate.cpp?rev=40546&r1=40545&r2=40546&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/CondPropagate.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/CondPropagate.cpp Thu Jul 26 15:21:42 2007 @@ -65,7 +65,7 @@ MadeChange = false; for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) SimplifyBlock(BB); - EverMadeChange = MadeChange; + EverMadeChange = EverMadeChange || MadeChange; } while (MadeChange); return EverMadeChange; } From evan.cheng at apple.com Thu Jul 26 19:05:52 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 26 Jul 2007 17:05:52 -0700 Subject: [llvm-commits] [llvm] r40504 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/vec_shuffle.ll In-Reply-To: <200707260031.l6Q0V9i9014112@zion.cs.uiuc.edu> References: <200707260031.l6Q0V9i9014112@zion.cs.uiuc.edu> Message-ID: Hi Dan, This is breaking oggenc (at least on Mac OS X / x86). Can you look into it? Thanks, Evan On Jul 25, 2007, at 5:31 PM, Dan Gohman wrote: > Author: djg > Date: Wed Jul 25 19:31:09 2007 > New Revision: 40504 > > URL: http://llvm.org/viewvc/llvm-project?rev=40504&view=rev > Log: > Remove X86ISD::LOAD_PACK and X86ISD::LOAD_UA and associated code > from the > x86 target, replacing them with the new alignment attributes on memory > references. > > Modified: > llvm/trunk/lib/Target/X86/X86ISelLowering.cpp > llvm/trunk/lib/Target/X86/X86ISelLowering.h > llvm/trunk/lib/Target/X86/X86InstrSSE.td > llvm/trunk/test/CodeGen/X86/vec_shuffle.ll > > Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/ > X86ISelLowering.cpp?rev=40504&r1=40503&r2=40504&view=diff > > ====================================================================== > ======== > --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) > +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jul 25 > 19:31:09 2007 > @@ -3367,14 +3367,10 @@ > CV.push_back(C); > CV.push_back(C); > } > - Constant *CS = ConstantStruct::get(CV); > - SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); > - SDVTList Tys = DAG.getVTList(VT, MVT::Other); > - SmallVector Ops; > - Ops.push_back(DAG.getEntryNode()); > - Ops.push_back(CPIdx); > - Ops.push_back(DAG.getSrcValue(NULL)); > - SDOperand Mask = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], > Ops.size()); > + Constant *C = ConstantVector::get(CV); > + SDOperand CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); > + SDOperand Mask = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, > NULL, 0, > + false, 16); > return DAG.getNode(X86ISD::FAND, VT, Op.getOperand(0), Mask); > } > > @@ -3399,21 +3395,16 @@ > CV.push_back(C); > CV.push_back(C); > } > - Constant *CS = ConstantStruct::get(CV); > - SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); > + Constant *C = ConstantVector::get(CV); > + SDOperand CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); > + SDOperand Mask = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, > NULL, 0, > + false, 16); > if (MVT::isVector(VT)) { > - SDOperand Mask = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, > NULL, 0); > return DAG.getNode(ISD::BIT_CONVERT, VT, > DAG.getNode(ISD::XOR, MVT::v2i64, > DAG.getNode(ISD::BIT_CONVERT, MVT::v2i64, > Op.getOperand(0)), > DAG.getNode(ISD::BIT_CONVERT, MVT::v2i64, > Mask))); > } else { > - SDVTList Tys = DAG.getVTList(VT, MVT::Other); > - SmallVector Ops; > - Ops.push_back(DAG.getEntryNode()); > - Ops.push_back(CPIdx); > - Ops.push_back(DAG.getSrcValue(NULL)); > - SDOperand Mask = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], > Ops.size()); > return DAG.getNode(X86ISD::FXOR, VT, Op.getOperand(0), Mask); > } > } > @@ -3442,14 +3433,10 @@ > CV.push_back(ConstantFP::get(SrcTy, 0.0)); > CV.push_back(ConstantFP::get(SrcTy, 0.0)); > } > - Constant *CS = ConstantStruct::get(CV); > - SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); > - SDVTList Tys = DAG.getVTList(SrcVT, MVT::Other); > - SmallVector Ops; > - Ops.push_back(DAG.getEntryNode()); > - Ops.push_back(CPIdx); > - Ops.push_back(DAG.getSrcValue(NULL)); > - SDOperand Mask1 = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], > Ops.size()); > + Constant *C = ConstantVector::get(CV); > + SDOperand CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); > + SDOperand Mask1 = DAG.getLoad(SrcVT, DAG.getEntryNode(), CPIdx, > NULL, 0, > + false, 16); > SDOperand SignBit = DAG.getNode(X86ISD::FAND, SrcVT, Op1, Mask1); > > // Shift sign bit right or left if the two operands have > different types. > @@ -3474,14 +3461,10 @@ > CV.push_back(ConstantFP::get(SrcTy, 0.0)); > CV.push_back(ConstantFP::get(SrcTy, 0.0)); > } > - CS = ConstantStruct::get(CV); > - CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); > - Tys = DAG.getVTList(VT, MVT::Other); > - Ops.clear(); > - Ops.push_back(DAG.getEntryNode()); > - Ops.push_back(CPIdx); > - Ops.push_back(DAG.getSrcValue(NULL)); > - SDOperand Mask2 = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], > Ops.size()); > + C = ConstantVector::get(CV); > + CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); > + SDOperand Mask2 = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, > NULL, 0, > + false, 16); > SDOperand Val = DAG.getNode(X86ISD::FAND, VT, Op0, Mask2); > > // Or the value with the sign bit. > @@ -4357,8 +4340,6 @@ > case X86ISD::RET_FLAG: return "X86ISD::RET_FLAG"; > case X86ISD::REP_STOS: return "X86ISD::REP_STOS"; > case X86ISD::REP_MOVS: return "X86ISD::REP_MOVS"; > - case X86ISD::LOAD_PACK: return "X86ISD::LOAD_PACK"; > - case X86ISD::LOAD_UA: return "X86ISD::LOAD_UA"; > case X86ISD::GlobalBaseReg: return "X86ISD::GlobalBaseReg"; > case X86ISD::Wrapper: return "X86ISD::Wrapper"; > case X86ISD::S2VEC: return "X86ISD::S2VEC"; > @@ -4756,19 +4737,14 @@ > } > > bool isAlign16 = isBaseAlignment16(Base->getOperand(1).Val, MFI, > Subtarget); > + LoadSDNode *LD = cast(Base); > if (isAlign16) { > - LoadSDNode *LD = cast(Base); > return DAG.getLoad(VT, LD->getChain(), LD->getBasePtr(), LD- > >getSrcValue(), > - LD->getSrcValueOffset()); > + LD->getSrcValueOffset(), LD->isVolatile()); > } else { > - // Just use movups, it's shorter. > - SDVTList Tys = DAG.getVTList(MVT::v4f32, MVT::Other); > - SmallVector Ops; > - Ops.push_back(Base->getOperand(0)); > - Ops.push_back(Base->getOperand(1)); > - Ops.push_back(Base->getOperand(2)); > - return DAG.getNode(ISD::BIT_CONVERT, VT, > - DAG.getNode(X86ISD::LOAD_UA, Tys, &Ops[0], > Ops.size())); > + return DAG.getLoad(VT, LD->getChain(), LD->getBasePtr(), LD- > >getSrcValue(), > + LD->getSrcValueOffset(), LD->isVolatile(), > + LD->getAlignment()); > } > } > > > Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/ > X86ISelLowering.h?rev=40504&r1=40503&r2=40504&view=diff > > ====================================================================== > ======== > --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) > +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Wed Jul 25 19:31:09 > 2007 > @@ -143,14 +143,6 @@ > /// REP_MOVS - Repeat move, corresponds to X86::REP_MOVSx. > REP_MOVS, > > - /// LOAD_PACK Load a 128-bit packed float / double value. It > has the same > - /// operands as a normal load. > - LOAD_PACK, > - > - /// LOAD_UA Load an unaligned 128-bit value. It has the same > operands as > - /// a normal load. > - LOAD_UA, > - > /// GlobalBaseReg - On Darwin, this node represents the > result of the popl > /// at function entry, used for PIC code. > GlobalBaseReg, > > Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/ > X86InstrSSE.td?rev=40504&r1=40503&r2=40504&view=diff > > ====================================================================== > ======== > --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) > +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Wed Jul 25 19:31:09 2007 > @@ -21,8 +21,6 @@ > def SDTX86FPShiftOp : SDTypeProfile<1, 2, [ SDTCisSameAs<0, 1>, > SDTCisFP<0>, > SDTCisInt<2> ]>; > > -def X86loadp : SDNode<"X86ISD::LOAD_PACK", SDTLoad, > [SDNPHasChain]>; > -def X86loadu : SDNode<"X86ISD::LOAD_UA", SDTLoad, > [SDNPHasChain]>; > def X86fmin : SDNode<"X86ISD::FMIN", SDTFPBinOp>; > def X86fmax : SDNode<"X86ISD::FMAX", SDTFPBinOp>; > def X86fand : SDNode<"X86ISD::FAND", SDTFPBinOp, > @@ -82,9 +80,6 @@ > // SSE pattern fragments > // > ===------------------------------------------------------------------- > ---===// > > -def X86loadpf32 : PatFrag<(ops node:$ptr), (f32 (X86loadp node: > $ptr))>; > -def X86loadpf64 : PatFrag<(ops node:$ptr), (f64 (X86loadp node: > $ptr))>; > - > def loadv4f32 : PatFrag<(ops node:$ptr), (v4f32 (load node: > $ptr))>; > def loadv2f64 : PatFrag<(ops node:$ptr), (v2f64 (load node: > $ptr))>; > def loadv4i32 : PatFrag<(ops node:$ptr), (v4i32 (load node: > $ptr))>; > @@ -109,6 +104,8 @@ > return false; > }]>; > > +def alignedloadf32 : PatFrag<(ops node:$ptr), (f32 > (alignedload node:$ptr))>; > +def alignedloadf64 : PatFrag<(ops node:$ptr), (f64 > (alignedload node:$ptr))>; > def alignedloadv4f32 : PatFrag<(ops node:$ptr), (v4f32 > (alignedload node:$ptr))>; > def alignedloadv2f64 : PatFrag<(ops node:$ptr), (v2f64 > (alignedload node:$ptr))>; > def alignedloadv4i32 : PatFrag<(ops node:$ptr), (v4i32 > (alignedload node:$ptr))>; > @@ -411,7 +408,7 @@ > // disregarded. > def FsMOVAPSrm : PSI<0x28, MRMSrcMem, (outs FR32:$dst), (ins > f128mem:$src), > "movaps {$src, $dst|$dst, $src}", > - [(set FR32:$dst, (X86loadpf32 addr:$src))]>; > + [(set FR32:$dst, (alignedloadf32 addr:$src))]>; > > // Alias bitwise logical operations using SSE logical ops on > packed FP values. > let isTwoAddress = 1 in { > @@ -430,15 +427,15 @@ > def FsANDPSrm : PSI<0x54, MRMSrcMem, (outs FR32:$dst), (ins FR32: > $src1, f128mem:$src2), > "andps {$src2, $dst|$dst, $src2}", > [(set FR32:$dst, (X86fand FR32:$src1, > - (X86loadpf32 addr:$src2)))]>; > + (alignedloadf32 addr: > $src2)))]>; > def FsORPSrm : PSI<0x56, MRMSrcMem, (outs FR32:$dst), (ins FR32: > $src1, f128mem:$src2), > "orps {$src2, $dst|$dst, $src2}", > [(set FR32:$dst, (X86for FR32:$src1, > - (X86loadpf32 addr:$src2)))]>; > + (alignedloadf32 addr: > $src2)))]>; > def FsXORPSrm : PSI<0x57, MRMSrcMem, (outs FR32:$dst), (ins FR32: > $src1, f128mem:$src2), > "xorps {$src2, $dst|$dst, $src2}", > [(set FR32:$dst, (X86fxor FR32:$src1, > - (X86loadpf32 addr:$src2)))]>; > + (alignedloadf32 addr: > $src2)))]>; > > def FsANDNPSrr : PSI<0x55, MRMSrcReg, > (outs FR32:$dst), (ins FR32:$src1, FR32:$src2), > @@ -1084,7 +1081,7 @@ > // disregarded. > def FsMOVAPDrm : PDI<0x28, MRMSrcMem, (outs FR64:$dst), (ins > f128mem:$src), > "movapd {$src, $dst|$dst, $src}", > - [(set FR64:$dst, (X86loadpf64 addr:$src))]>; > + [(set FR64:$dst, (alignedloadf64 addr:$src))]>; > > // Alias bitwise logical operations using SSE logical ops on > packed FP values. > let isTwoAddress = 1 in { > @@ -1103,15 +1100,15 @@ > def FsANDPDrm : PDI<0x54, MRMSrcMem, (outs FR64:$dst), (ins FR64: > $src1, f128mem:$src2), > "andpd {$src2, $dst|$dst, $src2}", > [(set FR64:$dst, (X86fand FR64:$src1, > - (X86loadpf64 addr:$src2)))]>; > + (alignedloadf64 addr: > $src2)))]>; > def FsORPDrm : PDI<0x56, MRMSrcMem, (outs FR64:$dst), (ins FR64: > $src1, f128mem:$src2), > "orpd {$src2, $dst|$dst, $src2}", > [(set FR64:$dst, (X86for FR64:$src1, > - (X86loadpf64 addr:$src2)))]>; > + (alignedloadf64 addr: > $src2)))]>; > def FsXORPDrm : PDI<0x57, MRMSrcMem, (outs FR64:$dst), (ins FR64: > $src1, f128mem:$src2), > "xorpd {$src2, $dst|$dst, $src2}", > [(set FR64:$dst, (X86fxor FR64:$src1, > - (X86loadpf64 addr:$src2)))]>; > + (alignedloadf64 addr: > $src2)))]>; > > def FsANDNPDrr : PDI<0x55, MRMSrcReg, > (outs FR64:$dst), (ins FR64:$src1, FR64:$src2), > @@ -2631,11 +2628,11 @@ > (load addr:$src2))), > (PANDNrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; > > -// Unaligned load > -def : Pat<(v4f32 (X86loadu addr:$src)), (MOVUPSrm addr:$src)>, > - Requires<[HasSSE1]>; > - > // Use movaps / movups for SSE integer load / store (one byte > shorter). > +def : Pat<(alignedloadv4i32 addr:$src), > + (MOVAPSrm addr:$src)>, Requires<[HasSSE1]>; > +def : Pat<(loadv4i32 addr:$src), > + (MOVUPSrm addr:$src)>, Requires<[HasSSE1]>; > def : Pat<(alignedloadv2i64 addr:$src), > (MOVAPSrm addr:$src)>, Requires<[HasSSE2]>; > def : Pat<(loadv2i64 addr:$src), > > Modified: llvm/trunk/test/CodeGen/X86/vec_shuffle.ll > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ > X86/vec_shuffle.ll?rev=40504&r1=40503&r2=40504&view=diff > > ====================================================================== > ======== > --- llvm/trunk/test/CodeGen/X86/vec_shuffle.ll (original) > +++ llvm/trunk/test/CodeGen/X86/vec_shuffle.ll Wed Jul 25 19:31:09 > 2007 > @@ -1,6 +1,6 @@ > ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 - > o %t -f > ; RUN: grep shufp %t | wc -l | grep 1 > -; RUN: grep movups %t | wc -l | grep 1 > +; RUN: grep movupd %t | wc -l | grep 1 > ; RUN: grep pshufhw %t | wc -l | grep 1 > > void %test_v4sf(<4 x float>* %P, float %X, float %Y) { > > > _______________________________________________ > 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 Thu Jul 26 20:07:02 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 26 Jul 2007 18:07:02 -0700 Subject: [llvm-commits] Trampoline support (pointers nested funtions) In-Reply-To: <200707261656.20050.baldrick@free.fr> References: <200707261656.20050.baldrick@free.fr> Message-ID: <9F8C3A52-1E0F-439E-B1F0-46A6E4191833@apple.com> Hi Duncan, Some nit picks. 1. Please don't use "Chain" for stand for function static chain. It confuses backend guys like me. :-) "Chain" stands for control flow dependency in the backend. 2. Purely a stylistic thing: +SDOperand X86TargetLowering::LowerTRAMPOLINE(SDOperand Op, + SelectionDAG &DAG) { + SDOperand Root = Op.getOperand(0); + SDOperand Trmp = Op.getOperand(1); // trampoline + SDOperand FPtr = Op.getOperand(2); // nested function + SDOperand SChn = Op.getOperand(3); // static chain + + SrcValueSDNode *TrmpSV = cast(Op.getOperand(4)); + + if (Subtarget->is64Bit()) { + return SDOperand(); // not yet supported + } else { If you move the check is64Bit() to the beginning of function, there is no need to nest the part that actually do the work in the "else" clause. 3. In X86TargetLowering::LowerTRAMPOLINE(): + case CallingConv::X86_StdCall: { + Move = 0xb9; // Pass chain in ECX I assume this is the ModR/M byte? Can you refactor ModRMByte() from X86CodeEmitter.cpp (probably also getX86RegNum) and use that to calculate this instead? Also, isn't the static chain register described in X86CallingConv.td? Magic number is confusing. :-) Looks great otherwise. Thanks! Evan On Jul 26, 2007, at 7:56 AM, Duncan Sands wrote: > These patches add support for taking pointers to nested > functions (a gcc extension). This is done by building > and executing a small code stub on the stack, known as > a trampoline. The LLVM part adds two new intrinsics, > llvm.init.trampoline and llvm.adjust.trampoline. The > adjust intrinsic is implemented for all architectures > that are supported in gcc, while the init intrinsic is > only implemented for X86. Furthermore, trampolines can > interact badly with stack protection mechanisms which > don't much like execution of code on the stack. GCC > does various tricks to tell the OS that the trampoline > is kosher. I didn't implement any of those tricks yet, > because it works without them on my machine :) > > Enjoy! > > Duncan. > > > _______________________________________________ > 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 Thu Jul 26 20:27:54 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 26 Jul 2007 18:27:54 -0700 Subject: [llvm-commits] [llvm] r40520 - in /llvm/trunk: include/llvm/CodeGen/ScheduleDAG.h lib/CodeGen/SelectionDAG/ScheduleDAG.cpp In-Reply-To: <200707260812.l6Q8CAYc032614@zion.cs.uiuc.edu> References: <200707260812.l6Q8CAYc032614@zion.cs.uiuc.edu> Message-ID: <38B3CE02-FD6A-4D84-A79B-4B7BE62D8370@apple.com> On Jul 26, 2007, at 1:12 AM, Christopher Lamb wrote: > /// EmitNode - Generate machine code for an node and needed > dependencies. > /// > void ScheduleDAG::EmitNode(SDNode *Node, > @@ -436,6 +578,14 @@ > // If machine instruction > if (Node->isTargetOpcode()) { > unsigned Opc = Node->getTargetOpcode(); > + > + // Handle subreg insert/extract specially > + if (Opc == TargetInstrInfo::EXTRACT_SUBREG || > + Opc == TargetInstrInfo::INSERT_SUBREG) { > + EmitSubregNode(Node, VRBaseMap); > + return; > + } > + Hi Chris, Is this right? EXTRACT_SUBREG and INSERT_SUBREG are not target opcodes. Evan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070726/7c1ab44f/attachment.html From evan.cheng at apple.com Thu Jul 26 20:30:22 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 26 Jul 2007 18:30:22 -0700 Subject: [llvm-commits] [llvm] r40521 - in /llvm/trunk: include/llvm/CodeGen/Passes.h lib/CodeGen/LLVMTargetMachine.cpp lib/CodeGen/LowerSubregs.cpp In-Reply-To: <200707260818.l6Q8IXsf000338@zion.cs.uiuc.edu> References: <200707260818.l6Q8IXsf000338@zion.cs.uiuc.edu> Message-ID: Should this be right after register allocation? Any reason to keep the pseudo instructions around after allocation? Evan On Jul 26, 2007, at 1:18 AM, Christopher Lamb wrote: > if (addPreEmitPass(PM, Fast) && PrintMachineCode) > PM.add(createMachineFunctionPrinterPass(cerr)); > + > + PM.add(createLowerSubregsPass()); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070726/3649f030/attachment.html From evan.cheng at apple.com Thu Jul 26 20:37:48 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 27 Jul 2007 01:37:48 -0000 Subject: [llvm-commits] [llvm] r40547 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/vec_shuffle.ll Message-ID: <200707270137.l6R1bmLd012403@zion.cs.uiuc.edu> Author: evancheng Date: Thu Jul 26 20:37:47 2007 New Revision: 40547 URL: http://llvm.org/viewvc/llvm-project?rev=40547&view=rev Log: Reverting 40504 for now. It's breaking oggenc. Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.h llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/CodeGen/X86/vec_shuffle.ll Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=40547&r1=40546&r2=40547&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Thu Jul 26 20:37:47 2007 @@ -3367,10 +3367,14 @@ CV.push_back(C); CV.push_back(C); } - Constant *C = ConstantVector::get(CV); - SDOperand CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); - SDOperand Mask = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, NULL, 0, - false, 16); + Constant *CS = ConstantStruct::get(CV); + SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); + SDVTList Tys = DAG.getVTList(VT, MVT::Other); + SmallVector Ops; + Ops.push_back(DAG.getEntryNode()); + Ops.push_back(CPIdx); + Ops.push_back(DAG.getSrcValue(NULL)); + SDOperand Mask = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], Ops.size()); return DAG.getNode(X86ISD::FAND, VT, Op.getOperand(0), Mask); } @@ -3395,16 +3399,21 @@ CV.push_back(C); CV.push_back(C); } - Constant *C = ConstantVector::get(CV); - SDOperand CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); - SDOperand Mask = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, NULL, 0, - false, 16); + Constant *CS = ConstantStruct::get(CV); + SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); if (MVT::isVector(VT)) { + SDOperand Mask = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, NULL, 0); return DAG.getNode(ISD::BIT_CONVERT, VT, DAG.getNode(ISD::XOR, MVT::v2i64, DAG.getNode(ISD::BIT_CONVERT, MVT::v2i64, Op.getOperand(0)), DAG.getNode(ISD::BIT_CONVERT, MVT::v2i64, Mask))); } else { + SDVTList Tys = DAG.getVTList(VT, MVT::Other); + SmallVector Ops; + Ops.push_back(DAG.getEntryNode()); + Ops.push_back(CPIdx); + Ops.push_back(DAG.getSrcValue(NULL)); + SDOperand Mask = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], Ops.size()); return DAG.getNode(X86ISD::FXOR, VT, Op.getOperand(0), Mask); } } @@ -3433,10 +3442,14 @@ CV.push_back(ConstantFP::get(SrcTy, 0.0)); CV.push_back(ConstantFP::get(SrcTy, 0.0)); } - Constant *C = ConstantVector::get(CV); - SDOperand CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); - SDOperand Mask1 = DAG.getLoad(SrcVT, DAG.getEntryNode(), CPIdx, NULL, 0, - false, 16); + Constant *CS = ConstantStruct::get(CV); + SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); + SDVTList Tys = DAG.getVTList(SrcVT, MVT::Other); + SmallVector Ops; + Ops.push_back(DAG.getEntryNode()); + Ops.push_back(CPIdx); + Ops.push_back(DAG.getSrcValue(NULL)); + SDOperand Mask1 = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], Ops.size()); SDOperand SignBit = DAG.getNode(X86ISD::FAND, SrcVT, Op1, Mask1); // Shift sign bit right or left if the two operands have different types. @@ -3461,10 +3474,14 @@ CV.push_back(ConstantFP::get(SrcTy, 0.0)); CV.push_back(ConstantFP::get(SrcTy, 0.0)); } - C = ConstantVector::get(CV); - CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); - SDOperand Mask2 = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, NULL, 0, - false, 16); + CS = ConstantStruct::get(CV); + CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); + Tys = DAG.getVTList(VT, MVT::Other); + Ops.clear(); + Ops.push_back(DAG.getEntryNode()); + Ops.push_back(CPIdx); + Ops.push_back(DAG.getSrcValue(NULL)); + SDOperand Mask2 = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], Ops.size()); SDOperand Val = DAG.getNode(X86ISD::FAND, VT, Op0, Mask2); // Or the value with the sign bit. @@ -4340,6 +4357,8 @@ case X86ISD::RET_FLAG: return "X86ISD::RET_FLAG"; case X86ISD::REP_STOS: return "X86ISD::REP_STOS"; case X86ISD::REP_MOVS: return "X86ISD::REP_MOVS"; + case X86ISD::LOAD_PACK: return "X86ISD::LOAD_PACK"; + case X86ISD::LOAD_UA: return "X86ISD::LOAD_UA"; case X86ISD::GlobalBaseReg: return "X86ISD::GlobalBaseReg"; case X86ISD::Wrapper: return "X86ISD::Wrapper"; case X86ISD::S2VEC: return "X86ISD::S2VEC"; @@ -4737,14 +4756,19 @@ } bool isAlign16 = isBaseAlignment16(Base->getOperand(1).Val, MFI, Subtarget); - LoadSDNode *LD = cast(Base); if (isAlign16) { + LoadSDNode *LD = cast(Base); return DAG.getLoad(VT, LD->getChain(), LD->getBasePtr(), LD->getSrcValue(), - LD->getSrcValueOffset(), LD->isVolatile()); + LD->getSrcValueOffset()); } else { - return DAG.getLoad(VT, LD->getChain(), LD->getBasePtr(), LD->getSrcValue(), - LD->getSrcValueOffset(), LD->isVolatile(), - LD->getAlignment()); + // Just use movups, it's shorter. + SDVTList Tys = DAG.getVTList(MVT::v4f32, MVT::Other); + SmallVector Ops; + Ops.push_back(Base->getOperand(0)); + Ops.push_back(Base->getOperand(1)); + Ops.push_back(Base->getOperand(2)); + return DAG.getNode(ISD::BIT_CONVERT, VT, + DAG.getNode(X86ISD::LOAD_UA, Tys, &Ops[0], Ops.size())); } } Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=40547&r1=40546&r2=40547&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Thu Jul 26 20:37:47 2007 @@ -143,6 +143,14 @@ /// REP_MOVS - Repeat move, corresponds to X86::REP_MOVSx. REP_MOVS, + /// LOAD_PACK Load a 128-bit packed float / double value. It has the same + /// operands as a normal load. + LOAD_PACK, + + /// LOAD_UA Load an unaligned 128-bit value. It has the same operands as + /// a normal load. + LOAD_UA, + /// GlobalBaseReg - On Darwin, this node represents the result of the popl /// at function entry, used for PIC code. GlobalBaseReg, Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=40547&r1=40546&r2=40547&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Thu Jul 26 20:37:47 2007 @@ -21,6 +21,8 @@ def SDTX86FPShiftOp : SDTypeProfile<1, 2, [ SDTCisSameAs<0, 1>, SDTCisFP<0>, SDTCisInt<2> ]>; +def X86loadp : SDNode<"X86ISD::LOAD_PACK", SDTLoad, [SDNPHasChain]>; +def X86loadu : SDNode<"X86ISD::LOAD_UA", SDTLoad, [SDNPHasChain]>; def X86fmin : SDNode<"X86ISD::FMIN", SDTFPBinOp>; def X86fmax : SDNode<"X86ISD::FMAX", SDTFPBinOp>; def X86fand : SDNode<"X86ISD::FAND", SDTFPBinOp, @@ -80,6 +82,9 @@ // SSE pattern fragments //===----------------------------------------------------------------------===// +def X86loadpf32 : PatFrag<(ops node:$ptr), (f32 (X86loadp node:$ptr))>; +def X86loadpf64 : PatFrag<(ops node:$ptr), (f64 (X86loadp node:$ptr))>; + def loadv4f32 : PatFrag<(ops node:$ptr), (v4f32 (load node:$ptr))>; def loadv2f64 : PatFrag<(ops node:$ptr), (v2f64 (load node:$ptr))>; def loadv4i32 : PatFrag<(ops node:$ptr), (v4i32 (load node:$ptr))>; @@ -104,8 +109,6 @@ return false; }]>; -def alignedloadf32 : PatFrag<(ops node:$ptr), (f32 (alignedload node:$ptr))>; -def alignedloadf64 : PatFrag<(ops node:$ptr), (f64 (alignedload node:$ptr))>; def alignedloadv4f32 : PatFrag<(ops node:$ptr), (v4f32 (alignedload node:$ptr))>; def alignedloadv2f64 : PatFrag<(ops node:$ptr), (v2f64 (alignedload node:$ptr))>; def alignedloadv4i32 : PatFrag<(ops node:$ptr), (v4i32 (alignedload node:$ptr))>; @@ -407,7 +410,7 @@ // disregarded. def FsMOVAPSrm : PSI<0x28, MRMSrcMem, (outs FR32:$dst), (ins f128mem:$src), "movaps {$src, $dst|$dst, $src}", - [(set FR32:$dst, (alignedloadf32 addr:$src))]>; + [(set FR32:$dst, (X86loadpf32 addr:$src))]>; // Alias bitwise logical operations using SSE logical ops on packed FP values. let isTwoAddress = 1 in { @@ -426,15 +429,15 @@ def FsANDPSrm : PSI<0x54, MRMSrcMem, (outs FR32:$dst), (ins FR32:$src1, f128mem:$src2), "andps {$src2, $dst|$dst, $src2}", [(set FR32:$dst, (X86fand FR32:$src1, - (alignedloadf32 addr:$src2)))]>; + (X86loadpf32 addr:$src2)))]>; def FsORPSrm : PSI<0x56, MRMSrcMem, (outs FR32:$dst), (ins FR32:$src1, f128mem:$src2), "orps {$src2, $dst|$dst, $src2}", [(set FR32:$dst, (X86for FR32:$src1, - (alignedloadf32 addr:$src2)))]>; + (X86loadpf32 addr:$src2)))]>; def FsXORPSrm : PSI<0x57, MRMSrcMem, (outs FR32:$dst), (ins FR32:$src1, f128mem:$src2), "xorps {$src2, $dst|$dst, $src2}", [(set FR32:$dst, (X86fxor FR32:$src1, - (alignedloadf32 addr:$src2)))]>; + (X86loadpf32 addr:$src2)))]>; def FsANDNPSrr : PSI<0x55, MRMSrcReg, (outs FR32:$dst), (ins FR32:$src1, FR32:$src2), @@ -1080,7 +1083,7 @@ // disregarded. def FsMOVAPDrm : PDI<0x28, MRMSrcMem, (outs FR64:$dst), (ins f128mem:$src), "movapd {$src, $dst|$dst, $src}", - [(set FR64:$dst, (alignedloadf64 addr:$src))]>; + [(set FR64:$dst, (X86loadpf64 addr:$src))]>; // Alias bitwise logical operations using SSE logical ops on packed FP values. let isTwoAddress = 1 in { @@ -1099,15 +1102,15 @@ def FsANDPDrm : PDI<0x54, MRMSrcMem, (outs FR64:$dst), (ins FR64:$src1, f128mem:$src2), "andpd {$src2, $dst|$dst, $src2}", [(set FR64:$dst, (X86fand FR64:$src1, - (alignedloadf64 addr:$src2)))]>; + (X86loadpf64 addr:$src2)))]>; def FsORPDrm : PDI<0x56, MRMSrcMem, (outs FR64:$dst), (ins FR64:$src1, f128mem:$src2), "orpd {$src2, $dst|$dst, $src2}", [(set FR64:$dst, (X86for FR64:$src1, - (alignedloadf64 addr:$src2)))]>; + (X86loadpf64 addr:$src2)))]>; def FsXORPDrm : PDI<0x57, MRMSrcMem, (outs FR64:$dst), (ins FR64:$src1, f128mem:$src2), "xorpd {$src2, $dst|$dst, $src2}", [(set FR64:$dst, (X86fxor FR64:$src1, - (alignedloadf64 addr:$src2)))]>; + (X86loadpf64 addr:$src2)))]>; def FsANDNPDrr : PDI<0x55, MRMSrcReg, (outs FR64:$dst), (ins FR64:$src1, FR64:$src2), @@ -2627,11 +2630,11 @@ (load addr:$src2))), (PANDNrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; +// Unaligned load +def : Pat<(v4f32 (X86loadu addr:$src)), (MOVUPSrm addr:$src)>, + Requires<[HasSSE1]>; + // Use movaps / movups for SSE integer load / store (one byte shorter). -def : Pat<(alignedloadv4i32 addr:$src), - (MOVAPSrm addr:$src)>, Requires<[HasSSE1]>; -def : Pat<(loadv4i32 addr:$src), - (MOVUPSrm addr:$src)>, Requires<[HasSSE1]>; def : Pat<(alignedloadv2i64 addr:$src), (MOVAPSrm addr:$src)>, Requires<[HasSSE2]>; def : Pat<(loadv2i64 addr:$src), Modified: llvm/trunk/test/CodeGen/X86/vec_shuffle.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_shuffle.ll?rev=40547&r1=40546&r2=40547&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/vec_shuffle.ll (original) +++ llvm/trunk/test/CodeGen/X86/vec_shuffle.ll Thu Jul 26 20:37:47 2007 @@ -1,6 +1,6 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f ; RUN: grep shufp %t | wc -l | grep 1 -; RUN: grep movupd %t | wc -l | grep 1 +; RUN: grep movups %t | wc -l | grep 1 ; RUN: grep pshufhw %t | wc -l | grep 1 void %test_v4sf(<4 x float>* %P, float %X, float %Y) { From evan.cheng at apple.com Thu Jul 26 20:38:06 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 26 Jul 2007 18:38:06 -0700 Subject: [llvm-commits] [llvm] r40504 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/vec_shuffle.ll In-Reply-To: References: <200707260031.l6Q0V9i9014112@zion.cs.uiuc.edu> Message-ID: <5829AC90-843E-4D3E-9C7E-941CB0EDFB14@apple.com> Hi Dan, I am going to revert the patch for now. Please re-commit once you fixed it. Thanks, Evan On Jul 26, 2007, at 5:05 PM, Evan Cheng wrote: > Hi Dan, > > This is breaking oggenc (at least on Mac OS X / x86). Can you look > into it? > > Thanks, > > Evan > > On Jul 25, 2007, at 5:31 PM, Dan Gohman wrote: > >> Author: djg >> Date: Wed Jul 25 19:31:09 2007 >> New Revision: 40504 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=40504&view=rev >> Log: >> Remove X86ISD::LOAD_PACK and X86ISD::LOAD_UA and associated code >> from the >> x86 target, replacing them with the new alignment attributes on >> memory >> references. >> >> Modified: >> llvm/trunk/lib/Target/X86/X86ISelLowering.cpp >> llvm/trunk/lib/Target/X86/X86ISelLowering.h >> llvm/trunk/lib/Target/X86/X86InstrSSE.td >> llvm/trunk/test/CodeGen/X86/vec_shuffle.ll >> >> Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/ >> X86ISelLowering.cpp?rev=40504&r1=40503&r2=40504&view=diff >> >> ===================================================================== >> = >> ======== >> --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) >> +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jul 25 >> 19:31:09 2007 >> @@ -3367,14 +3367,10 @@ >> CV.push_back(C); >> CV.push_back(C); >> } >> - Constant *CS = ConstantStruct::get(CV); >> - SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); >> - SDVTList Tys = DAG.getVTList(VT, MVT::Other); >> - SmallVector Ops; >> - Ops.push_back(DAG.getEntryNode()); >> - Ops.push_back(CPIdx); >> - Ops.push_back(DAG.getSrcValue(NULL)); >> - SDOperand Mask = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], >> Ops.size()); >> + Constant *C = ConstantVector::get(CV); >> + SDOperand CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); >> + SDOperand Mask = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, >> NULL, 0, >> + false, 16); >> return DAG.getNode(X86ISD::FAND, VT, Op.getOperand(0), Mask); >> } >> >> @@ -3399,21 +3395,16 @@ >> CV.push_back(C); >> CV.push_back(C); >> } >> - Constant *CS = ConstantStruct::get(CV); >> - SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); >> + Constant *C = ConstantVector::get(CV); >> + SDOperand CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); >> + SDOperand Mask = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, >> NULL, 0, >> + false, 16); >> if (MVT::isVector(VT)) { >> - SDOperand Mask = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, >> NULL, 0); >> return DAG.getNode(ISD::BIT_CONVERT, VT, >> DAG.getNode(ISD::XOR, MVT::v2i64, >> DAG.getNode(ISD::BIT_CONVERT, MVT::v2i64, >> Op.getOperand(0)), >> DAG.getNode(ISD::BIT_CONVERT, MVT::v2i64, >> Mask))); >> } else { >> - SDVTList Tys = DAG.getVTList(VT, MVT::Other); >> - SmallVector Ops; >> - Ops.push_back(DAG.getEntryNode()); >> - Ops.push_back(CPIdx); >> - Ops.push_back(DAG.getSrcValue(NULL)); >> - SDOperand Mask = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], >> Ops.size()); >> return DAG.getNode(X86ISD::FXOR, VT, Op.getOperand(0), Mask); >> } >> } >> @@ -3442,14 +3433,10 @@ >> CV.push_back(ConstantFP::get(SrcTy, 0.0)); >> CV.push_back(ConstantFP::get(SrcTy, 0.0)); >> } >> - Constant *CS = ConstantStruct::get(CV); >> - SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); >> - SDVTList Tys = DAG.getVTList(SrcVT, MVT::Other); >> - SmallVector Ops; >> - Ops.push_back(DAG.getEntryNode()); >> - Ops.push_back(CPIdx); >> - Ops.push_back(DAG.getSrcValue(NULL)); >> - SDOperand Mask1 = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], >> Ops.size()); >> + Constant *C = ConstantVector::get(CV); >> + SDOperand CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); >> + SDOperand Mask1 = DAG.getLoad(SrcVT, DAG.getEntryNode(), CPIdx, >> NULL, 0, >> + false, 16); >> SDOperand SignBit = DAG.getNode(X86ISD::FAND, SrcVT, Op1, Mask1); >> >> // Shift sign bit right or left if the two operands have >> different types. >> @@ -3474,14 +3461,10 @@ >> CV.push_back(ConstantFP::get(SrcTy, 0.0)); >> CV.push_back(ConstantFP::get(SrcTy, 0.0)); >> } >> - CS = ConstantStruct::get(CV); >> - CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); >> - Tys = DAG.getVTList(VT, MVT::Other); >> - Ops.clear(); >> - Ops.push_back(DAG.getEntryNode()); >> - Ops.push_back(CPIdx); >> - Ops.push_back(DAG.getSrcValue(NULL)); >> - SDOperand Mask2 = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], >> Ops.size()); >> + C = ConstantVector::get(CV); >> + CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); >> + SDOperand Mask2 = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, >> NULL, 0, >> + false, 16); >> SDOperand Val = DAG.getNode(X86ISD::FAND, VT, Op0, Mask2); >> >> // Or the value with the sign bit. >> @@ -4357,8 +4340,6 @@ >> case X86ISD::RET_FLAG: return "X86ISD::RET_FLAG"; >> case X86ISD::REP_STOS: return "X86ISD::REP_STOS"; >> case X86ISD::REP_MOVS: return "X86ISD::REP_MOVS"; >> - case X86ISD::LOAD_PACK: return "X86ISD::LOAD_PACK"; >> - case X86ISD::LOAD_UA: return "X86ISD::LOAD_UA"; >> case X86ISD::GlobalBaseReg: return "X86ISD::GlobalBaseReg"; >> case X86ISD::Wrapper: return "X86ISD::Wrapper"; >> case X86ISD::S2VEC: return "X86ISD::S2VEC"; >> @@ -4756,19 +4737,14 @@ >> } >> >> bool isAlign16 = isBaseAlignment16(Base->getOperand(1).Val, MFI, >> Subtarget); >> + LoadSDNode *LD = cast(Base); >> if (isAlign16) { >> - LoadSDNode *LD = cast(Base); >> return DAG.getLoad(VT, LD->getChain(), LD->getBasePtr(), LD- >>> getSrcValue(), >> - LD->getSrcValueOffset()); >> + LD->getSrcValueOffset(), LD->isVolatile()); >> } else { >> - // Just use movups, it's shorter. >> - SDVTList Tys = DAG.getVTList(MVT::v4f32, MVT::Other); >> - SmallVector Ops; >> - Ops.push_back(Base->getOperand(0)); >> - Ops.push_back(Base->getOperand(1)); >> - Ops.push_back(Base->getOperand(2)); >> - return DAG.getNode(ISD::BIT_CONVERT, VT, >> - DAG.getNode(X86ISD::LOAD_UA, Tys, &Ops[0], >> Ops.size())); >> + return DAG.getLoad(VT, LD->getChain(), LD->getBasePtr(), LD- >>> getSrcValue(), >> + LD->getSrcValueOffset(), LD->isVolatile(), >> + LD->getAlignment()); >> } >> } >> >> >> Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/ >> X86ISelLowering.h?rev=40504&r1=40503&r2=40504&view=diff >> >> ===================================================================== >> = >> ======== >> --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) >> +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Wed Jul 25 19:31:09 >> 2007 >> @@ -143,14 +143,6 @@ >> /// REP_MOVS - Repeat move, corresponds to X86::REP_MOVSx. >> REP_MOVS, >> >> - /// LOAD_PACK Load a 128-bit packed float / double value. It >> has the same >> - /// operands as a normal load. >> - LOAD_PACK, >> - >> - /// LOAD_UA Load an unaligned 128-bit value. It has the same >> operands as >> - /// a normal load. >> - LOAD_UA, >> - >> /// GlobalBaseReg - On Darwin, this node represents the >> result of the popl >> /// at function entry, used for PIC code. >> GlobalBaseReg, >> >> Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/ >> X86InstrSSE.td?rev=40504&r1=40503&r2=40504&view=diff >> >> ===================================================================== >> = >> ======== >> --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) >> +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Wed Jul 25 19:31:09 2007 >> @@ -21,8 +21,6 @@ >> def SDTX86FPShiftOp : SDTypeProfile<1, 2, [ SDTCisSameAs<0, 1>, >> SDTCisFP<0>, >> SDTCisInt<2> ]>; >> >> -def X86loadp : SDNode<"X86ISD::LOAD_PACK", SDTLoad, >> [SDNPHasChain]>; >> -def X86loadu : SDNode<"X86ISD::LOAD_UA", SDTLoad, >> [SDNPHasChain]>; >> def X86fmin : SDNode<"X86ISD::FMIN", SDTFPBinOp>; >> def X86fmax : SDNode<"X86ISD::FMAX", SDTFPBinOp>; >> def X86fand : SDNode<"X86ISD::FAND", SDTFPBinOp, >> @@ -82,9 +80,6 @@ >> // SSE pattern fragments >> // >> ===------------------------------------------------------------------ >> - >> ---===// >> >> -def X86loadpf32 : PatFrag<(ops node:$ptr), (f32 (X86loadp node: >> $ptr))>; >> -def X86loadpf64 : PatFrag<(ops node:$ptr), (f64 (X86loadp node: >> $ptr))>; >> - >> def loadv4f32 : PatFrag<(ops node:$ptr), (v4f32 (load node: >> $ptr))>; >> def loadv2f64 : PatFrag<(ops node:$ptr), (v2f64 (load node: >> $ptr))>; >> def loadv4i32 : PatFrag<(ops node:$ptr), (v4i32 (load node: >> $ptr))>; >> @@ -109,6 +104,8 @@ >> return false; >> }]>; >> >> +def alignedloadf32 : PatFrag<(ops node:$ptr), (f32 >> (alignedload node:$ptr))>; >> +def alignedloadf64 : PatFrag<(ops node:$ptr), (f64 >> (alignedload node:$ptr))>; >> def alignedloadv4f32 : PatFrag<(ops node:$ptr), (v4f32 >> (alignedload node:$ptr))>; >> def alignedloadv2f64 : PatFrag<(ops node:$ptr), (v2f64 >> (alignedload node:$ptr))>; >> def alignedloadv4i32 : PatFrag<(ops node:$ptr), (v4i32 >> (alignedload node:$ptr))>; >> @@ -411,7 +408,7 @@ >> // disregarded. >> def FsMOVAPSrm : PSI<0x28, MRMSrcMem, (outs FR32:$dst), (ins >> f128mem:$src), >> "movaps {$src, $dst|$dst, $src}", >> - [(set FR32:$dst, (X86loadpf32 addr:$src))]>; >> + [(set FR32:$dst, (alignedloadf32 addr:$src))]>; >> >> // Alias bitwise logical operations using SSE logical ops on >> packed FP values. >> let isTwoAddress = 1 in { >> @@ -430,15 +427,15 @@ >> def FsANDPSrm : PSI<0x54, MRMSrcMem, (outs FR32:$dst), (ins FR32: >> $src1, f128mem:$src2), >> "andps {$src2, $dst|$dst, $src2}", >> [(set FR32:$dst, (X86fand FR32:$src1, >> - (X86loadpf32 addr:$src2)))]>; >> + (alignedloadf32 addr: >> $src2)))]>; >> def FsORPSrm : PSI<0x56, MRMSrcMem, (outs FR32:$dst), (ins FR32: >> $src1, f128mem:$src2), >> "orps {$src2, $dst|$dst, $src2}", >> [(set FR32:$dst, (X86for FR32:$src1, >> - (X86loadpf32 addr:$src2)))]>; >> + (alignedloadf32 addr: >> $src2)))]>; >> def FsXORPSrm : PSI<0x57, MRMSrcMem, (outs FR32:$dst), (ins FR32: >> $src1, f128mem:$src2), >> "xorps {$src2, $dst|$dst, $src2}", >> [(set FR32:$dst, (X86fxor FR32:$src1, >> - (X86loadpf32 addr:$src2)))]>; >> + (alignedloadf32 addr: >> $src2)))]>; >> >> def FsANDNPSrr : PSI<0x55, MRMSrcReg, >> (outs FR32:$dst), (ins FR32:$src1, FR32:$src2), >> @@ -1084,7 +1081,7 @@ >> // disregarded. >> def FsMOVAPDrm : PDI<0x28, MRMSrcMem, (outs FR64:$dst), (ins >> f128mem:$src), >> "movapd {$src, $dst|$dst, $src}", >> - [(set FR64:$dst, (X86loadpf64 addr:$src))]>; >> + [(set FR64:$dst, (alignedloadf64 addr:$src))]>; >> >> // Alias bitwise logical operations using SSE logical ops on >> packed FP values. >> let isTwoAddress = 1 in { >> @@ -1103,15 +1100,15 @@ >> def FsANDPDrm : PDI<0x54, MRMSrcMem, (outs FR64:$dst), (ins FR64: >> $src1, f128mem:$src2), >> "andpd {$src2, $dst|$dst, $src2}", >> [(set FR64:$dst, (X86fand FR64:$src1, >> - (X86loadpf64 addr:$src2)))]>; >> + (alignedloadf64 addr: >> $src2)))]>; >> def FsORPDrm : PDI<0x56, MRMSrcMem, (outs FR64:$dst), (ins FR64: >> $src1, f128mem:$src2), >> "orpd {$src2, $dst|$dst, $src2}", >> [(set FR64:$dst, (X86for FR64:$src1, >> - (X86loadpf64 addr:$src2)))]>; >> + (alignedloadf64 addr: >> $src2)))]>; >> def FsXORPDrm : PDI<0x57, MRMSrcMem, (outs FR64:$dst), (ins FR64: >> $src1, f128mem:$src2), >> "xorpd {$src2, $dst|$dst, $src2}", >> [(set FR64:$dst, (X86fxor FR64:$src1, >> - (X86loadpf64 addr:$src2)))]>; >> + (alignedloadf64 addr: >> $src2)))]>; >> >> def FsANDNPDrr : PDI<0x55, MRMSrcReg, >> (outs FR64:$dst), (ins FR64:$src1, FR64:$src2), >> @@ -2631,11 +2628,11 @@ >> (load addr:$src2))), >> (PANDNrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; >> >> -// Unaligned load >> -def : Pat<(v4f32 (X86loadu addr:$src)), (MOVUPSrm addr:$src)>, >> - Requires<[HasSSE1]>; >> - >> // Use movaps / movups for SSE integer load / store (one byte >> shorter). >> +def : Pat<(alignedloadv4i32 addr:$src), >> + (MOVAPSrm addr:$src)>, Requires<[HasSSE1]>; >> +def : Pat<(loadv4i32 addr:$src), >> + (MOVUPSrm addr:$src)>, Requires<[HasSSE1]>; >> def : Pat<(alignedloadv2i64 addr:$src), >> (MOVAPSrm addr:$src)>, Requires<[HasSSE2]>; >> def : Pat<(loadv2i64 addr:$src), >> >> Modified: llvm/trunk/test/CodeGen/X86/vec_shuffle.ll >> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ >> X86/vec_shuffle.ll?rev=40504&r1=40503&r2=40504&view=diff >> >> ===================================================================== >> = >> ======== >> --- llvm/trunk/test/CodeGen/X86/vec_shuffle.ll (original) >> +++ llvm/trunk/test/CodeGen/X86/vec_shuffle.ll Wed Jul 25 19:31:09 >> 2007 >> @@ -1,6 +1,6 @@ >> ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 - >> o %t -f >> ; RUN: grep shufp %t | wc -l | grep 1 >> -; RUN: grep movups %t | wc -l | grep 1 >> +; RUN: grep movupd %t | wc -l | grep 1 >> ; RUN: grep pshufhw %t | wc -l | grep 1 >> >> void %test_v4sf(<4 x float>* %P, float %X, float %Y) { >> >> >> _______________________________________________ >> 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 christopher.lamb at gmail.com Thu Jul 26 22:36:55 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Thu, 26 Jul 2007 20:36:55 -0700 Subject: [llvm-commits] [llvm] r40520 - in /llvm/trunk: include/llvm/CodeGen/ScheduleDAG.h lib/CodeGen/SelectionDAG/ScheduleDAG.cpp In-Reply-To: <38B3CE02-FD6A-4D84-A79B-4B7BE62D8370@apple.com> References: <200707260812.l6Q8CAYc032614@zion.cs.uiuc.edu> <38B3CE02-FD6A-4D84-A79B-4B7BE62D8370@apple.com> Message-ID: <160D8D68-6305-4E82-8D7F-85555872AE57@gmail.com> On Jul 26, 2007, at 6:27 PM, Evan Cheng wrote: > > On Jul 26, 2007, at 1:12 AM, Christopher Lamb wrote: > >> /// EmitNode - Generate machine code for an node and needed >> dependencies. >> /// >> void ScheduleDAG::EmitNode(SDNode *Node, >> @@ -436,6 +578,14 @@ >> // If machine instruction >> if (Node->isTargetOpcode()) { >> unsigned Opc = Node->getTargetOpcode(); >> + >> + // Handle subreg insert/extract specially >> + if (Opc == TargetInstrInfo::EXTRACT_SUBREG || >> + Opc == TargetInstrInfo::INSERT_SUBREG) { >> + EmitSubregNode(Node, VRBaseMap); >> + return; >> + } >> + > > Hi Chris, > > Is this right? EXTRACT_SUBREG and INSERT_SUBREG are not target > opcodes. Actually, they are both DAG nodes and target opcodes. ISel lowers the DAG nodes to target opcodes before schedule DAG sees them. -- Christopher Lamb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070726/cc522026/attachment.html From christopher.lamb at gmail.com Thu Jul 26 22:41:36 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Thu, 26 Jul 2007 20:41:36 -0700 Subject: [llvm-commits] [llvm] r40521 - in /llvm/trunk: include/llvm/CodeGen/Passes.h lib/CodeGen/LLVMTargetMachine.cpp lib/CodeGen/LowerSubregs.cpp In-Reply-To: References: <200707260818.l6Q8IXsf000338@zion.cs.uiuc.edu> Message-ID: <214FE300-704B-40B3-BDC6-7DA1B3A05B1D@gmail.com> On Jul 26, 2007, at 6:30 PM, Evan Cheng wrote: > Should this be right after register allocation? Any reason to keep > the pseudo instructions around after allocation? It should probably be after prolog/epilog insertion. As for the post RA scheduler and branch folding, I'd think it'd be OK to put it before them. Thoughts? > Evan > > On Jul 26, 2007, at 1:18 AM, Christopher Lamb wrote: > >> if (addPreEmitPass(PM, Fast) && PrintMachineCode) >> PM.add(createMachineFunctionPrinterPass(cerr)); >> + >> + PM.add(createLowerSubregsPass()); > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -- Christopher Lamb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070726/2b4a0cf2/attachment.html From evan.cheng at apple.com Fri Jul 27 00:28:18 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 26 Jul 2007 22:28:18 -0700 Subject: [llvm-commits] [llvm] r40520 - in /llvm/trunk: include/llvm/CodeGen/ScheduleDAG.h lib/CodeGen/SelectionDAG/ScheduleDAG.cpp In-Reply-To: <160D8D68-6305-4E82-8D7F-85555872AE57@gmail.com> References: <200707260812.l6Q8CAYc032614@zion.cs.uiuc.edu> <38B3CE02-FD6A-4D84-A79B-4B7BE62D8370@apple.com> <160D8D68-6305-4E82-8D7F-85555872AE57@gmail.com> Message-ID: I don't think they are target opcodes. These are similar to phi, copyfromreg, etc. Target opcodes are those that are target specific, I.e. not shared between targets. Evan Sent from my iPhone On Jul 26, 2007, at 8:36 PM, Christopher Lamb wrote: > > On Jul 26, 2007, at 6:27 PM, Evan Cheng wrote: > >> >> On Jul 26, 2007, at 1:12 AM, Christopher Lamb wrote: >> >>> /// EmitNode - Generate machine code for an node and needed >>> dependencies. >>> /// >>> void ScheduleDAG::EmitNode(SDNode *Node, >>> @@ -436,6 +578,14 @@ >>> // If machine instruction >>> if (Node->isTargetOpcode()) { >>> unsigned Opc = Node->getTargetOpcode(); >>> + >>> + // Handle subreg insert/extract specially >>> + if (Opc == TargetInstrInfo::EXTRACT_SUBREG || >>> + Opc == TargetInstrInfo::INSERT_SUBREG) { >>> + EmitSubregNode(Node, VRBaseMap); >>> + return; >>> + } >>> + >> >> Hi Chris, >> >> Is this right? EXTRACT_SUBREG and INSERT_SUBREG are not target >> opcodes. > > Actually, they are both DAG nodes and target opcodes. ISel lowers > the DAG nodes to target opcodes before schedule DAG sees them. > -- > Christopher Lamb > > > > _______________________________________________ > 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/20070726/41ddf0df/attachment.html From evan.cheng at apple.com Fri Jul 27 00:47:07 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Thu, 26 Jul 2007 22:47:07 -0700 Subject: [llvm-commits] [llvm] r40521 - in /llvm/trunk: include/llvm/CodeGen/Passes.h lib/CodeGen/LLVMTargetMachine.cpp lib/CodeGen/LowerSubregs.cpp In-Reply-To: <214FE300-704B-40B3-BDC6-7DA1B3A05B1D@gmail.com> References: <200707260818.l6Q8IXsf000338@zion.cs.uiuc.edu> <214FE300-704B-40B3-BDC6-7DA1B3A05B1D@gmail.com> Message-ID: <986BC2AC-BDDD-423F-89DA-2E249F0DC701@apple.com> Sent from my iPhone On Jul 26, 2007, at 8:41 PM, Christopher Lamb wrote: > > On Jul 26, 2007, at 6:30 PM, Evan Cheng wrote: > >> Should this be right after register allocation? Any reason to keep >> the pseudo instructions around after allocation? > > It should probably be after prolog/epilog insertion. As for the post > RA scheduler and branch folding, I'd think it'd be OK to put it > before them. Thoughts? Not sure. Why do you think it's necessary for it to be after PEI? It should definitely be run before post-ra scheduler,IMHO. Evan > >> Evan >> >> On Jul 26, 2007, at 1:18 AM, Christopher Lamb wrote: >> >>> if (addPreEmitPass(PM, Fast) && PrintMachineCode) >>> PM.add(createMachineFunctionPrinterPass(cerr)); >>> + >>> + PM.add(createLowerSubregsPass()); >> >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits at cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > -- > Christopher Lamb > > > > _______________________________________________ > 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/20070726/bcfa983b/attachment.html From christopher.lamb at gmail.com Fri Jul 27 01:52:17 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Thu, 26 Jul 2007 23:52:17 -0700 Subject: [llvm-commits] [llvm] r40520 - in /llvm/trunk: include/llvm/CodeGen/ScheduleDAG.h lib/CodeGen/SelectionDAG/ScheduleDAG.cpp In-Reply-To: References: <200707260812.l6Q8CAYc032614@zion.cs.uiuc.edu> <38B3CE02-FD6A-4D84-A79B-4B7BE62D8370@apple.com> <160D8D68-6305-4E82-8D7F-85555872AE57@gmail.com> Message-ID: On Jul 26, 2007, at 10:28 PM, Evan Cheng wrote: > I don't think they are target opcodes. Is that a suggestion? In the implementation they are: --- llvm/trunk/include/llvm/Target/TargetInstrInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetInstrInfo.h Thu Jul 26 02:48:21 2007 @@ -177,7 +177,9 @@ enum { PHI = 0, INLINEASM = 1, - LABEL = 2 + LABEL = 2, + EXTRACT_SUBREG = 3, + INSERT_SUBREG = 4 }; > These are similar to phi, copyfromreg, etc. Not quite. The copyfrom/to reg and inlineasm nodes are ISD DAG nodes and are actually ISel'd in ScheduleDAG to the TargetInstrInfo types. > Target opcodes are those that are target specific, I.e. not shared > between targets. They're part of the low instruction numbers for all targets. -- Chris > On Jul 26, 2007, at 8:36 PM, Christopher Lamb > wrote: > >> >> On Jul 26, 2007, at 6:27 PM, Evan Cheng wrote: >> >>> >>> On Jul 26, 2007, at 1:12 AM, Christopher Lamb wrote: >>> >>>> /// EmitNode - Generate machine code for an node and needed >>>> dependencies. >>>> /// >>>> void ScheduleDAG::EmitNode(SDNode *Node, >>>> @@ -436,6 +578,14 @@ >>>> // If machine instruction >>>> if (Node->isTargetOpcode()) { >>>> unsigned Opc = Node->getTargetOpcode(); >>>> + >>>> + // Handle subreg insert/extract specially >>>> + if (Opc == TargetInstrInfo::EXTRACT_SUBREG || >>>> + Opc == TargetInstrInfo::INSERT_SUBREG) { >>>> + EmitSubregNode(Node, VRBaseMap); >>>> + return; >>>> + } >>>> + >>> >>> Hi Chris, >>> >>> Is this right? EXTRACT_SUBREG and INSERT_SUBREG are not target >>> opcodes. >> >> Actually, they are both DAG nodes and target opcodes. ISel lowers >> the DAG nodes to target opcodes before schedule DAG sees them. >> -- >> Christopher Lamb >> >> >> >> _______________________________________________ >> 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 -- Christopher Lamb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070726/64130e48/attachment.html From christopher.lamb at gmail.com Fri Jul 27 01:55:52 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Thu, 26 Jul 2007 23:55:52 -0700 Subject: [llvm-commits] [llvm] r40521 - in /llvm/trunk: include/llvm/CodeGen/Passes.h lib/CodeGen/LLVMTargetMachine.cpp lib/CodeGen/LowerSubregs.cpp In-Reply-To: <986BC2AC-BDDD-423F-89DA-2E249F0DC701@apple.com> References: <200707260818.l6Q8IXsf000338@zion.cs.uiuc.edu> <214FE300-704B-40B3-BDC6-7DA1B3A05B1D@gmail.com> <986BC2AC-BDDD-423F-89DA-2E249F0DC701@apple.com> Message-ID: <4157F3A1-712C-450F-879D-52F17D519CBA@gmail.com> On Jul 26, 2007, at 10:47 PM, Evan Cheng wrote: > > > Sent from my iPhone > > On Jul 26, 2007, at 8:41 PM, Christopher Lamb > wrote: > >> >> On Jul 26, 2007, at 6:30 PM, Evan Cheng wrote: >> >>> Should this be right after register allocation? Any reason to >>> keep the pseudo instructions around after allocation? >> >> It should probably be after prolog/epilog insertion. As for the >> post RA scheduler and branch folding, I'd think it'd be OK to put >> it before them. Thoughts? > > Not sure. Why do you think it's necessary for it to be after PEI? Now that I think on it, I don't think moving it before PEI would preclude any future operations. > It should definitely be run before post-ra scheduler,IMHO. Sure. Easy change. -- Chris > > Evan > >> >>> Evan >>> >>> On Jul 26, 2007, at 1:18 AM, Christopher Lamb wrote: >>> >>>> if (addPreEmitPass(PM, Fast) && PrintMachineCode) >>>> PM.add(createMachineFunctionPrinterPass(cerr)); >>>> + >>>> + PM.add(createLowerSubregsPass()); >>> >>> _______________________________________________ >>> llvm-commits mailing list >>> llvm-commits at cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits >> >> -- >> Christopher Lamb >> >> >> >> _______________________________________________ >> 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 -- Christopher Lamb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070726/0dc59bbb/attachment.html From christopher.lamb at gmail.com Fri Jul 27 02:36:15 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Fri, 27 Jul 2007 07:36:15 -0000 Subject: [llvm-commits] [llvm] r40548 - /llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Message-ID: <200707270736.l6R7aGBA022200@zion.cs.uiuc.edu> Author: clamb Date: Fri Jul 27 02:36:14 2007 New Revision: 40548 URL: http://llvm.org/viewvc/llvm-project?rev=40548&view=rev Log: Move subreg lowering pass to be right after regalloc, per feedback. Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=40548&r1=40547&r2=40548&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original) +++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Fri Jul 27 02:36:14 2007 @@ -72,6 +72,11 @@ if (PrintMachineCode) PM.add(createMachineFunctionPrinterPass(cerr)); + + PM.add(createLowerSubregsPass()); + + if (PrintMachineCode) // Print the subreg lowered code + PM.add(createMachineFunctionPrinterPass(cerr)); // Run post-ra passes. if (addPostRegAlloc(PM, Fast) && PrintMachineCode) @@ -96,8 +101,6 @@ if (addPreEmitPass(PM, Fast) && PrintMachineCode) PM.add(createMachineFunctionPrinterPass(cerr)); - - PM.add(createLowerSubregsPass()); switch (FileType) { default: @@ -178,6 +181,11 @@ if (PrintMachineCode) PM.add(createMachineFunctionPrinterPass(cerr)); + + PM.add(createLowerSubregsPass()); + + if (PrintMachineCode) // Print the subreg lowered code + PM.add(createMachineFunctionPrinterPass(cerr)); // Run post-ra passes. if (addPostRegAlloc(PM, Fast) && PrintMachineCode) @@ -199,8 +207,6 @@ if (addPreEmitPass(PM, Fast) && PrintMachineCode) PM.add(createMachineFunctionPrinterPass(cerr)); - - PM.add(createLowerSubregsPass()); addCodeEmitter(PM, Fast, PrintEmittedAsm, MCE); From baldrick at free.fr Fri Jul 27 05:38:07 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 27 Jul 2007 12:38:07 +0200 Subject: [llvm-commits] Trampoline support (pointers nested funtions) In-Reply-To: <9F8C3A52-1E0F-439E-B1F0-46A6E4191833@apple.com> References: <200707261656.20050.baldrick@free.fr> <9F8C3A52-1E0F-439E-B1F0-46A6E4191833@apple.com> Message-ID: <200707271238.09287.baldrick@free.fr> Hi Evan, > Some nit picks. > > 1. Please don't use "Chain" for stand for function static chain. It > confuses backend guys like me. :-) "Chain" stands for control flow > dependency in the backend. I've replaced Chain with Nest everywhere, eg the attribute is now 'nest'. > 2. Purely a stylistic thing: > > +SDOperand X86TargetLowering::LowerTRAMPOLINE(SDOperand Op, > + SelectionDAG &DAG) { > + SDOperand Root = Op.getOperand(0); > + SDOperand Trmp = Op.getOperand(1); // trampoline > + SDOperand FPtr = Op.getOperand(2); // nested function > + SDOperand SChn = Op.getOperand(3); // static chain > + > + SrcValueSDNode *TrmpSV = cast(Op.getOperand(4)); > + > + if (Subtarget->is64Bit()) { > + return SDOperand(); // not yet supported > + } else { > > If you move the check is64Bit() to the beginning of function, there > is no need to nest the part that actually do the work in the "else" > clause. I'd prefer to leave it as it is: this is where the code for 64 bit support will go, once added. And since right now codegen will abort on trampoline lowering on x86-64, I don't think it matters if a few cycles are wasted before the abort :) By the way, I think aborting is the right thing to do: if someone is creating a trampoline, most likely they are going to use it, i.e. jump to the code it contains. If we lower trampoline initialization to nothing on architectures that don't yet support it, then the code will appear to compile fine but will die very horribly at runtime, by jumping to a bunch of random bytes... > 3. In X86TargetLowering::LowerTRAMPOLINE(): > + case CallingConv::X86_StdCall: { > + Move = 0xb9; // Pass chain in ECX > > I assume this is the ModR/M byte? Well, it's MOV32ri. > Can you refactor ModRMByte() from X86CodeEmitter.cpp (probably also getX86RegNum) > and use that to calculate this instead? For the reasons explained in the next paragraph, I've taken a minimal approach. (1) I've introduced X86CodeEmitter.h, which contains native X86 Register numbers factored out of X86CodeEmitter.cpp. (2) In LowerTRAMPOLINE, names like N86::ECX are used to name the register used. (3) Rather than using 0xb8 and 0xE9, I've introduced symbolic names MOV32ri and JMP. I could also get these by doing something like this: const X86InstrInfo *TII = ((X86TargetMachine&)getTargetMachine()).getInstrInfo(); unsigned char MOV32ri = TII->getBaseOpcodeFor(&TII->get(X86::MOV32ri)); But it didn't seem worth it (is there a way to extract the machine opcode statically?). > Also, isn't the static chain register described in X86CallingConv.td? It is, but it's hard to use here. The problem is that when lowering the init.trampoline intrinsic you only have a pointer to the target function. From this pointer you would like to find out which register a certain parameter will be passed in for that function. Not so easy! It's like having a call instruction without having the arguments. In order to exploit X86CallingConv.td, you have to use all the lowering machinery, which isn't adapted to this case. For example, you could try to synthesize a fake call. Or you could pretend to be lowering the target function. I tried it, and it can be done with a lot of horrible hacking. But it's not worth it. It's much simpler to simply grab the calling convention and use that, which unfortunately means keeping LowerTRAMPOLINE and X86CallingConv.td in sync. Personally I can live with that, especially since I've seen the alternative and it still wakes me up screaming at night :) But maybe you can see a reasonable way of doing it? Since I need to map the calling convention to a native X86 register number, I chose to bypass X86::ECX etc and directly use N86::ECX. This would be different if the register number was being extracted from lowering + CCInfo. > Magic number is confusing. :-) Hopefully it's more readable now. The amount of code factorization is minimal which is a pity but seems the best choice. > Looks great otherwise. Thanks! Thanks for reviewing! Duncan. -------------- next part -------------- A non-text attachment was scrubbed... Name: tramp.diff Type: text/x-diff Size: 33855 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070727/fc8ed649/attachment.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: tramp-gcc.diff Type: text/x-diff Size: 4727 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070727/fc8ed649/attachment-0001.bin From baldrick at free.fr Fri Jul 27 07:58:55 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 27 Jul 2007 12:58:55 -0000 Subject: [llvm-commits] [llvm] r40549 - in /llvm/trunk: docs/ include/llvm/ include/llvm/CodeGen/ include/llvm/Target/ lib/AsmParser/ lib/CodeGen/SelectionDAG/ lib/Target/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/IA64/ lib/Target/Mips/ lib/Target/PowerPC/ lib/Target/Sparc/ lib/VMCore/ Message-ID: <200707271258.l6RCwus3032767@zion.cs.uiuc.edu> Author: baldrick Date: Fri Jul 27 07:58:54 2007 New Revision: 40549 URL: http://llvm.org/viewvc/llvm-project?rev=40549&view=rev Log: Support for trampolines, except for X86 codegen which is still under discussion. Modified: llvm/trunk/docs/LangRef.html llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h llvm/trunk/include/llvm/Intrinsics.td llvm/trunk/include/llvm/ParameterAttributes.h llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/AsmParser/Lexer.l llvm/trunk/lib/AsmParser/llvmAsmParser.y llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp llvm/trunk/lib/Target/ARM/ARMISelLowering.h llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp llvm/trunk/lib/Target/IA64/IA64ISelLowering.cpp llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp llvm/trunk/lib/Target/TargetCallingConv.td llvm/trunk/lib/VMCore/Function.cpp llvm/trunk/lib/VMCore/Verifier.cpp Modified: llvm/trunk/docs/LangRef.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.html?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Fri Jul 27 07:58:54 2007 @@ -200,6 +200,12 @@
    8. 'llvm.memory.barrier' Intrinsic
    +
  • Trampoline Intrinsics +
      +
    1. 'llvm.init.trampoline' Intrinsic
    2. +
    3. 'llvm.adjust.trampoline' Intrinsic
    4. +
    +
  • General intrinsics
    1. @@ -5123,6 +5129,105 @@ + +
      +

      + These intrinsics make it possible to excise one parameter, marked with + the nest attribute, from a function. The result is a callable + function pointer lacking the nest parameter - the caller does not need + to provide a value for it. Instead, the value to use is stored in + advance in a "trampoline", a block of memory usually allocated + on the stack, which also contains code to splice the nest value into the + argument list. This is used to implement the GCC nested function address + extension. +

      +

      + For example, if the function is + i32 f(i8* nest %c, i32 %x, i32 %y) then the resulting function + pointer has signature i32 (i32, i32)*. It can be created as follows: +

      +  %tramp1 = alloca [10 x i8], align 4 ; size and alignment only correct for X86
      +  %tramp = getelementptr [10 x i8]* %tramp1, i32 0, i32 0
      +  call void @llvm.init.trampoline( i8* %tramp, i8* bitcast (i32 (i8* nest , i32, i32)* @f to i8*), i8* %nval )
      +  %adj = call i8* @llvm.adjust.trampoline( i8* %tramp )
      +  %fp = bitcast i8* %adj to i32 (i32, i32)*
      +
      + The call %val = call i32 %fp( i32 %x, i32 %y ) is then equivalent to + %val = call i32 %f( i8* %nval, i32 %x, i32 %y ). +

      +

      + Trampolines are currently only supported on the X86 architecture. +

      +
      + + + +
      +
      Syntax:
      +
      +declare void @llvm.init.trampoline(i8* <tramp>, i8* <func>, i8* <nval>)
      +
      +
      Overview:
      +

      + This initializes the memory pointed to by tramp as a trampoline. +

      +
      Arguments:
      +

      + The llvm.init.trampoline intrinsic takes three arguments, all + pointers. The tramp argument must point to a sufficiently large + and sufficiently aligned block of memory; this memory is written to by the + intrinsic. Currently LLVM provides no help in determining just how big and + aligned the memory needs to be. The func argument must hold a + function bitcast to an i8*. +

      +
      Semantics:
      +

      + The block of memory pointed to by tramp is filled with target + dependent code, turning it into a function. + The new function's signature is the same as that of func with + any arguments marked with the nest attribute removed. At most + one such nest argument is allowed, and it must be of pointer + type. Calling the new function is equivalent to calling func + with the same argument list, but with nval used for the missing + nest argument. +

      +
      + + + +
      +
      Syntax:
      +
      +declare i8* @llvm.adjust.trampoline(i8* <tramp>)
      +
      +
      Overview:
      +

      + This intrinsic returns a function pointer suitable for executing + the trampoline code pointed to by tramp. +

      +
      Arguments:
      +

      + The llvm.adjust.trampoline takes one argument, a pointer to a + trampoline initialized by the + 'llvm.init.trampoline' intrinsic. +

      +
      Semantics:
      +

      + A function pointer that can be used to execute the trampoline code in + tramp is returned. The returned value should be bitcast to an + appropriate function pointer type + before being called. +

      +
      + + + Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Fri Jul 27 07:58:54 2007 @@ -66,6 +66,8 @@ StructReturnOffs = 3, ByVal = 1<<4, ///< Struct passed by value ByValOffs = 4, + Nest = 1<<5, ///< Parameter is nested function static chain + NestOffs = 5, OrigAlignment = 0x1F<<27, OrigAlignmentOffs = 27 }; @@ -528,7 +530,19 @@ // number, then a column then a file id (provided by MachineModuleInfo.) It // produces a token chain as output. DEBUG_LOC, - + + // ADJUST_TRAMP - This corresponds to the adjust_trampoline intrinsic. + // It takes a value as input and returns a value as output. + ADJUST_TRAMP, + + // TRAMPOLINE - This corresponds to the init_trampoline intrinsic. + // It takes as input a token chain, the pointer to the trampoline, + // the pointer to the nested function, the pointer to pass for the + // 'nest' parameter, a SRCVALUE for the trampoline and another for + // the nested function (allowing targets to access the original + // Function*). It produces a token chain as output. + TRAMPOLINE, + // BUILTIN_OP_END - This must be the last enum value in this list. BUILTIN_OP_END }; Modified: llvm/trunk/include/llvm/Intrinsics.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Intrinsics.td?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/include/llvm/Intrinsics.td (original) +++ llvm/trunk/include/llvm/Intrinsics.td Fri Jul 27 07:58:54 2007 @@ -247,6 +247,14 @@ llvm_ptr_ty, llvm_i32_ty], [], "llvm.var.annotation">; +//===------------------------ Trampoline Intrinsics -----------------------===// +// +def int_init_trampoline : Intrinsic<[llvm_void_ty, llvm_ptr_ty, llvm_ptr_ty, + llvm_ptr_ty], []>, + GCCBuiltin<"__builtin_init_trampoline">; +def int_adjust_trampoline : Intrinsic<[llvm_ptr_ty, llvm_ptr_ty], [IntrNoMem]>, + GCCBuiltin<"__builtin_adjust_trampoline">; + //===----------------------------------------------------------------------===// // Target-specific intrinsics //===----------------------------------------------------------------------===// Modified: llvm/trunk/include/llvm/ParameterAttributes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ParameterAttributes.h?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/include/llvm/ParameterAttributes.h (original) +++ llvm/trunk/include/llvm/ParameterAttributes.h Fri Jul 27 07:58:54 2007 @@ -30,14 +30,15 @@ /// @brief Function parameter attributes. enum Attributes { None = 0, ///< No attributes have been set - ZExt = 1 << 0, ///< zero extended before/after call - SExt = 1 << 1, ///< sign extended before/after call - NoReturn = 1 << 2, ///< mark the function as not returning - InReg = 1 << 3, ///< force argument to be passed in register - StructRet = 1 << 4, ///< hidden pointer to structure to return + ZExt = 1 << 0, ///< Zero extended before/after call + SExt = 1 << 1, ///< Sign extended before/after call + NoReturn = 1 << 2, ///< Mark the function as not returning + InReg = 1 << 3, ///< Force argument to be passed in register + StructRet = 1 << 4, ///< Hidden pointer to structure to return NoUnwind = 1 << 5, ///< Function doesn't unwind stack - NoAlias = 1 << 6, ///< Considered to not alias after call. - ByVal = 1 << 7 ///< Pass structure by value + NoAlias = 1 << 6, ///< Considered to not alias after call + ByVal = 1 << 7, ///< Pass structure by value + Nest = 1 << 8 ///< Nested function static chain }; } Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Fri Jul 27 07:58:54 2007 @@ -812,8 +812,10 @@ bool isZExt; bool isInReg; bool isSRet; + bool isNest; - ArgListEntry():isSExt(false), isZExt(false), isInReg(false), isSRet(false) { }; + ArgListEntry() : isSExt(false), isZExt(false), isInReg(false), + isSRet(false), isNest(false) { }; }; typedef std::vector ArgListTy; virtual std::pair Modified: llvm/trunk/lib/AsmParser/Lexer.l URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/Lexer.l?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/Lexer.l (original) +++ llvm/trunk/lib/AsmParser/Lexer.l Fri Jul 27 07:58:54 2007 @@ -233,6 +233,7 @@ noreturn { return NORETURN; } noalias { return NOALIAS; } byval { return BYVAL; } +nest { return NEST; } void { RET_TY(Type::VoidTy, VOID); } float { RET_TY(Type::FloatTy, FLOAT); } Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original) +++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Fri Jul 27 07:58:54 2007 @@ -1101,7 +1101,7 @@ %token EXTRACTELEMENT INSERTELEMENT SHUFFLEVECTOR // Function Attributes -%token SIGNEXT ZEROEXT NORETURN INREG SRET NOUNWIND NOALIAS BYVAL +%token SIGNEXT ZEROEXT NORETURN INREG SRET NOUNWIND NOALIAS BYVAL NEST // Visibility Styles %token DEFAULT HIDDEN PROTECTED @@ -1229,7 +1229,8 @@ | INREG { $$ = ParamAttr::InReg; } | SRET { $$ = ParamAttr::StructRet; } | NOALIAS { $$ = ParamAttr::NoAlias; } - | BYVAL { $$ = ParamAttr::ByVal; } + | BYVAL { $$ = ParamAttr::ByVal; } + | NEST { $$ = ParamAttr::Nest; } ; OptParamAttrs : /* empty */ { $$ = ParamAttr::None; } Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Fri Jul 27 07:58:54 2007 @@ -3156,6 +3156,31 @@ } break; } + case ISD::ADJUST_TRAMP: { + Tmp1 = LegalizeOp(Node->getOperand(0)); + switch (TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0))) { + default: assert(0 && "This action is not supported yet!"); + case TargetLowering::Custom: + Result = DAG.UpdateNodeOperands(Result, Tmp1); + Result = TLI.LowerOperation(Result, DAG); + if (Result.Val) break; + // FALL THROUGH + case TargetLowering::Expand: + Result = Tmp1; + break; + } + break; + } + case ISD::TRAMPOLINE: { + SDOperand Ops[6]; + for (unsigned i = 0; i != 6; ++i) + Ops[i] = LegalizeOp(Node->getOperand(i)); + Result = DAG.UpdateNodeOperands(Result, Ops, 6); + // The only option for this node is to custom lower it. + Result = TLI.LowerOperation(Result, DAG); + assert(Result.Val && "Should always custom lower!"); + break; + } } assert(Result.getValueType() == Op.getValueType() && Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Jul 27 07:58:54 2007 @@ -3513,6 +3513,10 @@ case ISD::LOCATION: return "location"; case ISD::DEBUG_LOC: return "debug_loc"; + // Trampolines + case ISD::ADJUST_TRAMP: return "adjust_tramp"; + case ISD::TRAMPOLINE: return "trampoline"; + case ISD::CONDCODE: switch (cast(this)->get()) { default: assert(0 && "Unknown setcc condition!"); Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original) +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Fri Jul 27 07:58:54 2007 @@ -2863,6 +2863,28 @@ case Intrinsic::var_annotation: // Discard annotate attributes return 0; + + case Intrinsic::adjust_trampoline: { + SDOperand Arg = getValue(I.getOperand(1)); + setValue(&I, DAG.getNode(ISD::ADJUST_TRAMP, TLI.getPointerTy(), Arg)); + return 0; + } + + case Intrinsic::init_trampoline: { + const Function *F = + cast(IntrinsicInst::StripPointerCasts(I.getOperand(2))); + + SDOperand Ops[6]; + Ops[0] = getRoot(); + Ops[1] = getValue(I.getOperand(1)); + Ops[2] = getValue(I.getOperand(2)); + Ops[3] = getValue(I.getOperand(3)); + Ops[4] = DAG.getSrcValue(I.getOperand(1)); + Ops[5] = DAG.getSrcValue(F); + + DAG.setRoot(DAG.getNode(ISD::TRAMPOLINE, MVT::Other, Ops, 6)); + return 0; + } } } @@ -2892,6 +2914,7 @@ Entry.isZExt = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::ZExt); Entry.isInReg = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::InReg); Entry.isSRet = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::StructRet); + Entry.isNest = Attrs && Attrs->paramHasAttr(attrInd, ParamAttr::Nest); Args.push_back(Entry); } @@ -3827,6 +3850,8 @@ Flags |= ISD::ParamFlags::StructReturn; if (Attrs && Attrs->paramHasAttr(j, ParamAttr::ByVal)) Flags |= ISD::ParamFlags::ByVal; + if (Attrs && Attrs->paramHasAttr(j, ParamAttr::Nest)) + Flags |= ISD::ParamFlags::Nest; Flags |= (OriginalAlignment << ISD::ParamFlags::OrigAlignmentOffs); switch (getTypeAction(VT)) { @@ -3945,6 +3970,8 @@ Flags |= ISD::ParamFlags::InReg; if (Args[i].isSRet) Flags |= ISD::ParamFlags::StructReturn; + if (Args[i].isNest) + Flags |= ISD::ParamFlags::Nest; Flags |= OriginalAlignment << ISD::ParamFlags::OrigAlignmentOffs; switch (getTypeAction(VT)) { Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Fri Jul 27 07:58:54 2007 @@ -190,7 +190,12 @@ setOperationAction(ISD::MEMSET , MVT::Other, Expand); setOperationAction(ISD::MEMCPY , MVT::Other, Custom); setOperationAction(ISD::MEMMOVE , MVT::Other, Expand); - + + if (Subtarget->isThumb()) + setOperationAction(ISD::ADJUST_TRAMP, MVT::i32, Custom); + else + setOperationAction(ISD::ADJUST_TRAMP, MVT::i32, Expand); + // Use the default implementation. setOperationAction(ISD::VASTART , MVT::Other, Expand); setOperationAction(ISD::VAARG , MVT::Other, Expand); @@ -1413,6 +1418,14 @@ return Chain; } +SDOperand ARMTargetLowering::LowerADJUST_TRAMP(SDOperand Op, + SelectionDAG &DAG) { + // Thumb trampolines should be entered in thumb mode, so set the bottom bit + // of the address. + return DAG.getNode(ISD::OR, MVT::i32, Op.getOperand(0), + DAG.getConstant(1, MVT::i32)); +} + SDOperand ARMTargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) { switch (Op.getOpcode()) { default: assert(0 && "Don't know how to custom lower this!"); abort(); @@ -1444,6 +1457,7 @@ case ISD::FRAMEADDR: break; case ISD::GLOBAL_OFFSET_TABLE: return LowerGLOBAL_OFFSET_TABLE(Op, DAG); case ISD::MEMCPY: return LowerMEMCPY(Op, DAG); + case ISD::ADJUST_TRAMP: return LowerADJUST_TRAMP(Op, DAG); } return SDOperand(); } Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.h?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/lib/Target/ARM/ARMISelLowering.h (original) +++ llvm/trunk/lib/Target/ARM/ARMISelLowering.h Fri Jul 27 07:58:54 2007 @@ -138,6 +138,7 @@ SDOperand LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG); SDOperand LowerBR_JT(SDOperand Op, SelectionDAG &DAG); SDOperand LowerMEMCPY(SDOperand Op, SelectionDAG &DAG); + SDOperand LowerADJUST_TRAMP(SDOperand Op, SelectionDAG &DAG); }; } Modified: llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Alpha/AlphaISelLowering.cpp Fri Jul 27 07:58:54 2007 @@ -124,6 +124,9 @@ setOperationAction(ISD::ExternalSymbol, MVT::i64, Custom); setOperationAction(ISD::GlobalTLSAddress, MVT::i64, Custom); + setOperationAction(ISD::ADJUST_TRAMP, MVT::i32, Expand); + setOperationAction(ISD::ADJUST_TRAMP, MVT::i64, Expand); + setOperationAction(ISD::VASTART, MVT::Other, Custom); setOperationAction(ISD::VAEND, MVT::Other, Expand); setOperationAction(ISD::VACOPY, MVT::Other, Custom); Modified: llvm/trunk/lib/Target/IA64/IA64ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/IA64/IA64ISelLowering.cpp?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/lib/Target/IA64/IA64ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/IA64/IA64ISelLowering.cpp Fri Jul 27 07:58:54 2007 @@ -97,6 +97,8 @@ setOperationAction(ISD::ROTR , MVT::i64 , Expand); setOperationAction(ISD::BSWAP, MVT::i64 , Expand); // mux @rev + setOperationAction(ISD::ADJUST_TRAMP, MVT::i64, Expand); + // VASTART needs to be custom lowered to use the VarArgsFrameIndex setOperationAction(ISD::VAARG , MVT::Other, Custom); setOperationAction(ISD::VASTART , MVT::Other, Custom); Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original) +++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Fri Jul 27 07:58:54 2007 @@ -102,6 +102,8 @@ setOperationAction(ISD::STACKSAVE, MVT::Other, Expand); setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand); + setOperationAction(ISD::ADJUST_TRAMP, MVT::i32, Expand); + setStackPointerRegisterToSaveRestore(Mips::SP); computeRegisterProperties(); } Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original) +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Fri Jul 27 07:58:54 2007 @@ -169,7 +169,10 @@ // RET must be custom lowered, to meet ABI requirements setOperationAction(ISD::RET , MVT::Other, Custom); - + + setOperationAction(ISD::ADJUST_TRAMP, MVT::i32, Expand); + setOperationAction(ISD::ADJUST_TRAMP, MVT::i64, Expand); + // VASTART needs to be custom lowered to use the VarArgsFrameIndex setOperationAction(ISD::VASTART , MVT::Other, Custom); Modified: llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp Fri Jul 27 07:58:54 2007 @@ -215,7 +215,9 @@ // RET must be custom lowered, to meet ABI requirements setOperationAction(ISD::RET , MVT::Other, Custom); - + + setOperationAction(ISD::ADJUST_TRAMP, MVT::i32, Expand); + // VASTART needs to be custom lowered to use the VarArgsFrameIndex. setOperationAction(ISD::VASTART , MVT::Other, Custom); // VAARG needs to be lowered to not do unaligned accesses for doubles. Modified: llvm/trunk/lib/Target/TargetCallingConv.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetCallingConv.td?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/lib/Target/TargetCallingConv.td (original) +++ llvm/trunk/lib/Target/TargetCallingConv.td Fri Jul 27 07:58:54 2007 @@ -45,6 +45,10 @@ /// the specified action. class CCIfInReg : CCIf<"ArgFlags & ISD::ParamFlags::InReg", A> {} +/// CCIfNest - If this argument is marked with the 'nest' attribute, apply +/// the specified action. +class CCIfNest : CCIf<"ArgFlags & ISD::ParamFlags::Nest", A> {} + /// CCIfNotVarArg - If the current function is not vararg - apply the action class CCIfNotVarArg : CCIf<"!State.isVarArg()", A> {} Modified: llvm/trunk/lib/VMCore/Function.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Function.cpp?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Function.cpp (original) +++ llvm/trunk/lib/VMCore/Function.cpp Fri Jul 27 07:58:54 2007 @@ -105,6 +105,8 @@ Result += "sret "; if (Attrs & ParamAttr::ByVal) Result += "byval "; + if (Attrs & ParamAttr::Nest) + Result += "nest "; return Result; } Modified: llvm/trunk/lib/VMCore/Verifier.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=40549&r1=40548&r2=40549&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Verifier.cpp (original) +++ llvm/trunk/lib/VMCore/Verifier.cpp Fri Jul 27 07:58:54 2007 @@ -361,6 +361,7 @@ if (const ParamAttrsList *Attrs = FT->getParamAttrs()) { unsigned Idx = 1; + bool SawNest = false; Assert1(!Attrs->paramHasAttr(0, ParamAttr::ByVal), "Attribute ByVal should not apply to functions!", &F); @@ -368,6 +369,8 @@ "Attribute SRet should not apply to functions!", &F); Assert1(!Attrs->paramHasAttr(0, ParamAttr::InReg), "Attribute InReg should not apply to functions!", &F); + Assert1(!Attrs->paramHasAttr(0, ParamAttr::Nest), + "Attribute Nest should not apply to functions!", &F); for (FunctionType::param_iterator I = FT->param_begin(), E = FT->param_end(); I != E; ++I, ++Idx) { @@ -391,6 +394,20 @@ "Attribute ByVal should only apply to pointer to structs!", &F); } + if (Attrs->paramHasAttr(Idx, ParamAttr::Nest)) { + Assert1(!SawNest, "More than one parameter has attribute Nest!", &F); + SawNest = true; + + Assert1(isa(FT->getParamType(Idx-1)), + "Attribute Nest should only apply to Pointer type!", &F); + Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::ByVal), + "Attributes Nest and ByVal are incompatible!", &F); + Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::InReg), + "Attributes Nest and InReg are incompatible!", &F); + Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::StructRet), + "Attributes Nest and StructRet are incompatible!", &F); + } + Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::NoReturn), "Attribute NoReturn should only be applied to function", &F); Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::NoUnwind), From baldrick at free.fr Fri Jul 27 08:06:37 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 27 Jul 2007 13:06:37 -0000 Subject: [llvm-commits] [llvm-gcc-4.0] r40550 - in /llvm-gcc-4.0/trunk/gcc: llvm-convert.cpp llvm-internal.h llvm-types.cpp tree-nested.c Message-ID: <200707271306.l6RD6bOJ000634@zion.cs.uiuc.edu> Author: baldrick Date: Fri Jul 27 08:06:37 2007 New Revision: 40550 URL: http://llvm.org/viewvc/llvm-project?rev=40550&view=rev Log: Trampoline support. Modified: llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp llvm-gcc-4.0/trunk/gcc/llvm-internal.h llvm-gcc-4.0/trunk/gcc/llvm-types.cpp llvm-gcc-4.0/trunk/gcc/tree-nested.c Modified: llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp?rev=40550&r1=40549&r2=40550&view=diff ============================================================================== --- llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp Fri Jul 27 08:06:37 2007 @@ -4211,6 +4211,10 @@ return EmitBuiltinExtractReturnAddr(exp, Result); case BUILT_IN_FROB_RETURN_ADDR: return EmitBuiltinFrobReturnAddr(exp, Result); + case BUILT_IN_INIT_TRAMPOLINE: + return EmitBuiltinInitTrampoline(exp); + case BUILT_IN_ADJUST_TRAMPOLINE: + return EmitBuiltinAdjustTrampoline(exp, Result); // Builtins used by the exception handling runtime. case BUILT_IN_DWARF_CFA: @@ -4857,6 +4861,45 @@ return true; } +bool TreeToLLVM::EmitBuiltinInitTrampoline(tree exp) { + tree arglist = TREE_OPERAND(exp, 1); + if (!validate_arglist (arglist, POINTER_TYPE, POINTER_TYPE, POINTER_TYPE, + VOID_TYPE)) + return false; + + static const Type *VPTy = PointerType::get(Type::Int8Ty); + + Value *Tramp = Emit(TREE_VALUE(arglist), 0); + Tramp = CastToType(Instruction::BitCast, Tramp, VPTy); + + Value *Func = Emit(TREE_VALUE(TREE_CHAIN(arglist)), 0); + Func = CastToType(Instruction::BitCast, Func, VPTy); + + Value *Chain = Emit(TREE_VALUE(TREE_CHAIN(TREE_CHAIN(arglist))), 0); + Chain = CastToType(Instruction::BitCast, Chain, VPTy); + + Value *Ops[3] = { Tramp, Func, Chain }; + + Function *Intr = Intrinsic::getDeclaration(TheModule, + Intrinsic::init_trampoline); + Builder.CreateCall(Intr, Ops, 3); + return true; +} + +bool TreeToLLVM::EmitBuiltinAdjustTrampoline(tree exp, Value *&Result) { + tree arglist = TREE_OPERAND(exp, 1); + if (!validate_arglist(arglist, POINTER_TYPE, VOID_TYPE)) + return false; + + Value *Tramp = Emit(TREE_VALUE(arglist), 0); + Tramp = CastToType(Instruction::BitCast, Tramp, + PointerType::get(Type::Int8Ty)); + + Function *Intr = Intrinsic::getDeclaration(TheModule, + Intrinsic::adjust_trampoline); + Result = Builder.CreateCall(Intr, Tramp, "adj"); + return true; +} //===----------------------------------------------------------------------===// // ... Complex Math Expressions ... Modified: llvm-gcc-4.0/trunk/gcc/llvm-internal.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-internal.h?rev=40550&r1=40549&r2=40550&view=diff ============================================================================== --- llvm-gcc-4.0/trunk/gcc/llvm-internal.h (original) +++ llvm-gcc-4.0/trunk/gcc/llvm-internal.h Fri Jul 27 08:06:37 2007 @@ -580,6 +580,8 @@ bool EmitBuiltinEHReturn(tree_node *exp, Value *&Result); bool EmitBuiltinInitDwarfRegSizes(tree_node *exp, Value *&Result); bool EmitBuiltinUnwindInit(tree_node *exp, Value *&Result); + bool EmitBuiltinInitTrampoline(tree_node *exp); + bool EmitBuiltinAdjustTrampoline(tree_node *exp, Value *&Result); // Complex Math Expressions. void EmitLoadFromComplex(Value *&Real, Value *&Imag, Value *SrcComplex, Modified: llvm-gcc-4.0/trunk/gcc/llvm-types.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-types.cpp?rev=40550&r1=40549&r2=40550&view=diff ============================================================================== --- llvm-gcc-4.0/trunk/gcc/llvm-types.cpp (original) +++ llvm-gcc-4.0/trunk/gcc/llvm-types.cpp Fri Jul 27 08:06:37 2007 @@ -962,9 +962,13 @@ Attrs.push_back(ParamAttrsWithIndex::get(ArgTypes.size(), ParamAttr::StructRet)); - if (static_chain) + if (static_chain) { // Pass the static chain as the first parameter. ABIConverter.HandleArgument(TREE_TYPE(static_chain)); + // Mark it as the chain argument. + Attrs.push_back(ParamAttrsWithIndex::get(ArgTypes.size(), + ParamAttr::Nest)); + } // If the target has regparam parameters, allow it to inspect the function // type. Modified: llvm-gcc-4.0/trunk/gcc/tree-nested.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/tree-nested.c?rev=40550&r1=40549&r2=40550&view=diff ============================================================================== --- llvm-gcc-4.0/trunk/gcc/tree-nested.c (original) +++ llvm-gcc-4.0/trunk/gcc/tree-nested.c Fri Jul 27 08:06:37 2007 @@ -409,6 +409,8 @@ align = TRAMPOLINE_ALIGNMENT; size = TRAMPOLINE_SIZE; +/* APPLE LOCAL LLVM */ +#ifndef ENABLE_LLVM /* Rely on LLVM supporting large alignments. */ /* If we won't be able to guarantee alignment simply via TYPE_ALIGN, then allocate extra space so that we can do dynamic alignment. */ /* APPLE LOCAL STACK_BOUNDARY must be a signed expression on Darwin/x86 */ @@ -417,6 +419,8 @@ size += ((align/BITS_PER_UNIT) - 1) & -(STACK_BOUNDARY/BITS_PER_UNIT); align = STACK_BOUNDARY; } +/* APPLE LOCAL LLVM */ +#endif t = build_index_type (build_int_cst (NULL_TREE, size - 1)); t = build_array_type (char_type_node, t); From baldrick at free.fr Fri Jul 27 08:20:29 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 27 Jul 2007 13:20:29 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40551 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-internal.h llvm-types.cpp tree-nested.c Message-ID: <200707271320.l6RDKTkV001390@zion.cs.uiuc.edu> Author: baldrick Date: Fri Jul 27 08:20:28 2007 New Revision: 40551 URL: http://llvm.org/viewvc/llvm-project?rev=40551&view=rev Log: Trampoline support. Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp llvm-gcc-4.2/trunk/gcc/llvm-internal.h llvm-gcc-4.2/trunk/gcc/llvm-types.cpp llvm-gcc-4.2/trunk/gcc/tree-nested.c 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=40551&r1=40550&r2=40551&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Fri Jul 27 08:20:28 2007 @@ -4236,6 +4236,10 @@ return EmitBuiltinExtractReturnAddr(exp, Result); case BUILT_IN_FROB_RETURN_ADDR: return EmitBuiltinFrobReturnAddr(exp, Result); + case BUILT_IN_INIT_TRAMPOLINE: + return EmitBuiltinInitTrampoline(exp); + case BUILT_IN_ADJUST_TRAMPOLINE: + return EmitBuiltinAdjustTrampoline(exp, Result); // Builtins used by the exception handling runtime. case BUILT_IN_DWARF_CFA: @@ -4879,6 +4883,45 @@ return true; } +bool TreeToLLVM::EmitBuiltinInitTrampoline(tree exp) { + tree arglist = TREE_OPERAND(exp, 1); + if (!validate_arglist (arglist, POINTER_TYPE, POINTER_TYPE, POINTER_TYPE, + VOID_TYPE)) + return false; + + static const Type *VPTy = PointerType::get(Type::Int8Ty); + + Value *Tramp = Emit(TREE_VALUE(arglist), 0); + Tramp = CastToType(Instruction::BitCast, Tramp, VPTy); + + Value *Func = Emit(TREE_VALUE(TREE_CHAIN(arglist)), 0); + Func = CastToType(Instruction::BitCast, Func, VPTy); + + Value *Chain = Emit(TREE_VALUE(TREE_CHAIN(TREE_CHAIN(arglist))), 0); + Chain = CastToType(Instruction::BitCast, Chain, VPTy); + + Value *Ops[3] = { Tramp, Func, Chain }; + + Function *Intr = Intrinsic::getDeclaration(TheModule, + Intrinsic::init_trampoline); + Builder.CreateCall(Intr, Ops, 3); + return true; +} + +bool TreeToLLVM::EmitBuiltinAdjustTrampoline(tree exp, Value *&Result) { + tree arglist = TREE_OPERAND(exp, 1); + if (!validate_arglist(arglist, POINTER_TYPE, VOID_TYPE)) + return false; + + Value *Tramp = Emit(TREE_VALUE(arglist), 0); + Tramp = CastToType(Instruction::BitCast, Tramp, + PointerType::get(Type::Int8Ty)); + + Function *Intr = Intrinsic::getDeclaration(TheModule, + Intrinsic::adjust_trampoline); + Result = Builder.CreateCall(Intr, Tramp, "adj"); + return true; +} //===----------------------------------------------------------------------===// // ... Complex Math Expressions ... Modified: llvm-gcc-4.2/trunk/gcc/llvm-internal.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-internal.h?rev=40551&r1=40550&r2=40551&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-internal.h (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-internal.h Fri Jul 27 08:20:28 2007 @@ -601,6 +601,8 @@ bool EmitBuiltinEHReturn(tree_node *exp, Value *&Result); bool EmitBuiltinInitDwarfRegSizes(tree_node *exp, Value *&Result); bool EmitBuiltinUnwindInit(tree_node *exp, Value *&Result); + bool EmitBuiltinInitTrampoline(tree_node *exp); + bool EmitBuiltinAdjustTrampoline(tree_node *exp, Value *&Result); // Complex Math Expressions. void EmitLoadFromComplex(Value *&Real, Value *&Imag, Value *SrcComplex, Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=40551&r1=40550&r2=40551&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Fri Jul 27 08:20:28 2007 @@ -983,9 +983,13 @@ Attrs.push_back(ParamAttrsWithIndex::get(ArgTypes.size(), ParamAttr::StructRet)); - if (static_chain) + if (static_chain) { // Pass the static chain as the first parameter. ABIConverter.HandleArgument(TREE_TYPE(static_chain)); + // Mark it as the chain argument. + Attrs.push_back(ParamAttrsWithIndex::get(ArgTypes.size(), + ParamAttr::Nest)); + } // If the target has regparam parameters, allow it to inspect the function // type. Modified: llvm-gcc-4.2/trunk/gcc/tree-nested.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree-nested.c?rev=40551&r1=40550&r2=40551&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/tree-nested.c (original) +++ llvm-gcc-4.2/trunk/gcc/tree-nested.c Fri Jul 27 08:20:28 2007 @@ -439,6 +439,8 @@ align = TRAMPOLINE_ALIGNMENT; size = TRAMPOLINE_SIZE; +/* APPLE LOCAL LLVM */ +#ifndef ENABLE_LLVM /* Rely on LLVM supporting large alignments. */ /* If we won't be able to guarantee alignment simply via TYPE_ALIGN, then allocate extra space so that we can do dynamic alignment. */ /* APPLE LOCAL STACK_BOUNDARY must be a signed expression on Darwin/x86 */ @@ -447,6 +449,8 @@ size += ((align/BITS_PER_UNIT) - 1) & -(STACK_BOUNDARY/BITS_PER_UNIT); align = STACK_BOUNDARY; } +/* APPLE LOCAL LLVM */ +#endif t = build_index_type (build_int_cst (NULL_TREE, size - 1)); t = build_array_type (char_type_node, t); From baldrick at free.fr Fri Jul 27 08:27:17 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 27 Jul 2007 13:27:17 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40552 - /llvm-gcc-4.2/trunk/gcc/tree-nested.c Message-ID: <200707271327.l6RDRHSx001790@zion.cs.uiuc.edu> Author: baldrick Date: Fri Jul 27 08:27:17 2007 New Revision: 40552 URL: http://llvm.org/viewvc/llvm-project?rev=40552&view=rev Log: Fix tags. Modified: llvm-gcc-4.2/trunk/gcc/tree-nested.c Modified: llvm-gcc-4.2/trunk/gcc/tree-nested.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree-nested.c?rev=40552&r1=40551&r2=40552&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/tree-nested.c (original) +++ llvm-gcc-4.2/trunk/gcc/tree-nested.c Fri Jul 27 08:27:17 2007 @@ -439,7 +439,7 @@ align = TRAMPOLINE_ALIGNMENT; size = TRAMPOLINE_SIZE; -/* APPLE LOCAL LLVM */ +/* LLVM LOCAL */ #ifndef ENABLE_LLVM /* Rely on LLVM supporting large alignments. */ /* If we won't be able to guarantee alignment simply via TYPE_ALIGN, then allocate extra space so that we can do dynamic alignment. */ @@ -449,7 +449,7 @@ size += ((align/BITS_PER_UNIT) - 1) & -(STACK_BOUNDARY/BITS_PER_UNIT); align = STACK_BOUNDARY; } -/* APPLE LOCAL LLVM */ +/* LLVM LOCAL */ #endif t = build_index_type (build_int_cst (NULL_TREE, size - 1)); From baldrick at free.fr Fri Jul 27 10:09:55 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 27 Jul 2007 15:09:55 -0000 Subject: [llvm-commits] [llvm] r40553 - /llvm/trunk/lib/VMCore/Verifier.cpp Message-ID: <200707271509.l6RF9tmh009362@zion.cs.uiuc.edu> Author: baldrick Date: Fri Jul 27 10:09:54 2007 New Revision: 40553 URL: http://llvm.org/viewvc/llvm-project?rev=40553&view=rev Log: As the number of parameter attributes increases, Verifier::visitFunction is suffering a combinatorial explosion due to the number of mutually incompatible attributes. This patch tidies the whole thing up using attribute masks. While there I fixed some small bugs: (1) the ByVal attribute tests cast a type to a pointer type, which can fail. Yes, the fact it is of a pointer type is checked before, but a failing check does not cause the program to exit, it continues on outputting further errors; (2) Nothing was checking that an sret attribute is on the first parameter; (3) nothing was checking that a function for which isStructReturn() is true has a parameter with the sret attribute and vice-versa (I don't think it is possible for this to go wrong, but it seems right to check it). Modified: llvm/trunk/lib/VMCore/Verifier.cpp Modified: llvm/trunk/lib/VMCore/Verifier.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=40553&r1=40552&r2=40553&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Verifier.cpp (original) +++ llvm/trunk/lib/VMCore/Verifier.cpp Fri Jul 27 10:09:54 2007 @@ -354,67 +354,83 @@ F.getReturnType() == Type::VoidTy, "Functions cannot return aggregate values!", &F); - Assert1(!FT->isStructReturn() || - (FT->getReturnType() == Type::VoidTy && - FT->getNumParams() > 0 && isa(FT->getParamType(0))), + Assert1(!FT->isStructReturn() || FT->getReturnType() == Type::VoidTy, "Invalid struct-return function!", &F); + const uint16_t ReturnIncompatible = + ParamAttr::ByVal | ParamAttr::InReg | + ParamAttr::Nest | ParamAttr::StructRet; + + const uint16_t ParameterIncompatible = + ParamAttr::NoReturn | ParamAttr::NoUnwind; + + const uint16_t MutuallyIncompatible = + ParamAttr::ByVal | ParamAttr::Nest | ParamAttr::StructRet; + + const uint16_t IntegerTypeOnly = + ParamAttr::SExt | ParamAttr::ZExt; + + const uint16_t PointerTypeOnly = + ParamAttr::ByVal | ParamAttr::Nest | + ParamAttr::NoAlias | ParamAttr::StructRet; + + bool SawSRet = false; + if (const ParamAttrsList *Attrs = FT->getParamAttrs()) { unsigned Idx = 1; bool SawNest = false; - Assert1(!Attrs->paramHasAttr(0, ParamAttr::ByVal), - "Attribute ByVal should not apply to functions!", &F); - Assert1(!Attrs->paramHasAttr(0, ParamAttr::StructRet), - "Attribute SRet should not apply to functions!", &F); - Assert1(!Attrs->paramHasAttr(0, ParamAttr::InReg), - "Attribute InReg should not apply to functions!", &F); - Assert1(!Attrs->paramHasAttr(0, ParamAttr::Nest), - "Attribute Nest should not apply to functions!", &F); + uint16_t RetI = Attrs->getParamAttrs(0) & ReturnIncompatible; + Assert1(!RetI, "Attribute " + Attrs->getParamAttrsText(RetI) + + "should not apply to functions!", &F); for (FunctionType::param_iterator I = FT->param_begin(), E = FT->param_end(); I != E; ++I, ++Idx) { - if (Attrs->paramHasAttr(Idx, ParamAttr::ZExt) || - Attrs->paramHasAttr(Idx, ParamAttr::SExt)) - Assert1(FT->getParamType(Idx-1)->isInteger(), - "Attribute ZExt should only apply to Integer type!", &F); - if (Attrs->paramHasAttr(Idx, ParamAttr::NoAlias)) - Assert1(isa(FT->getParamType(Idx-1)), - "Attribute NoAlias should only apply to Pointer type!", &F); - if (Attrs->paramHasAttr(Idx, ParamAttr::ByVal)) { - Assert1(isa(FT->getParamType(Idx-1)), - "Attribute ByVal should only apply to pointer to structs!", &F); - Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::StructRet), - "Attributes ByVal and StructRet are incompatible!", &F); + uint16_t Attr = Attrs->getParamAttrs(Idx); + + uint16_t ParmI = Attr & ParameterIncompatible; + Assert1(!ParmI, "Attribute " + Attrs->getParamAttrsText(ParmI) + + "should only be applied to function!", &F); + + uint16_t MutI = Attr & MutuallyIncompatible; + Assert1(!(MutI & (MutI - 1)), "Attributes " + + Attrs->getParamAttrsText(MutI) + "are incompatible!", &F); + + uint16_t IType = Attr & IntegerTypeOnly; + Assert1(!IType || FT->getParamType(Idx-1)->isInteger(), + "Attribute " + Attrs->getParamAttrsText(IType) + + "should only apply to Integer type!", &F); + + uint16_t PType = Attr & PointerTypeOnly; + Assert1(!PType || isa(FT->getParamType(Idx-1)), + "Attribute " + Attrs->getParamAttrsText(PType) + + "should only apply to Pointer type!", &F); + if (Attrs->paramHasAttr(Idx, ParamAttr::ByVal)) { const PointerType *Ty = - cast(FT->getParamType(Idx-1)); - Assert1(isa(Ty->getElementType()), - "Attribute ByVal should only apply to pointer to structs!", &F); + dyn_cast(FT->getParamType(Idx-1)); + Assert1(!Ty || isa(Ty->getElementType()), + "Attribute byval should only apply to pointer to structs!", &F); } if (Attrs->paramHasAttr(Idx, ParamAttr::Nest)) { - Assert1(!SawNest, "More than one parameter has attribute Nest!", &F); + Assert1(!SawNest, "More than one parameter has attribute nest!", &F); SawNest = true; - - Assert1(isa(FT->getParamType(Idx-1)), - "Attribute Nest should only apply to Pointer type!", &F); - Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::ByVal), - "Attributes Nest and ByVal are incompatible!", &F); Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::InReg), - "Attributes Nest and InReg are incompatible!", &F); - Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::StructRet), - "Attributes Nest and StructRet are incompatible!", &F); + "Attributes nest and inreg are incompatible!", &F); } - Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::NoReturn), - "Attribute NoReturn should only be applied to function", &F); - Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::NoUnwind), - "Attribute NoUnwind should only be applied to function", &F); + if (Attrs->paramHasAttr(Idx, ParamAttr::StructRet)) { + SawSRet = true; + Assert1(Idx == 1, "Attribute sret not on first parameter!", &F); + } } } + Assert1(SawSRet == FT->isStructReturn(), + "StructReturn function with no sret attribute!", &F); + // Check that this function meets the restrictions on this calling convention. switch (F.getCallingConv()) { default: From baldrick at free.fr Fri Jul 27 10:21:41 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 27 Jul 2007 17:21:41 +0200 Subject: [llvm-commits] [llvm] r40553 - /llvm/trunk/lib/VMCore/Verifier.cpp In-Reply-To: <200707271509.l6RF9tmh009362@zion.cs.uiuc.edu> References: <200707271509.l6RF9tmh009362@zion.cs.uiuc.edu> Message-ID: <200707271721.43584.baldrick@free.fr> PS: Probably StructReturn and InReg should be made mutually incompatible. It would be easy to make a MutuallyIncompatible2 and put InReg, StructReturn and Nest in it. PPS: If I just broke anything, I'll be happy to fix it when I get back from holidays... at the end of August! [queue evil cackling :)] From cfr at adobe.com Fri Jul 27 11:31:20 2007 From: cfr at adobe.com (Chuck Rose III) Date: Fri, 27 Jul 2007 09:31:20 -0700 Subject: [llvm-commits] Two patches: some VStudio compiler errors and an interpreter multi-use crash Message-ID: <680422C0AA225644931C2F6DD07200DDE49DC6@namail5.corp.adobe.com> Hola LLVMers, I hadn't heard back concerning this patch and would like to get it in. I have commit-after-review access now, so could commit this myself if it meets with your approval. Please let me know. Thanks, Chuck. ________________________________ From: Chuck Rose III Sent: Wednesday, July 25, 2007 11:22 AM To: 'llvm-commits at cs.uiuc.edu' Subject: Two patches: some VStudio compiler errors and an interpreter multi-use crash The "lib.patch" is for the lib directory & the "utils.patch" for the utils directory. Lib.patch contains 1 VStudio compiler error fix and also a move into a managed static of one of the statics for the interpreter. In cases where programs are compiled in a loop, interpreted, and then discarded, the current interpreter will crash as the static will contain pointers to discarded Function* values. The compiler error's I'm seeing come from VStudio's unwillingness to accept code of this form: for (unsigned index = 0 ; ....) { ... unsigned index = whatever; // this one to eclipse the loop control index for the purposes of the loop interior ... } I fixed this by renaming one of the two variables so that it wouldn't clash. In case in LoopUnswitch, I changed the name of the interior index. The utils.patch contains another compiler error fix of the same type as above. In RegisterInfoEmitter, I changed the name of the outside index. I tried to pick reasonable names in keeping with the prevailing style of the functions in question, but would love if the main dev for those areas can ensure that's the case. Please include my email address on the "to"-line for any questions about this patch. I'm currently subscribed to the commit alias in digest form. Thanks, Chuck. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070727/dd01381d/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: lib.patch Type: application/octet-stream Size: 2456 bytes Desc: lib.patch Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070727/dd01381d/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: utils.patch Type: application/octet-stream Size: 645 bytes Desc: utils.patch Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070727/dd01381d/attachment-0001.obj From baldrick at free.fr Fri Jul 27 11:45:18 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 27 Jul 2007 16:45:18 -0000 Subject: [llvm-commits] [llvm] r40554 - /llvm/trunk/lib/VMCore/Verifier.cpp Message-ID: <200707271645.l6RGjJSL015451@zion.cs.uiuc.edu> Author: baldrick Date: Fri Jul 27 11:45:18 2007 New Revision: 40554 URL: http://llvm.org/viewvc/llvm-project?rev=40554&view=rev Log: It seems logical that InReg should be incompatible with StructReturn and ByVal, so make it so. Modified: llvm/trunk/lib/VMCore/Verifier.cpp Modified: llvm/trunk/lib/VMCore/Verifier.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=40554&r1=40553&r2=40554&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Verifier.cpp (original) +++ llvm/trunk/lib/VMCore/Verifier.cpp Fri Jul 27 11:45:18 2007 @@ -365,7 +365,8 @@ ParamAttr::NoReturn | ParamAttr::NoUnwind; const uint16_t MutuallyIncompatible = - ParamAttr::ByVal | ParamAttr::Nest | ParamAttr::StructRet; + ParamAttr::ByVal | ParamAttr::InReg | + ParamAttr::Nest | ParamAttr::StructRet; const uint16_t IntegerTypeOnly = ParamAttr::SExt | ParamAttr::ZExt; @@ -417,8 +418,6 @@ if (Attrs->paramHasAttr(Idx, ParamAttr::Nest)) { Assert1(!SawNest, "More than one parameter has attribute nest!", &F); SawNest = true; - Assert1(!Attrs->paramHasAttr(Idx, ParamAttr::InReg), - "Attributes nest and inreg are incompatible!", &F); } if (Attrs->paramHasAttr(Idx, ParamAttr::StructRet)) { From rspencer at reidspencer.com Fri Jul 27 12:04:56 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Fri, 27 Jul 2007 10:04:56 -0700 Subject: [llvm-commits] Two patches: some VStudio compiler errors and an interpreter multi-use crash In-Reply-To: <680422C0AA225644931C2F6DD07200DDE49DC6@namail5.corp.adobe.com> References: <680422C0AA225644931C2F6DD07200DDE49DC6@namail5.corp.adobe.com> Message-ID: <1185555896.18084.9.camel@bashful.x10sys.com> Chuck, Looks okay to me. Some feedback for you .. Reid. On Fri, 2007-07-27 at 09:31 -0700, Chuck Rose III wrote: > > Index: ExecutionEngine/Interpreter/ExternalFunctions.cpp > =================================================================== > --- ExecutionEngine/Interpreter/ExternalFunctions.cpp (revision > 40471) > +++ ExecutionEngine/Interpreter/ExternalFunctions.cpp (working copy) > @@ -25,6 +25,7 @@ > #include "llvm/Support/Streams.h" > #include "llvm/System/DynamicLibrary.h" > #include "llvm/Target/TargetData.h" > +#include "llvm/Support/ManagedStatic.h" > #include > #include > #include > @@ -33,7 +34,7 @@ > using namespace llvm; > > typedef GenericValue (*ExFunc)(FunctionType *, const > vector &); > -static std::map Functions; > +static ManagedStatic > Functions; > static std::map FuncNames; Why not make FuncNames a ManagedStatic as well? > > static Interpreter *TheInterpreter; > @@ -80,7 +81,7 @@ > FnPtr = (ExFunc)(intptr_t) > sys::DynamicLibrary::SearchForAddressOfSymbol(F->getName()); > if (FnPtr != 0) > - Functions.insert(std::make_pair(F, FnPtr)); // Cache for later > + Functions->insert(std::make_pair(F, FnPtr)); // Cache for later > return FnPtr; > } > > @@ -90,8 +91,8 @@ > > // Do a lookup to see if the function is in our cache... this > should just be a > // deferred annotation! > - std::map::iterator FI = > Functions.find(F); > - ExFunc Fn = (FI == Functions.end()) ? lookupFunction(F) : > FI->second; > + std::map::iterator FI = > Functions->find(F); > + ExFunc Fn = (FI == Functions->end()) ? lookupFunction(F) : > FI->second; > if (Fn == 0) { > cerr << "Tried to execute an unknown external function: " > << F->getType()->getDescription() << " " << F->getName() << > "\n"; > Index: Transforms/Scalar/LoopUnswitch.cpp > =================================================================== > --- Transforms/Scalar/LoopUnswitch.cpp (revision 40471) > +++ Transforms/Scalar/LoopUnswitch.cpp (working copy) > @@ -482,9 +482,9 @@ > for (DominanceFrontier::DomSetType::iterator I = S.begin(), E = > S.end(); > I != E; ++I) { > BasicBlock *BB = *I; > - DenseMap::iterator I = VM.find(BB); > - if (I != VM.end()) > - NewDFSet.insert(cast(I->second)); > + DenseMap::iterator IDM = VM.find(BB); > + if (IDM != VM.end()) > + NewDFSet.insert(cast(IDM->second)); I assume this is because of a VC++ error/warning on the redefinition of I ? > else > NewDFSet.insert(BB); > } > > Index: TableGen/RegisterInfoEmitter.cpp > =================================================================== > --- TableGen/RegisterInfoEmitter.cpp (revision 40471) > +++ TableGen/RegisterInfoEmitter.cpp (working copy) > @@ -240,8 +240,8 @@ > > bool Empty = true; > > - for (unsigned subrc = 0, e2 = RC.SubRegClasses.size(); > - subrc != e2; ++subrc) { > + for (unsigned subrc = 0, subrcMax = RC.SubRegClasses.size(); > + subrc != subrcMax; ++subrc) { > unsigned rc2 = 0, e2 = RegisterClasses.size(); > for (; rc2 != e2; ++rc2) { > const CodeGenRegisterClass &RC2 = RegisterClasses[rc2]; > From djg at cray.com Fri Jul 27 12:16:43 2007 From: djg at cray.com (Dan Gohman) Date: Fri, 27 Jul 2007 17:16:43 -0000 Subject: [llvm-commits] [llvm] r40555 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/fsxor-alignment.ll test/CodeGen/X86/vec_shuffle.ll Message-ID: <200707271716.l6RHGi2a017631@zion.cs.uiuc.edu> Author: djg Date: Fri Jul 27 12:16:43 2007 New Revision: 40555 URL: http://llvm.org/viewvc/llvm-project?rev=40555&view=rev Log: Re-apply 40504, but with a fix for the segfault it caused in oggenc: Make the alignedload and alignedstore patterns always require 16-byte alignment. This way when they are used in the "Fs" instructions, in which a vector instruction is used for a scalar purpose, they can still require the full vector alignment. And add a regression test for this. Added: llvm/trunk/test/CodeGen/X86/fsxor-alignment.ll Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.h llvm/trunk/lib/Target/X86/X86InstrSSE.td llvm/trunk/test/CodeGen/X86/vec_shuffle.ll Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=40555&r1=40554&r2=40555&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri Jul 27 12:16:43 2007 @@ -3367,14 +3367,10 @@ CV.push_back(C); CV.push_back(C); } - Constant *CS = ConstantStruct::get(CV); - SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); - SDVTList Tys = DAG.getVTList(VT, MVT::Other); - SmallVector Ops; - Ops.push_back(DAG.getEntryNode()); - Ops.push_back(CPIdx); - Ops.push_back(DAG.getSrcValue(NULL)); - SDOperand Mask = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], Ops.size()); + Constant *C = ConstantVector::get(CV); + SDOperand CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); + SDOperand Mask = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, NULL, 0, + false, 16); return DAG.getNode(X86ISD::FAND, VT, Op.getOperand(0), Mask); } @@ -3399,21 +3395,16 @@ CV.push_back(C); CV.push_back(C); } - Constant *CS = ConstantStruct::get(CV); - SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); + Constant *C = ConstantVector::get(CV); + SDOperand CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); + SDOperand Mask = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, NULL, 0, + false, 16); if (MVT::isVector(VT)) { - SDOperand Mask = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, NULL, 0); return DAG.getNode(ISD::BIT_CONVERT, VT, DAG.getNode(ISD::XOR, MVT::v2i64, DAG.getNode(ISD::BIT_CONVERT, MVT::v2i64, Op.getOperand(0)), DAG.getNode(ISD::BIT_CONVERT, MVT::v2i64, Mask))); } else { - SDVTList Tys = DAG.getVTList(VT, MVT::Other); - SmallVector Ops; - Ops.push_back(DAG.getEntryNode()); - Ops.push_back(CPIdx); - Ops.push_back(DAG.getSrcValue(NULL)); - SDOperand Mask = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], Ops.size()); return DAG.getNode(X86ISD::FXOR, VT, Op.getOperand(0), Mask); } } @@ -3442,14 +3433,10 @@ CV.push_back(ConstantFP::get(SrcTy, 0.0)); CV.push_back(ConstantFP::get(SrcTy, 0.0)); } - Constant *CS = ConstantStruct::get(CV); - SDOperand CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); - SDVTList Tys = DAG.getVTList(SrcVT, MVT::Other); - SmallVector Ops; - Ops.push_back(DAG.getEntryNode()); - Ops.push_back(CPIdx); - Ops.push_back(DAG.getSrcValue(NULL)); - SDOperand Mask1 = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], Ops.size()); + Constant *C = ConstantVector::get(CV); + SDOperand CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); + SDOperand Mask1 = DAG.getLoad(SrcVT, DAG.getEntryNode(), CPIdx, NULL, 0, + false, 16); SDOperand SignBit = DAG.getNode(X86ISD::FAND, SrcVT, Op1, Mask1); // Shift sign bit right or left if the two operands have different types. @@ -3474,14 +3461,10 @@ CV.push_back(ConstantFP::get(SrcTy, 0.0)); CV.push_back(ConstantFP::get(SrcTy, 0.0)); } - CS = ConstantStruct::get(CV); - CPIdx = DAG.getConstantPool(CS, getPointerTy(), 4); - Tys = DAG.getVTList(VT, MVT::Other); - Ops.clear(); - Ops.push_back(DAG.getEntryNode()); - Ops.push_back(CPIdx); - Ops.push_back(DAG.getSrcValue(NULL)); - SDOperand Mask2 = DAG.getNode(X86ISD::LOAD_PACK, Tys, &Ops[0], Ops.size()); + C = ConstantVector::get(CV); + CPIdx = DAG.getConstantPool(C, getPointerTy(), 4); + SDOperand Mask2 = DAG.getLoad(VT, DAG.getEntryNode(), CPIdx, NULL, 0, + false, 16); SDOperand Val = DAG.getNode(X86ISD::FAND, VT, Op0, Mask2); // Or the value with the sign bit. @@ -4357,8 +4340,6 @@ case X86ISD::RET_FLAG: return "X86ISD::RET_FLAG"; case X86ISD::REP_STOS: return "X86ISD::REP_STOS"; case X86ISD::REP_MOVS: return "X86ISD::REP_MOVS"; - case X86ISD::LOAD_PACK: return "X86ISD::LOAD_PACK"; - case X86ISD::LOAD_UA: return "X86ISD::LOAD_UA"; case X86ISD::GlobalBaseReg: return "X86ISD::GlobalBaseReg"; case X86ISD::Wrapper: return "X86ISD::Wrapper"; case X86ISD::S2VEC: return "X86ISD::S2VEC"; @@ -4756,19 +4737,14 @@ } bool isAlign16 = isBaseAlignment16(Base->getOperand(1).Val, MFI, Subtarget); + LoadSDNode *LD = cast(Base); if (isAlign16) { - LoadSDNode *LD = cast(Base); return DAG.getLoad(VT, LD->getChain(), LD->getBasePtr(), LD->getSrcValue(), - LD->getSrcValueOffset()); + LD->getSrcValueOffset(), LD->isVolatile()); } else { - // Just use movups, it's shorter. - SDVTList Tys = DAG.getVTList(MVT::v4f32, MVT::Other); - SmallVector Ops; - Ops.push_back(Base->getOperand(0)); - Ops.push_back(Base->getOperand(1)); - Ops.push_back(Base->getOperand(2)); - return DAG.getNode(ISD::BIT_CONVERT, VT, - DAG.getNode(X86ISD::LOAD_UA, Tys, &Ops[0], Ops.size())); + return DAG.getLoad(VT, LD->getChain(), LD->getBasePtr(), LD->getSrcValue(), + LD->getSrcValueOffset(), LD->isVolatile(), + LD->getAlignment()); } } Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=40555&r1=40554&r2=40555&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Fri Jul 27 12:16:43 2007 @@ -143,14 +143,6 @@ /// REP_MOVS - Repeat move, corresponds to X86::REP_MOVSx. REP_MOVS, - /// LOAD_PACK Load a 128-bit packed float / double value. It has the same - /// operands as a normal load. - LOAD_PACK, - - /// LOAD_UA Load an unaligned 128-bit value. It has the same operands as - /// a normal load. - LOAD_UA, - /// GlobalBaseReg - On Darwin, this node represents the result of the popl /// at function entry, used for PIC code. GlobalBaseReg, Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=40555&r1=40554&r2=40555&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Fri Jul 27 12:16:43 2007 @@ -21,8 +21,6 @@ def SDTX86FPShiftOp : SDTypeProfile<1, 2, [ SDTCisSameAs<0, 1>, SDTCisFP<0>, SDTCisInt<2> ]>; -def X86loadp : SDNode<"X86ISD::LOAD_PACK", SDTLoad, [SDNPHasChain]>; -def X86loadu : SDNode<"X86ISD::LOAD_UA", SDTLoad, [SDNPHasChain]>; def X86fmin : SDNode<"X86ISD::FMIN", SDTFPBinOp>; def X86fmax : SDNode<"X86ISD::FMAX", SDTFPBinOp>; def X86fand : SDNode<"X86ISD::FAND", SDTFPBinOp, @@ -82,33 +80,32 @@ // SSE pattern fragments //===----------------------------------------------------------------------===// -def X86loadpf32 : PatFrag<(ops node:$ptr), (f32 (X86loadp node:$ptr))>; -def X86loadpf64 : PatFrag<(ops node:$ptr), (f64 (X86loadp node:$ptr))>; - def loadv4f32 : PatFrag<(ops node:$ptr), (v4f32 (load node:$ptr))>; def loadv2f64 : PatFrag<(ops node:$ptr), (v2f64 (load node:$ptr))>; def loadv4i32 : PatFrag<(ops node:$ptr), (v4i32 (load node:$ptr))>; def loadv2i64 : PatFrag<(ops node:$ptr), (v2i64 (load node:$ptr))>; -// Like 'store', but always requires natural alignment. +// Like 'store', but always requires vector alignment. def alignedstore : PatFrag<(ops node:$val, node:$ptr), (st node:$val, node:$ptr), [{ if (StoreSDNode *ST = dyn_cast(N)) return !ST->isTruncatingStore() && ST->getAddressingMode() == ISD::UNINDEXED && - ST->getAlignment() * 8 >= MVT::getSizeInBits(ST->getStoredVT()); + ST->getAlignment() >= 16; return false; }]>; -// Like 'load', but always requires natural alignment. +// Like 'load', but always requires vector alignment. def alignedload : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ if (LoadSDNode *LD = dyn_cast(N)) return LD->getExtensionType() == ISD::NON_EXTLOAD && LD->getAddressingMode() == ISD::UNINDEXED && - LD->getAlignment() * 8 >= MVT::getSizeInBits(LD->getLoadedVT()); + LD->getAlignment() >= 16; return false; }]>; +def alignedloadfsf32 : PatFrag<(ops node:$ptr), (f32 (alignedload node:$ptr))>; +def alignedloadfsf64 : PatFrag<(ops node:$ptr), (f64 (alignedload node:$ptr))>; def alignedloadv4f32 : PatFrag<(ops node:$ptr), (v4f32 (alignedload node:$ptr))>; def alignedloadv2f64 : PatFrag<(ops node:$ptr), (v2f64 (alignedload node:$ptr))>; def alignedloadv4i32 : PatFrag<(ops node:$ptr), (v4i32 (alignedload node:$ptr))>; @@ -123,10 +120,12 @@ if (LoadSDNode *LD = dyn_cast(N)) return LD->getExtensionType() == ISD::NON_EXTLOAD && LD->getAddressingMode() == ISD::UNINDEXED && - LD->getAlignment() * 8 >= MVT::getSizeInBits(LD->getLoadedVT()); + LD->getAlignment() >= 16; return false; }]>; +def memopfsf32 : PatFrag<(ops node:$ptr), (f32 (memop node:$ptr))>; +def memopfsf64 : PatFrag<(ops node:$ptr), (f64 (memop node:$ptr))>; def memopv4f32 : PatFrag<(ops node:$ptr), (v4f32 (memop node:$ptr))>; def memopv2f64 : PatFrag<(ops node:$ptr), (v2f64 (memop node:$ptr))>; def memopv4i32 : PatFrag<(ops node:$ptr), (v4i32 (memop node:$ptr))>; @@ -410,7 +409,7 @@ // disregarded. def FsMOVAPSrm : PSI<0x28, MRMSrcMem, (outs FR32:$dst), (ins f128mem:$src), "movaps {$src, $dst|$dst, $src}", - [(set FR32:$dst, (X86loadpf32 addr:$src))]>; + [(set FR32:$dst, (alignedloadfsf32 addr:$src))]>; // Alias bitwise logical operations using SSE logical ops on packed FP values. let isTwoAddress = 1 in { @@ -429,15 +428,15 @@ def FsANDPSrm : PSI<0x54, MRMSrcMem, (outs FR32:$dst), (ins FR32:$src1, f128mem:$src2), "andps {$src2, $dst|$dst, $src2}", [(set FR32:$dst, (X86fand FR32:$src1, - (X86loadpf32 addr:$src2)))]>; + (memopfsf32 addr:$src2)))]>; def FsORPSrm : PSI<0x56, MRMSrcMem, (outs FR32:$dst), (ins FR32:$src1, f128mem:$src2), "orps {$src2, $dst|$dst, $src2}", [(set FR32:$dst, (X86for FR32:$src1, - (X86loadpf32 addr:$src2)))]>; + (memopfsf32 addr:$src2)))]>; def FsXORPSrm : PSI<0x57, MRMSrcMem, (outs FR32:$dst), (ins FR32:$src1, f128mem:$src2), "xorps {$src2, $dst|$dst, $src2}", [(set FR32:$dst, (X86fxor FR32:$src1, - (X86loadpf32 addr:$src2)))]>; + (memopfsf32 addr:$src2)))]>; def FsANDNPSrr : PSI<0x55, MRMSrcReg, (outs FR32:$dst), (ins FR32:$src1, FR32:$src2), @@ -1083,7 +1082,7 @@ // disregarded. def FsMOVAPDrm : PDI<0x28, MRMSrcMem, (outs FR64:$dst), (ins f128mem:$src), "movapd {$src, $dst|$dst, $src}", - [(set FR64:$dst, (X86loadpf64 addr:$src))]>; + [(set FR64:$dst, (alignedloadfsf64 addr:$src))]>; // Alias bitwise logical operations using SSE logical ops on packed FP values. let isTwoAddress = 1 in { @@ -1102,15 +1101,15 @@ def FsANDPDrm : PDI<0x54, MRMSrcMem, (outs FR64:$dst), (ins FR64:$src1, f128mem:$src2), "andpd {$src2, $dst|$dst, $src2}", [(set FR64:$dst, (X86fand FR64:$src1, - (X86loadpf64 addr:$src2)))]>; + (memopfsf64 addr:$src2)))]>; def FsORPDrm : PDI<0x56, MRMSrcMem, (outs FR64:$dst), (ins FR64:$src1, f128mem:$src2), "orpd {$src2, $dst|$dst, $src2}", [(set FR64:$dst, (X86for FR64:$src1, - (X86loadpf64 addr:$src2)))]>; + (memopfsf64 addr:$src2)))]>; def FsXORPDrm : PDI<0x57, MRMSrcMem, (outs FR64:$dst), (ins FR64:$src1, f128mem:$src2), "xorpd {$src2, $dst|$dst, $src2}", [(set FR64:$dst, (X86fxor FR64:$src1, - (X86loadpf64 addr:$src2)))]>; + (memopfsf64 addr:$src2)))]>; def FsANDNPDrr : PDI<0x55, MRMSrcReg, (outs FR64:$dst), (ins FR64:$src1, FR64:$src2), @@ -2630,11 +2629,11 @@ (load addr:$src2))), (PANDNrm VR128:$src1, addr:$src2)>, Requires<[HasSSE2]>; -// Unaligned load -def : Pat<(v4f32 (X86loadu addr:$src)), (MOVUPSrm addr:$src)>, - Requires<[HasSSE1]>; - // Use movaps / movups for SSE integer load / store (one byte shorter). +def : Pat<(alignedloadv4i32 addr:$src), + (MOVAPSrm addr:$src)>, Requires<[HasSSE1]>; +def : Pat<(loadv4i32 addr:$src), + (MOVUPSrm addr:$src)>, Requires<[HasSSE1]>; def : Pat<(alignedloadv2i64 addr:$src), (MOVAPSrm addr:$src)>, Requires<[HasSSE2]>; def : Pat<(loadv2i64 addr:$src), Added: llvm/trunk/test/CodeGen/X86/fsxor-alignment.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fsxor-alignment.ll?rev=40555&view=auto ============================================================================== --- llvm/trunk/test/CodeGen/X86/fsxor-alignment.ll (added) +++ llvm/trunk/test/CodeGen/X86/fsxor-alignment.ll Fri Jul 27 12:16:43 2007 @@ -0,0 +1,14 @@ +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse -enable-unsafe-fp-math | \ +; RUN: grep -v sp | grep xorps | wc -l | grep 2 + +; Don't fold the incoming stack arguments into the xorps instructions used +; to do floating-point negations, because the arguments aren't vectors +; and aren't vector-aligned. + +define void @foo(float* %p, float* %q, float %s, float %y) { + %ss = sub float -0.0, %s + %yy = sub float -0.0, %y + store float %ss, float* %p + store float %yy, float* %q + ret void +} Modified: llvm/trunk/test/CodeGen/X86/vec_shuffle.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_shuffle.ll?rev=40555&r1=40554&r2=40555&view=diff ============================================================================== --- llvm/trunk/test/CodeGen/X86/vec_shuffle.ll (original) +++ llvm/trunk/test/CodeGen/X86/vec_shuffle.ll Fri Jul 27 12:16:43 2007 @@ -1,6 +1,6 @@ ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f ; RUN: grep shufp %t | wc -l | grep 1 -; RUN: grep movups %t | wc -l | grep 1 +; RUN: grep movupd %t | wc -l | grep 1 ; RUN: grep pshufhw %t | wc -l | grep 1 void %test_v4sf(<4 x float>* %P, float %X, float %Y) { From cfr at adobe.com Fri Jul 27 12:24:54 2007 From: cfr at adobe.com (Chuck Rose III) Date: Fri, 27 Jul 2007 10:24:54 -0700 Subject: [llvm-commits] Two patches: some VStudio compiler errors and aninterpreter multi-use crash In-Reply-To: <1185555896.18084.9.camel@bashful.x10sys.com> References: <680422C0AA225644931C2F6DD07200DDE49DC6@namail5.corp.adobe.com> <1185555896.18084.9.camel@bashful.x10sys.com> Message-ID: <680422C0AA225644931C2F6DD07200DDE49E3F@namail5.corp.adobe.com> Hola Reid, Comments inline. Thanks, Chuck. -----Original Message----- From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Reid Spencer Sent: Friday, July 27, 2007 10:05 AM To: CVS Commit Messages for LLVM repository Subject: Re: [llvm-commits] Two patches: some VStudio compiler errors and aninterpreter multi-use crash Chuck, Looks okay to me. Some feedback for you .. Reid. On Fri, 2007-07-27 at 09:31 -0700, Chuck Rose III wrote: > > Index: ExecutionEngine/Interpreter/ExternalFunctions.cpp > =================================================================== > --- ExecutionEngine/Interpreter/ExternalFunctions.cpp (revision > 40471) > +++ ExecutionEngine/Interpreter/ExternalFunctions.cpp (working copy) > @@ -25,6 +25,7 @@ > #include "llvm/Support/Streams.h" > #include "llvm/System/DynamicLibrary.h" > #include "llvm/Target/TargetData.h" > +#include "llvm/Support/ManagedStatic.h" > #include > #include > #include > @@ -33,7 +34,7 @@ > using namespace llvm; > > typedef GenericValue (*ExFunc)(FunctionType *, const > vector &); > -static std::map Functions; > +static ManagedStatic > Functions; > static std::map FuncNames; Why not make FuncNames a ManagedStatic as well? It should most likely be one as well. I'll make that change in my area and run it through its paces in our system and will put that in as a second fix next week. I've been working with our system here with that first fix applied to llvm for a few weeks now, so I have good confidence that it doesn't mess things up. I'd like to get my current crop of fixes in today so I can checkout tonight on a clean system and see that the new vstudio files build there too. > > static Interpreter *TheInterpreter; > @@ -80,7 +81,7 @@ > FnPtr = (ExFunc)(intptr_t) > sys::DynamicLibrary::SearchForAddressOfSymbol(F->getName()); > if (FnPtr != 0) > - Functions.insert(std::make_pair(F, FnPtr)); // Cache for later > + Functions->insert(std::make_pair(F, FnPtr)); // Cache for later > return FnPtr; > } > > @@ -90,8 +91,8 @@ > > // Do a lookup to see if the function is in our cache... this > should just be a > // deferred annotation! > - std::map::iterator FI = > Functions.find(F); > - ExFunc Fn = (FI == Functions.end()) ? lookupFunction(F) : > FI->second; > + std::map::iterator FI = > Functions->find(F); > + ExFunc Fn = (FI == Functions->end()) ? lookupFunction(F) : > FI->second; > if (Fn == 0) { > cerr << "Tried to execute an unknown external function: " > << F->getType()->getDescription() << " " << F->getName() << > "\n"; > Index: Transforms/Scalar/LoopUnswitch.cpp > =================================================================== > --- Transforms/Scalar/LoopUnswitch.cpp (revision 40471) > +++ Transforms/Scalar/LoopUnswitch.cpp (working copy) > @@ -482,9 +482,9 @@ > for (DominanceFrontier::DomSetType::iterator I = S.begin(), E = > S.end(); > I != E; ++I) { > BasicBlock *BB = *I; > - DenseMap::iterator I = VM.find(BB); > - if (I != VM.end()) > - NewDFSet.insert(cast(I->second)); > + DenseMap::iterator IDM = VM.find(BB); > + if (IDM != VM.end()) > + NewDFSet.insert(cast(IDM->second)); I assume this is because of a VC++ error/warning on the redefinition of I ? Exactly. Vstudio doesn't like that. Ditto for the patch on TableGen too. > else > NewDFSet.insert(BB); > } > > Index: TableGen/RegisterInfoEmitter.cpp > =================================================================== > --- TableGen/RegisterInfoEmitter.cpp (revision 40471) > +++ TableGen/RegisterInfoEmitter.cpp (working copy) > @@ -240,8 +240,8 @@ > > bool Empty = true; > > - for (unsigned subrc = 0, e2 = RC.SubRegClasses.size(); > - subrc != e2; ++subrc) { > + for (unsigned subrc = 0, subrcMax = RC.SubRegClasses.size(); > + subrc != subrcMax; ++subrc) { > unsigned rc2 = 0, e2 = RegisterClasses.size(); > for (; rc2 != e2; ++rc2) { > const CodeGenRegisterClass &RC2 = RegisterClasses[rc2]; > _______________________________________________ llvm-commits mailing list llvm-commits at cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits From resistor at mac.com Fri Jul 27 13:07:02 2007 From: resistor at mac.com (Owen Anderson) Date: Fri, 27 Jul 2007 18:07:02 -0000 Subject: [llvm-commits] [llvm] r40556 - in /llvm/trunk: include/llvm/ADT/SmallPtrSet.h lib/Support/SmallPtrSet.cpp Message-ID: <200707271807.l6RI73JZ020125@zion.cs.uiuc.edu> Author: resistor Date: Fri Jul 27 13:07:02 2007 New Revision: 40556 URL: http://llvm.org/viewvc/llvm-project?rev=40556&view=rev Log: Allow SmallPtrSet to hold pointers to const data. Modified: llvm/trunk/include/llvm/ADT/SmallPtrSet.h llvm/trunk/lib/Support/SmallPtrSet.cpp Modified: llvm/trunk/include/llvm/ADT/SmallPtrSet.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallPtrSet.h?rev=40556&r1=40555&r2=40556&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/SmallPtrSet.h (original) +++ llvm/trunk/include/llvm/ADT/SmallPtrSet.h Fri Jul 27 13:07:02 2007 @@ -43,7 +43,7 @@ protected: /// CurArray - This is the current set of buckets. If it points to /// SmallArray, then the set is in 'small mode'. - void **CurArray; + const void **CurArray; /// CurArraySize - The allocated size of CurArray, always a power of two. /// Note that CurArray points to an array that has CurArraySize+1 elements in /// it, so that the end iterator actually points to valid memory. @@ -52,7 +52,7 @@ // If small, this is # elts allocated consequtively unsigned NumElements; unsigned NumTombstones; - void *SmallArray[1]; // Must be last ivar. + const void *SmallArray[1]; // Must be last ivar. // Helper to copy construct a SmallPtrSet. SmallPtrSetImpl(const SmallPtrSetImpl& that); @@ -88,7 +88,7 @@ /// insert - This returns true if the pointer was new to the set, false if it /// was already in the set. - bool insert(void *Ptr); + bool insert(const void * Ptr); template void insert(IterT I, IterT E) { @@ -98,12 +98,12 @@ /// erase - If the set contains the specified pointer, remove it and return /// true, otherwise return false. - bool erase(void *Ptr); + bool erase(void * const Ptr); - bool count(void *Ptr) const { + bool count(void * const Ptr) const { if (isSmall()) { // Linear search for the item. - for (void *const *APtr = SmallArray, *const *E = SmallArray+NumElements; + for (const void *const *APtr = SmallArray, *const *E = SmallArray+NumElements; APtr != E; ++APtr) if (*APtr == Ptr) return true; @@ -117,10 +117,10 @@ private: bool isSmall() const { return CurArray == &SmallArray[0]; } - unsigned Hash(void *Ptr) const { + unsigned Hash(const void *Ptr) const { return ((uintptr_t)Ptr >> 4) & (CurArraySize-1); } - void * const *FindBucketFor(void *Ptr) const; + const void * const *FindBucketFor(const void *Ptr) const; /// Grow - Allocate a larger backing store for the buckets and move it over. void Grow(); @@ -134,9 +134,9 @@ /// instances of SmallPtrSetIterator. class SmallPtrSetIteratorImpl { protected: - void *const *Bucket; + const void *const *Bucket; public: - SmallPtrSetIteratorImpl(void *const *BP) : Bucket(BP) { + SmallPtrSetIteratorImpl(const void *const *BP) : Bucket(BP) { AdvanceIfNotValid(); } @@ -162,12 +162,12 @@ template class SmallPtrSetIterator : public SmallPtrSetIteratorImpl { public: - SmallPtrSetIterator(void *const *BP) : SmallPtrSetIteratorImpl(BP) {} + SmallPtrSetIterator(const void *const *BP) : SmallPtrSetIteratorImpl(BP) {} // Most methods provided by baseclass. - PtrTy operator*() const { - return static_cast(*Bucket); + const PtrTy operator*() const { + return static_cast(const_cast(*Bucket)); } inline SmallPtrSetIterator& operator++() { // Preincrement Modified: llvm/trunk/lib/Support/SmallPtrSet.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SmallPtrSet.cpp?rev=40556&r1=40555&r2=40556&view=diff ============================================================================== --- llvm/trunk/lib/Support/SmallPtrSet.cpp (original) +++ llvm/trunk/lib/Support/SmallPtrSet.cpp Fri Jul 27 13:07:02 2007 @@ -18,10 +18,10 @@ using namespace llvm; -bool SmallPtrSetImpl::insert(void *Ptr) { +bool SmallPtrSetImpl::insert(const void * Ptr) { if (isSmall()) { // Check to see if it is already in the set. - for (void **APtr = SmallArray, **E = SmallArray+NumElements; + for (const void **APtr = SmallArray, **E = SmallArray+NumElements; APtr != E; ++APtr) if (*APtr == Ptr) return false; @@ -40,21 +40,21 @@ Grow(); // Okay, we know we have space. Find a hash bucket. - void **Bucket = const_cast(FindBucketFor(Ptr)); + void **Bucket = const_cast(FindBucketFor((void*)Ptr)); if (*Bucket == Ptr) return false; // Already inserted, good. // Otherwise, insert it! if (*Bucket == getTombstoneMarker()) --NumTombstones; - *Bucket = Ptr; + *Bucket = (void*)Ptr; ++NumElements; // Track density. return true; } -bool SmallPtrSetImpl::erase(void *Ptr) { +bool SmallPtrSetImpl::erase(void * const Ptr) { if (isSmall()) { // Check to see if it is in the set. - for (void **APtr = SmallArray, **E = SmallArray+NumElements; + for (const void **APtr = SmallArray, **E = SmallArray+NumElements; APtr != E; ++APtr) if (*APtr == Ptr) { // If it is in the set, replace this element. @@ -78,12 +78,12 @@ return true; } -void * const *SmallPtrSetImpl::FindBucketFor(void *Ptr) const { +const void * const *SmallPtrSetImpl::FindBucketFor(const void *Ptr) const { unsigned Bucket = Hash(Ptr); unsigned ArraySize = CurArraySize; unsigned ProbeAmt = 1; - void *const *Array = CurArray; - void *const *Tombstone = 0; + const void *const *Array = CurArray; + const void *const *Tombstone = 0; while (1) { // Found Ptr's bucket? if (Array[Bucket] == Ptr) @@ -112,11 +112,11 @@ unsigned OldSize = CurArraySize; unsigned NewSize = OldSize < 64 ? 128 : OldSize*2; - void **OldBuckets = CurArray; + const void **OldBuckets = CurArray; bool WasSmall = isSmall(); // Install the new array. Clear all the buckets to empty. - CurArray = (void**)malloc(sizeof(void*) * (NewSize+1)); + CurArray = (const void**)malloc(sizeof(void*) * (NewSize+1)); assert(CurArray && "Failed to allocate memory?"); CurArraySize = NewSize; memset(CurArray, -1, NewSize*sizeof(void*)); @@ -128,19 +128,19 @@ // Copy over all the elements. if (WasSmall) { // Small sets store their elements in order. - for (void **BucketPtr = OldBuckets, **E = OldBuckets+NumElements; + for (const void **BucketPtr = OldBuckets, **E = OldBuckets+NumElements; BucketPtr != E; ++BucketPtr) { - void *Elt = *BucketPtr; - *const_cast(FindBucketFor(Elt)) = Elt; + const void *Elt = *BucketPtr; + *const_cast(FindBucketFor(Elt)) = const_cast(Elt); } } else { // Copy over all valid entries. - for (void **BucketPtr = OldBuckets, **E = OldBuckets+OldSize; + for (const void **BucketPtr = OldBuckets, **E = OldBuckets+OldSize; BucketPtr != E; ++BucketPtr) { // Copy over the element if it is valid. - void *Elt = *BucketPtr; + const void *Elt = *BucketPtr; if (Elt != getTombstoneMarker() && Elt != getEmptyMarker()) - *const_cast(FindBucketFor(Elt)) = Elt; + *const_cast(FindBucketFor(Elt)) = const_cast(Elt); } free(OldBuckets); @@ -154,7 +154,7 @@ CurArray = &SmallArray[0]; // Otherwise, allocate new heap space (unless we were the same size) } else { - CurArray = (void**)malloc(sizeof(void*) * (that.CurArraySize+1)); + CurArray = (const void**)malloc(sizeof(void*) * (that.CurArraySize+1)); assert(CurArray && "Failed to allocate memory?"); } @@ -183,9 +183,9 @@ // Otherwise, allocate new heap space (unless we were the same size) } else if (CurArraySize != RHS.CurArraySize) { if (isSmall()) - CurArray = (void**)malloc(sizeof(void*) * (RHS.CurArraySize+1)); + CurArray = (const void**)malloc(sizeof(void*) * (RHS.CurArraySize+1)); else - CurArray = (void**)realloc(CurArray, sizeof(void*)*(RHS.CurArraySize+1)); + CurArray = (const void**)realloc(CurArray, sizeof(void*)*(RHS.CurArraySize+1)); assert(CurArray && "Failed to allocate memory?"); } From cfr at adobe.com Fri Jul 27 13:20:12 2007 From: cfr at adobe.com (Chuck Rose III) Date: Fri, 27 Jul 2007 18:20:12 -0000 Subject: [llvm-commits] [llvm] r40557 - in /llvm/trunk/win32: ./ Analysis/ Archive/ AsmParser/ Bitcode/ CBackend/ CodeGen/ Configure/ ExecutionEngine/ Fibonacci/ Linker/ Support/ System/ TableGen/ Target/ Transforms/ VMCore/ bugpoint/ llc/ lli/ llvm-ar/ llvm-as/ llvm-bcanalyzer/ llvm-dis/ llvm-ld/ llvm-link/ llvm-nm/ llvm-prof/ llvm-ranlib/ opt/ x86/ Message-ID: <200707271820.l6RIKDeg020765@zion.cs.uiuc.edu> Author: cfr Date: Fri Jul 27 13:20:11 2007 New Revision: 40557 URL: http://llvm.org/viewvc/llvm-project?rev=40557&view=rev Log: Updates to the VStudio project files: 1. Switch from VStudio 2k3 to VStudio 2k5 2. All pdb files now will be placed as $(OutputDir)/$(ProjectName).pdb. This puts them alongside the binaries with the same base name as the binary. If you need to copy the results of your llvm build into another project's tree, this will simplify that process. 3. Recent files added to the tree were added to the proejects within the VStudio project 4. Project build dependency order fixed so that the build can take place in one pass. A generated file was not being built at the correct time, causing a build error in about half the projects until the build was run a second time. Note you will need flex and bison installed an in your path in order to build properly. Modified: llvm/trunk/win32/Analysis/Analysis.vcproj llvm/trunk/win32/Archive/Archive.vcproj llvm/trunk/win32/AsmParser/AsmParser.vcproj llvm/trunk/win32/Bitcode/Bitcode.vcproj llvm/trunk/win32/CBackend/CBackend.vcproj llvm/trunk/win32/CodeGen/CodeGen.vcproj llvm/trunk/win32/Configure/Configure.vcproj llvm/trunk/win32/ExecutionEngine/ExecutionEngine.vcproj llvm/trunk/win32/Fibonacci/Fibonacci.vcproj llvm/trunk/win32/Linker/Linker.vcproj llvm/trunk/win32/Support/Support.vcproj llvm/trunk/win32/System/System.vcproj llvm/trunk/win32/TableGen/TableGen.vcproj llvm/trunk/win32/Target/Target.vcproj llvm/trunk/win32/Transforms/Transforms.vcproj llvm/trunk/win32/VMCore/VMCore.vcproj llvm/trunk/win32/bugpoint/bugpoint.vcproj llvm/trunk/win32/llc/llc.vcproj llvm/trunk/win32/lli/lli.vcproj llvm/trunk/win32/llvm-ar/llvm-ar.vcproj llvm/trunk/win32/llvm-as/llvm-as.vcproj llvm/trunk/win32/llvm-bcanalyzer/llvm-bcanalyzer.vcproj llvm/trunk/win32/llvm-dis/llvm-dis.vcproj llvm/trunk/win32/llvm-ld/llvm-ld.vcproj llvm/trunk/win32/llvm-link/llvm-link.vcproj llvm/trunk/win32/llvm-nm/llvm-nm.vcproj llvm/trunk/win32/llvm-prof/llvm-prof.vcproj llvm/trunk/win32/llvm-ranlib/llvm-ranlib.vcproj llvm/trunk/win32/llvm.sln llvm/trunk/win32/opt/opt.vcproj llvm/trunk/win32/x86/x86.vcproj Modified: llvm/trunk/win32/Analysis/Analysis.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/Analysis/Analysis.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/Analysis/Analysis.vcproj (original) +++ llvm/trunk/win32/Analysis/Analysis.vcproj Fri Jul 27 13:20:11 2007 @@ -1,104 +1,156 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + - - + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/Analysis.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + - + DisableSpecificWarnings="4355,4146,4800" + /> - + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/Analysis.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> @@ -107,174 +159,233 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + + + RelativePath="..\..\lib\Analysis\AliasAnalysisCounter.cpp" + > + RelativePath="..\..\lib\Analysis\AliasAnalysisEvaluator.cpp" + > + RelativePath="..\..\lib\Analysis\AliasDebugger.cpp" + > + RelativePath="..\..\lib\Analysis\AliasSetTracker.cpp" + > + RelativePath="..\..\lib\Analysis\BasicAliasAnalysis.cpp" + > + RelativePath="..\..\lib\Analysis\CFGPrinter.cpp" + > + RelativePath="..\..\lib\Analysis\ConstantFolding.cpp" + > + RelativePath="..\..\lib\Analysis\InstCount.cpp" + > + RelativePath="..\..\lib\Analysis\Interval.cpp" + > + RelativePath="..\..\lib\Analysis\IntervalPartition.cpp" + > + RelativePath="..\..\lib\Analysis\LoadValueNumbering.cpp" + > + RelativePath="..\..\lib\Analysis\LoopInfo.cpp" + > + RelativePath="..\..\lib\Analysis\LoopPass.cpp" + > + RelativePath="..\..\lib\Analysis\MemoryDependenceAnalysis.cpp" + > + RelativePath="..\..\lib\Analysis\PostDominators.cpp" + > + RelativePath="..\..\lib\Analysis\ProfileInfo.cpp" + > + RelativePath="..\..\lib\Analysis\ProfileInfoLoader.cpp" + > + RelativePath="..\..\lib\Analysis\ProfileInfoLoaderPass.cpp" + > + RelativePath="..\..\lib\Analysis\ScalarEvolution.cpp" + > + RelativePath="..\..\lib\Analysis\ScalarEvolutionExpander.cpp" + > + RelativePath="..\..\lib\Analysis\Trace.cpp" + > + RelativePath="..\..\lib\Analysis\ValueNumbering.cpp" + > + > + RelativePath="..\..\lib\Analysis\Ipa\Andersens.cpp" + > + RelativePath="..\..\lib\Analysis\Ipa\CallGraph.cpp" + > + RelativePath="..\..\lib\Analysis\Ipa\CallGraphSCCPass.cpp" + > + RelativePath="..\..\lib\Analysis\Ipa\FindUsedTypes.cpp" + > + RelativePath="..\..\lib\Analysis\Ipa\GlobalsModRef.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\include\llvm\Analysis\AliasAnalysis.h" + > + RelativePath="..\..\include\llvm\Analysis\AliasSetTracker.h" + > + RelativePath="..\..\include\llvm\Analysis\CallGraph.h" + > + RelativePath="..\..\include\llvm\Analysis\CFGPrinter.h" + > + RelativePath="..\..\include\llvm\Analysis\ConstantFolding.h" + > + RelativePath="..\..\include\llvm\Analysis\ConstantsScanner.h" + > + RelativePath="..\..\include\llvm\Analysis\Dominators.h" + > + RelativePath="..\..\include\llvm\Analysis\ET-Forest.h" + > + RelativePath="..\..\include\llvm\Analysis\FindUsedTypes.h" + > + RelativePath="..\..\include\llvm\Analysis\Interval.h" + > + RelativePath="..\..\include\llvm\Analysis\IntervalIterator.h" + > + RelativePath="..\..\include\llvm\Analysis\IntervalPartition.h" + > + RelativePath="..\..\include\llvm\Analysis\LoadValueNumbering.h" + > + RelativePath="..\..\include\llvm\Analysis\LoopInfo.h" + > + RelativePath="..\..\include\llvm\Analysis\LoopPass.h" + > + RelativePath="..\..\include\llvm\Analysis\Passes.h" + > + RelativePath="..\..\include\llvm\Analysis\PostDominators.h" + > + RelativePath="..\..\include\llvm\Analysis\ProfileInfo.h" + > + RelativePath="..\..\include\llvm\Analysis\ProfileInfoLoader.h" + > + RelativePath="..\..\include\llvm\Analysis\ProfileInfoTypes.h" + > + RelativePath="..\..\include\llvm\Analysis\ScalarEvolution.h" + > + RelativePath="..\..\include\llvm\Analysis\ScalarEvolutionExpander.h" + > + RelativePath="..\..\include\llvm\Analysis\ScalarEvolutionExpressions.h" + > + RelativePath="..\..\include\llvm\Analysis\Trace.h" + > + RelativePath="..\..\include\llvm\Analysis\ValueNumbering.h" + > + RelativePath="..\..\include\llvm\Analysis\Verifier.h" + > Modified: llvm/trunk/win32/Archive/Archive.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/Archive/Archive.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/Archive/Archive.vcproj (original) +++ llvm/trunk/win32/Archive/Archive.vcproj Fri Jul 27 13:20:11 2007 @@ -1,104 +1,156 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + - - + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/Archive.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + - - + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/Archive.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> @@ -107,26 +159,33 @@ - - - - - - - - - + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + + + + + + + + + + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\include\llvm\Bytecode\Archive.h" + > Modified: llvm/trunk/win32/AsmParser/AsmParser.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/AsmParser/AsmParser.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/AsmParser/AsmParser.vcproj (original) +++ llvm/trunk/win32/AsmParser/AsmParser.vcproj Fri Jul 27 13:20:11 2007 @@ -1,105 +1,157 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + - - + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/AsmParser.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> - + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> - + Name="VCLibrarianTool" + OutputFile="$(OutDir)/AsmParser.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> @@ -108,71 +160,89 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\lib\AsmParser\Lexer.l" + > + Name="Debug|Win32" + > + CommandLine="..\doflex.cmd debug $(InputName) $(InputPath) " + Outputs="$(InputName).cpp" + /> + Name="Release|Win32" + > + CommandLine="..\doflex.cmd release $(InputName) $(InputPath) " + Outputs="$(InputName).cpp" + /> + RelativePath="..\..\lib\AsmParser\llvmAsmParser.y" + > + Name="Debug|Win32" + > + CommandLine="..\dobison.cmd llvmAsm debug $(InputName) $(InputPath) " + Outputs="$(InputName).cpp;$(InputName).h;$(InputName).output" + /> + Name="Release|Win32" + > + CommandLine="..\dobison.cmd llvmAsm release $(InputName) $(InputPath) " + Outputs="$(InputName).cpp;$(InputName).h;$(InputName).output" + /> + RelativePath="..\..\lib\AsmParser\Parser.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\include\llvm\Assembly\Parser.h" + > + RelativePath="..\..\lib\AsmParser\ParserInternals.h" + > + > + RelativePath="Lexer.cpp" + > + RelativePath="llvmAsmParser.cpp" + > + RelativePath="llvmAsmParser.h" + > Modified: llvm/trunk/win32/Bitcode/Bitcode.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/Bitcode/Bitcode.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/Bitcode/Bitcode.vcproj (original) +++ llvm/trunk/win32/Bitcode/Bitcode.vcproj Fri Jul 27 13:20:11 2007 @@ -1,104 +1,156 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + - - + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/Bitcode.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> - + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> - + Name="VCLibrarianTool" + OutputFile="$(OutDir)/Bitcode.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> @@ -107,52 +159,65 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\lib\Bitcode\Writer\BitcodeWriterPass.cpp" + > + > + RelativePath="..\..\lib\Bitcode\Reader\BitcodeReader.cpp" + > + RelativePath="..\..\lib\Bitcode\Reader\BitcodeReader.h" + > + > + RelativePath="..\..\lib\Bitcode\Writer\BitcodeWriter.cpp" + > + RelativePath="..\..\lib\Bitcode\Writer\ValueEnumerator.cpp" + > + RelativePath="..\..\lib\Bitcode\Writer\ValueEnumerator.h" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\include\llvm\Bitcode\Bitcodes.h" + > + RelativePath="..\..\include\llvm\Bitcode\BitstreamReader.h" + > + RelativePath="..\..\include\llvm\Bitcode\BitstreamWriter.h" + > + RelativePath="..\..\include\llvm\Bitcode\LLVMBitCodes.h" + > + RelativePath="..\..\include\llvm\Bitcode\ReaderWriter.h" + > Modified: llvm/trunk/win32/CBackend/CBackend.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/CBackend/CBackend.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/CBackend/CBackend.vcproj (original) +++ llvm/trunk/win32/CBackend/CBackend.vcproj Fri Jul 27 13:20:11 2007 @@ -1,104 +1,156 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + - - + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/CBackend.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> - + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> - + Name="VCLibrarianTool" + OutputFile="$(OutDir)/CBackend.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> @@ -107,17 +159,21 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\lib\Target\CBackend\CBackend.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\lib\Target\CBackend\CTargetMachine.h" + > Modified: llvm/trunk/win32/CodeGen/CodeGen.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/CodeGen/CodeGen.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/CodeGen/CodeGen.vcproj (original) +++ llvm/trunk/win32/CodeGen/CodeGen.vcproj Fri Jul 27 13:20:11 2007 @@ -1,104 +1,156 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + - - + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/CodeGen.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> - + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> - + Name="VCLibrarianTool" + OutputFile="$(OutDir)/CodeGen.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> @@ -107,243 +159,341 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + + + + + + + + + + + RelativePath="..\..\lib\CodeGen\IfConversion.cpp" + > + RelativePath="..\..\lib\CodeGen\IntrinsicLowering.cpp" + > + RelativePath="..\..\lib\CodeGen\LiveInterval.cpp" + > + RelativePath="..\..\lib\CodeGen\LiveIntervalAnalysis.cpp" + > + RelativePath="..\..\lib\CodeGen\LiveVariables.cpp" + > + RelativePath="..\..\lib\CodeGen\LLVMTargetMachine.cpp" + > + RelativePath="..\..\lib\CodeGen\LowerSubregs.cpp" + > + RelativePath="..\..\lib\CodeGen\MachineBasicBlock.cpp" + > + RelativePath="..\..\lib\CodeGen\MachineFunction.cpp" + > + RelativePath="..\..\lib\CodeGen\MachineInstr.cpp" + > + RelativePath="..\..\lib\CodeGen\MachineModuleInfo.cpp" + > + RelativePath="..\..\lib\CodeGen\MachinePassRegistry.cpp" + > + RelativePath="..\..\lib\CodeGen\MachOWriter.cpp" + > + RelativePath="..\..\lib\CodeGen\MachOWriter.h" + > + RelativePath="..\..\lib\CodeGen\Passes.cpp" + > + RelativePath="..\..\lib\CodeGen\PHIElimination.cpp" + > + RelativePath="..\..\lib\CodeGen\PostRASchedulerList.cpp" + > + RelativePath="..\..\lib\CodeGen\PrologEpilogInserter.cpp" + > + RelativePath="..\..\lib\CodeGen\RegAllocBigBlock.cpp" + > + RelativePath="..\..\lib\CodeGen\RegAllocLinearScan.cpp" + > + RelativePath="..\..\lib\CodeGen\RegAllocLocal.cpp" + > + RelativePath="..\..\lib\CodeGen\RegAllocSimple.cpp" + > + RelativePath="..\..\lib\CodeGen\RegisterScavenging.cpp" + > + RelativePath="..\..\lib\CodeGen\SimpleRegisterCoalescing.cpp" + > + RelativePath="..\..\lib\CodeGen\TwoAddressInstructionPass.cpp" + > + RelativePath="..\..\lib\CodeGen\UnreachableBlockElim.cpp" + > + RelativePath="..\..\lib\CodeGen\VirtRegMap.cpp" + > + > + RelativePath="..\..\lib\CodeGen\SelectionDAG\CallingConvLower.cpp" + > + RelativePath="..\..\lib\CodeGen\SelectionDAG\DAGCombiner.cpp" + > + RelativePath="..\..\lib\CodeGen\SelectionDAG\LegalizeDAG.cpp" + > + RelativePath="..\..\lib\CodeGen\SelectionDAG\ScheduleDAG.cpp" + > + RelativePath="..\..\lib\CodeGen\SelectionDAG\ScheduleDAGList.cpp" + > + RelativePath="..\..\lib\CodeGen\SelectionDAG\ScheduleDAGRRList.cpp" + > + RelativePath="..\..\lib\CodeGen\SelectionDAG\ScheduleDAGSimple.cpp" + > + RelativePath="..\..\lib\CodeGen\SelectionDAG\SelectionDAG.cpp" + > + RelativePath="..\..\lib\CodeGen\SelectionDAG\SelectionDAGISel.cpp" + > + RelativePath="..\..\lib\CodeGen\SelectionDAG\SelectionDAGPrinter.cpp" + > + RelativePath="..\..\lib\CodeGen\SelectionDAG\TargetLowering.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\include\llvm\CodeGen\AsmPrinter.h" + > + RelativePath="..\..\include\llvm\CodeGen\CallingConvLower.h" + > + RelativePath="..\..\include\llvm\CodeGen\DwarfWriter.h" + > + RelativePath="..\..\include\llvm\CodeGen\FileWriters.h" + > + RelativePath="..\..\include\llvm\CodeGen\InstrScheduling.h" + > + RelativePath="..\..\include\llvm\CodeGen\IntrinsicLowering.h" + > + RelativePath="..\..\include\llvm\CodeGen\LinkAllCodegenComponents.h" + > + RelativePath="..\..\include\llvm\CodeGen\LiveInterval.h" + > + RelativePath="..\..\include\llvm\CodeGen\LiveIntervalAnalysis.h" + > + RelativePath="..\..\include\llvm\CodeGen\LiveVariables.h" + > + RelativePath="..\..\include\llvm\CodeGen\MachineBasicBlock.h" + > + RelativePath="..\..\include\llvm\CodeGen\MachineCodeEmitter.h" + > + RelativePath="..\..\include\llvm\CodeGen\MachineConstantPool.h" + > + RelativePath="..\..\include\llvm\CodeGen\MachineFrameInfo.h" + > + RelativePath="..\..\include\llvm\CodeGen\MachineFunction.h" + > + RelativePath="..\..\include\llvm\CodeGen\MachineFunctionPass.h" + > + RelativePath="..\..\include\llvm\CodeGen\MachineInstr.h" + > + RelativePath="..\..\include\llvm\CodeGen\MachineInstrBuilder.h" + > + RelativePath="..\..\include\llvm\CodeGen\MachineJumpTableInfo.h" + > + RelativePath="..\..\include\llvm\CodeGen\MachineLocation.h" + > + RelativePath="..\..\include\llvm\CodeGen\MachineModuleInfo.h" + > + RelativePath="..\..\include\llvm\CodeGen\MachinePassRegistry.h" + > + RelativePath="..\..\include\llvm\CodeGen\MachineRelocation.h" + > + RelativePath="..\..\include\llvm\CodeGen\MachORelocation.h" + > + RelativePath="..\..\include\llvm\CodeGen\Passes.h" + > + RelativePath="..\..\lib\CodeGen\PhysRegTracker.h" + > + RelativePath="..\..\include\llvm\CodeGen\RegAllocRegistry.h" + > + RelativePath="..\..\include\llvm\CodeGen\RegisterScavenging.h" + > + RelativePath="..\..\include\llvm\CodeGen\RuntimeLibcalls.h" + > + RelativePath="..\..\include\llvm\CodeGen\SchedGraphCommon.h" + > + RelativePath="..\..\include\llvm\CodeGen\ScheduleDAG.h" + > + RelativePath="..\..\include\llvm\CodeGen\SchedulerRegistry.h" + > + RelativePath="..\..\include\llvm\CodeGen\SelectionDAG.h" + > + RelativePath="..\..\include\llvm\CodeGen\SelectionDAGISel.h" + > + RelativePath="..\..\include\llvm\CodeGen\SelectionDAGNodes.h" + > + RelativePath="..\..\include\llvm\CodeGen\SSARegMap.h" + > + RelativePath="..\..\include\llvm\CodeGen\ValueTypes.h" + > + RelativePath="..\..\lib\CodeGen\VirtRegMap.h" + > Modified: llvm/trunk/win32/Configure/Configure.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/Configure/Configure.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/Configure/Configure.vcproj (original) +++ llvm/trunk/win32/Configure/Configure.vcproj Fri Jul 27 13:20:11 2007 @@ -1,63 +1,97 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -66,72 +100,85 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\include\llvm\Config\config.h.in" + > + Name="Configure|Win32" + > + Outputs="$(ProjectDir)..\llvm\Config\config.h" + /> + RelativePath="..\..\include\llvm\Support\DataTypes.h.in" + > + Name="Configure|Win32" + > + CommandLine="copy $(InputPath) $(ProjectDir)..\llvm\Support\DataTypes.h " + Outputs="$(ProjectDir)..\llvm\Support\DataTypes.h" + /> + RelativePath="..\..\include\llvm\Adt\hash_map.in" + > + Name="Configure|Win32" + > + CommandLine="copy $(InputPath) $(ProjectDir)..\llvm\ADT\hash_map " + Outputs="$(ProjectDir)..\llvm\ADT\hash_map" + /> + RelativePath="..\..\include\llvm\Adt\hash_set.in" + > + Name="Configure|Win32" + > + CommandLine="copy $(InputPath) $(ProjectDir)..\llvm\ADT\hash_set " + Outputs="$(ProjectDir)..\llvm\ADT\hash_set" + /> + RelativePath="..\..\include\llvm\Adt\iterator.in" + > + Name="Configure|Win32" + > + CommandLine="copy $(InputPath) $(ProjectDir)..\llvm\ADT\iterator " + Outputs="$(ProjectDir)..\llvm\ADT\iterator" + /> + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > Modified: llvm/trunk/win32/ExecutionEngine/ExecutionEngine.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/ExecutionEngine/ExecutionEngine.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/ExecutionEngine/ExecutionEngine.vcproj (original) +++ llvm/trunk/win32/ExecutionEngine/ExecutionEngine.vcproj Fri Jul 27 13:20:11 2007 @@ -1,104 +1,156 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + - - + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/ExecutionEngine.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> - + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> - + Name="VCLibrarianTool" + OutputFile="$(OutDir)/ExecutionEngine.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> @@ -107,67 +159,85 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\lib\ExecutionEngine\ExecutionEngine.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\include\llvm\ExecutionEngine\ExecutionEngine.h" + > + RelativePath="..\..\include\llvm\ExecutionEngine\GenericValue.h" + > + > + RelativePath="..\..\lib\ExecutionEngine\Jit\Intercept.cpp" + > + RelativePath="..\..\lib\ExecutionEngine\Jit\JIT.cpp" + > + RelativePath="..\..\lib\ExecutionEngine\Jit\JIT.h" + > + RelativePath="..\..\lib\ExecutionEngine\Jit\JITEmitter.cpp" + > + RelativePath="..\..\lib\ExecutionEngine\Jit\TargetSelect.cpp" + > + > + RelativePath="..\..\lib\ExecutionEngine\Interpreter\Execution.cpp" + > + RelativePath="..\..\lib\ExecutionEngine\Interpreter\ExternalFunctions.cpp" + > + Name="Debug|Win32" + > + DisableSpecificWarnings="4190" + /> + Name="Release|Win32" + > + DisableSpecificWarnings="4190" + /> + RelativePath="..\..\lib\ExecutionEngine\Interpreter\Interpreter.cpp" + > + RelativePath="..\..\lib\ExecutionEngine\Interpreter\Interpreter.h" + > Modified: llvm/trunk/win32/Fibonacci/Fibonacci.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/Fibonacci/Fibonacci.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/Fibonacci/Fibonacci.vcproj (original) +++ llvm/trunk/win32/Fibonacci/Fibonacci.vcproj Fri Jul 27 13:20:11 2007 @@ -1,123 +1,187 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -126,15 +190,18 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\examples\Fibonacci\fibonacci.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > Modified: llvm/trunk/win32/Linker/Linker.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/Linker/Linker.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/Linker/Linker.vcproj (original) +++ llvm/trunk/win32/Linker/Linker.vcproj Fri Jul 27 13:20:11 2007 @@ -1,104 +1,156 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + - - + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/Linker.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> - + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> - + Name="VCLibrarianTool" + OutputFile="$(OutDir)/Linker.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> @@ -107,26 +159,33 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\lib\Linker\LinkArchives.cpp" + > + RelativePath="..\..\lib\Linker\Linker.cpp" + > + RelativePath="..\..\lib\Linker\LinkItems.cpp" + > + RelativePath="..\..\lib\Linker\LinkModules.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\include\llvm\Linker.h" + > Modified: llvm/trunk/win32/Support/Support.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/Support/Support.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/Support/Support.vcproj (original) +++ llvm/trunk/win32/Support/Support.vcproj Fri Jul 27 13:20:11 2007 @@ -1,105 +1,154 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> - - + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/support.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> - + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> - + Name="VCLibrarianTool" + OutputFile="$(OutDir)/support.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> @@ -108,300 +157,396 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\lib\Support\Allocator.cpp" + > + RelativePath="..\..\lib\Support\Annotation.cpp" + > + RelativePath="..\..\lib\Support\APInt.cpp" + > + RelativePath="..\..\lib\Support\CommandLine.cpp" + > + RelativePath="..\..\lib\Support\ConstantRange.cpp" + > + RelativePath="..\..\lib\Support\Debug.cpp" + > + RelativePath="..\..\lib\Support\Dwarf.cpp" + > + RelativePath="..\..\lib\Support\FileUtilities.cpp" + > + RelativePath="..\..\lib\Support\FoldingSet.cpp" + > + RelativePath="..\..\lib\Support\GraphWriter.cpp" + > + RelativePath="..\..\lib\Support\IsInf.cpp" + > + RelativePath="..\..\lib\Support\IsNAN.cpp" + > + RelativePath="..\..\lib\Support\ManagedStatic.cpp" + > + RelativePath="..\..\lib\Support\MemoryBuffer.cpp" + > + RelativePath="..\..\lib\Support\PluginLoader.cpp" + > + RelativePath="..\..\lib\Support\SlowOperationInformer.cpp" + > + > + Name="VCCLCompilerTool" + /> + ExcludedFromBuild="true" + > + Name="VCCLCompilerTool" + /> + RelativePath="..\..\lib\Support\SmallPtrSet.cpp" + > + RelativePath="..\..\lib\Support\Statistic.cpp" + > + RelativePath="..\..\lib\Support\Streams.cpp" + > + RelativePath="..\..\lib\Support\StringExtras.cpp" + > + RelativePath="..\..\lib\Support\StringMap.cpp" + > + RelativePath="..\..\lib\Support\SystemUtils.cpp" + > + RelativePath="..\..\lib\Support\Timer.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\include\llvm\Support\AIXDataTypesFix.h" + > + RelativePath="..\..\include\llvm\Support\Allocator.h" + > + RelativePath="..\..\include\llvm\Support\Annotation.h" + > + RelativePath="..\..\include\llvm\Support\CallSite.h" + > + RelativePath="..\..\include\llvm\Support\Casting.h" + > + RelativePath="..\..\include\llvm\Support\CFG.h" + > + RelativePath="..\..\include\llvm\Support\CommandLine.h" + > + RelativePath="..\..\include\llvm\Support\Compiler.h" + > + RelativePath="..\..\include\llvm\Support\ConstantRange.h" + > + RelativePath="..\..\include\llvm\Support\DataTypes.h" + > + RelativePath="..\..\include\llvm\Support\Debug.h" + > + RelativePath="..\..\include\llvm\Support\DOTGraphTraits.h" + > + RelativePath="..\..\include\llvm\Support\Dwarf.h" + > + RelativePath="..\..\include\llvm\Support\ELF.h" + > + RelativePath="..\..\include\llvm\Support\FileUtilities.h" + > + RelativePath="..\..\include\llvm\Support\GetElementPtrTypeIterator.h" + > + RelativePath="..\..\include\llvm\Support\GraphWriter.h" + > + RelativePath="..\..\include\llvm\Support\InstIterator.h" + > + RelativePath="..\..\include\llvm\Support\InstVisitor.h" + > + RelativePath="..\..\include\llvm\Support\LeakDetector.h" + > + RelativePath="..\..\include\llvm\Support\Linker.h" + > + RelativePath="..\..\include\llvm\Support\MallocAllocator.h" + > + RelativePath="..\..\include\llvm\Support\ManagedStatic.h" + > + RelativePath="..\..\include\llvm\Support\Mangler.h" + > + RelativePath="..\..\include\llvm\Support\MathExtras.h" + > + RelativePath="..\..\include\llvm\Support\MemoryBuffer.h" + > + RelativePath="..\..\include\llvm\Support\OutputBuffer.h" + > + RelativePath="..\..\include\llvm\Support\PassNameParser.h" + > + RelativePath="..\..\include\llvm\Support\PatternMatch.h" + > + RelativePath="..\..\include\llvm\Support\PluginLoader.h" + > + RelativePath="..\..\include\llvm\Support\SlowOperationInformer.h" + > + RelativePath="..\..\include\llvm\Support\StableBasicBlockNumbering.h" + > + RelativePath="..\..\include\llvm\Support\Streams.h" + > + RelativePath="..\..\include\llvm\Support\SystemUtils.h" + > + RelativePath="..\..\include\llvm\Support\ThreadSupport-NoSupport.h" + > + RelativePath="..\..\include\llvm\Support\ThreadSupport-PThreads.h" + > + RelativePath="..\..\include\llvm\Support\Timer.h" + > + RelativePath="..\..\include\llvm\Support\type_traits.h" + > + RelativePath="..\..\include\llvm\Support\TypeInfo.h" + > + > + RelativePath="..\..\include\llvm\ADT\APInt.h" + > + RelativePath="..\..\include\llvm\ADT\APSInt.h" + > + RelativePath="..\..\include\llvm\ADT\BitVector.h" + > + RelativePath="..\..\include\llvm\Adt\DenseMap.h" + > + RelativePath="..\..\include\llvm\Adt\DepthFirstIterator.h" + > + RelativePath="..\..\include\llvm\Adt\EquivalenceClasses.h" + > + RelativePath="..\..\include\llvm\ADT\FoldingSet.h" + > + RelativePath="..\..\include\llvm\Adt\GraphTraits.h" + > + RelativePath="..\..\include\llvm\Adt\hash_map" + > + RelativePath="..\..\include\llvm\Adt\hash_set" + > + RelativePath="..\..\include\llvm\Adt\HashExtras.h" + > + RelativePath="..\..\include\llvm\Adt\ilist" + > + RelativePath="..\..\include\llvm\ADT\IndexedMap.h" + > + RelativePath="..\..\include\llvm\Adt\iterator" + > + RelativePath="..\..\include\llvm\Adt\PostOrderIterator.h" + > + RelativePath="..\..\include\llvm\Adt\SCCIterator.h" + > + RelativePath="..\..\include\llvm\Adt\SetOperations.h" + > + RelativePath="..\..\include\llvm\Adt\SetVector.h" + > + RelativePath="..\..\include\llvm\ADT\SmallPtrSet.h" + > + RelativePath="..\..\include\llvm\ADT\SmallSet.h" + > + RelativePath="..\..\include\llvm\ADT\SmallString.h" + > + RelativePath="..\..\include\llvm\ADT\SmallVector.h" + > + RelativePath="..\..\include\llvm\Adt\Statistic.h" + > + RelativePath="..\..\include\llvm\Adt\STLExtras.h" + > + RelativePath="..\..\include\llvm\Adt\StringExtras.h" + > + RelativePath="..\..\include\llvm\ADT\StringMap.h" + > + RelativePath="..\..\include\llvm\Adt\Tree.h" + > + RelativePath="..\..\include\llvm\Adt\UniqueVector.h" + > + RelativePath="..\..\include\llvm\Adt\VectorExtras.h" + > Modified: llvm/trunk/win32/System/System.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/System/System.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/System/System.vcproj (original) +++ llvm/trunk/win32/System/System.vcproj Fri Jul 27 13:20:11 2007 @@ -1,105 +1,157 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + - - + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/System.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> - - + Name="VCLibrarianTool" + OutputFile="$(OutDir)/System.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> @@ -108,117 +160,157 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\lib\System\Alarm.cpp" + > + RelativePath="..\..\lib\System\Disassembler.cpp" + > + RelativePath="..\..\lib\System\DynamicLibrary.cpp" + > + RelativePath="..\..\lib\System\IncludeFile.cpp" + > + RelativePath="..\..\lib\System\MappedFile.cpp" + > + RelativePath="..\..\lib\System\Memory.cpp" + > + RelativePath="..\..\lib\System\Mutex.cpp" + > + RelativePath="..\..\lib\System\Path.cpp" + > + RelativePath="..\..\lib\System\Process.cpp" + > + RelativePath="..\..\lib\System\Program.cpp" + > + RelativePath="..\..\lib\System\Signals.cpp" + > + RelativePath="..\..\lib\System\TimeValue.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\include\llvm\System\Alarm.h" + > + RelativePath="..\..\include\llvm\System\Disassembler.h" + > + RelativePath="..\..\include\llvm\System\DynamicLibrary.h" + > + RelativePath="..\..\include\llvm\System\IncludeFile.h" + > + RelativePath="..\..\include\llvm\System\MappedFile.h" + > + RelativePath="..\..\include\llvm\System\Memory.h" + > + RelativePath="..\..\include\llvm\System\Mutex.h" + > + RelativePath="..\..\include\llvm\System\Path.h" + > + RelativePath="..\..\include\llvm\System\Process.h" + > + RelativePath="..\..\include\llvm\System\Program.h" + > + RelativePath="..\..\include\llvm\System\Signals.h" + > + RelativePath="..\..\include\llvm\System\TimeValue.h" + > + > + + + RelativePath="..\..\lib\System\Win32\DynamicLibrary.inc" + > + RelativePath="..\..\lib\System\Win32\MappedFile.inc" + > + RelativePath="..\..\lib\System\Win32\Memory.inc" + > + RelativePath="..\..\lib\System\Win32\Mutex.inc" + > + RelativePath="..\..\lib\System\Win32\Path.inc" + > + RelativePath="..\..\lib\System\Win32\Process.inc" + > + RelativePath="..\..\lib\System\Win32\Program.inc" + > + RelativePath="..\..\lib\System\Win32\Signals.inc" + > + RelativePath="..\..\lib\System\Win32\TimeValue.inc" + > + RelativePath="..\..\lib\System\Win32\Win32.h" + > Modified: llvm/trunk/win32/TableGen/TableGen.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/TableGen/TableGen.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/TableGen/TableGen.vcproj (original) +++ llvm/trunk/win32/TableGen/TableGen.vcproj Fri Jul 27 13:20:11 2007 @@ -1,121 +1,185 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -124,168 +188,213 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\utils\TableGen\AsmWriterEmitter.cpp" + > + RelativePath="..\..\utils\TableGen\CallingConvEmitter.cpp" + > + RelativePath="..\..\utils\TableGen\CodeEmitterGen.cpp" + > + RelativePath="..\..\utils\TableGen\CodeGenTarget.cpp" + > + RelativePath="..\..\utils\TableGen\DAGISelEmitter.cpp" + > + RelativePath="..\..\utils\TableGen\FileLexer.l" + > + Name="Debug|Win32" + > + CommandLine="..\doflex.cmd debug $(InputName) $(InputPath) " + Outputs="$(InputName).cpp" + /> + Name="Release|Win32" + > + CommandLine="..\doflex.cmd release $(InputName) $(InputPath) " + Outputs="$(InputName).cpp" + /> + RelativePath="..\..\utils\TableGen\FileParser.y" + > + Name="Debug|Win32" + > + CommandLine="..\dobison.cmd File debug $(InputName) $(InputPath) " + Outputs="$(InputName).cpp;$(InputName).h;$(InputName).output" + /> + Name="Release|Win32" + > + CommandLine="..\dobison.cmd File release $(InputName) $(InputPath) " + Outputs="$(InputName).cpp;$(InputName).h;$(InputName).output" + /> + RelativePath="..\..\utils\TableGen\InstrInfoEmitter.cpp" + > + RelativePath="..\..\utils\TableGen\IntrinsicEmitter.cpp" + > + RelativePath="..\..\utils\TableGen\Record.cpp" + > + RelativePath="..\..\utils\TableGen\RegisterInfoEmitter.cpp" + > + RelativePath="..\..\utils\TableGen\SubtargetEmitter.cpp" + > + RelativePath="..\..\utils\TableGen\TableGen.cpp" + > + RelativePath="..\..\utils\TableGen\TableGenBackend.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\utils\TableGen\AsmWriterEmitter.h" + > + RelativePath="..\..\utils\TableGen\CallingConvEmitter.h" + > + RelativePath="..\..\utils\TableGen\CodeEmitterGen.h" + > + RelativePath="..\..\utils\TableGen\CodeGenInstruction.h" + > + RelativePath="..\..\utils\TableGen\CodeGenIntrinsics.h" + > + RelativePath="..\..\utils\TableGen\CodeGenRegisters.h" + > + RelativePath="..\..\utils\TableGen\CodeGenTarget.h" + > + RelativePath="..\..\utils\TableGen\DAGISelEmitter.h" + > + RelativePath="..\..\utils\TableGen\InstrInfoEmitter.h" + > + RelativePath="..\..\utils\TableGen\IntrinsicEmitter.h" + > + RelativePath="..\..\utils\TableGen\Record.h" + > + RelativePath="..\..\utils\TableGen\RegisterInfoEmitter.h" + > + RelativePath="..\..\utils\TableGen\SubtargetEmitter.h" + > + RelativePath="..\..\utils\TableGen\TableGenBackend.h" + > + > + RelativePath="FileLexer.cpp" + > + Name="Debug|Win32" + > + PreprocessorDefinitions="YY_SKIP_YYWRAP" + /> + Name="Release|Win32" + > + PreprocessorDefinitions="YY_SKIP_YYWRAP" + /> + RelativePath="fileparser.cpp" + > + Name="Debug|Win32" + > + DisableSpecificWarnings="4065" + /> + Name="Release|Win32" + > + DisableSpecificWarnings="4065" + /> + RelativePath="fileparser.h" + > Modified: llvm/trunk/win32/Target/Target.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/Target/Target.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/Target/Target.vcproj (original) +++ llvm/trunk/win32/Target/Target.vcproj Fri Jul 27 13:20:11 2007 @@ -1,104 +1,156 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + - - + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/Target.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> - + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> - + Name="VCLibrarianTool" + OutputFile="$(OutDir)/Target.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> @@ -107,86 +159,113 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\lib\Target\MRegisterInfo.cpp" + > + RelativePath="..\..\lib\Target\SubtargetFeature.cpp" + > + RelativePath="..\..\lib\Target\TargetAsmInfo.cpp" + > + RelativePath="..\..\lib\Target\TargetData.cpp" + > + RelativePath="..\..\lib\Target\TargetFrameInfo.cpp" + > + RelativePath="..\..\lib\Target\TargetInstrInfo.cpp" + > + RelativePath="..\..\lib\Target\TargetMachine.cpp" + > + RelativePath="..\..\lib\Target\TargetMachineRegistry.cpp" + > + RelativePath="..\..\lib\Target\TargetMachOWriterInfo.cpp" + > + RelativePath="..\..\lib\Target\TargetSubtarget.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\include\llvm\Target\MRegisterInfo.h" + > + RelativePath="..\..\include\llvm\Target\SubtargetFeature.h" + > + RelativePath="..\..\include\llvm\Target\TargetAsmInfo.h" + > + RelativePath="..\..\include\llvm\Target\TargetData.h" + > + RelativePath="..\..\include\llvm\Target\TargetELFWriterInfo.h" + > + RelativePath="..\..\include\llvm\Target\TargetFrameInfo.h" + > + RelativePath="..\..\include\llvm\Target\TargetInstrInfo.h" + > + RelativePath="..\..\include\llvm\Target\TargetInstrItineraries.h" + > + RelativePath="..\..\include\llvm\Target\TargetJITInfo.h" + > + RelativePath="..\..\include\llvm\Target\TargetLowering.h" + > + RelativePath="..\..\include\llvm\Target\TargetMachine.h" + > + RelativePath="..\..\include\llvm\Target\TargetMachineRegistry.h" + > + RelativePath="..\..\include\llvm\Target\TargetMachOWriterInfo.h" + > + RelativePath="..\..\include\llvm\Target\TargetOptions.h" + > + RelativePath="..\..\include\llvm\Target\TargetSubtarget.h" + > Modified: llvm/trunk/win32/Transforms/Transforms.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/Transforms/Transforms.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/Transforms/Transforms.vcproj (original) +++ llvm/trunk/win32/Transforms/Transforms.vcproj Fri Jul 27 13:20:11 2007 @@ -1,104 +1,156 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + - - + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/Transforms.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> - + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> - + Name="VCLibrarianTool" + OutputFile="$(OutDir)/Transforms.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> @@ -107,289 +159,397 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + > + RelativePath="..\..\lib\Transforms\Instrumentation\BlockProfiling.cpp" + > + RelativePath="..\..\lib\Transforms\Instrumentation\EdgeProfiling.cpp" + > + RelativePath="..\..\lib\Transforms\Instrumentation\ProfilingUtils.cpp" + > + RelativePath="..\..\lib\Transforms\Instrumentation\ProfilingUtils.h" + > + RelativePath="..\..\lib\Transforms\Instrumentation\RSProfiling.cpp" + > + RelativePath="..\..\lib\Transforms\Instrumentation\RSProfiling.h" + > + > + RelativePath="..\..\lib\Transforms\Ipo\ArgumentPromotion.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\ConstantMerge.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\DeadArgumentElimination.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\DeadTypeElimination.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\ExtractFunction.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\GlobalDCE.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\GlobalOpt.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\IndMemRemoval.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\Inliner.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\Inliner.h" + > + RelativePath="..\..\lib\Transforms\Ipo\InlineSimple.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\Internalize.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\IPConstantPropagation.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\LoopExtractor.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\LowerSetJmp.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\PruneEH.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\RaiseAllocations.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\SimplifyLibCalls.cpp" + > + RelativePath="..\..\lib\Transforms\IPO\StripDeadPrototypes.cpp" + > + RelativePath="..\..\lib\Transforms\Ipo\StripSymbols.cpp" + > + > + + + + + + + RelativePath="..\..\lib\Transforms\Scalar\CondPropagate.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\ConstantProp.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\CorrelatedExprs.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\DCE.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\DeadStoreElimination.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\FastDSE.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\GCSE.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\GVN.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\GVNPRE.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\IndVarSimplify.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\InstructionCombining.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\LICM.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\LoopRotation.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\LoopStrengthReduce.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\LoopUnroll.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\LoopUnswitch.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\LowerGC.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\LowerPacked.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\PredicateSimplifier.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\Reassociate.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\RedundantLoadElimination.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\Reg2Mem.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\ScalarReplAggregates.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\SCCP.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\SimplifyCFG.cpp" + > + RelativePath="..\..\lib\Transforms\Scalar\TailDuplication.cpp" + > + + + > + > + + + RelativePath="..\..\lib\Transforms\Utils\BreakCriticalEdges.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\CloneFunction.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\CloneModule.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\CloneTrace.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\CodeExtractor.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\DemoteRegToStack.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\InlineCost.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\InlineFunction.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\LCSSA.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\Local.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\LoopSimplify.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\LowerAllocations.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\LowerInvoke.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\LowerSelect.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\LowerSwitch.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\Mem2Reg.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\PromoteMemoryToRegister.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\SimplifyCFG.cpp" + > + Name="Debug|Win32" + > + ObjectFile="$(IntDir)/$(InputName)1.obj" + /> + Name="Release|Win32" + > + ObjectFile="$(IntDir)/$(InputName)1.obj" + /> + RelativePath="..\..\lib\Transforms\Utils\UnifyFunctionExitNodes.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\ValueMapper.cpp" + > + RelativePath="..\..\lib\Transforms\Utils\ValueMapper.h" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\include\llvm\Transforms\Utils\BasicBlockUtils.h" + > + RelativePath="..\..\include\llvm\Transforms\Utils\Cloning.h" + > + RelativePath="..\..\include\llvm\Transforms\Utils\FunctionUtils.h" + > + RelativePath="..\..\include\llvm\Transforms\Instrumentation.h" + > + RelativePath="..\..\include\llvm\Transforms\IPO.h" + > + RelativePath="..\..\include\llvm\Transforms\Utils\Local.h" + > + RelativePath="..\..\include\llvm\Transforms\Utils\PromoteMemToReg.h" + > + RelativePath="..\..\include\llvm\Transforms\Scalar.h" + > + RelativePath="..\..\include\llvm\Transforms\Utils\UnifyFunctionExitNodes.h" + > Modified: llvm/trunk/win32/VMCore/VMCore.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/VMCore/VMCore.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/VMCore/VMCore.vcproj (original) +++ llvm/trunk/win32/VMCore/VMCore.vcproj Fri Jul 27 13:20:11 2007 @@ -1,105 +1,157 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + - - + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/VMCore.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> - + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> - + Name="VCLibrarianTool" + OutputFile="$(OutDir)/VMCore.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> @@ -108,235 +160,303 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\lib\VMCore\AsmWriter.cpp" + > + RelativePath="..\..\lib\VMCore\BasicBlock.cpp" + > + RelativePath="..\..\lib\VMCore\ConstantFold.cpp" + > + RelativePath="..\..\lib\VMCore\Constants.cpp" + > + RelativePath="..\..\lib\VMCore\Dominators.cpp" + > + RelativePath="..\..\lib\VMCore\Function.cpp" + > + RelativePath="..\..\lib\VMCore\Globals.cpp" + > + RelativePath="..\..\lib\VMCore\InlineAsm.cpp" + > + RelativePath="..\..\lib\VMCore\Instruction.cpp" + > + RelativePath="..\..\lib\VMCore\Instructions.cpp" + > + RelativePath="..\..\lib\VMCore\IntrinsicInst.cpp" + > + RelativePath="..\..\include\llvm\Intrinsics.td" + > + Name="Debug|Win32" + > + Outputs="$(SolutionDir)llvm\intrinsics.gen" + /> + Name="Release|Win32" + > + Outputs="$(SolutionDir)llvm\intrinsics.gen" + /> + RelativePath="..\..\lib\VMCore\LeakDetector.cpp" + > + RelativePath="..\..\lib\VMCore\Mangler.cpp" + > + RelativePath="..\..\lib\VMCore\Module.cpp" + > + RelativePath="..\..\lib\VMCore\ModuleProvider.cpp" + > + RelativePath="..\..\lib\VMCore\Pass.cpp" + > + RelativePath="..\..\lib\VMCore\PassManager.cpp" + > + RelativePath="..\..\lib\VMCore\Type.cpp" + > + RelativePath="..\..\lib\VMCore\TypeSymbolTable.cpp" + > + RelativePath="..\..\lib\VMCore\Value.cpp" + > + RelativePath="..\..\lib\VMCore\ValueSymbolTable.cpp" + > + RelativePath="..\..\lib\VMCore\ValueTypes.cpp" + > + RelativePath="..\..\lib\VMCore\Verifier.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\include\llvm\AbstractTypeUser.h" + > + RelativePath="..\..\include\llvm\Argument.h" + > + RelativePath="..\..\include\llvm\Assembly\AsmAnnotationWriter.h" + > + RelativePath="..\..\include\llvm\BasicBlock.h" + > + RelativePath="..\..\include\llvm\CallGraphSCCPass.h" + > + RelativePath="..\..\include\llvm\Constant.h" + > + RelativePath="..\..\lib\VMCore\ConstantFold.h" + > + RelativePath="..\..\include\llvm\Constants.h" + > + RelativePath="..\..\include\llvm\DerivedTypes.h" + > + RelativePath="..\..\include\llvm\Function.h" + > + RelativePath="..\..\include\llvm\GlobalAlias.h" + > + RelativePath="..\..\include\llvm\GlobalValue.h" + > + RelativePath="..\..\include\llvm\GlobalVariable.h" + > + RelativePath="..\..\include\llvm\InlineAsm.h" + > + RelativePath="..\..\include\llvm\InstrTypes.h" + > + RelativePath="..\..\include\llvm\Instruction.def" + > + RelativePath="..\..\include\llvm\Instruction.h" + > + RelativePath="..\..\include\llvm\Instructions.h" + > + RelativePath="..\..\include\llvm\IntrinsicInst.h" + > + RelativePath="..\..\include\llvm\Intrinsics.h" + > + RelativePath="..\..\include\llvm\IntrinsicsPowerPC.td" + > + RelativePath="..\..\include\llvm\IntrinsicsX86.td" + > + RelativePath="..\..\include\llvm\Linker.h" + > + RelativePath="..\..\include\llvm\Module.h" + > + RelativePath="..\..\include\llvm\ModuleProvider.h" + > + RelativePath="..\..\include\llvm\ParameterAttributes.h" + > + RelativePath="..\..\include\llvm\Pass.h" + > + RelativePath="..\..\include\llvm\PassAnalysisSupport.h" + > + RelativePath="..\..\include\llvm\PassManager.h" + > + RelativePath="..\..\include\llvm\PassManagers.h" + > + RelativePath="..\..\include\llvm\PassSupport.h" + > + RelativePath="..\..\include\llvm\Assembly\PrintModulePass.h" + > + RelativePath="..\..\include\llvm\SymbolTableListTraits.h" + > + RelativePath="..\..\lib\VMCore\SymbolTableListTraitsImpl.h" + > + RelativePath="..\..\include\llvm\Type.h" + > + RelativePath="..\..\include\llvm\TypeSymbolTable.h" + > + RelativePath="..\..\include\llvm\Use.h" + > + RelativePath="..\..\include\llvm\User.h" + > + RelativePath="..\..\include\llvm\Value.h" + > + RelativePath="..\..\include\llvm\ValueSymbolTable.h" + > + RelativePath="..\..\include\llvm\Assembly\Writer.h" + > + > + RelativePath="..\llvm\intrinsics.gen" + > Modified: llvm/trunk/win32/bugpoint/bugpoint.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/bugpoint/bugpoint.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/bugpoint/bugpoint.vcproj (original) +++ llvm/trunk/win32/bugpoint/bugpoint.vcproj Fri Jul 27 13:20:11 2007 @@ -1,120 +1,184 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -123,50 +187,65 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\tools\bugpoint\BugDriver.cpp" + > + RelativePath="..\..\tools\bugpoint\bugpoint.cpp" + > + RelativePath="..\..\tools\bugpoint\CrashDebugger.cpp" + > + RelativePath="..\..\tools\bugpoint\ExecutionDriver.cpp" + > + RelativePath="..\..\tools\bugpoint\ExtractFunction.cpp" + > + RelativePath="..\..\tools\bugpoint\FindBugs.cpp" + > + RelativePath="..\..\tools\bugpoint\Miscompilation.cpp" + > + RelativePath="..\..\tools\bugpoint\OptimizerDriver.cpp" + > + RelativePath="..\..\tools\bugpoint\TestPasses.cpp" + > + RelativePath="..\..\tools\bugpoint\ToolRunner.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\tools\bugpoint\BugDriver.h" + > + RelativePath="..\..\tools\bugpoint\ListReducer.h" + > + RelativePath="..\..\tools\bugpoint\ToolRunner.h" + > Modified: llvm/trunk/win32/llc/llc.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/llc/llc.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/llc/llc.vcproj (original) +++ llvm/trunk/win32/llc/llc.vcproj Fri Jul 27 13:20:11 2007 @@ -1,122 +1,186 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -125,15 +189,18 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\tools\llc\llc.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > Modified: llvm/trunk/win32/lli/lli.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/lli/lli.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/lli/lli.vcproj (original) +++ llvm/trunk/win32/lli/lli.vcproj Fri Jul 27 13:20:11 2007 @@ -1,122 +1,186 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -125,15 +189,18 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\tools\lli\lli.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > Modified: llvm/trunk/win32/llvm-ar/llvm-ar.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/llvm-ar/llvm-ar.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/llvm-ar/llvm-ar.vcproj (original) +++ llvm/trunk/win32/llvm-ar/llvm-ar.vcproj Fri Jul 27 13:20:11 2007 @@ -1,120 +1,184 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -123,15 +187,18 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\tools\llvm-ar\llvm-ar.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > Modified: llvm/trunk/win32/llvm-as/llvm-as.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/llvm-as/llvm-as.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/llvm-as/llvm-as.vcproj (original) +++ llvm/trunk/win32/llvm-as/llvm-as.vcproj Fri Jul 27 13:20:11 2007 @@ -1,120 +1,184 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -123,15 +187,18 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\tools\llvm-as\llvm-as.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > Modified: llvm/trunk/win32/llvm-bcanalyzer/llvm-bcanalyzer.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/llvm-bcanalyzer/llvm-bcanalyzer.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/llvm-bcanalyzer/llvm-bcanalyzer.vcproj (original) +++ llvm/trunk/win32/llvm-bcanalyzer/llvm-bcanalyzer.vcproj Fri Jul 27 13:20:11 2007 @@ -1,120 +1,184 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -123,15 +187,18 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\tools\llvm-bcanalyzer\llvm-bcanalyzer.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > Modified: llvm/trunk/win32/llvm-dis/llvm-dis.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/llvm-dis/llvm-dis.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/llvm-dis/llvm-dis.vcproj (original) +++ llvm/trunk/win32/llvm-dis/llvm-dis.vcproj Fri Jul 27 13:20:11 2007 @@ -1,120 +1,184 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -123,15 +187,18 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\tools\llvm-dis\llvm-dis.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > Modified: llvm/trunk/win32/llvm-ld/llvm-ld.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/llvm-ld/llvm-ld.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/llvm-ld/llvm-ld.vcproj (original) +++ llvm/trunk/win32/llvm-ld/llvm-ld.vcproj Fri Jul 27 13:20:11 2007 @@ -1,120 +1,184 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -123,18 +187,22 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\tools\llvm-ld\llvm-ld.cpp" + > + RelativePath="..\..\tools\llvm-ld\Optimize.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > Modified: llvm/trunk/win32/llvm-link/llvm-link.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/llvm-link/llvm-link.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/llvm-link/llvm-link.vcproj (original) +++ llvm/trunk/win32/llvm-link/llvm-link.vcproj Fri Jul 27 13:20:11 2007 @@ -1,120 +1,184 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -123,15 +187,18 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\tools\llvm-link\llvm-link.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > Modified: llvm/trunk/win32/llvm-nm/llvm-nm.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/llvm-nm/llvm-nm.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/llvm-nm/llvm-nm.vcproj (original) +++ llvm/trunk/win32/llvm-nm/llvm-nm.vcproj Fri Jul 27 13:20:11 2007 @@ -1,120 +1,184 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -123,15 +187,18 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\tools\llvm-nm\llvm-nm.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > Modified: llvm/trunk/win32/llvm-prof/llvm-prof.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/llvm-prof/llvm-prof.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/llvm-prof/llvm-prof.vcproj (original) +++ llvm/trunk/win32/llvm-prof/llvm-prof.vcproj Fri Jul 27 13:20:11 2007 @@ -1,120 +1,184 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -123,15 +187,18 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\tools\llvm-prof\llvm-prof.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > Modified: llvm/trunk/win32/llvm-ranlib/llvm-ranlib.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/llvm-ranlib/llvm-ranlib.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/llvm-ranlib/llvm-ranlib.vcproj (original) +++ llvm/trunk/win32/llvm-ranlib/llvm-ranlib.vcproj Fri Jul 27 13:20:11 2007 @@ -1,120 +1,184 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -123,15 +187,18 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\tools\llvm-ranlib\llvm-ranlib.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > Modified: llvm/trunk/win32/llvm.sln URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/llvm.sln?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/llvm.sln (original) +++ llvm/trunk/win32/llvm.sln Fri Jul 27 13:20:11 2007 @@ -1,4 +1,5 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "support", "Support\Support.vcproj", "{28AA9146-3482-4F41-9CC6-407B1D258508}" ProjectSection(ProjectDependencies) = postProject {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} @@ -6,32 +7,33 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TableGen", "TableGen\TableGen.vcproj", "{339C2249-26B6-4172-B484-85653029AF57}" ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fibonacci", "Fibonacci\Fibonacci.vcproj", "{48FB551D-E37E-42EC-BC97-FF7219774867}" ProjectSection(ProjectDependencies) = postProject - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {76295AE8-A083-460E-9F80-6F2B8923264A} = {76295AE8-A083-460E-9F80-6F2B8923264A} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} {144EEBF6-8C9B-4473-B715-2C821666AF6C} = {144EEBF6-8C9B-4473-B715-2C821666AF6C} + {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {76295AE8-A083-460E-9F80-6F2B8923264A} = {76295AE8-A083-460E-9F80-6F2B8923264A} + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} + {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} + {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExecutionEngine", "ExecutionEngine\ExecutionEngine.vcproj", "{76295AE8-A083-460E-9F80-6F2B8923264A}" ProjectSection(ProjectDependencies) = postProject + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VMCore", "VMCore\VMCore.vcproj", "{45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}" ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} {339C2249-26B6-4172-B484-85653029AF57} = {339C2249-26B6-4172-B484-85653029AF57} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Target", "Target\Target.vcproj", "{059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}" @@ -41,6 +43,8 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CodeGen", "CodeGen\CodeGen.vcproj", "{08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}" ProjectSection(ProjectDependencies) = postProject + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {339C2249-26B6-4172-B484-85653029AF57} = {339C2249-26B6-4172-B484-85653029AF57} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} EndProjectSection EndProject @@ -51,70 +55,70 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Analysis", "Analysis\Analysis.vcproj", "{0622E827-8464-489D-8B1C-B0B496F35C08}" ProjectSection(ProjectDependencies) = postProject + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x86", "x86\x86.vcproj", "{144EEBF6-8C9B-4473-B715-2C821666AF6C}" ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {339C2249-26B6-4172-B484-85653029AF57} = {339C2249-26B6-4172-B484-85653029AF57} - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} + {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} + {339C2249-26B6-4172-B484-85653029AF57} = {339C2249-26B6-4172-B484-85653029AF57} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Transforms", "Transforms\Transforms.vcproj", "{C59374C1-9FC0-4147-B836-327DFDC52D99}" ProjectSection(ProjectDependencies) = postProject - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {339C2249-26B6-4172-B484-85653029AF57} = {339C2249-26B6-4172-B484-85653029AF57} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Configure", "Configure\Configure.vcproj", "{19514E48-456C-4B9D-8637-F2285476461E}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lli", "lli\lli.vcproj", "{FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}" ProjectSection(ProjectDependencies) = postProject - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {76295AE8-A083-460E-9F80-6F2B8923264A} = {76295AE8-A083-460E-9F80-6F2B8923264A} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} {144EEBF6-8C9B-4473-B715-2C821666AF6C} = {144EEBF6-8C9B-4473-B715-2C821666AF6C} + {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {76295AE8-A083-460E-9F80-6F2B8923264A} = {76295AE8-A083-460E-9F80-6F2B8923264A} + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} + {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} + {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llc", "llc\llc.vcproj", "{ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}" ProjectSection(ProjectDependencies) = postProject - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} - {057777CD-DED5-46DF-BF9A-6B76DE212549} = {057777CD-DED5-46DF-BF9A-6B76DE212549} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} {144EEBF6-8C9B-4473-B715-2C821666AF6C} = {144EEBF6-8C9B-4473-B715-2C821666AF6C} + {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {057777CD-DED5-46DF-BF9A-6B76DE212549} = {057777CD-DED5-46DF-BF9A-6B76DE212549} + {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} = {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897} + {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} + {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-dis", "llvm-dis\llvm-dis.vcproj", "{B13476BC-30AB-4EA0-BC1E-212C0A459405}" ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-as", "llvm-as\llvm-as.vcproj", "{4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}" ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} {3DC216F5-1DDD-478A-84F8-C124E5C31982} = {3DC216F5-1DDD-478A-84F8-C124E5C31982} + {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AsmParser", "AsmParser\AsmParser.vcproj", "{3DC216F5-1DDD-478A-84F8-C124E5C31982}" @@ -124,254 +128,315 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-ar", "llvm-ar\llvm-ar.vcproj", "{0FF2B75C-49C1-4B49-A44A-531C93000296}" ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-ranlib", "llvm-ranlib\llvm-ranlib.vcproj", "{BB16C7EE-B4ED-4714-B5ED-B775C62A6612}" ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-link", "llvm-link\llvm-link.vcproj", "{5E249789-49E1-4600-B12B-8AD2BB6439B2}" ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {342CF48F-760A-4040-A9A1-7D75AA2471CE} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {342CF48F-760A-4040-A9A1-7D75AA2471CE} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Linker", "Linker\Linker.vcproj", "{342CF48F-760A-4040-A9A1-7D75AA2471CE}" ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CBackend", "CBackend\CBackend.vcproj", "{057777CD-DED5-46DF-BF9A-6B76DE212549}" ProjectSection(ProjectDependencies) = postProject + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opt", "opt\opt.vcproj", "{006D8B41-C3C7-4448-85E1-AF8907E591E5}" ProjectSection(ProjectDependencies) = postProject - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} + {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} + {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-bcanalyzer", "llvm-bcanalyzer\llvm-bcanalyzer.vcproj", "{E0B1E329-BE3E-456D-B372-5F397BE42C84}" ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-ld", "llvm-ld\llvm-ld.vcproj", "{64D8AA46-88DB-41F4-B837-053AE02406B8}" ProjectSection(ProjectDependencies) = postProject - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {342CF48F-760A-4040-A9A1-7D75AA2471CE} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} + {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} + {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {342CF48F-760A-4040-A9A1-7D75AA2471CE} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} + {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-nm", "llvm-nm\llvm-nm.vcproj", "{5FF862CE-80A0-4B48-A80B-68AE325A0432}" ProjectSection(ProjectDependencies) = postProject - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llvm-prof", "llvm-prof\llvm-prof.vcproj", "{ACBE81D9-64B1-4133-823A-807A4E60B454}" ProjectSection(ProjectDependencies) = postProject - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} + {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bugpoint", "bugpoint\bugpoint.vcproj", "{57249192-8E29-4D85-8B7A-FEFF1760B1DA}" ProjectSection(ProjectDependencies) = postProject - {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} - {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} - {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} - {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {342CF48F-760A-4040-A9A1-7D75AA2471CE} - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} - {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} {3DC216F5-1DDD-478A-84F8-C124E5C31982} = {3DC216F5-1DDD-478A-84F8-C124E5C31982} + {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} = {0F8407F3-FA23-4CF1-83A9-DCBE0B361489} + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} + {C59374C1-9FC0-4147-B836-327DFDC52D99} = {C59374C1-9FC0-4147-B836-327DFDC52D99} + {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} = {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4} + {342CF48F-760A-4040-A9A1-7D75AA2471CE} = {342CF48F-760A-4040-A9A1-7D75AA2471CE} + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} = {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62} + {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} + {0622E827-8464-489D-8B1C-B0B496F35C08} = {0622E827-8464-489D-8B1C-B0B496F35C08} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Bitcode", "Bitcode\Bitcode.vcproj", "{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}" ProjectSection(ProjectDependencies) = postProject + {28AA9146-3482-4F41-9CC6-407B1D258508} = {28AA9146-3482-4F41-9CC6-407B1D258508} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Archive", "Archive\Archive.vcproj", "{F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}" ProjectSection(ProjectDependencies) = postProject + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} = {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB} {19514E48-456C-4B9D-8637-F2285476461E} = {19514E48-456C-4B9D-8637-F2285476461E} EndProjectSection EndProject Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectDependencies) = postSolution - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {28AA9146-3482-4F41-9CC6-407B1D258508}.Debug.ActiveCfg = Debug|Win32 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Debug.Build.0 = Debug|Win32 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Release.ActiveCfg = Release|Win32 - {28AA9146-3482-4F41-9CC6-407B1D258508}.Release.Build.0 = Release|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Debug.ActiveCfg = Debug|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Debug.Build.0 = Debug|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Release.ActiveCfg = Release|Win32 - {339C2249-26B6-4172-B484-85653029AF57}.Release.Build.0 = Release|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Debug.ActiveCfg = Debug|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Debug.Build.0 = Debug|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Release.ActiveCfg = Release|Win32 - {48FB551D-E37E-42EC-BC97-FF7219774867}.Release.Build.0 = Release|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Debug.ActiveCfg = Debug|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Debug.Build.0 = Debug|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Release.ActiveCfg = Release|Win32 - {76295AE8-A083-460E-9F80-6F2B8923264A}.Release.Build.0 = Release|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Debug.ActiveCfg = Debug|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Debug.Build.0 = Debug|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Release.ActiveCfg = Release|Win32 - {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Release.Build.0 = Release|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Debug.ActiveCfg = Debug|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Debug.Build.0 = Debug|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Release.ActiveCfg = Release|Win32 - {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Release.Build.0 = Release|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Debug.ActiveCfg = Debug|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Debug.Build.0 = Debug|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Release.ActiveCfg = Release|Win32 - {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Release.Build.0 = Release|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Debug.ActiveCfg = Debug|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Debug.Build.0 = Debug|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Release.ActiveCfg = Release|Win32 - {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Release.Build.0 = Release|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Debug.ActiveCfg = Debug|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Debug.Build.0 = Debug|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Release.ActiveCfg = Release|Win32 - {0622E827-8464-489D-8B1C-B0B496F35C08}.Release.Build.0 = Release|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Debug.ActiveCfg = Debug|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Debug.Build.0 = Debug|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Release.ActiveCfg = Release|Win32 - {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Release.Build.0 = Release|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Debug.ActiveCfg = Debug|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Debug.Build.0 = Debug|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Release.ActiveCfg = Release|Win32 - {C59374C1-9FC0-4147-B836-327DFDC52D99}.Release.Build.0 = Release|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Debug.ActiveCfg = Configure|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Debug.Build.0 = Configure|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Release.ActiveCfg = Configure|Win32 - {19514E48-456C-4B9D-8637-F2285476461E}.Release.Build.0 = Configure|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Debug.ActiveCfg = Debug|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Debug.Build.0 = Debug|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Release.ActiveCfg = Release|Win32 - {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Release.Build.0 = Release|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Debug.ActiveCfg = Debug|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Debug.Build.0 = Debug|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Release.ActiveCfg = Release|Win32 - {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Release.Build.0 = Release|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Debug.ActiveCfg = Debug|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Debug.Build.0 = Debug|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Release.ActiveCfg = Release|Win32 - {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Release.Build.0 = Release|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Debug.ActiveCfg = Debug|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Debug.Build.0 = Debug|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Release.ActiveCfg = Release|Win32 - {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Release.Build.0 = Release|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Debug.ActiveCfg = Debug|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Debug.Build.0 = Debug|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Release.ActiveCfg = Release|Win32 - {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Release.Build.0 = Release|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Debug.ActiveCfg = Debug|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Debug.Build.0 = Debug|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Release.ActiveCfg = Release|Win32 - {0FF2B75C-49C1-4B49-A44A-531C93000296}.Release.Build.0 = Release|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Debug.ActiveCfg = Debug|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Debug.Build.0 = Debug|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Release.ActiveCfg = Release|Win32 - {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Release.Build.0 = Release|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Debug.ActiveCfg = Debug|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Debug.Build.0 = Debug|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Release.ActiveCfg = Release|Win32 - {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Release.Build.0 = Release|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Debug.ActiveCfg = Debug|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Debug.Build.0 = Debug|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Release.ActiveCfg = Release|Win32 - {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Release.Build.0 = Release|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Debug.ActiveCfg = Debug|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Debug.Build.0 = Debug|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Release.ActiveCfg = Release|Win32 - {057777CD-DED5-46DF-BF9A-6B76DE212549}.Release.Build.0 = Release|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Debug.ActiveCfg = Debug|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Debug.Build.0 = Debug|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Release.ActiveCfg = Release|Win32 - {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Release.Build.0 = Release|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Debug.ActiveCfg = Debug|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Debug.Build.0 = Debug|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Release.ActiveCfg = Release|Win32 - {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Release.Build.0 = Release|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Debug.ActiveCfg = Debug|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Debug.Build.0 = Debug|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Release.ActiveCfg = Release|Win32 - {64D8AA46-88DB-41F4-B837-053AE02406B8}.Release.Build.0 = Release|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Debug.ActiveCfg = Debug|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Debug.Build.0 = Debug|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Release.ActiveCfg = Release|Win32 - {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Release.Build.0 = Release|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Debug.ActiveCfg = Debug|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Debug.Build.0 = Debug|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Release.ActiveCfg = Release|Win32 - {ACBE81D9-64B1-4133-823A-807A4E60B454}.Release.Build.0 = Release|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Debug.ActiveCfg = Debug|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Debug.Build.0 = Debug|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Release.ActiveCfg = Release|Win32 - {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Release.Build.0 = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Debug.ActiveCfg = Debug|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Debug.Build.0 = Debug|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Release.ActiveCfg = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Release.Build.0 = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Debug.ActiveCfg = Debug|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Debug.Build.0 = Debug|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Release.ActiveCfg = Release|Win32 - {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Release.Build.0 = Release|Win32 + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Configure|Win32 = Configure|Win32 + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {28AA9146-3482-4F41-9CC6-407B1D258508}.Configure|Win32.ActiveCfg = Release|Win32 + {28AA9146-3482-4F41-9CC6-407B1D258508}.Configure|Win32.Build.0 = Release|Win32 + {28AA9146-3482-4F41-9CC6-407B1D258508}.Debug|Win32.ActiveCfg = Debug|Win32 + {28AA9146-3482-4F41-9CC6-407B1D258508}.Debug|Win32.Build.0 = Debug|Win32 + {28AA9146-3482-4F41-9CC6-407B1D258508}.Release|Win32.ActiveCfg = Release|Win32 + {28AA9146-3482-4F41-9CC6-407B1D258508}.Release|Win32.Build.0 = Release|Win32 + {339C2249-26B6-4172-B484-85653029AF57}.Configure|Win32.ActiveCfg = Release|Win32 + {339C2249-26B6-4172-B484-85653029AF57}.Configure|Win32.Build.0 = Release|Win32 + {339C2249-26B6-4172-B484-85653029AF57}.Debug|Win32.ActiveCfg = Debug|Win32 + {339C2249-26B6-4172-B484-85653029AF57}.Debug|Win32.Build.0 = Debug|Win32 + {339C2249-26B6-4172-B484-85653029AF57}.Release|Win32.ActiveCfg = Release|Win32 + {339C2249-26B6-4172-B484-85653029AF57}.Release|Win32.Build.0 = Release|Win32 + {48FB551D-E37E-42EC-BC97-FF7219774867}.Configure|Win32.ActiveCfg = Release|Win32 + {48FB551D-E37E-42EC-BC97-FF7219774867}.Configure|Win32.Build.0 = Release|Win32 + {48FB551D-E37E-42EC-BC97-FF7219774867}.Debug|Win32.ActiveCfg = Debug|Win32 + {48FB551D-E37E-42EC-BC97-FF7219774867}.Debug|Win32.Build.0 = Debug|Win32 + {48FB551D-E37E-42EC-BC97-FF7219774867}.Release|Win32.ActiveCfg = Release|Win32 + {48FB551D-E37E-42EC-BC97-FF7219774867}.Release|Win32.Build.0 = Release|Win32 + {76295AE8-A083-460E-9F80-6F2B8923264A}.Configure|Win32.ActiveCfg = Release|Win32 + {76295AE8-A083-460E-9F80-6F2B8923264A}.Configure|Win32.Build.0 = Release|Win32 + {76295AE8-A083-460E-9F80-6F2B8923264A}.Debug|Win32.ActiveCfg = Debug|Win32 + {76295AE8-A083-460E-9F80-6F2B8923264A}.Debug|Win32.Build.0 = Debug|Win32 + {76295AE8-A083-460E-9F80-6F2B8923264A}.Release|Win32.ActiveCfg = Release|Win32 + {76295AE8-A083-460E-9F80-6F2B8923264A}.Release|Win32.Build.0 = Release|Win32 + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Configure|Win32.ActiveCfg = Release|Win32 + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Configure|Win32.Build.0 = Release|Win32 + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Debug|Win32.ActiveCfg = Debug|Win32 + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Debug|Win32.Build.0 = Debug|Win32 + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Release|Win32.ActiveCfg = Release|Win32 + {45CD78D7-C5D9-47FE-AD12-F3251EEDAFFB}.Release|Win32.Build.0 = Release|Win32 + {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Configure|Win32.ActiveCfg = Release|Win32 + {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Configure|Win32.Build.0 = Release|Win32 + {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Debug|Win32.ActiveCfg = Debug|Win32 + {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Debug|Win32.Build.0 = Debug|Win32 + {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Release|Win32.ActiveCfg = Release|Win32 + {059FBAB8-C76D-48A0-AA75-3C57BD3EAFE4}.Release|Win32.Build.0 = Release|Win32 + {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Configure|Win32.ActiveCfg = Release|Win32 + {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Configure|Win32.Build.0 = Release|Win32 + {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Debug|Win32.ActiveCfg = Debug|Win32 + {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Debug|Win32.Build.0 = Debug|Win32 + {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Release|Win32.ActiveCfg = Release|Win32 + {08CEB1BB-C2A4-4587-B9A9-AEDB8FB44897}.Release|Win32.Build.0 = Release|Win32 + {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Configure|Win32.ActiveCfg = Release|Win32 + {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Configure|Win32.Build.0 = Release|Win32 + {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Debug|Win32.ActiveCfg = Debug|Win32 + {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Debug|Win32.Build.0 = Debug|Win32 + {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Release|Win32.ActiveCfg = Release|Win32 + {0F8407F3-FA23-4CF1-83A9-DCBE0B361489}.Release|Win32.Build.0 = Release|Win32 + {0622E827-8464-489D-8B1C-B0B496F35C08}.Configure|Win32.ActiveCfg = Release|Win32 + {0622E827-8464-489D-8B1C-B0B496F35C08}.Configure|Win32.Build.0 = Release|Win32 + {0622E827-8464-489D-8B1C-B0B496F35C08}.Debug|Win32.ActiveCfg = Debug|Win32 + {0622E827-8464-489D-8B1C-B0B496F35C08}.Debug|Win32.Build.0 = Debug|Win32 + {0622E827-8464-489D-8B1C-B0B496F35C08}.Release|Win32.ActiveCfg = Release|Win32 + {0622E827-8464-489D-8B1C-B0B496F35C08}.Release|Win32.Build.0 = Release|Win32 + {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Configure|Win32.ActiveCfg = Release|Win32 + {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Configure|Win32.Build.0 = Release|Win32 + {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Debug|Win32.ActiveCfg = Debug|Win32 + {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Debug|Win32.Build.0 = Debug|Win32 + {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Release|Win32.ActiveCfg = Release|Win32 + {144EEBF6-8C9B-4473-B715-2C821666AF6C}.Release|Win32.Build.0 = Release|Win32 + {C59374C1-9FC0-4147-B836-327DFDC52D99}.Configure|Win32.ActiveCfg = Release|Win32 + {C59374C1-9FC0-4147-B836-327DFDC52D99}.Configure|Win32.Build.0 = Release|Win32 + {C59374C1-9FC0-4147-B836-327DFDC52D99}.Debug|Win32.ActiveCfg = Debug|Win32 + {C59374C1-9FC0-4147-B836-327DFDC52D99}.Debug|Win32.Build.0 = Debug|Win32 + {C59374C1-9FC0-4147-B836-327DFDC52D99}.Release|Win32.ActiveCfg = Release|Win32 + {C59374C1-9FC0-4147-B836-327DFDC52D99}.Release|Win32.Build.0 = Release|Win32 + {19514E48-456C-4B9D-8637-F2285476461E}.Configure|Win32.ActiveCfg = Configure|Win32 + {19514E48-456C-4B9D-8637-F2285476461E}.Configure|Win32.Build.0 = Configure|Win32 + {19514E48-456C-4B9D-8637-F2285476461E}.Debug|Win32.ActiveCfg = Configure|Win32 + {19514E48-456C-4B9D-8637-F2285476461E}.Debug|Win32.Build.0 = Configure|Win32 + {19514E48-456C-4B9D-8637-F2285476461E}.Release|Win32.ActiveCfg = Configure|Win32 + {19514E48-456C-4B9D-8637-F2285476461E}.Release|Win32.Build.0 = Configure|Win32 + {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Configure|Win32.ActiveCfg = Release|Win32 + {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Configure|Win32.Build.0 = Release|Win32 + {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Debug|Win32.ActiveCfg = Debug|Win32 + {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Debug|Win32.Build.0 = Debug|Win32 + {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Release|Win32.ActiveCfg = Release|Win32 + {FB6FFD68-C1E4-4DCF-AB02-36D205D5263E}.Release|Win32.Build.0 = Release|Win32 + {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Configure|Win32.ActiveCfg = Release|Win32 + {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Configure|Win32.Build.0 = Release|Win32 + {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Debug|Win32.ActiveCfg = Debug|Win32 + {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Debug|Win32.Build.0 = Debug|Win32 + {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Release|Win32.ActiveCfg = Release|Win32 + {ADE86BDC-B04C-43DF-B9BB-90492C7B14AC}.Release|Win32.Build.0 = Release|Win32 + {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Configure|Win32.ActiveCfg = Release|Win32 + {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Configure|Win32.Build.0 = Release|Win32 + {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Debug|Win32.ActiveCfg = Debug|Win32 + {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Debug|Win32.Build.0 = Debug|Win32 + {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Release|Win32.ActiveCfg = Release|Win32 + {B13476BC-30AB-4EA0-BC1E-212C0A459405}.Release|Win32.Build.0 = Release|Win32 + {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Configure|Win32.ActiveCfg = Release|Win32 + {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Configure|Win32.Build.0 = Release|Win32 + {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Debug|Win32.ActiveCfg = Debug|Win32 + {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Debug|Win32.Build.0 = Debug|Win32 + {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Release|Win32.ActiveCfg = Release|Win32 + {4FBC40A5-E626-4A6C-A9D3-FAE5C28D30CC}.Release|Win32.Build.0 = Release|Win32 + {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Configure|Win32.ActiveCfg = Release|Win32 + {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Configure|Win32.Build.0 = Release|Win32 + {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Debug|Win32.ActiveCfg = Debug|Win32 + {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Debug|Win32.Build.0 = Debug|Win32 + {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Release|Win32.ActiveCfg = Release|Win32 + {3DC216F5-1DDD-478A-84F8-C124E5C31982}.Release|Win32.Build.0 = Release|Win32 + {0FF2B75C-49C1-4B49-A44A-531C93000296}.Configure|Win32.ActiveCfg = Release|Win32 + {0FF2B75C-49C1-4B49-A44A-531C93000296}.Configure|Win32.Build.0 = Release|Win32 + {0FF2B75C-49C1-4B49-A44A-531C93000296}.Debug|Win32.ActiveCfg = Debug|Win32 + {0FF2B75C-49C1-4B49-A44A-531C93000296}.Debug|Win32.Build.0 = Debug|Win32 + {0FF2B75C-49C1-4B49-A44A-531C93000296}.Release|Win32.ActiveCfg = Release|Win32 + {0FF2B75C-49C1-4B49-A44A-531C93000296}.Release|Win32.Build.0 = Release|Win32 + {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Configure|Win32.ActiveCfg = Release|Win32 + {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Configure|Win32.Build.0 = Release|Win32 + {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Debug|Win32.ActiveCfg = Debug|Win32 + {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Debug|Win32.Build.0 = Debug|Win32 + {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Release|Win32.ActiveCfg = Release|Win32 + {BB16C7EE-B4ED-4714-B5ED-B775C62A6612}.Release|Win32.Build.0 = Release|Win32 + {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Configure|Win32.ActiveCfg = Release|Win32 + {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Configure|Win32.Build.0 = Release|Win32 + {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Debug|Win32.ActiveCfg = Debug|Win32 + {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Debug|Win32.Build.0 = Debug|Win32 + {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Release|Win32.ActiveCfg = Release|Win32 + {5E249789-49E1-4600-B12B-8AD2BB6439B2}.Release|Win32.Build.0 = Release|Win32 + {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Configure|Win32.ActiveCfg = Release|Win32 + {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Configure|Win32.Build.0 = Release|Win32 + {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Debug|Win32.ActiveCfg = Debug|Win32 + {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Debug|Win32.Build.0 = Debug|Win32 + {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Release|Win32.ActiveCfg = Release|Win32 + {342CF48F-760A-4040-A9A1-7D75AA2471CE}.Release|Win32.Build.0 = Release|Win32 + {057777CD-DED5-46DF-BF9A-6B76DE212549}.Configure|Win32.ActiveCfg = Release|Win32 + {057777CD-DED5-46DF-BF9A-6B76DE212549}.Configure|Win32.Build.0 = Release|Win32 + {057777CD-DED5-46DF-BF9A-6B76DE212549}.Debug|Win32.ActiveCfg = Debug|Win32 + {057777CD-DED5-46DF-BF9A-6B76DE212549}.Debug|Win32.Build.0 = Debug|Win32 + {057777CD-DED5-46DF-BF9A-6B76DE212549}.Release|Win32.ActiveCfg = Release|Win32 + {057777CD-DED5-46DF-BF9A-6B76DE212549}.Release|Win32.Build.0 = Release|Win32 + {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Configure|Win32.ActiveCfg = Release|Win32 + {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Configure|Win32.Build.0 = Release|Win32 + {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Debug|Win32.ActiveCfg = Debug|Win32 + {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Debug|Win32.Build.0 = Debug|Win32 + {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Release|Win32.ActiveCfg = Release|Win32 + {006D8B41-C3C7-4448-85E1-AF8907E591E5}.Release|Win32.Build.0 = Release|Win32 + {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Configure|Win32.ActiveCfg = Release|Win32 + {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Configure|Win32.Build.0 = Release|Win32 + {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Debug|Win32.ActiveCfg = Debug|Win32 + {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Debug|Win32.Build.0 = Debug|Win32 + {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Release|Win32.ActiveCfg = Release|Win32 + {E0B1E329-BE3E-456D-B372-5F397BE42C84}.Release|Win32.Build.0 = Release|Win32 + {64D8AA46-88DB-41F4-B837-053AE02406B8}.Configure|Win32.ActiveCfg = Release|Win32 + {64D8AA46-88DB-41F4-B837-053AE02406B8}.Configure|Win32.Build.0 = Release|Win32 + {64D8AA46-88DB-41F4-B837-053AE02406B8}.Debug|Win32.ActiveCfg = Debug|Win32 + {64D8AA46-88DB-41F4-B837-053AE02406B8}.Debug|Win32.Build.0 = Debug|Win32 + {64D8AA46-88DB-41F4-B837-053AE02406B8}.Release|Win32.ActiveCfg = Release|Win32 + {64D8AA46-88DB-41F4-B837-053AE02406B8}.Release|Win32.Build.0 = Release|Win32 + {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Configure|Win32.ActiveCfg = Release|Win32 + {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Configure|Win32.Build.0 = Release|Win32 + {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Debug|Win32.ActiveCfg = Debug|Win32 + {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Debug|Win32.Build.0 = Debug|Win32 + {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Release|Win32.ActiveCfg = Release|Win32 + {5FF862CE-80A0-4B48-A80B-68AE325A0432}.Release|Win32.Build.0 = Release|Win32 + {ACBE81D9-64B1-4133-823A-807A4E60B454}.Configure|Win32.ActiveCfg = Release|Win32 + {ACBE81D9-64B1-4133-823A-807A4E60B454}.Configure|Win32.Build.0 = Release|Win32 + {ACBE81D9-64B1-4133-823A-807A4E60B454}.Debug|Win32.ActiveCfg = Debug|Win32 + {ACBE81D9-64B1-4133-823A-807A4E60B454}.Debug|Win32.Build.0 = Debug|Win32 + {ACBE81D9-64B1-4133-823A-807A4E60B454}.Release|Win32.ActiveCfg = Release|Win32 + {ACBE81D9-64B1-4133-823A-807A4E60B454}.Release|Win32.Build.0 = Release|Win32 + {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Configure|Win32.ActiveCfg = Release|Win32 + {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Configure|Win32.Build.0 = Release|Win32 + {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Debug|Win32.ActiveCfg = Debug|Win32 + {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Debug|Win32.Build.0 = Debug|Win32 + {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Release|Win32.ActiveCfg = Release|Win32 + {57249192-8E29-4D85-8B7A-FEFF1760B1DA}.Release|Win32.Build.0 = Release|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Configure|Win32.ActiveCfg = Release|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Configure|Win32.Build.0 = Release|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Debug|Win32.ActiveCfg = Debug|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Debug|Win32.Build.0 = Debug|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Release|Win32.ActiveCfg = Release|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D62}.Release|Win32.Build.0 = Release|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Configure|Win32.ActiveCfg = Release|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Configure|Win32.Build.0 = Release|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Debug|Win32.ActiveCfg = Debug|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Debug|Win32.Build.0 = Debug|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Release|Win32.ActiveCfg = Release|Win32 + {F1EFF064-8869-4DFF-8E1A-CD8F4A5F8D61}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection EndGlobal Modified: llvm/trunk/win32/opt/opt.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/opt/opt.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/opt/opt.vcproj (original) +++ llvm/trunk/win32/opt/opt.vcproj Fri Jul 27 13:20:11 2007 @@ -1,120 +1,184 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + + - - + TargetMachine="1" + /> + Name="VCALinkTool" + /> + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCWebDeploymentTool" + /> + Name="VCPostBuildEventTool" + /> @@ -123,24 +187,30 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\tools\opt\AnalysisWrappers.cpp" + > + RelativePath="..\..\tools\opt\GraphPrinters.cpp" + > + RelativePath="..\..\tools\opt\opt.cpp" + > + RelativePath="..\..\tools\opt\PrintSCC.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > Modified: llvm/trunk/win32/x86/x86.vcproj URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/win32/x86/x86.vcproj?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- llvm/trunk/win32/x86/x86.vcproj (original) +++ llvm/trunk/win32/x86/x86.vcproj Fri Jul 27 13:20:11 2007 @@ -1,105 +1,157 @@ + Keyword="Win32Proj" + > + Name="Win32" + /> + + + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + - - + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> + Name="VCLibrarianTool" + OutputFile="$(OutDir)/x86.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + + + + + + DisableSpecificWarnings="4355,4146,4800" + /> + Name="VCManagedResourceCompilerTool" + /> - + Name="VCResourceCompilerTool" + /> + Name="VCPreLinkEventTool" + /> - + Name="VCLibrarianTool" + OutputFile="$(OutDir)/x86.lib" + /> + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> @@ -108,217 +160,231 @@ + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + RelativePath="..\..\lib\Target\X86\X86.td" + > + Name="Debug|Win32" + > + Outputs="X86GenRegisterNames.inc;X86GenRegisterInfo.h.inc;X86GenRegisterInfo.inc;X86GenInstrNames.inc;X86GenInstrInfo.inc;X86GenAsmWriter.inc;X86GenAsmWriter1.inc;X86GenDAGISel.inc;X86GenSubtarget.inc;X86GenCallingConv.inc" + /> + Name="Release|Win32" + > + Outputs="X86GenRegisterNames.inc;X86GenRegisterInfo.h.inc;X86GenRegisterInfo.inc;X86GenInstrNames.inc;X86GenInstrInfo.inc;X86GenAsmWriter.inc;X86GenAsmWriter1.inc;X86GenDAGISel.inc;X86GenSubtarget.inc;X86GenCallingConv.inc" + /> + RelativePath="..\..\lib\Target\X86\X86AsmPrinter.cpp" + > + RelativePath="..\..\lib\Target\X86\X86ATTAsmPrinter.cpp" + > + RelativePath="..\..\lib\Target\X86\X86CodeEmitter.cpp" + > + RelativePath="..\..\lib\Target\X86\X86COFF.h" + > + RelativePath="..\..\lib\Target\X86\X86ELFWriterInfo.cpp" + > + RelativePath="..\..\lib\Target\X86\X86ELFWriterInfo.h" + > + RelativePath="..\..\lib\Target\X86\X86FloatingPoint.cpp" + > + RelativePath="..\..\lib\Target\X86\X86InstrInfo.cpp" + > + RelativePath="..\..\lib\Target\X86\X86InstrX86-64.td" + > + RelativePath="..\..\lib\Target\X86\X86IntelAsmPrinter.cpp" + > + RelativePath="..\..\lib\Target\X86\X86ISelDAGToDAG.cpp" + > + RelativePath="..\..\lib\Target\X86\X86ISelLowering.cpp" + > + RelativePath="..\..\lib\Target\X86\X86JITInfo.cpp" + > + RelativePath="..\..\lib\Target\X86\X86RegisterInfo.cpp" + > + RelativePath="..\..\lib\Target\X86\X86Subtarget.cpp" + > + RelativePath="..\..\lib\Target\X86\X86TargetAsmInfo.cpp" + > + RelativePath="..\..\lib\Target\X86\X86TargetMachine.cpp" + > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + RelativePath="..\..\lib\Target\Target.td" + > + RelativePath="..\..\lib\Target\TargetSchedule.td" + > + RelativePath="..\..\lib\Target\TargetSelectionDAG.td" + > + RelativePath="..\..\lib\Target\X86\X86.h" + > + RelativePath="..\..\lib\Target\X86\X86ATTAsmPrinter.h" + > + RelativePath="..\..\lib\Target\X86\X86CallingConv.td" + > + RelativePath="..\..\lib\Target\X86\X86InstrBuilder.h" + > + RelativePath="..\..\lib\Target\X86\X86InstrFPStack.td" + > + RelativePath="..\..\lib\Target\X86\X86InstrInfo.h" + > + RelativePath="..\..\lib\Target\X86\X86InstrInfo.td" + > + RelativePath="..\..\lib\Target\X86\X86InstrMMX.td" + > + RelativePath="..\..\lib\Target\X86\X86InstrSSE.td" + > + RelativePath="..\..\lib\Target\X86\X86IntelAsmPrinter.h" + > + RelativePath="..\..\lib\Target\X86\X86ISelLowering.h" + > + RelativePath="..\..\lib\Target\X86\X86JITInfo.h" + > + RelativePath="..\..\lib\Target\X86\X86MachineFunctionInfo.h" + > + RelativePath="..\..\lib\Target\X86\X86RegisterInfo.h" + > + RelativePath="..\..\lib\Target\X86\X86RegisterInfo.td" + > + RelativePath="..\..\lib\Target\X86\X86Subtarget.h" + > + RelativePath="..\..\lib\Target\X86\X86TargetAsmInfo.h" + > + RelativePath="..\..\lib\Target\X86\X86TargetMachine.h" + > + > + RelativePath=".\X86GenAsmWriter.inc" + > + RelativePath=".\X86GenAsmWriter1.inc" + > + RelativePath=".\X86GenDAGISel.inc" + > + RelativePath=".\X86GenInstrInfo.inc" + > + RelativePath=".\X86GenInstrNames.inc" + > + RelativePath=".\X86GenRegisterInfo.h.inc" + > + RelativePath=".\X86GenRegisterInfo.inc" + > + RelativePath=".\X86GenRegisterNames.inc" + > + RelativePath=".\X86GenSubtarget.inc" + > From cfr at adobe.com Fri Jul 27 13:26:35 2007 From: cfr at adobe.com (Chuck Rose III) Date: Fri, 27 Jul 2007 18:26:35 -0000 Subject: [llvm-commits] [llvm] r40558 - in /llvm/trunk: lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp lib/Transforms/Scalar/LoopUnswitch.cpp utils/TableGen/RegisterInfoEmitter.cpp Message-ID: <200707271826.l6RIQZa0021052@zion.cs.uiuc.edu> Author: cfr Date: Fri Jul 27 13:26:35 2007 New Revision: 40558 URL: http://llvm.org/viewvc/llvm-project?rev=40558&view=rev Log: VStudio compiler errors and placing Function*->ExFunc map under ManagedStatic control. This commit fixes two things. One is a pair of VStudio compiler errors stemming from variables which defined within the for loop statement and also within the body of the for loop. I fixed these by renaming one of the two variables. Additionally, I've made the Function*->ExFunc map in ExternalFunctions.cpp a ManagedStatic object, so that cleanup will be done on llvm_shutdown. In repeated uses of the interpreter, where the same Function* address may get used for completely differnet functions, this was causing a crash. Modified: llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp Modified: llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp?rev=40558&r1=40557&r2=40558&view=diff ============================================================================== --- llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp (original) +++ llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Fri Jul 27 13:26:35 2007 @@ -25,6 +25,7 @@ #include "llvm/Support/Streams.h" #include "llvm/System/DynamicLibrary.h" #include "llvm/Target/TargetData.h" +#include "llvm/Support/ManagedStatic.h" #include #include #include @@ -33,7 +34,7 @@ using namespace llvm; typedef GenericValue (*ExFunc)(FunctionType *, const vector &); -static std::map Functions; +static ManagedStatic > Functions; static std::map FuncNames; static Interpreter *TheInterpreter; @@ -80,7 +81,7 @@ FnPtr = (ExFunc)(intptr_t) sys::DynamicLibrary::SearchForAddressOfSymbol(F->getName()); if (FnPtr != 0) - Functions.insert(std::make_pair(F, FnPtr)); // Cache for later + Functions->insert(std::make_pair(F, FnPtr)); // Cache for later return FnPtr; } @@ -90,8 +91,8 @@ // Do a lookup to see if the function is in our cache... this should just be a // deferred annotation! - std::map::iterator FI = Functions.find(F); - ExFunc Fn = (FI == Functions.end()) ? lookupFunction(F) : FI->second; + std::map::iterator FI = Functions->find(F); + ExFunc Fn = (FI == Functions->end()) ? lookupFunction(F) : FI->second; if (Fn == 0) { cerr << "Tried to execute an unknown external function: " << F->getType()->getDescription() << " " << F->getName() << "\n"; Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=40558&r1=40557&r2=40558&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Fri Jul 27 13:26:35 2007 @@ -482,9 +482,9 @@ for (DominanceFrontier::DomSetType::iterator I = S.begin(), E = S.end(); I != E; ++I) { BasicBlock *BB = *I; - DenseMap::iterator I = VM.find(BB); - if (I != VM.end()) - NewDFSet.insert(cast(I->second)); + DenseMap::iterator IDM = VM.find(BB); + if (IDM != VM.end()) + NewDFSet.insert(cast(IDM->second)); else NewDFSet.insert(BB); } Modified: llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp?rev=40558&r1=40557&r2=40558&view=diff ============================================================================== --- llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp (original) +++ llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp Fri Jul 27 13:26:35 2007 @@ -240,8 +240,8 @@ bool Empty = true; - for (unsigned subrc = 0, e2 = RC.SubRegClasses.size(); - subrc != e2; ++subrc) { + for (unsigned subrc = 0, subrcMax = RC.SubRegClasses.size(); + subrc != subrcMax; ++subrc) { unsigned rc2 = 0, e2 = RegisterClasses.size(); for (; rc2 != e2; ++rc2) { const CodeGenRegisterClass &RC2 = RegisterClasses[rc2]; From isanbard at gmail.com Fri Jul 27 13:31:37 2007 From: isanbard at gmail.com (Bill Wendling) Date: Fri, 27 Jul 2007 18:31:37 -0000 Subject: [llvm-commits] [llvm-gcc-4.0] r40559 - /llvm-gcc-4.0/trunk/gcc/config/rs6000/t-darwin8 Message-ID: <200707271831.l6RIVbQ5021497@zion.cs.uiuc.edu> Author: void Date: Fri Jul 27 13:31:37 2007 New Revision: 40559 URL: http://llvm.org/viewvc/llvm-project?rev=40559&view=rev Log: Fix for: llvm gcc bootstrap does not install ppc64 specific bits This adds the correct libraries to the ppc64 subdirectory. Modified: llvm-gcc-4.0/trunk/gcc/config/rs6000/t-darwin8 Modified: llvm-gcc-4.0/trunk/gcc/config/rs6000/t-darwin8 URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/config/rs6000/t-darwin8?rev=40559&r1=40558&r2=40559&view=diff ============================================================================== --- llvm-gcc-4.0/trunk/gcc/config/rs6000/t-darwin8 (original) +++ llvm-gcc-4.0/trunk/gcc/config/rs6000/t-darwin8 Fri Jul 27 13:31:37 2007 @@ -1,8 +1,4 @@ # APPLE LOCAL file mainline 2005-10-02 # 64-bit libraries can only be built in Darwin 8.x or later. - -# APPLE LOCAL begin LLVM -# FIXME: how do I only disable this for llvm? -# MULTILIB_OPTIONS = m64 -# MULTILIB_DIRNAMES = ppc64 -# APPLE LOCAL end LLVM +MULTILIB_OPTIONS = m64 +MULTILIB_DIRNAMES = ppc64 From rspencer at reidspencer.com Fri Jul 27 13:31:41 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Fri, 27 Jul 2007 11:31:41 -0700 Subject: [llvm-commits] [llvm] r40557 - in /llvm/trunk/win32: ./ Analysis/ Archive/ AsmParser/ Bitcode/ CBackend/ CodeGen/ Configure/ ExecutionEngine/ Fibonacci/ Linker/ Support/ System/ TableGen/ Target/ Transforms/ VMCore/ bugpoint/ llc/ lli/ llvm-ar/ llvm-as/ llvm-bcanalyzer/ llvm-dis/ llvm-ld/ llvm-link/ llvm-nm/ llvm-prof/ llvm-ranlib/ opt/ x86/ In-Reply-To: <200707271820.l6RIKDeg020765@zion.cs.uiuc.edu> References: <200707271820.l6RIKDeg020765@zion.cs.uiuc.edu> Message-ID: <1185561101.18084.45.camel@bashful.x10sys.com> Chuck, FYI, as mentioned in the DeveloperPolicy.html, you have commit approval for "trivial" fixes. Stuff like compiler warnings and errors is considered trivial. So there's no need in the future to ask for approval for those variable scope issues with VC++. Just commit them. If there's a lot of them you are fixing, please run the regression tests before committing to make sure nothing broke. More serious patches still need to be reviewed by patch sent to llvm-commits list. Hope that helps. Reid. From dpatel at apple.com Fri Jul 27 13:34:27 2007 From: dpatel at apple.com (Devang Patel) Date: Fri, 27 Jul 2007 18:34:27 -0000 Subject: [llvm-commits] [llvm] r40560 - in /llvm/trunk: include/llvm/Transforms/Utils/InlineCost.h lib/Transforms/IPO/InlineSimple.cpp lib/Transforms/Utils/BasicInliner.cpp lib/Transforms/Utils/InlineCost.cpp Message-ID: <200707271834.l6RIYRwr021606@zion.cs.uiuc.edu> Author: dpatel Date: Fri Jul 27 13:34:27 2007 New Revision: 40560 URL: http://llvm.org/viewvc/llvm-project?rev=40560&view=rev Log: Use SmallPtrSet. Modified: llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp llvm/trunk/lib/Transforms/Utils/InlineCost.cpp Modified: llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h?rev=40560&r1=40559&r2=40560&view=diff ============================================================================== --- llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h (original) +++ llvm/trunk/include/llvm/Transforms/Utils/InlineCost.h Fri Jul 27 13:34:27 2007 @@ -14,7 +14,7 @@ #ifndef INLINECOST_H #define INLINECOST_H -#include +#include "llvm/ADT/SmallPtrSet.h" #include #include @@ -73,7 +73,7 @@ // getInlineCost - The heuristic used to determine if we should inline the // function call or not. // - int getInlineCost(CallSite CS, std::set &NeverInline); + int getInlineCost(CallSite CS, SmallPtrSet &NeverInline); }; } Modified: llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp?rev=40560&r1=40559&r2=40560&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp (original) +++ llvm/trunk/lib/Transforms/IPO/InlineSimple.cpp Fri Jul 27 13:34:27 2007 @@ -23,14 +23,15 @@ #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/IPO/InlinerPass.h" #include "llvm/Transforms/Utils/InlineCost.h" -#include +#include "llvm/ADT/SmallPtrSet.h" using namespace llvm; namespace { class VISIBILITY_HIDDEN SimpleInliner : public Inliner { - std::set NeverInline; // Functions that are never inlined + // Functions that are never inlined + SmallPtrSet NeverInline; InlineCostAnalyzer CA; public: SimpleInliner() : Inliner(&ID) {} Modified: llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp?rev=40560&r1=40559&r2=40560&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/BasicInliner.cpp Fri Jul 27 13:34:27 2007 @@ -23,7 +23,6 @@ #include "llvm/Support/Debug.h" #include "llvm/ADT/SmallPtrSet.h" #include -#include using namespace llvm; @@ -65,7 +64,7 @@ private: TargetData *TD; std::vector Functions; - std::set NeverInline; + SmallPtrSet NeverInline; SmallPtrSet DeadFunctions; InlineCostAnalyzer CA; }; Modified: llvm/trunk/lib/Transforms/Utils/InlineCost.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InlineCost.cpp?rev=40560&r1=40559&r2=40560&view=diff ============================================================================== --- llvm/trunk/lib/Transforms/Utils/InlineCost.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/InlineCost.cpp Fri Jul 27 13:34:27 2007 @@ -141,7 +141,7 @@ // getInlineCost - The heuristic used to determine if we should inline the // function call or not. // -int InlineCostAnalyzer::getInlineCost(CallSite CS, std::set &NeverInline) { +int InlineCostAnalyzer::getInlineCost(CallSite CS, SmallPtrSet &NeverInline) { Instruction *TheCall = CS.getInstruction(); Function *Callee = CS.getCalledFunction(); const Function *Caller = TheCall->getParent()->getParent(); From isanbard at gmail.com Fri Jul 27 13:43:24 2007 From: isanbard at gmail.com (Bill Wendling) Date: Fri, 27 Jul 2007 18:43:24 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40561 - /llvm-gcc-4.2/trunk/gcc/config/rs6000/t-darwin8 Message-ID: <200707271843.l6RIhOI2022028@zion.cs.uiuc.edu> Author: void Date: Fri Jul 27 13:43:24 2007 New Revision: 40561 URL: http://llvm.org/viewvc/llvm-project?rev=40561&view=rev Log: Ported fix from 4.0 branch. Modified: llvm-gcc-4.2/trunk/gcc/config/rs6000/t-darwin8 Modified: llvm-gcc-4.2/trunk/gcc/config/rs6000/t-darwin8 URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/rs6000/t-darwin8?rev=40561&r1=40560&r2=40561&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/config/rs6000/t-darwin8 (original) +++ llvm-gcc-4.2/trunk/gcc/config/rs6000/t-darwin8 Fri Jul 27 13:43:24 2007 @@ -1,7 +1,3 @@ # 64-bit libraries can only be built in Darwin 8.x or later. -# LLVM LOCAL begin -# FIXME: how do I only disable this for llvm? -# MULTILIB_OPTIONS = m64 -# MULTILIB_DIRNAMES = ppc64 -# LLVM LOCAL end - +MULTILIB_OPTIONS = m64 +MULTILIB_DIRNAMES = ppc64 From isanbard at gmail.com Fri Jul 27 13:50:42 2007 From: isanbard at gmail.com (Bill Wendling) Date: Fri, 27 Jul 2007 18:50:42 -0000 Subject: [llvm-commits] [llvm-gcc-4.0] r40562 - /llvm-gcc-4.0/tags/llvm-gcc-1200-04/ Message-ID: <200707271850.l6RIogOp022419@zion.cs.uiuc.edu> Author: void Date: Fri Jul 27 13:50:42 2007 New Revision: 40562 URL: http://llvm.org/viewvc/llvm-project?rev=40562&view=rev Log: Creating llvm-1200-04 branch Added: llvm-gcc-4.0/tags/llvm-gcc-1200-04/ - copied from r40561, llvm-gcc-4.0/trunk/ From isanbard at gmail.com Fri Jul 27 13:50:50 2007 From: isanbard at gmail.com (Bill Wendling) Date: Fri, 27 Jul 2007 18:50:50 -0000 Subject: [llvm-commits] [llvm] r40563 - /llvm/tags/Apple/llvm-1200-04/ Message-ID: <200707271850.l6RIooL4022434@zion.cs.uiuc.edu> Author: void Date: Fri Jul 27 13:50:50 2007 New Revision: 40563 URL: http://llvm.org/viewvc/llvm-project?rev=40563&view=rev Log: Creating llvm-1200-04 branch Added: llvm/tags/Apple/llvm-1200-04/ - copied from r40562, llvm/trunk/ From evan.cheng at apple.com Fri Jul 27 14:07:51 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 27 Jul 2007 12:07:51 -0700 Subject: [llvm-commits] [llvm] r40520 - in /llvm/trunk: include/llvm/CodeGen/ScheduleDAG.h lib/CodeGen/SelectionDAG/ScheduleDAG.cpp In-Reply-To: References: <200707260812.l6Q8CAYc032614@zion.cs.uiuc.edu> <38B3CE02-FD6A-4D84-A79B-4B7BE62D8370@apple.com> <160D8D68-6305-4E82-8D7F-85555872AE57@gmail.com> Message-ID: On Jul 26, 2007, at 11:52 PM, Christopher Lamb wrote: > > On Jul 26, 2007, at 10:28 PM, Evan Cheng wrote: > >> I don't think they are target opcodes. > > Is that a suggestion? In the implementation they are: > > --- llvm/trunk/include/llvm/Target/TargetInstrInfo.h (original) > +++ llvm/trunk/include/llvm/Target/TargetInstrInfo.h Thu Jul 26 > 02:48:21 2007 > @@ -177,7 +177,9 @@ > enum { > PHI = 0, > INLINEASM = 1, > - LABEL = 2 > + LABEL = 2, > + EXTRACT_SUBREG = 3, > + INSERT_SUBREG = 4 > }; > Ah, I see. Although I don't think this is necessary especially since they will be eliminated eventually. Can you treat them the same way as CopyToReg and CopyFromReg? Just add the operands to isel queue and don't select to a new node. If that works, we can remove TargetInstrInfo::EXTRACT_SUBREG, etc. Thanks, Evan >> These are similar to phi, copyfromreg, etc. > > Not quite. The copyfrom/to reg and inlineasm nodes are ISD DAG > nodes and are actually ISel'd in ScheduleDAG to the TargetInstrInfo > types. > >> Target opcodes are those that are target specific, I.e. not shared >> between targets. > > They're part of the low instruction numbers for all targets. > -- > Chris > >> On Jul 26, 2007, at 8:36 PM, Christopher Lamb >> wrote: >> >>> >>> On Jul 26, 2007, at 6:27 PM, Evan Cheng wrote: >>> >>>> >>>> On Jul 26, 2007, at 1:12 AM, Christopher Lamb wrote: >>>> >>>>> /// EmitNode - Generate machine code for an node and needed >>>>> dependencies. >>>>> /// >>>>> void ScheduleDAG::EmitNode(SDNode *Node, >>>>> @@ -436,6 +578,14 @@ >>>>> // If machine instruction >>>>> if (Node->isTargetOpcode()) { >>>>> unsigned Opc = Node->getTargetOpcode(); >>>>> + >>>>> + // Handle subreg insert/extract specially >>>>> + if (Opc == TargetInstrInfo::EXTRACT_SUBREG || >>>>> + Opc == TargetInstrInfo::INSERT_SUBREG) { >>>>> + EmitSubregNode(Node, VRBaseMap); >>>>> + return; >>>>> + } >>>>> + >>>> >>>> Hi Chris, >>>> >>>> Is this right? EXTRACT_SUBREG and INSERT_SUBREG are not target >>>> opcodes. >>> >>> Actually, they are both DAG nodes and target opcodes. ISel lowers >>> the DAG nodes to target opcodes before schedule DAG sees them. >>> -- >>> Christopher Lamb >>> >>> >>> >>> _______________________________________________ >>> 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 > > -- > Christopher Lamb > > > > _______________________________________________ > 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/20070727/2b4fa954/attachment.html From dpatel at apple.com Fri Jul 27 14:13:43 2007 From: dpatel at apple.com (Devang Patel) Date: Fri, 27 Jul 2007 19:13:43 -0000 Subject: [llvm-commits] [llvm] r40564 - /llvm/trunk/lib/VMCore/Dominators.cpp Message-ID: <200707271913.l6RJDhN7023175@zion.cs.uiuc.edu> Author: dpatel Date: Fri Jul 27 14:13:43 2007 New Revision: 40564 URL: http://llvm.org/viewvc/llvm-project?rev=40564&view=rev Log: Fix edge cases in handling basic block split. Modified: llvm/trunk/lib/VMCore/Dominators.cpp Modified: llvm/trunk/lib/VMCore/Dominators.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Dominators.cpp?rev=40564&r1=40563&r2=40564&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/Dominators.cpp (original) +++ llvm/trunk/lib/VMCore/Dominators.cpp Fri Jul 27 14:13:43 2007 @@ -616,7 +616,11 @@ PI != PE; ++PI) PredBlocks.push_back(*PI); - assert(!PredBlocks.empty() && "No predblocks??"); + if (PredBlocks.empty()) + // If NewBB does not have any predecessors then it is a entry block. + // In this case, NewBB and its successor NewBBSucc dominates all + // other blocks. + return; DominatorTree &DT = getAnalysis(); bool NewBBDominatesNewBBSucc = true; @@ -643,8 +647,13 @@ else ++SetI; } - - addBasicBlock(NewBB, Set); + + DominanceFrontier::iterator NewBBI = find(NewBB); + if (NewBBI != end()) { + DominanceFrontier::DomSetType NewBBSet = NewBBI->second; + NewBBSet.insert(Set.begin(), Set.end()); + } else + addBasicBlock(NewBB, Set); } } else { From christopher.lamb at gmail.com Fri Jul 27 14:30:06 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Fri, 27 Jul 2007 12:30:06 -0700 Subject: [llvm-commits] [llvm] r40520 - in /llvm/trunk: include/llvm/CodeGen/ScheduleDAG.h lib/CodeGen/SelectionDAG/ScheduleDAG.cpp In-Reply-To: References: <200707260812.l6Q8CAYc032614@zion.cs.uiuc.edu> <38B3CE02-FD6A-4D84-A79B-4B7BE62D8370@apple.com> <160D8D68-6305-4E82-8D7F-85555872AE57@gmail.com> Message-ID: <5D2348C5-2C4A-4721-81F9-7AFCDA22AAD3@gmail.com> On Jul 27, 2007, at 12:07 PM, Evan Cheng wrote: > > On Jul 26, 2007, at 11:52 PM, Christopher Lamb wrote: > >> >> On Jul 26, 2007, at 10:28 PM, Evan Cheng wrote: >> >>> I don't think they are target opcodes. >> >> Is that a suggestion? In the implementation they are: >> >> --- llvm/trunk/include/llvm/Target/TargetInstrInfo.h (original) >> +++ llvm/trunk/include/llvm/Target/TargetInstrInfo.h Thu Jul 26 >> 02:48:21 2007 >> @@ -177,7 +177,9 @@ >> enum { >> PHI = 0, >> INLINEASM = 1, >> - LABEL = 2 >> + LABEL = 2, >> + EXTRACT_SUBREG = 3, >> + INSERT_SUBREG = 4 >> }; >> > > Ah, I see. Although I don't think this is necessary especially > since they will be eliminated eventually. Can you treat them the > same way as CopyToReg and CopyFromReg? Unfortunately not. CopyToReg and CopyFromReg are selected to native target instructions in SelectionDAG. The point of EXTRACT_SUBREG and INSERT_SUBREG is that they exist until (or even through) register allocation. These machine instructions carry information about which subregister and/or superregister is involved in the operation and cannot be eliminated until that information is no longer needed, either in coalescing or in the LowerSubregs pass. > Just add the operands to isel queue and don't select to a new node. > If that works, we can remove TargetInstrInfo::EXTRACT_SUBREG, etc. This is counter to the approach that we discussed at the meeting at Apple. The decision was to have insert/extract machine instructions to track the information through register allocation. Selecting the operands and not emitting a node would end up with wrong live ranges, as LV/LI have no clue that the vregs involved are aliasing. I've tried an approach that affects something similar to what you describe, it involves using the wrong class for instructions (see http://llvm.org/bugs/show_bug.cgi?id=1350 comment #9). This approach depended on the subreg index on all MachineInstrs which we decided to remove, and IIRC it was decided that this was generally "not the way". -- Chris >>> These are similar to phi, copyfromreg, etc. >> >> Not quite. The copyfrom/to reg and inlineasm nodes are ISD DAG >> nodes and are actually ISel'd in ScheduleDAG to the >> TargetInstrInfo types. >> >>> Target opcodes are those that are target specific, I.e. not >>> shared between targets. >> >> They're part of the low instruction numbers for all targets. >> -- >> Chris >> >>> On Jul 26, 2007, at 8:36 PM, Christopher Lamb >>> wrote: >>> >>>> >>>> On Jul 26, 2007, at 6:27 PM, Evan Cheng wrote: >>>> >>>>> >>>>> On Jul 26, 2007, at 1:12 AM, Christopher Lamb wrote: >>>>> >>>>>> /// EmitNode - Generate machine code for an node and needed >>>>>> dependencies. >>>>>> /// >>>>>> void ScheduleDAG::EmitNode(SDNode *Node, >>>>>> @@ -436,6 +578,14 @@ >>>>>> // If machine instruction >>>>>> if (Node->isTargetOpcode()) { >>>>>> unsigned Opc = Node->getTargetOpcode(); >>>>>> + >>>>>> + // Handle subreg insert/extract specially >>>>>> + if (Opc == TargetInstrInfo::EXTRACT_SUBREG || >>>>>> + Opc == TargetInstrInfo::INSERT_SUBREG) { >>>>>> + EmitSubregNode(Node, VRBaseMap); >>>>>> + return; >>>>>> + } >>>>>> + >>>>> >>>>> Hi Chris, >>>>> >>>>> Is this right? EXTRACT_SUBREG and INSERT_SUBREG are not target >>>>> opcodes. >>>> >>>> Actually, they are both DAG nodes and target opcodes. ISel >>>> lowers the DAG nodes to target opcodes before schedule DAG sees >>>> them. >>>> -- >>>> Christopher Lamb >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 >> >> -- >> Christopher Lamb >> >> >> >> _______________________________________________ >> 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 -- Christopher Lamb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070727/7708b1d8/attachment.html From baldrick at free.fr Fri Jul 27 14:57:41 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 27 Jul 2007 19:57:41 -0000 Subject: [llvm-commits] [llvm] r40565 - /llvm/trunk/docs/LangRef.html Message-ID: <200707271957.l6RJvgbR024410@zion.cs.uiuc.edu> Author: baldrick Date: Fri Jul 27 14:57:41 2007 New Revision: 40565 URL: http://llvm.org/viewvc/llvm-project?rev=40565&view=rev Log: Forget to add 'nest' to the list of parameter attributes. 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=40565&r1=40564&r2=40565&view=diff ============================================================================== --- llvm/trunk/docs/LangRef.html (original) +++ llvm/trunk/docs/LangRef.html Fri Jul 27 14:57:41 2007 @@ -811,6 +811,9 @@
      This function attribute indicates that the function type does not use the unwind instruction and does not allow stack unwinding to propagate through it.
      +
      nest
      +
      This indicates that the parameter can be excised using the + trampoline intrinsics.
      From baldrick at free.fr Fri Jul 27 15:02:49 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 27 Jul 2007 20:02:49 -0000 Subject: [llvm-commits] [llvm] r40566 - in /llvm/trunk/lib/Target/X86: X86CallingConv.td X86CodeEmitter.cpp X86CodeEmitter.h X86ISelLowering.cpp X86ISelLowering.h Message-ID: <200707272002.l6RK2ob7024565@zion.cs.uiuc.edu> Author: baldrick Date: Fri Jul 27 15:02:49 2007 New Revision: 40566 URL: http://llvm.org/viewvc/llvm-project?rev=40566&view=rev Log: Trampoline codegen support for X86-32. Added: llvm/trunk/lib/Target/X86/X86CodeEmitter.h Modified: llvm/trunk/lib/Target/X86/X86CallingConv.td llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.h Modified: llvm/trunk/lib/Target/X86/X86CallingConv.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CallingConv.td?rev=40566&r1=40565&r2=40566&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86CallingConv.td (original) +++ llvm/trunk/lib/Target/X86/X86CallingConv.td Fri Jul 27 15:02:49 2007 @@ -108,6 +108,9 @@ CCIfType<[v8i8, v4i16, v2i32, v1i64], CCAssignToReg<[RDI, RSI, RDX, RCX, R8 , R9 ]>>, + // The 'nest' parameter, if any, is passed in R10. + CCIfNest>, + // Integer/FP values get stored in stack slots that are 8 bytes in size and // 8-byte aligned if there are no more registers to hold them. CCIfType<[i32, i64, f32, f64], CCAssignToStack<8, 8>>, @@ -150,11 +153,14 @@ def CC_X86_32_C : CallingConv<[ // Promote i8/i16 arguments to i32. CCIfType<[i8, i16], CCPromoteToType>, - + + // The 'nest' parameter, if any, is passed in ECX. + CCIfNest>, + // The first 3 integer arguments, if marked 'inreg' and if the call is not // a vararg call, are passed in integer registers. CCIfNotVarArg>>>, - + // Otherwise, same as everything else. CCDelegateTo ]>; @@ -163,10 +169,13 @@ def CC_X86_32_FastCall : CallingConv<[ // Promote i8/i16 arguments to i32. CCIfType<[i8, i16], CCPromoteToType>, - + + // The 'nest' parameter, if any, is passed in EAX. + CCIfNest>, + // The first 2 integer arguments are passed in ECX/EDX CCIfType<[i32], CCAssignToReg<[ECX, EDX]>>, - + // Otherwise, same as everything else. CCDelegateTo ]>; Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp?rev=40566&r1=40565&r2=40566&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Fri Jul 27 15:02:49 2007 @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #define DEBUG_TYPE "x86-emitter" +#include "X86CodeEmitter.h" #include "X86InstrInfo.h" #include "X86Subtarget.h" #include "X86TargetMachine.h" @@ -192,14 +193,6 @@ MCE.emitWordLE(0); // The relocated value will be added to the displacement } -/// N86 namespace - Native X86 Register numbers... used by X86 backend. -/// -namespace N86 { - enum { - EAX = 0, ECX = 1, EDX = 2, EBX = 3, ESP = 4, EBP = 5, ESI = 6, EDI = 7 - }; -} - // getX86RegNum - This function maps LLVM register identifiers to their X86 // specific numbering, which is used in various places encoding instructions. // Added: llvm/trunk/lib/Target/X86/X86CodeEmitter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CodeEmitter.h?rev=40566&view=auto ============================================================================== --- llvm/trunk/lib/Target/X86/X86CodeEmitter.h (added) +++ llvm/trunk/lib/Target/X86/X86CodeEmitter.h Fri Jul 27 15:02:49 2007 @@ -0,0 +1,25 @@ +//===-- X86CodeEmitter.h - X86 DAG Lowering Interface -----------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by Duncan Sands and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines utilities for X86 code emission. +// +//===----------------------------------------------------------------------===// + +#ifndef X86CODEEMITTER_H +#define X86CODEEMITTER_H + +/// N86 namespace - Native X86 Register numbers... used by X86 backend. +/// +namespace N86 { + enum { + EAX = 0, ECX = 1, EDX = 2, EBX = 3, ESP = 4, EBP = 5, ESI = 6, EDI = 7 + }; +} + +#endif // X86CODEEMITTER_H Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=40566&r1=40565&r2=40566&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Fri Jul 27 15:02:49 2007 @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "X86.h" +#include "X86CodeEmitter.h" #include "X86InstrBuilder.h" #include "X86ISelLowering.h" #include "X86MachineFunctionInfo.h" @@ -34,6 +35,7 @@ #include "llvm/Support/MathExtras.h" #include "llvm/Target/TargetOptions.h" #include "llvm/ADT/StringExtras.h" +#include "llvm/ParameterAttributes.h" using namespace llvm; X86TargetLowering::X86TargetLowering(TargetMachine &TM) @@ -244,6 +246,10 @@ setExceptionSelectorRegister(X86::EDX); } + setOperationAction(ISD::ADJUST_TRAMP, MVT::i32, Expand); + setOperationAction(ISD::ADJUST_TRAMP, MVT::i64, Expand); + setOperationAction(ISD::TRAMPOLINE, MVT::Other, Custom); + // VASTART needs to be custom lowered to use the VarArgsFrameIndex setOperationAction(ISD::VASTART , MVT::Other, Custom); setOperationAction(ISD::VAARG , MVT::Other, Expand); @@ -4265,6 +4271,89 @@ Chain, DAG.getRegister(X86::ECX, getPointerTy())); } +SDOperand X86TargetLowering::LowerTRAMPOLINE(SDOperand Op, + SelectionDAG &DAG) { + SDOperand Root = Op.getOperand(0); + SDOperand Trmp = Op.getOperand(1); // trampoline + SDOperand FPtr = Op.getOperand(2); // nested function + SDOperand Nest = Op.getOperand(3); // 'nest' parameter value + + SrcValueSDNode *TrmpSV = cast(Op.getOperand(4)); + + if (Subtarget->is64Bit()) { + return SDOperand(); // not yet supported + } else { + Function *Func = (Function *) + cast(cast(Op.getOperand(5))->getValue()); + unsigned CC = Func->getCallingConv(); + unsigned char NestReg; + + switch (CC) { + default: + assert(0 && "Unsupported calling convention"); + case CallingConv::C: + case CallingConv::Fast: + case CallingConv::X86_StdCall: { + // Pass 'nest' parameter in ECX. + // Must be kept in sync with X86CallingConv.td + NestReg = N86::ECX; + + // Check that ECX wasn't needed by an 'inreg' parameter. + const FunctionType *FTy = Func->getFunctionType(); + const ParamAttrsList *Attrs = FTy->getParamAttrs(); + + if (Attrs && !Func->isVarArg()) { + unsigned InRegCount = 0; + unsigned Idx = 1; + + for (FunctionType::param_iterator I = FTy->param_begin(), + E = FTy->param_end(); I != E; ++I, ++Idx) + if (Attrs->paramHasAttr(Idx, ParamAttr::InReg)) + // FIXME: should only count parameters that are lowered to integers. + InRegCount += (getTargetData()->getTypeSizeInBits(*I) + 31) / 32; + + if (InRegCount > 2) { + cerr << "Nest register in use - reduce number of inreg parameters!\n"; + abort(); + } + } + break; + } + case CallingConv::X86_FastCall: + // Pass 'nest' parameter in EAX. + // Must be kept in sync with X86CallingConv.td + NestReg = N86::EAX; + break; + } + + SDOperand OutChains[4]; + SDOperand Addr, Disp; + + Addr = DAG.getNode(ISD::ADD, MVT::i32, Trmp, DAG.getConstant(10, MVT::i32)); + Disp = DAG.getNode(ISD::SUB, MVT::i32, FPtr, Addr); + + const unsigned char MOV32ri = 0xB8; + const unsigned char JMP = 0xE9; + + OutChains[0] = DAG.getStore(Root, DAG.getConstant(MOV32ri|NestReg, MVT::i8), + Trmp, TrmpSV->getValue(), TrmpSV->getOffset()); + + Addr = DAG.getNode(ISD::ADD, MVT::i32, Trmp, DAG.getConstant(1, MVT::i32)); + OutChains[1] = DAG.getStore(Root, Nest, Addr, TrmpSV->getValue(), + TrmpSV->getOffset() + 1, false, 1); + + Addr = DAG.getNode(ISD::ADD, MVT::i32, Trmp, DAG.getConstant(5, MVT::i32)); + OutChains[2] = DAG.getStore(Root, DAG.getConstant(JMP, MVT::i8), Addr, + TrmpSV->getValue() + 5, TrmpSV->getOffset()); + + Addr = DAG.getNode(ISD::ADD, MVT::i32, Trmp, DAG.getConstant(6, MVT::i32)); + OutChains[3] = DAG.getStore(Root, Disp, Addr, TrmpSV->getValue(), + TrmpSV->getOffset() + 6, false, 1); + + return DAG.getNode(ISD::TokenFactor, MVT::Other, OutChains, 4); + } +} + /// LowerOperation - Provide custom lowering hooks for some operations. /// SDOperand X86TargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) { @@ -4306,6 +4395,7 @@ return LowerFRAME_TO_ARGS_OFFSET(Op, DAG); case ISD::DYNAMIC_STACKALLOC: return LowerDYNAMIC_STACKALLOC(Op, DAG); case ISD::EH_RETURN: return LowerEH_RETURN(Op, DAG); + case ISD::TRAMPOLINE: return LowerTRAMPOLINE(Op, DAG); } return SDOperand(); } Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.h?rev=40566&r1=40565&r2=40566&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelLowering.h (original) +++ llvm/trunk/lib/Target/X86/X86ISelLowering.h Fri Jul 27 15:02:49 2007 @@ -423,6 +423,7 @@ SDOperand LowerFRAMEADDR(SDOperand Op, SelectionDAG &DAG); SDOperand LowerFRAME_TO_ARGS_OFFSET(SDOperand Op, SelectionDAG &DAG); SDOperand LowerEH_RETURN(SDOperand Op, SelectionDAG &DAG); + SDOperand LowerTRAMPOLINE(SDOperand Op, SelectionDAG &DAG); }; } From dpatel at apple.com Fri Jul 27 15:06:10 2007 From: dpatel at apple.com (Devang Patel) Date: Fri, 27 Jul 2007 20:06:10 -0000 Subject: [llvm-commits] [llvm] r40567 - in /llvm/trunk: include/llvm/PassManagers.h lib/VMCore/PassManager.cpp Message-ID: <200707272006.l6RK6ArR024662@zion.cs.uiuc.edu> Author: dpatel Date: Fri Jul 27 15:06:09 2007 New Revision: 40567 URL: http://llvm.org/viewvc/llvm-project?rev=40567&view=rev Log: Add facility to dump pass manager structure to make it easier to understand failure. Modified: llvm/trunk/include/llvm/PassManagers.h llvm/trunk/lib/VMCore/PassManager.cpp Modified: llvm/trunk/include/llvm/PassManagers.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassManagers.h?rev=40567&r1=40566&r2=40567&view=diff ============================================================================== --- llvm/trunk/include/llvm/PassManagers.h (original) +++ llvm/trunk/include/llvm/PassManagers.h Fri Jul 27 15:06:09 2007 @@ -227,10 +227,7 @@ /// Add RequiredPass into list of lower level passes required by pass P. /// RequiredPass is run on the fly by Pass Manager when P requests it /// through getAnalysis interface. - virtual void addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass) { - assert (0 && - "Unable to handle Pass that requires lower level Analysis pass"); - } + virtual void addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass); virtual Pass * getOnTheFlyPass(Pass *P, const PassInfo *PI, Function &F) { assert (0 && "Unable to find on the fly pass"); Modified: llvm/trunk/lib/VMCore/PassManager.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassManager.cpp?rev=40567&r1=40566&r2=40567&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/PassManager.cpp (original) +++ llvm/trunk/lib/VMCore/PassManager.cpp Fri Jul 27 15:06:09 2007 @@ -907,6 +907,18 @@ } } +/// Add RequiredPass into list of lower level passes required by pass P. +/// RequiredPass is run on the fly by Pass Manager when P requests it +/// through getAnalysis interface. +/// This should be handled by specific pass manager. +void PMDataManager::addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass) { + if (TPM) { + TPM->dumpArguments(); + TPM->dumpPasses(); + } + assert (0 && "Unable to handle Pass that requires lower level Analysis pass"); +} + // Destructor PMDataManager::~PMDataManager() { From baldrick at free.fr Fri Jul 27 15:07:03 2007 From: baldrick at free.fr (Duncan Sands) Date: Fri, 27 Jul 2007 22:07:03 +0200 Subject: [llvm-commits] Trampoline support (pointers nested funtions) In-Reply-To: <200707271238.09287.baldrick@free.fr> References: <200707261656.20050.baldrick@free.fr> <9F8C3A52-1E0F-439E-B1F0-46A6E4191833@apple.com> <200707271238.09287.baldrick@free.fr> Message-ID: <200707272207.03563.baldrick@free.fr> Hi Evan, I've committed the patches. X86 support was commit r40566. If you would like me to make any changes please let me know and I will take care of it when I get back from holidays. Best wishes, Duncan. From evan.cheng at apple.com Fri Jul 27 15:28:57 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Fri, 27 Jul 2007 13:28:57 -0700 Subject: [llvm-commits] [llvm] r40520 - in /llvm/trunk: include/llvm/CodeGen/ScheduleDAG.h lib/CodeGen/SelectionDAG/ScheduleDAG.cpp In-Reply-To: <5D2348C5-2C4A-4721-81F9-7AFCDA22AAD3@gmail.com> References: <200707260812.l6Q8CAYc032614@zion.cs.uiuc.edu> <38B3CE02-FD6A-4D84-A79B-4B7BE62D8370@apple.com> <160D8D68-6305-4E82-8D7F-85555872AE57@gmail.com> <5D2348C5-2C4A-4721-81F9-7AFCDA22AAD3@gmail.com> Message-ID: On Jul 27, 2007, at 12:30 PM, Christopher Lamb wrote: > > On Jul 27, 2007, at 12:07 PM, Evan Cheng wrote: > >> >> On Jul 26, 2007, at 11:52 PM, Christopher Lamb wrote: >> >>> >>> On Jul 26, 2007, at 10:28 PM, Evan Cheng wrote: >>> >>>> I don't think they are target opcodes. >>> >>> Is that a suggestion? In the implementation they are: >>> >>> --- llvm/trunk/include/llvm/Target/TargetInstrInfo.h (original) >>> +++ llvm/trunk/include/llvm/Target/TargetInstrInfo.h Thu Jul 26 >>> 02:48:21 2007 >>> @@ -177,7 +177,9 @@ >>> enum { >>> PHI = 0, >>> INLINEASM = 1, >>> - LABEL = 2 >>> + LABEL = 2, >>> + EXTRACT_SUBREG = 3, >>> + INSERT_SUBREG = 4 >>> }; >>> >> >> Ah, I see. Although I don't think this is necessary especially >> since they will be eliminated eventually. Can you treat them the >> same way as CopyToReg and CopyFromReg? > > Unfortunately not. CopyToReg and CopyFromReg are selected to native > target instructions in SelectionDAG. The point of EXTRACT_SUBREG > and INSERT_SUBREG is that they exist until (or even through) > register allocation. These machine instructions carry information > about which subregister and/or superregister is involved in the > operation and cannot be eliminated until that information is no > longer needed, either in coalescing or in the LowerSubregs pass. > >> Just add the operands to isel queue and don't select to a new >> node. If that works, we can remove >> TargetInstrInfo::EXTRACT_SUBREG, etc. > > This is counter to the approach that we discussed at the meeting at > Apple. The decision was to have insert/extract machine instructions > to track the information through register allocation. Selecting the > operands and not emitting a node would end up with wrong live > ranges, as LV/LI have no clue that the vregs involved are aliasing. > I've tried an approach that affects something similar to what you > describe, it involves using the wrong class for instructions (see > http://llvm.org/bugs/show_bug.cgi?id=1350 comment #9). This > approach depended on the subreg index on all MachineInstrs which we > decided to remove, and IIRC it was decided that this was generally > "not the way". Ok, I'd forgotten each MI does need a TargetInstrDescriptor so it cannot reuse ISD::EXTRACT_SUBREG. Never mind. Sorry about the confusion. :-) Evan > > -- > Chris > >>>> These are similar to phi, copyfromreg, etc. >>> >>> Not quite. The copyfrom/to reg and inlineasm nodes are ISD DAG >>> nodes and are actually ISel'd in ScheduleDAG to the >>> TargetInstrInfo types. >>> >>>> Target opcodes are those that are target specific, I.e. not >>>> shared between targets. >>> >>> They're part of the low instruction numbers for all targets. >>> -- >>> Chris >>> >>>> On Jul 26, 2007, at 8:36 PM, Christopher Lamb >>>> wrote: >>>> >>>>> >>>>> On Jul 26, 2007, at 6:27 PM, Evan Cheng wrote: >>>>> >>>>>> >>>>>> On Jul 26, 2007, at 1:12 AM, Christopher Lamb wrote: >>>>>> >>>>>>> /// EmitNode - Generate machine code for an node and needed >>>>>>> dependencies. >>>>>>> /// >>>>>>> void ScheduleDAG::EmitNode(SDNode *Node, >>>>>>> @@ -436,6 +578,14 @@ >>>>>>> // If machine instruction >>>>>>> if (Node->isTargetOpcode()) { >>>>>>> unsigned Opc = Node->getTargetOpcode(); >>>>>>> + >>>>>>> + // Handle subreg insert/extract specially >>>>>>> + if (Opc == TargetInstrInfo::EXTRACT_SUBREG || >>>>>>> + Opc == TargetInstrInfo::INSERT_SUBREG) { >>>>>>> + EmitSubregNode(Node, VRBaseMap); >>>>>>> + return; >>>>>>> + } >>>>>>> + >>>>>> >>>>>> Hi Chris, >>>>>> >>>>>> Is this right? EXTRACT_SUBREG and INSERT_SUBREG are not target >>>>>> opcodes. >>>>> >>>>> Actually, they are both DAG nodes and target opcodes. ISel >>>>> lowers the DAG nodes to target opcodes before schedule DAG sees >>>>> them. >>>>> -- >>>>> Christopher Lamb >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>> >>> -- >>> Christopher Lamb >>> >>> >>> >>> _______________________________________________ >>> 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 > > -- > Christopher Lamb > > > > _______________________________________________ > 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/20070727/7a33ba63/attachment.html From christopher.lamb at gmail.com Sat Jul 28 02:17:31 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Sat, 28 Jul 2007 00:17:31 -0700 Subject: [llvm-commits] Patch for X86 to use subregs Message-ID: This patch changes the X86 back end to use the new subreg operations for appropriate truncate and extend operations. This should allow regression testing of the subreg feature going forward, as it's now used in a public target. The patch passed DejaGnu and all of SingleSource on my x86 machine, but there are changes for x86-64 as well which I haven't been able to test. Output assembly for x86-64 appears sane, but I'd appreciate someone giving the patch a try on their x86-64 system. Other 32-bit x86 testing is also appreciated. Thanks -- Christopher Lamb ? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070728/e47e942d/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: x86_subregs.patch Type: application/octet-stream Size: 16080 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070728/e47e942d/attachment.obj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070728/e47e942d/attachment-0001.html From evan.cheng at apple.com Sat Jul 28 03:48:17 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 28 Jul 2007 01:48:17 -0700 Subject: [llvm-commits] Patch for X86 to use subregs In-Reply-To: References: Message-ID: <922DEBE2-14C9-4A1C-9A3A-1C366DE18B4A@apple.com> Very cool! I need to read it more carefully. But I see you are lowering zext to a single insert_subreg. Is that right? It won't zero out the top part, no? Evan Sent from my iPhone On Jul 28, 2007, at 12:17 AM, Christopher Lamb wrote: > This patch changes the X86 back end to use the new subreg operations > for appropriate truncate and extend operations. This should allow > regression testing of the subreg feature going forward, as it's now > used in a public target. > > The patch passed DejaGnu and all of SingleSource on my x86 machine, > but there are changes for x86-64 as well which I haven't been able > to test. Output assembly for x86-64 appears sane, but I'd appreciate > someone giving the patch a try on their x86-64 system. Other 32-bit > x86 testing is also appreciated. > > Thanks > -- > Christopher Lamb > > > > > _______________________________________________ > 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/20070728/419071da/attachment.html From evan.cheng at apple.com Sat Jul 28 04:08:48 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 28 Jul 2007 02:08:48 -0700 Subject: [llvm-commits] Patch for X86 to use subregs In-Reply-To: References: Message-ID: On Jul 28, 2007, at 12:17 AM, Christopher Lamb wrote: > This patch changes the X86 back end to use the new subreg > operations for appropriate truncate and extend operations. This > should allow regression testing of the subreg feature going > forward, as it's now used in a public target. > > The patch passed DejaGnu and all of SingleSource on my x86 machine, > but there are changes for x86-64 as well which I BTW, please make sure all of MultiSource pass. Also, if it is possible, can you split out the x86-64 as a follow on patch? Thanks, Evan > haven't been able to test. Output assembly for x86-64 appears sane, > but I'd appreciate someone giving the patch a try on their x86-64 > system. Other 32-bit x86 testing is also appreciated. > > Thanks > -- > Christopher Lamb > > > > > _______________________________________________ > 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/20070728/6eae73da/attachment.html From nicholas at mxc.ca Sat Jul 28 11:43:10 2007 From: nicholas at mxc.ca (Nick Lewycky) Date: Sat, 28 Jul 2007 16:43:10 -0000 Subject: [llvm-commits] [llvm] r40569 - /llvm/trunk/test/CFrontend/2007-06-18-SextAttrAggregate.c Message-ID: <200707281643.l6SGhBsX006008@zion.cs.uiuc.edu> Author: nicholas Date: Sat Jul 28 11:43:10 2007 New Revision: 40569 URL: http://llvm.org/viewvc/llvm-project?rev=40569&view=rev Log: Make this explictly signed. Fixes PR1571. Modified: llvm/trunk/test/CFrontend/2007-06-18-SextAttrAggregate.c Modified: llvm/trunk/test/CFrontend/2007-06-18-SextAttrAggregate.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2007-06-18-SextAttrAggregate.c?rev=40569&r1=40568&r2=40569&view=diff ============================================================================== --- llvm/trunk/test/CFrontend/2007-06-18-SextAttrAggregate.c (original) +++ llvm/trunk/test/CFrontend/2007-06-18-SextAttrAggregate.c Sat Jul 28 11:43:10 2007 @@ -6,6 +6,6 @@ long b; }; -void f(struct s a, char *b, char C) { +void f(struct s a, char *b, signed char C) { } From nicholas at mxc.ca Sat Jul 28 12:14:55 2007 From: nicholas at mxc.ca (Nick Lewycky) Date: Sat, 28 Jul 2007 13:14:55 -0400 Subject: [llvm-commits] ScalarEvolution fix for treeadd In-Reply-To: <20070725230000.GB4092@village.us.cray.com> References: <20070725230000.GB4092@village.us.cray.com> Message-ID: <46AB798F.9090605@mxc.ca> Dan Gohman wrote: >>I'm not sure why, but it doesn't seem as promising as the previous test >>I had. Could it be that when comparing the PDF I should ignore blocks >>that are not part of the loop? > > If there are branches from outside the loop to blocks inside the loop > other than the loop header, then the exit branch may not be executed the > same number of times as the loop header. > > Can you identify a testcase that doesn't involve an infinite loop where > the PDF test rejects a loop that the one of the other tests accepts? No, it turns out that the previous test I had was Just Plain Buggy. Dan, we should move this discussion over to PR817. I'll attach the patch there. Nick From rspencer at reidspencer.com Sat Jul 28 12:30:57 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Sat, 28 Jul 2007 17:30:57 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40570 - in /llvm-gcc-4.2/trunk: ModuleInfo.txt build-for-llvm-top.sh Message-ID: <200707281730.l6SHUvQq008008@zion.cs.uiuc.edu> Author: reid Date: Sat Jul 28 12:30:57 2007 New Revision: 40570 URL: http://llvm.org/viewvc/llvm-project?rev=40570&view=rev Log: Make it possible to build from llvm-top. Added: llvm-gcc-4.2/trunk/ModuleInfo.txt llvm-gcc-4.2/trunk/build-for-llvm-top.sh (with props) Added: llvm-gcc-4.2/trunk/ModuleInfo.txt URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/ModuleInfo.txt?rev=40570&view=auto ============================================================================== --- llvm-gcc-4.2/trunk/ModuleInfo.txt (added) +++ llvm-gcc-4.2/trunk/ModuleInfo.txt Sat Jul 28 12:30:57 2007 @@ -0,0 +1,4 @@ +DepModule: llvm +BuildCmd: ./build-for-llvm-top.sh +CleanCmd: cd ../build.llvm-gcc-4.0 ; make clean +InstallCmd: cd ../build.llvm-gcc-4.0 ; make install Added: llvm-gcc-4.2/trunk/build-for-llvm-top.sh URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/build-for-llvm-top.sh?rev=40570&view=auto ============================================================================== --- llvm-gcc-4.2/trunk/build-for-llvm-top.sh (added) +++ llvm-gcc-4.2/trunk/build-for-llvm-top.sh Sat Jul 28 12:30:57 2007 @@ -0,0 +1,43 @@ +#!/bin/sh +# build script for llvm-gcc-4.0 +# +# This file was developed by Reid Spencer and is distributed under the +# University of Illinois Open Source License. See LICENSE.TXT for details. +# +#===------------------------------------------------------------------------===# +# + +# Get the llvm-top library +. ../library.sh + +# Process the arguments +process_arguments "$@" + +# First, see if the build directory is there. If not, create it. +build_dir="$LLVM_TOP/build.llvm-gcc-4.0" +if test ! -d "$build_dir" ; then + mkdir -p "$build_dir" +fi + +# Next, see if we have previously been configured by sensing the presense +# of the config.status scripts +config_status="$build_dir/config.status" +if test ! -d "$config_status" -o "$config_status" -ot "$0" ; then + # We must configure so build a list of configure options + config_options="--prefix=$PREFIX --enable-llvm=$LLVM_TOP/llvm " + config_options="$config_options --program-prefix=llvm-" + config_options="$config_options --enable-languages=c,c++" + if test "$OPTIMIZED" -eq 0 ; then + config_options="$config_options --enable-checking --enable-libstdcxx-debug" + fi + host=`./config.guess` + if test ! -z `echo "$host" | grep 'linux'` ; then + config_options="$config_options --disable-shared" + fi + config_options="$config_options $config_opts" + src_dir=`pwd` + cd "$build_dir" + echo $src_dir/configure $config_options + $src_dir/configure $config_options +fi +make Propchange: llvm-gcc-4.2/trunk/build-for-llvm-top.sh ------------------------------------------------------------------------------ svn:executable = * From asl at math.spbu.ru Sat Jul 28 13:28:31 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Sat, 28 Jul 2007 18:28:31 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40571 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp toplev.c Message-ID: <200707281828.l6SISVJG011048@zion.cs.uiuc.edu> Author: asl Date: Sat Jul 28 13:28:30 2007 New Revision: 40571 URL: http://llvm.org/viewvc/llvm-project?rev=40571&view=rev Log: Minor PCH-related fixes (will be propagated to 4.0 soon): 1. Don't call finish_aliases_2(), when PCH are written 2. Properly initialize LLVM machinery, when PCHs are used to produce another PCHs :) Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp llvm-gcc-4.2/trunk/gcc/toplev.c 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=40571&r1=40570&r2=40571&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Sat Jul 28 13:28:30 2007 @@ -234,7 +234,11 @@ delete PerModulePasses; delete CodeGenPasses; - createOptimizationPasses(); + // Don't run codegen, when we should output PCH + if (!flag_pch_file) + createOptimizationPasses(); + else + llvm_pch_write_init(); } // Read LLVM Types string table Modified: llvm-gcc-4.2/trunk/gcc/toplev.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/toplev.c?rev=40571&r1=40570&r2=40571&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/toplev.c (original) +++ llvm-gcc-4.2/trunk/gcc/toplev.c Sat Jul 28 13:28:30 2007 @@ -1146,8 +1146,16 @@ lang_hooks.decls.final_write_globals (); cgraph_varpool_assemble_pending_decls (); + + /* LLVM LOCAL begin */ +#ifdef ENABLE_LLVM + if (!flag_pch_file) + finish_aliases_2 (); +#else finish_aliases_2 (); - +#endif + /* LLVM LOCAL end */ + /* This must occur after the loop to output deferred functions. Else the coverage initializer would not be emitted if all the functions in this compilation unit were deferred. */ From christopher.lamb at gmail.com Sat Jul 28 13:52:01 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Sat, 28 Jul 2007 11:52:01 -0700 Subject: [llvm-commits] Patch for X86 to use subregs In-Reply-To: <922DEBE2-14C9-4A1C-9A3A-1C366DE18B4A@apple.com> References: <922DEBE2-14C9-4A1C-9A3A-1C366DE18B4A@apple.com> Message-ID: <2C30DFBD-73FF-4CCB-BE4F-469146C7A91C@gmail.com> On Jul 28, 2007, at 1:48 AM, Evan Cheng wrote: > Very cool! I need to read it more carefully. > But I see you are lowering zext to a single insert_subreg. Is that > right? It won't zero out the top part, no? It's only lowering (zext i32 to i64) to an insert_subreg on x86-64 where all writes to 32-bit registers implicitly zero-extend into the upper 32-bits. -- Chris > Sent from my iPhone > > On Jul 28, 2007, at 12:17 AM, Christopher Lamb > wrote: > >> This patch changes the X86 back end to use the new subreg >> operations for appropriate truncate and extend operations. This >> should allow regression testing of the subreg feature going >> forward, as it's now used in a public target. >> >> The patch passed DejaGnu and all of SingleSource on my x86 >> machine, but there are changes for x86-64 as well which I haven't >> been able to test. Output assembly for x86-64 appears sane, but >> I'd appreciate someone giving the patch a try on their x86-64 >> system. Other 32-bit x86 testing is also appreciated. >> >> Thanks >> -- >> Christopher Lamb >> >> >> >> >> _______________________________________________ >> 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 -- Christopher Lamb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070728/4bc050cf/attachment.html From christopher.lamb at gmail.com Sat Jul 28 13:55:58 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Sat, 28 Jul 2007 11:55:58 -0700 Subject: [llvm-commits] Patch for X86 to use subregs In-Reply-To: References: Message-ID: On Jul 28, 2007, at 2:08 AM, Evan Cheng wrote: > > On Jul 28, 2007, at 12:17 AM, Christopher Lamb wrote: > >> This patch changes the X86 back end to use the new subreg >> operations for appropriate truncate and extend operations. This >> should allow regression testing of the subreg feature going >> forward, as it's now used in a public target. >> >> The patch passed DejaGnu and all of SingleSource on my x86 >> machine, but there are changes for x86-64 as well which I > > BTW, please make sure all of MultiSource pass. Ok. > Also, if it is possible, can you split out the x86-64 as a follow > on patch? It's a bit more work, but I think it'd be possible. > Evan > >> haven't been able to test. Output assembly for x86-64 appears >> sane, but I'd appreciate someone giving the patch a try on their >> x86-64 system. Other 32-bit x86 testing is also appreciated. >> >> Thanks >> -- >> Christopher Lamb >> >> >> >> >> _______________________________________________ >> 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 -- Christopher Lamb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070728/258ef24a/attachment.html From christopher.lamb at gmail.com Sat Jul 28 14:03:30 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Sat, 28 Jul 2007 19:03:30 -0000 Subject: [llvm-commits] [llvm] r40572 - /llvm/trunk/lib/Target/X86/X86RegisterInfo.td Message-ID: <200707281903.l6SJ3U5l011912@zion.cs.uiuc.edu> Author: clamb Date: Sat Jul 28 14:03:30 2007 New Revision: 40572 URL: http://llvm.org/viewvc/llvm-project?rev=40572&view=rev Log: Add register info needed to use subreg sets on X86. Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.td Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.td?rev=40572&r1=40571&r2=40572&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86RegisterInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86RegisterInfo.td Sat Jul 28 14:03:30 2007 @@ -163,6 +163,48 @@ def ST7 : Register<"ST(7)">, DwarfRegNum<18>; } + +//===----------------------------------------------------------------------===// +// Subregister Set Definitions... now that we have all of the pieces, define the +// sub registers for each register. +// + +def : SubRegSet<1, [AX, CX, DX, BX, SP, BP, SI, DI, + R8W, R9W, R10W, R11W, R12W, R13W, R14W, R15W], + [AL, CL, DL, BL, SPL, BPL, SIL, DIL, + R8B, R9B, R10B, R11B, R12B, R13B, R14B, R15B]>; + +// It's unclear if this subreg set is safe, given that not all registers +// in the class have an 'H' subreg. +// def : SubRegSet<2, [AX, CX, DX, BX], +// [AH, CH, DH, BH]>; + +def : SubRegSet<1, [EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI, + R8D, R9D, R10D, R11D, R12D, R13D, R14D, R15D], + [AL, CL, DL, BL, SPL, BPL, SIL, DIL, + R8B, R9B, R10B, R11B, R12B, R13B, R14B, R15B]>; + +def : SubRegSet<2, [EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI, + R8D, R9D, R10D, R11D, R12D, R13D, R14D, R15D], + [AX, CX, DX, BX, SP, BP, SI, DI, + R8W, R9W, R10W, R11W, R12W, R13W, R14W, R15W]>; + + +def : SubRegSet<1, [RAX, RCX, RDX, RBX, RSP, RBP, RSI, RDI, + R8, R9, R10, R11, R12, R13, R14, R15], + [AL, CL, DL, BL, SPL, BPL, SIL, DIL, + R8B, R9B, R10B, R11B, R12B, R13B, R14B, R15B]>; + +def : SubRegSet<2, [RAX, RCX, RDX, RBX, RSP, RBP, RSI, RDI, + R8, R9, R10, R11, R12, R13, R14, R15], + [AX, CX, DX, BX, SP, BP, SI, DI, + R8W, R9W, R10W, R11W, R12W, R13W, R14W, R15W]>; + +def : SubRegSet<3, [RAX, RCX, RDX, RBX, RSP, RBP, RSI, RDI, + R8, R9, R10, R11, R12, R13, R14, R15], + [EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI, + R8D, R9D, R10D, R11D, R12D, R13D, R14D, R15D]>; + //===----------------------------------------------------------------------===// // Register Class Definitions... now that we have all of the pieces, define the // top-level register classes. The order specified in the register list is @@ -229,6 +271,7 @@ def GR16 : RegisterClass<"X86", [i16], 16, [AX, CX, DX, SI, DI, BX, BP, SP, R8W, R9W, R10W, R11W, R12W, R13W, R14W, R15W]> { + let SubRegClassList = [GR8]; let MethodProtos = [{ iterator allocation_order_begin(const MachineFunction &MF) const; iterator allocation_order_end(const MachineFunction &MF) const; @@ -292,6 +335,7 @@ def GR32 : RegisterClass<"X86", [i32], 32, [EAX, ECX, EDX, ESI, EDI, EBX, EBP, ESP, R8D, R9D, R10D, R11D, R12D, R13D, R14D, R15D]> { + let SubRegClassList = [GR8, GR16]; let MethodProtos = [{ iterator allocation_order_begin(const MachineFunction &MF) const; iterator allocation_order_end(const MachineFunction &MF) const; @@ -355,6 +399,7 @@ def GR64 : RegisterClass<"X86", [i64], 64, [RAX, RCX, RDX, RSI, RDI, R8, R9, R10, R11, RBX, R14, R15, R12, R13, RBP, RSP]> { + let SubRegClassList = [GR8, GR16, GR32]; let MethodProtos = [{ iterator allocation_order_end(const MachineFunction &MF) const; }]; @@ -374,8 +419,12 @@ // GR16, GR32 subclasses which contain registers that have R8 sub-registers. // These should only be used for 32-bit mode. -def GR16_ : RegisterClass<"X86", [i16], 16, [AX, CX, DX, BX]>; -def GR32_ : RegisterClass<"X86", [i32], 32, [EAX, ECX, EDX, EBX]>; +def GR16_ : RegisterClass<"X86", [i16], 16, [AX, CX, DX, BX]> { + let SubRegClassList = [GR8]; +} +def GR32_ : RegisterClass<"X86", [i32], 32, [EAX, ECX, EDX, EBX]> { + let SubRegClassList = [GR8, GR16]; +} // Scalar SSE2 floating point registers. def FR32 : RegisterClass<"X86", [f32], 32, From christopher.lamb at gmail.com Sat Jul 28 14:23:01 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Sat, 28 Jul 2007 12:23:01 -0700 Subject: [llvm-commits] Patch for X86 to use subregs In-Reply-To: References: Message-ID: <91ABCB0F-6ADD-4203-B773-5FBBA45CF3C7@gmail.com> On Jul 28, 2007, at 11:55 AM, Christopher Lamb wrote: > > On Jul 28, 2007, at 2:08 AM, Evan Cheng wrote: > >> >> On Jul 28, 2007, at 12:17 AM, Christopher Lamb wrote: >> >>> This patch changes the X86 back end to use the new subreg >>> operations for appropriate truncate and extend operations. This >>> should allow regression testing of the subreg feature going >>> forward, as it's now used in a public target. >>> >>> The patch passed DejaGnu and all of SingleSource on my x86 >>> machine, but there are changes for x86-64 as well which I >> >> BTW, please make sure all of MultiSource pass. > > Ok. > >> Also, if it is possible, can you split out the x86-64 as a follow >> on patch? > > It's a bit more work, but I think it'd be possible. So, the truncate code is shared between x86 and x86-64 to an extent that I think it'd be bad to try to separate out the patches for those. But I can certainly separate out the patch for PsMOVZX64rr32 on x86-64. >> Evan >> >>> haven't been able to test. Output assembly for x86-64 appears >>> sane, but I'd appreciate someone giving the patch a try on their >>> x86-64 system. Other 32-bit x86 testing is also appreciated. >>> >>> Thanks >>> -- >>> Christopher Lamb >>> >>> >>> >>> >>> _______________________________________________ >>> 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 > > -- > Christopher Lamb -- Christopher Lamb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070728/f1a3b5bd/attachment.html From rspencer at reidspencer.com Sat Jul 28 14:44:05 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Sat, 28 Jul 2007 19:44:05 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40573 - /llvm-gcc-4.2/trunk/build-for-llvm-top.sh Message-ID: <200707281944.l6SJi5Ai012967@zion.cs.uiuc.edu> Author: reid Date: Sat Jul 28 14:44:03 2007 New Revision: 40573 URL: http://llvm.org/viewvc/llvm-project?rev=40573&view=rev Log: Make the build directory be build.llvm-gcc-4.2 instead of build.llvm-gcc-4.0 so it doesn't collide with the llvm-gcc-4.0 build. Modified: llvm-gcc-4.2/trunk/build-for-llvm-top.sh Modified: llvm-gcc-4.2/trunk/build-for-llvm-top.sh URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/build-for-llvm-top.sh?rev=40573&r1=40572&r2=40573&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/build-for-llvm-top.sh (original) +++ llvm-gcc-4.2/trunk/build-for-llvm-top.sh Sat Jul 28 14:44:03 2007 @@ -1,5 +1,5 @@ #!/bin/sh -# build script for llvm-gcc-4.0 +# build script for llvm-gcc-4.2 # # This file was developed by Reid Spencer and is distributed under the # University of Illinois Open Source License. See LICENSE.TXT for details. @@ -14,7 +14,7 @@ process_arguments "$@" # First, see if the build directory is there. If not, create it. -build_dir="$LLVM_TOP/build.llvm-gcc-4.0" +build_dir="$LLVM_TOP/build.llvm-gcc-4.2" if test ! -d "$build_dir" ; then mkdir -p "$build_dir" fi @@ -27,8 +27,10 @@ config_options="--prefix=$PREFIX --enable-llvm=$LLVM_TOP/llvm " config_options="$config_options --program-prefix=llvm-" config_options="$config_options --enable-languages=c,c++" + config_options="$config_options --disable-bootstrap" + config_options="$config_options --with-gxx-include-dir=/proj/install/include/c++/4.2.1" if test "$OPTIMIZED" -eq 0 ; then - config_options="$config_options --enable-checking --enable-libstdcxx-debug" + config_options="$config_options --enable-checking" fi host=`./config.guess` if test ! -z `echo "$host" | grep 'linux'` ; then From rspencer at reidspencer.com Sat Jul 28 14:46:50 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Sat, 28 Jul 2007 19:46:50 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40574 - /llvm-gcc-4.2/trunk/ModuleInfo.txt Message-ID: <200707281946.l6SJko2H013029@zion.cs.uiuc.edu> Author: reid Date: Sat Jul 28 14:46:50 2007 New Revision: 40574 URL: http://llvm.org/viewvc/llvm-project?rev=40574&view=rev Log: Use 4.2 build directory instead of 4.0 Modified: llvm-gcc-4.2/trunk/ModuleInfo.txt Modified: llvm-gcc-4.2/trunk/ModuleInfo.txt URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/ModuleInfo.txt?rev=40574&r1=40573&r2=40574&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/ModuleInfo.txt (original) +++ llvm-gcc-4.2/trunk/ModuleInfo.txt Sat Jul 28 14:46:50 2007 @@ -1,4 +1,4 @@ DepModule: llvm BuildCmd: ./build-for-llvm-top.sh -CleanCmd: cd ../build.llvm-gcc-4.0 ; make clean -InstallCmd: cd ../build.llvm-gcc-4.0 ; make install +CleanCmd: cd ../build.llvm-gcc-4.2 ; make clean +InstallCmd: cd ../build.llvm-gcc-4.2 ; make install From asl at math.spbu.ru Sat Jul 28 15:15:55 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Sat, 28 Jul 2007 20:15:55 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40575 - in /llvm-gcc-4.2/trunk/libstdc++-v3/libsupc++: eh_personality.cc unwind-cxx.h Message-ID: <200707282015.l6SKFuYm013578@zion.cs.uiuc.edu> Author: asl Date: Sat Jul 28 15:15:55 2007 New Revision: 40575 URL: http://llvm.org/viewvc/llvm-project?rev=40575&view=rev Log: Recover from bad merge Modified: llvm-gcc-4.2/trunk/libstdc++-v3/libsupc++/eh_personality.cc llvm-gcc-4.2/trunk/libstdc++-v3/libsupc++/unwind-cxx.h Modified: llvm-gcc-4.2/trunk/libstdc++-v3/libsupc++/eh_personality.cc URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libstdc%2B%2B-v3/libsupc%2B%2B/eh_personality.cc?rev=40575&r1=40574&r2=40575&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/libstdc++-v3/libsupc++/eh_personality.cc (original) +++ llvm-gcc-4.2/trunk/libstdc++-v3/libsupc++/eh_personality.cc Sat Jul 28 15:15:55 2007 @@ -38,12 +38,6 @@ #define NO_SIZE_OF_ENCODED_VALUE #endif -// LLVM LOCAL begin -#ifdef __ARM_EABI_UNWINDER__ -#define NO_SIZE_OF_ENCODED_VALUE -#endif -// LLVM LOCAL end - #include "unwind-pe.h" @@ -204,119 +198,6 @@ // Return an element from a type table. -// LLVM LOCAL begin -#ifdef __ARM_EABI_UNWINDER__ - -// Return an element from a type table. - -static const std::type_info* -get_ttype_entry(lsda_header_info* info, _Unwind_Word i) -{ - _Unwind_Ptr ptr; - - ptr = (_Unwind_Ptr) (info->TType - (i * 4)); - ptr = _Unwind_decode_target2(ptr); - - return reinterpret_cast(ptr); -} - -// The ABI provides a routine for matching exception object types. -typedef _Unwind_Control_Block _throw_typet; -#define get_adjusted_ptr(catch_type, throw_type, thrown_ptr_p) \ - (__cxa_type_match (throw_type, catch_type, false, thrown_ptr_p) \ - != ctm_failed) - -// Return true if THROW_TYPE matches one if the filter types. - -static bool -check_exception_spec(lsda_header_info* info, _throw_typet* throw_type, - void* thrown_ptr, _Unwind_Sword filter_value) -{ - const _Unwind_Word* e = ((const _Unwind_Word*) info->TType) - - filter_value - 1; - - while (1) - { - const std::type_info* catch_type; - _Unwind_Word tmp; - - tmp = *e; - - // Zero signals the end of the list. If we've not found - // a match by now, then we've failed the specification. - if (tmp == 0) - return false; - - tmp = _Unwind_decode_target2((_Unwind_Word) e); - - // Match a ttype entry. - catch_type = reinterpret_cast(tmp); - - // ??? There is currently no way to ask the RTTI code about the - // relationship between two types without reference to a specific - // object. There should be; then we wouldn't need to mess with - // thrown_ptr here. - if (get_adjusted_ptr(catch_type, throw_type, &thrown_ptr)) - return true; - - // Advance to the next entry. - e++; - } -} - - -// Save stage1 handler information in the exception object - -static inline void -save_caught_exception(struct _Unwind_Exception* ue_header, - struct _Unwind_Context* context, - void* thrown_ptr, - int handler_switch_value, - const unsigned char* language_specific_data, - _Unwind_Ptr landing_pad, - const unsigned char* action_record - __attribute__((__unused__))) -{ - ue_header->barrier_cache.sp = _Unwind_GetGR(context, 13); - ue_header->barrier_cache.bitpattern[0] = (_uw) thrown_ptr; - ue_header->barrier_cache.bitpattern[1] - = (_uw) handler_switch_value; - ue_header->barrier_cache.bitpattern[2] - = (_uw) language_specific_data; - ue_header->barrier_cache.bitpattern[3] = (_uw) landing_pad; -} - - -// Restore the catch handler data saved during phase1. - -static inline void -restore_caught_exception(struct _Unwind_Exception* ue_header, - int& handler_switch_value, - const unsigned char*& language_specific_data, - _Unwind_Ptr& landing_pad) -{ - handler_switch_value = (int) ue_header->barrier_cache.bitpattern[1]; - language_specific_data = - (const unsigned char*) ue_header->barrier_cache.bitpattern[2]; - landing_pad = (_Unwind_Ptr) ue_header->barrier_cache.bitpattern[3]; -} - -#define CONTINUE_UNWINDING \ - do \ - { \ - if (__gnu_unwind_frame(ue_header, context) != _URC_OK) \ - return _URC_FAILURE; \ - return _URC_CONTINUE_UNWIND; \ - } \ - while (0) - -#else -// LLVM LOCAL end -typedef const std::type_info _throw_typet; - - -// Return an element from a type table. - static const std::type_info * get_ttype_entry (lsda_header_info *info, _Unwind_Word i) { @@ -433,52 +314,6 @@ #endif // !__ARM_EABI_UNWINDER__ - -// LLVM LOCAL begin -// Save stage1 handler information in the exception object - -static inline void -save_caught_exception(struct _Unwind_Exception* ue_header, - struct _Unwind_Context* context - __attribute__((__unused__)), - void* thrown_ptr, - int handler_switch_value, - const unsigned char* language_specific_data, - _Unwind_Ptr landing_pad __attribute__((__unused__)), - const unsigned char* action_record) -{ - __cxa_exception* xh = __get_exception_header_from_ue(ue_header); - - xh->handlerSwitchValue = handler_switch_value; - xh->actionRecord = action_record; - xh->languageSpecificData = language_specific_data; - xh->adjustedPtr = thrown_ptr; - - // ??? Completely unknown what this field is supposed to be for. - // ??? Need to cache TType encoding base for call_unexpected. - xh->catchTemp = landing_pad; -} - - -// Restore the catch handler information saved during phase1. - -static inline void -restore_caught_exception(struct _Unwind_Exception* ue_header, - int& handler_switch_value, - const unsigned char*& language_specific_data, - _Unwind_Ptr& landing_pad) -{ - __cxa_exception* xh = __get_exception_header_from_ue(ue_header); - handler_switch_value = xh->handlerSwitchValue; - language_specific_data = xh->languageSpecificData; - landing_pad = (_Unwind_Ptr) xh->catchTemp; -} - -#define CONTINUE_UNWINDING return _URC_CONTINUE_UNWIND - -#endif // !__ARM_EABI_UNWINDER__ -// LLVM LOCAL end - // Return true if the filter spec is empty, ie throw(). static bool Modified: llvm-gcc-4.2/trunk/libstdc++-v3/libsupc++/unwind-cxx.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libstdc%2B%2B-v3/libsupc%2B%2B/unwind-cxx.h?rev=40575&r1=40574&r2=40575&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/libstdc++-v3/libsupc++/unwind-cxx.h (original) +++ llvm-gcc-4.2/trunk/libstdc++-v3/libsupc++/unwind-cxx.h Sat Jul 28 15:15:55 2007 @@ -226,16 +226,6 @@ #define __GXX_INIT_EXCEPTION_CLASS(c) c = __gxx_exception_class -// LLVM LOCAL begin -static inline bool -__is_gxx_exception_class(_Unwind_Exception_Class c) -{ - return c == __gxx_exception_class; -} - -#define __GXX_INIT_EXCEPTION_CLASS(c) c = __gxx_exception_class -// LLVM LOCAL end - // GNU C++ personality routine, Version 0. extern "C" _Unwind_Reason_Code __gxx_personality_v0 (int, _Unwind_Action, _Unwind_Exception_Class, From asl at math.spbu.ru Sat Jul 28 15:17:34 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Sat, 28 Jul 2007 20:17:34 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40576 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-internal.h Message-ID: <200707282017.l6SKHY9G013619@zion.cs.uiuc.edu> Author: asl Date: Sat Jul 28 15:17:33 2007 New Revision: 40576 URL: http://llvm.org/viewvc/llvm-project?rev=40576&view=rev Log: Add dummy placeholders for some EH GIMPLE trees Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp llvm-gcc-4.2/trunk/gcc/llvm-internal.h 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=40576&r1=40575&r2=40576&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Sat Jul 28 15:17:33 2007 @@ -800,10 +800,21 @@ switch (TREE_CODE(exp)) { default: - std::cerr << "Unhandled expression!\n"; + std::cerr << "Unhandled expression!\n" + << "TREE_CODE: " << TREE_CODE(exp) << "\n"; debug_tree(exp); abort(); - + + // FIXME: EH handling trees. Blank right now + case FILTER_EXPR: + case RESX_EXPR: + { + const Type *Ty = ConvertType(TREE_TYPE(exp)); + if (Ty != Type::VoidTy) + Result = Constant::getNullValue(Ty); + } + break; + // Basic lists and binding scopes case BIND_EXPR: Result = EmitBIND_EXPR(exp, DestLoc); break; case STATEMENT_LIST: Result = EmitSTATEMENT_LIST(exp, DestLoc); break; @@ -1002,6 +1013,10 @@ case INDIRECT_REF: // The lvalue is just the address. return Emit(TREE_OPERAND(exp, 0), 0); + + // EH stuff + case EXC_PTR_EXPR: return EmitLV_EXC_PTR_EXPR(exp); + case FILTER_EXPR: return EmitLV_FILTER_EXPR(exp); } } @@ -5406,6 +5421,44 @@ return LV; } +/// EmitLV_EXC_PTR_EXPR - Handle EXC_PTR_EXPR as lvalue. +/// +LValue TreeToLLVM::EmitLV_EXC_PTR_EXPR(tree exp) { + const Type *Ty = ConvertType(TREE_TYPE(exp)); + +#ifdef ITANIUM_STYLE_EXCEPTIONS + // Create exception values. + CreateExceptionValues(); + LValue LV = ExceptionValue; +#else + Value* Tmp = CreateTemporary(PointerType::get(Ty)); + Tmp->setName("dummy"); + LValue LV = Tmp; +#endif + + LV.Ptr = BitCastToType(LV.Ptr, PointerType::get(Ty)); + return LV; +} + +/// EmitLV_FILTER_EXPR - Handle FILTER_EXPR as lvalue. +/// +LValue TreeToLLVM::EmitLV_FILTER_EXPR(tree exp) { + const Type *Ty = ConvertType(TREE_TYPE(exp)); + +#ifdef ITANIUM_STYLE_EXCEPTIONS + // Create exception values. + CreateExceptionValues(); + LValue LV = ExceptionSelectorValue; +#else + Value* Tmp = CreateTemporary(PointerType::get(Ty)); + Tmp->setName("dummy"); + LValue LV = Tmp; +#endif + + LV.Ptr = BitCastToType(LV.Ptr, PointerType::get(Ty)); + return LV; +} + //===----------------------------------------------------------------------===// // ... Constant Expressions ... //===----------------------------------------------------------------------===// Modified: llvm-gcc-4.2/trunk/gcc/llvm-internal.h URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-internal.h?rev=40576&r1=40575&r2=40576&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-internal.h (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-internal.h Sat Jul 28 15:17:33 2007 @@ -620,6 +620,8 @@ LValue EmitLV_BIT_FIELD_REF(tree_node *exp); LValue EmitLV_XXXXPART_EXPR(tree_node *exp, unsigned Idx); LValue EmitLV_VIEW_CONVERT_EXPR(tree_node *exp); + LValue EmitLV_EXC_PTR_EXPR(tree_node *exp); + LValue EmitLV_FILTER_EXPR(tree_node *exp); // Constant Expressions. Value *EmitINTEGER_CST(tree_node *exp); From evan.cheng at apple.com Sat Jul 28 16:26:47 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 28 Jul 2007 14:26:47 -0700 Subject: [llvm-commits] Patch for X86 to use subregs In-Reply-To: <2C30DFBD-73FF-4CCB-BE4F-469146C7A91C@gmail.com> References: <922DEBE2-14C9-4A1C-9A3A-1C366DE18B4A@apple.com> <2C30DFBD-73FF-4CCB-BE4F-469146C7A91C@gmail.com> Message-ID: <9A826E2A-2B21-4FFF-A18B-E11D08B7CB93@apple.com> On Jul 28, 2007, at 11:52 AM, Christopher Lamb wrote: > > On Jul 28, 2007, at 1:48 AM, Evan Cheng wrote: > >> Very cool! I need to read it more carefully. > >> But I see you are lowering zext to a single insert_subreg. Is that >> right? It won't zero out the top part, no? > > It's only lowering (zext i32 to i64) to an insert_subreg on x86-64 > where all writes to 32-bit registers implicitly zero-extend into the > upper 32-bits. > I know. But thy mismatch semantically. A insert_subreg to the lower part should not change the upper half. I think this is only legal for anyext. Evan > -- > Chris > >> Sent from my iPhone >> >> On Jul 28, 2007, at 12:17 AM, Christopher Lamb > > wrote: >> >>> This patch changes the X86 back end to use the new subreg >>> operations for appropriate truncate and extend operations. This >>> should allow regression testing of the subreg feature going >>> forward, as it's now used in a public target. >>> >>> The patch passed DejaGnu and all of SingleSource on my x86 >>> machine, but there are changes for x86-64 as well which I haven't >>> been able to test. Output assembly for x86-64 appears sane, but >>> I'd appreciate someone giving the patch a try on their x86-64 >>> system. Other 32-bit x86 testing is also appreciated. >>> >>> Thanks >>> -- >>> Christopher Lamb >>> >>> >>> >>> >>> _______________________________________________ >>> 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 > > -- > Christopher Lamb > > > > _______________________________________________ > 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/20070728/852b1f4e/attachment.html From evan.cheng at apple.com Sat Jul 28 16:28:10 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Sat, 28 Jul 2007 14:28:10 -0700 Subject: [llvm-commits] Patch for X86 to use subregs In-Reply-To: References: Message-ID: <6CBE8E19-7AC7-4666-B226-342AEAFA090F@apple.com> On Jul 28, 2007, at 11:55 AM, Christopher Lamb wrote: > > On Jul 28, 2007, at 2:08 AM, Evan Cheng wrote: > >> >> On Jul 28, 2007, at 12:17 AM, Christopher Lamb wrote: >> >>> This patch changes the X86 back end to use the new subreg >>> operations for appropriate truncate and extend operations. This >>> should allow regression testing of the subreg feature going >>> forward, as it's now used in a public target. >>> >>> The patch passed DejaGnu and all of SingleSource on my x86 >>> machine, but there are changes for x86-64 as well which I >> >> BTW, please make sure all of MultiSource pass. > > Ok. > >> Also, if it is possible, can you split out the x86-64 as a follow >> on patch? > > It's a bit more work, but I think it'd be possible. Thx. Evan > >> Evan >> >>> haven't been able to test. Output assembly for x86-64 appears >>> sane, but I'd appreciate someone giving the patch a try on their >>> x86-64 system. Other 32-bit x86 testing is also appreciated. >>> >>> Thanks >>> -- >>> Christopher Lamb >>> >>> >>> >>> >>> _______________________________________________ >>> 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 > > -- > Christopher Lamb > > > > _______________________________________________ > 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/20070728/533f3de5/attachment.html From christopher.lamb at gmail.com Sat Jul 28 18:36:22 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Sat, 28 Jul 2007 16:36:22 -0700 Subject: [llvm-commits] Patch for X86 to use subregs In-Reply-To: <9A826E2A-2B21-4FFF-A18B-E11D08B7CB93@apple.com> References: <922DEBE2-14C9-4A1C-9A3A-1C366DE18B4A@apple.com> <2C30DFBD-73FF-4CCB-BE4F-469146C7A91C@gmail.com> <9A826E2A-2B21-4FFF-A18B-E11D08B7CB93@apple.com> Message-ID: <1BB6419C-C448-4995-8A27-791D8D21244D@gmail.com> On Jul 28, 2007, at 2:26 PM, Evan Cheng wrote: > On Jul 28, 2007, at 11:52 AM, Christopher Lamb > wrote: > >> >> On Jul 28, 2007, at 1:48 AM, Evan Cheng wrote: >> >>> Very cool! I need to read it more carefully. >> >>> But I see you are lowering zext to a single insert_subreg. Is >>> that right? It won't zero out the top part, no? >> >> It's only lowering (zext i32 to i64) to an insert_subreg on x86-64 >> where all writes to 32-bit registers implicitly zero-extend into >> the upper 32-bits. >> > > I know. But thy mismatch semantically. A insert_subreg to the lower > part should not change the upper half. I think this is only legal > for anyext. On x86-64 the semantics of a 2 operand i32 insert_subreg is that the input super-value is implicitly zero. So in this sense the insert isn't changing the upper half, it's just that the upper half is being set to zero implicitly rather than explicitly. If you'll notice the insert_subreg is a two operand (implicit super value) not a three operand version. If the insert were the three operand version, and the super value as coming from an implicit def I'd agree with you, but it's not. Also the current behavior is to use a 32-bit mov instruction for both zeroext and for anyext, I don't see how this is any different. >> -- >> Chris >> >>> Sent from my iPhone >>> >>> On Jul 28, 2007, at 12:17 AM, Christopher Lamb >>> wrote: >>> >>>> This patch changes the X86 back end to use the new subreg >>>> operations for appropriate truncate and extend operations. This >>>> should allow regression testing of the subreg feature going >>>> forward, as it's now used in a public target. >>>> >>>> The patch passed DejaGnu and all of SingleSource on my x86 >>>> machine, but there are changes for x86-64 as well which I >>>> haven't been able to test. Output assembly for x86-64 appears >>>> sane, but I'd appreciate someone giving the patch a try on their >>>> x86-64 system. Other 32-bit x86 testing is also appreciated. >>>> >>>> Thanks >>>> -- >>>> Christopher Lamb >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 >> >> -- >> Christopher Lamb >> >> >> >> _______________________________________________ >> 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 -- Christopher Lamb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070728/5775426c/attachment.html From christopher.lamb at gmail.com Sat Jul 28 20:24:58 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Sun, 29 Jul 2007 01:24:58 -0000 Subject: [llvm-commits] [llvm] r40578 - in /llvm/trunk/lib/Target/X86: X86ATTAsmPrinter.cpp X86CodeEmitter.cpp X86ISelDAGToDAG.cpp X86InstrInfo.td X86InstrX86-64.td X86IntelAsmPrinter.cpp Message-ID: <200707290124.l6T1Owds020875@zion.cs.uiuc.edu> Author: clamb Date: Sat Jul 28 20:24:57 2007 New Revision: 40578 URL: http://llvm.org/viewvc/llvm-project?rev=40578&view=rev Log: Change the x86 backend to use extract_subreg for truncation operations. Passes DejaGnu, SingleSource and MultiSource. Modified: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp llvm/trunk/lib/Target/X86/X86InstrInfo.td llvm/trunk/lib/Target/X86/X86InstrX86-64.td llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp Modified: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp?rev=40578&r1=40577&r2=40578&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp Sat Jul 28 20:24:57 2007 @@ -580,29 +580,6 @@ // See if a truncate instruction can be turned into a nop. switch (MI->getOpcode()) { default: break; - case X86::TRUNC_64to32: - case X86::TRUNC_64to16: - case X86::TRUNC_32to16: - case X86::TRUNC_32to8: - case X86::TRUNC_16to8: - case X86::TRUNC_32_to8: - case X86::TRUNC_16_to8: { - const MachineOperand &MO0 = MI->getOperand(0); - const MachineOperand &MO1 = MI->getOperand(1); - unsigned Reg0 = MO0.getReg(); - unsigned Reg1 = MO1.getReg(); - unsigned Opc = MI->getOpcode(); - if (Opc == X86::TRUNC_64to32) - Reg1 = getX86SubSuperRegister(Reg1, MVT::i32); - else if (Opc == X86::TRUNC_32to16 || Opc == X86::TRUNC_64to16) - Reg1 = getX86SubSuperRegister(Reg1, MVT::i16); - else - Reg1 = getX86SubSuperRegister(Reg1, MVT::i8); - O << TAI->getCommentString() << " TRUNCATE "; - if (Reg0 != Reg1) - O << "\n\t"; - break; - } case X86::PsMOVZX64rr32: O << TAI->getCommentString() << " ZERO-EXTEND " << "\n\t"; break; Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp?rev=40578&r1=40577&r2=40578&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Sat Jul 28 20:24:57 2007 @@ -448,12 +448,6 @@ return false; } -inline static bool isX86_64TruncToByte(unsigned oc) { - return (oc == X86::TRUNC_64to8 || oc == X86::TRUNC_32to8 || - oc == X86::TRUNC_16to8); -} - - inline static bool isX86_64NonExtLowByteReg(unsigned reg) { return (reg == X86::SPL || reg == X86::BPL || reg == X86::SIL || reg == X86::DIL); @@ -465,7 +459,6 @@ unsigned Emitter::determineREX(const MachineInstr &MI) { unsigned REX = 0; const TargetInstrDescriptor *Desc = MI.getInstrDescriptor(); - unsigned Opcode = Desc->Opcode; // Pseudo instructions do not need REX prefix byte. if ((Desc->TSFlags & X86II::FormMask) == X86II::Pseudo) @@ -479,16 +472,11 @@ Desc->getOperandConstraint(1, TOI::TIED_TO) != -1; // If it accesses SPL, BPL, SIL, or DIL, then it requires a 0x40 REX prefix. - bool isTrunc8 = isX86_64TruncToByte(Opcode); unsigned i = isTwoAddr ? 1 : 0; for (unsigned e = NumOps; i != e; ++i) { const MachineOperand& MO = MI.getOperand(i); if (MO.isRegister()) { unsigned Reg = MO.getReg(); - // Trunc to byte are actually movb. The real source operand is the low - // byte of the register. - if (isTrunc8 && i == 1) - Reg = getX86SubSuperRegister(Reg, MVT::i8); if (isX86_64NonExtLowByteReg(Reg)) REX |= 0x40; } Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=40578&r1=40577&r2=40578&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original) +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Sat Jul 28 20:24:57 2007 @@ -1258,39 +1258,51 @@ return NULL; } - + case ISD::TRUNCATE: { - if (!Subtarget->is64Bit() && NVT == MVT::i8) { - unsigned Opc2; - MVT::ValueType VT; - switch (Node->getOperand(0).getValueType()) { - default: assert(0 && "Unknown truncate!"); - case MVT::i16: - Opc = X86::MOV16to16_; - VT = MVT::i16; - Opc2 = X86::TRUNC_16_to8; - break; - case MVT::i32: - Opc = X86::MOV32to32_; - VT = MVT::i32; - Opc2 = X86::TRUNC_32_to8; - break; + SDOperand Tmp; + SDOperand Input = Node->getOperand(0); + AddToISelQueue(Node->getOperand(0)); + switch (NVT) { + case MVT::i8: + Tmp = CurDAG->getTargetConstant(1, MVT::i32); // SubRegSet 1 + // Ensure that the source register has an 8-bit subreg on 32-bit targets + if (!Subtarget->is64Bit()) { + unsigned Opc; + MVT::ValueType VT; + switch (Node->getOperand(0).getValueType()) { + default: assert(0 && "Unknown truncate!"); + case MVT::i16: + Opc = X86::MOV16to16_; + VT = MVT::i16; + break; + case MVT::i32: + Opc = X86::MOV32to32_; + VT = MVT::i32; + break; + } + Input = + SDOperand(CurDAG->getTargetNode(Opc, VT, Node->getOperand(0)), 0); } - - AddToISelQueue(Node->getOperand(0)); - SDOperand Tmp = - SDOperand(CurDAG->getTargetNode(Opc, VT, Node->getOperand(0)), 0); - SDNode *ResNode = CurDAG->getTargetNode(Opc2, NVT, Tmp); - + break; + case MVT::i16: + Tmp = CurDAG->getTargetConstant(2, MVT::i32); // SubRegSet 2 + break; + case MVT::i32: + Tmp = CurDAG->getTargetConstant(3, MVT::i32); // SubRegSet 3 + break; + default: assert(0 && "Unknown truncate!"); + } + SDNode *ResNode = CurDAG->getTargetNode(X86::EXTRACT_SUBREG, + NVT, + Input, Tmp); #ifndef NDEBUG DOUT << std::string(Indent-2, ' ') << "=> "; DEBUG(ResNode->dump(CurDAG)); DOUT << "\n"; Indent -= 2; #endif - return ResNode; - } - + return ResNode; break; } } Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=40578&r1=40577&r2=40578&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Sat Jul 28 20:24:57 2007 @@ -388,14 +388,6 @@ // Nop def NOOP : I<0x90, RawFrm, (outs), (ins), "nop", []>; -// Truncate -def TRUNC_32_to8 : I<0x88, MRMDestReg, (outs GR8:$dst), (ins GR32_:$src), - "mov{b} {${src:subreg8}, $dst|$dst, ${src:subreg8}", []>; -def TRUNC_16_to8 : I<0x88, MRMDestReg, (outs GR8:$dst), (ins GR16_:$src), - "mov{b} {${src:subreg8}, $dst|$dst, ${src:subreg8}}", []>; -def TRUNC_32to16 : I<0x89, MRMDestReg, (outs GR16:$dst), (ins GR32:$src), - "mov{w} {${src:subreg16}, $dst|$dst, ${src:subreg16}}", - [(set GR16:$dst, (trunc GR32:$src))]>; //===----------------------------------------------------------------------===// // Control Flow Instructions... Modified: llvm/trunk/lib/Target/X86/X86InstrX86-64.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrX86-64.td?rev=40578&r1=40577&r2=40578&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86InstrX86-64.td (original) +++ llvm/trunk/lib/Target/X86/X86InstrX86-64.td Sat Jul 28 20:24:57 2007 @@ -1005,28 +1005,6 @@ // Alias Instructions //===----------------------------------------------------------------------===// -// Truncate -// In 64-mode, each 64-bit and 32-bit registers has a low 8-bit sub-register. -def TRUNC_64to8 : I<0x88, MRMDestReg, (outs GR8:$dst), (ins GR64:$src), - "mov{b} {${src:subreg8}, $dst|$dst, ${src:subreg8}", - [(set GR8:$dst, (trunc GR64:$src))]>; -def TRUNC_32to8 : I<0x88, MRMDestReg, (outs GR8:$dst), (ins GR32:$src), - "mov{b} {${src:subreg8}, $dst|$dst, ${src:subreg8}", - [(set GR8:$dst, (trunc GR32:$src))]>, - Requires<[In64BitMode]>; -def TRUNC_16to8 : I<0x88, MRMDestReg, (outs GR8:$dst), (ins GR16:$src), - "mov{b} {${src:subreg8}, $dst|$dst, ${src:subreg8}}", - [(set GR8:$dst, (trunc GR16:$src))]>, - Requires<[In64BitMode]>; - -def TRUNC_64to16 : I<0x89, MRMDestReg, (outs GR16:$dst), (ins GR64:$src), - "mov{w} {${src:subreg16}, $dst|$dst, ${src:subreg16}}", - [(set GR16:$dst, (trunc GR64:$src))]>; - -def TRUNC_64to32 : I<0x89, MRMDestReg, (outs GR32:$dst), (ins GR64:$src), - "mov{l} {${src:subreg32}, $dst|$dst, ${src:subreg32}}", - [(set GR32:$dst, (trunc GR64:$src))]>; - // Zero-extension // TODO: Remove this after proper i32 -> i64 zext support. def PsMOVZX64rr32: I<0x89, MRMDestReg, (outs GR64:$dst), (ins GR32:$src), Modified: llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp?rev=40578&r1=40577&r2=40578&view=diff ============================================================================== --- llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp (original) +++ llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp Sat Jul 28 20:24:57 2007 @@ -306,29 +306,6 @@ // See if a truncate instruction can be turned into a nop. switch (MI->getOpcode()) { default: break; - case X86::TRUNC_64to32: - case X86::TRUNC_64to16: - case X86::TRUNC_32to16: - case X86::TRUNC_32to8: - case X86::TRUNC_16to8: - case X86::TRUNC_32_to8: - case X86::TRUNC_16_to8: { - const MachineOperand &MO0 = MI->getOperand(0); - const MachineOperand &MO1 = MI->getOperand(1); - unsigned Reg0 = MO0.getReg(); - unsigned Reg1 = MO1.getReg(); - unsigned Opc = MI->getOpcode(); - if (Opc == X86::TRUNC_64to32) - Reg1 = getX86SubSuperRegister(Reg1, MVT::i32); - else if (Opc == X86::TRUNC_32to16 || Opc == X86::TRUNC_64to16) - Reg1 = getX86SubSuperRegister(Reg1, MVT::i16); - else - Reg1 = getX86SubSuperRegister(Reg1, MVT::i8); - O << TAI->getCommentString() << " TRUNCATE "; - if (Reg0 != Reg1) - O << "\n\t"; - break; - } case X86::PsMOVZX64rr32: O << TAI->getCommentString() << " ZERO-EXTEND " << "\n\t"; break; From christopher.lamb at gmail.com Sat Jul 28 21:45:55 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Sat, 28 Jul 2007 19:45:55 -0700 Subject: [llvm-commits] X86-64 subreg patch Message-ID: <9588A907-5059-491B-94A6-DC6BA3A20358@gmail.com> This patch causes anyext and zext to be code generated as insert_subreg on x86-64. It passes all tests on my system, but my system isn't x86-64. If someone would give it a run that'd be appreciated. Thanks -- Christopher Lamb ? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070728/23585903/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: x86_64_zext_subreg.patch Type: application/octet-stream Size: 4056 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070728/23585903/attachment.obj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070728/23585903/attachment-0001.html From asl at math.spbu.ru Sun Jul 29 11:46:08 2007 From: asl at math.spbu.ru (Anton Korobeynikov) Date: Sun, 29 Jul 2007 16:46:08 -0000 Subject: [llvm-commits] [llvm-gcc-4.2] r40580 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp toplev.c Message-ID: <200707291646.l6TGk8j5013580@zion.cs.uiuc.edu> Author: asl Date: Sun Jul 29 11:46:07 2007 New Revision: 40580 URL: http://llvm.org/viewvc/llvm-project?rev=40580&view=rev Log: Unbreak C++ FE. libstdc++ can be compiled now and even tests from llvm-testsuite passed! Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp llvm-gcc-4.2/trunk/gcc/toplev.c 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=40580&r1=40579&r2=40580&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Sun Jul 29 11:46:07 2007 @@ -69,6 +69,13 @@ #define ITANIUM_STYLE_EXCEPTIONS +// Check for GCC bug 17347: C++ FE sometimes creates bogus ctor trees +// which we should throw out +#define BOGUS_CTOR(exp) \ + (DECL_INITIAL(exp) && \ + TREE_CODE(DECL_INITIAL(exp)) == CONSTRUCTOR && \ + !TREE_TYPE(DECL_INITIAL(exp))) + //===----------------------------------------------------------------------===// // Matching LLVM Values with GCC DECL trees //===----------------------------------------------------------------------===// @@ -5106,7 +5113,9 @@ // If this is an aggregate, emit it to LLVM now. GCC happens to // get this case right by forcing the initializer into memory. if (TREE_CODE(exp) == CONST_DECL || TREE_CODE(exp) == VAR_DECL) { - if ((DECL_INITIAL(exp) || !TREE_PUBLIC(exp)) && GV->isDeclaration()) { + if ((DECL_INITIAL(exp) || !TREE_PUBLIC(exp)) && !DECL_EXTERNAL(exp) && + GV->isDeclaration() && + !BOGUS_CTOR(exp)) { emit_global_to_llvm(exp); Decl = DECL_LLVM(exp); // Decl could have change if it changed type. } @@ -6224,7 +6233,9 @@ // If this is an aggregate, emit it to LLVM now. GCC happens to // get this case right by forcing the initializer into memory. if (TREE_CODE(exp) == CONST_DECL || TREE_CODE(exp) == VAR_DECL) { - if ((DECL_INITIAL(exp) || !TREE_PUBLIC(exp)) && Val->isDeclaration()) { + if ((DECL_INITIAL(exp) || !TREE_PUBLIC(exp)) && !DECL_EXTERNAL(exp) && + Val->isDeclaration() && + !BOGUS_CTOR(exp)) { emit_global_to_llvm(exp); // Decl could have change if it changed type. Val = cast(DECL_LLVM(exp)); Modified: llvm-gcc-4.2/trunk/gcc/toplev.c URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/toplev.c?rev=40580&r1=40579&r2=40580&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/toplev.c (original) +++ llvm-gcc-4.2/trunk/gcc/toplev.c Sun Jul 29 11:46:07 2007 @@ -2135,6 +2135,7 @@ /* LLVM LOCAL begin */ #ifdef ENABLE_LLVM llvm_lang_dependent_init(name); + init_eh(); return 1; /* don't initialize the RTL backend */ #endif /* LLVM LOCAL end */ From rspencer at reidspencer.com Sun Jul 29 13:08:58 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Sun, 29 Jul 2007 11:08:58 -0700 Subject: [llvm-commits] PR1146 patch for llvm-gcc-4.0 Message-ID: <1185732538.30786.45.camel@bashful.x10sys.com> All, Attached is my patch for llvm-gcc-4.0. This rearranges the attribute processing a bit and centralizes the K&R stuff in the FunctionTypeConverter. The methods to convert a function type now take an extra ParamAttrsList parameter that is generated for use with Functions and call sites. This goes in conjunction with the previous patch to llvm for PR1146 (sent a few days ago). This is passing tests so I thought I'd send it out for review. I'll commit this later today if it passes muster. Reid. -------------- next part -------------- A non-text attachment was scrubbed... Name: PR1146.patch Type: text/x-patch Size: 18120 bytes Desc: not available Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070729/591870a0/attachment.bin From rspencer at reidspencer.com Sun Jul 29 13:23:22 2007 From: rspencer at reidspencer.com (Reid Spencer) Date: Sun, 29 Jul 2007 18:23:22 -0000 Subject: [llvm-commits] [llvm] r40581 - /llvm/trunk/test/CFrontend/exact-div-expr.c Message-ID: <200707291823.l6TINM9P017698@zion.cs.uiuc.edu> Author: reid Date: Sun Jul 29 13:23:22 2007 New Revision: 40581 URL: http://llvm.org/viewvc/llvm-project?rev=40581&view=rev Log: Be explicit about which level of optimization is being asked for. The -O option is equivalent to -O1. Modified: llvm/trunk/test/CFrontend/exact-div-expr.c Modified: llvm/trunk/test/CFrontend/exact-div-expr.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/exact-div-expr.c?rev=40581&r1=40580&r2=40581&view=diff ============================================================================== --- llvm/trunk/test/CFrontend/exact-div-expr.c (original) +++ llvm/trunk/test/CFrontend/exact-div-expr.c Sun Jul 29 13:23:22 2007 @@ -1,5 +1,5 @@ -// RUN: %llvmgcc -S %s -o - -O | grep ashr -// RUN: %llvmgcc -S %s -o - -O | not grep sdiv +// RUN: %llvmgcc -S %s -o - -O1 | grep ashr +// RUN: %llvmgcc -S %s -o - -O1 | not grep sdiv long long test(int *A, int *B) { return A-B; From christopher.lamb at gmail.com Sun Jul 29 18:25:53 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Sun, 29 Jul 2007 23:25:53 -0000 Subject: [llvm-commits] [llvm-gcc-4.0] r40582 - /llvm-gcc-4.0/trunk/gcc/llvm-types.cpp Message-ID: <200707292325.l6TNPraG028132@zion.cs.uiuc.edu> Author: clamb Date: Sun Jul 29 18:25:53 2007 New Revision: 40582 URL: http://llvm.org/viewvc/llvm-project?rev=40582&view=rev Log: Add support to emit noalias attribute on function parameters when the __restrict qualifier is used. Modified: llvm-gcc-4.0/trunk/gcc/llvm-types.cpp Modified: llvm-gcc-4.0/trunk/gcc/llvm-types.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/gcc/llvm-types.cpp?rev=40582&r1=40581&r2=40582&view=diff ============================================================================== --- llvm-gcc-4.0/trunk/gcc/llvm-types.cpp (original) +++ llvm-gcc-4.0/trunk/gcc/llvm-types.cpp Sun Jul 29 18:25:53 2007 @@ -1010,6 +1010,11 @@ else Attributes |= ParamAttr::SExt; } + + // Compute noalias attributes. + if (TREE_CODE(ArgTy) == POINTER_TYPE || TREE_CODE(ArgTy) == REFERENCE_TYPE) + if (TYPE_RESTRICT(ArgTy)) + Attributes |= ParamAttr::NoAlias; #ifdef LLVM_TARGET_ENABLE_REGPARM // Allow the target to mark this as inreg. From christopher.lamb at gmail.com Sun Jul 29 18:29:16 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Sun, 29 Jul 2007 23:29:16 -0000 Subject: [llvm-commits] [llvm] r40583 - in /llvm/trunk/test: C++Frontend/2007-07-29-RestrictPtrArg.cpp C++Frontend/2007-07-29-RestrictRefArg.cpp CFrontend/2007-07-29-RestrictPtrArg.c Message-ID: <200707292329.l6TNTGZC028271@zion.cs.uiuc.edu> Author: clamb Date: Sun Jul 29 18:29:16 2007 New Revision: 40583 URL: http://llvm.org/viewvc/llvm-project?rev=40583&view=rev Log: Add tests for generating noalias parameter attribute from __restrict qualified function parameters. C++ tests are currently XFAILing see PR1582. Added: llvm/trunk/test/C++Frontend/2007-07-29-RestrictPtrArg.cpp llvm/trunk/test/C++Frontend/2007-07-29-RestrictRefArg.cpp llvm/trunk/test/CFrontend/2007-07-29-RestrictPtrArg.c Added: llvm/trunk/test/C++Frontend/2007-07-29-RestrictPtrArg.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/2007-07-29-RestrictPtrArg.cpp?rev=40583&view=auto ============================================================================== --- llvm/trunk/test/C++Frontend/2007-07-29-RestrictPtrArg.cpp (added) +++ llvm/trunk/test/C++Frontend/2007-07-29-RestrictPtrArg.cpp Sun Jul 29 18:29:16 2007 @@ -0,0 +1,8 @@ +// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias +// XFAIL: i[1-9]86|alpha|ia64|arm|x86_64|amd64 +// NOTE: This should be un-XFAILed when the C++ type qualifiers are fixed + +void foo(int * __restrict myptr1, int * myptr2) { + myptr1[0] = 0; + myptr2[0] = 0; +} Added: llvm/trunk/test/C++Frontend/2007-07-29-RestrictRefArg.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/C%2B%2BFrontend/2007-07-29-RestrictRefArg.cpp?rev=40583&view=auto ============================================================================== --- llvm/trunk/test/C++Frontend/2007-07-29-RestrictRefArg.cpp (added) +++ llvm/trunk/test/C++Frontend/2007-07-29-RestrictRefArg.cpp Sun Jul 29 18:29:16 2007 @@ -0,0 +1,8 @@ +// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias +// XFAIL: i[1-9]86|alpha|ia64|arm|x86_64|amd64 +// NOTE: This should be un-XFAILed when the C++ type qualifiers are fixed + +void foo(int & __restrict myptr1, int & myptr2) { + myptr1 = 0; + myptr2 = 0; +} Added: llvm/trunk/test/CFrontend/2007-07-29-RestrictPtrArg.c URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CFrontend/2007-07-29-RestrictPtrArg.c?rev=40583&view=auto ============================================================================== --- llvm/trunk/test/CFrontend/2007-07-29-RestrictPtrArg.c (added) +++ llvm/trunk/test/CFrontend/2007-07-29-RestrictPtrArg.c Sun Jul 29 18:29:16 2007 @@ -0,0 +1,6 @@ +// RUN: %llvmgxx -c -emit-llvm %s -o - | llvm-dis | grep noalias + +void foo(int * __restrict myptr1, int * myptr2) { + myptr1[0] = 0; + myptr2[0] = 0; +} \ No newline at end of file From evan.cheng at apple.com Sun Jul 29 20:20:00 2007 From: evan.cheng at apple.com (Evan Cheng) Date: Sun, 29 Jul 2007 18:20:00 -0700 Subject: [llvm-commits] Patch for X86 to use subregs In-Reply-To: <1BB6419C-C448-4995-8A27-791D8D21244D@gmail.com> References: <922DEBE2-14C9-4A1C-9A3A-1C366DE18B4A@apple.com> <2C30DFBD-73FF-4CCB-BE4F-469146C7A91C@gmail.com> <9A826E2A-2B21-4FFF-A18B-E11D08B7CB93@apple.com> <1BB6419C-C448-4995-8A27-791D8D21244D@gmail.com> Message-ID: <30228125-8A4F-4336-8380-8525B2BF7DFB@apple.com> Sent from my iPhone On Jul 28, 2007, at 4:36 PM, Christopher Lamb wrote: > > On Jul 28, 2007, at 2:26 PM, Evan Cheng wrote: > >> On Jul 28, 2007, at 11:52 AM, Christopher Lamb > > wrote: >> >>> >>> On Jul 28, 2007, at 1:48 AM, Evan Cheng wrote: >>> >>>> Very cool! I need to read it more carefully. >>> >>>> But I see you are lowering zext to a single insert_subreg. Is >>>> that right? It won't zero out the top part, no? >>> >>> It's only lowering (zext i32 to i64) to an insert_subreg on x86-64 >>> where all writes to 32-bit registers implicitly zero-extend into >>> the upper 32-bits. >>> >> >> I know. But thy mismatch semantically. A insert_subreg to the lower >> part should not change the upper half. I think this is only legal >> for anyext. > > On x86-64 the semantics of a 2 operand i32 insert_subreg is that the > input super-value is implicitly zero. So in this sense the insert > isn't changing the upper half, it's just that the upper half is > being set to zero implicitly rather than explicitly. If you'll > notice the insert_subreg is a two operand (implicit super value) not > a three operand version. If the insert were the three operand > version, and the super value as coming from an implicit def I'd > agree with you, but it's not. Ok, let's step back for a second. There are a couple of issues that should be addressed. Plz help me understand. :) 1: Semantics of insert_subreg should be the same across all targets, right? 2: two operant variant of insert_subreg should mean the superreg is undef. If you insert a value into a low part, the rest of the superreg is still undef. 3: why is there a two operant variant in the first place? Why not use undef for the superreg operant? 4: what's the benefit of isel a zext to insert_subreg and then xform it to a 32-bit move? Why not just isel the zext to the move? It's not legal to coalesce it away anyway. Evan > > Also the current behavior is to use a 32-bit mov instruction for > both zeroext and for anyext, I don't see how this is any different. > >>> -- >>> Chris >>> >>>> Sent from my iPhone >>>> >>>> On Jul 28, 2007, at 12:17 AM, Christopher Lamb >>> > wrote: >>>> >>>>> This patch changes the X86 back end to use the new subreg >>>>> operations for appropriate truncate and extend operations. This >>>>> should allow regression testing of the subreg feature going >>>>> forward, as it's now used in a public target. >>>>> >>>>> The patch passed DejaGnu and all of SingleSource on my x86 >>>>> machine, but there are changes for x86-64 as well which I >>>>> haven't been able to test. Output assembly for x86-64 appears >>>>> sane, but I'd appreciate someone giving the patch a try on their >>>>> x86-64 system. Other 32-bit x86 testing is also appreciated. >>>>> >>>>> Thanks >>>>> -- >>>>> Christopher Lamb >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>> >>> -- >>> Christopher Lamb >>> >>> >>> >>> _______________________________________________ >>> 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 > > -- > Christopher Lamb > > > > _______________________________________________ > 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/20070729/259c91cd/attachment.html From christopher.lamb at gmail.com Sun Jul 29 23:37:23 2007 From: christopher.lamb at gmail.com (Christopher Lamb) Date: Sun, 29 Jul 2007 21:37:23 -0700 Subject: [llvm-commits] Patch for X86 to use subregs In-Reply-To: <30228125-8A4F-4336-8380-8525B2BF7DFB@apple.com> References: <922DEBE2-14C9-4A1C-9A3A-1C366DE18B4A@apple.com> <2C30DFBD-73FF-4CCB-BE4F-469146C7A91C@gmail.com> <9A826E2A-2B21-4FFF-A18B-E11D08B7CB93@apple.com> <1BB6419C-C448-4995-8A27-791D8D21244D@gmail.com> <30228125-8A4F-4336-8380-8525B2BF7DFB@apple.com> Message-ID: On Jul 29, 2007, at 6:20 PM, Evan Cheng wrote: > Sent from my iPhone > > On Jul 28, 2007, at 4:36 PM, Christopher Lamb > wrote: > >> >> On Jul 28, 2007, at 2:26 PM, Evan Cheng wrote: >> >>> On Jul 28, 2007, at 11:52 AM, Christopher Lamb >>> wrote: >>> >>>> >>>> On Jul 28, 2007, at 1:48 AM, Evan Cheng wrote: >>>> >>>>> Very cool! I need to read it more carefully. >>>> >>>>> But I see you are lowering zext to a single insert_subreg. Is >>>>> that right? It won't zero out the top part, no? >>>> >>>> It's only lowering (zext i32 to i64) to an insert_subreg on >>>> x86-64 where all writes to 32-bit registers implicitly zero- >>>> extend into the upper 32-bits. >>>> >>> >>> I know. But thy mismatch semantically. A insert_subreg to the >>> lower part should not change the upper half. I think this is only >>> legal for anyext. >> >> On x86-64 the semantics of a 2 operand i32 insert_subreg is that >> the input super-value is implicitly zero. So in this sense the >> insert isn't changing the upper half, it's just that the upper >> half is being set to zero implicitly rather than explicitly. If >> you'll notice the insert_subreg is a two operand (implicit super >> value) not a three operand version. If the insert were the three >> operand version, and the super value as coming from an implicit >> def I'd agree with you, but it's not. > > Ok, let's step back for a second. There are a couple of issues that > should be addressed. Plz help me understand. :) > > 1: Semantics of insert_subreg should be the same across all > targets, right? I'm not certain that this should be so. x86-64 clearly has a target specific semantics of a 32-bit into 64-bit insert. > 2: two operant variant of insert_subreg should mean the superreg is > undef. If you insert a value into a low part, the rest of the > superreg is still undef. I think the meaning of insert_subreg instruction (both 2 and 3 operand versions) must have semantics specific to the target. For example, on x86-64 there is no valid 3 operand insert_subreg for a 32- bit value into 64-bits, because the 32-bit result is always going to be zero extended and overwrite the upper 32-bits. > 3: why is there a two operant variant in the first place? Why not > use undef for the superreg operant? To note, the two operand variant is of the MachineInstr. The DAG form would be to represent the superregister as coming from an undef node, but this gets isel'd to the two operand MachineInstr of insert_subreg. The reason is that undef is typically selected to an implicit def of a register. This causes an unnecessary move to be generated later on. This move can be optimized away later with more difficulty during subreg lowering by checking whether the input register is defined by an implicit def pseudo instruction, but instead I decided to perform the optimization during ISel on the DAG form during instruction selection. With what you're suggesting reg1024 = ... reg1026 = insert_subreg undef, reg1024, 1 reg1027 = insert_subreg reg1026, reg1025, 1 use reg1027 would be isel'd to then subreg lowered to: R6 = ... implicit def R01 <= this implicit def is unecessary R23 = R01 <= this copy is unnecessary R2 = R6 R45 = R23 R5 = R6 use R45 > 4: what's the benefit of isel a zext to insert_subreg and then > xform it to a 32-bit move? The xform to a 32-bit move is only the conservative behavior. The zext can be implicit if regalloc can coalesce subreg_inserts. > Why not just isel the zext to the move? It's not legal to coalesce > it away anyway. Actually it is legal to coalesce it. On x86-64 any write to a 32-bit register zero extends the value to 64-bits. For the insert_subreg under discussion the inserted value is a 32-bit result, that has in- fact already be zero extended implicitly. >> >> Also the current behavior is to use a 32-bit mov instruction for >> both zeroext and for anyext, I don't see how this is any different. >> >>>> -- >>>> Chris >>>> >>>>> Sent from my iPhone >>>>> >>>>> On Jul 28, 2007, at 12:17 AM, Christopher Lamb >>>>> wrote: >>>>> >>>>>> This patch changes the X86 back end to use the new subreg >>>>>> operations for appropriate truncate and extend operations. >>>>>> This should allow regression testing of the subreg feature >>>>>> going forward, as it's now used in a public target. >>>>>> >>>>>> The patch passed DejaGnu and all of SingleSource on my x86 >>>>>> machine, but there are changes for x86-64 as well which I >>>>>> haven't been able to test. Output assembly for x86-64 appears >>>>>> sane, but I'd appreciate someone giving the patch a try on >>>>>> their x86-64 system. Other 32-bit x86 testing is also >>>>>> appreciated. >>>>>> >>>>>> Thanks >>>>>> -- >>>>>> Christopher Lamb >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>> >>>> -- >>>> Christopher Lamb >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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 >> >> -- >> Christopher Lamb >> >> >> >> _______________________________________________ >> 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 -- Christopher Lamb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20070729/b56c180a/attachment.html