summaryrefslogtreecommitdiff
path: root/utils/findmisopt
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-11-22 03:46:45 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-11-22 03:46:45 +0000
commit6d0fbd4185ae24f342459b1ed4ab45062bff1a66 (patch)
treecbcf4ea67a922087313d4b45542aaebfaa1e7832 /utils/findmisopt
parentb52818e778af6877300de6702057728682c1d921 (diff)
downloadllvm-6d0fbd4185ae24f342459b1ed4ab45062bff1a66.tar.gz
llvm-6d0fbd4185ae24f342459b1ed4ab45062bff1a66.tar.bz2
llvm-6d0fbd4185ae24f342459b1ed4ab45062bff1a66.tar.xz
Stop early if there is no mis-optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31893 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/findmisopt')
-rwxr-xr-xutils/findmisopt9
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/findmisopt b/utils/findmisopt
index 955c0c0030..3828c70b12 100755
--- a/utils/findmisopt
+++ b/utils/findmisopt
@@ -132,6 +132,15 @@ for sw in $all_switches ; do
fi
done
+# Terminate the previous output with a newline
+echo ""
+
+# Determine if we're done because none of the optimizations broke the program
+if [ "$switches" == " $all_switches" ] ; then
+ echo "The program did not miscompile"
+ exit 0
+fi
+
final=""
while [ ! -z "$switches" ] ; do
trimmed=`echo "$switches" | sed -e 's/^ *\(-[^ ]*\).*/\1/'`