[llvm-commits] CVS: llvm/test/Programs/Makefile.programs

Vikram Adve vadve at cs.uiuc.edu
Tue Jun 3 13:58:07 PDT 2003


Changes in directory llvm/test/Programs:

Makefile.programs updated: 1.53 -> 1.54

---
Log message:

Improved how tracing can be used: 
-- added new targets %.trace-out-llc and %.trace-out-cbe
-- either TRACE=yes or TRACEM=yes is still needed and chooses how to trace


---
Diffs of the changes:

Index: llvm/test/Programs/Makefile.programs
diff -u llvm/test/Programs/Makefile.programs:1.53 llvm/test/Programs/Makefile.programs:1.54
--- llvm/test/Programs/Makefile.programs:1.53	Sun Jun  1 21:01:59 2003
+++ llvm/test/Programs/Makefile.programs	Tue Jun  3 13:56:57 2003
@@ -89,6 +89,8 @@
 # Generated code for llc (which does not require the target platform)
 LLCCODEGEN := $(addsuffix .llc.s,   $(PREFIXED_PROGRAMS_TO_TEST))
 CBECODEGEN := $(addsuffix .cbe.c,   $(PREFIXED_PROGRAMS_TO_TEST))
+LLCTRACECODEGEN := $(addsuffix .trace.llc.s, $(PREFIXED_PROGRAMS_TO_TEST))
+CBETRACECODEGEN := $(addsuffix .trace.cbe.c, $(PREFIXED_PROGRAMS_TO_TEST))
 
 # Output produced by programs run
 GCCOUTPUT := $(addsuffix .ll,       $(addprefix Output/,$basename $(Source)))
@@ -112,6 +114,7 @@
 .PRECIOUS: Output/%.diff-lli Output/%.diff-jit
 .PRECIOUS: Output/%.diff-llc Output/%.diff-cbe
 
+
 # Regardless of what other options are specified, build the program's bytecode
 # representation.
 all:: $(BYTECODE)
@@ -122,13 +125,23 @@
 endif
 
 ifndef DISABLE_LLC
+ifeq ($(DOTRACING), yes)
+all:: $(LLCTRACECODEGEN)
+DISABLE_LLC_DIFFS = 1
+else
 all:: $(LLCCODEGEN)
+endif
 else
 DISABLE_LLC_DIFFS = 1
 endif
 
 ifndef DISABLE_CBE
+ifeq ($(DOTRACING), yes)
+all:: $(CBETRACECODEGEN)
+DISABLE_CBE_DIFFS = 1
+else
 all:: $(CBECODEGEN)
+endif
 else
 DISABLE_CBE_DIFFS = 1
 endif
@@ -200,6 +213,14 @@
 Output/%.cbe: Output/%.cbe.c
 	-$(CC) -o $@ $< $(LDFLAGS) $(CFLAGS)
 
+$(PROGRAMS_TO_TEST:%=Output/%.trace.cbe.c): \
+Output/%.trace.cbe.c: Output/%.llvm.trace.bc $(LDIS)
+	-$(LDIS) -c < $< > $@
+
+$(PROGRAMS_TO_TEST:%=Output/%.trace.cbe): \
+Output/%.trace.cbe: Output/%.trace.cbe.c
+	-$(CC) -o $@ $< $(LDFLAGS) $(CFLAGS) $(TRACELIBS)
+
 #
 # Compile a linked program to machine code with LLC.
 #
@@ -207,12 +228,20 @@
 Output/%.llc.s: Output/%.llvm.bc $(LLC)
 	-$(LLC) $(LLCFLAGS) -f $< -o $@
 
+$(PROGRAMS_TO_TEST:%=Output/%.trace.llc.s): \
+Output/%.trace.llc.s: Output/%.llvm.bc $(LLC)
+	-$(LLC) $(LLCFLAGS) -f $< -o $@
+
 # Assemble (and link) an LLVM-linked program using the system assembler...
 #
 $(PROGRAMS_TO_TEST:%=Output/%.llc): \
 Output/%.llc: Output/%.llc.s
 	-$(CC) $(CFLAGS) $< $(LLCLIBS) -o $@
 
+$(PROGRAMS_TO_TEST:%=Output/%.trace.llc): \
+Output/%.trace.llc: Output/%.trace.llc.s
+	-$(CC) $(CFLAGS) $< $(LLCLIBS) $(TRACELIBS) -o $@
+
 
 #
 # Rules to execute the program
@@ -248,6 +277,14 @@
 
 $(PROGRAMS_TO_TEST:%=Output/%.out-cbe): \
 Output/%.out-cbe: Output/%.cbe
+	-$(RUNSAFELY) $(STDIN_FILENAME) $@ $< $(RUN_OPTIONS)
+
+$(PROGRAMS_TO_TEST:%=Output/%.trace-out-llc): \
+Output/%.trace-out-llc: Output/%.trace.llc
+	-$(RUNSAFELY) $(STDIN_FILENAME) $@ $< $(RUN_OPTIONS)
+
+$(PROGRAMS_TO_TEST:%=Output/%.trace-out-cbe): \
+Output/%.trace-out-cbe: Output/%.trace.cbe
 	-$(RUNSAFELY) $(STDIN_FILENAME) $@ $< $(RUN_OPTIONS)
 endif
 





More information about the llvm-commits mailing list