[llvm-commits] [poolalloc] r137581 - in /poolalloc/trunk/test/dsa/var_arg: basic.c context.c va_copy.c

Will Dietz wdietz2 at illinois.edu
Sun Aug 14 02:56:18 PDT 2011


Author: wdietz2
Date: Sun Aug 14 04:56:18 2011
New Revision: 137581

URL: http://llvm.org/viewvc/llvm-project?rev=137581&view=rev
Log:
test/dsa/var_arg: Remove c versions for tests we have *{_32,_64}.ll versions of.

The c versions were just helpful for seeing where the .ll files came from,
    and for verifying they ran okay with optimizations based on ds-aa.
None of these reasons are useful (ds-aa is gone) for these (since they have
    .ll versions that do the actual testing).

Removed:
    poolalloc/trunk/test/dsa/var_arg/basic.c
    poolalloc/trunk/test/dsa/var_arg/context.c
    poolalloc/trunk/test/dsa/var_arg/va_copy.c

Removed: poolalloc/trunk/test/dsa/var_arg/basic.c
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/var_arg/basic.c?rev=137580&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/var_arg/basic.c (original)
+++ poolalloc/trunk/test/dsa/var_arg/basic.c (removed)
@@ -1,33 +0,0 @@
-#include <stdarg.h>
-#include <stdio.h>
-//This is a basic use of vararg pointer use
-
-//--build the code into a .bc
-//RUN: clang -O0 %s -S -emit-llvm -o - | llvm-as > %t.bc
-//--check if ds-aa breaks, breaks opts, or results in miscompiled code
-//RUN: lli %t.bc > %t.refout
-//RUN: dsaopt %t.bc -ds-aa -O3 -o - | lli > %t.out
-//RUN: diff %t.refout %t.out
-//--check properties of this particular test
-//N/A
-
-static int get( int unused, ... )
-{
-  va_list ap;
-  va_start( ap, unused );
-
-  int *val = va_arg( ap, int* );
-
-  va_end( ap );
-
-  return *val;
-}
-
-int main()
-{
-  int stack_val = 5;
-
-  int ret = get( 0, &stack_val );
-
-  return ret - 5;
-}

Removed: poolalloc/trunk/test/dsa/var_arg/context.c
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/var_arg/context.c?rev=137580&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/var_arg/context.c (original)
+++ poolalloc/trunk/test/dsa/var_arg/context.c (removed)
@@ -1,42 +0,0 @@
-#include <stdarg.h>
-#include <stdio.h>
-//This is a test of context-sensitive var-arg handling
-
-//--build the code into a .bc
-//RUN: clang -O0 %s -S -emit-llvm -o - | llvm-as > %t.bc
-//--check if ds-aa breaks, breaks opts, or results in miscompiled code
-//RUN: lli %t.bc > %t.refout
-//RUN: dsaopt %t.bc -ds-aa -O3 -o - | lli > %t.out
-//RUN: dsaopt %t.bc -ds-aa -gvn -o - | lli > %t.out2
-//RUN: diff %t.refout %t.out
-//RUN: diff %t.refout %t.out2
-
-
-static int * get( int unused, ... )
-{
-  va_list ap;
-  va_start( ap, unused );
-
-  int * ret = va_arg( ap, int * );
-
-  va_end( ap );
-
-  return ret;
-}
-
-int main()
-{
-  int val1 = 1, val2 = 2;
-  int *p1 = &val1, *p2 = &val2;
-  int *ret1, *ret2;
-
-  ret1 = get( 0, p1 );
-  ret2 = get( 0, p2 );
-
-  if ( *ret1 + 1 == *ret2 )
-  {
-    return 0;
-  }
-
-  return -1;
-}

Removed: poolalloc/trunk/test/dsa/var_arg/va_copy.c
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/test/dsa/var_arg/va_copy.c?rev=137580&view=auto
==============================================================================
--- poolalloc/trunk/test/dsa/var_arg/va_copy.c (original)
+++ poolalloc/trunk/test/dsa/var_arg/va_copy.c (removed)
@@ -1,46 +0,0 @@
-#include <stdarg.h>
-#include <stdio.h>
-//This tests va_copy, which should just merge it's arguments...
-
-//--build the code into a .bc
-//RUN: clang -O0 %s -S -emit-llvm -o - | llvm-as > %t.bc
-//--check if ds-aa breaks, breaks opts, or results in miscompiled code
-//RUN: lli %t.bc > %t.refout
-//RUN: dsaopt %t.bc -ds-aa -O3 -o - 2>/dev/null | lli > %t.out
-//RUN: diff %t.refout %t.out
-//--check properties of this particular test
-//RUN: dsaopt %t.bc -ds-aa -aa-eval -o /dev/null \
-//  RUN: -print-all-alias-modref-info >& %t.aa
-//FIXME: Find a better way to get at this information...
-//--get the registers loaded from val1 and val2
-//RUN: llvm-dis %t.bc -f -o %t.ll
-//RUN: cat %t.ll | grep load | grep "@val1" | sed -e {s/ =.*$//} -e {s/^\[ \]*//} > %t.val1
-//RUN: cat %t.ll | grep load | grep "@val2" | sed -e {s/ =.*$//} -e {s/^\[ \]*//} > %t.val2
-//--verify that they alias (they're int*'s)
-//RUN: cat %t.aa | grep -f %t.val1 | grep -f %t.val2 | grep {^\[ \]*MayAlias}
-
-int *val1, *val2;
-
-static int get( int unused, ... )
-{
-  va_list ap, ap_copy;
-  va_start( ap, unused );
-  va_copy( ap_copy, ap );
-
-  val1 = va_arg( ap, int* );
-  va_end( ap );
-
-  val2 = va_arg( ap_copy, int* );
-  va_end( ap_copy );
-
-  return *val1 - *val2;
-}
-
-int main()
-{
-  int stack_val = 5;
-
-  int ret = get( 0, &stack_val );
-
-  return ret;
-}





More information about the llvm-commits mailing list