[llvm-commits] [llvm-top] r40425 - /llvm-top/trunk/library.sh
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 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40426 - /llvm/trunk/Makefile.rules
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 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm-gcc-4.0] r40427 - /llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp
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])); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm-gcc-4.2] r40428 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
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])); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40429 - /llvm/trunk/Makefile.rules
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 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm-top] r40430 - /llvm-top/trunk/library.sh
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 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm-gcc-4.2] r40431 - /llvm-gcc-4.2/trunk/gcc/passes.c
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; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm-gcc-4.0] r40432 - in /llvm-gcc-4.0/trunk/gcc: common.opt llvm-backend.cpp
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"); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm-gcc-4.2] r40433 - in /llvm-gcc-4.2/trunk/gcc: common.opt llvm-backend.cpp
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"); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [test-suite] r40434 - in /test-suite/trunk/SingleSource/UnitTests/Vector/SSE: sse.expandfft.c sse.isamax.c sse.stepfft.c
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; jhttp://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm-gcc-4.2] r40435 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
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: ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[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 arra
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:5
[llvm-commits] CVS: llvm-www/releases/index.html
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.htmlMon Jul 23 09:53:24 2007 @@ -74,6 +74,7 @@ http://llvm.org";>Current LLVM documentation +Documentation for LLVM 2.0 Documentation for LLVM 1.9 Documentation for LLVM 1.8 Documentation for LLVM 1.7 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] ScalarEvolution fix for treeadd
> +// 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. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[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
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 0x4010 %D1 = global double 0x4010 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:
Re: [llvm-commits] ScalarEvolution fix for treeadd
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 ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40439 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
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); -} - } } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40440 - /llvm/trunk/lib/Transforms/Scalar/FastDSE.cpp
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 // ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] ScalarEvolution fix for treeadd
> > 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. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[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
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 @@ -* ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm-gcc-4.0] r40442 - /llvm-gcc-4.0/trunk/gcc/llvm-convert.cpp
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" ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40443 - in /llvm/trunk/lib: CodeGen/DwarfWriter.cpp CodeGen/SelectionDAG/SelectionDAG.cpp Target/X86/X86ISelLowering.cpp
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 && ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[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.
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/Transfo
Re: [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 PartialSt
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 whole
[llvm-commits] [llvm] r40445 - in /llvm/trunk: include/llvm/Transforms/Scalar.h lib/Transforms/Scalar/FastDLE.cpp
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 furt
[llvm-commits] [llvm] r40446 - /llvm/trunk/include/llvm/Transforms/Scalar.h
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(); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40447 - /llvm/trunk/include/llvm/LinkAllPasses.h
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(); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40448 - /llvm/trunk/lib/Transforms/Scalar/FastDLE.cpp
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]; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40449 - in /llvm/trunk/test/Transforms/DeadLoadElimination: ./ dg.exp simple.ll volatile.ll
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 +} ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40451 - /llvm/trunk/test/CFrontend/exact-div-expr.c
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; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40453 - /llvm/trunk/lib/VMCore/Verifier.cpp
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); } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r40453 - /llvm/trunk/lib/VMCore/Verifier.cpp
> + 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@cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] [llvm] r40453 - /llvm/trunk/lib/VMCore/Verifier.cpp
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@cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > > ___ > llvm-commits mailing list > llvm-commits@cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40455 - /llvm/trunk/lib/VMCore/Verifier.cpp
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); } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40456 - in /llvm/trunk/lib/Transforms/Scalar: FastDLE.cpp RedundantLoadElimination.cpp
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; -} - - _
[llvm-commits] [llvm] r40457 - in /llvm/trunk: include/llvm/LinkAllPasses.h include/llvm/Transforms/Scalar.h lib/Transforms/Scalar/RedundantLoadElimination.cpp test/Transforms/DeadLoadElimination/ tes
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/RedundantLoadElimin
[llvm-commits] [llvm] r40458 - in /llvm/trunk: lib/Analysis/PostDominators.cpp test/Transforms/ADCE/2007-07-23-InfiniteLoop.ll
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 +] +} ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits