Changes in directory llvm-test/SingleSource/Benchmarks/Shootout:
ary3.c updated: 1.4 -> 1.5 fib2.c updated: 1.4 -> 1.5 hash.c updated: 1.2 -> 1.3 heapsort.c updated: 1.3 -> 1.4 lists.c updated: 1.6 -> 1.7 matrix.c updated: 1.3 -> 1.4 methcall.c updated: 1.2 -> 1.3 nestedloop.c updated: 1.2 -> 1.3 objinst.c updated: 1.3 -> 1.4 random.c updated: 1.4 -> 1.5 sieve.c updated: 1.3 -> 1.4 --- Log message: Implement SMALL_PROBLEM_SIZE. --- Diffs of the changes: (+77 -22) ary3.c | 9 +++++++-- fib2.c | 9 +++++++-- hash.c | 9 +++++++-- heapsort.c | 9 +++++++-- lists.c | 9 +++++++-- matrix.c | 9 +++++++-- methcall.c | 9 +++++++-- nestedloop.c | 9 +++++++-- objinst.c | 9 +++++++-- random.c | 9 +++++++-- sieve.c | 9 +++++++-- 11 files changed, 77 insertions(+), 22 deletions(-) Index: llvm-test/SingleSource/Benchmarks/Shootout/ary3.c diff -u llvm-test/SingleSource/Benchmarks/Shootout/ary3.c:1.4 llvm-test/SingleSource/Benchmarks/Shootout/ary3.c:1.5 --- llvm-test/SingleSource/Benchmarks/Shootout/ary3.c:1.4 Fri Jul 16 13:11:07 2004 +++ llvm-test/SingleSource/Benchmarks/Shootout/ary3.c Thu May 3 11:55:46 2007 @@ -1,5 +1,5 @@ /* -*- mode: c -*- - * $Id: ary3.c,v 1.4 2004/07/16 18:11:07 brukman Exp $ + * $Id: ary3.c,v 1.5 2007/05/03 16:55:46 laurov Exp $ * http://www.bagley.org/~doug/shootout/ * * this program is modified from: @@ -15,7 +15,12 @@ #include <stdlib.h> int main(int argc, char *argv[]) { - int n = ((argc == 2) ? atoi(argv[1]) : 1500000); +#ifdef SMALL_PROBLEM_SIZE +#define LENGTH 150000 +#else +#define LENGTH 1500000 +#endif + int n = ((argc == 2) ? atoi(argv[1]) : LENGTH); int i, k, *x, *y; x = (int *) calloc(n, sizeof(int)); Index: llvm-test/SingleSource/Benchmarks/Shootout/fib2.c diff -u llvm-test/SingleSource/Benchmarks/Shootout/fib2.c:1.4 llvm-test/SingleSource/Benchmarks/Shootout/fib2.c:1.5 --- llvm-test/SingleSource/Benchmarks/Shootout/fib2.c:1.4 Thu May 25 13:31:14 2006 +++ llvm-test/SingleSource/Benchmarks/Shootout/fib2.c Thu May 3 11:55:46 2007 @@ -1,5 +1,5 @@ /* -*- mode: c -*- - * $Id: fib2.c,v 1.4 2006/05/25 18:31:14 lattner Exp $ + * $Id: fib2.c,v 1.5 2007/05/03 16:55:46 laurov Exp $ * http://www.bagley.org/~doug/shootout/ */ @@ -16,7 +16,12 @@ int main(int argc, char *argv[]) { - int N = ((argc == 2) ? atoi(argv[1]) : 43); +#ifdef SMALL_PROBLEM_SIZE +#define LENGTH 40 +#else +#define LENGTH 43 +#endif + int N = ((argc == 2) ? atoi(argv[1]) : LENGTH); printf("%ld\n", fib(N)); return(0); } Index: llvm-test/SingleSource/Benchmarks/Shootout/hash.c diff -u llvm-test/SingleSource/Benchmarks/Shootout/hash.c:1.2 llvm-test/SingleSource/Benchmarks/Shootout/hash.c:1.3 --- llvm-test/SingleSource/Benchmarks/Shootout/hash.c:1.2 Tue Jun 8 12:21:42 2004 +++ llvm-test/SingleSource/Benchmarks/Shootout/hash.c Thu May 3 11:55:46 2007 @@ -1,5 +1,5 @@ /* -*- mode: c -*- - * $Id: hash.c,v 1.2 2004/06/08 17:21:42 lattner Exp $ + * $Id: hash.c,v 1.3 2007/05/03 16:55:46 laurov Exp $ * http://www.bagley.org/~doug/shootout/ */ @@ -9,7 +9,12 @@ #include "simple_hash.h" int main(int argc, char *argv[]) { - int i, c=0, n = ((argc == 2) ? atoi(argv[1]) : 3500000); +#ifdef SMALL_PROBLEM_SIZE +#define LENGTH 350000 +#else +#define LENGTH 3500000 +#endif + int i, c=0, n = ((argc == 2) ? atoi(argv[1]) : LENGTH); char buf[32]; struct ht_ht *ht = ht_create(n); Index: llvm-test/SingleSource/Benchmarks/Shootout/heapsort.c diff -u llvm-test/SingleSource/Benchmarks/Shootout/heapsort.c:1.3 llvm-test/SingleSource/Benchmarks/Shootout/heapsort.c:1.4 --- llvm-test/SingleSource/Benchmarks/Shootout/heapsort.c:1.3 Tue Jun 8 12:21:42 2004 +++ llvm-test/SingleSource/Benchmarks/Shootout/heapsort.c Thu May 3 11:55:46 2007 @@ -1,5 +1,5 @@ /* -*- mode: c -*- - * $Id: heapsort.c,v 1.3 2004/06/08 17:21:42 lattner Exp $ + * $Id: heapsort.c,v 1.4 2007/05/03 16:55:46 laurov Exp $ * http://www.bagley.org/~doug/shootout/ */ @@ -56,7 +56,12 @@ int main(int argc, char *argv[]) { - int N = ((argc == 2) ? atoi(argv[1]) : 8000000); +#ifdef SMALL_PROBLEM_SIZE +#define LENGTH 800000 +#else +#define LENGTH 8000000 +#endif + int N = ((argc == 2) ? atoi(argv[1]) : LENGTH); double *ary; int i; Index: llvm-test/SingleSource/Benchmarks/Shootout/lists.c diff -u llvm-test/SingleSource/Benchmarks/Shootout/lists.c:1.6 llvm-test/SingleSource/Benchmarks/Shootout/lists.c:1.7 --- llvm-test/SingleSource/Benchmarks/Shootout/lists.c:1.6 Tue Jun 8 12:21:42 2004 +++ llvm-test/SingleSource/Benchmarks/Shootout/lists.c Thu May 3 11:55:46 2007 @@ -1,5 +1,5 @@ /* -*- mode: c -*- - * $Id: lists.c,v 1.6 2004/06/08 17:21:42 lattner Exp $ + * $Id: lists.c,v 1.7 2007/05/03 16:55:46 laurov Exp $ * http://www.bagley.org/~doug/shootout/ */ @@ -217,7 +217,12 @@ } int main(int argc, char *argv[]) { - int n = ((argc == 2) ? atoi(argv[1]) : 3000000); +#ifdef SMALL_PROBLEM_SIZE +#define LENGTH 300000 +#else +#define LENGTH 3000000 +#endif + int n = ((argc == 2) ? atoi(argv[1]) : LENGTH); int result = 0; while(n--) result = test_lists(); printf("%d\n", result); Index: llvm-test/SingleSource/Benchmarks/Shootout/matrix.c diff -u llvm-test/SingleSource/Benchmarks/Shootout/matrix.c:1.3 llvm-test/SingleSource/Benchmarks/Shootout/matrix.c:1.4 --- llvm-test/SingleSource/Benchmarks/Shootout/matrix.c:1.3 Tue Jun 8 12:21:42 2004 +++ llvm-test/SingleSource/Benchmarks/Shootout/matrix.c Thu May 3 11:55:46 2007 @@ -1,5 +1,5 @@ /* -*- mode: c -*- - * $Id: matrix.c,v 1.3 2004/06/08 17:21:42 lattner Exp $ + * $Id: matrix.c,v 1.4 2007/05/03 16:55:46 laurov Exp $ * http://www.bagley.org/~doug/shootout/ */ @@ -48,7 +48,12 @@ } int main(int argc, char *argv[]) { - int i, n = ((argc == 2) ? atoi(argv[1]) : 3000000); +#ifdef SMALL_PROBLEM_SIZE +#define LENGTH 300000 +#else +#define LENGTH 3000000 +#endif + int i, n = ((argc == 2) ? atoi(argv[1]) : LENGTH); int **m1 = mkmatrix(SIZE, SIZE); int **m2 = mkmatrix(SIZE, SIZE); Index: llvm-test/SingleSource/Benchmarks/Shootout/methcall.c diff -u llvm-test/SingleSource/Benchmarks/Shootout/methcall.c:1.2 llvm-test/SingleSource/Benchmarks/Shootout/methcall.c:1.3 --- llvm-test/SingleSource/Benchmarks/Shootout/methcall.c:1.2 Tue Jun 8 12:21:42 2004 +++ llvm-test/SingleSource/Benchmarks/Shootout/methcall.c Thu May 3 11:55:46 2007 @@ -1,5 +1,5 @@ /* -*- mode: c -*- - * $Id: methcall.c,v 1.2 2004/06/08 17:21:42 lattner Exp $ + * $Id: methcall.c,v 1.3 2007/05/03 16:55:46 laurov Exp $ * http://www.bagley.org/~doug/shootout/ */ @@ -66,7 +66,12 @@ int main(int argc, char *argv[]) { - int i, n = ((argc == 2) ? atoi(argv[1]) : 500000000); +#ifdef SMALL_PROBLEM_SIZE +#define LENGTH 50000000 +#else +#define LENGTH 500000000 +#endif + int i, n = ((argc == 2) ? atoi(argv[1]) : LENGTH); Toggle *tog; NthToggle *ntog; char val = true; Index: llvm-test/SingleSource/Benchmarks/Shootout/nestedloop.c diff -u llvm-test/SingleSource/Benchmarks/Shootout/nestedloop.c:1.2 llvm-test/SingleSource/Benchmarks/Shootout/nestedloop.c:1.3 --- llvm-test/SingleSource/Benchmarks/Shootout/nestedloop.c:1.2 Tue Jun 8 12:21:42 2004 +++ llvm-test/SingleSource/Benchmarks/Shootout/nestedloop.c Thu May 3 11:55:46 2007 @@ -1,5 +1,5 @@ /* -*- mode: c -*- - * $Id: nestedloop.c,v 1.2 2004/06/08 17:21:42 lattner Exp $ + * $Id: nestedloop.c,v 1.3 2007/05/03 16:55:46 laurov Exp $ * http://www.bagley.org/~doug/shootout/ */ @@ -8,7 +8,12 @@ int main(int argc, char *argv[]) { - int n = ((argc == 2) ? atoi(argv[1]) : 46); +#ifdef SMALL_PROBLEM_SIZE +#define LENGTH 30 +#else +#define LENGTH 46 +#endif + int n = ((argc == 2) ? atoi(argv[1]) : LENGTH); int a, b, c, d, e, f, x=0; for (a=0; a<n; a++) Index: llvm-test/SingleSource/Benchmarks/Shootout/objinst.c diff -u llvm-test/SingleSource/Benchmarks/Shootout/objinst.c:1.3 llvm-test/SingleSource/Benchmarks/Shootout/objinst.c:1.4 --- llvm-test/SingleSource/Benchmarks/Shootout/objinst.c:1.3 Tue Jun 8 12:21:42 2004 +++ llvm-test/SingleSource/Benchmarks/Shootout/objinst.c Thu May 3 11:55:46 2007 @@ -1,5 +1,5 @@ /* -*- mode: c -*- - * $Id: objinst.c,v 1.3 2004/06/08 17:21:42 lattner Exp $ + * $Id: objinst.c,v 1.4 2007/05/03 16:55:46 laurov Exp $ * http://www.bagley.org/~doug/shootout/ */ @@ -66,7 +66,12 @@ int main(int argc, char *argv[]) { - int i, n = ((argc == 2) ? atoi(argv[1]) : 70000000); +#ifdef SMALL_PROBLEM_SIZE +#define LENGTH 7000000 +#else +#define LENGTH 70000000 +#endif + int i, n = ((argc == 2) ? atoi(argv[1]) : LENGTH); Toggle *tog; NthToggle *ntog; Index: llvm-test/SingleSource/Benchmarks/Shootout/random.c diff -u llvm-test/SingleSource/Benchmarks/Shootout/random.c:1.4 llvm-test/SingleSource/Benchmarks/Shootout/random.c:1.5 --- llvm-test/SingleSource/Benchmarks/Shootout/random.c:1.4 Tue Jun 8 12:21:42 2004 +++ llvm-test/SingleSource/Benchmarks/Shootout/random.c Thu May 3 11:55:46 2007 @@ -1,5 +1,5 @@ /* -*- mode: c -*- - * $Id: random.c,v 1.4 2004/06/08 17:21:42 lattner Exp $ + * $Id: random.c,v 1.5 2007/05/03 16:55:46 laurov Exp $ * http://www.bagley.org/~doug/shootout/ */ @@ -21,7 +21,12 @@ } int main(int argc, char *argv[]) { - int N = ((argc == 2) ? atoi(argv[1]) : 400000000) - 1; +#ifdef SMALL_PROBLEM_SIZE +#define LENGTH 40000000 +#else +#define LENGTH 400000000 +#endif + int N = ((argc == 2) ? atoi(argv[1]) : LENGTH) - 1; while (N--) { gen_random(100.0); Index: llvm-test/SingleSource/Benchmarks/Shootout/sieve.c diff -u llvm-test/SingleSource/Benchmarks/Shootout/sieve.c:1.3 llvm-test/SingleSource/Benchmarks/Shootout/sieve.c:1.4 --- llvm-test/SingleSource/Benchmarks/Shootout/sieve.c:1.3 Tue Jun 8 12:21:42 2004 +++ llvm-test/SingleSource/Benchmarks/Shootout/sieve.c Thu May 3 11:55:46 2007 @@ -1,5 +1,5 @@ /* -*- mode: c -*- - * $Id: sieve.c,v 1.3 2004/06/08 17:21:42 lattner Exp $ + * $Id: sieve.c,v 1.4 2007/05/03 16:55:46 laurov Exp $ * http://www.bagley.org/~doug/shootout/ */ @@ -8,7 +8,12 @@ int main(int argc, char *argv[]) { - int NUM = ((argc == 2) ? atoi(argv[1]) : 170000); +#ifdef SMALL_PROBLEM_SIZE +#define LENGTH 17000 +#else +#define LENGTH 170000 +#endif + int NUM = ((argc == 2) ? atoi(argv[1]) : LENGTH); static char flags[8192 + 1]; long i, k; int count = 0; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits