diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-26 16:47:03 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-26 16:47:03 +0000 |
commit | b3a6901e66f55b35aa9e01bcb24134e6a65ea004 (patch) | |
tree | 4d57d73575ea3f7e30bf430920d6e96fa2a369c1 /test/timing/time | |
parent | 8cbe163cba77c772621f89ddb33793ac170b1fa2 (diff) |
Initial import of compiler-rt.
-
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@74292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/timing/time')
-rwxr-xr-x | test/timing/time | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/timing/time b/test/timing/time new file mode 100755 index 000000000..af14e5e6a --- /dev/null +++ b/test/timing/time @@ -0,0 +1,40 @@ +#!/bin/sh + +function test () { + arch=$1 + file=$2 + name=$3 + ldflags=$4 + + if gcc -arch $arch -Os $file $ldflags -DLIBNAME=$name + then + if ./a.out + then + rm ./a.out + else + echo "fail" + fi + else + echo "$FILE failed to compile" + fi +} + +INSTALLED=/usr/local/lib/system/libcompiler_rt.a + +for ARCH in i386 x86_64; do + for FILE in $(ls *.c); do + + echo "Timing $FILE for $ARCH" + + test $ARCH $FILE libgcc "" + test $ARCH $FILE untuned ../../Release/libcompiler_rt.Generic.a + test $ARCH $FILE tuned ../../Release/libcompiler_rt.Optimized.a + if [ -f "$INSTALLED" ]; then + test $ARCH $FILE installed $INSTALLED + fi + + echo " " + + done +done +exit |