[llvm-commits] [poolalloc] r122698 - in /poolalloc/trunk/test/dsa/callgraph: scc3.c scc3a.c
Arushi Aggarwal
aggarwa4 at illinois.edu
Sun Jan 2 09:51:38 PST 2011
Author: aggarwa4
Date: Sun Jan 2 11:51:38 2011
New Revision: 122698
URL: http://llvm.org/viewvc/llvm-project?rev=122698&view=rev
Log:
Updated tests.
Added:
poolalloc/trunk/test/dsa/callgraph/scc3a.c
Modified:
poolalloc/trunk/test/dsa/callgraph/scc3.c
Modified: poolalloc/trunk/test/dsa/callgraph/scc3.c
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/callgraph/scc3.c?rev=122698&r1=122697&r2=122698&view=diff
==============================================================================
--- poolalloc/trunk/test/dsa/callgraph/scc3.c (original)
+++ poolalloc/trunk/test/dsa/callgraph/scc3.c Sun Jan 2 11:51:38 2011
@@ -10,12 +10,12 @@
// we inline the SCC graph again, pulling in the unresolved call site
// again. This causes an infinte looping in BU.
-;XFAIL:*
-;RUN: not
+//RUN: llvm-gcc %s -c --emit-llvm -o - | \
+//RUN: dsaopt -dsa-bu -dsa-td -disable-output
typedef int* (*funcptr)(int *);
-static int* A();
+static int* A(void);
static int* func(int * arg) {
A();
Added: poolalloc/trunk/test/dsa/callgraph/scc3a.c
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/callgraph/scc3a.c?rev=122698&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/callgraph/scc3a.c (added)
+++ poolalloc/trunk/test/dsa/callgraph/scc3a.c Sun Jan 2 11:51:38 2011
@@ -0,0 +1,47 @@
+// similiar to scc3. But with 2 SCCs
+
+//RUN: llvm-gcc %s -c --emit-llvm -o - | \
+//RUN: dsaopt -dsa-bu -dsa-td -disable-output
+
+
+typedef int* (*funcptr)(int *);
+
+static int* A1(void);
+static int* A2(void);
+
+static int* func1(int * arg) {
+ A1();
+ return arg;
+}
+static int* func2(int * arg) {
+ A2();
+ return arg;
+}
+
+static int* C1(funcptr f, int *arg) {
+ (*f)(arg);
+}
+static int* C2(funcptr f, int *arg) {
+ (*f)(arg);
+}
+
+static int *B1() {
+ func1(A1());
+ return C1(func2, A1());
+}
+static int *B2() {
+ func2(A2());
+ return C2(func1, A2());
+}
+static int* A1() {
+ return func1(B1());
+}
+
+static int* A2() {
+ return func2(B2());
+}
+
+static int* D() {
+ A2();
+ return A1();
+}
More information about the llvm-commits
mailing list