[llvm-commits] CVS: llvm/test/Regression/Reoptimizer/ticm/.cvsignore ticm.c
Michael Brukman
brukman at cs.uiuc.edu
Mon Oct 21 20:47:01 PDT 2002
Changes in directory llvm/test/Regression/Reoptimizer/ticm:
.cvsignore added (r1.1)
ticm.c updated: 1.1 -> 1.2
---
Log message:
Made ticm execute 5 loops instead of just one, this gives more profile
information: there is only 77% time spent in dummyFunction now.
.cvsignore helps to not have to see 7 out.* files when running `cvs up'.
---
Diffs of the changes:
Index: llvm/test/Regression/Reoptimizer/ticm/ticm.c
diff -u llvm/test/Regression/Reoptimizer/ticm/ticm.c:1.1 llvm/test/Regression/Reoptimizer/ticm/ticm.c:1.2
--- llvm/test/Regression/Reoptimizer/ticm/ticm.c:1.1 Mon Oct 21 13:23:54 2002
+++ llvm/test/Regression/Reoptimizer/ticm/ticm.c Mon Oct 21 20:46:12 2002
@@ -1,7 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
-#define NMAX 1992
+#define NMAX 500
int
main(int argc, char** argv)
@@ -11,19 +11,20 @@
N = (argc >= 2)? atoi(argv[1]) : NMAX;
k = N;
-#define FORLOOP for (i=0; i < N*N; i++) \
+#define FORLOOP sum = 0; \
+ for (i=0; i < N*N; i++) \
{ \
if (N-i >= NMAX) \
k = k+1; \
sum += i * k * k; \
- }
+ } \
+ printf("N = %d, k = %d, sum = %d\n", N, k, sum);
FORLOOP;
FORLOOP;
FORLOOP;
FORLOOP;
FORLOOP;
-
- printf("N = %d, k = %d, sum = %d\n", N, k, sum);
+
return 0;
}
More information about the llvm-commits
mailing list