[llvm-commits] CVS: llvm-test/TEST.fourway.Makefile TEST.fourway.report

Jim Laskey jlaskey at apple.com
Fri Dec 8 08:12:30 PST 2006



Changes in directory llvm-test:

TEST.fourway.Makefile added (r1.1)
TEST.fourway.report added (r1.1)
---
Log message:

Add a report for comparing time and size of gcc vs llvm-gcc.

---
Diffs of the changes:  (+147 -0)

 TEST.fourway.Makefile |   83 ++++++++++++++++++++++++++++++++++++++++++++++++++
 TEST.fourway.report   |   64 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 147 insertions(+)


Index: llvm-test/TEST.fourway.Makefile
diff -c /dev/null llvm-test/TEST.fourway.Makefile:1.1
*** /dev/null	Fri Dec  8 10:12:25 2006
--- llvm-test/TEST.fourway.Makefile	Fri Dec  8 10:12:15 2006
***************
*** 0 ****
--- 1,83 ----
+ ##===- TEST.fourway.Makefile -------------------------------*- Makefile -*-===##
+ #
+ # This test tries running the compiler on all of the programs and
+ # reports on detailed compile time and resulting sizes.
+ #
+ ##===----------------------------------------------------------------------===##
+ 
+ Output/%.report.$(TEST).txt:
+ 	@echo "---------------------------------------------------------------"
+ 	@echo ">>> ========= '$*' Program"
+ 	@echo "---------------------------------------------------------------"
+ 
+ $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
+ test.$(TEST).%: $(LLVMGCC) $(LLVMGXX) $(CC) $(CXX) \
+ Output/%.report.$(TEST).txt \
+ Output/%.$(TEST).gcc.nodebug \
+ Output/%.$(TEST).gcc.debug \
+ Output/%.$(TEST).llvmgcc.nodebug \
+ Output/%.$(TEST).llvmgcc.debug
+ 	@-cat Output/$*.$(TEST).gcc.nodebug
+ 	@-cat Output/$*.$(TEST).gcc.debug
+ 	@-cat Output/$*.$(TEST).llvmgcc.nodebug
+ 	@-cat Output/$*.$(TEST).llvmgcc.debug
+ 
+ %.cpp:
+ 
+ %.c:
+ 
+ Output/%.$(TEST).gcc.nodebug: %.cpp $(CXX)
+ 	@-mkdir -p Output
+ 	@echo $@ > $@.tmp
+ 	@-(time -p $(CXX) $*.cpp -O0 -c -o $@.o) 2> $@.tmp > $@.tmp
+ 	@-(size $@.o) 2>> $@.tmp >> $@.tmp
+ 	@-(sed -e s/$$/gcc.nodebug/ $@.tmp) > $@
+ 
+ Output/%.$(TEST).gcc.debug: %.cpp $(CXX)
+ 	@-mkdir -p Output
+ 	@echo $@ > $@.tmp
+ 	@-(time -p $(CXX) $*.cpp -O0 -gdwarf-2 -c -o $@.o) 2> $@.tmp > $@.tmp
+ 	@-(size $@.o) 2>> $@.tmp >> $@.tmp
+ 	@-(sed -e s/$$/gcc.debug/ $@.tmp) > $@
+ 
+ Output/%.$(TEST).llvmgcc.nodebug: %.cpp $(LLVMGXX)
+ 	@-mkdir -p Output
+ 	@echo $@ > $@.tmp
+ 	@-(time -p $(LLVMGXX) $*.cpp -O0 -c -o $@.o) 2> $@.tmp > $@.tmp
+ 	@-(size $@.o) 2>> $@.tmp >> $@.tmp
+ 	@-(sed -e s/$$/llvmgcc.nodebug/ $@.tmp) > $@
+ 
+ Output/%.$(TEST).llvmgcc.debug: %.cpp $(LLVMGXX)
+ 	@-mkdir -p Output
+ 	@echo $@ > $@.tmp
+ 	@-(time -p $(LLVMGXX) $*.cpp -O0 -g -c -o $@.o) 2> $@.tmp > $@.tmp
+ 	@-(size $@.o) 2>> $@.tmp >> $@.tmp
+ 	@-(sed -e s/$$/llvmgcc.debug/ $@.tmp) > $@
+ 
+ Output/%.$(TEST).gcc.nodebug: %.c $(CC)
+ 	@-mkdir -p Output
+ 	@echo $@ > $@.tmp
+ 	@-(time -p $(CC) $*.c -O0 -c -o $@.o) 2> $@.tmp > $@.tmp
+ 	@-(size $@.o) 2>> $@.tmp >> $@.tmp
+ 	@-(sed -e s/$$/gcc.nodebug/ $@.tmp) > $@
+ 
+ Output/%.$(TEST).gcc.debug: %.c $(CC)
+ 	@-mkdir -p Output
+ 	@echo $@ > $@.tmp
+ 	@-(time -p $(CC) $*.c -O0 -gdwarf-2 -c -o $@.o) 2> $@.tmp > $@.tmp
+ 	@-(size $@.o) 2>> $@.tmp >> $@.tmp
+ 	@-(sed -e s/$$/gcc.debug/ $@.tmp) > $@
+ 
+ Output/%.$(TEST).llvmgcc.nodebug: %.c $(LLVMGCC)
+ 	@-mkdir -p Output
+ 	@echo $@ > $@.tmp
+ 	@-(time -p $(LLVMGCC) $*.c -O0 -c -o $@.o) 2> $@.tmp > $@.tmp
+ 	@-(size $@.o) 2>> $@.tmp >> $@.tmp
+ 	@-(sed -e s/$$/llvmgcc.nodebug/ $@.tmp) > $@
+ 
+ Output/%.$(TEST).llvmgcc.debug: %.c $(LLVMGCC)
+ 	@-mkdir -p Output
+ 	@echo $@ > $@.tmp
+ 	@-(time -p $(LLVMGCC) $*.c -O0 -g -c -o $@.o) 2> $@.tmp > $@.tmp
+ 	@-(size $@.o) 2>> $@.tmp >> $@.tmp
+ 	@-(sed -e s/$$/llvmgcc.debug/ $@.tmp) > $@


Index: llvm-test/TEST.fourway.report
diff -c /dev/null llvm-test/TEST.fourway.report:1.1
*** /dev/null	Fri Dec  8 10:12:30 2006
--- llvm-test/TEST.fourway.report	Fri Dec  8 10:12:15 2006
***************
*** 0 ****
--- 1,64 ----
+ ##=== TEST.fourway.report - Report description for llc tests ---*- perl -*-===##
+ #
+ # This file defines a report to be generated for the fourway test.
+ #
+ ##===----------------------------------------------------------------------===##
+ 
+ # Sort by name
+ $SortCol = 1;
+ $TrimRepeatedPrefix = 1;
+ 
+ # These are the columns for the report.  The first entry is the header for the
+ # column, the second is the regex to use to match the value.  Empty list create
+ # seperators, and closures may be put in for custom processing.
+ (
+ # Name
+  ["Name:" , '\'([^\']+)\' Program'],
+  [],
+ # Times
+  ["Time GND"  , 'real ([0-9.]+)gcc\.nodebug'],
+  ["Time GD"  , 'real ([0-9.]+)gcc\.debug'],
+  ["Time LND"  , 'real ([0-9.]+)llvmgcc\.nodebug'],
+  ["Time LD"  , 'real ([0-9.]+)llvmgcc\.debug'],
+  [],
+ # Text Sizes
+  ["Text GND",
+   '([0-9]+)\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9a-fA-F]+gcc.nodebug'],
+  ["Text GD",
+   '([0-9]+)\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9a-fA-F]+gcc.debug'],
+  ["Text LND",
+   '([0-9]+)\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9a-fA-F]+llvmgcc.nodebug'],
+  ["Text LD",
+   '([0-9]+)\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9a-fA-F]+llvmgcc.debug'],
+  [],
+ # Data Sizes
+  ["Data GND",
+   '[0-9]+\s+([0-9]+)\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9a-fA-F]+gcc.nodebug'],
+  ["Data GD",
+   '[0-9]+\s+([0-9]+)\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9a-fA-F]+gcc.debug'],
+  ["Data LND",
+   '[0-9]+\s+([0-9]+)\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9a-fA-F]+llvmgcc.nodebug'],
+  ["Data LD",
+   '[0-9]+\s+([0-9]+)\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9a-fA-F]+llvmgcc.debug'],
+  [],
+ # Other Sizes
+  ["Other GND",
+   '[0-9]+\s+[0-9]+\s+[0-9]+\s+([0-9]+)\s+[0-9]+\s+[0-9a-fA-F]+gcc.nodebug'],
+  ["Other GD",
+   '[0-9]+\s+[0-9]+\s+[0-9]+\s+([0-9]+)\s+[0-9]+\s+[0-9a-fA-F]+gcc.debug'],
+  ["Other LND",
+   '[0-9]+\s+[0-9]+\s+[0-9]+\s+([0-9]+)\s+[0-9]+\s+[0-9a-fA-F]+llvmgcc.nodebug'],
+  ["Other LD",
+   '[0-9]+\s+[0-9]+\s+[0-9]+\s+([0-9]+)\s+[0-9]+\s+[0-9a-fA-F]+llvmgcc.debug'],
+  [],
+ # Total Sizes
+  ["Total GND",
+   '[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+([0-9]+)\s+[0-9a-fA-F]+gcc.nodebug'],
+  ["Total GD",
+   '[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+([0-9]+)\s+[0-9a-fA-F]+gcc.debug'],
+  ["Total LND",
+   '[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+([0-9]+)\s+[0-9a-fA-F]+llvmgcc.nodebug'],
+  ["Total LD",
+   '[0-9]+\s+[0-9]+\s+[0-9]+\s+[0-9]+\s+([0-9]+)\s+[0-9a-fA-F]+llvmgcc.debug'],
+  [],
+  );






More information about the llvm-commits mailing list