[llvm-commits] [test-suite] r59329 - /test-suite/trunk/TEST.dbgopt.Makefile
Devang Patel
dpatel at apple.com
Fri Nov 14 14:56:24 PST 2008
Author: dpatel
Date: Fri Nov 14 16:56:24 2008
New Revision: 59329
URL: http://llvm.org/viewvc/llvm-project?rev=59329&view=rev
Log:
Test to check optimizer's behavior in presense of debugging information.
If input.bc includes llvm.dbg intrinsics and llvm.dbg variables then
first.bc and second.bc in following should match. Otherwise debugging
information is influencing the optimizer.
$ opt input.bc -strip -std-compile-output -o first.bc
$ opt input.bc -std-compile-output -strip -o second.bc
Added:
test-suite/trunk/TEST.dbgopt.Makefile
Added: test-suite/trunk/TEST.dbgopt.Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.dbgopt.Makefile?rev=59329&view=auto
==============================================================================
--- test-suite/trunk/TEST.dbgopt.Makefile (added)
+++ test-suite/trunk/TEST.dbgopt.Makefile Fri Nov 14 16:56:24 2008
@@ -0,0 +1,43 @@
+##===- TEST.dbgopt.Makefile --------------------------------*- Makefile -*-===##
+#
+# This test checks whether presense of debugging information influences
+# the optimizer or not.
+#
+# If input.bc includes llvm.dbg intrinsics and llvm.dbg variables then
+# first.bc and second.bc should match. Otherwise debugging information
+# is influencing the optimizer.
+#
+# $ opt input.bc -strip -std-compile-output -o first.bc
+# $ opt input.bc -std-compile-output -strip -o second.bc
+#
+##===----------------------------------------------------------------------===##
+
+TESTNAME = $*
+
+$(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
+test.$(TEST).%: Output/%.diff
+
+Output/%.diff: %.cpp Output/.dir $(LLVMGXX) $(LOPT) $(LDIS)
+ $(LLVMGXX) $*.cpp -g --emit-llvm -c -o Output/$*.bc
+ $(LOPT) Output/$*.bc -strip -std-compile-opts -f -o Output/$*.bc
+ $(LDIS) Output/$*.bc -f -o Output/$*.first.ll
+ $(LOPT) Output/$*.bc -std-compile-opts -strip -f -o Output/$*.bc
+ $(LDIS) Output/$*.bc -f -o Output/$*.second.ll
+ @-if diff Output/$*.first.ll Output/$*.second.ll > Output/$*.diff; then \
+ echo "--------- TEST-PASS: $*"; \
+ else \
+ echo "--------- TEST-FAIL: $*"; \
+ fi
+
+
+Output/%.diff: %.c Output/.dir $(LLVMGCC) $(LOPT) $(LDIS)
+ $(LLVMGCC) $*.c -g --emit-llvm -c -o Output/$*.bc
+ $(LOPT) Output/$*.bc -strip -std-compile-opts -f -o Output/$*.bc
+ $(LDIS) Output/$*.bc -f -o Output/$*.first.ll
+ $(LOPT) Output/$*.bc -std-compile-opts -strip -f -o Output/$*.bc
+ $(LDIS) Output/$*.bc -f -o Output/$*.second.ll
+ @-if diff Output/$*.first.ll Output/$*.second.ll > Output/$*.diff; then \
+ echo "--------- TEST-PASS: $*"; \
+ else \
+ echo "--------- TEST-FAIL: $*"; \
+ fi
More information about the llvm-commits
mailing list