From 2614032b6d65d5905286cb3d4c919027a8387c10 Mon Sep 17 00:00:00 2001 From: Robert Lytton Date: Tue, 13 May 2014 06:25:06 +0000 Subject: [PATCH] XCore target: Add target specific flags to root Makefiles. The default value of XCORE_TARGET_NEEDS_MEMORY is 32 (MB). It should be noted that the XCore emulator's speed is affected by the size of memory. Also the amount of host memory required is several times XCore-image memory size. Thus running several large xcore-images in parallel may result in thrashing! The default of 32 will require ~300MB of host memory. As Makefile.config.in is included multiple times (viz: include $(LEVEL)/Makefile.config), the addition of XCORE_TARGET_FLAGS to X_TARGET_FLAGS is done in Makefile.test RUNTIMELIMIT is set to a default of 1 hour for the XCore emulator. Test that take around or more than 1 hour to run have their RUNTIMELIMIT extended. llvm-svn: 208667 --- Makefile.config.in | 11 +++++++++++ Makefile.programs | 5 +++++ Makefile.tests | 4 ++++ MultiSource/Applications/JM/ldecod/Makefile | 4 ++++ MultiSource/Applications/lua/Makefile | 5 ++++- MultiSource/Applications/minisat/Makefile | 3 +++ MultiSource/Applications/spiff/Makefile | 6 ++++++ MultiSource/Benchmarks/ASCI_Purple/SMG2000/Makefile | 3 +++ MultiSource/Benchmarks/ASC_Sequoia/AMGmk/Makefile | 7 +++++++ MultiSource/Benchmarks/ASC_Sequoia/CrystalMk/Makefile | 7 +++++++ MultiSource/Benchmarks/Bullet/Makefile | 5 +++++ MultiSource/Benchmarks/Fhourstones-3.1/Makefile | 4 ++++ MultiSource/Benchmarks/NPB-serial/is/Makefile | 4 ++++ MultiSource/Benchmarks/Olden/health/Makefile | 3 +++ MultiSource/Benchmarks/Olden/perimeter/Makefile | 3 +++ MultiSource/Benchmarks/Olden/treeadd/Makefile | 3 +++ MultiSource/Benchmarks/Olden/tsp/Makefile | 3 +++ MultiSource/Benchmarks/Olden/voronoi/Makefile | 3 +++ MultiSource/Benchmarks/SciMark2-C/Makefile | 8 ++++++++ MultiSource/Benchmarks/TSVC/ControlFlow-dbl/Makefile | 6 ++++++ MultiSource/Benchmarks/TSVC/ControlLoops-dbl/Makefile | 6 ++++++ MultiSource/Benchmarks/TSVC/Expansion-dbl/Makefile | 6 ++++++ .../Benchmarks/TSVC/GlobalDataFlow-dbl/Makefile | 6 ++++++ .../Benchmarks/TSVC/InductionVariable-dbl/Makefile | 6 ++++++ .../Benchmarks/TSVC/LinearDependence-dbl/Makefile | 6 ++++++ .../Benchmarks/TSVC/LoopRerolling-dbl/Makefile | 6 ++++++ .../Benchmarks/TSVC/NodeSplitting-dbl/Makefile | 6 ++++++ .../Benchmarks/TSVC/NodeSplitting-flt/Makefile | 6 ++++++ .../Benchmarks/TSVC/StatementReordering-dbl/Makefile | 6 ++++++ MultiSource/Benchmarks/Trimaran/netbench-crc/Makefile | 3 +++ MultiSource/Benchmarks/mafft/Makefile | 7 +++++++ MultiSource/Benchmarks/nbench/Makefile | 5 +++++ SingleSource/Benchmarks/CoyoteBench/Makefile | 8 ++++++++ SingleSource/Benchmarks/Misc-C++/Large/Makefile | 7 +++++++ SingleSource/Benchmarks/Misc-C++/Makefile | 6 ++++++ SingleSource/Benchmarks/Misc/Makefile | 7 +++++++ .../Polybench/linear-algebra/kernels/2mm/Makefile | 6 ++++++ .../Polybench/linear-algebra/kernels/3mm/Makefile | 6 ++++++ .../Polybench/linear-algebra/kernels/atax/Makefile | 4 ++++ .../Polybench/linear-algebra/kernels/bicg/Makefile | 4 ++++ .../Polybench/linear-algebra/kernels/doitgen/Makefile | 4 ++++ .../Polybench/linear-algebra/kernels/gemver/Makefile | 4 ++++ .../Polybench/linear-algebra/kernels/gesummv/Makefile | 4 ++++ .../Polybench/linear-algebra/kernels/mvt/Makefile | 4 ++++ .../Polybench/linear-algebra/kernels/trisolv/Makefile | 4 ++++ .../Polybench/linear-algebra/solvers/durbin/Makefile | 4 ++++ SingleSource/Benchmarks/Shootout-C++/Makefile | 8 ++++++++ SingleSource/Benchmarks/Shootout/Makefile | 4 ++++ SingleSource/Benchmarks/SmallPT/Makefile | 5 +++++ SingleSource/UnitTests/Makefile | 3 +++ SingleSource/UnitTests/Vector/Makefile | 7 +++++++ 51 files changed, 264 insertions(+), 1 deletion(-) diff --git a/Makefile.config.in b/Makefile.config.in index baa3c9aadf..e0c43b3cbe 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -139,6 +139,17 @@ ifeq ($(ARCH),THUMB) TEST_TARGET_FLAGS += -mthumb endif +ifeq ($(ARCH),XCore) +ifndef XCORE_TARGET_NEEDS_MEMORY +# The default memory for all tests is 32MB (rather than the usual default of 64K). +# (32MB target memory requires ~300MB of host memory) +XCORE_TARGET_NEEDS_MEMORY := 32 +endif +XCORE_TARGET_FLAGS := --target=xcore -fcommon -fexceptions -mcmodel=large +XCORE_TARGET_FLAGS += -Wl,-target=XS1-L1,-Xmapper,--defsymbol,-Xmapper,CmdLineWords=400 +XCORE_TARGET_FLAGS += -Wl,-Xmapper,--image-size,-Xmapper,$$(($(XCORE_TARGET_NEEDS_MEMORY) * 0x100000)),-Xmapper,--image-base,-Xmapper,$$(($(XCORE_TARGET_NEEDS_MEMORY) * 0x100000)) +endif + # PowerPC/Linux needs -ffp-contract=off so that: # The outputs can be compared to gcc. # The outputs match the reference outputs. diff --git a/Makefile.programs b/Makefile.programs index 2137de6852..f895b748e0 100644 --- a/Makefile.programs +++ b/Makefile.programs @@ -67,8 +67,13 @@ DIFFPROG := $(PROGDIR)/DiffOutput.sh "$(FPCMP) $(TOLERANCEOPT)" # timeout. This is overridable on the commandline or in tests makefiles. # ifndef RUNTIMELIMIT +ifeq ($(ARCH),XCore) + # 1 hours + RUNTIMELIMIT := 3600 +else RUNTIMELIMIT := 500 endif +endif # If the program specified a REFERENCE_OUTPUT_FILE, they obviously want to # USE_REFERENCE_OUTPUT. diff --git a/Makefile.tests b/Makefile.tests index a857a0c715..f45d4cedaa 100644 --- a/Makefile.tests +++ b/Makefile.tests @@ -23,6 +23,10 @@ include ${LEVEL}/Makefile.common # TARGET_FLAGS in the TEST.* makefiles doesn't work out. X_TARGET_FLAGS = $(TARGET_FLAGS) $(TEST_TARGET_FLAGS) +ifeq ($(ARCH),XCore) +X_TARGET_FLAGS += $(XCORE_TARGET_FLAGS) +endif + STATS = -stats -time-passes .PHONY: clean default diff --git a/MultiSource/Applications/JM/ldecod/Makefile b/MultiSource/Applications/JM/ldecod/Makefile index d94fd0d314..c7a9705f81 100644 --- a/MultiSource/Applications/JM/ldecod/Makefile +++ b/MultiSource/Applications/JM/ldecod/Makefile @@ -5,6 +5,10 @@ LDFLAGS = -lm $(TOOLLINKOPTS) RUN_OPTIONS = -i $(PROJ_SRC_DIR)/data/test.264 -o Output/test_dec.yuv -r $(PROJ_SRC_DIR)/data/test_rec.yuv +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 64 +endif + include ../../../Makefile.multisrc clean:: diff --git a/MultiSource/Applications/lua/Makefile b/MultiSource/Applications/lua/Makefile index aaf54fed6e..910f6259ac 100644 --- a/MultiSource/Applications/lua/Makefile +++ b/MultiSource/Applications/lua/Makefile @@ -6,7 +6,10 @@ Source = lapi.c lcode.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c lmem.c\ loslib.c ltablib.c lstrlib.c loadlib.c linit.c lua.c LDFLAGS += -lm -ifneq ($(ARCH),XCore) + +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 128 +else CPPFLAGS += -DLUA_USE_POSIX endif diff --git a/MultiSource/Applications/minisat/Makefile b/MultiSource/Applications/minisat/Makefile index 9ea3afeb3c..0a51430ab8 100644 --- a/MultiSource/Applications/minisat/Makefile +++ b/MultiSource/Applications/minisat/Makefile @@ -9,6 +9,9 @@ RUN_OPTIONS = -verbosity=0 $(PROJ_SRC_DIR)/small.cnf else ifdef LARGE_PROBLEM_SIZE RUN_OPTIONS = -verbosity=0 $(PROJ_SRC_DIR)/long.cnf +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 64 +endif else RUN_OPTIONS = -verbosity=0 $(PROJ_SRC_DIR)/short.cnf endif diff --git a/MultiSource/Applications/spiff/Makefile b/MultiSource/Applications/spiff/Makefile index 7188bccdd5..12fc8e7b6a 100644 --- a/MultiSource/Applications/spiff/Makefile +++ b/MultiSource/Applications/spiff/Makefile @@ -9,5 +9,11 @@ RUN_OPTIONS = $(PROJ_SRC_DIR)/Sample.3 $(PROJ_SRC_DIR)/Sample.4 #RUN_OPTIONS = ./one ./two # you get the idea... +ifeq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +XCORE_TARGET_NEEDS_MEMORY = 1024 +endif +endif + include ../../Makefile.multisrc diff --git a/MultiSource/Benchmarks/ASCI_Purple/SMG2000/Makefile b/MultiSource/Benchmarks/ASCI_Purple/SMG2000/Makefile index ebfe8f0c26..5b55f85895 100644 --- a/MultiSource/Benchmarks/ASCI_Purple/SMG2000/Makefile +++ b/MultiSource/Benchmarks/ASCI_Purple/SMG2000/Makefile @@ -12,6 +12,9 @@ ifdef SMALL_PROBLEM_SIZE RUN_OPTIONS ="-n 30 15 30 -c 0.1 1.0 10.0" else RUN_OPTIONS ="-n 100 40 100 -c 0.1 1.0 10.0" +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 256 +endif endif include ../../../Makefile.multisrc diff --git a/MultiSource/Benchmarks/ASC_Sequoia/AMGmk/Makefile b/MultiSource/Benchmarks/ASC_Sequoia/AMGmk/Makefile index 8415584334..220ec501c8 100644 --- a/MultiSource/Benchmarks/ASC_Sequoia/AMGmk/Makefile +++ b/MultiSource/Benchmarks/ASC_Sequoia/AMGmk/Makefile @@ -5,4 +5,11 @@ PROG = AMGmk LIBS += -lm LDFLAGS += -lm +ifeq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +# XCore takes over 1 hour. +RUNTIMELIMIT:=7200 +endif +endif + include ../../../Makefile.multisrc diff --git a/MultiSource/Benchmarks/ASC_Sequoia/CrystalMk/Makefile b/MultiSource/Benchmarks/ASC_Sequoia/CrystalMk/Makefile index 82044af71e..4b78bb9704 100644 --- a/MultiSource/Benchmarks/ASC_Sequoia/CrystalMk/Makefile +++ b/MultiSource/Benchmarks/ASC_Sequoia/CrystalMk/Makefile @@ -5,4 +5,11 @@ PROG = CrystalMk LIBS += -lm LDFLAGS += -lm +ifeq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +# XCore takes ~1 hour. +RUNTIMELIMIT:=7200 +endif +endif + include ../../../Makefile.multisrc diff --git a/MultiSource/Benchmarks/Bullet/Makefile b/MultiSource/Benchmarks/Bullet/Makefile index 261ae7bcc7..6606c57dad 100644 --- a/MultiSource/Benchmarks/Bullet/Makefile +++ b/MultiSource/Benchmarks/Bullet/Makefile @@ -3,8 +3,13 @@ PROG = bullet CPPFLAGS += -I$(PROJ_SRC_DIR)/include -DNO_TIME LDFLAGS = -lstdc++ -lm +ifeq ($(ARCH),XCore) +# Use default RUNTIMELIMIT for the XCore. +XCORE_TARGET_NEEDS_MEMORY := 64 +else # This test can take more than the default 500s timeout on Thumb1 RUNTIMELIMIT:=1000 +endif include $(LEVEL)/Makefile.config diff --git a/MultiSource/Benchmarks/Fhourstones-3.1/Makefile b/MultiSource/Benchmarks/Fhourstones-3.1/Makefile index 0cfa68fc40..1cc69a7473 100644 --- a/MultiSource/Benchmarks/Fhourstones-3.1/Makefile +++ b/MultiSource/Benchmarks/Fhourstones-3.1/Makefile @@ -11,4 +11,8 @@ else STDIN_FILENAME = $(PROJ_SRC_DIR)/inputs endif +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 64 +endif + include ../../Makefile.multisrc diff --git a/MultiSource/Benchmarks/NPB-serial/is/Makefile b/MultiSource/Benchmarks/NPB-serial/is/Makefile index b40399d52d..57f7a631e2 100644 --- a/MultiSource/Benchmarks/NPB-serial/is/Makefile +++ b/MultiSource/Benchmarks/NPB-serial/is/Makefile @@ -5,6 +5,10 @@ LDFLAGS = ifdef SMALL_PROBLEM_SIZE CPPFLAGS = -DSMALL_PROBLEM_SIZE +else +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 512 +endif endif include $(LEVEL)/MultiSource/Makefile.multisrc diff --git a/MultiSource/Benchmarks/Olden/health/Makefile b/MultiSource/Benchmarks/Olden/health/Makefile index 2ad5cd89b3..464af9f9d1 100644 --- a/MultiSource/Benchmarks/Olden/health/Makefile +++ b/MultiSource/Benchmarks/Olden/health/Makefile @@ -13,6 +13,9 @@ ifdef SMALL_PROBLEM_SIZE RUN_OPTIONS = 8 15 1 else RUN_OPTIONS = 9 20 1 +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 64 +endif endif endif diff --git a/MultiSource/Benchmarks/Olden/perimeter/Makefile b/MultiSource/Benchmarks/Olden/perimeter/Makefile index d8c21d1560..bf36897f3b 100644 --- a/MultiSource/Benchmarks/Olden/perimeter/Makefile +++ b/MultiSource/Benchmarks/Olden/perimeter/Makefile @@ -10,6 +10,9 @@ ifdef SMALL_PROBLEM_SIZE RUN_OPTIONS = 9 else RUN_OPTIONS = 10 +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 64 +endif endif endif diff --git a/MultiSource/Benchmarks/Olden/treeadd/Makefile b/MultiSource/Benchmarks/Olden/treeadd/Makefile index d4af68d12c..e32879bb9c 100644 --- a/MultiSource/Benchmarks/Olden/treeadd/Makefile +++ b/MultiSource/Benchmarks/Olden/treeadd/Makefile @@ -8,6 +8,9 @@ ifdef SMALL_PROBLEM_SIZE RUN_OPTIONS = 20 else RUN_OPTIONS = 22 +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 128 +endif endif include $(LEVEL)/MultiSource/Makefile.multisrc diff --git a/MultiSource/Benchmarks/Olden/tsp/Makefile b/MultiSource/Benchmarks/Olden/tsp/Makefile index a4f5fbc21b..5fe381f392 100644 --- a/MultiSource/Benchmarks/Olden/tsp/Makefile +++ b/MultiSource/Benchmarks/Olden/tsp/Makefile @@ -10,6 +10,9 @@ ifdef SMALL_PROBLEM_SIZE RUN_OPTIONS = 102400 else RUN_OPTIONS = 1024000 +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 64 +endif endif endif diff --git a/MultiSource/Benchmarks/Olden/voronoi/Makefile b/MultiSource/Benchmarks/Olden/voronoi/Makefile index 4b443bd534..ea6e6a4278 100644 --- a/MultiSource/Benchmarks/Olden/voronoi/Makefile +++ b/MultiSource/Benchmarks/Olden/voronoi/Makefile @@ -12,6 +12,9 @@ ifdef SMALL_PROBLEM_SIZE RUN_OPTIONS = 10000 20 32 7 else RUN_OPTIONS = 100000 20 32 7 +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 64 +endif endif endif HASH_PROGRAM_OUTPUT = 1 diff --git a/MultiSource/Benchmarks/SciMark2-C/Makefile b/MultiSource/Benchmarks/SciMark2-C/Makefile index c3d0fde19b..ef62aaa43b 100644 --- a/MultiSource/Benchmarks/SciMark2-C/Makefile +++ b/MultiSource/Benchmarks/SciMark2-C/Makefile @@ -3,8 +3,16 @@ PROG = scimark2 CPPFLAGS = LDFLAGS = -lm +ifeq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +# XCore target takes over 9hours to complete a medium sized problem. +RUNTIMELIMIT := 50000 +# Ignore 'LARGE_PROBLEM_SIZE' requests +endif +else ifdef LARGE_PROBLEM_SIZE RUN_OPTIONS = -large endif +endif include ../../Makefile.multisrc diff --git a/MultiSource/Benchmarks/TSVC/ControlFlow-dbl/Makefile b/MultiSource/Benchmarks/TSVC/ControlFlow-dbl/Makefile index ff66148860..ee89085b25 100644 --- a/MultiSource/Benchmarks/TSVC/ControlFlow-dbl/Makefile +++ b/MultiSource/Benchmarks/TSVC/ControlFlow-dbl/Makefile @@ -4,5 +4,11 @@ PROG = ControlFlow-dbl LDFLAGS = -lm CFLAGS += -std=gnu99 RUN_OPTIONS = 2325 14 + +ifeq ($(ARCH),XCore) +# XCore takes ~1 hour. +RUNTIMELIMIT:=7200 +endif + include $(LEVEL)/MultiSource/Makefile.multisrc diff --git a/MultiSource/Benchmarks/TSVC/ControlLoops-dbl/Makefile b/MultiSource/Benchmarks/TSVC/ControlLoops-dbl/Makefile index 296851a575..3da38c9448 100644 --- a/MultiSource/Benchmarks/TSVC/ControlLoops-dbl/Makefile +++ b/MultiSource/Benchmarks/TSVC/ControlLoops-dbl/Makefile @@ -4,5 +4,11 @@ PROG = ControlLoops-dbl LDFLAGS = -lm CFLAGS += -std=gnu99 RUN_OPTIONS = 1640 14 + +ifeq ($(ARCH),XCore) +# XCore takes ~1 hour. +RUNTIMELIMIT:=7200 +endif + include $(LEVEL)/MultiSource/Makefile.multisrc diff --git a/MultiSource/Benchmarks/TSVC/Expansion-dbl/Makefile b/MultiSource/Benchmarks/TSVC/Expansion-dbl/Makefile index 6546e91bf5..c68af70244 100644 --- a/MultiSource/Benchmarks/TSVC/Expansion-dbl/Makefile +++ b/MultiSource/Benchmarks/TSVC/Expansion-dbl/Makefile @@ -4,5 +4,11 @@ PROG = Expansion-dbl LDFLAGS = -lm CFLAGS += -std=gnu99 RUN_OPTIONS = 4160 14 + +ifeq ($(ARCH),XCore) +# XCore takes ~1 hour. +RUNTIMELIMIT:=7200 +endif + include $(LEVEL)/MultiSource/Makefile.multisrc diff --git a/MultiSource/Benchmarks/TSVC/GlobalDataFlow-dbl/Makefile b/MultiSource/Benchmarks/TSVC/GlobalDataFlow-dbl/Makefile index b1d5aa8b76..b7bc64b85a 100644 --- a/MultiSource/Benchmarks/TSVC/GlobalDataFlow-dbl/Makefile +++ b/MultiSource/Benchmarks/TSVC/GlobalDataFlow-dbl/Makefile @@ -4,5 +4,11 @@ PROG = GlobalDataFlow-dbl LDFLAGS = -lm CFLAGS += -std=gnu99 RUN_OPTIONS = 3450 14 + +ifeq ($(ARCH),XCore) +# XCore takes ~1 hour. +RUNTIMELIMIT:=7200 +endif + include $(LEVEL)/MultiSource/Makefile.multisrc diff --git a/MultiSource/Benchmarks/TSVC/InductionVariable-dbl/Makefile b/MultiSource/Benchmarks/TSVC/InductionVariable-dbl/Makefile index 3781bfa442..03b062a806 100644 --- a/MultiSource/Benchmarks/TSVC/InductionVariable-dbl/Makefile +++ b/MultiSource/Benchmarks/TSVC/InductionVariable-dbl/Makefile @@ -4,5 +4,11 @@ PROG = InductionVariable-dbl LDFLAGS = -lm CFLAGS += -std=gnu99 RUN_OPTIONS = 9100 14 + +ifeq ($(ARCH),XCore) +# XCore takes ~1 hour. +RUNTIMELIMIT:=7200 +endif + include $(LEVEL)/MultiSource/Makefile.multisrc diff --git a/MultiSource/Benchmarks/TSVC/LinearDependence-dbl/Makefile b/MultiSource/Benchmarks/TSVC/LinearDependence-dbl/Makefile index a7a3dc9405..d3c7841a77 100644 --- a/MultiSource/Benchmarks/TSVC/LinearDependence-dbl/Makefile +++ b/MultiSource/Benchmarks/TSVC/LinearDependence-dbl/Makefile @@ -4,5 +4,11 @@ PROG = LinearDependence-dbl LDFLAGS = -lm CFLAGS += -std=gnu99 RUN_OPTIONS = 3570 14 + +ifeq ($(ARCH),XCore) +# XCore takes ~1 hour. +RUNTIMELIMIT:=7200 +endif + include $(LEVEL)/MultiSource/Makefile.multisrc diff --git a/MultiSource/Benchmarks/TSVC/LoopRerolling-dbl/Makefile b/MultiSource/Benchmarks/TSVC/LoopRerolling-dbl/Makefile index 21a3c67587..8add35e876 100644 --- a/MultiSource/Benchmarks/TSVC/LoopRerolling-dbl/Makefile +++ b/MultiSource/Benchmarks/TSVC/LoopRerolling-dbl/Makefile @@ -4,5 +4,11 @@ PROG = LoopRerolling-dbl LDFLAGS = -lm CFLAGS += -std=gnu99 RUN_OPTIONS = 5260 14 + +ifeq ($(ARCH),XCore) +# XCore takes ~1 hour. +RUNTIMELIMIT:=7200 +endif + include $(LEVEL)/MultiSource/Makefile.multisrc diff --git a/MultiSource/Benchmarks/TSVC/NodeSplitting-dbl/Makefile b/MultiSource/Benchmarks/TSVC/NodeSplitting-dbl/Makefile index a3163370d4..00e45f869e 100644 --- a/MultiSource/Benchmarks/TSVC/NodeSplitting-dbl/Makefile +++ b/MultiSource/Benchmarks/TSVC/NodeSplitting-dbl/Makefile @@ -4,5 +4,11 @@ PROG = NodeSplitting-dbl LDFLAGS = -lm CFLAGS += -std=gnu99 RUN_OPTIONS = 10000 14 + +ifeq ($(ARCH),XCore) +# XCore takes ~1 hour. +RUNTIMELIMIT:=7200 +endif + include $(LEVEL)/MultiSource/Makefile.multisrc diff --git a/MultiSource/Benchmarks/TSVC/NodeSplitting-flt/Makefile b/MultiSource/Benchmarks/TSVC/NodeSplitting-flt/Makefile index 4027435702..e44f4a2d6c 100644 --- a/MultiSource/Benchmarks/TSVC/NodeSplitting-flt/Makefile +++ b/MultiSource/Benchmarks/TSVC/NodeSplitting-flt/Makefile @@ -4,5 +4,11 @@ PROG = NodeSplitting-flt LDFLAGS = -lm CFLAGS += -std=gnu99 RUN_OPTIONS = 10000 5 + +ifeq ($(ARCH),XCore) +# XCore takes ~1 hour. +RUNTIMELIMIT:=7200 +endif + include $(LEVEL)/MultiSource/Makefile.multisrc diff --git a/MultiSource/Benchmarks/TSVC/StatementReordering-dbl/Makefile b/MultiSource/Benchmarks/TSVC/StatementReordering-dbl/Makefile index 2ec5d40286..99d6d3d235 100644 --- a/MultiSource/Benchmarks/TSVC/StatementReordering-dbl/Makefile +++ b/MultiSource/Benchmarks/TSVC/StatementReordering-dbl/Makefile @@ -4,5 +4,11 @@ PROG = StatementReordering-dbl LDFLAGS = -lm CFLAGS += -std=gnu99 RUN_OPTIONS = 20000 14 + +ifeq ($(ARCH),XCore) +# XCore takes ~1 hour. +RUNTIMELIMIT:=7200 +endif + include $(LEVEL)/MultiSource/Makefile.multisrc diff --git a/MultiSource/Benchmarks/Trimaran/netbench-crc/Makefile b/MultiSource/Benchmarks/Trimaran/netbench-crc/Makefile index 08d3cc5bf5..0751a7fa39 100644 --- a/MultiSource/Benchmarks/Trimaran/netbench-crc/Makefile +++ b/MultiSource/Benchmarks/Trimaran/netbench-crc/Makefile @@ -8,6 +8,9 @@ ifdef SMALL_PROBLEM_SIZE RUN_OPTIONS = 1000 else RUN_OPTIONS = 12000 +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 256 +endif endif endif diff --git a/MultiSource/Benchmarks/mafft/Makefile b/MultiSource/Benchmarks/mafft/Makefile index a26fc5b90b..1db9a13648 100644 --- a/MultiSource/Benchmarks/mafft/Makefile +++ b/MultiSource/Benchmarks/mafft/Makefile @@ -12,6 +12,13 @@ STDIN_FILENAME = $(PROJ_SRC_DIR)/pyruvate_decarboxylase.fasta LDFLAGS = -lm FP_TOLERANCE = 0.00001 HASH_PROGRAM_OUTPUT = 1 + +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 256 +# XCore takes ~2 hours. +RUNTIMELIMIT:=10800 +endif + include $(LEVEL)/MultiSource/Makefile.multisrc clean:: diff --git a/MultiSource/Benchmarks/nbench/Makefile b/MultiSource/Benchmarks/nbench/Makefile index a3d63d937c..266d62f49b 100644 --- a/MultiSource/Benchmarks/nbench/Makefile +++ b/MultiSource/Benchmarks/nbench/Makefile @@ -6,8 +6,13 @@ LDFLAGS = include ../../Makefile.multisrc +ifeq ($(ARCH),XCore) +# XCore takes ~1 hour. +RUNTIMELIMIT:=7200 +else # This test can take more than the default 500s timeout at -O0. RUNTIMELIMIT:=750 +endif # Always copy NNET.DAT so it's available with SRCDIR != OBJDIR builds. # FIXME: Hack diff --git a/SingleSource/Benchmarks/CoyoteBench/Makefile b/SingleSource/Benchmarks/CoyoteBench/Makefile index acfcf40a4f..90718db564 100644 --- a/SingleSource/Benchmarks/CoyoteBench/Makefile +++ b/SingleSource/Benchmarks/CoyoteBench/Makefile @@ -1,5 +1,13 @@ LEVEL = ../../.. LDFLAGS += -lm -lstdc++ +ifeq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +XCORE_TARGET_NEEDS_MEMORY := 128 +# XCore takes ~1.25 hour. +RUNTIMELIMIT:=7200 +endif +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc diff --git a/SingleSource/Benchmarks/Misc-C++/Large/Makefile b/SingleSource/Benchmarks/Misc-C++/Large/Makefile index a33988214c..b70224e82f 100644 --- a/SingleSource/Benchmarks/Misc-C++/Large/Makefile +++ b/SingleSource/Benchmarks/Misc-C++/Large/Makefile @@ -4,4 +4,11 @@ LIBS = -lstdc++ FP_ABSTOLERANCE := 0.01 HASH_PROGRAM_OUTPUT := 1 +ifeq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +# XCore takes ~1 hour. +RUNTIMELIMIT:=7200 +endif +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc diff --git a/SingleSource/Benchmarks/Misc-C++/Makefile b/SingleSource/Benchmarks/Misc-C++/Makefile index 995393d909..2080f0a9b7 100644 --- a/SingleSource/Benchmarks/Misc-C++/Makefile +++ b/SingleSource/Benchmarks/Misc-C++/Makefile @@ -4,4 +4,10 @@ LDFLAGS += -lm -lstdc++ LIBS = -lstdc++ FP_ABSTOLERANCE := 0.01 +ifeq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +XCORE_TARGET_NEEDS_MEMORY := 128 +endif +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc diff --git a/SingleSource/Benchmarks/Misc/Makefile b/SingleSource/Benchmarks/Misc/Makefile index a719472a09..965bf70c6a 100644 --- a/SingleSource/Benchmarks/Misc/Makefile +++ b/SingleSource/Benchmarks/Misc/Makefile @@ -15,4 +15,11 @@ ifeq ($(ARCH),Mips) RUNTIMELIMIT := 2000 endif +ifeq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +# XCore takes over 2 hours. +RUNTIMELIMIT:=10800 +endif +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/Makefile b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/Makefile index 7c1afbb2c6..457a9265c7 100644 --- a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/Makefile +++ b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/2mm/Makefile @@ -6,10 +6,16 @@ CFLAGS += -I $(PROJ_SRC_ROOT)/$(POLYBENCH_UTILS) -DPOLYBENCH_DUMP_ARRAYS ifdef SMALL_PROBLEM_SIZE CFLAGS += -DSMALL_DATASET +else +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 64 +endif endif ifeq ($(ARCH),Mips) RUNTIMELIMIT := 2000 +else ifeq ($(ARCH),XCore) +# Use default RUNTIMELIMIT for the XCore. else RUNTIMELIMIT := 1000 endif diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/Makefile b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/Makefile index 30d396c55b..aeec3e2a5d 100644 --- a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/Makefile +++ b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/3mm/Makefile @@ -6,10 +6,16 @@ CFLAGS += -I $(PROJ_SRC_ROOT)/$(POLYBENCH_UTILS) -DPOLYBENCH_DUMP_ARRAYS ifdef SMALL_PROBLEM_SIZE CFLAGS += -DSMALL_DATASET +else +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 64 +endif endif ifeq ($(ARCH),Mips) RUNTIMELIMIT := 2000 +else ifeq ($(ARCH),XCore) +# Use default RUNTIMELIMIT for the XCore. else RUNTIMELIMIT := 1000 endif diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/Makefile b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/Makefile index 5edcd75a40..2d4fc1f1e5 100644 --- a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/Makefile +++ b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/atax/Makefile @@ -6,5 +6,9 @@ CFLAGS += -I $(PROJ_SRC_ROOT)/$(POLYBENCH_UTILS) -DPOLYBENCH_DUMP_ARRAYS HASH_PROGRAM_OUTPUT = 1 +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 128 +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/Makefile b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/Makefile index 025c74d90c..b58d344a79 100644 --- a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/Makefile +++ b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/bicg/Makefile @@ -6,5 +6,9 @@ CFLAGS += -I $(PROJ_SRC_ROOT)/$(POLYBENCH_UTILS) -DPOLYBENCH_DUMP_ARRAYS HASH_PROGRAM_OUTPUT = 1 +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 128 +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/Makefile b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/Makefile index a7d7be9c26..412d9643c1 100644 --- a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/Makefile +++ b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/doitgen/Makefile @@ -6,6 +6,10 @@ CFLAGS += -I $(PROJ_SRC_ROOT)/$(POLYBENCH_UTILS) -DPOLYBENCH_DUMP_ARRAYS ifdef SMALL_PROBLEM_SIZE CFLAGS += -DSMALL_DATASET +else +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 64 +endif endif HASH_PROGRAM_OUTPUT = 1 diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemver/Makefile b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemver/Makefile index bb67a399b2..1e16b4d5d4 100644 --- a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemver/Makefile +++ b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gemver/Makefile @@ -6,5 +6,9 @@ CFLAGS += -I $(PROJ_SRC_ROOT)/$(POLYBENCH_UTILS) -DPOLYBENCH_DUMP_ARRAYS HASH_PROGRAM_OUTPUT = 1 +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 128 +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/Makefile b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/Makefile index 4c6c53cd45..0139264094 100644 --- a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/Makefile +++ b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/gesummv/Makefile @@ -6,6 +6,10 @@ CFLAGS += -I $(PROJ_SRC_ROOT)/$(POLYBENCH_UTILS) -DPOLYBENCH_DUMP_ARRAYS ifdef SMALL_PROBLEM_SIZE CFLAGS += -DSMALL_DATASET +else +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 256 +endif endif HASH_PROGRAM_OUTPUT = 1 diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/Makefile b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/Makefile index b862facbaf..0ea23679d0 100644 --- a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/Makefile +++ b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/mvt/Makefile @@ -6,5 +6,9 @@ CFLAGS += -I $(PROJ_SRC_ROOT)/$(POLYBENCH_UTILS) -DPOLYBENCH_DUMP_ARRAYS HASH_PROGRAM_OUTPUT = 1 +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 128 +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/Makefile b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/Makefile index b87fa0867a..2f2dde7c09 100644 --- a/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/Makefile +++ b/SingleSource/Benchmarks/Polybench/linear-algebra/kernels/trisolv/Makefile @@ -6,5 +6,9 @@ CFLAGS += -I $(PROJ_SRC_ROOT)/$(POLYBENCH_UTILS) -DPOLYBENCH_DUMP_ARRAYS HASH_PROGRAM_OUTPUT = 1 +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 128 +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc diff --git a/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/Makefile b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/Makefile index a818c73d2b..ad746ed1b8 100644 --- a/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/Makefile +++ b/SingleSource/Benchmarks/Polybench/linear-algebra/solvers/durbin/Makefile @@ -6,5 +6,9 @@ CFLAGS += -I $(PROJ_SRC_ROOT)/$(POLYBENCH_UTILS) -DPOLYBENCH_DUMP_ARRAYS HASH_PROGRAM_OUTPUT = 1 +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 256 +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc diff --git a/SingleSource/Benchmarks/Shootout-C++/Makefile b/SingleSource/Benchmarks/Shootout-C++/Makefile index 9a112ce1c7..61a40b20e8 100644 --- a/SingleSource/Benchmarks/Shootout-C++/Makefile +++ b/SingleSource/Benchmarks/Shootout-C++/Makefile @@ -5,5 +5,13 @@ FP_TOLERANCE := 0.00000001 DIRS=EH +ifeq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +XCORE_TARGET_NEEDS_MEMORY := 256 +# XCore takes over 2 hour. +RUNTIMELIMIT:=10800 +endif +endif + LDFLAGS += -lstdc++ include $(LEVEL)/SingleSource/Makefile.singlesrc diff --git a/SingleSource/Benchmarks/Shootout/Makefile b/SingleSource/Benchmarks/Shootout/Makefile index d55a3336b6..2fcb79db58 100644 --- a/SingleSource/Benchmarks/Shootout/Makefile +++ b/SingleSource/Benchmarks/Shootout/Makefile @@ -1,4 +1,8 @@ LEVEL = ../../.. LDFLAGS += -lm +ifeq ($(ARCH),XCore) +XCORE_TARGET_NEEDS_MEMORY := 256 +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc diff --git a/SingleSource/Benchmarks/SmallPT/Makefile b/SingleSource/Benchmarks/SmallPT/Makefile index d541540c08..998cb0b29a 100644 --- a/SingleSource/Benchmarks/SmallPT/Makefile +++ b/SingleSource/Benchmarks/SmallPT/Makefile @@ -2,8 +2,13 @@ LEVEL = ../../.. LDFLAGS += -lm -lstdc++ FP_TOLERANCE := 0.001 +ifeq ($(ARCH),XCore) +# XCore takes over 2 hours +RUNTIMELIMIT:=10800 +else # This test can take more than the default 500s timeout at -O0. RUNTIMELIMIT:=1200 +endif include $(LEVEL)/Makefile.config diff --git a/SingleSource/UnitTests/Makefile b/SingleSource/UnitTests/Makefile index 065ee447cd..b70e7b091c 100644 --- a/SingleSource/UnitTests/Makefile +++ b/SingleSource/UnitTests/Makefile @@ -43,6 +43,9 @@ ifeq ($(ARCH),XCore) PROGRAMS_TO_SKIP += AtomicOps # XCore does not support init_priority attribute PROGRAMS_TO_SKIP += initp1 +# 2007-04-25-weak contains a branch to zero. +# XCore BLR instruction can only branch 21bits, hence restrict memory to 20bits viz: 0x100000->0x1fffff +XCORE_TARGET_NEEDS_MEMORY := 1 endif LDFLAGS += -lstdc++ diff --git a/SingleSource/UnitTests/Vector/Makefile b/SingleSource/UnitTests/Vector/Makefile index 56b23f62da..af6da1ce2d 100644 --- a/SingleSource/UnitTests/Vector/Makefile +++ b/SingleSource/UnitTests/Vector/Makefile @@ -30,6 +30,13 @@ ifndef CC_UNDER_TEST_IS_CLANG PROGRAMS_TO_SKIP := constpool endif +ifeq ($(ARCH),XCore) +ifndef SMALL_PROBLEM_SIZE +# XCore takes ~1 hour. +RUNTIMELIMIT:=7200 +endif +endif + include $(LEVEL)/SingleSource/Makefile.singlesrc