hanchenye-llvm-project/llvm/test/Makefile

43 lines
864 B
Makefile
Raw Normal View History

LLVM := ..
LLC := $(LLVM)/tools/llc/llc
AS := $(LLVM)/tools/as/as
LLCOPTS := -dsched t
2001-06-07 04:29:01 +08:00
TESTS := $(wildcard *.ll)
LLCTESTS := $(shell /bin/ls *.ll | grep -v testmemory | grep -v testswitch | grep -v sumarray)
test all : testasmdis testopt testcodegen
2001-06-07 04:29:01 +08:00
@echo "All tests successfully completed!"
testasmdis : $(TESTS:%.ll=%.ll.asmdis)
2001-06-07 04:29:01 +08:00
@echo "All assembler/disassembler test succeeded!"
testopt : $(TESTS:%.ll=%.ll.opt)
testselect : $(LLCTESTS:%.ll=%.mc)
testsched : $(LLCTESTS:%.ll=%.mc)
2001-06-07 04:29:01 +08:00
testcodegen : $(LLCTESTS:%.ll=%.mc)
2001-06-07 04:29:01 +08:00
clean :
rm -f *.[123] *.bc *.mc core
2001-06-07 04:29:01 +08:00
%.asmdis: %
@echo "Running assembler/disassembler test on $<"
@./TestAsmDisasm.sh $<
%.opt: %
@echo "Running optimizier test on $<"
@./TestOptimizer.sh $<
%.bc: %.ll
$(AS) $< -f
%.mc: %.ll
@echo "Generating machine instructions for $<"
$(AS) < $< | $(LLC) -dsched=t > $@