2002-01-23 19:42:52 +00:00
|
|
|
# test/Feature/Makefile
|
|
|
|
#
|
|
|
|
# This makefile runs a moderate number of tests against LLVM source "feature"
|
|
|
|
# tests, which are designed to test individual components of the LLVM language.
|
|
|
|
# This runs through three sets of tests, designed to test to (dis)assembler,
|
|
|
|
# the optimizer, and the code generator for support for the more esoteric LLVM
|
|
|
|
# features.
|
|
|
|
#
|
|
|
|
|
|
|
|
LEVEL = ../..
|
|
|
|
include ../Makefile.tests
|
|
|
|
|
|
|
|
TESTS := $(wildcard *.ll)
|
|
|
|
OTESTS := $(addprefix Output/, $(TESTS)) # Tests in output directory
|
|
|
|
|
2002-08-21 23:52:15 +00:00
|
|
|
test all :: testasmdis testopt testcbe testsparc
|
2002-01-23 19:42:52 +00:00
|
|
|
@echo "All tests completed!"
|
|
|
|
|
|
|
|
testasmdis : $(addsuffix .asmdis, $(OTESTS))
|
|
|
|
testopt : $(addsuffix .opt , $(OTESTS))
|
|
|
|
|
|
|
|
testcodegen : $(OTESTS:%.ll=%.mc)
|
|
|
|
testsparc : $(OTESTS:%.ll=%.s)
|
2002-08-21 23:52:15 +00:00
|
|
|
testcbe : $(OTESTS:%.ll=%.tc)
|
2002-01-23 19:42:52 +00:00
|
|
|
|
|
|
|
Output/%.asmdis: % $(LAS) $(LDIS) Output/.dir
|
2003-06-20 23:01:23 +00:00
|
|
|
@./TestAsmDisasm.sh $< $(LLVMTOOLCURRENT)
|
2002-01-23 19:42:52 +00:00
|
|
|
|
|
|
|
Output/%.opt: % $(LAS) $(LDIS) $(LOPT) Output/.dir
|
2003-06-20 23:01:23 +00:00
|
|
|
@./TestOptimizer.sh $< $(LLVMTOOLCURRENT)
|
2002-01-23 19:42:52 +00:00
|
|
|
|
2002-08-21 23:52:15 +00:00
|
|
|
Output/%.tc: Output/%.bc $(LDIS)
|
|
|
|
@echo "======== Generating C code for $<"
|
|
|
|
$(LDIS) -c < $< > $@ || \
|
|
|
|
( rm -f $@; $(FAILURE) $@ )
|
|
|
|
|
2002-01-23 19:42:52 +00:00
|
|
|
Output/%.mc: Output/%.bc $(LLC)
|
|
|
|
@echo "======== Generating machine instructions for $<"
|
|
|
|
$(LLC) -f $(LLCFLAGS) $< > $@ || \
|
2002-01-23 20:39:56 +00:00
|
|
|
( rm -f $@; $(FAILURE) $@ )
|
2002-01-23 19:42:52 +00:00
|
|
|
|
|
|
|
Output/%.s: Output/%.bc $(LLC)
|
|
|
|
@echo "======== Generating assembly code for $<"
|
|
|
|
$(LLC) -f $(LLCFLAGS) $< -o $@ || \
|
2002-01-23 20:39:56 +00:00
|
|
|
( rm -f $@; $(FAILURE) $@ )
|
2002-02-11 22:50:17 +00:00
|
|
|
|